Repository navigation
docs: typecheck every example and drop hand-written version prose - #13
Merged
Merged
Conversation
Upd4ting
marked this pull request as ready for review
October 31, 2026 04:55
Member
Author
interface-subscriptions#13 head bceb643: PASS+NOTESHead verified: Checks
BlockingNone. Notes
Artifacts: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Goal (Antony): the docs rewrite on
campaign/integration, every repo's docs check green against the re-pinned docs action (.githubtagv1-campaign, docs action tooling-configs v0.2.17, pin46816ff). This PR switches this repo's ci-node caller to@v1-campaignand fixes every failure that action reports, so the integration branch stays green.What changed
.github/workflows/ci.yml: the ci-node caller@v1->@v1-campaign. Other callers stay on@v1.docs/tsconfig.json(existing docs project): addedmodule: esnextandmoduleResolution: bundler. The root config is CommonJS, which raised TS1378 on top-levelawaitin the examples. The docs project already maps@antelopejs/interface-subscriptionstosrc/index.ts, andincludeis unchanged. The plan namesnodenext;esnext/bundleris what the merged mongodb and dms docs projects use.README.md: the quick-start event handler now importstype Subscriptionand declaresgrantOrRevokeAccess(subscription: Subscription): Promise<void>, the application policy the prose already says it stands for (the prose now adds that thedeclareline only gives it a type). The Compatibility paragraph drops "1.16.0" from "@antelopejs/core1.16.0 is a development test runner, not a runtime peer." (the one version failure). What stays is true:@antelopejs/coreis a devDependency only, andpeerDependenciesholds only interface-core and interface-payment. The generated block carries those ranges.docs/2.subscriptions.md: three loose statements are now complete, checked functions with imports from the public packages:subscribe(accountId, customer, method: PaymentMethod)aroundCreateSubscription,switchMethod(subscription: Subscription, newMethodId, idempotencyKey)aroundUpdateSubscriptionPaymentMethod, andcancel(id)around the twoCancelSubscriptioncalls. The calls and arguments are unchanged; only the free variables became parameters.docs/3.events.md: the event handler importstype SubscriptionEventand declaresalreadyHandled(eventId: string): Promise<boolean>andapplyToAccount(event: SubscriptionEvent): Promise<void>(the page already treats them as the application's). The payment-webhook snippet is wrapped inhandlePaymentWebhook(request: WebhookRequest)with imports ofVerifyWebhookandWebhookRequestfrom@antelopejs/interface-paymentandSUBSCRIPTION_METADATA_KEY; its body is unchanged. Itsreturnwas outside any function.docs/4.implementing.md:68: 1 fence markedfragment(the 7 remaining-names diagnostics). It is theconstruct()of an implementing module, whoseCreateSubscription,GetSubscription,ListSubscriptions,CancelSubscription,UpdateSubscriptionPaymentMethod,registerandunregisterare the implementer's own functions defined elsewhere. Proof it is a true excerpt: the block unchanged, with those seven names declared with the interface's own parameter and return types, typechecks againstdocs/tsconfig.jsonwithImplementInterface(subscriptions, ...)and no error.Docs:lines of the raw before and of the CI log below).Proofs
Lever:
campaign/tools/docs-measure.sh interface-subscriptions --action 46816ff3bd104560514386e30e73b89478d7989e, copied from its output.Before (
origin/campaign/integrationdb88bde):After (committed head bceb643,
--dir .): no output, exit 0.pnpm exec antelopejs-sync --check:Guardrails are in sync.pnpm run checkson head bceb643:Checks: 9 passed, 0 failed.Attention
CI docs step
Run https://github.com/AntelopeJS/interface-subscriptions/actions/runs/41170399547 on head bceb643, step "Check documentation" (copied from the log):