@forklaunch/implementation-billing-stripe 0.0.1 → 0.0.3

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.
Files changed (43) hide show
  1. package/lib/domain/enum/index.d.mts +194 -0
  2. package/lib/domain/enum/index.d.ts +194 -0
  3. package/lib/domain/enum/index.js +236 -0
  4. package/lib/domain/enum/index.mjs +201 -0
  5. package/lib/domain/schemas/index.d.mts +4142 -0
  6. package/lib/domain/schemas/index.d.ts +4142 -0
  7. package/lib/{schemas → domain/schemas}/index.js +351 -275
  8. package/lib/{schemas → domain/schemas}/index.mjs +224 -223
  9. package/lib/domain/types/index.d.mts +280 -0
  10. package/lib/domain/types/index.d.ts +280 -0
  11. package/lib/{types → domain/types}/index.js +9 -5
  12. package/lib/eject/domain/enum/billingProvider.enum.ts +3 -0
  13. package/lib/eject/domain/enum/currency.enum.ts +137 -0
  14. package/lib/eject/domain/enum/index.ts +4 -0
  15. package/lib/eject/domain/enum/paymentMethod.enum.ts +39 -0
  16. package/lib/eject/domain/enum/planCadence.enum.ts +5 -0
  17. package/lib/eject/domain/schemas/checkoutSession.schema.ts +2 -2
  18. package/lib/eject/domain/schemas/paymentLink.schema.ts +2 -2
  19. package/lib/eject/domain/schemas/plan.schema.ts +3 -3
  20. package/lib/eject/domain/schemas/subscription.schema.ts +1 -1
  21. package/lib/eject/{types → domain/types}/stripe.dto.types.ts +4 -4
  22. package/lib/eject/{types → domain/types}/stripe.entity.types.ts +4 -4
  23. package/lib/eject/services/billingPortal.service.ts +2 -2
  24. package/lib/eject/services/checkoutSession.service.ts +4 -4
  25. package/lib/eject/services/paymentLink.service.ts +4 -4
  26. package/lib/eject/services/plan.service.ts +5 -5
  27. package/lib/eject/services/subscription.service.ts +3 -3
  28. package/lib/eject/services/webhook.service.ts +5 -5
  29. package/lib/services/index.d.mts +709 -194
  30. package/lib/services/index.d.ts +709 -194
  31. package/lib/services/index.js +359 -244
  32. package/lib/services/index.mjs +298 -205
  33. package/package.json +16 -16
  34. package/lib/domain/index.d.mts +0 -189
  35. package/lib/domain/index.d.ts +0 -189
  36. package/lib/domain/index.js +0 -231
  37. package/lib/domain/index.mjs +0 -201
  38. package/lib/schemas/index.d.mts +0 -376
  39. package/lib/schemas/index.d.ts +0 -376
  40. package/lib/types/index.d.mts +0 -121
  41. package/lib/types/index.d.ts +0 -121
  42. /package/lib/{types → domain/types}/index.mjs +0 -0
  43. /package/lib/eject/{types → domain/types}/index.ts +0 -0
