@forklaunch/implementation-billing-stripe 0.3.3 → 0.3.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/enum/index.d.mts +119 -112
- package/lib/domain/enum/index.d.ts +119 -112
- package/lib/domain/enum/index.js +124 -119
- package/lib/domain/enum/index.mjs +109 -109
- package/lib/domain/schemas/index.d.mts +2914 -323
- package/lib/domain/schemas/index.d.ts +2914 -323
- package/lib/domain/schemas/index.js +257 -181
- package/lib/domain/schemas/index.mjs +131 -130
- package/lib/domain/types/index.d.mts +375 -135
- package/lib/domain/types/index.d.ts +375 -135
- package/lib/domain/types/index.js +8 -4
- package/lib/services/index.d.mts +461 -148
- package/lib/services/index.d.ts +461 -148
- package/lib/services/index.js +229 -131
- package/lib/services/index.mjs +194 -103
- package/package.json +11 -11
|
@@ -1,184 +1,424 @@
|
|
|
1
1
|
import { EntityManager } from '@mikro-orm/core';
|
|
2
2
|
import stripe__default from 'stripe';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
BillingPortalDto,
|
|
5
|
+
CreateBillingPortalDto,
|
|
6
|
+
UpdateBillingPortalDto,
|
|
7
|
+
CheckoutSessionDto,
|
|
8
|
+
CreateCheckoutSessionDto,
|
|
9
|
+
UpdateCheckoutSessionDto,
|
|
10
|
+
PaymentLinkDto,
|
|
11
|
+
CreatePaymentLinkDto,
|
|
12
|
+
UpdatePaymentLinkDto,
|
|
13
|
+
PlanDto,
|
|
14
|
+
CreatePlanDto,
|
|
15
|
+
UpdatePlanDto,
|
|
16
|
+
SubscriptionDto,
|
|
17
|
+
CreateSubscriptionDto,
|
|
18
|
+
UpdateSubscriptionDto
|
|
19
|
+
} from '@forklaunch/interfaces-billing/types';
|
|
20
|
+
import {
|
|
21
|
+
PaymentMethodEnum,
|
|
22
|
+
CurrencyEnum,
|
|
23
|
+
PlanCadenceEnum,
|
|
24
|
+
BillingProviderEnum
|
|
25
|
+
} from '../enum/index.js';
|
|
5
26
|
|
|
6
27
|
type BillingPortalOmissions = 'customer';
|
|
7
|
-
type StripeCreateBillingPortalDto = Omit<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
28
|
+
type StripeCreateBillingPortalDto = Omit<
|
|
29
|
+
CreateBillingPortalDto,
|
|
30
|
+
'providerFields'
|
|
31
|
+
> & {
|
|
32
|
+
stripeFields: Omit<
|
|
33
|
+
stripe__default.BillingPortal.SessionCreateParams,
|
|
34
|
+
BillingPortalOmissions
|
|
35
|
+
>;
|
|
36
|
+
};
|
|
37
|
+
type StripeUpdateBillingPortalDto = Omit<
|
|
38
|
+
UpdateBillingPortalDto,
|
|
39
|
+
'providerFields'
|
|
40
|
+
> & {
|
|
41
|
+
stripeFields?: Omit<
|
|
42
|
+
stripe__default.BillingPortal.SessionCreateParams,
|
|
43
|
+
BillingPortalOmissions
|
|
44
|
+
>;
|
|
12
45
|
};
|
|
13
46
|
type StripeBillingPortalDto = Omit<BillingPortalDto, 'providerFields'> & {
|
|
14
|
-
|
|
47
|
+
stripeFields: stripe__default.BillingPortal.Session;
|
|
15
48
|
};
|
|
16
49
|
type StripeBillingPortalDtos = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
type CheckoutSessionOmissions =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
50
|
+
BillingPortalMapper: StripeBillingPortalDto;
|
|
51
|
+
CreateBillingPortalMapper: StripeCreateBillingPortalDto;
|
|
52
|
+
UpdateBillingPortalMapper: StripeUpdateBillingPortalDto;
|
|
53
|
+
};
|
|
54
|
+
type CheckoutSessionOmissions =
|
|
55
|
+
| 'payment_method_types'
|
|
56
|
+
| 'currency'
|
|
57
|
+
| 'success_url'
|
|
58
|
+
| 'cancel_url';
|
|
59
|
+
type StripeCreateCheckoutSessionDto<StatusEnum> = Omit<
|
|
60
|
+
CreateCheckoutSessionDto<
|
|
61
|
+
typeof PaymentMethodEnum,
|
|
62
|
+
typeof CurrencyEnum,
|
|
63
|
+
StatusEnum
|
|
64
|
+
>,
|
|
65
|
+
'providerFields' | 'uri'
|
|
66
|
+
> & {
|
|
67
|
+
uri: string;
|
|
68
|
+
stripeFields: Omit<
|
|
69
|
+
stripe__default.Checkout.SessionCreateParams,
|
|
70
|
+
CheckoutSessionOmissions
|
|
71
|
+
>;
|
|
72
|
+
};
|
|
73
|
+
type StripeUpdateCheckoutSessionDto<StatusEnum> = Omit<
|
|
74
|
+
UpdateCheckoutSessionDto<
|
|
75
|
+
typeof PaymentMethodEnum,
|
|
76
|
+
typeof CurrencyEnum,
|
|
77
|
+
StatusEnum
|
|
78
|
+
>,
|
|
79
|
+
'providerFields'
|
|
80
|
+
> & {
|
|
81
|
+
stripeFields?: Omit<
|
|
82
|
+
stripe__default.Checkout.SessionCreateParams,
|
|
83
|
+
CheckoutSessionOmissions
|
|
84
|
+
>;
|
|
85
|
+
};
|
|
86
|
+
type StripeCheckoutSessionDto<StatusEnum> = Omit<
|
|
87
|
+
CheckoutSessionDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>,
|
|
88
|
+
'providerFields' | 'uri'
|
|
89
|
+
> & {
|
|
90
|
+
uri: string;
|
|
91
|
+
stripeFields: stripe__default.Checkout.Session;
|
|
32
92
|
};
|
|
33
93
|
type StripeCheckoutSessionDtos<StatusEnum> = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
type StripeCreatePaymentLinkDto<StatusEnum> = Omit<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
94
|
+
CheckoutSessionMapper: StripeCheckoutSessionDto<StatusEnum>;
|
|
95
|
+
CreateCheckoutSessionMapper: StripeCreateCheckoutSessionDto<StatusEnum>;
|
|
96
|
+
UpdateCheckoutSessionMapper: StripeUpdateCheckoutSessionDto<StatusEnum>;
|
|
97
|
+
};
|
|
98
|
+
type StripeCreatePaymentLinkDto<StatusEnum> = Omit<
|
|
99
|
+
CreatePaymentLinkDto<
|
|
100
|
+
typeof PaymentMethodEnum,
|
|
101
|
+
typeof CurrencyEnum,
|
|
102
|
+
StatusEnum
|
|
103
|
+
>,
|
|
104
|
+
'providerFields'
|
|
105
|
+
> & {
|
|
106
|
+
stripeFields: stripe__default.PaymentLinkCreateParams;
|
|
107
|
+
};
|
|
108
|
+
type StripeUpdatePaymentLinkDto<StatusEnum> = Omit<
|
|
109
|
+
UpdatePaymentLinkDto<
|
|
110
|
+
typeof PaymentMethodEnum,
|
|
111
|
+
typeof CurrencyEnum,
|
|
112
|
+
StatusEnum
|
|
113
|
+
>,
|
|
114
|
+
'providerFields'
|
|
115
|
+
> & {
|
|
116
|
+
stripeFields?: stripe__default.PaymentLinkUpdateParams;
|
|
117
|
+
};
|
|
118
|
+
type StripePaymentLinkDto<StatusEnum> = Omit<
|
|
119
|
+
PaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>,
|
|
120
|
+
'providerFields'
|
|
121
|
+
> & {
|
|
122
|
+
stripeFields: stripe__default.PaymentLink;
|
|
46
123
|
};
|
|
47
124
|
type StripePaymentLinkDtos<StatusEnum> = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
125
|
+
PaymentLinkMapper: StripePaymentLinkDto<StatusEnum>;
|
|
126
|
+
CreatePaymentLinkMapper: StripeCreatePaymentLinkDto<StatusEnum>;
|
|
127
|
+
UpdatePaymentLinkMapper: StripeUpdatePaymentLinkDto<StatusEnum>;
|
|
51
128
|
};
|
|
52
129
|
type PlanOmissions = 'product' | 'interval' | 'currency';
|
|
53
|
-
type StripeCreatePlanDto = Omit<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
130
|
+
type StripeCreatePlanDto = Omit<
|
|
131
|
+
CreatePlanDto<
|
|
132
|
+
typeof PlanCadenceEnum,
|
|
133
|
+
typeof CurrencyEnum,
|
|
134
|
+
typeof BillingProviderEnum
|
|
135
|
+
>,
|
|
136
|
+
'providerFields'
|
|
137
|
+
> & {
|
|
138
|
+
stripeFields: Omit<stripe__default.PlanCreateParams, PlanOmissions>;
|
|
139
|
+
};
|
|
140
|
+
type StripeUpdatePlanDto = Omit<
|
|
141
|
+
UpdatePlanDto<
|
|
142
|
+
typeof PlanCadenceEnum,
|
|
143
|
+
typeof CurrencyEnum,
|
|
144
|
+
typeof BillingProviderEnum
|
|
145
|
+
>,
|
|
146
|
+
'providerFields'
|
|
147
|
+
> & {
|
|
148
|
+
stripeFields?: Omit<stripe__default.PlanUpdateParams, PlanOmissions>;
|
|
149
|
+
};
|
|
150
|
+
type StripePlanDto = Omit<
|
|
151
|
+
PlanDto<
|
|
152
|
+
typeof PlanCadenceEnum,
|
|
153
|
+
typeof CurrencyEnum,
|
|
154
|
+
typeof BillingProviderEnum
|
|
155
|
+
>,
|
|
156
|
+
'providerFields'
|
|
157
|
+
> & {
|
|
158
|
+
stripeFields: stripe__default.Plan;
|
|
61
159
|
};
|
|
62
160
|
type StripePlanDtos = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
161
|
+
PlanMapper: StripePlanDto;
|
|
162
|
+
CreatePlanMapper: StripeCreatePlanDto;
|
|
163
|
+
UpdatePlanMapper: StripeUpdatePlanDto;
|
|
66
164
|
};
|
|
67
165
|
type SubscriptionOmissions = 'items' | 'customer';
|
|
68
|
-
type StripeCreateSubscriptionDto<PartyType> = Omit<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
166
|
+
type StripeCreateSubscriptionDto<PartyType> = Omit<
|
|
167
|
+
CreateSubscriptionDto<PartyType, typeof BillingProviderEnum>,
|
|
168
|
+
'providerFields'
|
|
169
|
+
> & {
|
|
170
|
+
stripeFields: Omit<
|
|
171
|
+
stripe__default.SubscriptionCreateParams,
|
|
172
|
+
SubscriptionOmissions
|
|
173
|
+
>;
|
|
174
|
+
};
|
|
175
|
+
type StripeUpdateSubscriptionDto<PartyType> = Omit<
|
|
176
|
+
UpdateSubscriptionDto<PartyType, typeof BillingProviderEnum>,
|
|
177
|
+
'providerFields'
|
|
178
|
+
> & {
|
|
179
|
+
stripeFields?: Omit<
|
|
180
|
+
stripe__default.SubscriptionUpdateParams,
|
|
181
|
+
SubscriptionOmissions
|
|
182
|
+
>;
|
|
183
|
+
};
|
|
184
|
+
type StripeSubscriptionDto<PartyType> = Omit<
|
|
185
|
+
SubscriptionDto<PartyType, typeof BillingProviderEnum>,
|
|
186
|
+
'providerFields'
|
|
187
|
+
> & {
|
|
188
|
+
stripeFields: stripe__default.Subscription;
|
|
76
189
|
};
|
|
77
190
|
type StripeSubscriptionDtos<PartyType> = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
191
|
+
SubscriptionMapper: StripeSubscriptionDto<PartyType>;
|
|
192
|
+
CreateSubscriptionMapper: StripeCreateSubscriptionDto<PartyType>;
|
|
193
|
+
UpdateSubscriptionMapper: StripeUpdateSubscriptionDto<PartyType>;
|
|
81
194
|
};
|
|
82
195
|
|
|
83
196
|
type StripeBillingPortalEntity = BillingPortalDto & {
|
|
84
|
-
|
|
197
|
+
providerFields: stripe__default.BillingPortal.Session;
|
|
85
198
|
};
|
|
86
199
|
type StripeBillingPortalEntities = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
200
|
+
BillingPortalMapper: StripeBillingPortalEntity;
|
|
201
|
+
CreateBillingPortalMapper: StripeBillingPortalEntity;
|
|
202
|
+
UpdateBillingPortalMapper: StripeBillingPortalEntity;
|
|
90
203
|
};
|
|
91
|
-
type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<
|
|
92
|
-
|
|
204
|
+
type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<
|
|
205
|
+
typeof PaymentMethodEnum,
|
|
206
|
+
typeof CurrencyEnum,
|
|
207
|
+
StatusEnum
|
|
208
|
+
> & {
|
|
209
|
+
providerFields: stripe__default.Checkout.Session;
|
|
93
210
|
};
|
|
94
211
|
type StripeCheckoutSessionEntities<StatusEnum> = {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
212
|
+
CheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
213
|
+
CreateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
214
|
+
UpdateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
98
215
|
};
|
|
99
|
-
type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<
|
|
100
|
-
|
|
216
|
+
type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<
|
|
217
|
+
typeof PaymentMethodEnum,
|
|
218
|
+
typeof CurrencyEnum,
|
|
219
|
+
StatusEnum
|
|
220
|
+
> & {
|
|
221
|
+
providerFields: stripe__default.PaymentLink;
|
|
101
222
|
};
|
|
102
223
|
type StripePaymentLinkEntities<StatusEnum> = {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
224
|
+
PaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
225
|
+
CreatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
226
|
+
UpdatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
106
227
|
};
|
|
107
|
-
type StripePlanEntity = PlanDto<
|
|
108
|
-
|
|
228
|
+
type StripePlanEntity = PlanDto<
|
|
229
|
+
typeof PlanCadenceEnum,
|
|
230
|
+
typeof CurrencyEnum,
|
|
231
|
+
typeof BillingProviderEnum
|
|
232
|
+
> & {
|
|
233
|
+
providerFields: stripe__default.Plan;
|
|
109
234
|
};
|
|
110
235
|
type StripePlanEntities = {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
236
|
+
PlanMapper: StripePlanEntity;
|
|
237
|
+
CreatePlanMapper: StripePlanEntity;
|
|
238
|
+
UpdatePlanMapper: StripePlanEntity;
|
|
114
239
|
};
|
|
115
|
-
type StripeSubscriptionEntity<PartyType> = SubscriptionDto<
|
|
116
|
-
|
|
240
|
+
type StripeSubscriptionEntity<PartyType> = SubscriptionDto<
|
|
241
|
+
PartyType,
|
|
242
|
+
typeof BillingProviderEnum
|
|
243
|
+
> & {
|
|
244
|
+
providerFields: stripe__default.Subscription;
|
|
117
245
|
};
|
|
118
246
|
type StripeSubscriptionEntities<PartyType> = {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
247
|
+
SubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
248
|
+
CreateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
249
|
+
UpdateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
122
250
|
};
|
|
123
251
|
|
|
124
|
-
type StripeBillingPortalMappers<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
252
|
+
type StripeBillingPortalMappers<
|
|
253
|
+
Entities extends StripeBillingPortalEntities,
|
|
254
|
+
Dto extends StripeBillingPortalDtos
|
|
255
|
+
> = {
|
|
256
|
+
BillingPortalMapper: {
|
|
257
|
+
toDto: (
|
|
258
|
+
entity: Entities['BillingPortalMapper']
|
|
259
|
+
) => Promise<Dto['BillingPortalMapper']>;
|
|
260
|
+
};
|
|
261
|
+
CreateBillingPortalMapper: {
|
|
262
|
+
toEntity: (
|
|
263
|
+
dto: Dto['CreateBillingPortalMapper'],
|
|
264
|
+
em: EntityManager,
|
|
265
|
+
stripeSession: stripe__default.BillingPortal.Session,
|
|
266
|
+
...args: unknown[]
|
|
267
|
+
) => Promise<Entities['CreateBillingPortalMapper']>;
|
|
268
|
+
};
|
|
269
|
+
UpdateBillingPortalMapper: {
|
|
270
|
+
toEntity: (
|
|
271
|
+
dto: Dto['UpdateBillingPortalMapper'],
|
|
272
|
+
em: EntityManager,
|
|
273
|
+
stripeSession: stripe__default.BillingPortal.Session,
|
|
274
|
+
...args: unknown[]
|
|
275
|
+
) => Promise<Entities['UpdateBillingPortalMapper']>;
|
|
276
|
+
};
|
|
134
277
|
};
|
|
135
278
|
|
|
136
|
-
type StripeCheckoutSessionMappers<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
279
|
+
type StripeCheckoutSessionMappers<
|
|
280
|
+
StatusEnum,
|
|
281
|
+
Entities extends StripeCheckoutSessionEntities<StatusEnum>,
|
|
282
|
+
Dto extends StripeCheckoutSessionDtos<StatusEnum>
|
|
283
|
+
> = {
|
|
284
|
+
CheckoutSessionMapper: {
|
|
285
|
+
toDto: (
|
|
286
|
+
entity: Entities['CheckoutSessionMapper']
|
|
287
|
+
) => Promise<Dto['CheckoutSessionMapper']>;
|
|
288
|
+
};
|
|
289
|
+
CreateCheckoutSessionMapper: {
|
|
290
|
+
toEntity: (
|
|
291
|
+
dto: Dto['CreateCheckoutSessionMapper'],
|
|
292
|
+
em: EntityManager,
|
|
293
|
+
stripeSession: stripe__default.Checkout.Session,
|
|
294
|
+
...args: unknown[]
|
|
295
|
+
) => Promise<Entities['CreateCheckoutSessionMapper']>;
|
|
296
|
+
};
|
|
297
|
+
UpdateCheckoutSessionMapper: {
|
|
298
|
+
toEntity: (
|
|
299
|
+
dto: Dto['UpdateCheckoutSessionMapper'],
|
|
300
|
+
em: EntityManager,
|
|
301
|
+
stripeSession: stripe__default.Checkout.Session,
|
|
302
|
+
...args: unknown[]
|
|
303
|
+
) => Promise<Entities['UpdateCheckoutSessionMapper']>;
|
|
304
|
+
};
|
|
146
305
|
};
|
|
147
306
|
|
|
148
|
-
type StripePaymentLinkMappers<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
307
|
+
type StripePaymentLinkMappers<
|
|
308
|
+
StatusEnum,
|
|
309
|
+
Entities extends StripePaymentLinkEntities<StatusEnum>,
|
|
310
|
+
Dto extends StripePaymentLinkDtos<StatusEnum>
|
|
311
|
+
> = {
|
|
312
|
+
PaymentLinkMapper: {
|
|
313
|
+
toDto: (
|
|
314
|
+
entity: Entities['PaymentLinkMapper']
|
|
315
|
+
) => Promise<Dto['PaymentLinkMapper']>;
|
|
316
|
+
};
|
|
317
|
+
CreatePaymentLinkMapper: {
|
|
318
|
+
toEntity: (
|
|
319
|
+
dto: Dto['CreatePaymentLinkMapper'],
|
|
320
|
+
em: EntityManager,
|
|
321
|
+
stripePaymentLink: stripe__default.PaymentLink,
|
|
322
|
+
...args: unknown[]
|
|
323
|
+
) => Promise<Entities['CreatePaymentLinkMapper']>;
|
|
324
|
+
};
|
|
325
|
+
UpdatePaymentLinkMapper: {
|
|
326
|
+
toEntity: (
|
|
327
|
+
dto: Dto['UpdatePaymentLinkMapper'],
|
|
328
|
+
em: EntityManager,
|
|
329
|
+
stripePaymentLink: stripe__default.PaymentLink,
|
|
330
|
+
...args: unknown[]
|
|
331
|
+
) => Promise<Entities['UpdatePaymentLinkMapper']>;
|
|
332
|
+
};
|
|
158
333
|
};
|
|
159
334
|
|
|
160
|
-
type StripePlanMappers<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
335
|
+
type StripePlanMappers<
|
|
336
|
+
Entities extends StripePlanEntities,
|
|
337
|
+
Dto extends StripePlanDtos
|
|
338
|
+
> = {
|
|
339
|
+
PlanMapper: {
|
|
340
|
+
toDto: (entity: Entities['PlanMapper']) => Promise<Dto['PlanMapper']>;
|
|
341
|
+
};
|
|
342
|
+
CreatePlanMapper: {
|
|
343
|
+
toEntity: (
|
|
344
|
+
dto: Dto['CreatePlanMapper'],
|
|
345
|
+
em: EntityManager,
|
|
346
|
+
stripePlan: stripe__default.Plan,
|
|
347
|
+
...args: unknown[]
|
|
348
|
+
) => Promise<Entities['CreatePlanMapper']>;
|
|
349
|
+
};
|
|
350
|
+
UpdatePlanMapper: {
|
|
351
|
+
toEntity: (
|
|
352
|
+
dto: Dto['UpdatePlanMapper'],
|
|
353
|
+
em: EntityManager,
|
|
354
|
+
stripePlan: stripe__default.Plan,
|
|
355
|
+
...args: unknown[]
|
|
356
|
+
) => Promise<Entities['UpdatePlanMapper']>;
|
|
357
|
+
};
|
|
170
358
|
};
|
|
171
359
|
|
|
172
|
-
type StripeSubscriptionMappers<
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
360
|
+
type StripeSubscriptionMappers<
|
|
361
|
+
PartyType,
|
|
362
|
+
Entities extends StripeSubscriptionEntities<PartyType>,
|
|
363
|
+
Dto extends StripeSubscriptionDtos<PartyType>
|
|
364
|
+
> = {
|
|
365
|
+
SubscriptionMapper: {
|
|
366
|
+
toDto: (
|
|
367
|
+
entity: Entities['SubscriptionMapper']
|
|
368
|
+
) => Promise<Dto['SubscriptionMapper']>;
|
|
369
|
+
};
|
|
370
|
+
CreateSubscriptionMapper: {
|
|
371
|
+
toEntity: (
|
|
372
|
+
dto: Dto['CreateSubscriptionMapper'],
|
|
373
|
+
em: EntityManager,
|
|
374
|
+
stripeSubscription: stripe__default.Subscription,
|
|
375
|
+
...args: unknown[]
|
|
376
|
+
) => Promise<Entities['CreateSubscriptionMapper']>;
|
|
377
|
+
};
|
|
378
|
+
UpdateSubscriptionMapper: {
|
|
379
|
+
toEntity: (
|
|
380
|
+
dto: Dto['UpdateSubscriptionMapper'],
|
|
381
|
+
em: EntityManager,
|
|
382
|
+
stripeSubscription: stripe__default.Subscription,
|
|
383
|
+
...args: unknown[]
|
|
384
|
+
) => Promise<Entities['UpdateSubscriptionMapper']>;
|
|
385
|
+
};
|
|
182
386
|
};
|
|
183
387
|
|
|
184
|
-
export type {
|
|
388
|
+
export type {
|
|
389
|
+
StripeBillingPortalDto,
|
|
390
|
+
StripeBillingPortalDtos,
|
|
391
|
+
StripeBillingPortalEntities,
|
|
392
|
+
StripeBillingPortalEntity,
|
|
393
|
+
StripeBillingPortalMappers,
|
|
394
|
+
StripeCheckoutSessionDto,
|
|
395
|
+
StripeCheckoutSessionDtos,
|
|
396
|
+
StripeCheckoutSessionEntities,
|
|
397
|
+
StripeCheckoutSessionEntity,
|
|
398
|
+
StripeCheckoutSessionMappers,
|
|
399
|
+
StripeCreateBillingPortalDto,
|
|
400
|
+
StripeCreateCheckoutSessionDto,
|
|
401
|
+
StripeCreatePaymentLinkDto,
|
|
402
|
+
StripeCreatePlanDto,
|
|
403
|
+
StripeCreateSubscriptionDto,
|
|
404
|
+
StripePaymentLinkDto,
|
|
405
|
+
StripePaymentLinkDtos,
|
|
406
|
+
StripePaymentLinkEntities,
|
|
407
|
+
StripePaymentLinkEntity,
|
|
408
|
+
StripePaymentLinkMappers,
|
|
409
|
+
StripePlanDto,
|
|
410
|
+
StripePlanDtos,
|
|
411
|
+
StripePlanEntities,
|
|
412
|
+
StripePlanEntity,
|
|
413
|
+
StripePlanMappers,
|
|
414
|
+
StripeSubscriptionDto,
|
|
415
|
+
StripeSubscriptionDtos,
|
|
416
|
+
StripeSubscriptionEntities,
|
|
417
|
+
StripeSubscriptionEntity,
|
|
418
|
+
StripeSubscriptionMappers,
|
|
419
|
+
StripeUpdateBillingPortalDto,
|
|
420
|
+
StripeUpdateCheckoutSessionDto,
|
|
421
|
+
StripeUpdatePaymentLinkDto,
|
|
422
|
+
StripeUpdatePlanDto,
|
|
423
|
+
StripeUpdateSubscriptionDto
|
|
424
|
+
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
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 ===
|
|
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, {
|
|
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) =>
|
|
17
|
+
var __toCommonJS = (mod) =>
|
|
18
|
+
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
15
19
|
|
|
16
20
|
// domain/types/index.ts
|
|
17
21
|
var types_exports = {};
|