@forklaunch/implementation-billing-base 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__test__/schemaEquality.test.js +44 -20
- package/lib/eject/schemas/billingPortal.schema.ts +10 -2
- package/lib/eject/schemas/checkoutSession.schema.ts +10 -2
- package/lib/eject/schemas/paymentLink.schema.ts +10 -2
- package/lib/eject/schemas/plan.schema.ts +8 -2
- package/lib/eject/schemas/subscription.schema.ts +10 -2
- package/lib/schemas/billingPortal.schema.d.ts +10 -2
- package/lib/schemas/billingPortal.schema.d.ts.map +1 -1
- package/lib/schemas/billingPortal.schema.js +2 -12
- package/lib/schemas/checkoutSession.schema.d.ts +10 -2
- package/lib/schemas/checkoutSession.schema.d.ts.map +1 -1
- package/lib/schemas/checkoutSession.schema.js +2 -12
- package/lib/schemas/paymentLink.schema.d.ts +10 -2
- package/lib/schemas/paymentLink.schema.d.ts.map +1 -1
- package/lib/schemas/paymentLink.schema.js +2 -12
- package/lib/schemas/plan.schema.d.ts +10 -2
- package/lib/schemas/plan.schema.d.ts.map +1 -1
- package/lib/schemas/plan.schema.js +2 -12
- package/lib/schemas/subscription.schema.d.ts +11 -3
- package/lib/schemas/subscription.schema.d.ts.map +1 -1
- package/lib/schemas/subscription.schema.js +2 -12
- package/lib/schemas/typebox/billingPortal.schema.d.ts +29 -2
- package/lib/schemas/typebox/billingPortal.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/billingPortal.schema.js +7 -2
- package/lib/schemas/typebox/checkoutSession.schema.d.ts +36 -2
- package/lib/schemas/typebox/checkoutSession.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/checkoutSession.schema.js +7 -2
- package/lib/schemas/typebox/paymentLink.schema.d.ts +41 -2
- package/lib/schemas/typebox/paymentLink.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/paymentLink.schema.js +7 -2
- package/lib/schemas/typebox/plan.schema.d.ts +47 -2
- package/lib/schemas/typebox/plan.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/plan.schema.js +7 -2
- package/lib/schemas/typebox/subscription.schema.d.ts +53 -2
- package/lib/schemas/typebox/subscription.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/subscription.schema.js +7 -2
- package/lib/schemas/zod/billingPortal.schema.d.ts +29 -2
- package/lib/schemas/zod/billingPortal.schema.d.ts.map +1 -1
- package/lib/schemas/zod/billingPortal.schema.js +7 -2
- package/lib/schemas/zod/checkoutSession.schema.d.ts +35 -2
- package/lib/schemas/zod/checkoutSession.schema.d.ts.map +1 -1
- package/lib/schemas/zod/checkoutSession.schema.js +7 -2
- package/lib/schemas/zod/paymentLink.schema.d.ts +41 -2
- package/lib/schemas/zod/paymentLink.schema.d.ts.map +1 -1
- package/lib/schemas/zod/paymentLink.schema.js +7 -2
- package/lib/schemas/zod/plan.schema.d.ts +47 -2
- package/lib/schemas/zod/plan.schema.d.ts.map +1 -1
- package/lib/schemas/zod/plan.schema.js +7 -2
- package/lib/schemas/zod/subscription.schema.d.ts +53 -2
- package/lib/schemas/zod/subscription.schema.d.ts.map +1 -1
- package/lib/schemas/zod/subscription.schema.js +7 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -8
|
@@ -10,34 +10,58 @@ import { CheckoutSessionSchema as ZodCheckoutSessionSchema, CreateCheckoutSessio
|
|
|
10
10
|
import { CreatePaymentLinkSchema as ZodCreatePaymentLinkSchema, PaymentLinkSchema as ZodPaymentLinkSchema, UpdatePaymentLinkSchema as ZodUpdatePaymentLinkSchema } from '../schemas/zod/paymentLink.schema';
|
|
11
11
|
import { CreatePlanSchema as ZodCreatePlanSchema, PlanSchema as ZodPlanSchema, UpdatePlanSchema as ZodUpdatePlanSchema } from '../schemas/zod/plan.schema';
|
|
12
12
|
import { CreateSubscriptionSchema as ZodCreateSubscriptionSchema, SubscriptionSchema as ZodSubscriptionSchema, UpdateSubscriptionSchema as ZodUpdateSubscriptionSchema } from '../schemas/zod/subscription.schema';
|
|
13
|
-
const zodUpdateBillingPortalSchema = ZodUpdateBillingPortalSchema(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
13
|
+
const zodUpdateBillingPortalSchema = ZodUpdateBillingPortalSchema({
|
|
14
|
+
uuidId: false
|
|
15
|
+
});
|
|
16
|
+
const typeboxUpdateBillingPortalSchema = TypeboxUpdateBillingPortalSchema({
|
|
17
|
+
uuidId: false
|
|
18
|
+
});
|
|
19
|
+
const zodBillingPortalSchema = ZodBillingPortalSchema({ uuidId: false });
|
|
20
|
+
const typeboxBillingPortalSchema = TypeboxBillingPortalSchema({
|
|
21
|
+
uuidId: false
|
|
22
|
+
});
|
|
17
23
|
const zodCreateCheckoutSessionSchema = ZodCreateCheckoutSessionSchema(DummyEnum);
|
|
18
24
|
const typeboxCreateCheckoutSessionSchema = TypeboxCreateCheckoutSessionSchema(DummyEnum);
|
|
19
|
-
const zodUpdateCheckoutSessionSchema = ZodUpdateCheckoutSessionSchema(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
25
|
+
const zodUpdateCheckoutSessionSchema = ZodUpdateCheckoutSessionSchema({
|
|
26
|
+
uuidId: false
|
|
27
|
+
})(DummyEnum);
|
|
28
|
+
const typeboxUpdateCheckoutSessionSchema = TypeboxUpdateCheckoutSessionSchema({
|
|
29
|
+
uuidId: false
|
|
30
|
+
})(DummyEnum);
|
|
31
|
+
const zodCheckoutSessionSchema = ZodCheckoutSessionSchema({ uuidId: true })(DummyEnum);
|
|
32
|
+
const typeboxCheckoutSessionSchema = TypeboxCheckoutSessionSchema({
|
|
33
|
+
uuidId: true
|
|
34
|
+
})(DummyEnum);
|
|
23
35
|
const zodCreatePaymentLinkSchema = ZodCreatePaymentLinkSchema(DummyEnum);
|
|
24
36
|
const typeboxCreatePaymentLinkSchema = TypeboxCreatePaymentLinkSchema(DummyEnum);
|
|
25
|
-
const zodUpdatePaymentLinkSchema = ZodUpdatePaymentLinkSchema(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
37
|
+
const zodUpdatePaymentLinkSchema = ZodUpdatePaymentLinkSchema({
|
|
38
|
+
uuidId: false
|
|
39
|
+
})(DummyEnum);
|
|
40
|
+
const typeboxUpdatePaymentLinkSchema = TypeboxUpdatePaymentLinkSchema({
|
|
41
|
+
uuidId: false
|
|
42
|
+
})(DummyEnum);
|
|
43
|
+
const zodPaymentLinkSchema = ZodPaymentLinkSchema({ uuidId: true })(DummyEnum);
|
|
44
|
+
const typeboxPaymentLinkSchema = TypeboxPaymentLinkSchema({
|
|
45
|
+
uuidId: false
|
|
46
|
+
})(DummyEnum);
|
|
29
47
|
const zodCreatePlanSchema = ZodCreatePlanSchema(DummyEnum, DummyEnum);
|
|
30
48
|
const typeboxCreatePlanSchema = TypeboxCreatePlanSchema(DummyEnum, DummyEnum);
|
|
31
|
-
const zodUpdatePlanSchema = ZodUpdatePlanSchema(false)(DummyEnum, DummyEnum);
|
|
32
|
-
const typeboxUpdatePlanSchema = TypeboxUpdatePlanSchema(false)(DummyEnum, DummyEnum);
|
|
33
|
-
const zodPlanSchema = ZodPlanSchema(
|
|
34
|
-
const typeboxPlanSchema = TypeboxPlanSchema(
|
|
49
|
+
const zodUpdatePlanSchema = ZodUpdatePlanSchema({ uuidId: false })(DummyEnum, DummyEnum);
|
|
50
|
+
const typeboxUpdatePlanSchema = TypeboxUpdatePlanSchema({ uuidId: false })(DummyEnum, DummyEnum);
|
|
51
|
+
const zodPlanSchema = ZodPlanSchema({ uuidId: true })(DummyEnum, DummyEnum);
|
|
52
|
+
const typeboxPlanSchema = TypeboxPlanSchema({ uuidId: true })(DummyEnum, DummyEnum);
|
|
35
53
|
const zodCreateSubscriptionSchema = ZodCreateSubscriptionSchema(DummyEnum, DummyEnum);
|
|
36
54
|
const typeboxCreateSubscriptionSchema = TypeboxCreateSubscriptionSchema(DummyEnum, DummyEnum);
|
|
37
|
-
const zodUpdateSubscriptionSchema = ZodUpdateSubscriptionSchema(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
55
|
+
const zodUpdateSubscriptionSchema = ZodUpdateSubscriptionSchema({
|
|
56
|
+
uuidId: false
|
|
57
|
+
})(DummyEnum, DummyEnum);
|
|
58
|
+
const typeboxUpdateSubscriptionSchema = TypeboxUpdateSubscriptionSchema({
|
|
59
|
+
uuidId: false
|
|
60
|
+
})(DummyEnum, DummyEnum);
|
|
61
|
+
const zodSubscriptionSchema = ZodSubscriptionSchema({ uuidId: true })(DummyEnum, DummyEnum);
|
|
62
|
+
const typeboxSubscriptionSchema = TypeboxSubscriptionSchema({
|
|
63
|
+
uuidId: true
|
|
64
|
+
})(DummyEnum, DummyEnum);
|
|
41
65
|
describe('schema equality', () => {
|
|
42
66
|
it('should be equal for billing portal', () => {
|
|
43
67
|
expect(isTrue(testSchemaEquality(ZodCreateBillingPortalSchema, TypeboxCreateBillingPortalSchema, {
|
|
@@ -12,13 +12,13 @@ export const CreateBillingPortalSchema = {
|
|
|
12
12
|
expiresAt: date
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export const UpdateBillingPortalSchema = (uuidId: boolean) => ({
|
|
15
|
+
export const UpdateBillingPortalSchema = ({ uuidId }: { uuidId: boolean }) => ({
|
|
16
16
|
id: uuidId ? uuid : string,
|
|
17
17
|
uri: optional(string),
|
|
18
18
|
expiresAt: optional(date)
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
export const BillingPortalSchema = (uuidId: boolean) => ({
|
|
21
|
+
export const BillingPortalSchema = ({ uuidId }: { uuidId: boolean }) => ({
|
|
22
22
|
id: uuidId ? uuid : string,
|
|
23
23
|
customerId: string,
|
|
24
24
|
uri: string,
|
|
@@ -27,3 +27,11 @@ export const BillingPortalSchema = (uuidId: boolean) => ({
|
|
|
27
27
|
createdAt: optional(date),
|
|
28
28
|
updatedAt: optional(date)
|
|
29
29
|
});
|
|
30
|
+
|
|
31
|
+
export const BaseBillingPortalServiceSchemas = (options: {
|
|
32
|
+
uuidId: boolean;
|
|
33
|
+
}) => ({
|
|
34
|
+
CreateBillingPortalSchema,
|
|
35
|
+
UpdateBillingPortalSchema: UpdateBillingPortalSchema(options),
|
|
36
|
+
BillingPortalSchema: BillingPortalSchema(options)
|
|
37
|
+
});
|
|
@@ -22,7 +22,7 @@ export const CreateCheckoutSessionSchema = <
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
export const UpdateCheckoutSessionSchema =
|
|
25
|
-
(uuidId: boolean) =>
|
|
25
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
26
26
|
<T extends Record<string, LiteralSchema>>(PaymentMethodEnum: T) => ({
|
|
27
27
|
id: uuidId ? uuid : string,
|
|
28
28
|
customerId: optional(string),
|
|
@@ -33,7 +33,7 @@ export const UpdateCheckoutSessionSchema =
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
export const CheckoutSessionSchema =
|
|
36
|
-
(uuidId: boolean) =>
|
|
36
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
37
37
|
<T extends Record<string, LiteralSchema>>(PaymentMethodEnum: T) => ({
|
|
38
38
|
id: uuidId ? uuid : string,
|
|
39
39
|
customerId: string,
|
|
@@ -44,3 +44,11 @@ export const CheckoutSessionSchema =
|
|
|
44
44
|
createdAt: optional(date),
|
|
45
45
|
updatedAt: optional(date)
|
|
46
46
|
});
|
|
47
|
+
|
|
48
|
+
export const BaseCheckoutSessionServiceSchemas = (options: {
|
|
49
|
+
uuidId: boolean;
|
|
50
|
+
}) => ({
|
|
51
|
+
CreateCheckoutSessionSchema,
|
|
52
|
+
UpdateCheckoutSessionSchema: UpdateCheckoutSessionSchema(options),
|
|
53
|
+
CheckoutSessionSchema: CheckoutSessionSchema(options)
|
|
54
|
+
});
|
|
@@ -24,7 +24,7 @@ export const CreatePaymentLinkSchema = <
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export const UpdatePaymentLinkSchema =
|
|
27
|
-
(uuidId: boolean) =>
|
|
27
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
28
28
|
<T extends Record<string, LiteralSchema>>(CurrencyEnum: T) => ({
|
|
29
29
|
id: uuidId ? uuid : string,
|
|
30
30
|
amount: optional(number),
|
|
@@ -37,7 +37,7 @@ export const UpdatePaymentLinkSchema =
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export const PaymentLinkSchema =
|
|
40
|
-
(uuidId: boolean) =>
|
|
40
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
41
41
|
<T extends Record<string, LiteralSchema>>(CurrencyEnum: T) => ({
|
|
42
42
|
id: uuidId ? uuid : string,
|
|
43
43
|
amount: number,
|
|
@@ -50,3 +50,11 @@ export const PaymentLinkSchema =
|
|
|
50
50
|
createdAt: optional(date),
|
|
51
51
|
updatedAt: optional(date)
|
|
52
52
|
});
|
|
53
|
+
|
|
54
|
+
export const BasePaymentLinkServiceSchemas = (options: {
|
|
55
|
+
uuidId: boolean;
|
|
56
|
+
}) => ({
|
|
57
|
+
CreatePaymentLinkSchema,
|
|
58
|
+
UpdatePaymentLinkSchema: UpdatePaymentLinkSchema(options),
|
|
59
|
+
PaymentLinkSchema: PaymentLinkSchema(options)
|
|
60
|
+
});
|
|
@@ -30,7 +30,7 @@ export const CreatePlanSchema = <
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
export const UpdatePlanSchema =
|
|
33
|
-
(uuidId: boolean) =>
|
|
33
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
34
34
|
<
|
|
35
35
|
T extends Record<string, LiteralSchema>,
|
|
36
36
|
U extends Record<string, LiteralSchema>
|
|
@@ -51,7 +51,7 @@ export const UpdatePlanSchema =
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
export const PlanSchema =
|
|
54
|
-
(uuidId: boolean) =>
|
|
54
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
55
55
|
<
|
|
56
56
|
T extends Record<string, LiteralSchema>,
|
|
57
57
|
U extends Record<string, LiteralSchema>
|
|
@@ -72,3 +72,9 @@ export const PlanSchema =
|
|
|
72
72
|
createdAt: optional(date),
|
|
73
73
|
updatedAt: optional(date)
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
export const BasePlanServiceSchemas = (options: { uuidId: boolean }) => ({
|
|
77
|
+
CreatePlanSchema,
|
|
78
|
+
UpdatePlanSchema: UpdatePlanSchema(options),
|
|
79
|
+
PlanSchema: PlanSchema(options)
|
|
80
|
+
});
|
|
@@ -30,7 +30,7 @@ export const CreateSubscriptionSchema = <
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
export const UpdateSubscriptionSchema =
|
|
33
|
-
(uuidId: boolean) =>
|
|
33
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
34
34
|
<
|
|
35
35
|
T extends Record<string, LiteralSchema>,
|
|
36
36
|
U extends Record<string, LiteralSchema>
|
|
@@ -53,7 +53,7 @@ export const UpdateSubscriptionSchema =
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
export const SubscriptionSchema =
|
|
56
|
-
(uuidId: boolean) =>
|
|
56
|
+
({ uuidId }: { uuidId: boolean }) =>
|
|
57
57
|
<
|
|
58
58
|
T extends Record<string, LiteralSchema>,
|
|
59
59
|
U extends Record<string, LiteralSchema>
|
|
@@ -76,3 +76,11 @@ export const SubscriptionSchema =
|
|
|
76
76
|
createdAt: optional(date),
|
|
77
77
|
updatedAt: optional(date)
|
|
78
78
|
});
|
|
79
|
+
|
|
80
|
+
export const BaseSubscriptionServiceSchemas = (options: {
|
|
81
|
+
uuidId: boolean;
|
|
82
|
+
}) => ({
|
|
83
|
+
CreateSubscriptionSchema,
|
|
84
|
+
UpdateSubscriptionSchema: UpdateSubscriptionSchema(options),
|
|
85
|
+
SubscriptionSchema: SubscriptionSchema(options)
|
|
86
|
+
});
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export declare const BaseBillingPortalServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(
|
|
1
|
+
export declare const BaseBillingPortalServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(options: {
|
|
2
|
+
uuidId: boolean;
|
|
3
|
+
} & {
|
|
4
|
+
validator: SchemaValidator;
|
|
5
|
+
}) => import("@forklaunch/core/dtoMapper").SchemasByValidator<SchemaValidator, (options: {
|
|
6
|
+
uuidId: boolean;
|
|
7
|
+
}) => {
|
|
2
8
|
CreateBillingPortalSchema: {
|
|
3
9
|
customerId: import("@sinclair/typebox").TString;
|
|
4
10
|
uri: import("@sinclair/typebox").TString;
|
|
@@ -18,7 +24,9 @@ export declare const BaseBillingPortalServiceSchemas: <SchemaValidator extends i
|
|
|
18
24
|
createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
19
25
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
20
26
|
};
|
|
21
|
-
}, (
|
|
27
|
+
}, (options: {
|
|
28
|
+
uuidId: boolean;
|
|
29
|
+
}) => {
|
|
22
30
|
CreateBillingPortalSchema: {
|
|
23
31
|
customerId: import("zod").ZodString;
|
|
24
32
|
uri: import("zod").ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingPortal.schema.d.ts","sourceRoot":"","sources":["../../schemas/billingPortal.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"billingPortal.schema.d.ts","sourceRoot":"","sources":["../../schemas/billingPortal.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG3C,CAAC"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { serviceSchemaResolver } from '@forklaunch/core/dtoMapper';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const TypeBoxSchemas = (uuidId) => ({
|
|
5
|
-
CreateBillingPortalSchema: TypeBoxCreateBillingPortalSchema,
|
|
6
|
-
UpdateBillingPortalSchema: TypeBoxUpdateBillingPortalSchema(uuidId),
|
|
7
|
-
BillingPortalSchema: TypeBoxBillingPortalSchema(uuidId)
|
|
8
|
-
});
|
|
9
|
-
const ZodSchemas = (uuidId) => ({
|
|
10
|
-
CreateBillingPortalSchema: ZodCreateBillingPortalSchema,
|
|
11
|
-
UpdateBillingPortalSchema: ZodUpdateBillingPortalSchema(uuidId),
|
|
12
|
-
BillingPortalSchema: ZodBillingPortalSchema(uuidId)
|
|
13
|
-
});
|
|
2
|
+
import { BaseBillingPortalServiceSchemas as TypeBoxSchemas } from './typebox/billingPortal.schema';
|
|
3
|
+
import { BaseBillingPortalServiceSchemas as ZodSchemas } from './zod/billingPortal.schema';
|
|
14
4
|
export const BaseBillingPortalServiceSchemas = serviceSchemaResolver(TypeBoxSchemas, ZodSchemas);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export declare const BaseCheckoutSessionServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(
|
|
1
|
+
export declare const BaseCheckoutSessionServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(options: {
|
|
2
|
+
uuidId: boolean;
|
|
3
|
+
} & {
|
|
4
|
+
validator: SchemaValidator;
|
|
5
|
+
}) => import("@forklaunch/core/dtoMapper").SchemasByValidator<SchemaValidator, (options: {
|
|
6
|
+
uuidId: boolean;
|
|
7
|
+
}) => {
|
|
2
8
|
CreateCheckoutSessionSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>>(PaymentMethodEnum: T) => {
|
|
3
9
|
customerId: import("@sinclair/typebox").TString;
|
|
4
10
|
paymentMethods: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[{ [K in keyof T]: import("@sinclair/typebox").TLiteral<T[K]>; }[keyof T]]>>;
|
|
@@ -25,7 +31,9 @@ export declare const BaseCheckoutSessionServiceSchemas: <SchemaValidator extends
|
|
|
25
31
|
createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
26
32
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
27
33
|
};
|
|
28
|
-
}, (
|
|
34
|
+
}, (options: {
|
|
35
|
+
uuidId: boolean;
|
|
36
|
+
}) => {
|
|
29
37
|
CreateCheckoutSessionSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>>(PaymentMethodEnum: T) => {
|
|
30
38
|
customerId: import("zod").ZodString;
|
|
31
39
|
paymentMethods: import("zod").ZodArray<import("zod").ZodUnion<[{ [K in keyof T]: import("zod").ZodLiteral<T[K]>; }[keyof T]]>, "many">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkoutSession.schema.d.ts","sourceRoot":"","sources":["../../schemas/checkoutSession.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkoutSession.schema.d.ts","sourceRoot":"","sources":["../../schemas/checkoutSession.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7C,CAAC"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { serviceSchemaResolver } from '@forklaunch/core/dtoMapper';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const TypeBoxSchemas = (uuidId) => ({
|
|
5
|
-
CreateCheckoutSessionSchema: TypeBoxCreateCheckoutSessionSchema,
|
|
6
|
-
UpdateCheckoutSessionSchema: TypeBoxUpdateCheckoutSessionSchema(uuidId),
|
|
7
|
-
CheckoutSessionSchema: TypeBoxCheckoutSessionSchema(uuidId)
|
|
8
|
-
});
|
|
9
|
-
const ZodSchemas = (uuidId) => ({
|
|
10
|
-
CreateCheckoutSessionSchema: ZodCreateCheckoutSessionSchema,
|
|
11
|
-
UpdateCheckoutSessionSchema: ZodUpdateCheckoutSessionSchema(uuidId),
|
|
12
|
-
CheckoutSessionSchema: ZodCheckoutSessionSchema(uuidId)
|
|
13
|
-
});
|
|
2
|
+
import { BaseCheckoutSessionServiceSchemas as TypeBoxSchemas } from './typebox/checkoutSession.schema';
|
|
3
|
+
import { BaseCheckoutSessionServiceSchemas as ZodSchemas } from './zod/checkoutSession.schema';
|
|
14
4
|
export const BaseCheckoutSessionServiceSchemas = serviceSchemaResolver(TypeBoxSchemas, ZodSchemas);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export declare const BasePaymentLinkServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(
|
|
1
|
+
export declare const BasePaymentLinkServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(options: {
|
|
2
|
+
uuidId: boolean;
|
|
3
|
+
} & {
|
|
4
|
+
validator: SchemaValidator;
|
|
5
|
+
}) => import("@forklaunch/core/dtoMapper").SchemasByValidator<SchemaValidator, (options: {
|
|
6
|
+
uuidId: boolean;
|
|
7
|
+
}) => {
|
|
2
8
|
CreatePaymentLinkSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>>(CurrencyEnum: T) => {
|
|
3
9
|
amount: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull, import("@sinclair/typebox").TDate, import("@sinclair/typebox").TBigInt]>, number>;
|
|
4
10
|
currency: import("@sinclair/typebox").TUnion<[{ [K in keyof T]: import("@sinclair/typebox").TLiteral<T[K]>; }[keyof T]]>;
|
|
@@ -30,7 +36,9 @@ export declare const BasePaymentLinkServiceSchemas: <SchemaValidator extends imp
|
|
|
30
36
|
createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
31
37
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
32
38
|
};
|
|
33
|
-
}, (
|
|
39
|
+
}, (options: {
|
|
40
|
+
uuidId: boolean;
|
|
41
|
+
}) => {
|
|
34
42
|
CreatePaymentLinkSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>>(CurrencyEnum: T) => {
|
|
35
43
|
amount: import("zod").ZodPipeline<import("zod").ZodEffects<import("zod").ZodAny, any, any>, import("zod").ZodNumber>;
|
|
36
44
|
currency: import("zod").ZodUnion<[{ [K in keyof T]: import("zod").ZodLiteral<T[K]>; }[keyof T]]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentLink.schema.d.ts","sourceRoot":"","sources":["../../schemas/paymentLink.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paymentLink.schema.d.ts","sourceRoot":"","sources":["../../schemas/paymentLink.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzC,CAAC"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { serviceSchemaResolver } from '@forklaunch/core/dtoMapper';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const TypeBoxSchemas = (uuidId) => ({
|
|
5
|
-
CreatePaymentLinkSchema: TypeBoxCreatePaymentLinkSchema,
|
|
6
|
-
UpdatePaymentLinkSchema: TypeBoxUpdatePaymentLinkSchema(uuidId),
|
|
7
|
-
PaymentLinkSchema: TypeBoxPaymentLinkSchema(uuidId)
|
|
8
|
-
});
|
|
9
|
-
const ZodSchemas = (uuidId) => ({
|
|
10
|
-
CreatePaymentLinkSchema: ZodCreatePaymentLinkSchema,
|
|
11
|
-
UpdatePaymentLinkSchema: ZodUpdatePaymentLinkSchema(uuidId),
|
|
12
|
-
PaymentLinkSchema: ZodPaymentLinkSchema(uuidId)
|
|
13
|
-
});
|
|
2
|
+
import { BasePaymentLinkServiceSchemas as TypeBoxSchemas } from './typebox/paymentLink.schema';
|
|
3
|
+
import { BasePaymentLinkServiceSchemas as ZodSchemas } from './zod/paymentLink.schema';
|
|
14
4
|
export const BasePaymentLinkServiceSchemas = serviceSchemaResolver(TypeBoxSchemas, ZodSchemas);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export declare const BasePlanServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(
|
|
1
|
+
export declare const BasePlanServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(options: {
|
|
2
|
+
uuidId: boolean;
|
|
3
|
+
} & {
|
|
4
|
+
validator: SchemaValidator;
|
|
5
|
+
}) => import("@forklaunch/core/dtoMapper").SchemasByValidator<SchemaValidator, (options: {
|
|
6
|
+
uuidId: boolean;
|
|
7
|
+
}) => {
|
|
2
8
|
CreatePlanSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>, U extends Record<string, import("@forklaunch/validator").LiteralSchema>>(PlanCadenceEnum: T, BillingProviderEnum: U) => {
|
|
3
9
|
name: import("@sinclair/typebox").TString;
|
|
4
10
|
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -36,7 +42,9 @@ export declare const BasePlanServiceSchemas: <SchemaValidator extends import("@f
|
|
|
36
42
|
createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
37
43
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
38
44
|
};
|
|
39
|
-
}, (
|
|
45
|
+
}, (options: {
|
|
46
|
+
uuidId: boolean;
|
|
47
|
+
}) => {
|
|
40
48
|
CreatePlanSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>, U_3 extends Record<string, import("@forklaunch/validator").LiteralSchema>>(PlanCadenceEnum: T, BillingProviderEnum: U_3) => {
|
|
41
49
|
name: import("zod").ZodString;
|
|
42
50
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.schema.d.ts","sourceRoot":"","sources":["../../schemas/plan.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan.schema.d.ts","sourceRoot":"","sources":["../../schemas/plan.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlC,CAAC"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { serviceSchemaResolver } from '@forklaunch/core/dtoMapper';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const TypeBoxSchemas = (uuidId) => ({
|
|
5
|
-
CreatePlanSchema: TypeBoxCreatePlanSchema,
|
|
6
|
-
UpdatePlanSchema: TypeBoxUpdatePlanSchema(uuidId),
|
|
7
|
-
PlanSchema: TypeBoxPlanSchema(uuidId)
|
|
8
|
-
});
|
|
9
|
-
const ZodSchemas = (uuidId) => ({
|
|
10
|
-
CreatePlanSchema: ZodCreatePlanSchema,
|
|
11
|
-
UpdatePlanSchema: ZodUpdatePlanSchema(uuidId),
|
|
12
|
-
PlanSchema: ZodPlanSchema(uuidId)
|
|
13
|
-
});
|
|
2
|
+
import { BasePlanServiceSchemas as TypeBoxSchemas } from './typebox/plan.schema';
|
|
3
|
+
import { BasePlanServiceSchemas as ZodSchemas } from './zod/plan.schema';
|
|
14
4
|
export const BasePlanServiceSchemas = serviceSchemaResolver(TypeBoxSchemas, ZodSchemas);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export declare const BaseSubscriptionServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(
|
|
1
|
+
export declare const BaseSubscriptionServiceSchemas: <SchemaValidator extends import("@forklaunch/validator").AnySchemaValidator>(options: {
|
|
2
|
+
uuidId: boolean;
|
|
3
|
+
} & {
|
|
4
|
+
validator: SchemaValidator;
|
|
5
|
+
}) => import("@forklaunch/core/dtoMapper").SchemasByValidator<SchemaValidator, (options: {
|
|
6
|
+
uuidId: boolean;
|
|
7
|
+
}) => {
|
|
2
8
|
CreateSubscriptionSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>, U extends Record<string, import("@forklaunch/validator").LiteralSchema>>(PartyEnum: T, BillingProviderEnum: U) => {
|
|
3
9
|
partyId: import("@sinclair/typebox").TString;
|
|
4
10
|
partyType: import("@sinclair/typebox").TUnion<[{ [K in keyof T]: import("@sinclair/typebox").TLiteral<T[K]>; }[keyof T]]>;
|
|
@@ -26,7 +32,7 @@ export declare const BaseSubscriptionServiceSchemas: <SchemaValidator extends im
|
|
|
26
32
|
billingProvider: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[{ [K_1 in keyof U_1]: import("@sinclair/typebox").TLiteral<U_1[K_1]>; }[keyof U_1]]>>;
|
|
27
33
|
extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
|
|
28
34
|
};
|
|
29
|
-
SubscriptionSchema:
|
|
35
|
+
SubscriptionSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>, U_2 extends Record<string, import("@forklaunch/validator").LiteralSchema>>(PartyEnum: T, BillingProviderEnum: U_2) => {
|
|
30
36
|
id: import("@sinclair/typebox").TString;
|
|
31
37
|
partyId: import("@sinclair/typebox").TString;
|
|
32
38
|
partyType: import("@sinclair/typebox").TUnion<[{ [K in keyof T]: import("@sinclair/typebox").TLiteral<T[K]>; }[keyof T]]>;
|
|
@@ -42,7 +48,9 @@ export declare const BaseSubscriptionServiceSchemas: <SchemaValidator extends im
|
|
|
42
48
|
createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
43
49
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
44
50
|
};
|
|
45
|
-
}, (
|
|
51
|
+
}, (options: {
|
|
52
|
+
uuidId: boolean;
|
|
53
|
+
}) => {
|
|
46
54
|
CreateSubscriptionSchema: <T extends Record<string, import("@forklaunch/validator").LiteralSchema>, U_3 extends Record<string, import("@forklaunch/validator").LiteralSchema>>(PartyEnum: T, BillingProviderEnum: U_3) => {
|
|
47
55
|
partyId: import("zod").ZodString;
|
|
48
56
|
partyType: import("zod").ZodUnion<[{ [K in keyof T]: import("zod").ZodLiteral<T[K]>; }[keyof T]]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.schema.d.ts","sourceRoot":"","sources":["../../schemas/subscription.schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscription.schema.d.ts","sourceRoot":"","sources":["../../schemas/subscription.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1C,CAAC"}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { serviceSchemaResolver } from '@forklaunch/core/dtoMapper';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const TypeBoxSchemas = (uuidId) => ({
|
|
5
|
-
CreateSubscriptionSchema: TypeBoxCreateSubscriptionSchema,
|
|
6
|
-
UpdateSubscriptionSchema: TypeBoxUpdateSubscriptionSchema(uuidId),
|
|
7
|
-
SubscriptionSchema: TypeBoxSubscriptionSchema
|
|
8
|
-
});
|
|
9
|
-
const ZodSchemas = (uuidId) => ({
|
|
10
|
-
CreateSubscriptionSchema: ZodCreateSubscriptionSchema,
|
|
11
|
-
UpdateSubscriptionSchema: ZodUpdateSubscriptionSchema(uuidId),
|
|
12
|
-
SubscriptionSchema: ZodSubscriptionSchema(uuidId)
|
|
13
|
-
});
|
|
2
|
+
import { BaseSubscriptionServiceSchemas as TypeBoxSchemas } from './typebox/subscription.schema';
|
|
3
|
+
import { BaseSubscriptionServiceSchemas as ZodSchemas } from './zod/subscription.schema';
|
|
14
4
|
export const BaseSubscriptionServiceSchemas = serviceSchemaResolver(TypeBoxSchemas, ZodSchemas);
|
|
@@ -3,12 +3,16 @@ export declare const CreateBillingPortalSchema: {
|
|
|
3
3
|
uri: import("@sinclair/typebox").TString;
|
|
4
4
|
expiresAt: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>;
|
|
5
5
|
};
|
|
6
|
-
export declare const UpdateBillingPortalSchema: (uuidId:
|
|
6
|
+
export declare const UpdateBillingPortalSchema: ({ uuidId }: {
|
|
7
|
+
uuidId: boolean;
|
|
8
|
+
}) => {
|
|
7
9
|
id: import("@sinclair/typebox").TString;
|
|
8
10
|
uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
11
|
expiresAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
10
12
|
};
|
|
11
|
-
export declare const BillingPortalSchema: (uuidId:
|
|
13
|
+
export declare const BillingPortalSchema: ({ uuidId }: {
|
|
14
|
+
uuidId: boolean;
|
|
15
|
+
}) => {
|
|
12
16
|
id: import("@sinclair/typebox").TString;
|
|
13
17
|
customerId: import("@sinclair/typebox").TString;
|
|
14
18
|
uri: import("@sinclair/typebox").TString;
|
|
@@ -17,4 +21,27 @@ export declare const BillingPortalSchema: (uuidId: boolean) => {
|
|
|
17
21
|
createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
18
22
|
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
19
23
|
};
|
|
24
|
+
export declare const BaseBillingPortalServiceSchemas: (options: {
|
|
25
|
+
uuidId: boolean;
|
|
26
|
+
}) => {
|
|
27
|
+
CreateBillingPortalSchema: {
|
|
28
|
+
customerId: import("@sinclair/typebox").TString;
|
|
29
|
+
uri: import("@sinclair/typebox").TString;
|
|
30
|
+
expiresAt: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>;
|
|
31
|
+
};
|
|
32
|
+
UpdateBillingPortalSchema: {
|
|
33
|
+
id: import("@sinclair/typebox").TString;
|
|
34
|
+
uri: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
35
|
+
expiresAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
36
|
+
};
|
|
37
|
+
BillingPortalSchema: {
|
|
38
|
+
id: import("@sinclair/typebox").TString;
|
|
39
|
+
customerId: import("@sinclair/typebox").TString;
|
|
40
|
+
uri: import("@sinclair/typebox").TString;
|
|
41
|
+
expiresAt: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>;
|
|
42
|
+
extraFields: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnknown>;
|
|
43
|
+
createdAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
44
|
+
updatedAt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>, Date>>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
20
47
|
//# sourceMappingURL=billingPortal.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billingPortal.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/billingPortal.schema.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,
|
|
1
|
+
{"version":3,"file":"billingPortal.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/billingPortal.schema.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE;;;;CAIvE,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE;;;;;;;;CAQjE,CAAC;AAEH,eAAO,MAAM,+BAA+B,GAAI,SAAS;IACvD,MAAM,EAAE,OAAO,CAAC;CACjB;;;;;;;;;;;;;;;;;;;;CAIC,CAAC"}
|
|
@@ -4,12 +4,12 @@ export const CreateBillingPortalSchema = {
|
|
|
4
4
|
uri: string,
|
|
5
5
|
expiresAt: date
|
|
6
6
|
};
|
|
7
|
-
export const UpdateBillingPortalSchema = (uuidId) => ({
|
|
7
|
+
export const UpdateBillingPortalSchema = ({ uuidId }) => ({
|
|
8
8
|
id: uuidId ? uuid : string,
|
|
9
9
|
uri: optional(string),
|
|
10
10
|
expiresAt: optional(date)
|
|
11
11
|
});
|
|
12
|
-
export const BillingPortalSchema = (uuidId) => ({
|
|
12
|
+
export const BillingPortalSchema = ({ uuidId }) => ({
|
|
13
13
|
id: uuidId ? uuid : string,
|
|
14
14
|
customerId: string,
|
|
15
15
|
uri: string,
|
|
@@ -18,3 +18,8 @@ export const BillingPortalSchema = (uuidId) => ({
|
|
|
18
18
|
createdAt: optional(date),
|
|
19
19
|
updatedAt: optional(date)
|
|
20
20
|
});
|
|
21
|
+
export const BaseBillingPortalServiceSchemas = (options) => ({
|
|
22
|
+
CreateBillingPortalSchema,
|
|
23
|
+
UpdateBillingPortalSchema: UpdateBillingPortalSchema(options),
|
|
24
|
+
BillingPortalSchema: BillingPortalSchema(options)
|
|
25
|
+
});
|