Skip to content

Add v1.1.0 TypeScript examples for commercial verbs#20

Merged
GsCommand merged 2 commits intomainfrom
codex/add-typescript-examples-for-v1.1.0
Mar 20, 2026
Merged

Add v1.1.0 TypeScript examples for commercial verbs#20
GsCommand merged 2 commits intomainfrom
codex/add-typescript-examples-for-v1.1.0

Conversation

@GsCommand
Copy link
Contributor

Motivation

  • Provide TypeScript authoring guidance for Protocol-Commercial v1.1.0 so implementers have the same per-verb TS example surface that Protocol-Commons exposes.
  • Fill the parity gap introduced by v1.1.0 (v1.0.0 had TS examples but v1.1.0 lacked them) while keeping all shapes strictly aligned to the current commercial schemas.

Description

  • Add self-contained TypeScript request and receipt example files for all five commercial verbs under examples/v1.1.0/commercial/<verb>/ts/, creating paired *.request.examples.ts and *.receipt.examples.ts files for authorize, checkout, purchase, ship, and verify (10 new files in total).
  • Mirror the Protocol-Commons v1.1.0 pattern by providing small handwritten interface definitions plus exported valid and invalid example objects in each file so examples are copyable and readable.
  • Ensure the TS shapes follow the canonical schema semantics (e.g. checkout.capture uses "immediate" | "if_authorized", purchase.payment_input models the current one-of options, ship service/status enums and commercial_ref types match the schema, and verify receipt/verifier semantics align to the current corrected enums).
  • Update README.md to make the new ts/ example directories discoverable and note that examples/v1.1.0/commercial/<verb>/ts/ mirrors the Protocol-Commons TS guidance pattern.

Testing

  • Ran TypeScript sanity check with npx tsc --noEmit --target ES2020 --module ESNext --moduleResolution node examples/v1.1.0/commercial/*/ts/*.ts and it completed with no errors.
  • Ran example validation with npm run validate:examples which validated all current-line examples successfully.
  • Validated release integrity with npm run validate:integrity (checksum scope validated) and regenerated checksums with npm run generate:checksums which wrote updated checksums.txt successfully.
  • All automated validations completed successfully and the changes were committed as Add v1.1.0 commercial TypeScript examples.

Codex Task

@GsCommand GsCommand merged commit 647f91e into main Mar 20, 2026
1 check failed
@GsCommand GsCommand deleted the codex/add-typescript-examples-for-v1.1.0 branch March 20, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant