feat: complete Zod schemas for all Assembly API resources - #3
Merged
Conversation
Adds assembly-kit/schemas with base, response, and request schemas grounded in the official Assembly API reference. Includes object discriminants, updatedAt, status/creationMethod on Client, and PATCH request schemas for Client and Company. 48 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Client<TCustomFields> and Company<TCustomFields> accept a custom fields type parameter (default: Record<string, unknown>) so callers can narrow the exact shape of their custom fields - customFields is now TCustomFields | undefined — null removed as API either returns an object or omits the field entirely - Zod schema stays loose (z.record(z.string(), z.unknown()).optional()) so runtime validation passes regardless of field value types - AddressValue, CustomFieldValue, and related helpers remain exported from assembly-kit/schemas as standalone type-narrowing utilities Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, configure ultracite - Rewrite base schemas (task, note, message, invoice, contract, etc.) to match assembly-api-reference.md - Extract shared MembershipType enum for DRY across message-channel, file-channel, app-connection - Add typed enums: TaskStatus, InvoiceStatus, ContractStatus, AppConnectionType, FileType, etc. - Create request schemas for note, message, invoice, subscription, contract, form-response, task, etc. - Create response schemas for subscription, app-connection, app-install, contract-template, task-template - Add barrel index files (base/, responses/, requests/) with export * pattern - Add package.json exports and bunup entry points for schemas/base, schemas/responses, schemas/requests - Configure oxlintrc overrides to allow barrel files in entry points - Switch lint/format scripts from raw oxlint/oxfmt to ultracite check/fix - Add assembly-api-reference.md as schema source of truth Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
docs/assembly-api-reference.mdMembershipTypeenum and typed status enums (TaskStatus,InvoiceStatus,ContractStatus,AppConnectionType,FileType, etc.) for DRY schema definitionsindex.tsfiles forschemas/base,schemas/responses, andschemas/requestsusingexport *patternassembly-kit/schemas/base,assembly-kit/schemas/responses,assembly-kit/schemas/requests) inbunup.config.tsandpackage.jsonexportsClientandCompanygeneric over custom fields shapelint/formatscripts from rawoxlint/oxfmttoultracite check/ultracite fix.oxlintrc.jsonoverrides to allow barrel files in entry pointsNew resources covered
Task,Note,Message,MessageChannel,FileChannel,File,AppConnection,AppInstall,Contract,ContractTemplate,Invoice,Subscription,Payment,Price,Product,Form,FormResponse,TaskTemplate,CustomFieldOption,NotificationTest plan
bun test)tsc --noEmit)ultracite check— 458 rules, 0 errors)bunup— 23 output files)🤖 Generated with Claude Code