@forklaunch/implementation-billing-base 0.3.3 → 0.3.5

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.
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // schemas/index.ts
20
+ // domain/schemas/index.ts
21
21
  var schemas_exports = {};
22
22
  __export(schemas_exports, {
23
23
  BaseBillingPortalServiceSchemas: () => BaseBillingPortalServiceSchemas3,
@@ -28,10 +28,10 @@ __export(schemas_exports, {
28
28
  });
29
29
  module.exports = __toCommonJS(schemas_exports);
30
30
 
31
- // schemas/billingPortal.schema.ts
31
+ // domain/schemas/billingPortal.schema.ts
32
32
  var import_internal = require("@forklaunch/internal");
33
33
 
34
- // schemas/typebox/billingPortal.schema.ts
34
+ // domain/schemas/typebox/billingPortal.schema.ts
35
35
  var import_typebox = require("@forklaunch/validator/typebox");
36
36
  var CreateBillingPortalSchema = {
37
37
  customerId: import_typebox.string,
@@ -60,7 +60,7 @@ var BaseBillingPortalServiceSchemas = (options) => ({
60
60
  BillingPortalSchema: BillingPortalSchema(options)
61
61
  });
62
62
 
63
- // schemas/zod/billingPortal.schema.ts
63
+ // domain/schemas/zod/billingPortal.schema.ts
64
64
  var import_zod = require("@forklaunch/validator/zod");
65
65
  var CreateBillingPortalSchema2 = {
66
66
  customerId: import_zod.string,
@@ -89,16 +89,16 @@ var BaseBillingPortalServiceSchemas2 = (options) => ({
89
89
  BillingPortalSchema: BillingPortalSchema2(options)
90
90
  });
91
91
 
92
- // schemas/billingPortal.schema.ts
92
+ // domain/schemas/billingPortal.schema.ts
93
93
  var BaseBillingPortalServiceSchemas3 = (0, import_internal.serviceSchemaResolver)(
94
94
  BaseBillingPortalServiceSchemas,
95
95
  BaseBillingPortalServiceSchemas2
96
96
  );
97
97
 
98
- // schemas/checkoutSession.schema.ts
98
+ // domain/schemas/checkoutSession.schema.ts
99
99
  var import_internal2 = require("@forklaunch/internal");
100
100
 
101
- // schemas/typebox/checkoutSession.schema.ts
101
+ // domain/schemas/typebox/checkoutSession.schema.ts
102
102
  var import_typebox2 = require("@forklaunch/validator/typebox");
103
103
  var CreateCheckoutSessionSchema = (PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
104
104
  customerId: import_typebox2.string,
@@ -140,7 +140,7 @@ var BaseCheckoutSessionServiceSchemas = (options) => ({
140
140
  CheckoutSessionSchema: CheckoutSessionSchema(options)
141
141
  });
142
142
 
143
- // schemas/zod/checkoutSession.schema.ts
143
+ // domain/schemas/zod/checkoutSession.schema.ts
144
144
  var import_zod2 = require("@forklaunch/validator/zod");
145
145
  var CreateCheckoutSessionSchema2 = (PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
146
146
  customerId: import_zod2.string,
@@ -182,16 +182,16 @@ var BaseCheckoutSessionServiceSchemas2 = (options) => ({
182
182
  CheckoutSessionSchema: CheckoutSessionSchema2(options)
183
183
  });
184
184
 
185
- // schemas/checkoutSession.schema.ts
185
+ // domain/schemas/checkoutSession.schema.ts
186
186
  var BaseCheckoutSessionServiceSchemas3 = (0, import_internal2.serviceSchemaResolver)(
187
187
  BaseCheckoutSessionServiceSchemas,
188
188
  BaseCheckoutSessionServiceSchemas2
189
189
  );
190
190
 
191
- // schemas/paymentLink.schema.ts
191
+ // domain/schemas/paymentLink.schema.ts
192
192
  var import_internal3 = require("@forklaunch/internal");
193
193
 
194
- // schemas/typebox/paymentLink.schema.ts
194
+ // domain/schemas/typebox/paymentLink.schema.ts
195
195
  var import_typebox3 = require("@forklaunch/validator/typebox");
196
196
  var CreatePaymentLinkSchema = (PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
197
197
  amount: import_typebox3.number,
@@ -224,7 +224,7 @@ var BasePaymentLinkServiceSchemas = (options) => ({
224
224
  PaymentLinkSchema: PaymentLinkSchema(options)
225
225
  });
226
226
 
227
- // schemas/zod/paymentLink.schema.ts
227
+ // domain/schemas/zod/paymentLink.schema.ts
228
228
  var import_zod3 = require("@forklaunch/validator/zod");
229
229
  var CreatePaymentLinkSchema2 = (PaymentMethodEnum, CurrencyEnum, StatusEnum) => ({
230
230
  amount: import_zod3.number,
@@ -257,16 +257,16 @@ var BasePaymentLinkServiceSchemas2 = (options) => ({
257
257
  PaymentLinkSchema: PaymentLinkSchema2(options)
258
258
  });
259
259
 
260
- // schemas/paymentLink.schema.ts
260
+ // domain/schemas/paymentLink.schema.ts
261
261
  var BasePaymentLinkServiceSchemas3 = (0, import_internal3.serviceSchemaResolver)(
262
262
  BasePaymentLinkServiceSchemas,
263
263
  BasePaymentLinkServiceSchemas2
264
264
  );
265
265
 
266
- // schemas/plan.schema.ts
266
+ // domain/schemas/plan.schema.ts
267
267
  var import_internal4 = require("@forklaunch/internal");
268
268
 
269
- // schemas/typebox/plan.schema.ts
269
+ // domain/schemas/typebox/plan.schema.ts
270
270
  var import_typebox4 = require("@forklaunch/validator/typebox");
271
271
  var CreatePlanSchema = (PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) => ({
272
272
  name: import_typebox4.string,
@@ -314,7 +314,7 @@ var BasePlanServiceSchemas = (options) => ({
314
314
  PlanSchema: PlanSchema(options)
315
315
  });
316
316
 
317
- // schemas/zod/plan.schema.ts
317
+ // domain/schemas/zod/plan.schema.ts
318
318
  var import_zod4 = require("@forklaunch/validator/zod");
319
319
  var CreatePlanSchema2 = (PlanCadenceEnum, CurrencyEnum, BillingProviderEnum) => ({
320
320
  name: import_zod4.string,
@@ -362,16 +362,16 @@ var BasePlanServiceSchemas2 = (options) => ({
362
362
  PlanSchema: PlanSchema2(options)
363
363
  });
364
364
 
365
- // schemas/plan.schema.ts
365
+ // domain/schemas/plan.schema.ts
366
366
  var BasePlanServiceSchemas3 = (0, import_internal4.serviceSchemaResolver)(
367
367
  BasePlanServiceSchemas,
368
368
  BasePlanServiceSchemas2
369
369
  );
370
370
 
371
- // schemas/subscription.schema.ts
371
+ // domain/schemas/subscription.schema.ts
372
372
  var import_internal5 = require("@forklaunch/internal");
373
373
 
374
- // schemas/typebox/subscription.schema.ts
374
+ // domain/schemas/typebox/subscription.schema.ts
375
375
  var import_typebox5 = require("@forklaunch/validator/typebox");
376
376
  var CreateSubscriptionSchema = (PartyEnum, BillingProviderEnum) => ({
377
377
  partyId: import_typebox5.string,
@@ -422,7 +422,7 @@ var BaseSubscriptionServiceSchemas = (options) => ({
422
422
  SubscriptionSchema: SubscriptionSchema(options)
423
423
  });
424
424
 
425
- // schemas/zod/subscription.schema.ts
425
+ // domain/schemas/zod/subscription.schema.ts
426
426
  var import_zod5 = require("@forklaunch/validator/zod");
427
427
  var CreateSubscriptionSchema2 = (PartyEnum, BillingProviderEnum) => ({
428
428
  partyId: import_zod5.string,
@@ -473,7 +473,7 @@ var BaseSubscriptionServiceSchemas2 = (options) => ({
473
473
  SubscriptionSchema: SubscriptionSchema2(options)
474
474
  });
475
475
 
476
- // schemas/subscription.schema.ts
476
+ // domain/schemas/subscription.schema.ts
477
477
  var BaseSubscriptionServiceSchemas3 = (0, import_internal5.serviceSchemaResolver)(
478
478
  BaseSubscriptionServiceSchemas,
479
479
  BaseSubscriptionServiceSchemas2
@@ -1,7 +1,7 @@
1
- // schemas/billingPortal.schema.ts
1
+ // domain/schemas/billingPortal.schema.ts
2
2
  import { serviceSchemaResolver } from "@forklaunch/internal";
3
3
 
4
- // schemas/typebox/billingPortal.schema.ts
4
+ // domain/schemas/typebox/billingPortal.schema.ts
5
5
  import {
6
6
  date,
7
7
  optional,
@@ -36,7 +36,7 @@ var BaseBillingPortalServiceSchemas = (options) => ({
36
36
  BillingPortalSchema: BillingPortalSchema(options)
37
37
  });
38
38
 
39
- // schemas/zod/billingPortal.schema.ts
39
+ // domain/schemas/zod/billingPortal.schema.ts
40
40
  import {
41
41
  date as date2,
42
42
  optional as optional2,
@@ -71,16 +71,16 @@ var BaseBillingPortalServiceSchemas2 = (options) => ({
71
71
  BillingPortalSchema: BillingPortalSchema2(options)
72
72
  });
73
73
 
74
- // schemas/billingPortal.schema.ts
74
+ // domain/schemas/billingPortal.schema.ts
75
75
  var BaseBillingPortalServiceSchemas3 = serviceSchemaResolver(
76
76
  BaseBillingPortalServiceSchemas,
77
77
  BaseBillingPortalServiceSchemas2
78
78
  );
79
79
 
80
- // schemas/checkoutSession.schema.ts
80
+ // domain/schemas/checkoutSession.schema.ts
81
81
  import { serviceSchemaResolver as serviceSchemaResolver2 } from "@forklaunch/internal";
82
82
 
83
- // schemas/typebox/checkoutSession.schema.ts
83
+ // domain/schemas/typebox/checkoutSession.schema.ts
84
84
  import {
85
85
  array,
86
86
  date as date3,
@@ -130,7 +130,7 @@ var BaseCheckoutSessionServiceSchemas = (options) => ({
130
130
  CheckoutSessionSchema: CheckoutSessionSchema(options)
131
131
  });
132
132
 
133
- // schemas/zod/checkoutSession.schema.ts
133
+ // domain/schemas/zod/checkoutSession.schema.ts
134
134
  import {
135
135
  array as array2,
136
136
  date as date4,
@@ -180,16 +180,16 @@ var BaseCheckoutSessionServiceSchemas2 = (options) => ({
180
180
  CheckoutSessionSchema: CheckoutSessionSchema2(options)
181
181
  });
182
182
 
183
- // schemas/checkoutSession.schema.ts
183
+ // domain/schemas/checkoutSession.schema.ts
184
184
  var BaseCheckoutSessionServiceSchemas3 = serviceSchemaResolver2(
185
185
  BaseCheckoutSessionServiceSchemas,
186
186
  BaseCheckoutSessionServiceSchemas2
187
187
  );
188
188
 
189
- // schemas/paymentLink.schema.ts
189
+ // domain/schemas/paymentLink.schema.ts
190
190
  import { serviceSchemaResolver as serviceSchemaResolver3 } from "@forklaunch/internal";
191
191
 
192
- // schemas/typebox/paymentLink.schema.ts
192
+ // domain/schemas/typebox/paymentLink.schema.ts
193
193
  import {
194
194
  array as array3,
195
195
  date as date5,
@@ -231,7 +231,7 @@ var BasePaymentLinkServiceSchemas = (options) => ({
231
231
  PaymentLinkSchema: PaymentLinkSchema(options)
232
232
  });
233
233
 
234
- // schemas/zod/paymentLink.schema.ts
234
+ // domain/schemas/zod/paymentLink.schema.ts
235
235
  import {
236
236
  array as array4,
237
237
  date as date6,
@@ -273,16 +273,16 @@ var BasePaymentLinkServiceSchemas2 = (options) => ({
273
273
  PaymentLinkSchema: PaymentLinkSchema2(options)
274
274
  });
275
275
 
276
- // schemas/paymentLink.schema.ts
276
+ // domain/schemas/paymentLink.schema.ts
277
277
  var BasePaymentLinkServiceSchemas3 = serviceSchemaResolver3(
278
278
  BasePaymentLinkServiceSchemas,
279
279
  BasePaymentLinkServiceSchemas2
280
280
  );
281
281
 
282
- // schemas/plan.schema.ts
282
+ // domain/schemas/plan.schema.ts
283
283
  import { serviceSchemaResolver as serviceSchemaResolver4 } from "@forklaunch/internal";
284
284
 
285
- // schemas/typebox/plan.schema.ts
285
+ // domain/schemas/typebox/plan.schema.ts
286
286
  import {
287
287
  array as array5,
288
288
  boolean,
@@ -340,7 +340,7 @@ var BasePlanServiceSchemas = (options) => ({
340
340
  PlanSchema: PlanSchema(options)
341
341
  });
342
342
 
343
- // schemas/zod/plan.schema.ts
343
+ // domain/schemas/zod/plan.schema.ts
344
344
  import {
345
345
  array as array6,
346
346
  boolean as boolean2,
@@ -398,16 +398,16 @@ var BasePlanServiceSchemas2 = (options) => ({
398
398
  PlanSchema: PlanSchema2(options)
399
399
  });
400
400
 
401
- // schemas/plan.schema.ts
401
+ // domain/schemas/plan.schema.ts
402
402
  var BasePlanServiceSchemas3 = serviceSchemaResolver4(
403
403
  BasePlanServiceSchemas,
404
404
  BasePlanServiceSchemas2
405
405
  );
406
406
 
407
- // schemas/subscription.schema.ts
407
+ // domain/schemas/subscription.schema.ts
408
408
  import { serviceSchemaResolver as serviceSchemaResolver5 } from "@forklaunch/internal";
409
409
 
410
- // schemas/typebox/subscription.schema.ts
410
+ // domain/schemas/typebox/subscription.schema.ts
411
411
  import {
412
412
  boolean as boolean3,
413
413
  date as date9,
@@ -466,7 +466,7 @@ var BaseSubscriptionServiceSchemas = (options) => ({
466
466
  SubscriptionSchema: SubscriptionSchema(options)
467
467
  });
468
468
 
469
- // schemas/zod/subscription.schema.ts
469
+ // domain/schemas/zod/subscription.schema.ts
470
470
  import {
471
471
  boolean as boolean4,
472
472
  date as date10,
@@ -525,7 +525,7 @@ var BaseSubscriptionServiceSchemas2 = (options) => ({
525
525
  SubscriptionSchema: SubscriptionSchema2(options)
526
526
  });
527
527
 
528
- // schemas/subscription.schema.ts
528
+ // domain/schemas/subscription.schema.ts
529
529
  var BaseSubscriptionServiceSchemas3 = serviceSchemaResolver5(
530
530
  BaseSubscriptionServiceSchemas,
531
531
  BaseSubscriptionServiceSchemas2
@@ -4,7 +4,7 @@ import {
4
4
  string,
5
5
  unknown,
6
6
  uuid
7
- } from '@{{app_name}}/core';
7
+ } from '@forklaunch/validator/zod';
8
8
 
9
9
  export const CreateBillingPortalSchema = {
10
10
  customerId: string,
@@ -7,7 +7,7 @@ import {
7
7
  string,
8
8
  unknown,
9
9
  uuid
10
- } from '@{{app_name}}/core';
10
+ } from '@forklaunch/validator/zod';
11
11
 
12
12
  export const CreateCheckoutSessionSchema = <
13
13
  T extends Record<string, LiteralSchema>,
@@ -8,7 +8,7 @@ import {
8
8
  string,
9
9
  unknown,
10
10
  uuid
11
- } from '@{{app_name}}/core';
11
+ } from '@forklaunch/validator/zod';
12
12
 
13
13
  export const CreatePaymentLinkSchema = <
14
14
  T extends Record<string, LiteralSchema>,
@@ -9,7 +9,7 @@ import {
9
9
  string,
10
10
  unknown,
11
11
  uuid
12
- } from '@{{app_name}}/core';
12
+ } from '@forklaunch/validator/zod';
13
13
 
14
14
  export const CreatePlanSchema = <
15
15
  T extends Record<string, LiteralSchema>,
@@ -7,7 +7,7 @@ import {
7
7
  string,
8
8
  unknown,
9
9
  uuid
10
- } from '@{{app_name}}/core';
10
+ } from '@forklaunch/validator/zod';
11
11
 
12
12
  export const CreateSubscriptionSchema = <
13
13
  T extends Record<string, LiteralSchema>,
@@ -16,8 +16,8 @@ import {
16
16
  } from '@forklaunch/internal';
17
17
  import { AnySchemaValidator } from '@forklaunch/validator';
18
18
  import { EntityManager } from '@mikro-orm/core';
19
- import { BaseBillingDtos } from '../types/baseBillingDto.types';
20
- import { BaseBillingEntities } from '../types/baseBillingEntity.types';
19
+ import { BaseBillingDtos } from '../domain/types/baseBillingDto.types';
20
+ import { BaseBillingEntities } from '../domain/types/baseBillingEntity.types';
21
21
 
22
22
  export class BaseBillingPortalService<
23
23
  SchemaValidator extends AnySchemaValidator,
@@ -15,8 +15,8 @@ import {
15
15
  } from '@forklaunch/internal';
16
16
  import { AnySchemaValidator } from '@forklaunch/validator';
17
17
  import { EntityManager } from '@mikro-orm/core';
18
- import { BaseCheckoutSessionDtos } from '../types/baseBillingDto.types';
19
- import { BaseCheckoutSessionEntities } from '../types/baseBillingEntity.types';
18
+ import { BaseCheckoutSessionDtos } from '../domain/types/baseBillingDto.types';
19
+ import { BaseCheckoutSessionEntities } from '../domain/types/baseBillingEntity.types';
20
20
 
21
21
  export class BaseCheckoutSessionService<
22
22
  SchemaValidator extends AnySchemaValidator,
@@ -15,8 +15,8 @@ import {
15
15
  } from '@forklaunch/internal';
16
16
  import { AnySchemaValidator } from '@forklaunch/validator';
17
17
  import { EntityManager } from '@mikro-orm/core';
18
- import { BasePaymentLinkDtos } from '../types/baseBillingDto.types';
19
- import { BasePaymentLinkEntities } from '../types/baseBillingEntity.types';
18
+ import { BasePaymentLinkDtos } from '../domain/types/baseBillingDto.types';
19
+ import { BasePaymentLinkEntities } from '../domain/types/baseBillingEntity.types';
20
20
 
21
21
  export class BasePaymentLinkService<
22
22
  SchemaValidator extends AnySchemaValidator,
@@ -14,8 +14,8 @@ import {
14
14
  } from '@forklaunch/internal';
15
15
  import { AnySchemaValidator } from '@forklaunch/validator';
16
16
  import { EntityManager } from '@mikro-orm/core';
17
- import { BasePlanDtos } from '../types/baseBillingDto.types';
18
- import { BasePlanEntities } from '../types/baseBillingEntity.types';
17
+ import { BasePlanDtos } from '../domain/types/baseBillingDto.types';
18
+ import { BasePlanEntities } from '../domain/types/baseBillingEntity.types';
19
19
 
20
20
  export class BasePlanService<
21
21
  SchemaValidator extends AnySchemaValidator,
@@ -14,8 +14,8 @@ import {
14
14
  } from '@forklaunch/internal';
15
15
  import { AnySchemaValidator } from '@forklaunch/validator';
16
16
  import { EntityManager } from '@mikro-orm/core';
17
- import { BaseSubscriptionDtos } from '../types/baseBillingDto.types';
18
- import { BaseSubscriptionEntities } from '../types/baseBillingEntity.types';
17
+ import { BaseSubscriptionDtos } from '../domain/types/baseBillingDto.types';
18
+ import { BaseSubscriptionEntities } from '../domain/types/baseBillingEntity.types';
19
19
 
20
20
  export class BaseSubscriptionService<
21
21
  SchemaValidator extends AnySchemaValidator,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forklaunch/implementation-billing-base",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Billing basic implementation for forklaunch",
5
5
  "homepage": "https://github.com/forklaunch/forklaunch-js#readme",
6
6
  "bugs": {
@@ -14,16 +14,22 @@
14
14
  "author": "Forklift Technologies, Inc.",
15
15
  "exports": {
16
16
  "./schemas": {
17
- "types": "./lib/schemas/index.d.ts",
18
- "import": "./lib/schemas/index.mjs",
19
- "require": "./lib/schemas/index.js",
20
- "default": "./lib/schemas/index.js"
17
+ "types": "./lib/domain/schemas/index.d.ts",
18
+ "import": "./lib/domain/schemas/index.mjs",
19
+ "require": "./lib/domain/schemas/index.js",
20
+ "default": "./lib/domain/schemas/index.js"
21
21
  },
22
22
  "./services": {
23
23
  "types": "./lib/services/index.d.ts",
24
24
  "import": "./lib/services/index.mjs",
25
25
  "require": "./lib/services/index.js",
26
26
  "default": "./lib/services/index.js"
27
+ },
28
+ "./types": {
29
+ "types": "./lib/domain/types/index.d.ts",
30
+ "import": "./lib/domain/types/index.mjs",
31
+ "require": "./lib/domain/types/index.js",
32
+ "default": "./lib/domain/types/index.js"
27
33
  }
28
34
  },
29
35
  "files": [
@@ -47,7 +53,7 @@
47
53
  "typedoc": "^0.28.5"
48
54
  },
49
55
  "scripts": {
50
- "build": "tsc --noEmit && tsup schemas/index.ts services/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",
56
+ "build": "tsc --noEmit && tsup domain/schemas/index.ts services/index.ts domain/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",
51
57
  "clean": "rm -rf lib pnpm.lock.yaml node_modules",
52
58
  "docs": "typedoc --out docs *",
53
59
  "format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.{ts,tsx,json}' --write",
File without changes
File without changes