@forklaunch/implementation-billing-base 0.1.17 → 0.2.1
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 +35 -14
- package/lib/eject/domain/schemas/checkoutSession.schema.ts +24 -4
- package/lib/eject/domain/schemas/paymentLink.schema.ts +24 -4
- package/lib/eject/services/billingPortal.service.ts +104 -32
- package/lib/eject/services/checkoutSession.service.ts +115 -32
- package/lib/eject/services/paymentLink.service.ts +116 -41
- package/lib/eject/services/plan.service.ts +60 -22
- package/lib/eject/services/subscription.service.ts +83 -26
- package/lib/schemas/checkoutSession.schema.d.ts +97 -11
- package/lib/schemas/checkoutSession.schema.d.ts.map +1 -1
- package/lib/schemas/paymentLink.schema.d.ts +101 -12
- package/lib/schemas/paymentLink.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/checkoutSession.schema.d.ts +130 -10
- package/lib/schemas/typebox/checkoutSession.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/checkoutSession.schema.js +9 -3
- package/lib/schemas/typebox/paymentLink.schema.d.ts +144 -12
- package/lib/schemas/typebox/paymentLink.schema.d.ts.map +1 -1
- package/lib/schemas/typebox/paymentLink.schema.js +9 -3
- package/lib/schemas/zod/checkoutSession.schema.d.ts +66 -12
- package/lib/schemas/zod/checkoutSession.schema.d.ts.map +1 -1
- package/lib/schemas/zod/checkoutSession.schema.js +9 -3
- package/lib/schemas/zod/paymentLink.schema.d.ts +66 -12
- package/lib/schemas/zod/paymentLink.schema.d.ts.map +1 -1
- package/lib/schemas/zod/paymentLink.schema.js +9 -3
- package/lib/services/billingPortal.service.d.ts +25 -7
- package/lib/services/billingPortal.service.d.ts.map +1 -1
- package/lib/services/billingPortal.service.js +87 -29
- package/lib/services/checkoutSession.service.d.ts +63 -20
- package/lib/services/checkoutSession.service.d.ts.map +1 -1
- package/lib/services/checkoutSession.service.js +67 -16
- package/lib/services/paymentLink.service.d.ts +39 -20
- package/lib/services/paymentLink.service.d.ts.map +1 -1
- package/lib/services/paymentLink.service.js +88 -24
- package/lib/services/plan.service.d.ts +19 -7
- package/lib/services/plan.service.d.ts.map +1 -1
- package/lib/services/plan.service.js +49 -17
- package/lib/services/subscription.service.d.ts +21 -7
- package/lib/services/subscription.service.d.ts.map +1 -1
- package/lib/services/subscription.service.js +72 -20
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -14,7 +14,8 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
14
14
|
CreateCheckoutSessionSchema: <
|
|
15
15
|
T extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
16
16
|
>(
|
|
17
|
-
PaymentMethodEnum: T
|
|
17
|
+
PaymentMethodEnum: T,
|
|
18
|
+
StatusEnum: T
|
|
18
19
|
) => {
|
|
19
20
|
customerId: import('@sinclair/typebox').TString;
|
|
20
21
|
paymentMethods: import('@sinclair/typebox').TArray<
|
|
@@ -28,14 +29,33 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
28
29
|
>;
|
|
29
30
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
30
31
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
32
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
33
|
+
import('@sinclair/typebox').TUnion<
|
|
34
|
+
[
|
|
35
|
+
import('@sinclair/typebox').TString,
|
|
36
|
+
import('@sinclair/typebox').TNumber,
|
|
37
|
+
import('@sinclair/typebox').TDate
|
|
38
|
+
]
|
|
39
|
+
>,
|
|
40
|
+
Date
|
|
41
|
+
>;
|
|
42
|
+
status: import('@sinclair/typebox').TUnion<
|
|
43
|
+
[
|
|
44
|
+
{
|
|
45
|
+
[K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]>;
|
|
46
|
+
}[keyof T]
|
|
47
|
+
]
|
|
48
|
+
>;
|
|
31
49
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
32
50
|
import('@sinclair/typebox').TUnknown
|
|
33
51
|
>;
|
|
34
52
|
};
|
|
35
53
|
UpdateCheckoutSessionSchema: <
|
|
36
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
54
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
55
|
+
U extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
37
56
|
>(
|
|
38
|
-
PaymentMethodEnum: T
|
|
57
|
+
PaymentMethodEnum: T,
|
|
58
|
+
StatusEnum: U
|
|
39
59
|
) => {
|
|
40
60
|
id: import('@sinclair/typebox').TString;
|
|
41
61
|
customerId: import('@sinclair/typebox').TOptional<
|
|
@@ -58,14 +78,37 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
58
78
|
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
59
79
|
import('@sinclair/typebox').TString
|
|
60
80
|
>;
|
|
81
|
+
expiresAt: import('@sinclair/typebox').TOptional<
|
|
82
|
+
import('@sinclair/typebox').TTransform<
|
|
83
|
+
import('@sinclair/typebox').TUnion<
|
|
84
|
+
[
|
|
85
|
+
import('@sinclair/typebox').TString,
|
|
86
|
+
import('@sinclair/typebox').TNumber,
|
|
87
|
+
import('@sinclair/typebox').TDate
|
|
88
|
+
]
|
|
89
|
+
>,
|
|
90
|
+
Date
|
|
91
|
+
>
|
|
92
|
+
>;
|
|
93
|
+
status: import('@sinclair/typebox').TOptional<
|
|
94
|
+
import('@sinclair/typebox').TUnion<
|
|
95
|
+
[
|
|
96
|
+
{
|
|
97
|
+
[K_1 in keyof U]: import('@sinclair/typebox').TLiteral<U[K_1]>;
|
|
98
|
+
}[keyof U]
|
|
99
|
+
]
|
|
100
|
+
>
|
|
101
|
+
>;
|
|
61
102
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
62
103
|
import('@sinclair/typebox').TUnknown
|
|
63
104
|
>;
|
|
64
105
|
};
|
|
65
106
|
CheckoutSessionSchema: <
|
|
66
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
107
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
108
|
+
U_1 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
67
109
|
>(
|
|
68
|
-
PaymentMethodEnum: T
|
|
110
|
+
PaymentMethodEnum: T,
|
|
111
|
+
StatusEnum: U_1
|
|
69
112
|
) => {
|
|
70
113
|
id: import('@sinclair/typebox').TString;
|
|
71
114
|
customerId: import('@sinclair/typebox').TString;
|
|
@@ -83,6 +126,23 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
83
126
|
>;
|
|
84
127
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
85
128
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
129
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
130
|
+
import('@sinclair/typebox').TUnion<
|
|
131
|
+
[
|
|
132
|
+
import('@sinclair/typebox').TString,
|
|
133
|
+
import('@sinclair/typebox').TNumber,
|
|
134
|
+
import('@sinclair/typebox').TDate
|
|
135
|
+
]
|
|
136
|
+
>,
|
|
137
|
+
Date
|
|
138
|
+
>;
|
|
139
|
+
status: import('@sinclair/typebox').TUnion<
|
|
140
|
+
[
|
|
141
|
+
{
|
|
142
|
+
[K_1 in keyof U_1]: import('@sinclair/typebox').TLiteral<U_1[K_1]>;
|
|
143
|
+
}[keyof U_1]
|
|
144
|
+
]
|
|
145
|
+
>;
|
|
86
146
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
87
147
|
import('@sinclair/typebox').TUnknown
|
|
88
148
|
>;
|
|
@@ -116,9 +176,11 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
116
176
|
uuidId: boolean;
|
|
117
177
|
}) => {
|
|
118
178
|
CreateCheckoutSessionSchema: <
|
|
119
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
179
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
180
|
+
U_2 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
120
181
|
>(
|
|
121
|
-
PaymentMethodEnum: T
|
|
182
|
+
PaymentMethodEnum: T,
|
|
183
|
+
StatusEnum: U_2
|
|
122
184
|
) => {
|
|
123
185
|
customerId: import('zod').ZodString;
|
|
124
186
|
paymentMethods: import('zod').ZodArray<
|
|
@@ -129,12 +191,18 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
129
191
|
>;
|
|
130
192
|
successRedirectUri: import('zod').ZodString;
|
|
131
193
|
cancelRedirectUri: import('zod').ZodString;
|
|
194
|
+
expiresAt: import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>;
|
|
195
|
+
status: import('zod').ZodUnion<
|
|
196
|
+
[{ [K_1 in keyof U_2]: import('zod').ZodLiteral<U_2[K_1]> }[keyof U_2]]
|
|
197
|
+
>;
|
|
132
198
|
extraFields: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
133
199
|
};
|
|
134
200
|
UpdateCheckoutSessionSchema: <
|
|
135
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
201
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
202
|
+
U_3 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
136
203
|
>(
|
|
137
|
-
PaymentMethodEnum: T
|
|
204
|
+
PaymentMethodEnum: T,
|
|
205
|
+
StatusEnum: U_3
|
|
138
206
|
) => {
|
|
139
207
|
id: import('zod').ZodString;
|
|
140
208
|
customerId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
@@ -148,12 +216,26 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
148
216
|
>;
|
|
149
217
|
successRedirectUri: import('zod').ZodOptional<import('zod').ZodString>;
|
|
150
218
|
cancelRedirectUri: import('zod').ZodOptional<import('zod').ZodString>;
|
|
219
|
+
expiresAt: import('zod').ZodOptional<
|
|
220
|
+
import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>
|
|
221
|
+
>;
|
|
222
|
+
status: import('zod').ZodOptional<
|
|
223
|
+
import('zod').ZodUnion<
|
|
224
|
+
[
|
|
225
|
+
{
|
|
226
|
+
[K_1 in keyof U_3]: import('zod').ZodLiteral<U_3[K_1]>;
|
|
227
|
+
}[keyof U_3]
|
|
228
|
+
]
|
|
229
|
+
>
|
|
230
|
+
>;
|
|
151
231
|
extraFields: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
152
232
|
};
|
|
153
233
|
CheckoutSessionSchema: <
|
|
154
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
234
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
235
|
+
U_4 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
155
236
|
>(
|
|
156
|
-
PaymentMethodEnum: T
|
|
237
|
+
PaymentMethodEnum: T,
|
|
238
|
+
StatusEnum: U_4
|
|
157
239
|
) => {
|
|
158
240
|
id: import('zod').ZodString;
|
|
159
241
|
customerId: import('zod').ZodString;
|
|
@@ -166,6 +248,10 @@ export declare const BaseCheckoutSessionServiceSchemas: <
|
|
|
166
248
|
>;
|
|
167
249
|
successRedirectUri: import('zod').ZodString;
|
|
168
250
|
cancelRedirectUri: import('zod').ZodString;
|
|
251
|
+
expiresAt: import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>;
|
|
252
|
+
status: import('zod').ZodUnion<
|
|
253
|
+
[{ [K_1 in keyof U_4]: import('zod').ZodLiteral<U_4[K_1]> }[keyof U_4]]
|
|
254
|
+
>;
|
|
169
255
|
extraFields: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
170
256
|
createdAt: import('zod').ZodOptional<
|
|
171
257
|
import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkoutSession.schema.d.ts","sourceRoot":"","sources":["../../schemas/checkoutSession.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iCAAiC
|
|
1
|
+
{"version":3,"file":"checkoutSession.schema.d.ts","sourceRoot":"","sources":["../../schemas/checkoutSession.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7C,CAAC"}
|
|
@@ -12,9 +12,11 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
12
12
|
uuidId: boolean;
|
|
13
13
|
}) => {
|
|
14
14
|
CreatePaymentLinkSchema: <
|
|
15
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
15
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
16
|
+
U extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
16
17
|
>(
|
|
17
|
-
CurrencyEnum: T
|
|
18
|
+
CurrencyEnum: T,
|
|
19
|
+
StatusEnum: U
|
|
18
20
|
) => {
|
|
19
21
|
amount: import('@sinclair/typebox').TTransform<
|
|
20
22
|
import('@sinclair/typebox').TUnion<
|
|
@@ -44,14 +46,33 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
44
46
|
>;
|
|
45
47
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
46
48
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
49
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
50
|
+
import('@sinclair/typebox').TUnion<
|
|
51
|
+
[
|
|
52
|
+
import('@sinclair/typebox').TString,
|
|
53
|
+
import('@sinclair/typebox').TNumber,
|
|
54
|
+
import('@sinclair/typebox').TDate
|
|
55
|
+
]
|
|
56
|
+
>,
|
|
57
|
+
Date
|
|
58
|
+
>;
|
|
59
|
+
status: import('@sinclair/typebox').TUnion<
|
|
60
|
+
[
|
|
61
|
+
{
|
|
62
|
+
[K_1 in keyof U]: import('@sinclair/typebox').TLiteral<U[K_1]>;
|
|
63
|
+
}[keyof U]
|
|
64
|
+
]
|
|
65
|
+
>;
|
|
47
66
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
48
67
|
import('@sinclair/typebox').TUnknown
|
|
49
68
|
>;
|
|
50
69
|
};
|
|
51
70
|
UpdatePaymentLinkSchema: <
|
|
52
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
71
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
72
|
+
U_1 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
53
73
|
>(
|
|
54
|
-
CurrencyEnum: T
|
|
74
|
+
CurrencyEnum: T,
|
|
75
|
+
StatusEnum: U_1
|
|
55
76
|
) => {
|
|
56
77
|
id: import('@sinclair/typebox').TString;
|
|
57
78
|
amount: import('@sinclair/typebox').TOptional<
|
|
@@ -90,14 +111,39 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
90
111
|
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
91
112
|
import('@sinclair/typebox').TString
|
|
92
113
|
>;
|
|
114
|
+
expiresAt: import('@sinclair/typebox').TOptional<
|
|
115
|
+
import('@sinclair/typebox').TTransform<
|
|
116
|
+
import('@sinclair/typebox').TUnion<
|
|
117
|
+
[
|
|
118
|
+
import('@sinclair/typebox').TString,
|
|
119
|
+
import('@sinclair/typebox').TNumber,
|
|
120
|
+
import('@sinclair/typebox').TDate
|
|
121
|
+
]
|
|
122
|
+
>,
|
|
123
|
+
Date
|
|
124
|
+
>
|
|
125
|
+
>;
|
|
126
|
+
status: import('@sinclair/typebox').TOptional<
|
|
127
|
+
import('@sinclair/typebox').TUnion<
|
|
128
|
+
[
|
|
129
|
+
{
|
|
130
|
+
[K_1 in keyof U_1]: import('@sinclair/typebox').TLiteral<
|
|
131
|
+
U_1[K_1]
|
|
132
|
+
>;
|
|
133
|
+
}[keyof U_1]
|
|
134
|
+
]
|
|
135
|
+
>
|
|
136
|
+
>;
|
|
93
137
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
94
138
|
import('@sinclair/typebox').TUnknown
|
|
95
139
|
>;
|
|
96
140
|
};
|
|
97
141
|
PaymentLinkSchema: <
|
|
98
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
142
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
143
|
+
U_2 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
99
144
|
>(
|
|
100
|
-
CurrencyEnum: T
|
|
145
|
+
CurrencyEnum: T,
|
|
146
|
+
StatusEnum: U_2
|
|
101
147
|
) => {
|
|
102
148
|
id: import('@sinclair/typebox').TString;
|
|
103
149
|
amount: import('@sinclair/typebox').TTransform<
|
|
@@ -128,6 +174,23 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
128
174
|
>;
|
|
129
175
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
130
176
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
177
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
178
|
+
import('@sinclair/typebox').TUnion<
|
|
179
|
+
[
|
|
180
|
+
import('@sinclair/typebox').TString,
|
|
181
|
+
import('@sinclair/typebox').TNumber,
|
|
182
|
+
import('@sinclair/typebox').TDate
|
|
183
|
+
]
|
|
184
|
+
>,
|
|
185
|
+
Date
|
|
186
|
+
>;
|
|
187
|
+
status: import('@sinclair/typebox').TUnion<
|
|
188
|
+
[
|
|
189
|
+
{
|
|
190
|
+
[K_1 in keyof U_2]: import('@sinclair/typebox').TLiteral<U_2[K_1]>;
|
|
191
|
+
}[keyof U_2]
|
|
192
|
+
]
|
|
193
|
+
>;
|
|
131
194
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
132
195
|
import('@sinclair/typebox').TUnknown
|
|
133
196
|
>;
|
|
@@ -161,9 +224,11 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
161
224
|
uuidId: boolean;
|
|
162
225
|
}) => {
|
|
163
226
|
CreatePaymentLinkSchema: <
|
|
164
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
227
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
228
|
+
U_3 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
165
229
|
>(
|
|
166
|
-
CurrencyEnum: T
|
|
230
|
+
CurrencyEnum: T,
|
|
231
|
+
StatusEnum: U_3
|
|
167
232
|
) => {
|
|
168
233
|
amount: import('zod').ZodEffects<
|
|
169
234
|
import('zod').ZodNumber,
|
|
@@ -177,12 +242,18 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
177
242
|
metadata: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
178
243
|
successRedirectUri: import('zod').ZodString;
|
|
179
244
|
cancelRedirectUri: import('zod').ZodString;
|
|
245
|
+
expiresAt: import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>;
|
|
246
|
+
status: import('zod').ZodUnion<
|
|
247
|
+
[{ [K_1 in keyof U_3]: import('zod').ZodLiteral<U_3[K_1]> }[keyof U_3]]
|
|
248
|
+
>;
|
|
180
249
|
extraFields: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
181
250
|
};
|
|
182
251
|
UpdatePaymentLinkSchema: <
|
|
183
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
252
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
253
|
+
U_4 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
184
254
|
>(
|
|
185
|
-
CurrencyEnum: T
|
|
255
|
+
CurrencyEnum: T,
|
|
256
|
+
StatusEnum: U_4
|
|
186
257
|
) => {
|
|
187
258
|
id: import('zod').ZodString;
|
|
188
259
|
amount: import('zod').ZodOptional<
|
|
@@ -197,12 +268,26 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
197
268
|
metadata: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
198
269
|
successRedirectUri: import('zod').ZodOptional<import('zod').ZodString>;
|
|
199
270
|
cancelRedirectUri: import('zod').ZodOptional<import('zod').ZodString>;
|
|
271
|
+
expiresAt: import('zod').ZodOptional<
|
|
272
|
+
import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>
|
|
273
|
+
>;
|
|
274
|
+
status: import('zod').ZodOptional<
|
|
275
|
+
import('zod').ZodUnion<
|
|
276
|
+
[
|
|
277
|
+
{
|
|
278
|
+
[K_1 in keyof U_4]: import('zod').ZodLiteral<U_4[K_1]>;
|
|
279
|
+
}[keyof U_4]
|
|
280
|
+
]
|
|
281
|
+
>
|
|
282
|
+
>;
|
|
200
283
|
extraFields: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
201
284
|
};
|
|
202
285
|
PaymentLinkSchema: <
|
|
203
|
-
T extends Record<string, import('@forklaunch/validator').LiteralSchema
|
|
286
|
+
T extends Record<string, import('@forklaunch/validator').LiteralSchema>,
|
|
287
|
+
U_5 extends Record<string, import('@forklaunch/validator').LiteralSchema>
|
|
204
288
|
>(
|
|
205
|
-
CurrencyEnum: T
|
|
289
|
+
CurrencyEnum: T,
|
|
290
|
+
StatusEnum: U_5
|
|
206
291
|
) => {
|
|
207
292
|
id: import('zod').ZodString;
|
|
208
293
|
amount: import('zod').ZodEffects<
|
|
@@ -217,6 +302,10 @@ export declare const BasePaymentLinkServiceSchemas: <
|
|
|
217
302
|
metadata: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
218
303
|
successRedirectUri: import('zod').ZodString;
|
|
219
304
|
cancelRedirectUri: import('zod').ZodString;
|
|
305
|
+
expiresAt: import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>;
|
|
306
|
+
status: import('zod').ZodUnion<
|
|
307
|
+
[{ [K_1 in keyof U_5]: import('zod').ZodLiteral<U_5[K_1]> }[keyof U_5]]
|
|
308
|
+
>;
|
|
220
309
|
extraFields: import('zod').ZodOptional<import('zod').ZodUnknown>;
|
|
221
310
|
createdAt: import('zod').ZodOptional<
|
|
222
311
|
import('zod').ZodEffects<import('zod').ZodDate, Date, unknown>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentLink.schema.d.ts","sourceRoot":"","sources":["../../schemas/paymentLink.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"paymentLink.schema.d.ts","sourceRoot":"","sources":["../../schemas/paymentLink.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGzC,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { LiteralSchema } from '@forklaunch/validator';
|
|
|
2
2
|
export declare const CreateCheckoutSessionSchema: <
|
|
3
3
|
T extends Record<string, LiteralSchema>
|
|
4
4
|
>(
|
|
5
|
-
PaymentMethodEnum: T
|
|
5
|
+
PaymentMethodEnum: T,
|
|
6
|
+
StatusEnum: T
|
|
6
7
|
) => {
|
|
7
8
|
customerId: import('@sinclair/typebox').TString;
|
|
8
9
|
paymentMethods: import('@sinclair/typebox').TArray<
|
|
@@ -12,6 +13,19 @@ export declare const CreateCheckoutSessionSchema: <
|
|
|
12
13
|
>;
|
|
13
14
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
14
15
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
16
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
17
|
+
import('@sinclair/typebox').TUnion<
|
|
18
|
+
[
|
|
19
|
+
import('@sinclair/typebox').TString,
|
|
20
|
+
import('@sinclair/typebox').TNumber,
|
|
21
|
+
import('@sinclair/typebox').TDate
|
|
22
|
+
]
|
|
23
|
+
>,
|
|
24
|
+
Date
|
|
25
|
+
>;
|
|
26
|
+
status: import('@sinclair/typebox').TUnion<
|
|
27
|
+
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
28
|
+
>;
|
|
15
29
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
16
30
|
import('@sinclair/typebox').TUnknown
|
|
17
31
|
>;
|
|
@@ -20,8 +34,12 @@ export declare const UpdateCheckoutSessionSchema: ({
|
|
|
20
34
|
uuidId
|
|
21
35
|
}: {
|
|
22
36
|
uuidId: boolean;
|
|
23
|
-
}) => <
|
|
24
|
-
|
|
37
|
+
}) => <
|
|
38
|
+
T extends Record<string, LiteralSchema>,
|
|
39
|
+
U extends Record<string, LiteralSchema>
|
|
40
|
+
>(
|
|
41
|
+
PaymentMethodEnum: T,
|
|
42
|
+
StatusEnum: U
|
|
25
43
|
) => {
|
|
26
44
|
id: import('@sinclair/typebox').TString;
|
|
27
45
|
customerId: import('@sinclair/typebox').TOptional<
|
|
@@ -44,6 +62,27 @@ export declare const UpdateCheckoutSessionSchema: ({
|
|
|
44
62
|
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
45
63
|
import('@sinclair/typebox').TString
|
|
46
64
|
>;
|
|
65
|
+
expiresAt: import('@sinclair/typebox').TOptional<
|
|
66
|
+
import('@sinclair/typebox').TTransform<
|
|
67
|
+
import('@sinclair/typebox').TUnion<
|
|
68
|
+
[
|
|
69
|
+
import('@sinclair/typebox').TString,
|
|
70
|
+
import('@sinclair/typebox').TNumber,
|
|
71
|
+
import('@sinclair/typebox').TDate
|
|
72
|
+
]
|
|
73
|
+
>,
|
|
74
|
+
Date
|
|
75
|
+
>
|
|
76
|
+
>;
|
|
77
|
+
status: import('@sinclair/typebox').TOptional<
|
|
78
|
+
import('@sinclair/typebox').TUnion<
|
|
79
|
+
[
|
|
80
|
+
{
|
|
81
|
+
[K_1 in keyof U]: import('@sinclair/typebox').TLiteral<U[K_1]>;
|
|
82
|
+
}[keyof U]
|
|
83
|
+
]
|
|
84
|
+
>
|
|
85
|
+
>;
|
|
47
86
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
48
87
|
import('@sinclair/typebox').TUnknown
|
|
49
88
|
>;
|
|
@@ -52,8 +91,12 @@ export declare const CheckoutSessionSchema: ({
|
|
|
52
91
|
uuidId
|
|
53
92
|
}: {
|
|
54
93
|
uuidId: boolean;
|
|
55
|
-
}) => <
|
|
56
|
-
|
|
94
|
+
}) => <
|
|
95
|
+
T extends Record<string, LiteralSchema>,
|
|
96
|
+
U extends Record<string, LiteralSchema>
|
|
97
|
+
>(
|
|
98
|
+
PaymentMethodEnum: T,
|
|
99
|
+
StatusEnum: U
|
|
57
100
|
) => {
|
|
58
101
|
id: import('@sinclair/typebox').TString;
|
|
59
102
|
customerId: import('@sinclair/typebox').TString;
|
|
@@ -67,6 +110,23 @@ export declare const CheckoutSessionSchema: ({
|
|
|
67
110
|
>;
|
|
68
111
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
69
112
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
113
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
114
|
+
import('@sinclair/typebox').TUnion<
|
|
115
|
+
[
|
|
116
|
+
import('@sinclair/typebox').TString,
|
|
117
|
+
import('@sinclair/typebox').TNumber,
|
|
118
|
+
import('@sinclair/typebox').TDate
|
|
119
|
+
]
|
|
120
|
+
>,
|
|
121
|
+
Date
|
|
122
|
+
>;
|
|
123
|
+
status: import('@sinclair/typebox').TUnion<
|
|
124
|
+
[
|
|
125
|
+
{
|
|
126
|
+
[K_1 in keyof U]: import('@sinclair/typebox').TLiteral<U[K_1]>;
|
|
127
|
+
}[keyof U]
|
|
128
|
+
]
|
|
129
|
+
>;
|
|
70
130
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
71
131
|
import('@sinclair/typebox').TUnknown
|
|
72
132
|
>;
|
|
@@ -99,7 +159,8 @@ export declare const BaseCheckoutSessionServiceSchemas: (options: {
|
|
|
99
159
|
uuidId: boolean;
|
|
100
160
|
}) => {
|
|
101
161
|
CreateCheckoutSessionSchema: <T extends Record<string, LiteralSchema>>(
|
|
102
|
-
PaymentMethodEnum: T
|
|
162
|
+
PaymentMethodEnum: T,
|
|
163
|
+
StatusEnum: T
|
|
103
164
|
) => {
|
|
104
165
|
customerId: import('@sinclair/typebox').TString;
|
|
105
166
|
paymentMethods: import('@sinclair/typebox').TArray<
|
|
@@ -113,12 +174,29 @@ export declare const BaseCheckoutSessionServiceSchemas: (options: {
|
|
|
113
174
|
>;
|
|
114
175
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
115
176
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
177
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
178
|
+
import('@sinclair/typebox').TUnion<
|
|
179
|
+
[
|
|
180
|
+
import('@sinclair/typebox').TString,
|
|
181
|
+
import('@sinclair/typebox').TNumber,
|
|
182
|
+
import('@sinclair/typebox').TDate
|
|
183
|
+
]
|
|
184
|
+
>,
|
|
185
|
+
Date
|
|
186
|
+
>;
|
|
187
|
+
status: import('@sinclair/typebox').TUnion<
|
|
188
|
+
[{ [K in keyof T]: import('@sinclair/typebox').TLiteral<T[K]> }[keyof T]]
|
|
189
|
+
>;
|
|
116
190
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
117
191
|
import('@sinclair/typebox').TUnknown
|
|
118
192
|
>;
|
|
119
193
|
};
|
|
120
|
-
UpdateCheckoutSessionSchema: <
|
|
121
|
-
|
|
194
|
+
UpdateCheckoutSessionSchema: <
|
|
195
|
+
T extends Record<string, LiteralSchema>,
|
|
196
|
+
U extends Record<string, LiteralSchema>
|
|
197
|
+
>(
|
|
198
|
+
PaymentMethodEnum: T,
|
|
199
|
+
StatusEnum: U
|
|
122
200
|
) => {
|
|
123
201
|
id: import('@sinclair/typebox').TString;
|
|
124
202
|
customerId: import('@sinclair/typebox').TOptional<
|
|
@@ -141,12 +219,37 @@ export declare const BaseCheckoutSessionServiceSchemas: (options: {
|
|
|
141
219
|
cancelRedirectUri: import('@sinclair/typebox').TOptional<
|
|
142
220
|
import('@sinclair/typebox').TString
|
|
143
221
|
>;
|
|
222
|
+
expiresAt: import('@sinclair/typebox').TOptional<
|
|
223
|
+
import('@sinclair/typebox').TTransform<
|
|
224
|
+
import('@sinclair/typebox').TUnion<
|
|
225
|
+
[
|
|
226
|
+
import('@sinclair/typebox').TString,
|
|
227
|
+
import('@sinclair/typebox').TNumber,
|
|
228
|
+
import('@sinclair/typebox').TDate
|
|
229
|
+
]
|
|
230
|
+
>,
|
|
231
|
+
Date
|
|
232
|
+
>
|
|
233
|
+
>;
|
|
234
|
+
status: import('@sinclair/typebox').TOptional<
|
|
235
|
+
import('@sinclair/typebox').TUnion<
|
|
236
|
+
[
|
|
237
|
+
{
|
|
238
|
+
[K_1 in keyof U]: import('@sinclair/typebox').TLiteral<U[K_1]>;
|
|
239
|
+
}[keyof U]
|
|
240
|
+
]
|
|
241
|
+
>
|
|
242
|
+
>;
|
|
144
243
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
145
244
|
import('@sinclair/typebox').TUnknown
|
|
146
245
|
>;
|
|
147
246
|
};
|
|
148
|
-
CheckoutSessionSchema: <
|
|
149
|
-
|
|
247
|
+
CheckoutSessionSchema: <
|
|
248
|
+
T extends Record<string, LiteralSchema>,
|
|
249
|
+
U extends Record<string, LiteralSchema>
|
|
250
|
+
>(
|
|
251
|
+
PaymentMethodEnum: T,
|
|
252
|
+
StatusEnum: U
|
|
150
253
|
) => {
|
|
151
254
|
id: import('@sinclair/typebox').TString;
|
|
152
255
|
customerId: import('@sinclair/typebox').TString;
|
|
@@ -164,6 +267,23 @@ export declare const BaseCheckoutSessionServiceSchemas: (options: {
|
|
|
164
267
|
>;
|
|
165
268
|
successRedirectUri: import('@sinclair/typebox').TString;
|
|
166
269
|
cancelRedirectUri: import('@sinclair/typebox').TString;
|
|
270
|
+
expiresAt: import('@sinclair/typebox').TTransform<
|
|
271
|
+
import('@sinclair/typebox').TUnion<
|
|
272
|
+
[
|
|
273
|
+
import('@sinclair/typebox').TString,
|
|
274
|
+
import('@sinclair/typebox').TNumber,
|
|
275
|
+
import('@sinclair/typebox').TDate
|
|
276
|
+
]
|
|
277
|
+
>,
|
|
278
|
+
Date
|
|
279
|
+
>;
|
|
280
|
+
status: import('@sinclair/typebox').TUnion<
|
|
281
|
+
[
|
|
282
|
+
{
|
|
283
|
+
[K_1 in keyof U]: import('@sinclair/typebox').TLiteral<U[K_1]>;
|
|
284
|
+
}[keyof U]
|
|
285
|
+
]
|
|
286
|
+
>;
|
|
167
287
|
extraFields: import('@sinclair/typebox').TOptional<
|
|
168
288
|
import('@sinclair/typebox').TUnknown
|
|
169
289
|
>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkoutSession.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/checkoutSession.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAWtD,eAAO,MAAM,2BAA2B,GACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAEvC,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"checkoutSession.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/checkoutSession.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAWtD,eAAO,MAAM,2BAA2B,GACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAEvC,mBAAmB,CAAC,EACpB,YAAY,CAAC;;;;;;;;CASb,CAAC;AAEH,eAAO,MAAM,2BAA2B,GACrC,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,MAE9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACvC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAEvC,mBAAmB,CAAC,EACpB,YAAY,CAAC;;;;;;;;;CAUb,CAAC;AAEL,eAAO,MAAM,qBAAqB,GAC/B,YAAY;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,MAE9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACvC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EAEvC,mBAAmB,CAAC,EACpB,YAAY,CAAC;;;;;;;;;;;;CAab,CAAC;AAEL,eAAO,MAAM,iCAAiC,GAAI,SAAS;IACzD,MAAM,EAAE,OAAO,CAAC;CACjB;kCAzDC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,qBAEpB,CAAC,cACR,CAAC;;;;;;;;;kCAcX,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACvC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,qBAEpB,CAAC,cACR,CAAC;;;;;;;;;;4BAeb,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACvC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,qBAEpB,CAAC,cACR,CAAC;;;;;;;;;;;;;CAqBf,CAAC"}
|
|
@@ -7,32 +7,38 @@ import {
|
|
|
7
7
|
unknown,
|
|
8
8
|
uuid
|
|
9
9
|
} from '@forklaunch/validator/typebox';
|
|
10
|
-
export const CreateCheckoutSessionSchema = (PaymentMethodEnum) => ({
|
|
10
|
+
export const CreateCheckoutSessionSchema = (PaymentMethodEnum, StatusEnum) => ({
|
|
11
11
|
customerId: string,
|
|
12
12
|
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
13
13
|
successRedirectUri: string,
|
|
14
14
|
cancelRedirectUri: string,
|
|
15
|
+
expiresAt: date,
|
|
16
|
+
status: enum_(StatusEnum),
|
|
15
17
|
extraFields: optional(unknown)
|
|
16
18
|
});
|
|
17
19
|
export const UpdateCheckoutSessionSchema =
|
|
18
20
|
({ uuidId }) =>
|
|
19
|
-
(PaymentMethodEnum) => ({
|
|
21
|
+
(PaymentMethodEnum, StatusEnum) => ({
|
|
20
22
|
id: uuidId ? uuid : string,
|
|
21
23
|
customerId: optional(string),
|
|
22
24
|
paymentMethods: optional(array(enum_(PaymentMethodEnum))),
|
|
23
25
|
successRedirectUri: optional(string),
|
|
24
26
|
cancelRedirectUri: optional(string),
|
|
27
|
+
expiresAt: optional(date),
|
|
28
|
+
status: optional(enum_(StatusEnum)),
|
|
25
29
|
extraFields: optional(unknown)
|
|
26
30
|
});
|
|
27
31
|
export const CheckoutSessionSchema =
|
|
28
32
|
({ uuidId }) =>
|
|
29
|
-
(PaymentMethodEnum) => ({
|
|
33
|
+
(PaymentMethodEnum, StatusEnum) => ({
|
|
30
34
|
id: uuidId ? uuid : string,
|
|
31
35
|
customerId: string,
|
|
32
36
|
metadata: optional(unknown),
|
|
33
37
|
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
34
38
|
successRedirectUri: string,
|
|
35
39
|
cancelRedirectUri: string,
|
|
40
|
+
expiresAt: date,
|
|
41
|
+
status: enum_(StatusEnum),
|
|
36
42
|
extraFields: optional(unknown),
|
|
37
43
|
createdAt: optional(date),
|
|
38
44
|
updatedAt: optional(date)
|