Repository navigation
docs: typecheck every example and drop hand-written version prose - #16
Merged
Merged
Conversation
Upd4ting
marked this pull request as ready for review
October 31, 2026 04:57
Member
Author
interface-payment#16 head c793961: 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 (top-levelawait, 18 diagnostics). The project already maps@antelopejs/interface-paymenttosrc/index.ts;includeis unchanged.@antelopejs/interface-payment:docs/1.introduction.md(charge),docs/2.payments.md(readOrderPayment,chargeSavedMethod,authorizeThenCapture,refundPart),docs/3.customers-and-methods.md(startSavingCheckout,paySavingMethod). The eighth is thePaymentMethodshape block, which getsimport type { CardDetails }(it matchesPaymentMethodinsrc/types.ts:id,typeover the fourPAYMENT_METHOD_TYPES,customer,card?,createdAt).docs/4.webhooks.md"The event set" is a list of eight quoted event names, not code (TS1005 x5). It is now atextfence. The eight names equalPAYMENT_EVENT_TYPESinsrc/types.ts, in the same order.fragment. Each is a statement or member excerpt that uses application-owned names or sits inside a handler:docs/2.payments.mdthe checkout-redirect step (orders,orderId,response), the declined-payment branch (logger,render,request,return), therequires_actionredirect (payment,response,return);docs/3.customers-and-methods.mdthe customer-creation step (user,users,idempotencyKey) and the off-session renewal (user,period,dunning,return);docs/4.webhooks.mdthe@Post()controller method (a class member using@antelopejs/interface-api, which this repo does not depend on) and theHANDLERStable (orders,refunds,disputes,eventsare the application's stores). Proof each is a true excerpt: a scratch probe (not committed) wraps the fence body in an async function, imports the interface exports it uses, declares the application names asany, and typechecks againstdocs/tsconfig.json; all six function-shaped excerpts give no error. The controller method cannot be wrapped that way; its one interface call was checked on its own:VerifyWebhook({ body, headers: rawRequest.headers })withbody: Bufferand Node'sIncomingHttpHeaderstypechecks againstWebhookRequest, andWebhookVerificationErrornarrows the catch.docs/4.webhooks.mdHANDLERSalso gainsimport type { PaymentEvent }and types everyeventparameter asPaymentEvent(it was implicitany, TS7006 x9). That is a real fix to what a reader pastes, not only a marker.Proofs
Lever:
campaign/tools/docs-measure.sh interface-payment --action 46816ff3bd104560514386e30e73b89478d7989e, copied from its output.Before (
origin/campaign/integrationbf68408):After (committed head c793961,
--dir .): no output, exit 0.pnpm exec antelopejs-sync --check:Guardrails are in sync.pnpm run checkson head c793961:Checks: 8 passed, 0 failed.Attention
CI docs step
Run https://github.com/AntelopeJS/interface-payment/actions/runs/41170583521 on head c793961, step "Check documentation" (copied from the log):