@forklaunch/implementation-billing-stripe 0.0.1 → 0.0.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.
@@ -0,0 +1,3 @@
1
+ export enum BillingProviderEnum {
2
+ STRIPE = 'stripe'
3
+ }
@@ -0,0 +1,137 @@
1
+ export enum CurrencyEnum {
2
+ USD = 'USD',
3
+ AED = 'AED',
4
+ AFN = 'AFN',
5
+ ALL = 'ALL',
6
+ AMD = 'AMD',
7
+ ANG = 'ANG',
8
+ AOA = 'AOA',
9
+ ARS = 'ARS',
10
+ AUD = 'AUD',
11
+ AWG = 'AWG',
12
+ AZN = 'AZN',
13
+ BAM = 'BAM',
14
+ BBD = 'BBD',
15
+ BDT = 'BDT',
16
+ BGN = 'BGN',
17
+ BIF = 'BIF',
18
+ BMD = 'BMD',
19
+ BND = 'BND',
20
+ BOB = 'BOB',
21
+ BRL = 'BRL',
22
+ BSD = 'BSD',
23
+ BWP = 'BWP',
24
+ BYN = 'BYN',
25
+ BZD = 'BZD',
26
+ CAD = 'CAD',
27
+ CDF = 'CDF',
28
+ CHF = 'CHF',
29
+ CLP = 'CLP',
30
+ CNY = 'CNY',
31
+ COP = 'COP',
32
+ CRC = 'CRC',
33
+ CVE = 'CVE',
34
+ CZK = 'CZK',
35
+ DJF = 'DJF',
36
+ DKK = 'DKK',
37
+ DOP = 'DOP',
38
+ DZD = 'DZD',
39
+ EGP = 'EGP',
40
+ ETB = 'ETB',
41
+ EUR = 'EUR',
42
+ FJD = 'FJD',
43
+ FKP = 'FKP',
44
+ GBP = 'GBP',
45
+ GEL = 'GEL',
46
+ GIP = 'GIP',
47
+ GMD = 'GMD',
48
+ GNF = 'GNF',
49
+ GTQ = 'GTQ',
50
+ GYD = 'GYD',
51
+ HKD = 'HKD',
52
+ HNL = 'HNL',
53
+ HTG = 'HTG',
54
+ HUF = 'HUF',
55
+ IDR = 'IDR',
56
+ ILS = 'ILS',
57
+ INR = 'INR',
58
+ ISK = 'ISK',
59
+ JMD = 'JMD',
60
+ JPY = 'JPY',
61
+ KES = 'KES',
62
+ KGS = 'KGS',
63
+ KHR = 'KHR',
64
+ KMF = 'KMF',
65
+ KRW = 'KRW',
66
+ KYD = 'KYD',
67
+ KZT = 'KZT',
68
+ LAK = 'LAK',
69
+ LBP = 'LBP',
70
+ LKR = 'LKR',
71
+ LRD = 'LRD',
72
+ LSL = 'LSL',
73
+ MAD = 'MAD',
74
+ MDL = 'MDL',
75
+ MGA = 'MGA',
76
+ MKD = 'MKD',
77
+ MMK = 'MMK',
78
+ MNT = 'MNT',
79
+ MOP = 'MOP',
80
+ MUR = 'MUR',
81
+ MVR = 'MVR',
82
+ MWK = 'MWK',
83
+ MXN = 'MXN',
84
+ MYR = 'MYR',
85
+ MZN = 'MZN',
86
+ NAD = 'NAD',
87
+ NGN = 'NGN',
88
+ NIO = 'NIO',
89
+ NOK = 'NOK',
90
+ NPR = 'NPR',
91
+ NZD = 'NZD',
92
+ PAB = 'PAB',
93
+ PEN = 'PEN',
94
+ PGK = 'PGK',
95
+ PHP = 'PHP',
96
+ PKR = 'PKR',
97
+ PLN = 'PLN',
98
+ PYG = 'PYG',
99
+ QAR = 'QAR',
100
+ RON = 'RON',
101
+ RSD = 'RSD',
102
+ RUB = 'RUB',
103
+ RWF = 'RWF',
104
+ SAR = 'SAR',
105
+ SBD = 'SBD',
106
+ SCR = 'SCR',
107
+ SEK = 'SEK',
108
+ SGD = 'SGD',
109
+ SHP = 'SHP',
110
+ SLE = 'SLE',
111
+ SOS = 'SOS',
112
+ SRD = 'SRD',
113
+ STD = 'STD',
114
+ SZL = 'SZL',
115
+ THB = 'THB',
116
+ TJS = 'TJS',
117
+ TOP = 'TOP',
118
+ TRY = 'TRY',
119
+ TTD = 'TTD',
120
+ TWD = 'TWD',
121
+ TZS = 'TZS',
122
+ UAH = 'UAH',
123
+ UGX = 'UGX',
124
+ UYU = 'UYU',
125
+ UZS = 'UZS',
126
+ VND = 'VND',
127
+ VUV = 'VUV',
128
+ WST = 'WST',
129
+ XAF = 'XAF',
130
+ XCD = 'XCD',
131
+ XCG = 'XCG',
132
+ XOF = 'XOF',
133
+ XPF = 'XPF',
134
+ YER = 'YER',
135
+ ZAR = 'ZAR',
136
+ ZMW = 'ZMW'
137
+ }
@@ -0,0 +1,4 @@
1
+ export * from './billingProvider.enum';
2
+ export * from './currency.enum';
3
+ export * from './paymentMethod.enum';
4
+ export * from './planCadence.enum';
@@ -0,0 +1,39 @@
1
+ export enum PaymentMethodEnum {
2
+ AFFIRM = 'affirm',
3
+ AFTERPAY_CLEARPAY = 'afterpay_clearpay',
4
+ ALIPAY = 'alipay',
5
+ ALMA = 'alma',
6
+ AU_BECS_DEBIT = 'au_becs_debit',
7
+ BACS_DEBIT = 'bacs_debit',
8
+ BANCONTACT = 'bancontact',
9
+ BILLIE = 'billie',
10
+ BLIK = 'blik',
11
+ BOLETO = 'boleto',
12
+ CARD = 'card',
13
+ CASHAPP = 'cashapp',
14
+ EPS = 'eps',
15
+ FPX = 'fpx',
16
+ GIROPAY = 'giropay',
17
+ GRABPAY = 'grabpay',
18
+ IDEAL = 'ideal',
19
+ KLARNA = 'klarna',
20
+ KONBINI = 'konbini',
21
+ LINK = 'link',
22
+ MOBILEPAY = 'mobilepay',
23
+ MULTIBANCO = 'multibanco',
24
+ OXXO = 'oxxo',
25
+ P24 = 'p24',
26
+ PAY_BY_BANK = 'pay_by_bank',
27
+ PAYNOW = 'paynow',
28
+ PAYPAL = 'paypal',
29
+ PIX = 'pix',
30
+ PROMPTPAY = 'promptpay',
31
+ SATISPAY = 'satispay',
32
+ SEPA_DEBIT = 'sepa_debit',
33
+ SOFORT = 'sofort',
34
+ SWISH = 'swish',
35
+ TWINT = 'twint',
36
+ US_BANK_ACCOUNT = 'us_bank_account',
37
+ WECHAT_PAY = 'wechat_pay',
38
+ ZIP = 'zip'
39
+ }
@@ -0,0 +1,5 @@
1
+ export enum PlanCadenceEnum {
2
+ WEEKLY = 'week',
3
+ MONTHLY = 'month',
4
+ ANNUALLY = 'year'
5
+ }
@@ -8,8 +8,8 @@ import {
8
8
  type,
9
9
  unknown
10
10
  } from '@{{app_name}}/core';
