mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-04-10 12:59:05 +02:00
Add extra comments above the validation schemas
This commit is contained in:
parent
b7de40616a
commit
ef496af27e
@ -43,6 +43,8 @@ const genericEventSchema = z.object({
|
||||
data: z.unknown(),
|
||||
});
|
||||
|
||||
// This is a subtype of Order type from "@lemonsqueezy/lemonsqueezy.js"
|
||||
// specifically Order['data']
|
||||
const orderDataSchema = z.object({
|
||||
attributes: z.object({
|
||||
customer_id: z.number(),
|
||||
@ -54,6 +56,8 @@ const orderDataSchema = z.object({
|
||||
}),
|
||||
});
|
||||
|
||||
// This is a subtype of Subscription type from "@lemonsqueezy/lemonsqueezy.js"
|
||||
// specifically Subscription['data']
|
||||
const subscriptionDataSchema = z.object({
|
||||
attributes: z.object({
|
||||
customer_id: z.number(),
|
||||
|
@ -49,16 +49,19 @@ const genericStripeEventSchema = z.object({
|
||||
}),
|
||||
});
|
||||
|
||||
// This is a subtype of Stripe.Checkout.Session from "stripe"
|
||||
const sessionCompletedDataSchema = z.object({
|
||||
id: z.string(),
|
||||
customer: z.string(),
|
||||
});
|
||||
|
||||
// This is a subtype of Stripe.Invoice from "stripe"
|
||||
const invoicePaidDataSchema = z.object({
|
||||
customer: z.string(),
|
||||
period_start: z.number(),
|
||||
});
|
||||
|
||||
// This is a subtype of Stripe.Subscription from "stripe"
|
||||
const subscriptionUpdatedDataSchema = z.object({
|
||||
customer: z.string(),
|
||||
status: z.string(),
|
||||
@ -74,6 +77,7 @@ const subscriptionUpdatedDataSchema = z.object({
|
||||
}),
|
||||
});
|
||||
|
||||
// This is a subtype of Stripe.Subscription from "stripe"
|
||||
const subscriptionDeletedDataSchema = z.object({
|
||||
customer: z.string(),
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user