@forklaunch/implementation-billing-stripe 0.0.2 → 0.0.4
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/{enum → domain/enum}/index.js +5 -5
- package/lib/{enum → domain/enum}/index.mjs +4 -4
- package/lib/{schemas → domain/schemas}/index.js +33 -29
- package/lib/{schemas → domain/schemas}/index.mjs +32 -28
- package/lib/{types → domain/types}/index.d.mts +1 -1
- package/lib/{types → domain/types}/index.d.ts +1 -1
- package/lib/{types → domain/types}/index.js +1 -1
- package/lib/eject/domain/schemas/billingPortal.schema.ts +2 -2
- package/lib/eject/domain/schemas/checkoutSession.schema.ts +7 -6
- package/lib/eject/domain/schemas/paymentLink.schema.ts +4 -4
- package/lib/eject/domain/schemas/plan.schema.ts +5 -5
- package/lib/eject/domain/schemas/subscription.schema.ts +3 -3
- package/lib/eject/services/billingPortal.service.ts +2 -2
- package/lib/eject/services/checkoutSession.service.ts +4 -4
- package/lib/eject/services/paymentLink.service.ts +4 -4
- package/lib/eject/services/plan.service.ts +5 -5
- package/lib/eject/services/subscription.service.ts +3 -3
- package/lib/eject/services/webhook.service.ts +5 -5
- package/lib/services/index.d.mts +2 -2
- package/lib/services/index.d.ts +2 -2
- package/package.json +15 -15
- /package/lib/{enum → domain/enum}/index.d.mts +0 -0
- /package/lib/{enum → domain/enum}/index.d.ts +0 -0
- /package/lib/{schemas → domain/schemas}/index.d.mts +0 -0
- /package/lib/{schemas → domain/schemas}/index.d.ts +0 -0
- /package/lib/{types → domain/types}/index.mjs +0 -0
- /package/lib/eject/{types → domain/types}/index.ts +0 -0
- /package/lib/eject/{types → domain/types}/stripe.dto.types.ts +0 -0
- /package/lib/eject/{types → domain/types}/stripe.entity.types.ts +0 -0
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// enum/index.ts
|
|
20
|
+
// domain/enum/index.ts
|
|
21
21
|
var enum_exports = {};
|
|
22
22
|
__export(enum_exports, {
|
|
23
23
|
BillingProviderEnum: () => BillingProviderEnum,
|
|
@@ -27,13 +27,13 @@ __export(enum_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(enum_exports);
|
|
29
29
|
|
|
30
|
-
// enum/billingProvider.enum.ts
|
|
30
|
+
// domain/enum/billingProvider.enum.ts
|
|
31
31
|
var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
|
|
32
32
|
BillingProviderEnum2["STRIPE"] = "stripe";
|
|
33
33
|
return BillingProviderEnum2;
|
|
34
34
|
})(BillingProviderEnum || {});
|
|
35
35
|
|
|
36
|
-
// enum/currency.enum.ts
|
|
36
|
+
// domain/enum/currency.enum.ts
|
|
37
37
|
var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
38
38
|
CurrencyEnum2["USD"] = "USD";
|
|
39
39
|
CurrencyEnum2["AED"] = "AED";
|
|
@@ -173,7 +173,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
|
173
173
|
return CurrencyEnum2;
|
|
174
174
|
})(CurrencyEnum || {});
|
|
175
175
|
|
|
176
|
-
// enum/paymentMethod.enum.ts
|
|
176
|
+
// domain/enum/paymentMethod.enum.ts
|
|
177
177
|
var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
178
178
|
PaymentMethodEnum2["AFFIRM"] = "affirm";
|
|
179
179
|
PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
|
|
@@ -215,7 +215,7 @@ var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
|
215
215
|
return PaymentMethodEnum2;
|
|
216
216
|
})(PaymentMethodEnum || {});
|
|
217
217
|
|
|
218
|
-
// enum/planCadence.enum.ts
|
|
218
|
+
// domain/enum/planCadence.enum.ts
|
|
219
219
|
var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
|
|
220
220
|
PlanCadenceEnum2["WEEKLY"] = "week";
|
|
221
221
|
PlanCadenceEnum2["MONTHLY"] = "month";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// enum/billingProvider.enum.ts
|
|
1
|
+
// domain/enum/billingProvider.enum.ts
|
|
2
2
|
var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
|
|
3
3
|
BillingProviderEnum2["STRIPE"] = "stripe";
|
|
4
4
|
return BillingProviderEnum2;
|
|
5
5
|
})(BillingProviderEnum || {});
|
|
6
6
|
|
|
7
|
-
// enum/currency.enum.ts
|
|
7
|
+
// domain/enum/currency.enum.ts
|
|
8
8
|
var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
9
9
|
CurrencyEnum2["USD"] = "USD";
|
|
10
10
|
CurrencyEnum2["AED"] = "AED";
|
|
@@ -144,7 +144,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
|
144
144
|
return CurrencyEnum2;
|
|
145
145
|
})(CurrencyEnum || {});
|
|
146
146
|
|
|
147
|
-
// enum/paymentMethod.enum.ts
|
|
147
|
+
// domain/enum/paymentMethod.enum.ts
|
|
148
148
|
var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
149
149
|
PaymentMethodEnum2["AFFIRM"] = "affirm";
|
|
150
150
|
PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
|
|
@@ -186,7 +186,7 @@ var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
|
186
186
|
return PaymentMethodEnum2;
|
|
187
187
|
})(PaymentMethodEnum || {});
|
|
188
188
|
|
|
189
|
-
// enum/planCadence.enum.ts
|
|
189
|
+
// domain/enum/planCadence.enum.ts
|
|
190
190
|
var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
|
|
191
191
|
PlanCadenceEnum2["WEEKLY"] = "week";
|
|
192
192
|
PlanCadenceEnum2["MONTHLY"] = "month";
|
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// schemas/index.ts
|
|
20
|
+
// domain/schemas/index.ts
|
|
21
21
|
var schemas_exports = {};
|
|
22
22
|
__export(schemas_exports, {
|
|
23
23
|
StripeBillingPortalServiceSchemas: () => StripeBillingPortalServiceSchemas3,
|
|
@@ -28,10 +28,10 @@ __export(schemas_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(schemas_exports);
|
|
30
30
|
|
|
31
|
-
// schemas/billingPortal.schema.ts
|
|
31
|
+
// domain/schemas/billingPortal.schema.ts
|
|
32
32
|
var import_internal = require("@forklaunch/internal");
|
|
33
33
|
|
|
34
|
-
// schemas/typebox/billingPortal.schema.ts
|
|
34
|
+
// domain/schemas/typebox/billingPortal.schema.ts
|
|
35
35
|
var import_typebox = require("@forklaunch/validator/typebox");
|
|
36
36
|
var CreateBillingPortalSchema = {
|
|
37
37
|
id: (0, import_typebox.optional)(import_typebox.string),
|
|
@@ -61,7 +61,7 @@ var StripeBillingPortalServiceSchemas = {
|
|
|
61
61
|
BillingPortalSchema
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
// schemas/zod/billingPortal.schema.ts
|
|
64
|
+
// domain/schemas/zod/billingPortal.schema.ts
|
|
65
65
|
var import_zod = require("@forklaunch/validator/zod");
|
|
66
66
|
var CreateBillingPortalSchema2 = {
|
|
67
67
|
id: (0, import_zod.optional)(import_zod.string),
|
|
@@ -91,19 +91,19 @@ var StripeBillingPortalServiceSchemas2 = {
|
|
|
91
91
|
BillingPortalSchema: BillingPortalSchema2
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
// schemas/billingPortal.schema.ts
|
|
94
|
+
// domain/schemas/billingPortal.schema.ts
|
|
95
95
|
var StripeBillingPortalServiceSchemas3 = (0, import_internal.serviceSchemaResolver)(
|
|
96
96
|
() => StripeBillingPortalServiceSchemas,
|
|
97
97
|
() => StripeBillingPortalServiceSchemas2
|
|
98
98
|
);
|
|
99
99
|
|
|
100
|
-
// schemas/checkoutSession.schema.ts
|
|
100
|
+
// domain/schemas/checkoutSession.schema.ts
|
|
101
101
|
var import_internal2 = require("@forklaunch/internal");
|
|
102
102
|
|
|
103
|
-
// schemas/typebox/checkoutSession.schema.ts
|
|
103
|
+
// domain/schemas/typebox/checkoutSession.schema.ts
|
|
104
104
|
var import_typebox2 = require("@forklaunch/validator/typebox");
|
|
105
105
|
|
|
106
|
-
// enum/currency.enum.ts
|
|
106
|
+
// domain/enum/currency.enum.ts
|
|
107
107
|
var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
108
108
|
CurrencyEnum2["USD"] = "USD";
|
|
109
109
|
CurrencyEnum2["AED"] = "AED";
|
|
@@ -243,7 +243,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
|
243
243
|
return CurrencyEnum2;
|
|
244
244
|
})(CurrencyEnum || {});
|
|
245
245
|
|
|
246
|
-
// enum/paymentMethod.enum.ts
|
|
246
|
+
// domain/enum/paymentMethod.enum.ts
|
|
247
247
|
var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
248
248
|
PaymentMethodEnum2["AFFIRM"] = "affirm";
|
|
249
249
|
PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
|
|
@@ -285,7 +285,7 @@ var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
|
285
285
|
return PaymentMethodEnum2;
|
|
286
286
|
})(PaymentMethodEnum || {});
|
|
287
287
|
|
|
288
|
-
// schemas/typebox/checkoutSession.schema.ts
|
|
288
|
+
// domain/schemas/typebox/checkoutSession.schema.ts
|
|
289
289
|
var CreateCheckoutSessionSchema = (StatusEnum) => ({
|
|
290
290
|
id: (0, import_typebox2.optional)(import_typebox2.string),
|
|
291
291
|
customerId: import_typebox2.string,
|
|
@@ -306,7 +306,9 @@ var UpdateCheckoutSessionSchema = (StatusEnum) => ({
|
|
|
306
306
|
cancelRedirectUri: (0, import_typebox2.optional)(import_typebox2.string),
|
|
307
307
|
expiresAt: (0, import_typebox2.optional)(import_typebox2.date),
|
|
308
308
|
status: (0, import_typebox2.optional)((0, import_typebox2.enum_)(StatusEnum)),
|
|
309
|
-
stripeFields: (0, import_typebox2.optional)(
|
|
309
|
+
stripeFields: (0, import_typebox2.optional)(
|
|
310
|
+
(0, import_typebox2.type)()
|
|
311
|
+
)
|
|
310
312
|
});
|
|
311
313
|
var CheckoutSessionSchema = (StatusEnum) => ({
|
|
312
314
|
id: import_typebox2.string,
|
|
@@ -328,7 +330,7 @@ var StripeCheckoutSessionServiceSchemas = {
|
|
|
328
330
|
CheckoutSessionSchema
|
|
329
331
|
};
|
|
330
332
|
|
|
331
|
-
// schemas/zod/checkoutSession.schema.ts
|
|
333
|
+
// domain/schemas/zod/checkoutSession.schema.ts
|
|
332
334
|
var import_zod2 = require("@forklaunch/validator/zod");
|
|
333
335
|
var CreateCheckoutSessionSchema2 = (StatusEnum) => ({
|
|
334
336
|
id: (0, import_zod2.optional)(import_zod2.string),
|
|
@@ -350,7 +352,9 @@ var UpdateCheckoutSessionSchema2 = (StatusEnum) => ({
|
|
|
350
352
|
cancelRedirectUri: (0, import_zod2.optional)(import_zod2.string),
|
|
351
353
|
expiresAt: (0, import_zod2.optional)(import_zod2.date),
|
|
352
354
|
status: (0, import_zod2.optional)((0, import_zod2.enum_)(StatusEnum)),
|
|
353
|
-
stripeFields: (0, import_zod2.optional)(
|
|
355
|
+
stripeFields: (0, import_zod2.optional)(
|
|
356
|
+
(0, import_zod2.type)()
|
|
357
|
+
)
|
|
354
358
|
});
|
|
355
359
|
var CheckoutSessionSchema2 = (StatusEnum) => ({
|
|
356
360
|
id: import_zod2.string,
|
|
@@ -372,16 +376,16 @@ var StripeCheckoutSessionServiceSchemas2 = {
|
|
|
372
376
|
CheckoutSessionSchema: CheckoutSessionSchema2
|
|
373
377
|
};
|
|
374
378
|
|
|
375
|
-
// schemas/checkoutSession.schema.ts
|
|
379
|
+
// domain/schemas/checkoutSession.schema.ts
|
|
376
380
|
var StripeCheckoutSessionServiceSchemas3 = (0, import_internal2.serviceSchemaResolver)(
|
|
377
381
|
() => StripeCheckoutSessionServiceSchemas,
|
|
378
382
|
() => StripeCheckoutSessionServiceSchemas2
|
|
379
383
|
);
|
|
380
384
|
|
|
381
|
-
// schemas/paymentLink.schema.ts
|
|
385
|
+
// domain/schemas/paymentLink.schema.ts
|
|
382
386
|
var import_internal3 = require("@forklaunch/internal");
|
|
383
387
|
|
|
384
|
-
// schemas/typebox/paymentLink.schema.ts
|
|
388
|
+
// domain/schemas/typebox/paymentLink.schema.ts
|
|
385
389
|
var import_typebox3 = require("@forklaunch/validator/typebox");
|
|
386
390
|
var CreatePaymentLinkSchema = (StatusEnum) => ({
|
|
387
391
|
id: (0, import_typebox3.optional)(import_typebox3.string),
|
|
@@ -415,7 +419,7 @@ var StripePaymentLinkServiceSchemas = {
|
|
|
415
419
|
PaymentLinkSchema
|
|
416
420
|
};
|
|
417
421
|
|
|
418
|
-
// schemas/zod/paymentLink.schema.ts
|
|
422
|
+
// domain/schemas/zod/paymentLink.schema.ts
|
|
419
423
|
var import_zod3 = require("@forklaunch/validator/zod");
|
|
420
424
|
var CreatePaymentLinkSchema2 = (StatusEnum) => ({
|
|
421
425
|
id: (0, import_zod3.optional)(import_zod3.string),
|
|
@@ -449,25 +453,25 @@ var StripePaymentLinkServiceSchemas2 = {
|
|
|
449
453
|
PaymentLinkSchema: PaymentLinkSchema2
|
|
450
454
|
};
|
|
451
455
|
|
|
452
|
-
// schemas/paymentLink.schema.ts
|
|
456
|
+
// domain/schemas/paymentLink.schema.ts
|
|
453
457
|
var StripePaymentLinkServiceSchemas3 = (0, import_internal3.serviceSchemaResolver)(
|
|
454
458
|
() => StripePaymentLinkServiceSchemas,
|
|
455
459
|
() => StripePaymentLinkServiceSchemas2
|
|
456
460
|
);
|
|
457
461
|
|
|
458
|
-
// schemas/plan.schema.ts
|
|
462
|
+
// domain/schemas/plan.schema.ts
|
|
459
463
|
var import_internal4 = require("@forklaunch/internal");
|
|
460
464
|
|
|
461
|
-
// schemas/typebox/plan.schema.ts
|
|
465
|
+
// domain/schemas/typebox/plan.schema.ts
|
|
462
466
|
var import_typebox4 = require("@forklaunch/validator/typebox");
|
|
463
467
|
|
|
464
|
-
// enum/billingProvider.enum.ts
|
|
468
|
+
// domain/enum/billingProvider.enum.ts
|
|
465
469
|
var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
|
|
466
470
|
BillingProviderEnum2["STRIPE"] = "stripe";
|
|
467
471
|
return BillingProviderEnum2;
|
|
468
472
|
})(BillingProviderEnum || {});
|
|
469
473
|
|
|
470
|
-
// enum/planCadence.enum.ts
|
|
474
|
+
// domain/enum/planCadence.enum.ts
|
|
471
475
|
var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
|
|
472
476
|
PlanCadenceEnum2["WEEKLY"] = "week";
|
|
473
477
|
PlanCadenceEnum2["MONTHLY"] = "month";
|
|
@@ -475,7 +479,7 @@ var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
|
|
|
475
479
|
return PlanCadenceEnum2;
|
|
476
480
|
})(PlanCadenceEnum || {});
|
|
477
481
|
|
|
478
|
-
// schemas/typebox/plan.schema.ts
|
|
482
|
+
// domain/schemas/typebox/plan.schema.ts
|
|
479
483
|
var CreatePlanSchema = {
|
|
480
484
|
id: (0, import_typebox4.optional)(import_typebox4.string),
|
|
481
485
|
name: import_typebox4.string,
|
|
@@ -523,7 +527,7 @@ var StripePlanServiceSchemas = {
|
|
|
523
527
|
PlanSchema
|
|
524
528
|
};
|
|
525
529
|
|
|
526
|
-
// schemas/zod/plan.schema.ts
|
|
530
|
+
// domain/schemas/zod/plan.schema.ts
|
|
527
531
|
var import_zod4 = require("@forklaunch/validator/zod");
|
|
528
532
|
var CreatePlanSchema2 = {
|
|
529
533
|
id: (0, import_zod4.optional)(import_zod4.string),
|
|
@@ -572,16 +576,16 @@ var StripePlanServiceSchemas2 = {
|
|
|
572
576
|
PlanSchema: PlanSchema2
|
|
573
577
|
};
|
|
574
578
|
|
|
575
|
-
// schemas/plan.schema.ts
|
|
579
|
+
// domain/schemas/plan.schema.ts
|
|
576
580
|
var StripePlanServiceSchemas3 = (0, import_internal4.serviceSchemaResolver)(
|
|
577
581
|
() => StripePlanServiceSchemas,
|
|
578
582
|
() => StripePlanServiceSchemas2
|
|
579
583
|
);
|
|
580
584
|
|
|
581
|
-
// schemas/subscription.schema.ts
|
|
585
|
+
// domain/schemas/subscription.schema.ts
|
|
582
586
|
var import_internal5 = require("@forklaunch/internal");
|
|
583
587
|
|
|
584
|
-
// schemas/typebox/subscription.schema.ts
|
|
588
|
+
// domain/schemas/typebox/subscription.schema.ts
|
|
585
589
|
var import_typebox5 = require("@forklaunch/validator/typebox");
|
|
586
590
|
var CreateSubscriptionSchema = (PartyEnum) => ({
|
|
587
591
|
id: (0, import_typebox5.optional)(import_typebox5.string),
|
|
@@ -633,7 +637,7 @@ var StripeSubscriptionServiceSchemas = {
|
|
|
633
637
|
SubscriptionSchema
|
|
634
638
|
};
|
|
635
639
|
|
|
636
|
-
// schemas/zod/subscription.schema.ts
|
|
640
|
+
// domain/schemas/zod/subscription.schema.ts
|
|
637
641
|
var import_zod5 = require("@forklaunch/validator/zod");
|
|
638
642
|
var CreateSubscriptionSchema2 = (PartyEnum) => ({
|
|
639
643
|
id: (0, import_zod5.optional)(import_zod5.string),
|
|
@@ -685,7 +689,7 @@ var StripeSubscriptionServiceSchemas2 = {
|
|
|
685
689
|
SubscriptionSchema: SubscriptionSchema2
|
|
686
690
|
};
|
|
687
691
|
|
|
688
|
-
// schemas/subscription.schema.ts
|
|
692
|
+
// domain/schemas/subscription.schema.ts
|
|
689
693
|
var StripeSubscriptionServiceSchemas3 = (0, import_internal5.serviceSchemaResolver)(
|
|
690
694
|
() => StripeSubscriptionServiceSchemas,
|
|
691
695
|
() => StripeSubscriptionServiceSchemas2
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// schemas/billingPortal.schema.ts
|
|
1
|
+
// domain/schemas/billingPortal.schema.ts
|
|
2
2
|
import { serviceSchemaResolver } from "@forklaunch/internal";
|
|
3
3
|
|
|
4
|
-
// schemas/typebox/billingPortal.schema.ts
|
|
4
|
+
// domain/schemas/typebox/billingPortal.schema.ts
|
|
5
5
|
import { date, optional, string, type } from "@forklaunch/validator/typebox";
|
|
6
6
|
var CreateBillingPortalSchema = {
|
|
7
7
|
id: optional(string),
|
|
@@ -31,7 +31,7 @@ var StripeBillingPortalServiceSchemas = {
|
|
|
31
31
|
BillingPortalSchema
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
// schemas/zod/billingPortal.schema.ts
|
|
34
|
+
// domain/schemas/zod/billingPortal.schema.ts
|
|
35
35
|
import { date as date2, optional as optional2, string as string2, type as type2 } from "@forklaunch/validator/zod";
|
|
36
36
|
var CreateBillingPortalSchema2 = {
|
|
37
37
|
id: optional2(string2),
|
|
@@ -61,16 +61,16 @@ var StripeBillingPortalServiceSchemas2 = {
|
|
|
61
61
|
BillingPortalSchema: BillingPortalSchema2
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
// schemas/billingPortal.schema.ts
|
|
64
|
+
// domain/schemas/billingPortal.schema.ts
|
|
65
65
|
var StripeBillingPortalServiceSchemas3 = serviceSchemaResolver(
|
|
66
66
|
() => StripeBillingPortalServiceSchemas,
|
|
67
67
|
() => StripeBillingPortalServiceSchemas2
|
|
68
68
|
);
|
|
69
69
|
|
|
70
|
-
// schemas/checkoutSession.schema.ts
|
|
70
|
+
// domain/schemas/checkoutSession.schema.ts
|
|
71
71
|
import { serviceSchemaResolver as serviceSchemaResolver2 } from "@forklaunch/internal";
|
|
72
72
|
|
|
73
|
-
// schemas/typebox/checkoutSession.schema.ts
|
|
73
|
+
// domain/schemas/typebox/checkoutSession.schema.ts
|
|
74
74
|
import {
|
|
75
75
|
array,
|
|
76
76
|
date as date3,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
unknown
|
|
82
82
|
} from "@forklaunch/validator/typebox";
|
|
83
83
|
|
|
84
|
-
// enum/currency.enum.ts
|
|
84
|
+
// domain/enum/currency.enum.ts
|
|
85
85
|
var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
86
86
|
CurrencyEnum2["USD"] = "USD";
|
|
87
87
|
CurrencyEnum2["AED"] = "AED";
|
|
@@ -221,7 +221,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
|
|
|
221
221
|
return CurrencyEnum2;
|
|
222
222
|
})(CurrencyEnum || {});
|
|
223
223
|
|
|
224
|
-
// enum/paymentMethod.enum.ts
|
|
224
|
+
// domain/enum/paymentMethod.enum.ts
|
|
225
225
|
var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
226
226
|
PaymentMethodEnum2["AFFIRM"] = "affirm";
|
|
227
227
|
PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
|
|
@@ -263,7 +263,7 @@ var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
|
|
|
263
263
|
return PaymentMethodEnum2;
|
|
264
264
|
})(PaymentMethodEnum || {});
|
|
265
265
|
|
|
266
|
-
// schemas/typebox/checkoutSession.schema.ts
|
|
266
|
+
// domain/schemas/typebox/checkoutSession.schema.ts
|
|
267
267
|
var CreateCheckoutSessionSchema = (StatusEnum) => ({
|
|
268
268
|
id: optional3(string3),
|
|
269
269
|
customerId: string3,
|
|
@@ -284,7 +284,9 @@ var UpdateCheckoutSessionSchema = (StatusEnum) => ({
|
|
|
284
284
|
cancelRedirectUri: optional3(string3),
|
|
285
285
|
expiresAt: optional3(date3),
|
|
286
286
|
status: optional3(enum_(StatusEnum)),
|
|
287
|
-
stripeFields: optional3(
|
|
287
|
+
stripeFields: optional3(
|
|
288
|
+
type3()
|
|
289
|
+
)
|
|
288
290
|
});
|
|
289
291
|
var CheckoutSessionSchema = (StatusEnum) => ({
|
|
290
292
|
id: string3,
|
|
@@ -306,7 +308,7 @@ var StripeCheckoutSessionServiceSchemas = {
|
|
|
306
308
|
CheckoutSessionSchema
|
|
307
309
|
};
|
|
308
310
|
|
|
309
|
-
// schemas/zod/checkoutSession.schema.ts
|
|
311
|
+
// domain/schemas/zod/checkoutSession.schema.ts
|
|
310
312
|
import {
|
|
311
313
|
array as array2,
|
|
312
314
|
date as date4,
|
|
@@ -336,7 +338,9 @@ var UpdateCheckoutSessionSchema2 = (StatusEnum) => ({
|
|
|
336
338
|
cancelRedirectUri: optional4(string4),
|
|
337
339
|
expiresAt: optional4(date4),
|
|
338
340
|
status: optional4(enum_2(StatusEnum)),
|
|
339
|
-
stripeFields: optional4(
|
|
341
|
+
stripeFields: optional4(
|
|
342
|
+
type4()
|
|
343
|
+
)
|
|
340
344
|
});
|
|
341
345
|
var CheckoutSessionSchema2 = (StatusEnum) => ({
|
|
342
346
|
id: string4,
|
|
@@ -358,16 +362,16 @@ var StripeCheckoutSessionServiceSchemas2 = {
|
|
|
358
362
|
CheckoutSessionSchema: CheckoutSessionSchema2
|
|
359
363
|
};
|
|
360
364
|
|
|
361
|
-
// schemas/checkoutSession.schema.ts
|
|
365
|
+
// domain/schemas/checkoutSession.schema.ts
|
|
362
366
|
var StripeCheckoutSessionServiceSchemas3 = serviceSchemaResolver2(
|
|
363
367
|
() => StripeCheckoutSessionServiceSchemas,
|
|
364
368
|
() => StripeCheckoutSessionServiceSchemas2
|
|
365
369
|
);
|
|
366
370
|
|
|
367
|
-
// schemas/paymentLink.schema.ts
|
|
371
|
+
// domain/schemas/paymentLink.schema.ts
|
|
368
372
|
import { serviceSchemaResolver as serviceSchemaResolver3 } from "@forklaunch/internal";
|
|
369
373
|
|
|
370
|
-
// schemas/typebox/paymentLink.schema.ts
|
|
374
|
+
// domain/schemas/typebox/paymentLink.schema.ts
|
|
371
375
|
import {
|
|
372
376
|
array as array3,
|
|
373
377
|
date as date5,
|
|
@@ -409,7 +413,7 @@ var StripePaymentLinkServiceSchemas = {
|
|
|
409
413
|
PaymentLinkSchema
|
|
410
414
|
};
|
|
411
415
|
|
|
412
|
-
// schemas/zod/paymentLink.schema.ts
|
|
416
|
+
// domain/schemas/zod/paymentLink.schema.ts
|
|
413
417
|
import {
|
|
414
418
|
array as array4,
|
|
415
419
|
date as date6,
|
|
@@ -451,16 +455,16 @@ var StripePaymentLinkServiceSchemas2 = {
|
|
|
451
455
|
PaymentLinkSchema: PaymentLinkSchema2
|
|
452
456
|
};
|
|
453
457
|
|
|
454
|
-
// schemas/paymentLink.schema.ts
|
|
458
|
+
// domain/schemas/paymentLink.schema.ts
|
|
455
459
|
var StripePaymentLinkServiceSchemas3 = serviceSchemaResolver3(
|
|
456
460
|
() => StripePaymentLinkServiceSchemas,
|
|
457
461
|
() => StripePaymentLinkServiceSchemas2
|
|
458
462
|
);
|
|
459
463
|
|
|
460
|
-
// schemas/plan.schema.ts
|
|
464
|
+
// domain/schemas/plan.schema.ts
|
|
461
465
|
import { serviceSchemaResolver as serviceSchemaResolver4 } from "@forklaunch/internal";
|
|
462
466
|
|
|
463
|
-
// schemas/typebox/plan.schema.ts
|
|
467
|
+
// domain/schemas/typebox/plan.schema.ts
|
|
464
468
|
import {
|
|
465
469
|
array as array5,
|
|
466
470
|
boolean,
|
|
@@ -472,13 +476,13 @@ import {
|
|
|
472
476
|
type as type7
|
|
473
477
|
} from "@forklaunch/validator/typebox";
|
|
474
478
|
|
|
475
|
-
// enum/billingProvider.enum.ts
|
|
479
|
+
// domain/enum/billingProvider.enum.ts
|
|
476
480
|
var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
|
|
477
481
|
BillingProviderEnum2["STRIPE"] = "stripe";
|
|
478
482
|
return BillingProviderEnum2;
|
|
479
483
|
})(BillingProviderEnum || {});
|
|
480
484
|
|
|
481
|
-
// enum/planCadence.enum.ts
|
|
485
|
+
// domain/enum/planCadence.enum.ts
|
|
482
486
|
var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
|
|
483
487
|
PlanCadenceEnum2["WEEKLY"] = "week";
|
|
484
488
|
PlanCadenceEnum2["MONTHLY"] = "month";
|
|
@@ -486,7 +490,7 @@ var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
|
|
|
486
490
|
return PlanCadenceEnum2;
|
|
487
491
|
})(PlanCadenceEnum || {});
|
|
488
492
|
|
|
489
|
-
// schemas/typebox/plan.schema.ts
|
|
493
|
+
// domain/schemas/typebox/plan.schema.ts
|
|
490
494
|
var CreatePlanSchema = {
|
|
491
495
|
id: optional7(string7),
|
|
492
496
|
name: string7,
|
|
@@ -534,7 +538,7 @@ var StripePlanServiceSchemas = {
|
|
|
534
538
|
PlanSchema
|
|
535
539
|
};
|
|
536
540
|
|
|
537
|
-
// schemas/zod/plan.schema.ts
|
|
541
|
+
// domain/schemas/zod/plan.schema.ts
|
|
538
542
|
import {
|
|
539
543
|
array as array6,
|
|
540
544
|
boolean as boolean2,
|
|
@@ -592,16 +596,16 @@ var StripePlanServiceSchemas2 = {
|
|
|
592
596
|
PlanSchema: PlanSchema2
|
|
593
597
|
};
|
|
594
598
|
|
|
595
|
-
// schemas/plan.schema.ts
|
|
599
|
+
// domain/schemas/plan.schema.ts
|
|
596
600
|
var StripePlanServiceSchemas3 = serviceSchemaResolver4(
|
|
597
601
|
() => StripePlanServiceSchemas,
|
|
598
602
|
() => StripePlanServiceSchemas2
|
|
599
603
|
);
|
|
600
604
|
|
|
601
|
-
// schemas/subscription.schema.ts
|
|
605
|
+
// domain/schemas/subscription.schema.ts
|
|
602
606
|
import { serviceSchemaResolver as serviceSchemaResolver5 } from "@forklaunch/internal";
|
|
603
607
|
|
|
604
|
-
// schemas/typebox/subscription.schema.ts
|
|
608
|
+
// domain/schemas/typebox/subscription.schema.ts
|
|
605
609
|
import {
|
|
606
610
|
boolean as boolean3,
|
|
607
611
|
date as date9,
|
|
@@ -660,7 +664,7 @@ var StripeSubscriptionServiceSchemas = {
|
|
|
660
664
|
SubscriptionSchema
|
|
661
665
|
};
|
|
662
666
|
|
|
663
|
-
// schemas/zod/subscription.schema.ts
|
|
667
|
+
// domain/schemas/zod/subscription.schema.ts
|
|
664
668
|
import {
|
|
665
669
|
boolean as boolean4,
|
|
666
670
|
date as date10,
|
|
@@ -719,7 +723,7 @@ var StripeSubscriptionServiceSchemas2 = {
|
|
|
719
723
|
SubscriptionSchema: SubscriptionSchema2
|
|
720
724
|
};
|
|
721
725
|
|
|
722
|
-
// schemas/subscription.schema.ts
|
|
726
|
+
// domain/schemas/subscription.schema.ts
|
|
723
727
|
var StripeSubscriptionServiceSchemas3 = serviceSchemaResolver5(
|
|
724
728
|
() => StripeSubscriptionServiceSchemas,
|
|
725
729
|
() => StripeSubscriptionServiceSchemas2
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateBillingPortalDto, UpdateBillingPortalDto,
|
|
1
|
+
import { BillingPortalDto, CreateBillingPortalDto, UpdateBillingPortalDto, CheckoutSessionDto, CreateCheckoutSessionDto, UpdateCheckoutSessionDto, PaymentLinkDto, CreatePaymentLinkDto, UpdatePaymentLinkDto, PlanDto, CreatePlanDto, UpdatePlanDto, SubscriptionDto, CreateSubscriptionDto, UpdateSubscriptionDto } from '@forklaunch/interfaces-billing/types';
|
|
2
2
|
import Stripe__default from 'stripe';
|
|
3
3
|
import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateBillingPortalDto, UpdateBillingPortalDto,
|
|
1
|
+
import { BillingPortalDto, CreateBillingPortalDto, UpdateBillingPortalDto, CheckoutSessionDto, CreateCheckoutSessionDto, UpdateCheckoutSessionDto, PaymentLinkDto, CreatePaymentLinkDto, UpdatePaymentLinkDto, PlanDto, CreatePlanDto, UpdatePlanDto, SubscriptionDto, CreateSubscriptionDto, UpdateSubscriptionDto } from '@forklaunch/interfaces-billing/types';
|
|
2
2
|
import Stripe__default from 'stripe';
|
|
3
3
|
import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.js';
|
|
4
4
|
|
|
@@ -13,6 +13,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
13
|
};
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
15
|
|
|
16
|
-
// types/index.ts
|
|
16
|
+
// domain/types/index.ts
|
|
17
17
|
var types_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(types_exports);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { date, optional, string, type } from '@
|
|
1
|
+
import { date, optional, string, type } from '@forklaunch/validator/zod';
|
|
2
2
|
import {
|
|
3
3
|
StripeBillingPortalDto,
|
|
4
4
|
StripeCreateBillingPortalDto,
|
|
5
5
|
StripeUpdateBillingPortalDto
|
|
6
|
-
} from '
|
|
6
|
+
} from '../types/stripe.dto.types';
|
|
7
7
|
|
|
8
8
|
export const CreateBillingPortalSchema = {
|
|
9
9
|
id: optional(string),
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
string,
|
|
8
8
|
type,
|
|
9
9
|
unknown
|
|
10
|
-
} from '@
|
|
11
|
-
import { CurrencyEnum } from '
|
|
12
|
-
import { PaymentMethodEnum } from '
|
|
10
|
+
} from '@forklaunch/validator/zod';
|
|
11
|
+
import { CurrencyEnum } from '../enum/currency.enum';
|
|
12
|
+
import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
|
|
13
13
|
import {
|
|
14
14
|
StripeCheckoutSessionDto,
|
|
15
15
|
StripeCreateCheckoutSessionDto,
|
|
16
16
|
StripeUpdateCheckoutSessionDto
|
|
17
|
-
} from '
|
|
17
|
+
} from '../types/stripe.dto.types';
|
|
18
18
|
|
|
19
19
|
export const CreateCheckoutSessionSchema = <
|
|
20
20
|
T extends Record<string, LiteralSchema>
|
|
@@ -45,8 +45,9 @@ export const UpdateCheckoutSessionSchema = <
|
|
|
45
45
|
cancelRedirectUri: optional(string),
|
|
46
46
|
expiresAt: optional(date),
|
|
47
47
|
status: optional(enum_(StatusEnum)),
|
|
48
|
-
stripeFields:
|
|
49
|
-
|
|
48
|
+
stripeFields: optional(
|
|
49
|
+
type<StripeUpdateCheckoutSessionDto<T>['stripeFields']>()
|
|
50
|
+
)
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
export const CheckoutSessionSchema = <T extends Record<string, LiteralSchema>>(
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
optional,
|
|
8
8
|
string,
|
|
9
9
|
type
|
|
10
|
-
} from '@
|
|
11
|
-
import { CurrencyEnum } from '
|
|
12
|
-
import { PaymentMethodEnum } from '
|
|
10
|
+
} from '@forklaunch/validator/zod';
|
|
11
|
+
import { CurrencyEnum } from '../enum/currency.enum';
|
|
12
|
+
import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
|
|
13
13
|
import {
|
|
14
14
|
StripeCreatePaymentLinkDto,
|
|
15
15
|
StripePaymentLinkDto,
|
|
16
16
|
StripeUpdatePaymentLinkDto
|
|
17
|
-
} from '
|
|
17
|
+
} from '../types/stripe.dto.types';
|
|
18
18
|
|
|
19
19
|
export const CreatePaymentLinkSchema = <
|
|
20
20
|
T extends Record<string, LiteralSchema>
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
optional,
|
|
8
8
|
string,
|
|
9
9
|
type
|
|
10
|
-
} from '@
|
|
11
|
-
import { BillingProviderEnum } from '
|
|
12
|
-
import { CurrencyEnum } from '
|
|
13
|
-
import { PlanCadenceEnum } from '
|
|
10
|
+
} from '@forklaunch/validator/zod';
|
|
11
|
+
import { BillingProviderEnum } from '../enum/billingProvider.enum';
|
|
12
|
+
import { CurrencyEnum } from '../enum/currency.enum';
|
|
13
|
+
import { PlanCadenceEnum } from '../enum/planCadence.enum';
|
|
14
14
|
import {
|
|
15
15
|
StripeCreatePlanDto,
|
|
16
16
|
StripePlanDto,
|
|
17
17
|
StripeUpdatePlanDto
|
|
18
|
-
} from '
|
|
18
|
+
} from '../types/stripe.dto.types';
|
|
19
19
|
|
|
20
20
|
export const CreatePlanSchema = {
|
|
21
21
|
id: optional(string),
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
optional,
|
|
7
7
|
string,
|
|
8
8
|
type
|
|
9
|
-
} from '@
|
|
10
|
-
import { BillingProviderEnum } from '
|
|
9
|
+
} from '@forklaunch/validator/zod';
|
|
10
|
+
import { BillingProviderEnum } from '../enum/billingProvider.enum';
|
|
11
11
|
import {
|
|
12
12
|
StripeCreateSubscriptionDto,
|
|
13
13
|
StripeSubscriptionDto,
|
|
14
14
|
StripeUpdateSubscriptionDto
|
|
15
|
-
} from '
|
|
15
|
+
} from '../types/stripe.dto.types';
|
|
16
16
|
|
|
17
17
|
export const CreateSubscriptionSchema = <
|
|
18
18
|
T extends Record<string, LiteralSchema>
|
|
@@ -23,8 +23,8 @@ import {
|
|
|
23
23
|
StripeBillingPortalDtos,
|
|
24
24
|
StripeCreateBillingPortalDto,
|
|
25
25
|
StripeUpdateBillingPortalDto
|
|
26
|
-
} from '../types/stripe.dto.types';
|
|
27
|
-
import { StripeBillingPortalEntities } from '../types/stripe.entity.types';
|
|
26
|
+
} from '../domain/types/stripe.dto.types';
|
|
27
|
+
import { StripeBillingPortalEntities } from '../domain/types/stripe.entity.types';
|
|
28
28
|
|
|
29
29
|
export class StripeBillingPortalService<
|
|
30
30
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
19
19
|
import { EntityManager } from '@mikro-orm/core';
|
|
20
20
|
import Stripe from 'stripe';
|
|
21
|
-
import { CurrencyEnum } from '../enum/currency.enum';
|
|
22
|
-
import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
|
|
23
|
-
import { StripeCheckoutSessionDtos } from '../types/stripe.dto.types';
|
|
24
|
-
import { StripeCheckoutSessionEntities } from '../types/stripe.entity.types';
|
|
21
|
+
import { CurrencyEnum } from '../domain/enum/currency.enum';
|
|
22
|
+
import { PaymentMethodEnum } from '../domain/enum/paymentMethod.enum';
|
|
23
|
+
import { StripeCheckoutSessionDtos } from '../domain/types/stripe.dto.types';
|
|
24
|
+
import { StripeCheckoutSessionEntities } from '../domain/types/stripe.entity.types';
|
|
25
25
|
|
|
26
26
|
export class StripeCheckoutSessionService<
|
|
27
27
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
19
19
|
import { EntityManager } from '@mikro-orm/core';
|
|
20
20
|
import Stripe from 'stripe';
|
|
21
|
-
import { CurrencyEnum } from '../enum/currency.enum';
|
|
22
|
-
import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
|
|
21
|
+
import { CurrencyEnum } from '../domain/enum/currency.enum';
|
|
22
|
+
import { PaymentMethodEnum } from '../domain/enum/paymentMethod.enum';
|
|
23
23
|
import {
|
|
24
24
|
StripeCreatePaymentLinkDto,
|
|
25
25
|
StripePaymentLinkDto,
|
|
26
26
|
StripePaymentLinkDtos,
|
|
27
27
|
StripeUpdatePaymentLinkDto
|
|
28
|
-
} from '../types/stripe.dto.types';
|
|
29
|
-
import { StripePaymentLinkEntities } from '../types/stripe.entity.types';
|
|
28
|
+
} from '../domain/types/stripe.dto.types';
|
|
29
|
+
import { StripePaymentLinkEntities } from '../domain/types/stripe.entity.types';
|
|
30
30
|
|
|
31
31
|
export class StripePaymentLinkService<
|
|
32
32
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
18
18
|
import { EntityManager } from '@mikro-orm/core';
|
|
19
19
|
import Stripe from 'stripe';
|
|
20
|
-
import { BillingProviderEnum } from '../enum/billingProvider.enum';
|
|
21
|
-
import { CurrencyEnum } from '../enum/currency.enum';
|
|
22
|
-
import { PlanCadenceEnum } from '../enum/planCadence.enum';
|
|
20
|
+
import { BillingProviderEnum } from '../domain/enum/billingProvider.enum';
|
|
21
|
+
import { CurrencyEnum } from '../domain/enum/currency.enum';
|
|
22
|
+
import { PlanCadenceEnum } from '../domain/enum/planCadence.enum';
|
|
23
23
|
import {
|
|
24
24
|
StripeCreatePlanDto,
|
|
25
25
|
StripePlanDto,
|
|
26
26
|
StripePlanDtos,
|
|
27
27
|
StripeUpdatePlanDto
|
|
28
|
-
} from '../types/stripe.dto.types';
|
|
29
|
-
import { StripePlanEntities } from '../types/stripe.entity.types';
|
|
28
|
+
} from '../domain/types/stripe.dto.types';
|
|
29
|
+
import { StripePlanEntities } from '../domain/types/stripe.entity.types';
|
|
30
30
|
|
|
31
31
|
export class StripePlanService<
|
|
32
32
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
18
18
|
import { EntityManager } from '@mikro-orm/core';
|
|
19
19
|
import Stripe from 'stripe';
|
|
20
|
-
import { BillingProviderEnum } from '../enum/billingProvider.enum';
|
|
20
|
+
import { BillingProviderEnum } from '../domain/enum/billingProvider.enum';
|
|
21
21
|
import {
|
|
22
22
|
StripeCreateSubscriptionDto,
|
|
23
23
|
StripeSubscriptionDto,
|
|
24
24
|
StripeSubscriptionDtos,
|
|
25
25
|
StripeUpdateSubscriptionDto
|
|
26
|
-
} from '../types/stripe.dto.types';
|
|
27
|
-
import { StripeSubscriptionEntities } from '../types/stripe.entity.types';
|
|
26
|
+
} from '../domain/types/stripe.dto.types';
|
|
27
|
+
import { StripeSubscriptionEntities } from '../domain/types/stripe.entity.types';
|
|
28
28
|
|
|
29
29
|
export class StripeSubscriptionService<
|
|
30
30
|
SchemaValidator extends AnySchemaValidator,
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
6
6
|
import { EntityManager } from '@mikro-orm/core';
|
|
7
7
|
import Stripe from 'stripe';
|
|
8
|
-
import { BillingProviderEnum } from '../enum/billingProvider.enum';
|
|
9
|
-
import { CurrencyEnum } from '../enum/currency.enum';
|
|
10
|
-
import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
|
|
11
|
-
import { PlanCadenceEnum } from '../enum/planCadence.enum';
|
|
8
|
+
import { BillingProviderEnum } from '../domain/enum/billingProvider.enum';
|
|
9
|
+
import { CurrencyEnum } from '../domain/enum/currency.enum';
|
|
10
|
+
import { PaymentMethodEnum } from '../domain/enum/paymentMethod.enum';
|
|
11
|
+
import { PlanCadenceEnum } from '../domain/enum/planCadence.enum';
|
|
12
12
|
import {
|
|
13
13
|
StripeBillingPortalEntities,
|
|
14
14
|
StripeCheckoutSessionEntities,
|
|
15
15
|
StripePaymentLinkEntities,
|
|
16
16
|
StripePlanEntities,
|
|
17
17
|
StripeSubscriptionEntities
|
|
18
|
-
} from '../types/stripe.entity.types';
|
|
18
|
+
} from '../domain/types/stripe.entity.types';
|
|
19
19
|
import { StripeBillingPortalService } from './billingPortal.service';
|
|
20
20
|
import { StripeCheckoutSessionService } from './checkoutSession.service';
|
|
21
21
|
import { StripePaymentLinkService } from './paymentLink.service';
|
package/lib/services/index.d.mts
CHANGED
|
@@ -7,8 +7,8 @@ import { ResponseMapperConstructor, RequestMapperConstructor, InternalMapper } f
|
|
|
7
7
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
8
8
|
import { EntityManager } from '@mikro-orm/core';
|
|
9
9
|
import Stripe__default from 'stripe';
|
|
10
|
-
import { StripeBillingPortalEntities, StripeBillingPortalDtos, StripeCreateBillingPortalDto, StripeUpdateBillingPortalDto, StripeBillingPortalDto, StripeCheckoutSessionEntities, StripeCheckoutSessionDtos, StripePaymentLinkEntities, StripePaymentLinkDtos, StripeCreatePaymentLinkDto, StripeUpdatePaymentLinkDto, StripePaymentLinkDto, StripePlanEntities, StripePlanDtos, StripeCreatePlanDto, StripeUpdatePlanDto, StripePlanDto, StripeSubscriptionEntities, StripeSubscriptionDtos, StripeCreateSubscriptionDto, StripeUpdateSubscriptionDto, StripeSubscriptionDto } from '../types/index.mjs';
|
|
11
|
-
import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.mjs';
|
|
10
|
+
import { StripeBillingPortalEntities, StripeBillingPortalDtos, StripeCreateBillingPortalDto, StripeUpdateBillingPortalDto, StripeBillingPortalDto, StripeCheckoutSessionEntities, StripeCheckoutSessionDtos, StripePaymentLinkEntities, StripePaymentLinkDtos, StripeCreatePaymentLinkDto, StripeUpdatePaymentLinkDto, StripePaymentLinkDto, StripePlanEntities, StripePlanDtos, StripeCreatePlanDto, StripeUpdatePlanDto, StripePlanDto, StripeSubscriptionEntities, StripeSubscriptionDtos, StripeCreateSubscriptionDto, StripeUpdateSubscriptionDto, StripeSubscriptionDto } from '../domain/types/index.mjs';
|
|
11
|
+
import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/enum/index.mjs';
|
|
12
12
|
import '@forklaunch/interfaces-billing/types';
|
|
13
13
|
|
|
14
14
|
declare class StripeBillingPortalService<SchemaValidator extends AnySchemaValidator, Entities extends StripeBillingPortalEntities, Dto extends StripeBillingPortalDtos = StripeBillingPortalDtos> implements BillingPortalService<{
|
package/lib/services/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { ResponseMapperConstructor, RequestMapperConstructor, InternalMapper } f
|
|
|
7
7
|
import { AnySchemaValidator } from '@forklaunch/validator';
|
|
8
8
|
import { EntityManager } from '@mikro-orm/core';
|
|
9
9
|
import Stripe__default from 'stripe';
|
|
10
|
-
import { StripeBillingPortalEntities, StripeBillingPortalDtos, StripeCreateBillingPortalDto, StripeUpdateBillingPortalDto, StripeBillingPortalDto, StripeCheckoutSessionEntities, StripeCheckoutSessionDtos, StripePaymentLinkEntities, StripePaymentLinkDtos, StripeCreatePaymentLinkDto, StripeUpdatePaymentLinkDto, StripePaymentLinkDto, StripePlanEntities, StripePlanDtos, StripeCreatePlanDto, StripeUpdatePlanDto, StripePlanDto, StripeSubscriptionEntities, StripeSubscriptionDtos, StripeCreateSubscriptionDto, StripeUpdateSubscriptionDto, StripeSubscriptionDto } from '../types/index.js';
|
|
11
|
-
import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.js';
|
|
10
|
+
import { StripeBillingPortalEntities, StripeBillingPortalDtos, StripeCreateBillingPortalDto, StripeUpdateBillingPortalDto, StripeBillingPortalDto, StripeCheckoutSessionEntities, StripeCheckoutSessionDtos, StripePaymentLinkEntities, StripePaymentLinkDtos, StripeCreatePaymentLinkDto, StripeUpdatePaymentLinkDto, StripePaymentLinkDto, StripePlanEntities, StripePlanDtos, StripeCreatePlanDto, StripeUpdatePlanDto, StripePlanDto, StripeSubscriptionEntities, StripeSubscriptionDtos, StripeCreateSubscriptionDto, StripeUpdateSubscriptionDto, StripeSubscriptionDto } from '../domain/types/index.js';
|
|
11
|
+
import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/enum/index.js';
|
|
12
12
|
import '@forklaunch/interfaces-billing/types';
|
|
13
13
|
|
|
14
14
|
declare class StripeBillingPortalService<SchemaValidator extends AnySchemaValidator, Entities extends StripeBillingPortalEntities, Dto extends StripeBillingPortalDtos = StripeBillingPortalDtos> implements BillingPortalService<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/implementation-billing-stripe",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Stripe implementation for forklaunch billing",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"author": "Forklift Technologies, Inc.",
|
|
15
15
|
"exports": {
|
|
16
16
|
"./enum": {
|
|
17
|
-
"types": "./lib/enum/index.d.ts",
|
|
18
|
-
"import": "./lib/enum/index.mjs",
|
|
19
|
-
"require": "./lib/enum/index.js",
|
|
20
|
-
"default": "./lib/enum/index.js"
|
|
17
|
+
"types": "./lib/domain/enum/index.d.ts",
|
|
18
|
+
"import": "./lib/domain/enum/index.mjs",
|
|
19
|
+
"require": "./lib/domain/enum/index.js",
|
|
20
|
+
"default": "./lib/domain/enum/index.js"
|
|
21
21
|
},
|
|
22
22
|
"./schemas": {
|
|
23
|
-
"types": "./lib/schemas/index.d.ts",
|
|
24
|
-
"import": "./lib/schemas/index.mjs",
|
|
25
|
-
"require": "./lib/schemas/index.js",
|
|
26
|
-
"default": "./lib/schemas/index.js"
|
|
23
|
+
"types": "./lib/domain/schemas/index.d.ts",
|
|
24
|
+
"import": "./lib/domain/schemas/index.mjs",
|
|
25
|
+
"require": "./lib/domain/schemas/index.js",
|
|
26
|
+
"default": "./lib/domain/schemas/index.js"
|
|
27
27
|
},
|
|
28
28
|
"./services": {
|
|
29
29
|
"types": "./lib/services/index.d.ts",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"default": "./lib/services/index.js"
|
|
33
33
|
},
|
|
34
34
|
"./types": {
|
|
35
|
-
"types": "./lib/types/index.d.ts",
|
|
36
|
-
"import": "./lib/types/index.mjs",
|
|
37
|
-
"require": "./lib/types/index.js",
|
|
38
|
-
"default": "./lib/types/index.js"
|
|
35
|
+
"types": "./lib/domain/types/index.d.ts",
|
|
36
|
+
"import": "./lib/domain/types/index.mjs",
|
|
37
|
+
"require": "./lib/domain/types/index.js",
|
|
38
|
+
"default": "./lib/domain/types/index.js"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"ajv": "^8.17.1",
|
|
52
52
|
"stripe": "^18.2.1",
|
|
53
53
|
"zod": "^3.25.67",
|
|
54
|
-
"@forklaunch/implementation-billing-base": "0.3.
|
|
54
|
+
"@forklaunch/implementation-billing-base": "0.3.5",
|
|
55
55
|
"@forklaunch/interfaces-billing": "0.3.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"typedoc": "^0.28.5"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
|
-
"build": "tsc --noEmit && tsup schemas/index.ts services/index.ts enum/index.ts types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
|
|
64
|
+
"build": "tsc --noEmit && tsup domain/schemas/index.ts services/index.ts domain/enum/index.ts domain/types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
|
|
65
65
|
"clean": "rm -rf lib pnpm.lock.yaml node_modules",
|
|
66
66
|
"docs": "typedoc --out docs *",
|
|
67
67
|
"format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.{ts,tsx,json}' --write",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|