You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add subscription and customer schemas and contracts (MDK-401)
* feat: add subscription schemas and contracts
Add subscription support for recurring payments:
- SubscriptionSchema with status, period dates, and cancellation fields
- SubscriptionWebhookPayloadSchema for subscription.* events
- Subscription ORPC contracts (createRenewalCheckout, cancel, get)
* feat: add customer schemas and contracts
Add customer endpoint support for subscription management:
- CustomerSchema with subscriptions and hasActiveSubscription
- CustomerSubscriptionSchema for subscription summaries
- GetCustomerInputSchema with externalId/email/customerId lookup
- customer.get ORPC contract
* fix: require email in CustomerSchema for subscription communication
* feat: add prepare script for git installs
* fix: allow nullable email in Customer schema
* fix: add datetime validation to ISO date fields, remove hasActiveSubscription
- Add z.string().datetime() validation to currentPeriodStart, currentPeriodEnd
in SubscriptionSchema and CustomerSubscriptionSchema
- Remove hasActiveSubscription from CustomerSchema as it can be derived
from subscriptions array client-side
* fix: make customerEmail nullable in SubscriptionSchema
Allows the schema to handle edge cases while business logic
enforces email requirement at subscription creation time.
* fix: format code with biome
* fix: add customer to sdkContract
0 commit comments