@forklaunch/implementation-billing-base 0.5.8 → 0.6.0

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.
@@ -0,0 +1,326 @@
1
+ import {
2
+ BillingPortalDto,
3
+ CreateBillingPortalDto,
4
+ UpdateBillingPortalDto,
5
+ CheckoutSessionDto,
6
+ CreateCheckoutSessionDto,
7
+ UpdateCheckoutSessionDto,
8
+ PaymentLinkDto,
9
+ CreatePaymentLinkDto,
10
+ UpdatePaymentLinkDto,
11
+ PlanDto,
12
+ CreatePlanDto,
13
+ UpdatePlanDto,
14
+ SubscriptionDto,
15
+ CreateSubscriptionDto,
16
+ UpdateSubscriptionDto
17
+ } from '@forklaunch/interfaces-billing/types';
18
+ import { EntityManager } from '@mikro-orm/core';
19
+
20
+ type BaseBillingDtos$1 = {
21
+ BillingPortalMapper: BillingPortalDto;
22
+ CreateBillingPortalMapper: CreateBillingPortalDto;
23
+ UpdateBillingPortalMapper: UpdateBillingPortalDto;
24
+ };
25
+ type BaseCheckoutSessionDtos<PaymentMethodEnum, CurrencyEnum, StatusEnum> = {
26
+ CheckoutSessionMapper: CheckoutSessionDto<
27
+ PaymentMethodEnum,
28
+ CurrencyEnum,
29
+ StatusEnum
30
+ >;
31
+ CreateCheckoutSessionMapper: CreateCheckoutSessionDto<
32
+ PaymentMethodEnum,
33
+ CurrencyEnum,
34
+ StatusEnum
35
+ >;
36
+ UpdateCheckoutSessionMapper: UpdateCheckoutSessionDto<
37
+ PaymentMethodEnum,
38
+ CurrencyEnum,
39
+ StatusEnum
40
+ >;
41
+ };
42
+ type BasePaymentLinkDtos<PaymentMethodEnum, CurrencyEnum, StatusEnum> = {
43
+ PaymentLinkMapper: PaymentLinkDto<
44
+ PaymentMethodEnum,
45
+ CurrencyEnum,
46
+ StatusEnum
47
+ >;
48
+ CreatePaymentLinkMapper: CreatePaymentLinkDto<
49
+ PaymentMethodEnum,
50
+ CurrencyEnum,
51
+ StatusEnum
52
+ >;
53
+ UpdatePaymentLinkMapper: UpdatePaymentLinkDto<
54
+ PaymentMethodEnum,
55
+ CurrencyEnum,
56
+ StatusEnum
57
+ >;
58
+ };
59
+ type BasePlanDtos<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum> = {
60
+ PlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
61
+ CreatePlanMapper: CreatePlanDto<
62
+ PlanCadenceEnum,
63
+ CurrencyEnum,
64
+ BillingProviderEnum
65
+ >;
66
+ UpdatePlanMapper: UpdatePlanDto<
67
+ PlanCadenceEnum,
68
+ CurrencyEnum,
69
+ BillingProviderEnum
70
+ >;
71
+ };
72
+ type BaseSubscriptionDtos<PartyType, BillingProviderType> = {
73
+ SubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
74
+ CreateSubscriptionMapper: CreateSubscriptionDto<
75
+ PartyType,
76
+ BillingProviderType
77
+ >;
78
+ UpdateSubscriptionMapper: UpdateSubscriptionDto<
79
+ PartyType,
80
+ BillingProviderType
81
+ >;
82
+ };
83
+
84
+ type BaseBillingEntities$1 = {
85
+ BillingPortalMapper: BillingPortalDto;
86
+ CreateBillingPortalMapper: BillingPortalDto;
87
+ UpdateBillingPortalMapper: BillingPortalDto;
88
+ };
89
+ type BaseCheckoutSessionEntities<PaymentMethodEnum, CurrencyEnum, StatusEnum> =
90
+ {
91
+ CheckoutSessionMapper: CheckoutSessionDto<
92
+ PaymentMethodEnum,
93
+ CurrencyEnum,
94
+ StatusEnum
95
+ >;
96
+ CreateCheckoutSessionMapper: CheckoutSessionDto<
97
+ PaymentMethodEnum,
98
+ CurrencyEnum,
99
+ StatusEnum
100
+ >;
101
+ UpdateCheckoutSessionMapper: CheckoutSessionDto<
102
+ PaymentMethodEnum,
103
+ CurrencyEnum,
104
+ StatusEnum
105
+ >;
106
+ };
107
+ type BasePaymentLinkEntities<PaymentMethodEnum, CurrencyEnum, StatusEnum> = {
108
+ PaymentLinkMapper: PaymentLinkDto<
109
+ PaymentMethodEnum,
110
+ CurrencyEnum,
111
+ StatusEnum
112
+ >;
113
+ CreatePaymentLinkMapper: PaymentLinkDto<
114
+ PaymentMethodEnum,
115
+ CurrencyEnum,
116
+ StatusEnum
117
+ >;
118
+ UpdatePaymentLinkMapper: PaymentLinkDto<
119
+ PaymentMethodEnum,
120
+ CurrencyEnum,
121
+ StatusEnum
122
+ >;
123
+ };
124
+ type BasePlanEntities<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum> = {
125
+ PlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
126
+ CreatePlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
127
+ UpdatePlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
128
+ };
129
+ type BaseSubscriptionEntities<PartyType, BillingProviderType> = {
130
+ SubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
131
+ CreateSubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
132
+ UpdateSubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
133
+ };
134
+
135
+ type BaseBillingDtos = {
136
+ BillingPortalMapper: BillingPortalDto;
137
+ CreateBillingPortalMapper: CreateBillingPortalDto;
138
+ UpdateBillingPortalMapper: UpdateBillingPortalDto;
139
+ };
140
+
141
+ type BaseBillingEntities = {
142
+ BillingPortalMapper: BillingPortalDto;
143
+ CreateBillingPortalMapper: BillingPortalDto;
144
+ UpdateBillingPortalMapper: BillingPortalDto;
145
+ };
146
+
147
+ type BillingPortalMappers<
148
+ MapperEntities extends BaseBillingEntities,
149
+ MapperDomains extends BaseBillingDtos
150
+ > = {
151
+ BillingPortalMapper: {
152
+ toDto: (
153
+ entity: MapperEntities['BillingPortalMapper']
154
+ ) => Promise<MapperDomains['BillingPortalMapper']>;
155
+ };
156
+ CreateBillingPortalMapper: {
157
+ toEntity: (
158
+ dto: MapperDomains['CreateBillingPortalMapper'],
159
+ em: EntityManager,
160
+ ...args: unknown[]
161
+ ) => Promise<MapperEntities['CreateBillingPortalMapper']>;
162
+ };
163
+ UpdateBillingPortalMapper: {
164
+ toEntity: (
165
+ dto: MapperDomains['UpdateBillingPortalMapper'],
166
+ em: EntityManager,
167
+ ...args: unknown[]
168
+ ) => Promise<MapperEntities['UpdateBillingPortalMapper']>;
169
+ };
170
+ };
171
+
172
+ type CheckoutSessionMappers<
173
+ PaymentMethodEnum,
174
+ CurrencyEnum,
175
+ StatusEnum,
176
+ MapperEntities extends BaseCheckoutSessionEntities<
177
+ PaymentMethodEnum,
178
+ CurrencyEnum,
179
+ StatusEnum
180
+ >,
181
+ MapperDomains extends BaseCheckoutSessionDtos<
182
+ PaymentMethodEnum,
183
+ CurrencyEnum,
184
+ StatusEnum
185
+ >
186
+ > = {
187
+ CheckoutSessionMapper: {
188
+ toDto: (
189
+ entity: MapperEntities['CheckoutSessionMapper']
190
+ ) => Promise<MapperDomains['CheckoutSessionMapper']>;
191
+ };
192
+ CreateCheckoutSessionMapper: {
193
+ toEntity: (
194
+ dto: MapperDomains['CreateCheckoutSessionMapper'],
195
+ em: EntityManager,
196
+ ...args: unknown[]
197
+ ) => Promise<MapperEntities['CreateCheckoutSessionMapper']>;
198
+ };
199
+ UpdateCheckoutSessionMapper: {
200
+ toEntity: (
201
+ dto: MapperDomains['UpdateCheckoutSessionMapper'],
202
+ em: EntityManager,
203
+ ...args: unknown[]
204
+ ) => Promise<MapperEntities['UpdateCheckoutSessionMapper']>;
205
+ };
206
+ };
207
+
208
+ type PaymentLinkMappers<
209
+ PaymentMethodEnum,
210
+ CurrencyEnum,
211
+ StatusEnum,
212
+ MapperEntities extends BasePaymentLinkEntities<
213
+ PaymentMethodEnum,
214
+ CurrencyEnum,
215
+ StatusEnum
216
+ >,
217
+ MapperDomains extends BasePaymentLinkDtos<
218
+ PaymentMethodEnum,
219
+ CurrencyEnum,
220
+ StatusEnum
221
+ >
222
+ > = {
223
+ PaymentLinkMapper: {
224
+ toDto: (
225
+ entity: MapperEntities['PaymentLinkMapper']
226
+ ) => Promise<MapperDomains['PaymentLinkMapper']>;
227
+ };
228
+ CreatePaymentLinkMapper: {
229
+ toEntity: (
230
+ dto: MapperDomains['CreatePaymentLinkMapper'],
231
+ em: EntityManager,
232
+ ...args: unknown[]
233
+ ) => Promise<MapperEntities['CreatePaymentLinkMapper']>;
234
+ };
235
+ UpdatePaymentLinkMapper: {
236
+ toEntity: (
237
+ dto: MapperDomains['UpdatePaymentLinkMapper'],
238
+ em: EntityManager,
239
+ ...args: unknown[]
240
+ ) => Promise<MapperEntities['UpdatePaymentLinkMapper']>;
241
+ };
242
+ };
243
+
244
+ type PlanMappers<
245
+ PlanCadenceEnum,
246
+ CurrencyEnum,
247
+ BillingProviderEnum,
248
+ MapperEntities extends BasePlanEntities<
249
+ PlanCadenceEnum,
250
+ CurrencyEnum,
251
+ BillingProviderEnum
252
+ >,
253
+ MapperDomains extends BasePlanDtos<
254
+ PlanCadenceEnum,
255
+ CurrencyEnum,
256
+ BillingProviderEnum
257
+ >
258
+ > = {
259
+ PlanMapper: {
260
+ toDto: (
261
+ entity: MapperEntities['PlanMapper']
262
+ ) => Promise<MapperDomains['PlanMapper']>;
263
+ };
264
+ CreatePlanMapper: {
265
+ toEntity: (
266
+ dto: MapperDomains['CreatePlanMapper'],
267
+ em: EntityManager,
268
+ ...args: unknown[]
269
+ ) => Promise<MapperEntities['CreatePlanMapper']>;
270
+ };
271
+ UpdatePlanMapper: {
272
+ toEntity: (
273
+ dto: MapperDomains['UpdatePlanMapper'],
274
+ em: EntityManager,
275
+ ...args: unknown[]
276
+ ) => Promise<MapperEntities['UpdatePlanMapper']>;
277
+ };
278
+ };
279
+
280
+ type SubscriptionMappers<
281
+ PartyType,
282
+ BillingProviderType,
283
+ MapperEntities extends BaseSubscriptionEntities<
284
+ PartyType,
285
+ BillingProviderType
286
+ >,
287
+ MapperDomains extends BaseSubscriptionDtos<PartyType, BillingProviderType>
288
+ > = {
289
+ SubscriptionMapper: {
290
+ toDto: (
291
+ entity: MapperEntities['SubscriptionMapper']
292
+ ) => Promise<MapperDomains['SubscriptionMapper']>;
293
+ };
294
+ CreateSubscriptionMapper: {
295
+ toEntity: (
296
+ dto: MapperDomains['CreateSubscriptionMapper'],
297
+ em: EntityManager,
298
+ ...args: unknown[]
299
+ ) => Promise<MapperEntities['CreateSubscriptionMapper']>;
300
+ };
301
+ UpdateSubscriptionMapper: {
302
+ toEntity: (
303
+ dto: MapperDomains['UpdateSubscriptionMapper'],
304
+ em: EntityManager,
305
+ ...args: unknown[]
306
+ ) => Promise<MapperEntities['UpdateSubscriptionMapper']>;
307
+ };
308
+ };
309
+
310
+ export type {
311
+ BaseBillingDtos$1 as BaseBillingDtos,
312
+ BaseBillingEntities$1 as BaseBillingEntities,
313
+ BaseCheckoutSessionDtos,
314
+ BaseCheckoutSessionEntities,
315
+ BasePaymentLinkDtos,
316
+ BasePaymentLinkEntities,
317
+ BasePlanDtos,
318
+ BasePlanEntities,
319
+ BaseSubscriptionDtos,
320
+ BaseSubscriptionEntities,
321
+ BillingPortalMappers,
322
+ CheckoutSessionMappers,
323
+ PaymentLinkMappers,
324
+ PlanMappers,
325
+ SubscriptionMappers
326
+ };
@@ -0,0 +1,326 @@
1
+ import {
2
+ BillingPortalDto,
3
+ CreateBillingPortalDto,
4
+ UpdateBillingPortalDto,
5
+ CheckoutSessionDto,
6
+ CreateCheckoutSessionDto,
7
+ UpdateCheckoutSessionDto,
8
+ PaymentLinkDto,
9
+ CreatePaymentLinkDto,
10
+ UpdatePaymentLinkDto,
11
+ PlanDto,
12
+ CreatePlanDto,
13
+ UpdatePlanDto,
14
+ SubscriptionDto,
15
+ CreateSubscriptionDto,
16
+ UpdateSubscriptionDto
17
+ } from '@forklaunch/interfaces-billing/types';
18
+ import { EntityManager } from '@mikro-orm/core';
19
+
20
+ type BaseBillingDtos$1 = {
21
+ BillingPortalMapper: BillingPortalDto;
22
+ CreateBillingPortalMapper: CreateBillingPortalDto;
23
+ UpdateBillingPortalMapper: UpdateBillingPortalDto;
24
+ };
25
+ type BaseCheckoutSessionDtos<PaymentMethodEnum, CurrencyEnum, StatusEnum> = {
26
+ CheckoutSessionMapper: CheckoutSessionDto<
27
+ PaymentMethodEnum,
28
+ CurrencyEnum,
29
+ StatusEnum
30
+ >;
31
+ CreateCheckoutSessionMapper: CreateCheckoutSessionDto<
32
+ PaymentMethodEnum,
33
+ CurrencyEnum,
34
+ StatusEnum
35
+ >;
36
+ UpdateCheckoutSessionMapper: UpdateCheckoutSessionDto<
37
+ PaymentMethodEnum,
38
+ CurrencyEnum,
39
+ StatusEnum
40
+ >;
41
+ };
42
+ type BasePaymentLinkDtos<PaymentMethodEnum, CurrencyEnum, StatusEnum> = {
43
+ PaymentLinkMapper: PaymentLinkDto<
44
+ PaymentMethodEnum,
45
+ CurrencyEnum,
46
+ StatusEnum
47
+ >;
48
+ CreatePaymentLinkMapper: CreatePaymentLinkDto<
49
+ PaymentMethodEnum,
50
+ CurrencyEnum,
51
+ StatusEnum
52
+ >;
53
+ UpdatePaymentLinkMapper: UpdatePaymentLinkDto<
54
+ PaymentMethodEnum,
55
+ CurrencyEnum,
56
+ StatusEnum
57
+ >;
58
+ };
59
+ type BasePlanDtos<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum> = {
60
+ PlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
61
+ CreatePlanMapper: CreatePlanDto<
62
+ PlanCadenceEnum,
63
+ CurrencyEnum,
64
+ BillingProviderEnum
65
+ >;
66
+ UpdatePlanMapper: UpdatePlanDto<
67
+ PlanCadenceEnum,
68
+ CurrencyEnum,
69
+ BillingProviderEnum
70
+ >;
71
+ };
72
+ type BaseSubscriptionDtos<PartyType, BillingProviderType> = {
73
+ SubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
74
+ CreateSubscriptionMapper: CreateSubscriptionDto<
75
+ PartyType,
76
+ BillingProviderType
77
+ >;
78
+ UpdateSubscriptionMapper: UpdateSubscriptionDto<
79
+ PartyType,
80
+ BillingProviderType
81
+ >;
82
+ };
83
+
84
+ type BaseBillingEntities$1 = {
85
+ BillingPortalMapper: BillingPortalDto;
86
+ CreateBillingPortalMapper: BillingPortalDto;
87
+ UpdateBillingPortalMapper: BillingPortalDto;
88
+ };
89
+ type BaseCheckoutSessionEntities<PaymentMethodEnum, CurrencyEnum, StatusEnum> =
90
+ {
91
+ CheckoutSessionMapper: CheckoutSessionDto<
92
+ PaymentMethodEnum,
93
+ CurrencyEnum,
94
+ StatusEnum
95
+ >;
96
+ CreateCheckoutSessionMapper: CheckoutSessionDto<
97
+ PaymentMethodEnum,
98
+ CurrencyEnum,
99
+ StatusEnum
100
+ >;
101
+ UpdateCheckoutSessionMapper: CheckoutSessionDto<
102
+ PaymentMethodEnum,
103
+ CurrencyEnum,
104
+ StatusEnum
105
+ >;
106
+ };
107
+ type BasePaymentLinkEntities<PaymentMethodEnum, CurrencyEnum, StatusEnum> = {
108
+ PaymentLinkMapper: PaymentLinkDto<
109
+ PaymentMethodEnum,
110
+ CurrencyEnum,
111
+ StatusEnum
112
+ >;
113
+ CreatePaymentLinkMapper: PaymentLinkDto<
114
+ PaymentMethodEnum,
115
+ CurrencyEnum,
116
+ StatusEnum
117
+ >;
118
+ UpdatePaymentLinkMapper: PaymentLinkDto<
119
+ PaymentMethodEnum,
120
+ CurrencyEnum,
121
+ StatusEnum
122
+ >;
123
+ };
124
+ type BasePlanEntities<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum> = {
125
+ PlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
126
+ CreatePlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
127
+ UpdatePlanMapper: PlanDto<PlanCadenceEnum, CurrencyEnum, BillingProviderEnum>;
128
+ };
129
+ type BaseSubscriptionEntities<PartyType, BillingProviderType> = {
130
+ SubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
131
+ CreateSubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
132
+ UpdateSubscriptionMapper: SubscriptionDto<PartyType, BillingProviderType>;
133
+ };
134
+
135
+ type BaseBillingDtos = {
136
+ BillingPortalMapper: BillingPortalDto;
137
+ CreateBillingPortalMapper: CreateBillingPortalDto;
138
+ UpdateBillingPortalMapper: UpdateBillingPortalDto;
139
+ };
140
+
141
+ type BaseBillingEntities = {
142
+ BillingPortalMapper: BillingPortalDto;
143
+ CreateBillingPortalMapper: BillingPortalDto;
144
+ UpdateBillingPortalMapper: BillingPortalDto;
145
+ };
146
+
147
+ type BillingPortalMappers<
148
+ MapperEntities extends BaseBillingEntities,
149
+ MapperDomains extends BaseBillingDtos
150
+ > = {
151
+ BillingPortalMapper: {
152
+ toDto: (
153
+ entity: MapperEntities['BillingPortalMapper']
154
+ ) => Promise<MapperDomains['BillingPortalMapper']>;
155
+ };
156
+ CreateBillingPortalMapper: {
157
+ toEntity: (
158
+ dto: MapperDomains['CreateBillingPortalMapper'],
159
+ em: EntityManager,
160
+ ...args: unknown[]
161
+ ) => Promise<MapperEntities['CreateBillingPortalMapper']>;
162
+ };
163
+ UpdateBillingPortalMapper: {
164
+ toEntity: (
165
+ dto: MapperDomains['UpdateBillingPortalMapper'],
166
+ em: EntityManager,
167
+ ...args: unknown[]
168
+ ) => Promise<MapperEntities['UpdateBillingPortalMapper']>;
169
+ };
170
+ };
171
+
172
+ type CheckoutSessionMappers<
173
+ PaymentMethodEnum,
174
+ CurrencyEnum,
175
+ StatusEnum,
176
+ MapperEntities extends BaseCheckoutSessionEntities<
177
+ PaymentMethodEnum,
178
+ CurrencyEnum,
179
+ StatusEnum
180
+ >,
181
+ MapperDomains extends BaseCheckoutSessionDtos<
182
+ PaymentMethodEnum,
183
+ CurrencyEnum,
184
+ StatusEnum
185
+ >
186
+ > = {
187
+ CheckoutSessionMapper: {
188
+ toDto: (
189
+ entity: MapperEntities['CheckoutSessionMapper']
190
+ ) => Promise<MapperDomains['CheckoutSessionMapper']>;
191
+ };
192
+ CreateCheckoutSessionMapper: {
193
+ toEntity: (
194
+ dto: MapperDomains['CreateCheckoutSessionMapper'],
195
+ em: EntityManager,
196
+ ...args: unknown[]
197
+ ) => Promise<MapperEntities['CreateCheckoutSessionMapper']>;
198
+ };
199
+ UpdateCheckoutSessionMapper: {
200
+ toEntity: (
201
+ dto: MapperDomains['UpdateCheckoutSessionMapper'],
202
+ em: EntityManager,
203
+ ...args: unknown[]
204
+ ) => Promise<MapperEntities['UpdateCheckoutSessionMapper']>;
205
+ };
206
+ };
207
+
208
+ type PaymentLinkMappers<
209
+ PaymentMethodEnum,
210
+ CurrencyEnum,
211
+ StatusEnum,
212
+ MapperEntities extends BasePaymentLinkEntities<
213
+ PaymentMethodEnum,
214
+ CurrencyEnum,
215
+ StatusEnum
216
+ >,
217
+ MapperDomains extends BasePaymentLinkDtos<
218
+ PaymentMethodEnum,
219
+ CurrencyEnum,
220
+ StatusEnum
221
+ >
222
+ > = {
223
+ PaymentLinkMapper: {
224
+ toDto: (
225
+ entity: MapperEntities['PaymentLinkMapper']
226
+ ) => Promise<MapperDomains['PaymentLinkMapper']>;
227
+ };
228
+ CreatePaymentLinkMapper: {
229
+ toEntity: (
230
+ dto: MapperDomains['CreatePaymentLinkMapper'],
231
+ em: EntityManager,
232
+ ...args: unknown[]
233
+ ) => Promise<MapperEntities['CreatePaymentLinkMapper']>;
234
+ };
235
+ UpdatePaymentLinkMapper: {
236
+ toEntity: (
237
+ dto: MapperDomains['UpdatePaymentLinkMapper'],
238
+ em: EntityManager,
239
+ ...args: unknown[]
240
+ ) => Promise<MapperEntities['UpdatePaymentLinkMapper']>;
241
+ };
242
+ };
243
+
244
+ type PlanMappers<
245
+ PlanCadenceEnum,
246
+ CurrencyEnum,
247
+ BillingProviderEnum,
248
+ MapperEntities extends BasePlanEntities<
249
+ PlanCadenceEnum,
250
+ CurrencyEnum,
251
+ BillingProviderEnum
252
+ >,
253
+ MapperDomains extends BasePlanDtos<
254
+ PlanCadenceEnum,
255
+ CurrencyEnum,
256
+ BillingProviderEnum
257
+ >
258
+ > = {
259
+ PlanMapper: {
260
+ toDto: (
261
+ entity: MapperEntities['PlanMapper']
262
+ ) => Promise<MapperDomains['PlanMapper']>;
263
+ };
264
+ CreatePlanMapper: {
265
+ toEntity: (
266
+ dto: MapperDomains['CreatePlanMapper'],
267
+ em: EntityManager,
268
+ ...args: unknown[]
269
+ ) => Promise<MapperEntities['CreatePlanMapper']>;
270
+ };
271
+ UpdatePlanMapper: {
272
+ toEntity: (
273
+ dto: MapperDomains['UpdatePlanMapper'],
274
+ em: EntityManager,
275
+ ...args: unknown[]
276
+ ) => Promise<MapperEntities['UpdatePlanMapper']>;
277
+ };
278
+ };
279
+
280
+ type SubscriptionMappers<
281
+ PartyType,
282
+ BillingProviderType,
283
+ MapperEntities extends BaseSubscriptionEntities<
284
+ PartyType,
285
+ BillingProviderType
286
+ >,
287
+ MapperDomains extends BaseSubscriptionDtos<PartyType, BillingProviderType>
288
+ > = {
289
+ SubscriptionMapper: {
290
+ toDto: (
291
+ entity: MapperEntities['SubscriptionMapper']
292
+ ) => Promise<MapperDomains['SubscriptionMapper']>;
293
+ };
294
+ CreateSubscriptionMapper: {
295
+ toEntity: (
296
+ dto: MapperDomains['CreateSubscriptionMapper'],
297
+ em: EntityManager,
298
+ ...args: unknown[]
299
+ ) => Promise<MapperEntities['CreateSubscriptionMapper']>;
300
+ };
301
+ UpdateSubscriptionMapper: {
302
+ toEntity: (
303
+ dto: MapperDomains['UpdateSubscriptionMapper'],
304
+ em: EntityManager,
305
+ ...args: unknown[]
306
+ ) => Promise<MapperEntities['UpdateSubscriptionMapper']>;
307
+ };
308
+ };
309
+
310
+ export type {
311
+ BaseBillingDtos$1 as BaseBillingDtos,
312
+ BaseBillingEntities$1 as BaseBillingEntities,
313
+ BaseCheckoutSessionDtos,
314
+ BaseCheckoutSessionEntities,
315
+ BasePaymentLinkDtos,
316
+ BasePaymentLinkEntities,
317
+ BasePlanDtos,
318
+ BasePlanEntities,
319
+ BaseSubscriptionDtos,
320
+ BaseSubscriptionEntities,
321
+ BillingPortalMappers,
322
+ CheckoutSessionMappers,
323
+ PaymentLinkMappers,
324
+ PlanMappers,
325
+ SubscriptionMappers
326
+ };
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if ((from && typeof from === 'object') || typeof from === 'function') {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, {
11
+ get: () => from[key],
12
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
13
+ });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) =>
18
+ __copyProps(__defProp({}, '__esModule', { value: true }), mod);
19
+
20
+ // domain/types/index.ts
21
+ var types_exports = {};
22
+ module.exports = __toCommonJS(types_exports);
File without changes
@@ -0,0 +1,28 @@
1
+ import { EntityManager } from '@mikro-orm/core';
2
+ import { BaseBillingDtos } from '../../dist/domain/types/baseBillingDto.types';
3
+ import { BaseBillingEntities } from '../../dist/domain/types/baseBillingEntity.types';
4
+
5
+ export type BillingPortalMappers<
6
+ MapperEntities extends BaseBillingEntities,
7
+ MapperDomains extends BaseBillingDtos
8
+ > = {
9
+ BillingPortalMapper: {
10
+ toDto: (
11
+ entity: MapperEntities['BillingPortalMapper']
12
+ ) => Promise<MapperDomains['BillingPortalMapper']>;
13
+ };
14
+ CreateBillingPortalMapper: {
15
+ toEntity: (
16
+ dto: MapperDomains['CreateBillingPortalMapper'],
17
+ em: EntityManager,
18
+ ...args: unknown[]
19
+ ) => Promise<MapperEntities['CreateBillingPortalMapper']>;
20
+ };
21
+ UpdateBillingPortalMapper: {
22
+ toEntity: (
23
+ dto: MapperDomains['UpdateBillingPortalMapper'],
24
+ em: EntityManager,
25
+ ...args: unknown[]
26
+ ) => Promise<MapperEntities['UpdateBillingPortalMapper']>;
27
+ };
28
+ };