@forklaunch/interfaces-billing 0.1.9 → 0.1.11
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/interfaces/billingPortal.service.interface.d.ts +14 -6
- package/lib/interfaces/checkoutSession.service.interface.d.ts +15 -7
- package/lib/interfaces/index.d.ts +1 -1
- package/lib/interfaces/paymentLink.service.interface.d.ts +19 -9
- package/lib/interfaces/plan.service.interface.d.ts +26 -7
- package/lib/interfaces/subscription.service.interface.d.ts +45 -11
- package/lib/jest.config.d.ts +1 -1
- package/lib/jest.config.js +16 -16
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/billingPortal.service.types.d.ts +12 -10
- package/lib/types/checkoutSession.service.types.d.ts +15 -12
- package/lib/types/index.d.ts +1 -1
- package/lib/types/paymentLink.service.types.d.ts +17 -14
- package/lib/types/plan.service.types.d.ts +20 -17
- package/lib/types/subscription.service.types.d.ts +22 -19
- package/lib/vitest.config.d.ts +2 -2
- package/lib/vitest.config.js +4 -4
- package/package.json +9 -9
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { IdDto, RecordTimingDto } from '@forklaunch/common';
|
|
2
2
|
export type CreateBillingPortalDto = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
customerId: string;
|
|
4
|
+
uri: string;
|
|
5
|
+
expiresAt: Date;
|
|
6
|
+
extraFields?: unknown;
|
|
7
7
|
};
|
|
8
8
|
export type UpdateBillingPortalDto = IdDto & Partial<CreateBillingPortalDto>;
|
|
9
|
-
export type BillingPortalDto = IdDto &
|
|
9
|
+
export type BillingPortalDto = IdDto &
|
|
10
|
+
CreateBillingPortalDto &
|
|
11
|
+
Partial<RecordTimingDto>;
|
|
10
12
|
export type BillingPortalServiceParameters = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
CreateBillingPortalDto: CreateBillingPortalDto;
|
|
14
|
+
UpdateBillingPortalDto: UpdateBillingPortalDto;
|
|
15
|
+
BillingPortalDto: BillingPortalDto;
|
|
16
|
+
IdDto: IdDto;
|
|
15
17
|
};
|
|
16
|
-
//# sourceMappingURL=billingPortal.service.types.d.ts.map
|
|
18
|
+
//# sourceMappingURL=billingPortal.service.types.d.ts.map
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { IdDto, RecordTimingDto } from '@forklaunch/common';
|
|
2
2
|
export type CreateCheckoutSessionDto<PaymentMethodEnum> = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
customerId: string;
|
|
4
|
+
paymentMethods: PaymentMethodEnum[keyof PaymentMethodEnum][];
|
|
5
|
+
metadata?: unknown;
|
|
6
|
+
successRedirectUri: string;
|
|
7
|
+
cancelRedirectUri: string;
|
|
8
|
+
extraFields?: unknown;
|
|
9
9
|
};
|
|
10
|
-
export type UpdateCheckoutSessionDto<PaymentMethodEnum> = IdDto &
|
|
11
|
-
|
|
10
|
+
export type UpdateCheckoutSessionDto<PaymentMethodEnum> = IdDto &
|
|
11
|
+
Partial<CreateCheckoutSessionDto<PaymentMethodEnum>>;
|
|
12
|
+
export type CheckoutSessionDto<PaymentMethodEnum> = IdDto &
|
|
13
|
+
CreateCheckoutSessionDto<PaymentMethodEnum> &
|
|
14
|
+
Partial<RecordTimingDto>;
|
|
12
15
|
export type CheckoutSessionServiceParameters<PaymentMethodEnum> = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
CreateCheckoutSessionDto: CreateCheckoutSessionDto<PaymentMethodEnum>;
|
|
17
|
+
CheckoutSessionDto: CheckoutSessionDto<PaymentMethodEnum>;
|
|
18
|
+
IdDto: IdDto;
|
|
16
19
|
};
|
|
17
|
-
//# sourceMappingURL=checkoutSession.service.types.d.ts.map
|
|
20
|
+
//# sourceMappingURL=checkoutSession.service.types.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { IdDto, IdsDto, RecordTimingDto } from '@forklaunch/common';
|
|
2
2
|
export type CreatePaymentLinkDto<CurrencyEnum> = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
amount: number;
|
|
4
|
+
currency: CurrencyEnum[keyof CurrencyEnum];
|
|
5
|
+
metadata?: unknown;
|
|
6
|
+
successRedirectUri: string;
|
|
7
|
+
cancelRedirectUri: string;
|
|
8
|
+
extraFields?: unknown;
|
|
9
9
|
};
|
|
10
|
-
export type UpdatePaymentLinkDto<CurrencyEnum> = IdDto &
|
|
11
|
-
|
|
10
|
+
export type UpdatePaymentLinkDto<CurrencyEnum> = IdDto &
|
|
11
|
+
Partial<CreatePaymentLinkDto<CurrencyEnum>>;
|
|
12
|
+
export type PaymentLinkDto<CurrencyEnum> = IdDto &
|
|
13
|
+
CreatePaymentLinkDto<CurrencyEnum> &
|
|
14
|
+
Partial<RecordTimingDto>;
|
|
12
15
|
export type PaymentLinkServiceParameters<CurrencyEnum> = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
CreatePaymentLinkDto: CreatePaymentLinkDto<CurrencyEnum>;
|
|
17
|
+
UpdatePaymentLinkDto: UpdatePaymentLinkDto<CurrencyEnum>;
|
|
18
|
+
PaymentLinkDto: PaymentLinkDto<CurrencyEnum>;
|
|
19
|
+
IdDto: IdDto;
|
|
20
|
+
IdsDto: IdsDto;
|
|
18
21
|
};
|
|
19
|
-
//# sourceMappingURL=paymentLink.service.types.d.ts.map
|
|
22
|
+
//# sourceMappingURL=paymentLink.service.types.d.ts.map
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { IdDto, IdsDto, RecordTimingDto } from '@forklaunch/common';
|
|
2
2
|
export type CreatePlanDto<PlanCadenceEnum, BillingProviderEnum> = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
active: boolean;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
price: number;
|
|
7
|
+
cadence: PlanCadenceEnum[keyof PlanCadenceEnum];
|
|
8
|
+
features?: string[];
|
|
9
|
+
extraFields?: unknown;
|
|
10
|
+
externalId: string;
|
|
11
|
+
billingProvider?: BillingProviderEnum[keyof BillingProviderEnum];
|
|
12
12
|
};
|
|
13
|
-
export type UpdatePlanDto<PlanCadenceEnum, BillingProviderEnum> = IdDto &
|
|
14
|
-
|
|
13
|
+
export type UpdatePlanDto<PlanCadenceEnum, BillingProviderEnum> = IdDto &
|
|
14
|
+
Partial<CreatePlanDto<PlanCadenceEnum, BillingProviderEnum>>;
|
|
15
|
+
export type PlanDto<PlanCadenceEnum, BillingProviderEnum> = IdDto &
|
|
16
|
+
CreatePlanDto<PlanCadenceEnum, BillingProviderEnum> &
|
|
17
|
+
Partial<RecordTimingDto>;
|
|
15
18
|
export type PlanServiceParameters<PlanCadenceEnum, BillingProviderEnum> = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
CreatePlanDto: CreatePlanDto<PlanCadenceEnum, BillingProviderEnum>;
|
|
20
|
+
UpdatePlanDto: UpdatePlanDto<PlanCadenceEnum, BillingProviderEnum>;
|
|
21
|
+
PlanDto: PlanDto<PlanCadenceEnum, BillingProviderEnum>;
|
|
22
|
+
IdDto: IdDto;
|
|
23
|
+
IdsDto: IdsDto;
|
|
21
24
|
};
|
|
22
|
-
//# sourceMappingURL=plan.service.types.d.ts.map
|
|
25
|
+
//# sourceMappingURL=plan.service.types.d.ts.map
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { IdDto, IdsDto, RecordTimingDto } from '@forklaunch/common';
|
|
2
2
|
export type CreateSubscriptionDto<PartyType, BillingProviderType> = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
partyId: string;
|
|
4
|
+
partyType: PartyType[keyof PartyType];
|
|
5
|
+
description?: string;
|
|
6
|
+
active: boolean;
|
|
7
|
+
productId: string;
|
|
8
|
+
extraFields?: unknown;
|
|
9
|
+
externalId: string;
|
|
10
|
+
billingProvider?: BillingProviderType[keyof BillingProviderType];
|
|
11
|
+
startDate: Date;
|
|
12
|
+
endDate: Date;
|
|
13
|
+
status: string;
|
|
14
14
|
};
|
|
15
|
-
export type UpdateSubscriptionDto<PartyType, BillingProviderType> = IdDto &
|
|
16
|
-
|
|
15
|
+
export type UpdateSubscriptionDto<PartyType, BillingProviderType> = IdDto &
|
|
16
|
+
Partial<CreateSubscriptionDto<PartyType, BillingProviderType>>;
|
|
17
|
+
export type SubscriptionDto<PartyType, BillingProviderType> = IdDto &
|
|
18
|
+
CreateSubscriptionDto<PartyType, BillingProviderType> &
|
|
19
|
+
Partial<RecordTimingDto>;
|
|
17
20
|
export type SubscriptionServiceParameters<PartyType, BillingProviderType> = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
CreateSubscriptionDto: CreateSubscriptionDto<PartyType, BillingProviderType>;
|
|
22
|
+
UpdateSubscriptionDto: UpdateSubscriptionDto<PartyType, BillingProviderType>;
|
|
23
|
+
SubscriptionDto: SubscriptionDto<PartyType, BillingProviderType>;
|
|
24
|
+
IdDto: IdDto;
|
|
25
|
+
IdsDto: IdsDto;
|
|
23
26
|
};
|
|
24
|
-
//# sourceMappingURL=subscription.service.types.d.ts.map
|
|
27
|
+
//# sourceMappingURL=subscription.service.types.d.ts.map
|
package/lib/vitest.config.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import('vite').UserConfig;
|
|
2
2
|
export default _default;
|
|
3
|
-
//# sourceMappingURL=vitest.config.d.ts.map
|
|
3
|
+
//# sourceMappingURL=vitest.config.d.ts.map
|
package/lib/vitest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/interfaces-billing",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Billing interfaces for forklaunch",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -14,30 +14,30 @@
|
|
|
14
14
|
"author": "Forklift Technologies, Inc.",
|
|
15
15
|
"exports": {
|
|
16
16
|
"./interfaces": {
|
|
17
|
+
"types": "./lib/interfaces/index.d.ts",
|
|
17
18
|
"import": "./lib/interfaces/index.js",
|
|
18
|
-
"require": "./lib/interfaces/index.js"
|
|
19
|
-
"types": "./lib/interfaces/index.d.ts"
|
|
19
|
+
"require": "./lib/interfaces/index.js"
|
|
20
20
|
},
|
|
21
21
|
"./types": {
|
|
22
|
+
"types": "./lib/types/index.d.ts",
|
|
22
23
|
"import": "./lib/types/index.js",
|
|
23
|
-
"require": "./lib/types/index.js"
|
|
24
|
-
"types": "./lib/types/index.d.ts"
|
|
24
|
+
"require": "./lib/types/index.js"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"lib/**"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@forklaunch/common": "
|
|
32
|
-
"@mikro-orm/core": "^6.4.
|
|
31
|
+
"@forklaunch/common": "link:../../../framework/common",
|
|
32
|
+
"@mikro-orm/core": "^6.4.13"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"depcheck": "^1.4.7",
|
|
36
36
|
"prettier": "^3.5.3",
|
|
37
|
-
"typedoc": "^0.28.
|
|
37
|
+
"typedoc": "^0.28.3"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "tsc && pnpm package:eject",
|
|
40
|
+
"build": "tsc && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
|
|
41
41
|
"clean": "rm -rf lib pnpm.lock.yaml node_modules",
|
|
42
42
|
"docs": "typedoc --out docs *",
|
|
43
43
|
"format": "prettier --ignore-path=.prettierignore --config .prettierrc '**/*.{ts,tsx,json}' --write",
|