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