@molecule/api-resource-payment 1.0.5 → 1.0.7
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/dist/plans.d.ts.map +1 -1
- package/dist/plans.js +13 -11
- package/dist/plans.js.map +1 -1
- package/package.json +2 -2
- package/dist/__tests__/index.test.d.ts +0 -5
- package/dist/__tests__/index.test.d.ts.map +0 -1
- package/dist/__tests__/index.test.js +0 -85
- package/dist/__tests__/index.test.js.map +0 -1
- package/dist/__tests__/planService.test.d.ts +0 -5
- package/dist/__tests__/planService.test.d.ts.map +0 -1
- package/dist/__tests__/planService.test.js +0 -166
- package/dist/__tests__/planService.test.js.map +0 -1
- package/dist/__tests__/plans.test.d.ts +0 -5
- package/dist/__tests__/plans.test.d.ts.map +0 -1
- package/dist/__tests__/plans.test.js +0 -296
- package/dist/__tests__/plans.test.js.map +0 -1
- package/dist/__tests__/recordService.test.d.ts +0 -5
- package/dist/__tests__/recordService.test.d.ts.map +0 -1
- package/dist/__tests__/recordService.test.js +0 -214
- package/dist/__tests__/recordService.test.js.map +0 -1
- package/dist/__tests__/resource.test.d.ts +0 -5
- package/dist/__tests__/resource.test.d.ts.map +0 -1
- package/dist/__tests__/resource.test.js +0 -56
- package/dist/__tests__/resource.test.js.map +0 -1
- package/dist/__tests__/schema.test.d.ts +0 -5
- package/dist/__tests__/schema.test.d.ts.map +0 -1
- package/dist/__tests__/schema.test.js +0 -275
- package/dist/__tests__/schema.test.js.map +0 -1
- package/dist/__tests__/utilities.test.d.ts +0 -5
- package/dist/__tests__/utilities.test.d.ts.map +0 -1
- package/dist/__tests__/utilities.test.js +0 -59
- package/dist/__tests__/utilities.test.js.map +0 -1
package/dist/plans.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAwBtC,gEAAgE;AAChE,eAAO,MAAM,aAAa,EAAE,IAe3B,CAAA;AAED,+DAA+D;AAC/D,eAAO,MAAM,YAAY,EAAE,IAmB1B,CAAA;AAED,4EAA4E;AAC5E,eAAO,MAAM,YAAY,EAAE,IAe1B,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,WAAW,EAAE,IAmBzB,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,IAe3B,CAAA;AAED,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,IAmB1B,CAAA;AAED,uGAAuG;AACvG,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAQtC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,GAAI,aAAa,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAG,IAIjE,CAAA"}
|
package/dist/plans.js
CHANGED
|
@@ -9,10 +9,12 @@ const defaultPlan = {
|
|
|
9
9
|
title: t('payment.plan.free.title', undefined, { defaultValue: 'Free' }),
|
|
10
10
|
titleKey: 'payment.plan.free.title',
|
|
11
11
|
description: t('payment.plan.free.description', undefined, {
|
|
12
|
-
defaultValue: '
|
|
12
|
+
defaultValue: 'Certain features are limited. Upgrade your plan to unlock premium features.',
|
|
13
13
|
}),
|
|
14
14
|
descriptionKey: 'payment.plan.free.description',
|
|
15
|
-
shortDescription: t('payment.plan.free.shortDescription', undefined, {
|
|
15
|
+
shortDescription: t('payment.plan.free.shortDescription', undefined, {
|
|
16
|
+
defaultValue: 'Limited features and usage.',
|
|
17
|
+
}),
|
|
16
18
|
shortDescriptionKey: 'payment.plan.free.shortDescription',
|
|
17
19
|
capabilities: {
|
|
18
20
|
premium: false,
|
|
@@ -30,7 +32,7 @@ export const stripeMonthly = {
|
|
|
30
32
|
title: t('payment.plan.monthly.title', undefined, { defaultValue: 'Monthly' }),
|
|
31
33
|
titleKey: 'payment.plan.monthly.title',
|
|
32
34
|
description: t('payment.plan.premium.description', undefined, {
|
|
33
|
-
defaultValue: '
|
|
35
|
+
defaultValue: 'Premium features and unlimited usage.',
|
|
34
36
|
}),
|
|
35
37
|
descriptionKey: 'payment.plan.premium.description',
|
|
36
38
|
capabilities: { premium: true },
|
|
@@ -47,11 +49,11 @@ export const stripeYearly = {
|
|
|
47
49
|
title: t('payment.plan.yearly.title', undefined, { defaultValue: 'Yearly' }),
|
|
48
50
|
titleKey: 'payment.plan.yearly.title',
|
|
49
51
|
description: t('payment.plan.premium.description', undefined, {
|
|
50
|
-
defaultValue: '
|
|
52
|
+
defaultValue: 'Premium features and unlimited usage.',
|
|
51
53
|
}),
|
|
52
54
|
descriptionKey: 'payment.plan.premium.description',
|
|
53
55
|
highlightedDescription: t('payment.plan.yearly.highlightedDescription', undefined, {
|
|
54
|
-
defaultValue: '
|
|
56
|
+
defaultValue: 'Get one month free, every year.',
|
|
55
57
|
}),
|
|
56
58
|
highlightedDescriptionKey: 'payment.plan.yearly.highlightedDescription',
|
|
57
59
|
capabilities: { premium: true },
|
|
@@ -68,7 +70,7 @@ export const appleMonthly = {
|
|
|
68
70
|
title: t('payment.plan.monthly.title', undefined, { defaultValue: 'Monthly' }),
|
|
69
71
|
titleKey: 'payment.plan.monthly.title',
|
|
70
72
|
description: t('payment.plan.premium.description', undefined, {
|
|
71
|
-
defaultValue: '
|
|
73
|
+
defaultValue: 'Premium features and unlimited usage.',
|
|
72
74
|
}),
|
|
73
75
|
descriptionKey: 'payment.plan.premium.description',
|
|
74
76
|
capabilities: { premium: true },
|
|
@@ -85,11 +87,11 @@ export const appleYearly = {
|
|
|
85
87
|
title: t('payment.plan.yearly.title', undefined, { defaultValue: 'Yearly' }),
|
|
86
88
|
titleKey: 'payment.plan.yearly.title',
|
|
87
89
|
description: t('payment.plan.premium.description', undefined, {
|
|
88
|
-
defaultValue: '
|
|
90
|
+
defaultValue: 'Premium features and unlimited usage.',
|
|
89
91
|
}),
|
|
90
92
|
descriptionKey: 'payment.plan.premium.description',
|
|
91
93
|
highlightedDescription: t('payment.plan.yearly.highlightedDescription', undefined, {
|
|
92
|
-
defaultValue: '
|
|
94
|
+
defaultValue: 'Get one month free, every year.',
|
|
93
95
|
}),
|
|
94
96
|
highlightedDescriptionKey: 'payment.plan.yearly.highlightedDescription',
|
|
95
97
|
capabilities: { premium: true },
|
|
@@ -106,7 +108,7 @@ export const googleMonthly = {
|
|
|
106
108
|
title: t('payment.plan.monthly.title', undefined, { defaultValue: 'Monthly' }),
|
|
107
109
|
titleKey: 'payment.plan.monthly.title',
|
|
108
110
|
description: t('payment.plan.premium.description', undefined, {
|
|
109
|
-
defaultValue: '
|
|
111
|
+
defaultValue: 'Premium features and unlimited usage.',
|
|
110
112
|
}),
|
|
111
113
|
descriptionKey: 'payment.plan.premium.description',
|
|
112
114
|
capabilities: { premium: true },
|
|
@@ -123,11 +125,11 @@ export const googleYearly = {
|
|
|
123
125
|
title: t('payment.plan.yearly.title', undefined, { defaultValue: 'Yearly' }),
|
|
124
126
|
titleKey: 'payment.plan.yearly.title',
|
|
125
127
|
description: t('payment.plan.premium.description', undefined, {
|
|
126
|
-
defaultValue: '
|
|
128
|
+
defaultValue: 'Premium features and unlimited usage.',
|
|
127
129
|
}),
|
|
128
130
|
descriptionKey: 'payment.plan.premium.description',
|
|
129
131
|
highlightedDescription: t('payment.plan.yearly.highlightedDescription', undefined, {
|
|
130
|
-
defaultValue: '
|
|
132
|
+
defaultValue: 'Get one month free, every year.',
|
|
131
133
|
}),
|
|
132
134
|
highlightedDescriptionKey: 'payment.plan.yearly.highlightedDescription',
|
|
133
135
|
capabilities: { premium: true },
|
package/dist/plans.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../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f,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,aAAa;IACb,YAAY;CACb,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAiC,EAAQ,EAAE;IACvE,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1D,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;IACvB,CAAC;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/api-resource-payment",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Payment resource with subscription plan management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@molecule/api-bond": "1.0.4",
|
|
30
|
-
"@molecule/api-locales-payment": "1.0.
|
|
30
|
+
"@molecule/api-locales-payment": "1.0.3",
|
|
31
31
|
"@molecule/api-payments": "1.2.3",
|
|
32
32
|
"@types/node": "26.6.5",
|
|
33
33
|
"typescript": "6.0.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the Payment resource package exports.
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
5
|
-
// Mock @molecule/api-database
|
|
6
|
-
vi.mock('@molecule/api-database', () => ({
|
|
7
|
-
query: vi.fn(),
|
|
8
|
-
}));
|
|
9
|
-
// Mock @molecule/api-bond (recordService uses getLogger and getAnalytics from api-bond)
|
|
10
|
-
vi.mock('@molecule/api-bond', () => ({
|
|
11
|
-
getAnalytics: () => ({
|
|
12
|
-
identify: vi.fn().mockResolvedValue(undefined),
|
|
13
|
-
track: vi.fn().mockResolvedValue(undefined),
|
|
14
|
-
page: vi.fn().mockResolvedValue(undefined),
|
|
15
|
-
}),
|
|
16
|
-
getLogger: () => ({
|
|
17
|
-
info: vi.fn(),
|
|
18
|
-
warn: vi.fn(),
|
|
19
|
-
error: vi.fn(),
|
|
20
|
-
debug: vi.fn(),
|
|
21
|
-
trace: vi.fn(),
|
|
22
|
-
}),
|
|
23
|
-
get: vi.fn(),
|
|
24
|
-
set: vi.fn(),
|
|
25
|
-
getAll: vi.fn(),
|
|
26
|
-
}));
|
|
27
|
-
// Mock the i18n module to avoid dynamic import of unbuilt locale packages
|
|
28
|
-
vi.mock('../i18n.js', () => ({
|
|
29
|
-
i18nRegistered: true,
|
|
30
|
-
}));
|
|
31
|
-
import * as PaymentModule from '../index.js';
|
|
32
|
-
describe('Payment package exports', () => {
|
|
33
|
-
it('should export resource', () => {
|
|
34
|
-
expect(PaymentModule.resource).toBeDefined();
|
|
35
|
-
expect(PaymentModule.resource.name).toBe('Payment');
|
|
36
|
-
expect(PaymentModule.resource.tableName).toBe('payments');
|
|
37
|
-
});
|
|
38
|
-
it('should export plans', () => {
|
|
39
|
-
expect(PaymentModule.plans).toBeDefined();
|
|
40
|
-
expect(typeof PaymentModule.plans).toBe('object');
|
|
41
|
-
});
|
|
42
|
-
it('should export individual plan definitions', () => {
|
|
43
|
-
expect(PaymentModule.stripeMonthly).toBeDefined();
|
|
44
|
-
expect(PaymentModule.stripeYearly).toBeDefined();
|
|
45
|
-
expect(PaymentModule.appleMonthly).toBeDefined();
|
|
46
|
-
expect(PaymentModule.appleYearly).toBeDefined();
|
|
47
|
-
expect(PaymentModule.googleMonthly).toBeDefined();
|
|
48
|
-
expect(PaymentModule.googleYearly).toBeDefined();
|
|
49
|
-
});
|
|
50
|
-
it('should export getPeriodTime utility', () => {
|
|
51
|
-
expect(PaymentModule.getPeriodTime).toBeDefined();
|
|
52
|
-
expect(typeof PaymentModule.getPeriodTime).toBe('function');
|
|
53
|
-
});
|
|
54
|
-
it('should export types namespace', () => {
|
|
55
|
-
expect(PaymentModule.types).toBeDefined();
|
|
56
|
-
});
|
|
57
|
-
it('should export propsSchema', () => {
|
|
58
|
-
expect(PaymentModule.propsSchema).toBeDefined();
|
|
59
|
-
expect(PaymentModule.propsSchema.safeParse).toBeDefined();
|
|
60
|
-
});
|
|
61
|
-
it('should export createPropsSchema', () => {
|
|
62
|
-
expect(PaymentModule.createPropsSchema).toBeDefined();
|
|
63
|
-
expect(PaymentModule.createPropsSchema.safeParse).toBeDefined();
|
|
64
|
-
});
|
|
65
|
-
it('should export updatePropsSchema', () => {
|
|
66
|
-
expect(PaymentModule.updatePropsSchema).toBeDefined();
|
|
67
|
-
expect(PaymentModule.updatePropsSchema.safeParse).toBeDefined();
|
|
68
|
-
});
|
|
69
|
-
it('should export planService', () => {
|
|
70
|
-
expect(PaymentModule.planService).toBeDefined();
|
|
71
|
-
expect(typeof PaymentModule.planService.findPlan).toBe('function');
|
|
72
|
-
expect(typeof PaymentModule.planService.findPlanByProductId).toBe('function');
|
|
73
|
-
expect(typeof PaymentModule.planService.getDefaultPlan).toBe('function');
|
|
74
|
-
expect(typeof PaymentModule.planService.getAllPlans).toBe('function');
|
|
75
|
-
});
|
|
76
|
-
it('should export paymentRecordService', () => {
|
|
77
|
-
expect(PaymentModule.paymentRecordService).toBeDefined();
|
|
78
|
-
expect(typeof PaymentModule.paymentRecordService.store).toBe('function');
|
|
79
|
-
expect(typeof PaymentModule.paymentRecordService.findByTransaction).toBe('function');
|
|
80
|
-
expect(typeof PaymentModule.paymentRecordService.findByCustomerData).toBe('function');
|
|
81
|
-
expect(typeof PaymentModule.paymentRecordService.findByUserId).toBe('function');
|
|
82
|
-
expect(typeof PaymentModule.paymentRecordService.deleteByUserId).toBe('function');
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
//# sourceMappingURL=index.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAEjD,8BAA8B;AAC9B,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAAC,CAAC;IACvC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;CACf,CAAC,CAAC,CAAA;AAEH,wFAAwF;AACxF,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;IACnC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC;QACnB,QAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;QAC9C,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;QAC3C,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;KAC3C,CAAC;IACF,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;QAChB,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;QACb,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE;QACb,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;QACd,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;QACd,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;KACf,CAAC;IACF,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;IACZ,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;IACZ,MAAM,EAAE,EAAE,CAAC,EAAE,EAAE;CAChB,CAAC,CAAC,CAAA;AAEH,0EAA0E;AAC1E,EAAE,CAAC,IAAI,CAAC,YA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AC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC7E,MAAM,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACxE,MAAM,CAAC,OAAO,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACvE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC,WAAW,EAAE,CAAA;QACxD,MAAM,CAAC,OAAO,aAAa,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACxE,MAAM,CAAC,OAAO,aAAa,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACpF,MAAM,CAAC,OAAO,aAAa,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACrF,MAAM,CAAC,OAAO,aAAa,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC/E,MAAM,CAAC,OAAO,aAAa,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACnF,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planService.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/planService.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests for the planService (PlanService bond implementation).
|
|
3
|
-
*/
|
|
4
|
-
import { describe, expect, it } from 'vitest';
|
|
5
|
-
import { appleMonthly, appleYearly, googleMonthly, googleYearly, plans, registerPlans, stripeMonthly, stripeYearly, } from '../plans.js';
|
|
6
|
-
import { planService } from '../planService.js';
|
|
7
|
-
describe('planService.findPlan', () => {
|
|
8
|
-
it('should find the default plan by empty string key', () => {
|
|
9
|
-
const result = planService.findPlan('');
|
|
10
|
-
expect(result).not.toBeNull();
|
|
11
|
-
expect(result.planKey).toBe('');
|
|
12
|
-
expect(result.title).toBe('Free');
|
|
13
|
-
});
|
|
14
|
-
it('should find stripeMonthly by key', () => {
|
|
15
|
-
const result = planService.findPlan('stripeMonthly');
|
|
16
|
-
expect(result).not.toBeNull();
|
|
17
|
-
expect(result).toBe(stripeMonthly);
|
|
18
|
-
});
|
|
19
|
-
it('should find stripeYearly by key', () => {
|
|
20
|
-
const result = planService.findPlan('stripeYearly');
|
|
21
|
-
expect(result).not.toBeNull();
|
|
22
|
-
expect(result).toBe(stripeYearly);
|
|
23
|
-
});
|
|
24
|
-
it('should find appleMonthly by key', () => {
|
|
25
|
-
const result = planService.findPlan('appleMonthly');
|
|
26
|
-
expect(result).not.toBeNull();
|
|
27
|
-
expect(result).toBe(appleMonthly);
|
|
28
|
-
});
|
|
29
|
-
it('should find appleYearly by key', () => {
|
|
30
|
-
const result = planService.findPlan('appleYearly');
|
|
31
|
-
expect(result).not.toBeNull();
|
|
32
|
-
expect(result).toBe(appleYearly);
|
|
33
|
-
});
|
|
34
|
-
it('should find googleMonthly by key', () => {
|
|
35
|
-
const result = planService.findPlan('googleMonthly');
|
|
36
|
-
expect(result).not.toBeNull();
|
|
37
|
-
expect(result).toBe(googleMonthly);
|
|
38
|
-
});
|
|
39
|
-
it('should find googleYearly by key', () => {
|
|
40
|
-
const result = planService.findPlan('googleYearly');
|
|
41
|
-
expect(result).not.toBeNull();
|
|
42
|
-
expect(result).toBe(googleYearly);
|
|
43
|
-
});
|
|
44
|
-
it('should return null for a nonexistent plan key', () => {
|
|
45
|
-
const result = planService.findPlan('nonexistent');
|
|
46
|
-
expect(result).toBeNull();
|
|
47
|
-
});
|
|
48
|
-
it('should return null for undefined-like keys', () => {
|
|
49
|
-
const result = planService.findPlan('undefined');
|
|
50
|
-
expect(result).toBeNull();
|
|
51
|
-
});
|
|
52
|
-
it('should be case-sensitive', () => {
|
|
53
|
-
const result = planService.findPlan('STRIPEMONTHLY');
|
|
54
|
-
expect(result).toBeNull();
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
describe('planService.findPlanByProductId', () => {
|
|
58
|
-
it('should find stripeMonthly by productId', () => {
|
|
59
|
-
const result = planService.findPlanByProductId(stripeMonthly.platformProductId);
|
|
60
|
-
expect(result).not.toBeNull();
|
|
61
|
-
expect(result.planKey).toBe('stripeMonthly');
|
|
62
|
-
});
|
|
63
|
-
it('should find appleMonthly by productId', () => {
|
|
64
|
-
const result = planService.findPlanByProductId('molecule_monthly_early_adopter');
|
|
65
|
-
expect(result).not.toBeNull();
|
|
66
|
-
expect(result.planKey).toBe('appleMonthly');
|
|
67
|
-
});
|
|
68
|
-
it('should find appleYearly by productId', () => {
|
|
69
|
-
const result = planService.findPlanByProductId('molecule_yearly_early_adopter');
|
|
70
|
-
expect(result).not.toBeNull();
|
|
71
|
-
expect(result.planKey).toBe('appleYearly');
|
|
72
|
-
});
|
|
73
|
-
it('should find googleMonthly by productId', () => {
|
|
74
|
-
const result = planService.findPlanByProductId('monthly_early_adopter');
|
|
75
|
-
expect(result).not.toBeNull();
|
|
76
|
-
expect(result.planKey).toBe('googleMonthly');
|
|
77
|
-
});
|
|
78
|
-
it('should find googleYearly by productId', () => {
|
|
79
|
-
const result = planService.findPlanByProductId('yearly_early_adopter');
|
|
80
|
-
expect(result).not.toBeNull();
|
|
81
|
-
expect(result.planKey).toBe('googleYearly');
|
|
82
|
-
});
|
|
83
|
-
it('should return null for a nonexistent productId', () => {
|
|
84
|
-
const result = planService.findPlanByProductId('nonexistent_product');
|
|
85
|
-
expect(result).toBeNull();
|
|
86
|
-
});
|
|
87
|
-
it('should return null for an empty string productId', () => {
|
|
88
|
-
// The default (free) plan's platformProductId is '' — but an EMPTY
|
|
89
|
-
// platform identifier from a provider must never resolve to a plan
|
|
90
|
-
// grant. Matching '' against the free plan was an accident of the old
|
|
91
|
-
// `===` comparison; findPlanByProductId now explicitly rejects empty
|
|
92
|
-
// input and empty platformProductId values.
|
|
93
|
-
const result = planService.findPlanByProductId('');
|
|
94
|
-
expect(result).toBeNull();
|
|
95
|
-
});
|
|
96
|
-
it('should find a plan by a registered platform PRICE id', () => {
|
|
97
|
-
registerPlans({
|
|
98
|
-
customPro: {
|
|
99
|
-
planKey: 'customPro',
|
|
100
|
-
platformKey: 'stripe',
|
|
101
|
-
platformProductId: '',
|
|
102
|
-
platformPriceIds: ['price_custom_pro_monthly'],
|
|
103
|
-
alias: 'monthly',
|
|
104
|
-
period: 'month',
|
|
105
|
-
price: '$12',
|
|
106
|
-
autoRenews: true,
|
|
107
|
-
title: 'Pro',
|
|
108
|
-
titleKey: '',
|
|
109
|
-
description: 'Pro',
|
|
110
|
-
descriptionKey: '',
|
|
111
|
-
capabilities: { premium: true },
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
const result = planService.findPlanByProductId('price_custom_pro_monthly');
|
|
115
|
-
expect(result).not.toBeNull();
|
|
116
|
-
expect(result.planKey).toBe('customPro');
|
|
117
|
-
// An empty platformProductId on the registered plan must not match ''.
|
|
118
|
-
expect(planService.findPlanByProductId('')).toBeNull();
|
|
119
|
-
delete plans.customPro;
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
describe('planService.getDefaultPlan', () => {
|
|
123
|
-
it('should return the default (free) plan', () => {
|
|
124
|
-
const result = planService.getDefaultPlan();
|
|
125
|
-
expect(result).not.toBeNull();
|
|
126
|
-
expect(result.planKey).toBe('');
|
|
127
|
-
expect(result.title).toBe('Free');
|
|
128
|
-
expect(result.capabilities.premium).toBe(false);
|
|
129
|
-
});
|
|
130
|
-
it('should return the same plan as findPlan with empty string', () => {
|
|
131
|
-
const defaultPlan = planService.getDefaultPlan();
|
|
132
|
-
const foundPlan = planService.findPlan('');
|
|
133
|
-
expect(defaultPlan).toBe(foundPlan);
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
describe('planService.getAllPlans', () => {
|
|
137
|
-
it('should return all plans', () => {
|
|
138
|
-
const result = planService.getAllPlans();
|
|
139
|
-
expect(result).toHaveLength(7);
|
|
140
|
-
});
|
|
141
|
-
it('should return an array', () => {
|
|
142
|
-
const result = planService.getAllPlans();
|
|
143
|
-
expect(Array.isArray(result)).toBe(true);
|
|
144
|
-
});
|
|
145
|
-
it('should contain the default plan', () => {
|
|
146
|
-
const result = planService.getAllPlans();
|
|
147
|
-
const defaultPlan = result.find((p) => p.planKey === '');
|
|
148
|
-
expect(defaultPlan).toBeDefined();
|
|
149
|
-
});
|
|
150
|
-
it('should contain all platform plans', () => {
|
|
151
|
-
const result = planService.getAllPlans();
|
|
152
|
-
const planKeys = result.map((p) => p.planKey);
|
|
153
|
-
expect(planKeys).toContain('stripeMonthly');
|
|
154
|
-
expect(planKeys).toContain('stripeYearly');
|
|
155
|
-
expect(planKeys).toContain('appleMonthly');
|
|
156
|
-
expect(planKeys).toContain('appleYearly');
|
|
157
|
-
expect(planKeys).toContain('googleMonthly');
|
|
158
|
-
expect(planKeys).toContain('googleYearly');
|
|
159
|
-
});
|
|
160
|
-
it('should return plans that match the plans record', () => {
|
|
161
|
-
const result = planService.getAllPlans();
|
|
162
|
-
const planValues = Object.values(plans);
|
|
163
|
-
expect(result).toEqual(planValues);
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
//# sourceMappingURL=planService.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planService.test.js","sourceRoot":"","sources":["../../src/__tests__/planService.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,YAAY,EACZ,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