@forklaunch/implementation-billing-stripe 0.2.8 → 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 +318 -2909
- package/lib/domain/schemas/index.d.ts +318 -2909
- package/lib/domain/schemas/index.js +181 -257
- package/lib/domain/schemas/index.mjs +130 -131
- package/lib/domain/types/index.d.mts +144 -242
- package/lib/domain/types/index.d.ts +144 -242
- package/lib/domain/types/index.js +4 -8
- package/lib/eject/domain/types/billingPortal.mapper.types.ts +31 -0
- package/lib/eject/domain/types/checkoutSession.mapper.types.ts +32 -0
- package/lib/eject/domain/types/index.ts +5 -0
- package/lib/eject/domain/types/paymentLink.mapper.types.ts +32 -0
- package/lib/eject/domain/types/plan.mapper.types.ts +29 -0
- package/lib/eject/domain/types/subscription.mapper.types.ts +32 -0
- package/lib/eject/services/billingPortal.service.ts +49 -132
- package/lib/eject/services/checkoutSession.service.ts +47 -108
- package/lib/eject/services/paymentLink.service.ts +82 -136
- package/lib/eject/services/plan.service.ts +44 -105
- package/lib/eject/services/subscription.service.ts +74 -151
- package/lib/eject/services/webhook.service.ts +5 -12
- package/lib/services/index.d.mts +150 -711
- package/lib/services/index.d.ts +150 -711
- package/lib/services/index.js +285 -480
- package/lib/services/index.mjs +263 -456
- package/package.json +11 -11
|
@@ -1,280 +1,182 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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';
|
|
1
|
+
import { EntityManager } from '@mikro-orm/core';
|
|
2
|
+
import stripe__default from 'stripe';
|
|
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';
|
|
25
5
|
|
|
26
6
|
type BillingPortalOmissions = 'customer';
|
|
27
|
-
type StripeCreateBillingPortalDto = Omit<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
> & {
|
|
31
|
-
|
|
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
|
-
>;
|
|
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>;
|
|
44
12
|
};
|
|
45
13
|
type StripeBillingPortalDto = Omit<BillingPortalDto, 'providerFields'> & {
|
|
46
|
-
|
|
14
|
+
stripeFields: stripe__default.BillingPortal.Session;
|
|
47
15
|
};
|
|
48
16
|
type StripeBillingPortalDtos = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
type CheckoutSessionOmissions =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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;
|
|
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;
|
|
89
30
|
};
|
|
90
31
|
type StripeCheckoutSessionDtos<StatusEnum> = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
};
|
|
95
|
-
type StripeCreatePaymentLinkDto<StatusEnum> = Omit<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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;
|
|
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;
|
|
120
44
|
};
|
|
121
45
|
type StripePaymentLinkDtos<StatusEnum> = {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
46
|
+
PaymentLinkMapper: StripePaymentLinkDto<StatusEnum>;
|
|
47
|
+
CreatePaymentLinkMapper: StripeCreatePaymentLinkDto<StatusEnum>;
|
|
48
|
+
UpdatePaymentLinkMapper: StripeUpdatePaymentLinkDto<StatusEnum>;
|
|
125
49
|
};
|
|
126
50
|
type PlanOmissions = 'product' | 'interval' | 'currency';
|
|
127
|
-
type StripeCreatePlanDto = Omit<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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;
|
|
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;
|
|
156
59
|
};
|
|
157
60
|
type StripePlanDtos = {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
61
|
+
PlanMapper: StripePlanDto;
|
|
62
|
+
CreatePlanMapper: StripeCreatePlanDto;
|
|
63
|
+
UpdatePlanMapper: StripeUpdatePlanDto;
|
|
161
64
|
};
|
|
162
65
|
type SubscriptionOmissions = 'items' | 'customer';
|
|
163
|
-
type StripeCreateSubscriptionDto<PartyType> = Omit<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
> & {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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;
|
|
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;
|
|
186
74
|
};
|
|
187
75
|
type StripeSubscriptionDtos<PartyType> = {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
76
|
+
SubscriptionMapper: StripeSubscriptionDto<PartyType>;
|
|
77
|
+
CreateSubscriptionMapper: StripeCreateSubscriptionDto<PartyType>;
|
|
78
|
+
UpdateSubscriptionMapper: StripeUpdateSubscriptionDto<PartyType>;
|
|
191
79
|
};
|
|
192
80
|
|
|
193
81
|
type StripeBillingPortalEntity = BillingPortalDto & {
|
|
194
|
-
|
|
82
|
+
providerFields: stripe__default.BillingPortal.Session;
|
|
195
83
|
};
|
|
196
84
|
type StripeBillingPortalEntities = {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
85
|
+
BillingPortalMapper: StripeBillingPortalEntity;
|
|
86
|
+
CreateBillingPortalMapper: StripeBillingPortalEntity;
|
|
87
|
+
UpdateBillingPortalMapper: StripeBillingPortalEntity;
|
|
200
88
|
};
|
|
201
|
-
type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<
|
|
202
|
-
|
|
203
|
-
typeof CurrencyEnum,
|
|
204
|
-
StatusEnum
|
|
205
|
-
> & {
|
|
206
|
-
providerFields: Stripe__default.Checkout.Session;
|
|
89
|
+
type StripeCheckoutSessionEntity<StatusEnum> = CheckoutSessionDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum> & {
|
|
90
|
+
providerFields: stripe__default.Checkout.Session;
|
|
207
91
|
};
|
|
208
92
|
type StripeCheckoutSessionEntities<StatusEnum> = {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
93
|
+
CheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
94
|
+
CreateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
95
|
+
UpdateCheckoutSessionMapper: StripeCheckoutSessionEntity<StatusEnum>;
|
|
212
96
|
};
|
|
213
|
-
type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<
|
|
214
|
-
|
|
215
|
-
typeof CurrencyEnum,
|
|
216
|
-
StatusEnum
|
|
217
|
-
> & {
|
|
218
|
-
providerFields: Stripe__default.PaymentLink;
|
|
97
|
+
type StripePaymentLinkEntity<StatusEnum> = PaymentLinkDto<typeof PaymentMethodEnum, typeof CurrencyEnum, StatusEnum> & {
|
|
98
|
+
providerFields: stripe__default.PaymentLink;
|
|
219
99
|
};
|
|
220
100
|
type StripePaymentLinkEntities<StatusEnum> = {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
101
|
+
PaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
102
|
+
CreatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
103
|
+
UpdatePaymentLinkMapper: StripePaymentLinkEntity<StatusEnum>;
|
|
224
104
|
};
|
|
225
|
-
type StripePlanEntity = PlanDto<
|
|
226
|
-
|
|
227
|
-
typeof CurrencyEnum,
|
|
228
|
-
typeof BillingProviderEnum
|
|
229
|
-
> & {
|
|
230
|
-
providerFields: Stripe__default.Plan;
|
|
105
|
+
type StripePlanEntity = PlanDto<typeof PlanCadenceEnum, typeof CurrencyEnum, typeof BillingProviderEnum> & {
|
|
106
|
+
providerFields: stripe__default.Plan;
|
|
231
107
|
};
|
|
232
108
|
type StripePlanEntities = {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
109
|
+
PlanMapper: StripePlanEntity;
|
|
110
|
+
CreatePlanMapper: StripePlanEntity;
|
|
111
|
+
UpdatePlanMapper: StripePlanEntity;
|
|
236
112
|
};
|
|
237
|
-
type StripeSubscriptionEntity<PartyType> = SubscriptionDto<
|
|
238
|
-
|
|
239
|
-
typeof BillingProviderEnum
|
|
240
|
-
> & {
|
|
241
|
-
providerFields: Stripe__default.Subscription;
|
|
113
|
+
type StripeSubscriptionEntity<PartyType> = SubscriptionDto<PartyType, typeof BillingProviderEnum> & {
|
|
114
|
+
providerFields: stripe__default.Subscription;
|
|
242
115
|
};
|
|
243
116
|
type StripeSubscriptionEntities<PartyType> = {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
117
|
+
SubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
118
|
+
CreateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
119
|
+
UpdateSubscriptionMapper: StripeSubscriptionEntity<PartyType>;
|
|
120
|
+
};
|
|
121
|
+
|
|
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
|
+
};
|
|
132
|
+
};
|
|
133
|
+
|
|
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
|
+
};
|
|
247
144
|
};
|
|
248
145
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
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
|
|
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
|
+
};
|
|
280
156
|
};
|
|
157
|
+
|
|
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
|
+
};
|
|
168
|
+
};
|
|
169
|
+
|
|
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
|
+
};
|
|
180
|
+
};
|
|
181
|
+
|
|
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 };
|