Conversation
Add separate mcpContract namespace for MCP tools: - customers: list, get, create, update, delete - products: list, get, create, update, delete - orders: list, get (read-only) - checkouts: list, get (read-only) Export mcpContract from index.ts alongside SDK contract. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Organize imports alphabetically - Use Number.isNaN instead of global isNaN - Format multi-line exports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@codex review please |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2aededc029
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Use OrderStatusSchema instead of z.string() for status field - Use CurrencySchema instead of z.string() for currency field - Export OrderStatusSchema and OrderStatus type for consumers This ensures the contract validates against known enum values rather than accepting arbitrary strings, preventing silent acceptance of invalid values. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@codex check again please |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da5159882d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…erval - Rename RecurringIntervalWithNeverSchema → RecurringIntervalInputSchema - Export RecurringIntervalInputSchema and RecurringIntervalInput type - Document that server normalizes "NEVER" to null when storing/returning Input accepts "NEVER" for one-time products, output uses null. Server-side normalization ensures contract consistency. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@codex one more check please |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Add pagination-based list endpoint for checkouts with optional status filter. This merges the MCP checkouts.list functionality into the unified checkout contract. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add get, create, update, delete endpoints to products contract. Keep existing list endpoint unchanged (no pagination). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add customer contract with CRUD operations (list, get, create, update, delete). Uses singular naming convention. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add order contract with list and get operations. Uses singular naming convention. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the separate mcp/ directory and mcpContract export. All contracts are now in the unified contract object. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add sdkContract and mcpContract exports that contain only the methods each router implements. This allows proper TypeScript validation while keeping the unified contract for type sharing. - sdkContract: checkout.get/create/confirm/etc, onboarding.*, products.list - mcpContract: customer.*, order.*, checkout.list/get (summary), products.* - Add CheckoutListItemSchema and CheckoutDetailSchema for MCP endpoints - These are simpler than the full CheckoutSchema used by SDK Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| id: z.string(), | ||
| name: z.string().optional(), | ||
| email: z.string().email().optional(), | ||
| userMetadata: z.record(z.string(), z.string()).optional(), |
There was a problem hiding this comment.
We have metadata defined on many schemas but in many different ways. I think we should have a single Metadata schema that gets re-used. Can be a future ticket as it is probably an existing problem
- Replace inline CheckoutCustomerSchema with CustomerSchema.nullable() - Remove unnecessary OrderDetailSchema alias Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add schemas and contracts for mcp API