@forklaunch/implementation-billing-base 0.5.3 → 0.5.5
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/domain/schemas/index.d.mts +1190 -336
- package/lib/domain/schemas/index.d.ts +1190 -336
- package/lib/domain/schemas/index.js +385 -246
- package/lib/domain/schemas/index.mjs +277 -221
- package/lib/eject/domain/schemas/billingPortal.schema.ts +1 -7
- package/lib/services/index.d.mts +661 -206
- package/lib/services/index.d.ts +661 -206
- package/lib/services/index.js +262 -202
- package/lib/services/index.mjs +226 -206
- package/package.json +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// domain/schemas/billingPortal.schema.ts
|
|
2
|
-
import { serviceSchemaResolver } from
|
|
2
|
+
import { serviceSchemaResolver } from '@forklaunch/internal';
|
|
3
3
|
|
|
4
4
|
// domain/schemas/typebox/billingPortal.schema.ts
|
|
5
5
|
import {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
string,
|
|
9
9
|
unknown,
|
|
10
10
|
uuid
|
|
11
|
-
} from
|
|
11
|
+
} from '@forklaunch/validator/typebox';
|
|
12
12
|
var CreateBillingPortalSchema = {
|
|
13
13
|
customerId: string,
|
|
14
14
|
expiresAt: date,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
string as string2,
|
|
44
44
|
unknown as unknown2,
|
|
45
45
|
uuid as uuid2
|
|
46
|
-
} from
|
|
46
|
+
} from '@forklaunch/validator/zod';
|
|
47
47
|
var CreateBillingPortalSchema2 = {
|
|
48
48
|
customerId: string2,
|
|
49
49
|
expiresAt: date2,
|
|
@@ -78,7 +78,7 @@ var BaseBillingPortalServiceSchemas3 = serviceSchemaResolver(
|
|
|
78
78
|
);
|
|
79
79
|
|
|
80
80
|
// domain/schemas/checkoutSession.schema.ts
|
|
81
|
-
import { serviceSchemaResolver as serviceSchemaResolver2 } from
|
|
81
|
+
import { serviceSchemaResolver as serviceSchemaResolver2 } from '@forklaunch/internal';
|
|
82
82
|
|
|
83
83
|
// domain/schemas/typebox/checkoutSession.schema.ts
|
|
84
84
|
import {
|
|
@@ -89,8 +89,12 @@ import {
|
|
|
89
89
|
string as string3,
|
|
90
90
|
unknown as unknown3,
|
|
91
91
|
uuid as uuid3
|
|
92
|
-
} from
|
|
93
|
-
var CreateCheckoutSessionSchema = (
|
|
92
|
+
} from '@forklaunch/validator/typebox';
|
|
93
|
+
var CreateCheckoutSessionSchema = (
|
|
94
|
+
PaymentMethodEnum,
|
|
95
|
+
CurrencyEnum,
|
|
96
|
+
StatusEnum
|
|
97
|
+
) => ({
|
|
94
98
|
customerId: string3,
|
|
95
99
|
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
96
100
|
currency: enum_(CurrencyEnum),
|
|
@@ -100,30 +104,34 @@ var CreateCheckoutSessionSchema = (PaymentMethodEnum, CurrencyEnum, StatusEnum)
|
|
|
100
104
|
status: enum_(StatusEnum),
|
|
101
105
|
providerFields: optional3(unknown3)
|
|
102
106
|
});
|
|
103
|
-
var UpdateCheckoutSessionSchema =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
107
|
+
var UpdateCheckoutSessionSchema =
|
|
108
|
+
({ uuidId }) =>
|
|
109
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
110
|
+
id: uuidId ? uuid3 : string3,
|
|
111
|
+
customerId: optional3(string3),
|
|
112
|
+
paymentMethods: optional3(array(enum_(PaymentMethodEnum))),
|
|
113
|
+
currency: optional3(enum_(CurrencyEnum)),
|
|
114
|
+
successRedirectUri: optional3(string3),
|
|
115
|
+
cancelRedirectUri: optional3(string3),
|
|
116
|
+
expiresAt: optional3(date3),
|
|
117
|
+
status: optional3(enum_(StatusEnum)),
|
|
118
|
+
providerFields: optional3(unknown3)
|
|
119
|
+
});
|
|
120
|
+
var CheckoutSessionSchema =
|
|
121
|
+
({ uuidId }) =>
|
|
122
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
123
|
+
id: uuidId ? uuid3 : string3,
|
|
124
|
+
customerId: string3,
|
|
125
|
+
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
126
|
+
currency: enum_(CurrencyEnum),
|
|
127
|
+
successRedirectUri: optional3(string3),
|
|
128
|
+
cancelRedirectUri: optional3(string3),
|
|
129
|
+
expiresAt: date3,
|
|
130
|
+
status: enum_(StatusEnum),
|
|
131
|
+
providerFields: optional3(unknown3),
|
|
132
|
+
createdAt: optional3(date3),
|
|
133
|
+
updatedAt: optional3(date3)
|
|
134
|
+
});
|
|
127
135
|
var BaseCheckoutSessionServiceSchemas = (options) => ({
|
|
128
136
|
CreateCheckoutSessionSchema,
|
|
129
137
|
UpdateCheckoutSessionSchema: UpdateCheckoutSessionSchema(options),
|
|
@@ -139,8 +147,12 @@ import {
|
|
|
139
147
|
string as string4,
|
|
140
148
|
unknown as unknown4,
|
|
141
149
|
uuid as uuid4
|
|
142
|
-
} from
|
|
143
|
-
var CreateCheckoutSessionSchema2 = (
|
|
150
|
+
} from '@forklaunch/validator/zod';
|
|
151
|
+
var CreateCheckoutSessionSchema2 = (
|
|
152
|
+
PaymentMethodEnum,
|
|
153
|
+
CurrencyEnum,
|
|
154
|
+
StatusEnum
|
|
155
|
+
) => ({
|
|
144
156
|
customerId: string4,
|
|
145
157
|
paymentMethods: array2(enum_2(PaymentMethodEnum)),
|
|
146
158
|
currency: enum_2(CurrencyEnum),
|
|
@@ -150,30 +162,34 @@ var CreateCheckoutSessionSchema2 = (PaymentMethodEnum, CurrencyEnum, StatusEnum)
|
|
|
150
162
|
status: enum_2(StatusEnum),
|
|
151
163
|
providerFields: optional4(unknown4)
|
|
152
164
|
});
|
|
153
|
-
var UpdateCheckoutSessionSchema2 =
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
165
|
+
var UpdateCheckoutSessionSchema2 =
|
|
166
|
+
({ uuidId }) =>
|
|
167
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
168
|
+
id: uuidId ? uuid4 : string4,
|
|
169
|
+
customerId: optional4(string4),
|
|
170
|
+
paymentMethods: optional4(array2(enum_2(PaymentMethodEnum))),
|
|
171
|
+
currency: optional4(enum_2(CurrencyEnum)),
|
|
172
|
+
successRedirectUri: optional4(string4),
|
|
173
|
+
cancelRedirectUri: optional4(string4),
|
|
174
|
+
expiresAt: optional4(date4),
|
|
175
|
+
status: optional4(enum_2(StatusEnum)),
|
|
176
|
+
providerFields: optional4(unknown4)
|
|
177
|
+
});
|
|
178
|
+
var CheckoutSessionSchema2 =
|
|
179
|
+
({ uuidId }) =>
|
|
180
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
181
|
+
id: uuidId ? uuid4 : string4,
|
|
182
|
+
customerId: string4,
|
|
183
|
+
paymentMethods: array2(enum_2(PaymentMethodEnum)),
|
|
184
|
+
currency: enum_2(CurrencyEnum),
|
|
185
|
+
successRedirectUri: optional4(string4),
|
|
186
|
+
cancelRedirectUri: optional4(string4),
|
|
187
|
+
expiresAt: date4,
|
|
188
|
+
status: enum_2(StatusEnum),
|
|
189
|
+
providerFields: optional4(unknown4),
|
|
190
|
+
createdAt: optional4(date4),
|
|
191
|
+
updatedAt: optional4(date4)
|
|
192
|
+
});
|
|
177
193
|
var BaseCheckoutSessionServiceSchemas2 = (options) => ({
|
|
178
194
|
CreateCheckoutSessionSchema: CreateCheckoutSessionSchema2,
|
|
179
195
|
UpdateCheckoutSessionSchema: UpdateCheckoutSessionSchema2(options),
|
|
@@ -187,7 +203,7 @@ var BaseCheckoutSessionServiceSchemas3 = serviceSchemaResolver2(
|
|
|
187
203
|
);
|
|
188
204
|
|
|
189
205
|
// domain/schemas/paymentLink.schema.ts
|
|
190
|
-
import { serviceSchemaResolver as serviceSchemaResolver3 } from
|
|
206
|
+
import { serviceSchemaResolver as serviceSchemaResolver3 } from '@forklaunch/internal';
|
|
191
207
|
|
|
192
208
|
// domain/schemas/typebox/paymentLink.schema.ts
|
|
193
209
|
import {
|
|
@@ -199,32 +215,40 @@ import {
|
|
|
199
215
|
string as string5,
|
|
200
216
|
unknown as unknown5,
|
|
201
217
|
uuid as uuid5
|
|
202
|
-
} from
|
|
203
|
-
var CreatePaymentLinkSchema = (
|
|
218
|
+
} from '@forklaunch/validator/typebox';
|
|
219
|
+
var CreatePaymentLinkSchema = (
|
|
220
|
+
PaymentMethodEnum,
|
|
221
|
+
CurrencyEnum,
|
|
222
|
+
StatusEnum
|
|
223
|
+
) => ({
|
|
204
224
|
amount: number,
|
|
205
225
|
paymentMethods: array3(enum_3(PaymentMethodEnum)),
|
|
206
226
|
currency: enum_3(CurrencyEnum),
|
|
207
227
|
status: enum_3(StatusEnum),
|
|
208
228
|
providerFields: optional5(unknown5)
|
|
209
229
|
});
|
|
210
|
-
var UpdatePaymentLinkSchema =
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
230
|
+
var UpdatePaymentLinkSchema =
|
|
231
|
+
({ uuidId }) =>
|
|
232
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
233
|
+
id: uuidId ? uuid5 : string5,
|
|
234
|
+
amount: optional5(number),
|
|
235
|
+
paymentMethods: optional5(array3(enum_3(PaymentMethodEnum))),
|
|
236
|
+
currency: optional5(enum_3(CurrencyEnum)),
|
|
237
|
+
status: optional5(enum_3(StatusEnum)),
|
|
238
|
+
providerFields: optional5(unknown5)
|
|
239
|
+
});
|
|
240
|
+
var PaymentLinkSchema =
|
|
241
|
+
({ uuidId }) =>
|
|
242
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
243
|
+
id: uuidId ? uuid5 : string5,
|
|
244
|
+
amount: number,
|
|
245
|
+
currency: enum_3(CurrencyEnum),
|
|
246
|
+
paymentMethods: array3(enum_3(PaymentMethodEnum)),
|
|
247
|
+
status: enum_3(StatusEnum),
|
|
248
|
+
providerFields: optional5(unknown5),
|
|
249
|
+
createdAt: optional5(date5),
|
|
250
|
+
updatedAt: optional5(date5)
|
|
251
|
+
});
|
|
228
252
|
var BasePaymentLinkServiceSchemas = (options) => ({
|
|
229
253
|
CreatePaymentLinkSchema,
|
|
230
254
|
UpdatePaymentLinkSchema: UpdatePaymentLinkSchema(options),
|
|
@@ -241,32 +265,40 @@ import {
|
|
|
241
265
|
string as string6,
|
|
242
266
|
unknown as unknown6,
|
|
243
267
|
uuid as uuid6
|
|
244
|
-
} from
|
|
245
|
-
var CreatePaymentLinkSchema2 = (
|
|
268
|
+
} from '@forklaunch/validator/zod';
|
|
269
|
+
var CreatePaymentLinkSchema2 = (
|
|
270
|
+
PaymentMethodEnum,
|
|
271
|
+
CurrencyEnum,
|
|
272
|
+
StatusEnum
|
|
273
|
+
) => ({
|
|
246
274
|
amount: number2,
|
|
247
275
|
paymentMethods: array4(enum_4(PaymentMethodEnum)),
|
|
248
276
|
currency: enum_4(CurrencyEnum),
|
|
249
277
|
status: enum_4(StatusEnum),
|
|
250
278
|
providerFields: optional6(unknown6)
|
|
251
279
|
});
|
|
252
|
-
var UpdatePaymentLinkSchema2 =
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
280
|
+
var UpdatePaymentLinkSchema2 =
|
|
281
|
+
({ uuidId }) =>
|
|
282
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
283
|
+
id: uuidId ? uuid6 : string6,
|
|
284
|
+
amount: optional6(number2),
|
|
285
|
+
paymentMethods: optional6(array4(enum_4(PaymentMethodEnum))),
|
|
286
|
+
currency: optional6(enum_4(CurrencyEnum)),
|
|
287
|
+
status: optional6(enum_4(StatusEnum)),
|
|
288
|
+
providerFields: optional6(unknown6)
|
|
289
|
+
});
|
|
290
|
+
var PaymentLinkSchema2 =
|
|
291
|
+
({ uuidId }) =>
|
|
292
|
+
(PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
|
|
293
|
+
id: uuidId ? uuid6 : string6,
|
|
294
|
+
amount: number2,
|
|
295
|
+
paymentMethods: array4(enum_4(PaymentMethodEnum)),
|
|
296
|
+
currency: enum_4(CurrencyEnum),
|
|
297
|
+
status: enum_4(StatusEnum),
|
|
298
|
+
providerFields: optional6(unknown6),
|
|
299
|
+
createdAt: optional6(date6),
|
|
300
|
+
updatedAt: optional6(date6)
|
|
301
|
+
});
|
|
270
302
|
var BasePaymentLinkServiceSchemas2 = (options) => ({
|
|
271
303
|
CreatePaymentLinkSchema: CreatePaymentLinkSchema2,
|
|
272
304
|
UpdatePaymentLinkSchema: UpdatePaymentLinkSchema2(options),
|
|
@@ -280,7 +312,7 @@ var BasePaymentLinkServiceSchemas3 = serviceSchemaResolver3(
|
|
|
280
312
|
);
|
|
281
313
|
|
|
282
314
|
// domain/schemas/plan.schema.ts
|
|
283
|
-
import { serviceSchemaResolver as serviceSchemaResolver4 } from
|
|
315
|
+
import { serviceSchemaResolver as serviceSchemaResolver4 } from '@forklaunch/internal';
|
|
284
316
|
|
|
285
317
|
// domain/schemas/typebox/plan.schema.ts
|
|
286
318
|
import {
|
|
@@ -293,8 +325,12 @@ import {
|
|
|
293
325
|
string as string7,
|
|
294
326
|
unknown as unknown7,
|
|
295
327
|
uuid as uuid7
|
|
296
|
-
} from
|
|
297
|
-
var CreatePlanSchema = (
|
|
328
|
+
} from '@forklaunch/validator/typebox';
|
|
329
|
+
var CreatePlanSchema = (
|
|
330
|
+
PlanCadenceEnum,
|
|
331
|
+
CurrencyEnum,
|
|
332
|
+
BillingProviderEnum
|
|
333
|
+
) => ({
|
|
298
334
|
name: string7,
|
|
299
335
|
description: optional7(string7),
|
|
300
336
|
price: number3,
|
|
@@ -306,34 +342,38 @@ var CreatePlanSchema = (PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) => (
|
|
|
306
342
|
active: boolean,
|
|
307
343
|
providerFields: optional7(unknown7)
|
|
308
344
|
});
|
|
309
|
-
var UpdatePlanSchema =
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
345
|
+
var UpdatePlanSchema =
|
|
346
|
+
({ uuidId }) =>
|
|
347
|
+
(PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) => ({
|
|
348
|
+
id: uuidId ? uuid7 : string7,
|
|
349
|
+
name: optional7(string7),
|
|
350
|
+
description: optional7(string7),
|
|
351
|
+
price: optional7(number3),
|
|
352
|
+
cadence: optional7(enum_5(PlanCadenceEnum)),
|
|
353
|
+
currency: optional7(enum_5(CurrencyEnum)),
|
|
354
|
+
features: optional7(array5(string7)),
|
|
355
|
+
externalId: optional7(string7),
|
|
356
|
+
billingProvider: optional7(enum_5(BillingProviderEnum)),
|
|
357
|
+
active: optional7(boolean),
|
|
358
|
+
providerFields: optional7(unknown7)
|
|
359
|
+
});
|
|
360
|
+
var PlanSchema =
|
|
361
|
+
({ uuidId }) =>
|
|
362
|
+
(PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) => ({
|
|
363
|
+
id: uuidId ? uuid7 : string7,
|
|
364
|
+
name: string7,
|
|
365
|
+
description: optional7(string7),
|
|
366
|
+
price: number3,
|
|
367
|
+
cadence: enum_5(PlanCadenceEnum),
|
|
368
|
+
currency: enum_5(CurrencyEnum),
|
|
369
|
+
features: optional7(array5(string7)),
|
|
370
|
+
externalId: string7,
|
|
371
|
+
billingProvider: optional7(enum_5(BillingProviderEnum)),
|
|
372
|
+
active: boolean,
|
|
373
|
+
providerFields: optional7(unknown7),
|
|
374
|
+
createdAt: optional7(date7),
|
|
375
|
+
updatedAt: optional7(date7)
|
|
376
|
+
});
|
|
337
377
|
var BasePlanServiceSchemas = (options) => ({
|
|
338
378
|
CreatePlanSchema,
|
|
339
379
|
UpdatePlanSchema: UpdatePlanSchema(options),
|
|
@@ -351,8 +391,12 @@ import {
|
|
|
351
391
|
string as string8,
|
|
352
392
|
unknown as unknown8,
|
|
353
393
|
uuid as uuid8
|
|
354
|
-
} from
|
|
355
|
-
var CreatePlanSchema2 = (
|
|
394
|
+
} from '@forklaunch/validator/zod';
|
|
395
|
+
var CreatePlanSchema2 = (
|
|
396
|
+
PlanCadenceEnum,
|
|
397
|
+
CurrencyEnum,
|
|
398
|
+
BillingProviderEnum
|
|
399
|
+
) => ({
|
|
356
400
|
name: string8,
|
|
357
401
|
description: optional8(string8),
|
|
358
402
|
price: number4,
|
|
@@ -364,34 +408,38 @@ var CreatePlanSchema2 = (PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) =>
|
|
|
364
408
|
active: boolean2,
|
|
365
409
|
providerFields: optional8(unknown8)
|
|
366
410
|
});
|
|
367
|
-
var UpdatePlanSchema2 =
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
411
|
+
var UpdatePlanSchema2 =
|
|
412
|
+
({ uuidId }) =>
|
|
413
|
+
(PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) => ({
|
|
414
|
+
id: uuidId ? uuid8 : string8,
|
|
415
|
+
name: optional8(string8),
|
|
416
|
+
description: optional8(string8),
|
|
417
|
+
price: optional8(number4),
|
|
418
|
+
cadence: optional8(enum_6(PlanCadenceEnum)),
|
|
419
|
+
currency: optional8(enum_6(CurrencyEnum)),
|
|
420
|
+
features: optional8(array6(string8)),
|
|
421
|
+
externalId: optional8(string8),
|
|
422
|
+
billingProvider: optional8(enum_6(BillingProviderEnum)),
|
|
423
|
+
active: optional8(boolean2),
|
|
424
|
+
providerFields: optional8(unknown8)
|
|
425
|
+
});
|
|
426
|
+
var PlanSchema2 =
|
|
427
|
+
({ uuidId }) =>
|
|
428
|
+
(PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) => ({
|
|
429
|
+
id: uuidId ? uuid8 : string8,
|
|
430
|
+
name: string8,
|
|
431
|
+
description: optional8(string8),
|
|
432
|
+
price: number4,
|
|
433
|
+
cadence: enum_6(PlanCadenceEnum),
|
|
434
|
+
currency: enum_6(CurrencyEnum),
|
|
435
|
+
features: optional8(array6(string8)),
|
|
436
|
+
externalId: string8,
|
|
437
|
+
billingProvider: optional8(enum_6(BillingProviderEnum)),
|
|
438
|
+
active: boolean2,
|
|
439
|
+
providerFields: optional8(unknown8),
|
|
440
|
+
createdAt: optional8(date8),
|
|
441
|
+
updatedAt: optional8(date8)
|
|
442
|
+
});
|
|
395
443
|
var BasePlanServiceSchemas2 = (options) => ({
|
|
396
444
|
CreatePlanSchema: CreatePlanSchema2,
|
|
397
445
|
UpdatePlanSchema: UpdatePlanSchema2(options),
|
|
@@ -405,7 +453,7 @@ var BasePlanServiceSchemas3 = serviceSchemaResolver4(
|
|
|
405
453
|
);
|
|
406
454
|
|
|
407
455
|
// domain/schemas/subscription.schema.ts
|
|
408
|
-
import { serviceSchemaResolver as serviceSchemaResolver5 } from
|
|
456
|
+
import { serviceSchemaResolver as serviceSchemaResolver5 } from '@forklaunch/internal';
|
|
409
457
|
|
|
410
458
|
// domain/schemas/typebox/subscription.schema.ts
|
|
411
459
|
import {
|
|
@@ -416,7 +464,7 @@ import {
|
|
|
416
464
|
string as string9,
|
|
417
465
|
unknown as unknown9,
|
|
418
466
|
uuid as uuid9
|
|
419
|
-
} from
|
|
467
|
+
} from '@forklaunch/validator/typebox';
|
|
420
468
|
var CreateSubscriptionSchema = (PartyEnum, BillingProviderEnum) => ({
|
|
421
469
|
partyId: string9,
|
|
422
470
|
partyType: enum_7(PartyEnum),
|
|
@@ -430,36 +478,40 @@ var CreateSubscriptionSchema = (PartyEnum, BillingProviderEnum) => ({
|
|
|
430
478
|
billingProvider: optional9(enum_7(BillingProviderEnum)),
|
|
431
479
|
providerFields: optional9(unknown9)
|
|
432
480
|
});
|
|
433
|
-
var UpdateSubscriptionSchema =
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
481
|
+
var UpdateSubscriptionSchema =
|
|
482
|
+
({ uuidId }) =>
|
|
483
|
+
(PartyEnum, BillingProviderEnum) => ({
|
|
484
|
+
id: uuidId ? uuid9 : string9,
|
|
485
|
+
partyId: optional9(string9),
|
|
486
|
+
partyType: optional9(enum_7(PartyEnum)),
|
|
487
|
+
productId: optional9(string9),
|
|
488
|
+
description: optional9(string9),
|
|
489
|
+
active: optional9(boolean3),
|
|
490
|
+
externalId: optional9(string9),
|
|
491
|
+
startDate: optional9(date9),
|
|
492
|
+
endDate: optional9(date9),
|
|
493
|
+
status: optional9(string9),
|
|
494
|
+
billingProvider: optional9(enum_7(BillingProviderEnum)),
|
|
495
|
+
providerFields: optional9(unknown9)
|
|
496
|
+
});
|
|
497
|
+
var SubscriptionSchema =
|
|
498
|
+
({ uuidId }) =>
|
|
499
|
+
(PartyEnum, BillingProviderEnum) => ({
|
|
500
|
+
id: uuidId ? uuid9 : string9,
|
|
501
|
+
partyId: string9,
|
|
502
|
+
partyType: enum_7(PartyEnum),
|
|
503
|
+
productId: string9,
|
|
504
|
+
description: optional9(string9),
|
|
505
|
+
active: boolean3,
|
|
506
|
+
externalId: string9,
|
|
507
|
+
startDate: date9,
|
|
508
|
+
endDate: optional9(date9),
|
|
509
|
+
status: string9,
|
|
510
|
+
billingProvider: optional9(enum_7(BillingProviderEnum)),
|
|
511
|
+
providerFields: optional9(unknown9),
|
|
512
|
+
createdAt: optional9(date9),
|
|
513
|
+
updatedAt: optional9(date9)
|
|
514
|
+
});
|
|
463
515
|
var BaseSubscriptionServiceSchemas = (options) => ({
|
|
464
516
|
CreateSubscriptionSchema,
|
|
465
517
|
UpdateSubscriptionSchema: UpdateSubscriptionSchema(options),
|
|
@@ -475,7 +527,7 @@ import {
|
|
|
475
527
|
string as string10,
|
|
476
528
|
unknown as unknown10,
|
|
477
529
|
uuid as uuid10
|
|
478
|
-
} from
|
|
530
|
+
} from '@forklaunch/validator/zod';
|
|
479
531
|
var CreateSubscriptionSchema2 = (PartyEnum, BillingProviderEnum) => ({
|
|
480
532
|
partyId: string10,
|
|
481
533
|
partyType: enum_8(PartyEnum),
|
|
@@ -489,36 +541,40 @@ var CreateSubscriptionSchema2 = (PartyEnum, BillingProviderEnum) => ({
|
|
|
489
541
|
billingProvider: optional10(enum_8(BillingProviderEnum)),
|
|
490
542
|
providerFields: optional10(unknown10)
|
|
491
543
|
});
|
|
492
|
-
var UpdateSubscriptionSchema2 =
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
544
|
+
var UpdateSubscriptionSchema2 =
|
|
545
|
+
({ uuidId }) =>
|
|
546
|
+
(PartyEnum, BillingProviderEnum) => ({
|
|
547
|
+
id: uuidId ? uuid10 : string10,
|
|
548
|
+
partyId: optional10(string10),
|
|
549
|
+
partyType: optional10(enum_8(PartyEnum)),
|
|
550
|
+
productId: optional10(string10),
|
|
551
|
+
description: optional10(string10),
|
|
552
|
+
active: optional10(boolean4),
|
|
553
|
+
externalId: optional10(string10),
|
|
554
|
+
startDate: optional10(date10),
|
|
555
|
+
endDate: optional10(date10),
|
|
556
|
+
status: optional10(string10),
|
|
557
|
+
billingProvider: optional10(enum_8(BillingProviderEnum)),
|
|
558
|
+
providerFields: optional10(unknown10)
|
|
559
|
+
});
|
|
560
|
+
var SubscriptionSchema2 =
|
|
561
|
+
({ uuidId }) =>
|
|
562
|
+
(PartyEnum, BillingProviderEnum) => ({
|
|
563
|
+
id: uuidId ? uuid10 : string10,
|
|
564
|
+
partyId: string10,
|
|
565
|
+
partyType: enum_8(PartyEnum),
|
|
566
|
+
productId: string10,
|
|
567
|
+
description: optional10(string10),
|
|
568
|
+
active: boolean4,
|
|
569
|
+
externalId: string10,
|
|
570
|
+
startDate: date10,
|
|
571
|
+
endDate: optional10(date10),
|
|
572
|
+
status: string10,
|
|
573
|
+
billingProvider: optional10(enum_8(BillingProviderEnum)),
|
|
574
|
+
providerFields: optional10(unknown10),
|
|
575
|
+
createdAt: optional10(date10),
|
|
576
|
+
updatedAt: optional10(date10)
|
|
577
|
+
});
|
|
522
578
|
var BaseSubscriptionServiceSchemas2 = (options) => ({
|
|
523
579
|
CreateSubscriptionSchema: CreateSubscriptionSchema2,
|
|
524
580
|
UpdateSubscriptionSchema: UpdateSubscriptionSchema2(options),
|