11
- import { CurrencyEnum } from '../../domain/enums/currency.enum';
12
- import { PaymentMethodEnum } from '../../domain/enums/paymentMethod.enum';
11
+ import { CurrencyEnum } from '../../enum/currency.enum';
12
+ import { PaymentMethodEnum } from '../../enum/paymentMethod.enum';
13
13
  import {
14
14
  StripeCheckoutSessionDto,
15
15
  StripeCreateCheckoutSessionDto,
@@ -45,9 +45,8 @@ export const UpdateCheckoutSessionSchema = <
45
45
  cancelRedirectUri: optional(string),
46
46
  expiresAt: optional(date),
47
47
  status: optional(enum_(StatusEnum)),
48
- stripeFields: optional(
49
- type<StripeUpdateCheckoutSessionDto<T>['stripeFields']>()
50
- )
48
+ stripeFields:
49
+ optional(type<StripeUpdateCheckoutSessionDto<T>['stripeFields']>())
51
50
  });
52
51
 
53
52
  export const CheckoutSessionSchema = <T extends Record<string, LiteralSchema>>(
@@ -8,8 +8,8 @@ import {
8
8
  string,
9
9
  type
10
10
  } from '@{{app_name}}/core';
11
- import { CurrencyEnum } from '../../domain/enums/currency.enum';
12
- import { PaymentMethodEnum } from '../../domain/enums/paymentMethod.enum';
11
+ import { CurrencyEnum } from '../../enum/currency.enum';
12
+ import { PaymentMethodEnum } from '../../enum/paymentMethod.enum';
13
13
  import {
14
14
  StripeCreatePaymentLinkDto,
15
15
  StripePaymentLinkDto,
@@ -8,9 +8,9 @@ import {
8
8
  string,
9
9
  type
10
10
  } from '@{{app_name}}/core';
11
- import { BillingProviderEnum } from '../../domain/enums/billingProvider.enum';
12
- import { CurrencyEnum } from '../../domain/enums/currency.enum';
13
- import { PlanCadenceEnum } from '../../domain/enums/planCadence.enum';
11
+ import { BillingProviderEnum } from '../../enum/billingProvider.enum';
12
+ import { CurrencyEnum } from '../../enum/currency.enum';
13
+ import { PlanCadenceEnum } from '../../enum/planCadence.enum';
14
14
  import {
15
15
  StripeCreatePlanDto,
16
16
  StripePlanDto,
@@ -7,7 +7,7 @@ import {
7
7
  string,
8
8
  type
9
9
  } from '@{{app_name}}/core';
10
- import { BillingProviderEnum } from '../../domain/enums/billingProvider.enum';
10
+ import { BillingProviderEnum } from '../../enum/billingProvider.enum';
11
11
  import {
12
12
  StripeCreateSubscriptionDto,
13
13
  StripeSubscriptionDto,
@@ -18,8 +18,8 @@ import {
18
18
  import { AnySchemaValidator } from '@forklaunch/validator';
19
19
  import { EntityManager } from '@mikro-orm/core';
20
20
  import Stripe from 'stripe';
21
- import { CurrencyEnum } from '../domain/enums/currency.enum';
22
- import { PaymentMethodEnum } from '../domain/enums/paymentMethod.enum';
21
+ import { CurrencyEnum } from '../enum/currency.enum';
22
+ import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
23
23
  import { StripeCheckoutSessionDtos } from '../types/stripe.dto.types';
24
24
  import { StripeCheckoutSessionEntities } from '../types/stripe.entity.types';
25
25
 
@@ -18,8 +18,8 @@ import {
18
18
  import { AnySchemaValidator } from '@forklaunch/validator';
19
19
  import { EntityManager } from '@mikro-orm/core';
20
20
  import Stripe from 'stripe';
21
- import { CurrencyEnum } from '../domain/enums/currency.enum';
22
- import { PaymentMethodEnum } from '../domain/enums/paymentMethod.enum';
21
+ import { CurrencyEnum } from '../enum/currency.enum';
22
+ import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
23
23
  import {
24
24
  StripeCreatePaymentLinkDto,
25
25
  StripePaymentLinkDto,
@@ -17,9 +17,9 @@ import {
17
17
  import { AnySchemaValidator } from '@forklaunch/validator';
18
18
  import { EntityManager } from '@mikro-orm/core';
19
19
  import Stripe from 'stripe';
20
- import { BillingProviderEnum } from '../domain/enums/billingProvider.enum';
21
- import { CurrencyEnum } from '../domain/enums/currency.enum';
22
- import { PlanCadenceEnum } from '../domain/enums/planCadence.enum';
20
+ import { BillingProviderEnum } from '../enum/billingProvider.enum';
21
+ import { CurrencyEnum } from '../enum/currency.enum';
22
+ import { PlanCadenceEnum } from '../enum/planCadence.enum';
23
23
  import {
24
24
  StripeCreatePlanDto,
25
25
  StripePlanDto,
@@ -17,7 +17,7 @@ import {
17
17
  import { AnySchemaValidator } from '@forklaunch/validator';
18
18
  import { EntityManager } from '@mikro-orm/core';
19
19
  import Stripe from 'stripe';
20
- import { BillingProviderEnum } from '../domain/enums/billingProvider.enum';
20
+ import { BillingProviderEnum } from '../enum/billingProvider.enum';
21
21
  import {
22
22
  StripeCreateSubscriptionDto,
23
23
  StripeSubscriptionDto,
@@ -5,10 +5,10 @@ import {
5
5
  import { AnySchemaValidator } from '@forklaunch/validator';
6
6
  import { EntityManager } from '@mikro-orm/core';
7
7
  import Stripe from 'stripe';
8
- import { BillingProviderEnum } from '../domain/enums/billingProvider.enum';
9
- import { CurrencyEnum } from '../domain/enums/currency.enum';
10
- import { PaymentMethodEnum } from '../domain/enums/paymentMethod.enum';
11
- import { PlanCadenceEnum } from '../domain/enums/planCadence.enum';
8
+ import { BillingProviderEnum } from '../enum/billingProvider.enum';
9
+ import { CurrencyEnum } from '../enum/currency.enum';
10
+ import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
11
+ import { PlanCadenceEnum } from '../enum/planCadence.enum';
12
12
  import {
13
13
  StripeBillingPortalEntities,
14
14
  StripeCheckoutSessionEntities,
@@ -16,10 +16,10 @@ import {
16
16
  UpdateSubscriptionDto
17
17
  } from '@forklaunch/interfaces-billing/types';
18
18
  import Stripe from 'stripe';
19
- import { BillingProviderEnum } from '../domain/enums/billingProvider.enum';
20
- import { CurrencyEnum } from '../domain/enums/currency.enum';
21
- import { PaymentMethodEnum } from '../domain/enums/paymentMethod.enum';
22
- import { PlanCadenceEnum } from '../domain/enums/planCadence.enum';
19
+ import { BillingProviderEnum } from '../enum/billingProvider.enum';
20
+ import { CurrencyEnum } from '../enum/currency.enum';
21
+ import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
22
+ import { PlanCadenceEnum } from '../enum/planCadence.enum';
23
23
 
24
24
  // Billing Portal Types
25
25
  type BillingPortalOmissions = 'customer';
@@ -6,10 +6,10 @@ import {
6
6
  SubscriptionDto
7
7
  } from '@forklaunch/interfaces-billing/types';
8
8
  import Stripe from 'stripe';
9
- import { BillingProviderEnum } from '../domain/enums/billingProvider.enum';
10
- import { CurrencyEnum } from '../domain/enums/currency.enum';
11
- import { PaymentMethodEnum } from '../domain/enums/paymentMethod.enum';
12
- import { PlanCadenceEnum } from '../domain/enums/planCadence.enum';
9
+ import { BillingProviderEnum } from '../enum/billingProvider.enum';
10
+ import { CurrencyEnum } from '../enum/currency.enum';
11
+ import { PaymentMethodEnum } from '../enum/paymentMethod.enum';
12
+ import { PlanCadenceEnum } from '../enum/planCadence.enum';
13
13
 
14
14
  // Billing Portal Types
15
15
  export type StripeBillingPortalEntity = BillingPortalDto & {
@@ -17,23 +17,23 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // domain/index.ts
21
- var domain_exports = {};
22
- __export(domain_exports, {
20
+ // enum/index.ts
21
+ var enum_exports = {};
22
+ __export(enum_exports, {
23
23
  BillingProviderEnum: () => BillingProviderEnum,
24
24
  CurrencyEnum: () => CurrencyEnum,
25
25
  PaymentMethodEnum: () => PaymentMethodEnum,
26
26
  PlanCadenceEnum: () => PlanCadenceEnum
27
27
  });
28
- module.exports = __toCommonJS(domain_exports);
28
+ module.exports = __toCommonJS(enum_exports);
29
29
 
30
- // domain/enums/billingProvider.enum.ts
30
+ // enum/billingProvider.enum.ts
31
31
  var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
32
32
  BillingProviderEnum2["STRIPE"] = "stripe";
33
33
  return BillingProviderEnum2;
34
34
  })(BillingProviderEnum || {});
35
35
 
36
- // domain/enums/currency.enum.ts
36
+ // enum/currency.enum.ts
37
37
  var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
38
38
  CurrencyEnum2["USD"] = "USD";
39
39
  CurrencyEnum2["AED"] = "AED";
@@ -173,7 +173,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
173
173
  return CurrencyEnum2;
174
174
  })(CurrencyEnum || {});
175
175
 
176
- // domain/enums/paymentMethod.enum.ts
176
+ // enum/paymentMethod.enum.ts
177
177
  var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
178
178
  PaymentMethodEnum2["AFFIRM"] = "affirm";
179
179
  PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
@@ -215,7 +215,7 @@ var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
215
215
  return PaymentMethodEnum2;
216
216
  })(PaymentMethodEnum || {});
217
217
 
218
- // domain/enums/planCadence.enum.ts
218
+ // enum/planCadence.enum.ts
219
219
  var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
220
220
  PlanCadenceEnum2["WEEKLY"] = "week";
221
221
  PlanCadenceEnum2["MONTHLY"] = "month";
@@ -1,10 +1,10 @@
1
- // domain/enums/billingProvider.enum.ts
1
+ // enum/billingProvider.enum.ts
2
2
  var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
3
3
  BillingProviderEnum2["STRIPE"] = "stripe";
4
4
  return BillingProviderEnum2;
5
5
  })(BillingProviderEnum || {});
6
6
 
7
- // domain/enums/currency.enum.ts
7
+ // enum/currency.enum.ts
8
8
  var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
9
9
  CurrencyEnum2["USD"] = "USD";
10
10
  CurrencyEnum2["AED"] = "AED";
@@ -144,7 +144,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
144
144
  return CurrencyEnum2;
145
145
  })(CurrencyEnum || {});
146
146
 
147
- // domain/enums/paymentMethod.enum.ts
147
+ // enum/paymentMethod.enum.ts
148
148
  var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
149
149
  PaymentMethodEnum2["AFFIRM"] = "affirm";
150
150
  PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
@@ -186,7 +186,7 @@ var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
186
186
  return PaymentMethodEnum2;
187
187
  })(PaymentMethodEnum || {});
188
188
 
189
- // domain/enums/planCadence.enum.ts
189
+ // enum/planCadence.enum.ts
190
190
  var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
191
191
  PlanCadenceEnum2["WEEKLY"] = "week";
192
192
  PlanCadenceEnum2["MONTHLY"] = "month";
@@ -3,7 +3,7 @@ import * as zod from 'zod';
3
3
  import * as Stripe from 'stripe';
4
4
  import * as _sinclair_typebox from '@sinclair/typebox';
5
5
  import * as _forklaunch_validator from '@forklaunch/validator';
6
- import { CurrencyEnum, PaymentMethodEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/index.mjs';
6
+ import { CurrencyEnum, PaymentMethodEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.mjs';
7
7
 
8
8
  declare const StripeBillingPortalServiceSchemas: <SchemaValidator extends _forklaunch_validator.AnySchemaValidator>(options: Record<string, unknown> & {
9
9
  validator: SchemaValidator;
@@ -3,7 +3,7 @@ import * as zod from 'zod';
3
3
  import * as Stripe from 'stripe';
4
4
  import * as _sinclair_typebox from '@sinclair/typebox';
5
5
  import * as _forklaunch_validator from '@forklaunch/validator';
6
- import { CurrencyEnum, PaymentMethodEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/index.js';
6
+ import { CurrencyEnum, PaymentMethodEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.js';
7
7
 
8
8
  declare const StripeBillingPortalServiceSchemas: <SchemaValidator extends _forklaunch_validator.AnySchemaValidator>(options: Record<string, unknown> & {
9
9
  validator: SchemaValidator;
@@ -103,7 +103,7 @@ var import_internal2 = require("@forklaunch/internal");
103
103
  // schemas/typebox/checkoutSession.schema.ts
104
104
  var import_typebox2 = require("@forklaunch/validator/typebox");
105
105
 
106
- // domain/enums/currency.enum.ts
106
+ // enum/currency.enum.ts
107
107
  var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
108
108
  CurrencyEnum2["USD"] = "USD";
109
109
  CurrencyEnum2["AED"] = "AED";
@@ -243,7 +243,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
243
243
  return CurrencyEnum2;
244
244
  })(CurrencyEnum || {});
245
245
 
246
- // domain/enums/paymentMethod.enum.ts
246
+ // enum/paymentMethod.enum.ts
247
247
  var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
248
248
  PaymentMethodEnum2["AFFIRM"] = "affirm";
249
249
  PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
@@ -306,9 +306,7 @@ var UpdateCheckoutSessionSchema = (StatusEnum) => ({
306
306
  cancelRedirectUri: (0, import_typebox2.optional)(import_typebox2.string),
307
307
  expiresAt: (0, import_typebox2.optional)(import_typebox2.date),
308
308
  status: (0, import_typebox2.optional)((0, import_typebox2.enum_)(StatusEnum)),
309
- stripeFields: (0, import_typebox2.optional)(
310
- (0, import_typebox2.type)()
311
- )
309
+ stripeFields: (0, import_typebox2.optional)((0, import_typebox2.type)())
312
310
  });
313
311
  var CheckoutSessionSchema = (StatusEnum) => ({
314
312
  id: import_typebox2.string,
@@ -352,9 +350,7 @@ var UpdateCheckoutSessionSchema2 = (StatusEnum) => ({
352
350
  cancelRedirectUri: (0, import_zod2.optional)(import_zod2.string),
353
351
  expiresAt: (0, import_zod2.optional)(import_zod2.date),
354
352
  status: (0, import_zod2.optional)((0, import_zod2.enum_)(StatusEnum)),
355
- stripeFields: (0, import_zod2.optional)(
356
- (0, import_zod2.type)()
357
- )
353
+ stripeFields: (0, import_zod2.optional)((0, import_zod2.type)())
358
354
  });
359
355
  var CheckoutSessionSchema2 = (StatusEnum) => ({
360
356
  id: import_zod2.string,
@@ -465,13 +461,13 @@ var import_internal4 = require("@forklaunch/internal");
465
461
  // schemas/typebox/plan.schema.ts
466
462
  var import_typebox4 = require("@forklaunch/validator/typebox");
467
463
 
468
- // domain/enums/billingProvider.enum.ts
464
+ // enum/billingProvider.enum.ts
469
465
  var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
470
466
  BillingProviderEnum2["STRIPE"] = "stripe";
471
467
  return BillingProviderEnum2;
472
468
  })(BillingProviderEnum || {});
473
469
 
474
- // domain/enums/planCadence.enum.ts
470
+ // enum/planCadence.enum.ts
475
471
  var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
476
472
  PlanCadenceEnum2["WEEKLY"] = "week";
477
473
  PlanCadenceEnum2["MONTHLY"] = "month";
@@ -81,7 +81,7 @@ import {
81
81
  unknown
82
82
  } from "@forklaunch/validator/typebox";
83
83
 
84
- // domain/enums/currency.enum.ts
84
+ // enum/currency.enum.ts
85
85
  var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
86
86
  CurrencyEnum2["USD"] = "USD";
87
87
  CurrencyEnum2["AED"] = "AED";
@@ -221,7 +221,7 @@ var CurrencyEnum = /* @__PURE__ */ ((CurrencyEnum2) => {
221
221
  return CurrencyEnum2;
222
222
  })(CurrencyEnum || {});
223
223
 
224
- // domain/enums/paymentMethod.enum.ts
224
+ // enum/paymentMethod.enum.ts
225
225
  var PaymentMethodEnum = /* @__PURE__ */ ((PaymentMethodEnum2) => {
226
226
  PaymentMethodEnum2["AFFIRM"] = "affirm";
227
227
  PaymentMethodEnum2["AFTERPAY_CLEARPAY"] = "afterpay_clearpay";
@@ -284,9 +284,7 @@ var UpdateCheckoutSessionSchema = (StatusEnum) => ({
284
284
  cancelRedirectUri: optional3(string3),
285
285
  expiresAt: optional3(date3),
286
286
  status: optional3(enum_(StatusEnum)),
287
- stripeFields: optional3(
288
- type3()
289
- )
287
+ stripeFields: optional3(type3())
290
288
  });
291
289
  var CheckoutSessionSchema = (StatusEnum) => ({
292
290
  id: string3,
@@ -338,9 +336,7 @@ var UpdateCheckoutSessionSchema2 = (StatusEnum) => ({
338
336
  cancelRedirectUri: optional4(string4),
339
337
  expiresAt: optional4(date4),
340
338
  status: optional4(enum_2(StatusEnum)),
341
- stripeFields: optional4(
342
- type4()
343
- )
339
+ stripeFields: optional4(type4())
344
340
  });
345
341
  var CheckoutSessionSchema2 = (StatusEnum) => ({
346
342
  id: string4,
@@ -476,13 +472,13 @@ import {
476
472
  type as type7
477
473
  } from "@forklaunch/validator/typebox";
478
474
 
479
- // domain/enums/billingProvider.enum.ts
475
+ // enum/billingProvider.enum.ts
480
476
  var BillingProviderEnum = /* @__PURE__ */ ((BillingProviderEnum2) => {
481
477
  BillingProviderEnum2["STRIPE"] = "stripe";
482
478
  return BillingProviderEnum2;
483
479
  })(BillingProviderEnum || {});
484
480
 
485
- // domain/enums/planCadence.enum.ts
481
+ // enum/planCadence.enum.ts
486
482
  var PlanCadenceEnum = /* @__PURE__ */ ((PlanCadenceEnum2) => {
487
483
  PlanCadenceEnum2["WEEKLY"] = "week";
488
484
  PlanCadenceEnum2["MONTHLY"] = "month";
@@ -8,7 +8,7 @@ import { AnySchemaValidator } from '@forklaunch/validator';
8
8
  import { EntityManager } from '@mikro-orm/core';
9
9
  import Stripe__default from 'stripe';
10
10
  import { StripeBillingPortalEntities, StripeBillingPortalDtos, StripeCreateBillingPortalDto, StripeUpdateBillingPortalDto, StripeBillingPortalDto, StripeCheckoutSessionEntities, StripeCheckoutSessionDtos, StripePaymentLinkEntities, StripePaymentLinkDtos, StripeCreatePaymentLinkDto, StripeUpdatePaymentLinkDto, StripePaymentLinkDto, StripePlanEntities, StripePlanDtos, StripeCreatePlanDto, StripeUpdatePlanDto, StripePlanDto, StripeSubscriptionEntities, StripeSubscriptionDtos, StripeCreateSubscriptionDto, StripeUpdateSubscriptionDto, StripeSubscriptionDto } from '../types/index.mjs';
11
- import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/index.mjs';
11
+ import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.mjs';
12
12
  import '@forklaunch/interfaces-billing/types';
13
13
 
14
14
  declare class StripeBillingPortalService<SchemaValidator extends AnySchemaValidator, Entities extends StripeBillingPortalEntities, Dto extends StripeBillingPortalDtos = StripeBillingPortalDtos> implements BillingPortalService<{
@@ -8,7 +8,7 @@ import { AnySchemaValidator } from '@forklaunch/validator';
8
8
  import { EntityManager } from '@mikro-orm/core';
9
9
  import Stripe__default from 'stripe';
10
10
  import { StripeBillingPortalEntities, StripeBillingPortalDtos, StripeCreateBillingPortalDto, StripeUpdateBillingPortalDto, StripeBillingPortalDto, StripeCheckoutSessionEntities, StripeCheckoutSessionDtos, StripePaymentLinkEntities, StripePaymentLinkDtos, StripeCreatePaymentLinkDto, StripeUpdatePaymentLinkDto, StripePaymentLinkDto, StripePlanEntities, StripePlanDtos, StripeCreatePlanDto, StripeUpdatePlanDto, StripePlanDto, StripeSubscriptionEntities, StripeSubscriptionDtos, StripeCreateSubscriptionDto, StripeUpdateSubscriptionDto, StripeSubscriptionDto } from '../types/index.js';
11
- import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/index.js';
11
+ import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.js';
12
12
  import '@forklaunch/interfaces-billing/types';
13
13
 
14
14
  declare class StripeBillingPortalService<SchemaValidator extends AnySchemaValidator, Entities extends StripeBillingPortalEntities, Dto extends StripeBillingPortalDtos = StripeBillingPortalDtos> implements BillingPortalService<{
@@ -1,6 +1,6 @@
1
- import { BillingPortalDto, CreateBillingPortalDto, UpdateBillingPortalDto, CheckoutSessionDto, CreateCheckoutSessionDto, UpdateCheckoutSessionDto, PaymentLinkDto, CreatePaymentLinkDto, UpdatePaymentLinkDto, PlanDto, CreatePlanDto, UpdatePlanDto, SubscriptionDto, CreateSubscriptionDto, UpdateSubscriptionDto } from '@forklaunch/interfaces-billing/types';
1
+ import { CreateBillingPortalDto, UpdateBillingPortalDto, BillingPortalDto, CreateCheckoutSessionDto, UpdateCheckoutSessionDto, CheckoutSessionDto, CreatePaymentLinkDto, UpdatePaymentLinkDto, PaymentLinkDto, CreatePlanDto, UpdatePlanDto, PlanDto, CreateSubscriptionDto, UpdateSubscriptionDto, SubscriptionDto } from '@forklaunch/interfaces-billing/types';
2
2
  import Stripe__default from 'stripe';
3
- import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/index.mjs';
3
+ import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.mjs';
4
4
 
5
5
  type BillingPortalOmissions = 'customer';
6
6
  type StripeCreateBillingPortalDto = Omit<CreateBillingPortalDto, 'providerFields'> & {
@@ -1,6 +1,6 @@
1
- import { BillingPortalDto, CreateBillingPortalDto, UpdateBillingPortalDto, CheckoutSessionDto, CreateCheckoutSessionDto, UpdateCheckoutSessionDto, PaymentLinkDto, CreatePaymentLinkDto, UpdatePaymentLinkDto, PlanDto, CreatePlanDto, UpdatePlanDto, SubscriptionDto, CreateSubscriptionDto, UpdateSubscriptionDto } from '@forklaunch/interfaces-billing/types';
1
+ import { CreateBillingPortalDto, UpdateBillingPortalDto, BillingPortalDto, CreateCheckoutSessionDto, UpdateCheckoutSessionDto, CheckoutSessionDto, CreatePaymentLinkDto, UpdatePaymentLinkDto, PaymentLinkDto, CreatePlanDto, UpdatePlanDto, PlanDto, CreateSubscriptionDto, UpdateSubscriptionDto, SubscriptionDto } from '@forklaunch/interfaces-billing/types';
2
2
  import Stripe__default from 'stripe';
3
- import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../domain/index.js';
3
+ import { PaymentMethodEnum, CurrencyEnum, PlanCadenceEnum, BillingProviderEnum } from '../enum/index.js';
4
4
 
5
5
  type BillingPortalOmissions = 'customer';
6
6
  type StripeCreateBillingPortalDto = Omit<CreateBillingPortalDto, 'providerFields'> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/implementation-billing-stripe",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Stripe implementation for forklaunch billing",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {
@@ -13,11 +13,11 @@
13
13
  "license": "MIT",
14
14
  "author": "Forklift Technologies, Inc.",
15
15
  "exports": {
16
- "./domain": {
17
- "types": "./lib/domain/index.d.ts",
18
- "import": "./lib/domain/index.mjs",
19
- "require": "./lib/domain/index.js",
20
- "default": "./lib/domain/index.js"
16
+ "./enum": {
17
+ "types": "./lib/enum/index.d.ts",
18
+ "import": "./lib/enum/index.mjs",
19
+ "require": "./lib/enum/index.js",
20
+ "default": "./lib/enum/index.js"
21
21
  },
22
22
  "./schemas": {
23
23
  "types": "./lib/schemas/index.d.ts",
@@ -61,7 +61,7 @@
61
61
  "typedoc": "^0.28.5"
62
62
  },
63
63
  "scripts": {
64
- "build": "tsc --noEmit && tsup schemas/index.ts services/index.ts domain/index.ts types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
64
+ "build": "tsc --noEmit && tsup schemas/index.ts services/index.ts enum/index.ts types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
65
65
  "clean": "rm -rf lib pnpm.lock.yaml node_modules",
66
66
  "docs": "typedoc --out docs *",
67
67
  "format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.{ts,tsx,json}' --write",
File without changes
File without changes