@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,8 +1,8 @@
|
|
|
1
1
|
// domain/schemas/billingPortal.schema.ts
|
|
2
|
-
import { serviceSchemaResolver } from
|
|
2
|
+
import { serviceSchemaResolver } from "@forklaunch/internal";
|
|
3
3
|
|
|
4
4
|
// domain/schemas/typebox/billingPortal.schema.ts
|
|
5
|
-
import { date, optional, string, type } from
|
|
5
|
+
import { date, optional, string, type } from "@forklaunch/validator/typebox";
|
|
6
6
|
var CreateBillingPortalSchema = {
|
|
7
7
|
id: optional(string),
|
|
8
8
|
customerId: string,
|
|
@@ -32,12 +32,7 @@ var StripeBillingPortalServiceSchemas = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
// domain/schemas/zod/billingPortal.schema.ts
|
|
35
|
-
import {
|
|
36
|
-
date as date2,
|
|
37
|
-
optional as optional2,
|
|
38
|
-
string as string2,
|
|
39
|
-
type as type2
|
|
40
|
-
} from '@forklaunch/validator/zod';
|
|
35
|
+
import { date as date2, optional as optional2, string as string2, type as type2 } from "@forklaunch/validator/zod";
|
|
41
36
|
var CreateBillingPortalSchema2 = {
|
|
42
37
|
id: optional2(string2),
|
|
43
38
|
customerId: string2,
|
|
@@ -73,7 +68,7 @@ var StripeBillingPortalServiceSchemas3 = serviceSchemaResolver(
|
|
|
73
68
|
);
|
|
74
69
|
|
|
75
70
|
// domain/schemas/checkoutSession.schema.ts
|
|
76
|
-
import { serviceSchemaResolver as serviceSchemaResolver2 } from
|
|
71
|
+
import { serviceSchemaResolver as serviceSchemaResolver2 } from "@forklaunch/internal";
|
|
77
72
|
|
|
78
73
|
// domain/schemas/typebox/checkoutSession.schema.ts
|
|
79
74
|
import {
|
|
@@ -84,119 +79,119 @@ import {
|
|
|
84
79
|
string as string3,
|
|
85
80
|
type as type3,
|
|
86
81
|
unknown
|
|
87
|
-
} from
|
|
82
|
+
} from "@forklaunch/validator/typebox";
|
|
88
83
|
|
|
89
84
|
// domain/enum/currency.enum.ts
|
|
90
85
|
var CurrencyEnum = {
|
|
91
|
-
USD:
|
|
92
|
-
EUR:
|
|
93
|
-
JPY:
|
|
94
|
-
GBP:
|
|
95
|
-
AUD:
|
|
96
|
-
CAD:
|
|
97
|
-
CHF:
|
|
98
|
-
CNY:
|
|
99
|
-
AED:
|
|
100
|
-
ARS:
|
|
101
|
-
BAM:
|
|
102
|
-
BDT:
|
|
103
|
-
BGN:
|
|
104
|
-
BOB:
|
|
105
|
-
BRL:
|
|
106
|
-
CLP:
|
|
107
|
-
COP:
|
|
108
|
-
CRC:
|
|
109
|
-
CZK:
|
|
110
|
-
DKK:
|
|
111
|
-
DZD:
|
|
112
|
-
EGP:
|
|
113
|
-
ETB:
|
|
114
|
-
GEL:
|
|
115
|
-
GTQ:
|
|
116
|
-
HKD:
|
|
117
|
-
HUF:
|
|
118
|
-
IDR:
|
|
119
|
-
ILS:
|
|
120
|
-
INR:
|
|
121
|
-
ISK:
|
|
122
|
-
JMD:
|
|
123
|
-
KES:
|
|
124
|
-
KHR:
|
|
125
|
-
KRW:
|
|
126
|
-
KZT:
|
|
127
|
-
LAK:
|
|
128
|
-
LKR:
|
|
129
|
-
MAD:
|
|
130
|
-
MMK:
|
|
131
|
-
MXN:
|
|
132
|
-
MYR:
|
|
133
|
-
NGN:
|
|
134
|
-
NOK:
|
|
135
|
-
NPR:
|
|
136
|
-
NZD:
|
|
137
|
-
PEN:
|
|
138
|
-
PHP:
|
|
139
|
-
PKR:
|
|
140
|
-
PLN:
|
|
141
|
-
PYG:
|
|
142
|
-
QAR:
|
|
143
|
-
RON:
|
|
144
|
-
RSD:
|
|
145
|
-
RUB:
|
|
146
|
-
SAR:
|
|
147
|
-
SEK:
|
|
148
|
-
SGD:
|
|
149
|
-
THB:
|
|
150
|
-
TRY:
|
|
151
|
-
TWD:
|
|
152
|
-
TZS:
|
|
153
|
-
UAH:
|
|
154
|
-
UGX:
|
|
155
|
-
UYU:
|
|
156
|
-
VND:
|
|
157
|
-
ZAR:
|
|
158
|
-
ZMW:
|
|
86
|
+
USD: "USD",
|
|
87
|
+
EUR: "EUR",
|
|
88
|
+
JPY: "JPY",
|
|
89
|
+
GBP: "GBP",
|
|
90
|
+
AUD: "AUD",
|
|
91
|
+
CAD: "CAD",
|
|
92
|
+
CHF: "CHF",
|
|
93
|
+
CNY: "CNY",
|
|
94
|
+
AED: "AED",
|
|
95
|
+
ARS: "ARS",
|
|
96
|
+
BAM: "BAM",
|
|
97
|
+
BDT: "BDT",
|
|
98
|
+
BGN: "BGN",
|
|
99
|
+
BOB: "BOB",
|
|
100
|
+
BRL: "BRL",
|
|
101
|
+
CLP: "CLP",
|
|
102
|
+
COP: "COP",
|
|
103
|
+
CRC: "CRC",
|
|
104
|
+
CZK: "CZK",
|
|
105
|
+
DKK: "DKK",
|
|
106
|
+
DZD: "DZD",
|
|
107
|
+
EGP: "EGP",
|
|
108
|
+
ETB: "ETB",
|
|
109
|
+
GEL: "GEL",
|
|
110
|
+
GTQ: "GTQ",
|
|
111
|
+
HKD: "HKD",
|
|
112
|
+
HUF: "HUF",
|
|
113
|
+
IDR: "IDR",
|
|
114
|
+
ILS: "ILS",
|
|
115
|
+
INR: "INR",
|
|
116
|
+
ISK: "ISK",
|
|
117
|
+
JMD: "JMD",
|
|
118
|
+
KES: "KES",
|
|
119
|
+
KHR: "KHR",
|
|
120
|
+
KRW: "KRW",
|
|
121
|
+
KZT: "KZT",
|
|
122
|
+
LAK: "LAK",
|
|
123
|
+
LKR: "LKR",
|
|
124
|
+
MAD: "MAD",
|
|
125
|
+
MMK: "MMK",
|
|
126
|
+
MXN: "MXN",
|
|
127
|
+
MYR: "MYR",
|
|
128
|
+
NGN: "NGN",
|
|
129
|
+
NOK: "NOK",
|
|
130
|
+
NPR: "NPR",
|
|
131
|
+
NZD: "NZD",
|
|
132
|
+
PEN: "PEN",
|
|
133
|
+
PHP: "PHP",
|
|
134
|
+
PKR: "PKR",
|
|
135
|
+
PLN: "PLN",
|
|
136
|
+
PYG: "PYG",
|
|
137
|
+
QAR: "QAR",
|
|
138
|
+
RON: "RON",
|
|
139
|
+
RSD: "RSD",
|
|
140
|
+
RUB: "RUB",
|
|
141
|
+
SAR: "SAR",
|
|
142
|
+
SEK: "SEK",
|
|
143
|
+
SGD: "SGD",
|
|
144
|
+
THB: "THB",
|
|
145
|
+
TRY: "TRY",
|
|
146
|
+
TWD: "TWD",
|
|
147
|
+
TZS: "TZS",
|
|
148
|
+
UAH: "UAH",
|
|
149
|
+
UGX: "UGX",
|
|
150
|
+
UYU: "UYU",
|
|
151
|
+
VND: "VND",
|
|
152
|
+
ZAR: "ZAR",
|
|
153
|
+
ZMW: "ZMW"
|
|
159
154
|
};
|
|
160
155
|
|
|
161
156
|
// domain/enum/paymentMethod.enum.ts
|
|
162
157
|
var PaymentMethodEnum = {
|
|
163
|
-
AFFIRM:
|
|
164
|
-
AFTERPAY_CLEARPAY:
|
|
165
|
-
ALIPAY:
|
|
166
|
-
ALMA:
|
|
167
|
-
AU_BECS_DEBIT:
|
|
168
|
-
BACS_DEBIT:
|
|
169
|
-
BANCONTACT:
|
|
170
|
-
BILLIE:
|
|
171
|
-
BLIK:
|
|
172
|
-
BOLETO:
|
|
173
|
-
CARD:
|
|
174
|
-
CASHAPP:
|
|
175
|
-
EPS:
|
|
176
|
-
FPX:
|
|
177
|
-
GIROPAY:
|
|
178
|
-
GRABPAY:
|
|
179
|
-
IDEAL:
|
|
180
|
-
KLARNA:
|
|
181
|
-
KONBINI:
|
|
182
|
-
LINK:
|
|
183
|
-
MOBILEPAY:
|
|
184
|
-
MULTIBANCO:
|
|
185
|
-
OXXO:
|
|
186
|
-
P24:
|
|
187
|
-
PAY_BY_BANK:
|
|
188
|
-
PAYNOW:
|
|
189
|
-
PAYPAL:
|
|
190
|
-
PIX:
|
|
191
|
-
PROMPTPAY:
|
|
192
|
-
SATISPAY:
|
|
193
|
-
SEPA_DEBIT:
|
|
194
|
-
SOFORT:
|
|
195
|
-
SWISH:
|
|
196
|
-
TWINT:
|
|
197
|
-
US_BANK_ACCOUNT:
|
|
198
|
-
WECHAT_PAY:
|
|
199
|
-
ZIP:
|
|
158
|
+
AFFIRM: "affirm",
|
|
159
|
+
AFTERPAY_CLEARPAY: "afterpay_clearpay",
|
|
160
|
+
ALIPAY: "alipay",
|
|
161
|
+
ALMA: "alma",
|
|
162
|
+
AU_BECS_DEBIT: "au_becs_debit",
|
|
163
|
+
BACS_DEBIT: "bacs_debit",
|
|
164
|
+
BANCONTACT: "bancontact",
|
|
165
|
+
BILLIE: "billie",
|
|
166
|
+
BLIK: "blik",
|
|
167
|
+
BOLETO: "boleto",
|
|
168
|
+
CARD: "card",
|
|
169
|
+
CASHAPP: "cashapp",
|
|
170
|
+
EPS: "eps",
|
|
171
|
+
FPX: "fpx",
|
|
172
|
+
GIROPAY: "giropay",
|
|
173
|
+
GRABPAY: "grabpay",
|
|
174
|
+
IDEAL: "ideal",
|
|
175
|
+
KLARNA: "klarna",
|
|
176
|
+
KONBINI: "konbini",
|
|
177
|
+
LINK: "link",
|
|
178
|
+
MOBILEPAY: "mobilepay",
|
|
179
|
+
MULTIBANCO: "multibanco",
|
|
180
|
+
OXXO: "oxxo",
|
|
181
|
+
P24: "p24",
|
|
182
|
+
PAY_BY_BANK: "pay_by_bank",
|
|
183
|
+
PAYNOW: "paynow",
|
|
184
|
+
PAYPAL: "paypal",
|
|
185
|
+
PIX: "pix",
|
|
186
|
+
PROMPTPAY: "promptpay",
|
|
187
|
+
SATISPAY: "satispay",
|
|
188
|
+
SEPA_DEBIT: "sepa_debit",
|
|
189
|
+
SOFORT: "sofort",
|
|
190
|
+
SWISH: "swish",
|
|
191
|
+
TWINT: "twint",
|
|
192
|
+
US_BANK_ACCOUNT: "us_bank_account",
|
|
193
|
+
WECHAT_PAY: "wechat_pay",
|
|
194
|
+
ZIP: "zip"
|
|
200
195
|
};
|
|
201
196
|
|
|
202
197
|
// domain/schemas/typebox/checkoutSession.schema.ts
|
|
@@ -205,6 +200,7 @@ var CreateCheckoutSessionSchema = (StatusEnum) => ({
|
|
|
205
200
|
customerId: string3,
|
|
206
201
|
currency: enum_(CurrencyEnum),
|
|
207
202
|
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
203
|
+
uri: string3,
|
|
208
204
|
successRedirectUri: optional3(string3),
|
|
209
205
|
cancelRedirectUri: optional3(string3),
|
|
210
206
|
expiresAt: date3,
|
|
@@ -216,11 +212,14 @@ var UpdateCheckoutSessionSchema = (StatusEnum) => ({
|
|
|
216
212
|
customerId: optional3(string3),
|
|
217
213
|
currency: optional3(enum_(CurrencyEnum)),
|
|
218
214
|
paymentMethods: optional3(array(enum_(PaymentMethodEnum))),
|
|
215
|
+
uri: optional3(string3),
|
|
219
216
|
successRedirectUri: optional3(string3),
|
|
220
217
|
cancelRedirectUri: optional3(string3),
|
|
221
218
|
expiresAt: optional3(date3),
|
|
222
219
|
status: optional3(enum_(StatusEnum)),
|
|
223
|
-
stripeFields: optional3(
|
|
220
|
+
stripeFields: optional3(
|
|
221
|
+
type3()
|
|
222
|
+
)
|
|
224
223
|
});
|
|
225
224
|
var CheckoutSessionSchema = (StatusEnum) => ({
|
|
226
225
|
id: string3,
|
|
@@ -228,6 +227,7 @@ var CheckoutSessionSchema = (StatusEnum) => ({
|
|
|
228
227
|
metadata: optional3(unknown),
|
|
229
228
|
currency: enum_(CurrencyEnum),
|
|
230
229
|
paymentMethods: array(enum_(PaymentMethodEnum)),
|
|
230
|
+
uri: string3,
|
|
231
231
|
successRedirectUri: optional3(string3),
|
|
232
232
|
cancelRedirectUri: optional3(string3),
|
|
233
233
|
expiresAt: date3,
|
|
@@ -251,12 +251,13 @@ import {
|
|
|
251
251
|
string as string4,
|
|
252
252
|
type as type4,
|
|
253
253
|
unknown as unknown2
|
|
254
|
-
} from
|
|
254
|
+
} from "@forklaunch/validator/zod";
|
|
255
255
|
var CreateCheckoutSessionSchema2 = (StatusEnum) => ({
|
|
256
256
|
id: optional4(string4),
|
|
257
257
|
customerId: string4,
|
|
258
258
|
currency: enum_2(CurrencyEnum),
|
|
259
259
|
paymentMethods: array2(enum_2(PaymentMethodEnum)),
|
|
260
|
+
uri: string4,
|
|
260
261
|
successRedirectUri: optional4(string4),
|
|
261
262
|
cancelRedirectUri: optional4(string4),
|
|
262
263
|
expiresAt: date4,
|
|
@@ -268,11 +269,14 @@ var UpdateCheckoutSessionSchema2 = (StatusEnum) => ({
|
|
|
268
269
|
customerId: optional4(string4),
|
|
269
270
|
currency: optional4(enum_2(CurrencyEnum)),
|
|
270
271
|
paymentMethods: optional4(array2(enum_2(PaymentMethodEnum))),
|
|
272
|
+
uri: optional4(string4),
|
|
271
273
|
successRedirectUri: optional4(string4),
|
|
272
274
|
cancelRedirectUri: optional4(string4),
|
|
273
275
|
expiresAt: optional4(date4),
|
|
274
276
|
status: optional4(enum_2(StatusEnum)),
|
|
275
|
-
stripeFields: optional4(
|
|
277
|
+
stripeFields: optional4(
|
|
278
|
+
type4()
|
|
279
|
+
)
|
|
276
280
|
});
|
|
277
281
|
var CheckoutSessionSchema2 = (StatusEnum) => ({
|
|
278
282
|
id: string4,
|
|
@@ -280,6 +284,7 @@ var CheckoutSessionSchema2 = (StatusEnum) => ({
|
|
|
280
284
|
currency: enum_2(CurrencyEnum),
|
|
281
285
|
metadata: optional4(unknown2),
|
|
282
286
|
paymentMethods: array2(enum_2(PaymentMethodEnum)),
|
|
287
|
+
uri: string4,
|
|
283
288
|
successRedirectUri: optional4(string4),
|
|
284
289
|
cancelRedirectUri: optional4(string4),
|
|
285
290
|
expiresAt: date4,
|
|
@@ -301,7 +306,7 @@ var StripeCheckoutSessionServiceSchemas3 = serviceSchemaResolver2(
|
|
|
301
306
|
);
|
|
302
307
|
|
|
303
308
|
// domain/schemas/paymentLink.schema.ts
|
|
304
|
-
import { serviceSchemaResolver as serviceSchemaResolver3 } from
|
|
309
|
+
import { serviceSchemaResolver as serviceSchemaResolver3 } from "@forklaunch/internal";
|
|
305
310
|
|
|
306
311
|
// domain/schemas/typebox/paymentLink.schema.ts
|
|
307
312
|
import {
|
|
@@ -312,7 +317,7 @@ import {
|
|
|
312
317
|
optional as optional5,
|
|
313
318
|
string as string5,
|
|
314
319
|
type as type5
|
|
315
|
-
} from
|
|
320
|
+
} from "@forklaunch/validator/typebox";
|
|
316
321
|
var CreatePaymentLinkSchema = (StatusEnum) => ({
|
|
317
322
|
id: optional5(string5),
|
|
318
323
|
amount: number,
|
|
@@ -354,7 +359,7 @@ import {
|
|
|
354
359
|
optional as optional6,
|
|
355
360
|
string as string6,
|
|
356
361
|
type as type6
|
|
357
|
-
} from
|
|
362
|
+
} from "@forklaunch/validator/zod";
|
|
358
363
|
var CreatePaymentLinkSchema2 = (StatusEnum) => ({
|
|
359
364
|
id: optional6(string6),
|
|
360
365
|
amount: number2,
|
|
@@ -394,7 +399,7 @@ var StripePaymentLinkServiceSchemas3 = serviceSchemaResolver3(
|
|
|
394
399
|
);
|
|
395
400
|
|
|
396
401
|
// domain/schemas/plan.schema.ts
|
|
397
|
-
import { serviceSchemaResolver as serviceSchemaResolver4 } from
|
|
402
|
+
import { serviceSchemaResolver as serviceSchemaResolver4 } from "@forklaunch/internal";
|
|
398
403
|
|
|
399
404
|
// domain/schemas/typebox/plan.schema.ts
|
|
400
405
|
import {
|
|
@@ -406,18 +411,18 @@ import {
|
|
|
406
411
|
optional as optional7,
|
|
407
412
|
string as string7,
|
|
408
413
|
type as type7
|
|
409
|
-
} from
|
|
414
|
+
} from "@forklaunch/validator/typebox";
|
|
410
415
|
|
|
411
416
|
// domain/enum/billingProvider.enum.ts
|
|
412
417
|
var BillingProviderEnum = {
|
|
413
|
-
STRIPE:
|
|
418
|
+
STRIPE: "stripe"
|
|
414
419
|
};
|
|
415
420
|
|
|
416
421
|
// domain/enum/planCadence.enum.ts
|
|
417
422
|
var PlanCadenceEnum = {
|
|
418
|
-
WEEKLY:
|
|
419
|
-
MONTHLY:
|
|
420
|
-
ANNUALLY:
|
|
423
|
+
WEEKLY: "week",
|
|
424
|
+
MONTHLY: "month",
|
|
425
|
+
ANNUALLY: "year"
|
|
421
426
|
};
|
|
422
427
|
|
|
423
428
|
// domain/schemas/typebox/plan.schema.ts
|
|
@@ -478,7 +483,7 @@ import {
|
|
|
478
483
|
optional as optional8,
|
|
479
484
|
string as string8,
|
|
480
485
|
type as type8
|
|
481
|
-
} from
|
|
486
|
+
} from "@forklaunch/validator/zod";
|
|
482
487
|
var CreatePlanSchema2 = {
|
|
483
488
|
id: optional8(string8),
|
|
484
489
|
name: string8,
|
|
@@ -533,7 +538,7 @@ var StripePlanServiceSchemas3 = serviceSchemaResolver4(
|
|
|
533
538
|
);
|
|
534
539
|
|
|
535
540
|
// domain/schemas/subscription.schema.ts
|
|
536
|
-
import { serviceSchemaResolver as serviceSchemaResolver5 } from
|
|
541
|
+
import { serviceSchemaResolver as serviceSchemaResolver5 } from "@forklaunch/internal";
|
|
537
542
|
|
|
538
543
|
// domain/schemas/typebox/subscription.schema.ts
|
|
539
544
|
import {
|
|
@@ -543,7 +548,7 @@ import {
|
|
|
543
548
|
optional as optional9,
|
|
544
549
|
string as string9,
|
|
545
550
|
type as type9
|
|
546
|
-
} from
|
|
551
|
+
} from "@forklaunch/validator/typebox";
|
|
547
552
|
var CreateSubscriptionSchema = (PartyEnum) => ({
|
|
548
553
|
id: optional9(string9),
|
|
549
554
|
partyId: string9,
|
|
@@ -602,7 +607,7 @@ import {
|
|
|
602
607
|
optional as optional10,
|
|
603
608
|
string as string10,
|
|
604
609
|
type as type10
|
|
605
|
-
} from
|
|
610
|
+
} from "@forklaunch/validator/zod";
|
|
606
611
|
var CreateSubscriptionSchema2 = (PartyEnum) => ({
|
|
607
612
|
id: optional10(string10),
|
|
608
613
|
partyId: string10,
|