@forklaunch/implementation-billing-stripe 0.3.0 → 0.3.2
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 +323 -2908
- package/lib/domain/schemas/index.d.ts +323 -2908
- package/lib/domain/schemas/index.js +187 -257
- package/lib/domain/schemas/index.mjs +136 -131
- package/lib/domain/types/index.d.mts +135 -373
- package/lib/domain/types/index.d.ts +135 -373
- package/lib/domain/types/index.js +4 -8
- package/lib/eject/domain/schemas/checkoutSession.schema.ts +3 -0
- package/lib/eject/domain/types/stripe.dto.types.ts +4 -2
- 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 +9 -9
|
@@ -1,422 +1,184 @@
|
|
|
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
|
-
type
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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' | 'uri'> & {
|
|
23
|
+
uri: string;
|
|
24
|
+
stripeFields: Omit<stripe__default.Checkout.SessionCreateParams, CheckoutSessionOmissions>;
|
|
25
|
+
};
|
|
26
|
+
type StripeUpdateCheckoutSessionDto<StatusEnum> = Omit<UpdateCheckoutSessionDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>, 'providerFields'> & {
|
|
27
|
+
stripeFields?: Omit<stripe__default.Checkout.SessionCreateParams, CheckoutSessionOmissions>;
|
|
28
|
+
};
|
|
29
|
+
type StripeCheckoutSessionDto<StatusEnum> = Omit<CheckoutSessionDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>, 'providerFields' | 'uri'> & {
|
|
30
|
+
uri: string;
|
|
31
|
+
stripeFields: stripe__default.Checkout.Session;
|
|
90
32
|
};
|
|
91
33
|
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;
|
|
34
|
+
CheckoutSessionMapper: StripeCheckoutSessionDto<StatusEnum>;
|
|
35
|
+
CreateCheckoutSessionMapper: StripeCreateCheckoutSessionDto<StatusEnum>;
|
|
36
|
+
UpdateCheckoutSessionMapper: StripeUpdateCheckoutSessionDto<StatusEnum>;
|
|
37
|
+
};
|
|
38
|
+
type StripeCreatePaymentLinkDto<StatusEnum> = Omit<CreatePaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>, 'providerFields'> & {
|
|
39
|
+
stripeFields: stripe__default.PaymentLinkCreateParams;
|
|
40
|
+
};
|
|
41
|
+
type StripeUpdatePaymentLinkDto<StatusEnum> = Omit<UpdatePaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>, 'providerFields'> & {
|
|
42
|
+
stripeFields?: stripe__default.PaymentLinkUpdateParams;
|
|
43
|
+
};
|
|
44
|
+
type StripePaymentLinkDto<StatusEnum> = Omit<PaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum>, 'providerFields'> & {
|
|
45
|
+
stripeFields: stripe__default.PaymentLink;
|
|
121
46
|
};
|
|
122
47
|
type StripePaymentLinkDtos<StatusEnum> = {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
48
|
+
PaymentLinkMapper: StripePaymentLinkDto<StatusEnum>;
|
|
49
|
+
CreatePaymentLinkMapper: StripeCreatePaymentLinkDto<StatusEnum>;
|
|
50
|
+
UpdatePaymentLinkMapper: StripeUpdatePaymentLinkDto<StatusEnum>;
|
|
126
51
|
};
|
|
127
52
|
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;
|
|
53
|
+
type StripeCreatePlanDto = Omit<CreatePlanDto<typeof PlanCadenceEnum, typeof CurrencyEnum, typeof BillingProviderEnum>, 'providerFields'> & {
|
|
54
|
+
stripeFields: Omit<stripe__default.PlanCreateParams, PlanOmissions>;
|
|
55
|
+
};
|
|
56
|
+
type StripeUpdatePlanDto = Omit<UpdatePlanDto<typeof PlanCadenceEnum, typeof CurrencyEnum, typeof BillingProviderEnum>, 'providerFields'> & {
|
|
57
|
+
stripeFields?: Omit<stripe__default.PlanUpdateParams, PlanOmissions>;
|
|
58
|
+
};
|
|
59
|
+
type StripePlanDto = Omit<PlanDto<typeof PlanCadenceEnum, typeof CurrencyEnum, typeof BillingProviderEnum>, 'providerFields'> & {
|
|
60
|
+
stripeFields: stripe__default.Plan;
|
|
157
61
|
};
|
|
158
62
|
type StripePlanDtos = {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
63
|
+
PlanMapper: StripePlanDto;
|
|
64
|
+
CreatePlanMapper: StripeCreatePlanDto;
|
|
65
|
+
UpdatePlanMapper: StripeUpdatePlanDto;
|
|
162
66
|
};
|
|
163
67
|
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;
|
|
68
|
+
type StripeCreateSubscriptionDto<PartyType> = Omit<CreateSubscriptionDto<PartyType, typeof BillingProviderEnum>, 'providerFields'> & {
|
|
69
|
+
stripeFields: Omit<stripe__default.SubscriptionCreateParams, SubscriptionOmissions>;
|
|
70
|
+
};
|
|
71
|
+
type StripeUpdateSubscriptionDto<PartyType> = Omit<UpdateSubscriptionDto<PartyType, typeof BillingProviderEnum>, 'providerFields'> & {
|
|
72
|
+
stripeFields?: Omit<stripe__default.SubscriptionUpdateParams, SubscriptionOmissions>;
|
|
73
|
+
};
|
|
74
|
+
type StripeSubscriptionDto<PartyType> = Omit<SubscriptionDto<PartyType, typeof BillingProviderEnum>, 'providerFields'> & {
|
|
75
|
+
stripeFields: stripe__default.Subscription;
|
|
187
76
|
};
|
|
188
77
|
type StripeSubscriptionDtos<PartyType> = {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
78
|
+
SubscriptionMapper: StripeSubscriptionDto<PartyType>;
|
|
79
|
+
CreateSubscriptionMapper: StripeCreateSubscriptionDto<PartyType>;
|
|
80
|
+
UpdateSubscriptionMapper: StripeUpdateSubscriptionDto<PartyType>;
|
|
192
81
|
};
|
|
193
82
|
|
|
194
83
|
type StripeBillingPortalEntity = BillingPortalDto & {
|
|
195
|
-
|
|
84
|
+
providerFields: stripe__default.BillingPortal.Session;
|
|
196
85
|
};
|
|
197
86
|
type StripeBillingPortalEntities = {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
87
|
+
BillingPortalMapper: StripeBillingPortalEntity;
|
|
88
|
+
CreateBillingPortalMapper: StripeBillingPortalEntity;
|
|
89
|
+
UpdateBillingPortalMapper: StripeBillingPortalEntity;
|
|
201
90
|
};
|
|
202
|
-
type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<
|
|
203
|
-
|
|
204
|
-
typeof CurrencyEnum,
|
|
205
|
-
StatusEnum
|
|
206
|
-
> & {
|
|
207
|
-
providerFields: stripe__default.Checkout.Session;
|
|
91
|
+
type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum> & {
|
|
92
|
+
providerFields: stripe__default.Checkout.Session;
|
|
208
93
|
};
|
|
209
94
|
type StripeCheckoutSessionEntities<StatusEnum> = {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
95
|
+
CheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
96
|
+
CreateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
97
|
+
UpdateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
213
98
|
};
|
|
214
|
-
type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<
|
|
215
|
-
|
|
216
|
-
typeof CurrencyEnum,
|
|
217
|
-
StatusEnum
|
|
218
|
-
> & {
|
|
219
|
-
providerFields: stripe__default.PaymentLink;
|
|
99
|
+
type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum> & {
|
|
100
|
+
providerFields: stripe__default.PaymentLink;
|
|
220
101
|
};
|
|
221
102
|
type StripePaymentLinkEntities<StatusEnum> = {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
103
|
+
PaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
104
|
+
CreatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
105
|
+
UpdatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
225
106
|
};
|
|
226
|
-
type StripePlanEntity = PlanDto<
|
|
227
|
-
|
|
228
|
-
typeof CurrencyEnum,
|
|
229
|
-
typeof BillingProviderEnum
|
|
230
|
-
> & {
|
|
231
|
-
providerFields: stripe__default.Plan;
|
|
107
|
+
type StripePlanEntity = PlanDto<typeof PlanCadenceEnum, typeof CurrencyEnum, typeof BillingProviderEnum> & {
|
|
108
|
+
providerFields: stripe__default.Plan;
|
|
232
109
|
};
|
|
233
110
|
type StripePlanEntities = {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
111
|
+
PlanMapper: StripePlanEntity;
|
|
112
|
+
CreatePlanMapper: StripePlanEntity;
|
|
113
|
+
UpdatePlanMapper: StripePlanEntity;
|
|
237
114
|
};
|
|
238
|
-
type StripeSubscriptionEntity<PartyType> = SubscriptionDto<
|
|
239
|
-
|
|
240
|
-
typeof BillingProviderEnum
|
|
241
|
-
> & {
|
|
242
|
-
providerFields: stripe__default.Subscription;
|
|
115
|
+
type StripeSubscriptionEntity<PartyType> = SubscriptionDto<PartyType, typeof BillingProviderEnum> & {
|
|
116
|
+
providerFields: stripe__default.Subscription;
|
|
243
117
|
};
|
|
244
118
|
type StripeSubscriptionEntities<PartyType> = {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
119
|
+
SubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
120
|
+
CreateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
121
|
+
UpdateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
248
122
|
};
|
|
249
123
|
|
|
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
|
-
};
|
|
124
|
+
type StripeBillingPortalMappers<Entities extends StripeBillingPortalEntities, Dto extends StripeBillingPortalDtos> = {
|
|
125
|
+
BillingPortalMapper: {
|
|
126
|
+
toDto: (entity: Entities['BillingPortalMapper']) => Promise<Dto['BillingPortalMapper']>;
|
|
127
|
+
};
|
|
128
|
+
CreateBillingPortalMapper: {
|
|
129
|
+
toEntity: (dto: Dto['CreateBillingPortalMapper'], em: EntityManager, stripeSession: stripe__default.BillingPortal.Session, ...args: unknown[]) => Promise<Entities['CreateBillingPortalMapper']>;
|
|
130
|
+
};
|
|
131
|
+
UpdateBillingPortalMapper: {
|
|
132
|
+
toEntity: (dto: Dto['UpdateBillingPortalMapper'], em: EntityManager, stripeSession: stripe__default.BillingPortal.Session, ...args: unknown[]) => Promise<Entities['UpdateBillingPortalMapper']>;
|
|
133
|
+
};
|
|
275
134
|
};
|
|
276
135
|
|
|
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
|
-
};
|
|
136
|
+
type StripeCheckoutSessionMappers<StatusEnum, Entities extends StripeCheckoutSessionEntities<StatusEnum>, Dto extends StripeCheckoutSessionDtos<StatusEnum>> = {
|
|
137
|
+
CheckoutSessionMapper: {
|
|
138
|
+
toDto: (entity: Entities['CheckoutSessionMapper']) => Promise<Dto['CheckoutSessionMapper']>;
|
|
139
|
+
};
|
|
140
|
+
CreateCheckoutSessionMapper: {
|
|
141
|
+
toEntity: (dto: Dto['CreateCheckoutSessionMapper'], em: EntityManager, stripeSession: stripe__default.Checkout.Session, ...args: unknown[]) => Promise<Entities['CreateCheckoutSessionMapper']>;
|
|
142
|
+
};
|
|
143
|
+
UpdateCheckoutSessionMapper: {
|
|
144
|
+
toEntity: (dto: Dto['UpdateCheckoutSessionMapper'], em: EntityManager, stripeSession: stripe__default.Checkout.Session, ...args: unknown[]) => Promise<Entities['UpdateCheckoutSessionMapper']>;
|
|
145
|
+
};
|
|
303
146
|
};
|
|
304
147
|
|
|
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
|
-
};
|
|
148
|
+
type StripePaymentLinkMappers<StatusEnum, Entities extends StripePaymentLinkEntities<StatusEnum>, Dto extends StripePaymentLinkDtos<StatusEnum>> = {
|
|
149
|
+
PaymentLinkMapper: {
|
|
150
|
+
toDto: (entity: Entities['PaymentLinkMapper']) => Promise<Dto['PaymentLinkMapper']>;
|
|
151
|
+
};
|
|
152
|
+
CreatePaymentLinkMapper: {
|
|
153
|
+
toEntity: (dto: Dto['CreatePaymentLinkMapper'], em: EntityManager, stripePaymentLink: stripe__default.PaymentLink, ...args: unknown[]) => Promise<Entities['CreatePaymentLinkMapper']>;
|
|
154
|
+
};
|
|
155
|
+
UpdatePaymentLinkMapper: {
|
|
156
|
+
toEntity: (dto: Dto['UpdatePaymentLinkMapper'], em: EntityManager, stripePaymentLink: stripe__default.PaymentLink, ...args: unknown[]) => Promise<Entities['UpdatePaymentLinkMapper']>;
|
|
157
|
+
};
|
|
331
158
|
};
|
|
332
159
|
|
|
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
|
-
};
|
|
160
|
+
type StripePlanMappers<Entities extends StripePlanEntities, Dto extends StripePlanDtos> = {
|
|
161
|
+
PlanMapper: {
|
|
162
|
+
toDto: (entity: Entities['PlanMapper']) => Promise<Dto['PlanMapper']>;
|
|
163
|
+
};
|
|
164
|
+
CreatePlanMapper: {
|
|
165
|
+
toEntity: (dto: Dto['CreatePlanMapper'], em: EntityManager, stripePlan: stripe__default.Plan, ...args: unknown[]) => Promise<Entities['CreatePlanMapper']>;
|
|
166
|
+
};
|
|
167
|
+
UpdatePlanMapper: {
|
|
168
|
+
toEntity: (dto: Dto['UpdatePlanMapper'], em: EntityManager, stripePlan: stripe__default.Plan, ...args: unknown[]) => Promise<Entities['UpdatePlanMapper']>;
|
|
169
|
+
};
|
|
356
170
|
};
|
|
357
171
|
|
|
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
|
-
};
|
|
172
|
+
type StripeSubscriptionMappers<PartyType, Entities extends StripeSubscriptionEntities<PartyType>, Dto extends StripeSubscriptionDtos<PartyType>> = {
|
|
173
|
+
SubscriptionMapper: {
|
|
174
|
+
toDto: (entity: Entities['SubscriptionMapper']) => Promise<Dto['SubscriptionMapper']>;
|
|
175
|
+
};
|
|
176
|
+
CreateSubscriptionMapper: {
|
|
177
|
+
toEntity: (dto: Dto['CreateSubscriptionMapper'], em: EntityManager, stripeSubscription: stripe__default.Subscription, ...args: unknown[]) => Promise<Entities['CreateSubscriptionMapper']>;
|
|
178
|
+
};
|
|
179
|
+
UpdateSubscriptionMapper: {
|
|
180
|
+
toEntity: (dto: Dto['UpdateSubscriptionMapper'], em: EntityManager, stripeSubscription: stripe__default.Subscription, ...args: unknown[]) => Promise<Entities['UpdateSubscriptionMapper']>;
|
|
181
|
+
};
|
|
384
182
|
};
|
|
385
183
|
|
|
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
|
-
};
|
|
184
|
+
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 };
|