@@ -0,0 +1,280 @@
1
+ import {
2
+ BillingPortalDto,
3
+ CreateBillingPortalDto,
4
+ UpdateBillingPortalDto,
5
+ CheckoutSessionDto,
6
+ CreateCheckoutSessionDto,
7
+ UpdateCheckoutSessionDto,
8
+ PaymentLinkDto,
9
+ CreatePaymentLinkDto,
10
+ UpdatePaymentLinkDto,
11
+ PlanDto,
12
+ CreatePlanDto,
13
+ UpdatePlanDto,
14
+ SubscriptionDto,
15
+ CreateSubscriptionDto,
16
+ UpdateSubscriptionDto
17
+ } from '@forklaunch/interfaces-billing/types';
18
+ import Stripe__default from 'stripe';
19
+ import {
20
+ PaymentMethodEnum,
21
+ CurrencyEnum,
22
+ PlanCadenceEnum,
23
+ BillingProviderEnum
24
+ } from '../enum/index.mjs';
25
+
26
+ type BillingPortalOmissions = 'customer';
27
+ type StripeCreateBillingPortalDto = Omit<
28
+ CreateBillingPortalDto,
29
+ 'providerFields'
30
+ > & {
31
+ stripeFields: Omit<
32
+ Stripe__default.BillingPortal.SessionCreateParams,
33
+ BillingPortalOmissions
34
+ >;
35
+ };
36
+ type StripeUpdateBillingPortalDto = Omit<
37
+ UpdateBillingPortalDto,
38
+ 'providerFields'
39
+ > & {
40
+ stripeFields?: Omit<
41
+ Stripe__default.BillingPortal.SessionCreateParams,
42
+ BillingPortalOmissions
43
+ >;
44
+ };
45
+ type StripeBillingPortalDto = Omit<BillingPortalDto, 'providerFields'> & {
46
+ stripeFields: Stripe__default.BillingPortal.Session;
47
+ };
48
+ type StripeBillingPortalDtos = {
49
+ BillingPortalMapper: StripeBillingPortalDto;
50
+ CreateBillingPortalMapper: StripeCreateBillingPortalDto;
51
+ UpdateBillingPortalMapper: StripeUpdateBillingPortalDto;
52
+ };
53
+ type CheckoutSessionOmissions =
54
+ | 'payment_method_types'
55
+ | 'currency'
56
+ | 'success_url'
57
+ | 'cancel_url';
58
+ type StripeCreateCheckoutSessionDto<StatusEnum> = Omit<
59
+ CreateCheckoutSessionDto<
60
+ typeof PaymentMethodEnum,
61
+ typeof CurrencyEnum,
62
+ StatusEnum
63
+ >,
64
+ 'providerFields'
65
+ > & {
66
+ stripeFields: Omit<
67
+ Stripe__default.Checkout.SessionCreateParams,
68
+ CheckoutSessionOmissions
69
+ >;
70
+ };
71
+ type StripeUpdateCheckoutSessionDto<StatusEnum> = Omit<
72
+ UpdateCheckoutSessionDto<
73
+ typeof PaymentMethodEnum,
74
+ typeof CurrencyEnum,
75
+ StatusEnum
76
+ >,
77
+ 'providerFields'
78
+ > & {
79
+ stripeFields?: Omit<
80
+ Stripe__default.Checkout.SessionCreateParams,
81
+ CheckoutSessionOmissions
82
+ >;
83
+ };
84
+ type StripeCheckoutSessionDto<StatusEnum> = Omit<
85
+ CheckoutSessionDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>,
86
+ 'providerFields'
87
+ > & {
88
+ stripeFields: Stripe__default.Checkout.Session;
89
+ };
90
+ type StripeCheckoutSessionDtos<StatusEnum> = {
91
+ CheckoutSessionMapper: StripeCheckoutSessionDto<StatusEnum>;
92
+ CreateCheckoutSessionMapper: StripeCreateCheckoutSessionDto<StatusEnum>;
93
+ UpdateCheckoutSessionMapper: StripeUpdateCheckoutSessionDto<StatusEnum>;
94
+ };
95
+ type StripeCreatePaymentLinkDto<StatusEnum> = Omit<
96
+ CreatePaymentLinkDto<
97
+ typeof PaymentMethodEnum,
98
+ typeof CurrencyEnum,
99
+ StatusEnum
100
+ >,
101
+ 'providerFields'
102
+ > & {
103
+ stripeFields: Stripe__default.PaymentLinkCreateParams;
104
+ };
105
+ type StripeUpdatePaymentLinkDto<StatusEnum> = Omit<
106
+ UpdatePaymentLinkDto<
107
+ typeof PaymentMethodEnum,
108
+ typeof CurrencyEnum,
109
+ StatusEnum
110
+ >,
111
+ 'providerFields'
112
+ > & {
113
+ stripeFields?: Stripe__default.PaymentLinkUpdateParams;
114
+ };
115
+ type StripePaymentLinkDto<StatusEnum> = Omit<
116
+ PaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>,
117
+ 'providerFields'
118
+ > & {
119
+ stripeFields: Stripe__default.PaymentLink;
120
+ };
121
+ type StripePaymentLinkDtos<StatusEnum> = {
122
+ PaymentLinkMapper: StripePaymentLinkDto<StatusEnum>;
123
+ CreatePaymentLinkMapper: StripeCreatePaymentLinkDto<StatusEnum>;
124
+ UpdatePaymentLinkMapper: StripeUpdatePaymentLinkDto<StatusEnum>;
125
+ };
126
+ type PlanOmissions = 'product' | 'interval' | 'currency';
127
+ type StripeCreatePlanDto = Omit<
128
+ CreatePlanDto<
129
+ typeof PlanCadenceEnum,
130
+ typeof CurrencyEnum,
131
+ typeof BillingProviderEnum
132
+ >,
133
+ 'providerFields'
134
+ > & {
135
+ stripeFields: Omit<Stripe__default.PlanCreateParams, PlanOmissions>;
136
+ };
137
+ type StripeUpdatePlanDto = Omit<
138
+ UpdatePlanDto<
139
+ typeof PlanCadenceEnum,
140
+ typeof CurrencyEnum,
141
+ typeof BillingProviderEnum
142
+ >,
143
+ 'providerFields'
144
+ > & {
145
+ stripeFields?: Omit<Stripe__default.PlanUpdateParams, PlanOmissions>;
146
+ };
147
+ type StripePlanDto = Omit<
148
+ PlanDto<
149
+ typeof PlanCadenceEnum,
150
+ typeof CurrencyEnum,
151
+ typeof BillingProviderEnum
152
+ >,
153
+ 'providerFields'
154
+ > & {
155
+ stripeFields: Stripe__default.Plan;
156
+ };
157
+ type StripePlanDtos = {
158
+ PlanMapper: StripePlanDto;
159
+ CreatePlanMapper: StripeCreatePlanDto;
160
+ UpdatePlanMapper: StripeUpdatePlanDto;
161
+ };
162
+ type SubscriptionOmissions = 'items' | 'customer';
163
+ type StripeCreateSubscriptionDto<PartyType> = Omit<
164
+ CreateSubscriptionDto<PartyType, typeof BillingProviderEnum>,
165
+ 'providerFields'
166
+ > & {
167
+ stripeFields: Omit<
168
+ Stripe__default.SubscriptionCreateParams,
169
+ SubscriptionOmissions
170
+ >;
171
+ };
172
+ type StripeUpdateSubscriptionDto<PartyType> = Omit<
173
+ UpdateSubscriptionDto<PartyType, typeof BillingProviderEnum>,
174
+ 'providerFields'
175
+ > & {
176
+ stripeFields?: Omit<
177
+ Stripe__default.SubscriptionUpdateParams,
178
+ SubscriptionOmissions
179
+ >;
180
+ };
181
+ type StripeSubscriptionDto<PartyType> = Omit<
182
+ SubscriptionDto<PartyType, typeof BillingProviderEnum>,
183
+ 'providerFields'
184
+ > & {
185
+ stripeFields: Stripe__default.Subscription;
186
+ };
187
+ type StripeSubscriptionDtos<PartyType> = {
188
+ SubscriptionMapper: StripeSubscriptionDto<PartyType>;
189
+ CreateSubscriptionMapper: StripeCreateSubscriptionDto<PartyType>;
190
+ UpdateSubscriptionMapper: StripeUpdateSubscriptionDto<PartyType>;
191
+ };
192
+
193
+ type StripeBillingPortalEntity = BillingPortalDto & {
194
+ providerFields: Stripe__default.BillingPortal.Session;
195
+ };
196
+ type StripeBillingPortalEntities = {
197
+ BillingPortalMapper: StripeBillingPortalEntity;
198
+ CreateBillingPortalMapper: StripeBillingPortalEntity;
199
+ UpdateBillingPortalMapper: StripeBillingPortalEntity;
200
+ };
201
+ type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<
202
+ typeof PaymentMethodEnum,
203
+ typeof CurrencyEnum,
204
+ StatusEnum
205
+ > & {
206
+ providerFields: Stripe__default.Checkout.Session;
207
+ };
208
+ type StripeCheckoutSessionEntities<StatusEnum> = {
209
+ CheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
210
+ CreateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
211
+ UpdateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
212
+ };
213
+ type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<
214
+ typeof PaymentMethodEnum,
215
+ typeof CurrencyEnum,
216
+ StatusEnum
217
+ > & {
218
+ providerFields: Stripe__default.PaymentLink;
219
+ };
220
+ type StripePaymentLinkEntities<StatusEnum> = {
221
+ PaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
222
+ CreatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
223
+ UpdatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
224
+ };
225
+ type StripePlanEntity = PlanDto<
226
+ typeof PlanCadenceEnum,
227
+ typeof CurrencyEnum,
228
+ typeof BillingProviderEnum
229
+ > & {
230
+ providerFields: Stripe__default.Plan;
231
+ };
232
+ type StripePlanEntities = {
233
+ PlanMapper: StripePlanEntity;
234
+ CreatePlanMapper: StripePlanEntity;
235
+ UpdatePlanMapper: StripePlanEntity;
236
+ };
237
+ type StripeSubscriptionEntity<PartyType> = SubscriptionDto<
238
+ PartyType,
239
+ typeof BillingProviderEnum
240
+ > & {
241
+ providerFields: Stripe__default.Subscription;
242
+ };
243
+ type StripeSubscriptionEntities<PartyType> = {
244
+ SubscriptionMapper: StripeSubscriptionEntity<PartyType>;
245
+ CreateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
246
+ UpdateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
247
+ };
248
+
249
+ export type {
250
+ StripeBillingPortalDto,
251
+ StripeBillingPortalDtos,
252
+ StripeBillingPortalEntities,
253
+ StripeBillingPortalEntity,
254
+ StripeCheckoutSessionDto,
255
+ StripeCheckoutSessionDtos,
256
+ StripeCheckoutSessionEntities,
257
+ StripeCheckoutSessionEntity,
258
+ StripeCreateBillingPortalDto,
259
+ StripeCreateCheckoutSessionDto,
260
+ StripeCreatePaymentLinkDto,
261
+ StripeCreatePlanDto,
262
+ StripeCreateSubscriptionDto,
263
+ StripePaymentLinkDto,
264
+ StripePaymentLinkDtos,
265
+ StripePaymentLinkEntities,
266
+ StripePaymentLinkEntity,
267
+ StripePlanDto,
268
+ StripePlanDtos,
269
+ StripePlanEntities,
270
+ StripePlanEntity,
271
+ StripeSubscriptionDto,
272
+ StripeSubscriptionDtos,
273
+ StripeSubscriptionEntities,
274
+ StripeSubscriptionEntity,
275
+ StripeUpdateBillingPortalDto,
276
+ StripeUpdateCheckoutSessionDto,
277
+ StripeUpdatePaymentLinkDto,
278
+ StripeUpdatePlanDto,
279
+ StripeUpdateSubscriptionDto
280
+ };
@@ -0,0 +1,280 @@
1
+ import {
2
+ BillingPortalDto,
3
+ CreateBillingPortalDto,
4
+ UpdateBillingPortalDto,
5
+ CheckoutSessionDto,
6
+ CreateCheckoutSessionDto,
7
+ UpdateCheckoutSessionDto,
8
+ PaymentLinkDto,
9
+ CreatePaymentLinkDto,
10
+ UpdatePaymentLinkDto,
11
+ PlanDto,
12
+ CreatePlanDto,
13
+ UpdatePlanDto,
14
+ SubscriptionDto,
15
+ CreateSubscriptionDto,
16
+ UpdateSubscriptionDto
17
+ } from '@forklaunch/interfaces-billing/types';
18
+ import Stripe__default from 'stripe';
19
+ import {
20
+ PaymentMethodEnum,
21
+ CurrencyEnum,
22
+ PlanCadenceEnum,
23
+ BillingProviderEnum
24
+ } from '../enum/index.js';
25
+
26
+ type BillingPortalOmissions = 'customer';
27
+ type StripeCreateBillingPortalDto = Omit<
28
+ CreateBillingPortalDto,
29
+ 'providerFields'
30
+ > & {
31
+ stripeFields: Omit<
32
+ Stripe__default.BillingPortal.SessionCreateParams,
33
+ BillingPortalOmissions
34
+ >;
35
+ };
36
+ type StripeUpdateBillingPortalDto = Omit<
37
+ UpdateBillingPortalDto,
38
+ 'providerFields'
39
+ > & {
40
+ stripeFields?: Omit<
41
+ Stripe__default.BillingPortal.SessionCreateParams,
42
+ BillingPortalOmissions
43
+ >;
44
+ };
45
+ type StripeBillingPortalDto = Omit<BillingPortalDto, 'providerFields'> & {
46
+ stripeFields: Stripe__default.BillingPortal.Session;
47
+ };
48
+ type StripeBillingPortalDtos = {
49
+ BillingPortalMapper: StripeBillingPortalDto;
50
+ CreateBillingPortalMapper: StripeCreateBillingPortalDto;
51
+ UpdateBillingPortalMapper: StripeUpdateBillingPortalDto;
52
+ };
53
+ type CheckoutSessionOmissions =
54
+ | 'payment_method_types'
55
+ | 'currency'
56
+ | 'success_url'
57
+ | 'cancel_url';
58
+ type StripeCreateCheckoutSessionDto<StatusEnum> = Omit<
59
+ CreateCheckoutSessionDto<
60
+ typeof PaymentMethodEnum,
61
+ typeof CurrencyEnum,
62
+ StatusEnum
63
+ >,
64
+ 'providerFields'
65
+ > & {
66
+ stripeFields: Omit<
67
+ Stripe__default.Checkout.SessionCreateParams,
68
+ CheckoutSessionOmissions
69
+ >;
70
+ };
71
+ type StripeUpdateCheckoutSessionDto<StatusEnum> = Omit<
72
+ UpdateCheckoutSessionDto<
73
+ typeof PaymentMethodEnum,
74
+ typeof CurrencyEnum,
75
+ StatusEnum
76
+ >,
77
+ 'providerFields'
78
+ > & {
79
+ stripeFields?: Omit<
80
+ Stripe__default.Checkout.SessionCreateParams,
81
+ CheckoutSessionOmissions
82
+ >;
83
+ };
84
+ type StripeCheckoutSessionDto<StatusEnum> = Omit<
85
+ CheckoutSessionDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>,
86
+ 'providerFields'
87
+ > & {
88
+ stripeFields: Stripe__default.Checkout.Session;
89
+ };
90
+ type StripeCheckoutSessionDtos<StatusEnum> = {
91
+ CheckoutSessionMapper: StripeCheckoutSessionDto<StatusEnum>;
92
+ CreateCheckoutSessionMapper: StripeCreateCheckoutSessionDto<StatusEnum>;
93
+ UpdateCheckoutSessionMapper: StripeUpdateCheckoutSessionDto<StatusEnum>;
94
+ };
95
+ type StripeCreatePaymentLinkDto<StatusEnum> = Omit<
96
+ CreatePaymentLinkDto<
97
+ typeof PaymentMethodEnum,
98
+ typeof CurrencyEnum,
99
+ StatusEnum
100
+ >,
101
+ 'providerFields'
102
+ > & {
103
+ stripeFields: Stripe__default.PaymentLinkCreateParams;
104
+ };
105
+ type StripeUpdatePaymentLinkDto<StatusEnum> = Omit<
106
+ UpdatePaymentLinkDto<
107
+ typeof PaymentMethodEnum,
108
+ typeof CurrencyEnum,
109
+ StatusEnum
110
+ >,
111
+ 'providerFields'
112
+ > & {
113
+ stripeFields?: Stripe__default.PaymentLinkUpdateParams;
114
+ };
115
+ type StripePaymentLinkDto<StatusEnum> = Omit<
116
+ PaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>,
117
+ 'providerFields'
118
+ > & {
119
+ stripeFields: Stripe__default.PaymentLink;
120
+ };
121
+ type StripePaymentLinkDtos<StatusEnum> = {
122
+ PaymentLinkMapper: StripePaymentLinkDto<StatusEnum>;
123
+ CreatePaymentLinkMapper: StripeCreatePaymentLinkDto<StatusEnum>;
124
+ UpdatePaymentLinkMapper: StripeUpdatePaymentLinkDto<StatusEnum>;
125
+ };
126
+ type PlanOmissions = 'product' | 'interval' | 'currency';
127
+ type StripeCreatePlanDto = Omit<
128
+ CreatePlanDto<
129
+ typeof PlanCadenceEnum,
130
+ typeof CurrencyEnum,
131
+ typeof BillingProviderEnum
132
+ >,
133
+ 'providerFields'
134
+ > & {
135
+ stripeFields: Omit<Stripe__default.PlanCreateParams, PlanOmissions>;
136
+ };
137
+ type StripeUpdatePlanDto = Omit<
138
+ UpdatePlanDto<
139
+ typeof PlanCadenceEnum,
140
+ typeof CurrencyEnum,
141
+ typeof BillingProviderEnum
142
+ >,
143
+ 'providerFields'
144
+ > & {
145
+ stripeFields?: Omit<Stripe__default.PlanUpdateParams, PlanOmissions>;
146
+ };
147
+ type StripePlanDto = Omit<
148
+ PlanDto<
149
+ typeof PlanCadenceEnum,
150
+ typeof CurrencyEnum,
151
+ typeof BillingProviderEnum
152
+ >,
153
+ 'providerFields'
154
+ > & {
155
+ stripeFields: Stripe__default.Plan;
156
+ };
157
+ type StripePlanDtos = {
158
+ PlanMapper: StripePlanDto;
159
+ CreatePlanMapper: StripeCreatePlanDto;
160
+ UpdatePlanMapper: StripeUpdatePlanDto;
161
+ };
162
+ type SubscriptionOmissions = 'items' | 'customer';
163
+ type StripeCreateSubscriptionDto<PartyType> = Omit<
164
+ CreateSubscriptionDto<PartyType, typeof BillingProviderEnum>,
165
+ 'providerFields'
166
+ > & {
167
+ stripeFields: Omit<
168
+ Stripe__default.SubscriptionCreateParams,
169
+ SubscriptionOmissions
170
+ >;
171
+ };
172
+ type StripeUpdateSubscriptionDto<PartyType> = Omit<
173
+ UpdateSubscriptionDto<PartyType, typeof BillingProviderEnum>,
174
+ 'providerFields'
175
+ > & {
176
+ stripeFields?: Omit<
177
+ Stripe__default.SubscriptionUpdateParams,
178
+ SubscriptionOmissions
179
+ >;
180
+ };
181
+ type StripeSubscriptionDto<PartyType> = Omit<
182
+ SubscriptionDto<PartyType, typeof BillingProviderEnum>,
183
+ 'providerFields'
184
+ > & {
185
+ stripeFields: Stripe__default.Subscription;
186
+ };
187
+ type StripeSubscriptionDtos<PartyType> = {
188
+ SubscriptionMapper: StripeSubscriptionDto<PartyType>;
189
+ CreateSubscriptionMapper: StripeCreateSubscriptionDto<PartyType>;
190
+ UpdateSubscriptionMapper: StripeUpdateSubscriptionDto<PartyType>;
191
+ };
192
+
193
+ type StripeBillingPortalEntity = BillingPortalDto & {
194
+ providerFields: Stripe__default.BillingPortal.Session;
195
+ };
196
+ type StripeBillingPortalEntities = {
197
+ BillingPortalMapper: StripeBillingPortalEntity;
198
+ CreateBillingPortalMapper: StripeBillingPortalEntity;
199
+ UpdateBillingPortalMapper: StripeBillingPortalEntity;
200
+ };
201
+ type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<
202
+ typeof PaymentMethodEnum,
203
+ typeof CurrencyEnum,
204
+ StatusEnum
205
+ > & {
206
+ providerFields: Stripe__default.Checkout.Session;
207
+ };
208
+ type StripeCheckoutSessionEntities<StatusEnum> = {
209
+ CheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
210
+ CreateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
211
+ UpdateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
212
+ };
213
+ type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<
214
+ typeof PaymentMethodEnum,
215
+ typeof CurrencyEnum,
216
+ StatusEnum
217
+ > & {
218
+ providerFields: Stripe__default.PaymentLink;
219
+ };
220
+ type StripePaymentLinkEntities<StatusEnum> = {
221
+ PaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
222
+ CreatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
223
+ UpdatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
224
+ };
225
+ type StripePlanEntity = PlanDto<
226
+ typeof PlanCadenceEnum,
227
+ typeof CurrencyEnum,
228
+ typeof BillingProviderEnum
229
+ > & {
230
+ providerFields: Stripe__default.Plan;
231
+ };
232
+ type StripePlanEntities = {
233
+ PlanMapper: StripePlanEntity;
234
+ CreatePlanMapper: StripePlanEntity;
235
+ UpdatePlanMapper: StripePlanEntity;
236
+ };
237
+ type StripeSubscriptionEntity<PartyType> = SubscriptionDto<
238
+ PartyType,
239
+ typeof BillingProviderEnum
240
+ > & {
241
+ providerFields: Stripe__default.Subscription;
242
+ };
243
+ type StripeSubscriptionEntities<PartyType> = {
244
+ SubscriptionMapper: StripeSubscriptionEntity<PartyType>;
245
+ CreateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
246
+ UpdateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
247
+ };
248
+
249
+ export type {
250
+ StripeBillingPortalDto,
251
+ StripeBillingPortalDtos,
252
+ StripeBillingPortalEntities,
253
+ StripeBillingPortalEntity,
254
+ StripeCheckoutSessionDto,
255
+ StripeCheckoutSessionDtos,
256
+ StripeCheckoutSessionEntities,
257
+ StripeCheckoutSessionEntity,
258
+ StripeCreateBillingPortalDto,
259
+ StripeCreateCheckoutSessionDto,
260
+ StripeCreatePaymentLinkDto,
261
+ StripeCreatePlanDto,
262
+ StripeCreateSubscriptionDto,
263
+ StripePaymentLinkDto,
264
+ StripePaymentLinkDtos,
265
+ StripePaymentLinkEntities,
266
+ StripePaymentLinkEntity,
267
+ StripePlanDto,
268
+ StripePlanDtos,
269
+ StripePlanEntities,
270
+ StripePlanEntity,
271
+ StripeSubscriptionDto,
272
+ StripeSubscriptionDtos,
273
+ StripeSubscriptionEntities,
274
+ StripeSubscriptionEntity,
275
+ StripeUpdateBillingPortalDto,
276
+ StripeUpdateCheckoutSessionDto,
277
+ StripeUpdatePaymentLinkDto,
278
+ StripeUpdatePlanDto,
279
+ StripeUpdateSubscriptionDto
280
+ };
@@ -1,18 +1,22 @@
1
- "use strict";
1
+ 'use strict';
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
7
+ if ((from && typeof from === 'object') || typeof from === 'function') {
8
8
  for (let key of __getOwnPropNames(from))
9
9
  if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
11
14
  }
12
15
  return to;
13
16
  };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
17
+ var __toCommonJS = (mod) =>
18
+ __copyProps(__defProp({}, '__esModule', { value: true }), mod);
15
19
 
16
- // types/index.ts
20
+ // domain/types/index.ts
17
21
  var types_exports = {};
18
22
  module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,3 @@
1
+ export enum BillingProviderEnum {
2
+ STRIPE = 'stripe'
3
+ }