@forklaunch/interfaces-billing 0.1.9 → 0.1.10

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.
@@ -1,8 +1,16 @@
1
1
  import { BillingPortalServiceParameters } from '../types/billingPortal.service.types';
2
- export interface BillingPortalService<Params extends BillingPortalServiceParameters = BillingPortalServiceParameters> {
3
- createBillingPortalSession: (billingPortalDto: Params['CreateBillingPortalDto']) => Promise<Params['BillingPortalDto']>;
4
- getBillingPortalSession: (idDto: Params['IdDto']) => Promise<Params['BillingPortalDto']>;
5
- updateBillingPortalSession: (billingPortalDto: Params['UpdateBillingPortalDto']) => Promise<Params['BillingPortalDto']>;
6
- expireBillingPortalSession: (idDto: Params['IdDto']) => Promise<void>;
2
+ export interface BillingPortalService<
3
+ Params extends BillingPortalServiceParameters = BillingPortalServiceParameters
4
+ > {
5
+ createBillingPortalSession: (
6
+ billingPortalDto: Params['CreateBillingPortalDto']
7
+ ) => Promise<Params['BillingPortalDto']>;
8
+ getBillingPortalSession: (
9
+ idDto: Params['IdDto']
10
+ ) => Promise<Params['BillingPortalDto']>;
11
+ updateBillingPortalSession: (
12
+ billingPortalDto: Params['UpdateBillingPortalDto']
13
+ ) => Promise<Params['BillingPortalDto']>;
14
+ expireBillingPortalSession: (idDto: Params['IdDto']) => Promise<void>;
7
15
  }
8
- //# sourceMappingURL=billingPortal.service.interface.d.ts.map
16
+ //# sourceMappingURL=billingPortal.service.interface.d.ts.map
@@ -1,9 +1,17 @@
1
1
  import { CheckoutSessionServiceParameters } from '../types/checkoutSession.service.types';
2
- export interface CheckoutSessionService<PaymentMethodEnum, Params extends CheckoutSessionServiceParameters<PaymentMethodEnum> = CheckoutSessionServiceParameters<PaymentMethodEnum>> {
3
- createCheckoutSession: (checkoutSessionDto: Params['CreateCheckoutSessionDto']) => Promise<Params['CheckoutSessionDto']>;
4
- getCheckoutSession: (idDto: Params['IdDto']) => Promise<Params['CheckoutSessionDto']>;
5
- expireCheckoutSession: (idDto: Params['IdDto']) => Promise<void>;
6
- handleCheckoutSuccess: (idDto: Params['IdDto']) => Promise<void>;
7
- handleCheckoutFailure: (idDto: Params['IdDto']) => Promise<void>;
2
+ export interface CheckoutSessionService<
3
+ PaymentMethodEnum,
4
+ Params extends
5
+ CheckoutSessionServiceParameters<PaymentMethodEnum> = CheckoutSessionServiceParameters<PaymentMethodEnum>
6
+ > {
7
+ createCheckoutSession: (
8
+ checkoutSessionDto: Params['CreateCheckoutSessionDto']
9
+ ) => Promise<Params['CheckoutSessionDto']>;
10
+ getCheckoutSession: (
11
+ idDto: Params['IdDto']
12
+ ) => Promise<Params['CheckoutSessionDto']>;
13
+ expireCheckoutSession: (idDto: Params['IdDto']) => Promise<void>;
14
+ handleCheckoutSuccess: (idDto: Params['IdDto']) => Promise<void>;
15
+ handleCheckoutFailure: (idDto: Params['IdDto']) => Promise<void>;
8
16
  }
9
- //# sourceMappingURL=checkoutSession.service.interface.d.ts.map
17
+ //# sourceMappingURL=checkoutSession.service.interface.d.ts.map
@@ -3,4 +3,4 @@ export * from './checkoutSession.service.interface';
3
3
  export * from './paymentLink.service.interface';
4
4
  export * from './plan.service.interface';
5
5
  export * from './subscription.service.interface';
6
- //# sourceMappingURL=index.d.ts.map
6
+ //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1,21 @@
1
1
  import { PaymentLinkServiceParameters } from '../types/paymentLink.service.types';
2
- export interface PaymentLinkService<CurrencyEnum, Params extends PaymentLinkServiceParameters<CurrencyEnum> = PaymentLinkServiceParameters<CurrencyEnum>> {
3
- createPaymentLink: (paymentLink: Params['CreatePaymentLinkDto']) => Promise<Params['PaymentLinkDto']>;
4
- updatePaymentLink: (paymentLink: Params['UpdatePaymentLinkDto']) => Promise<Params['PaymentLinkDto']>;
5
- getPaymentLink: (idDto: Params['IdDto']) => Promise<Params['PaymentLinkDto']>;
6
- expirePaymentLink: (idDto: Params['IdDto']) => Promise<void>;
7
- handlePaymentSuccess: (idDto: Params['IdDto']) => Promise<void>;
8
- handlePaymentFailure: (idDto: Params['IdDto']) => Promise<void>;
9
- listPaymentLinks: (idsDto?: Params['IdsDto']) => Promise<Params['PaymentLinkDto'][]>;
2
+ export interface PaymentLinkService<
3
+ CurrencyEnum,
4
+ Params extends
5
+ PaymentLinkServiceParameters<CurrencyEnum> = PaymentLinkServiceParameters<CurrencyEnum>
6
+ > {
7
+ createPaymentLink: (
8
+ paymentLink: Params['CreatePaymentLinkDto']
9
+ ) => Promise<Params['PaymentLinkDto']>;
10
+ updatePaymentLink: (
11
+ paymentLink: Params['UpdatePaymentLinkDto']
12
+ ) => Promise<Params['PaymentLinkDto']>;
13
+ getPaymentLink: (idDto: Params['IdDto']) => Promise<Params['PaymentLinkDto']>;
14
+ expirePaymentLink: (idDto: Params['IdDto']) => Promise<void>;
15
+ handlePaymentSuccess: (idDto: Params['IdDto']) => Promise<void>;
16
+ handlePaymentFailure: (idDto: Params['IdDto']) => Promise<void>;
17
+ listPaymentLinks: (
18
+ idsDto?: Params['IdsDto']
19
+ ) => Promise<Params['PaymentLinkDto'][]>;
10
20
  }
11
- //# sourceMappingURL=paymentLink.service.interface.d.ts.map
21
+ //# sourceMappingURL=paymentLink.service.interface.d.ts.map
@@ -1,10 +1,29 @@
1
1
  import { EntityManager } from '@mikro-orm/core';
2
2
  import { PlanServiceParameters } from '../types/plan.service.types';
3
- export interface PlanService<PlanCadenceEnum, BillingProviderEnum, Params extends PlanServiceParameters<PlanCadenceEnum, BillingProviderEnum> = PlanServiceParameters<PlanCadenceEnum, BillingProviderEnum>> {
4
- createPlan: (planDto: Params['CreatePlanDto'], em?: EntityManager) => Promise<Params['PlanDto']>;
5
- getPlan: (idDto: Params['IdDto'], em?: EntityManager) => Promise<Params['PlanDto']>;
6
- updatePlan: (planDto: Params['UpdatePlanDto'], em?: EntityManager) => Promise<Params['PlanDto']>;
7
- deletePlan: (idDto: Params['IdDto'], em?: EntityManager) => Promise<void>;
8
- listPlans: (idsDto?: Params['IdsDto'], em?: EntityManager) => Promise<Params['PlanDto'][]>;
3
+ export interface PlanService<
4
+ PlanCadenceEnum,
5
+ BillingProviderEnum,
6
+ Params extends PlanServiceParameters<
7
+ PlanCadenceEnum,
8
+ BillingProviderEnum
9
+ > = PlanServiceParameters<PlanCadenceEnum, BillingProviderEnum>
10
+ > {
11
+ createPlan: (
12
+ planDto: Params['CreatePlanDto'],
13
+ em?: EntityManager
14
+ ) => Promise<Params['PlanDto']>;
15
+ getPlan: (
16
+ idDto: Params['IdDto'],
17
+ em?: EntityManager
18
+ ) => Promise<Params['PlanDto']>;
19
+ updatePlan: (
20
+ planDto: Params['UpdatePlanDto'],
21
+ em?: EntityManager
22
+ ) => Promise<Params['PlanDto']>;
23
+ deletePlan: (idDto: Params['IdDto'], em?: EntityManager) => Promise<void>;
24
+ listPlans: (
25
+ idsDto?: Params['IdsDto'],
26
+ em?: EntityManager
27
+ ) => Promise<Params['PlanDto'][]>;
9
28
  }
10
- //# sourceMappingURL=plan.service.interface.d.ts.map
29
+ //# sourceMappingURL=plan.service.interface.d.ts.map
@@ -1,14 +1,48 @@
1
1
  import { EntityManager } from '@mikro-orm/core';
2
2
  import { SubscriptionServiceParameters } from '../types/subscription.service.types';
3
- export interface SubscriptionService<PartyType, BillingProviderType, Params extends SubscriptionServiceParameters<PartyType, BillingProviderType> = SubscriptionServiceParameters<PartyType, BillingProviderType>> {
4
- createSubscription: (subscriptionDto: Params['CreateSubscriptionDto'], em?: EntityManager) => Promise<Params['SubscriptionDto']>;
5
- getSubscription: (idDto: Params['IdDto'], em?: EntityManager) => Promise<Params['SubscriptionDto']>;
6
- getUserSubscription: (idDto: Params['IdDto'], em?: EntityManager) => Promise<Params['SubscriptionDto']>;
7
- getOrganizationSubscription: (idDto: Params['IdDto'], em?: EntityManager) => Promise<Params['SubscriptionDto']>;
8
- updateSubscription: (subscriptionDto: Params['UpdateSubscriptionDto'], em?: EntityManager) => Promise<Params['SubscriptionDto']>;
9
- deleteSubscription: (id: Params['IdDto'], em?: EntityManager) => Promise<void>;
10
- listSubscriptions: (idsDto: Params['IdsDto'], em?: EntityManager) => Promise<Params['SubscriptionDto'][]>;
11
- cancelSubscription: (idDto: Params['IdDto'], em?: EntityManager) => Promise<void>;
12
- resumeSubscription: (idDto: Params['IdDto'], em?: EntityManager) => Promise<void>;
3
+ export interface SubscriptionService<
4
+ PartyType,
5
+ BillingProviderType,
6
+ Params extends SubscriptionServiceParameters<
7
+ PartyType,
8
+ BillingProviderType
9
+ > = SubscriptionServiceParameters<PartyType, BillingProviderType>
10
+ > {
11
+ createSubscription: (
12
+ subscriptionDto: Params['CreateSubscriptionDto'],
13
+ em?: EntityManager
14
+ ) => Promise<Params['SubscriptionDto']>;
15
+ getSubscription: (
16
+ idDto: Params['IdDto'],
17
+ em?: EntityManager
18
+ ) => Promise<Params['SubscriptionDto']>;
19
+ getUserSubscription: (
20
+ idDto: Params['IdDto'],
21
+ em?: EntityManager
22
+ ) => Promise<Params['SubscriptionDto']>;
23
+ getOrganizationSubscription: (
24
+ idDto: Params['IdDto'],
25
+ em?: EntityManager
26
+ ) => Promise<Params['SubscriptionDto']>;
27
+ updateSubscription: (
28
+ subscriptionDto: Params['UpdateSubscriptionDto'],
29
+ em?: EntityManager
30
+ ) => Promise<Params['SubscriptionDto']>;
31
+ deleteSubscription: (
32
+ id: Params['IdDto'],
33
+ em?: EntityManager
34
+ ) => Promise<void>;
35
+ listSubscriptions: (
36
+ idsDto: Params['IdsDto'],
37
+ em?: EntityManager
38
+ ) => Promise<Params['SubscriptionDto'][]>;
39
+ cancelSubscription: (
40
+ idDto: Params['IdDto'],
41
+ em?: EntityManager
42
+ ) => Promise<void>;
43
+ resumeSubscription: (
44
+ idDto: Params['IdDto'],
45
+ em?: EntityManager
46
+ ) => Promise<void>;
13
47
  }
14
- //# sourceMappingURL=subscription.service.interface.d.ts.map
48
+ //# sourceMappingURL=subscription.service.interface.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import type { JestConfigWithTsJest } from 'ts-jest';
2
2
  declare const jestConfig: JestConfigWithTsJest;
3
3
  export default jestConfig;
4
- //# sourceMappingURL=jest.config.d.ts.map
4
+ //# sourceMappingURL=jest.config.d.ts.map
@@ -1,19 +1,19 @@
1
1
  const jestConfig = {
2
- preset: 'ts-jest/presets/default-esm', // or other ESM presets
3
- moduleNameMapper: {
4
- '^(\\.{1,2}/.*)\\.js$': '$1'
5
- },
6
- transform: {
7
- // '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
8
- // '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
9
- '^.+\\.[tj]sx?$': [
10
- 'ts-jest',
11
- {
12
- useESM: true
13
- }
14
- ],
15
- '^.+\\.js$': 'babel-jest'
16
- },
17
- testPathIgnorePatterns: ['.*dist/', '.*node_modules/']
2
+ preset: 'ts-jest/presets/default-esm', // or other ESM presets
3
+ moduleNameMapper: {
4
+ '^(\\.{1,2}/.*)\\.js$': '$1'
5
+ },
6
+ transform: {
7
+ // '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
8
+ // '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
9
+ '^.+\\.[tj]sx?$': [
10
+ 'ts-jest',
11
+ {
12
+ useESM: true
13
+ }
14
+ ],
15
+ '^.+\\.js$': 'babel-jest'
16
+ },
17
+ testPathIgnorePatterns: ['.*dist/', '.*node_modules/']
18
18
  };
19
19
  export default jestConfig;