@haatlabs-core/shopify 0.19.0 → 0.22.0
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/billing.d.ts +12 -1
- package/dist/billing.js +22 -3
- package/dist/billing.js.map +1 -1
- package/dist/cjs/billing.d.ts +12 -1
- package/dist/cjs/billing.js +20 -3
- package/package.json +4 -4
package/dist/billing.d.ts
CHANGED
|
@@ -10,9 +10,13 @@ export interface AppSubscription {
|
|
|
10
10
|
createdAt: Date;
|
|
11
11
|
/** Null until the first period has started. */
|
|
12
12
|
currentPeriodEnd: Date | null;
|
|
13
|
+
/** How often its recurring charge bills (read always; left out means every 30 days). */
|
|
14
|
+
interval?: AppSubscriptionInterval;
|
|
13
15
|
}
|
|
16
|
+
/** Shopify's `AppPricingInterval` for a recurring charge. */
|
|
17
|
+
export type AppSubscriptionInterval = 'EVERY_30_DAYS' | 'ANNUAL';
|
|
14
18
|
/**
|
|
15
|
-
* Asks Shopify to charge the shop for a plan every 30 days. Nothing is charged until the
|
|
19
|
+
* Asks Shopify to charge the shop for a plan every 30 days, or every year (`ANNUAL`). Nothing is charged until the
|
|
16
20
|
* merchant approves on the page returned. An approved subscription replaces the shop's
|
|
17
21
|
* current one for this app at once; Shopify prorates.
|
|
18
22
|
*/
|
|
@@ -22,6 +26,13 @@ export declare function createAppSubscription(client: GraphQLRequester, input: {
|
|
|
22
26
|
currencyCode: string;
|
|
23
27
|
returnUrl: string;
|
|
24
28
|
test: boolean;
|
|
29
|
+
/** Every 30 days when left out. */
|
|
30
|
+
interval?: AppSubscriptionInterval;
|
|
31
|
+
/**
|
|
32
|
+
* Days before the first charge, counted from the merchant's approval. Left out (or 0):
|
|
33
|
+
* charged on approval.
|
|
34
|
+
*/
|
|
35
|
+
trialDays?: number;
|
|
25
36
|
}): Promise<{
|
|
26
37
|
subscriptionId: string;
|
|
27
38
|
confirmationUrl: string;
|
package/dist/billing.js
CHANGED
|
@@ -7,6 +7,7 @@ const CREATE_MUTATION = `
|
|
|
7
7
|
$test: Boolean
|
|
8
8
|
$lineItems: [AppSubscriptionLineItemInput!]!
|
|
9
9
|
$replacementBehavior: AppSubscriptionReplacementBehavior
|
|
10
|
+
$trialDays: Int
|
|
10
11
|
) {
|
|
11
12
|
appSubscriptionCreate(
|
|
12
13
|
name: $name
|
|
@@ -14,6 +15,7 @@ const CREATE_MUTATION = `
|
|
|
14
15
|
test: $test
|
|
15
16
|
lineItems: $lineItems
|
|
16
17
|
replacementBehavior: $replacementBehavior
|
|
18
|
+
trialDays: $trialDays
|
|
17
19
|
) {
|
|
18
20
|
appSubscription { id }
|
|
19
21
|
confirmationUrl
|
|
@@ -24,7 +26,10 @@ const CREATE_MUTATION = `
|
|
|
24
26
|
const ACTIVE_QUERY = `
|
|
25
27
|
query ActiveAppSubscriptions {
|
|
26
28
|
currentAppInstallation {
|
|
27
|
-
activeSubscriptions {
|
|
29
|
+
activeSubscriptions {
|
|
30
|
+
id name status test createdAt currentPeriodEnd
|
|
31
|
+
lineItems { plan { pricingDetails { __typename ... on AppRecurringPricing { interval } } } }
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
`;
|
|
@@ -71,8 +76,19 @@ const instant = (value) => {
|
|
|
71
76
|
const parsed = new Date(value);
|
|
72
77
|
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
73
78
|
};
|
|
79
|
+
/** ANNUAL when a recurring line item bills yearly; every 30 days otherwise. */
|
|
80
|
+
function intervalOf(lineItems) {
|
|
81
|
+
if (!Array.isArray(lineItems))
|
|
82
|
+
return 'EVERY_30_DAYS';
|
|
83
|
+
const annual = lineItems.some((item) => {
|
|
84
|
+
const details = item?.plan
|
|
85
|
+
?.pricingDetails;
|
|
86
|
+
return details?.interval === 'ANNUAL';
|
|
87
|
+
});
|
|
88
|
+
return annual ? 'ANNUAL' : 'EVERY_30_DAYS';
|
|
89
|
+
}
|
|
74
90
|
/**
|
|
75
|
-
* Asks Shopify to charge the shop for a plan every 30 days. Nothing is charged until the
|
|
91
|
+
* Asks Shopify to charge the shop for a plan every 30 days, or every year (`ANNUAL`). Nothing is charged until the
|
|
76
92
|
* merchant approves on the page returned. An approved subscription replaces the shop's
|
|
77
93
|
* current one for this app at once; Shopify prorates.
|
|
78
94
|
*/
|
|
@@ -82,12 +98,14 @@ export async function createAppSubscription(client, input) {
|
|
|
82
98
|
returnUrl: input.returnUrl,
|
|
83
99
|
test: input.test,
|
|
84
100
|
replacementBehavior: 'APPLY_IMMEDIATELY',
|
|
101
|
+
// Shopify takes whole days; a caller's fraction is rounded down, never charged after the trial.
|
|
102
|
+
...(input.trialDays && input.trialDays > 0 ? { trialDays: Math.floor(input.trialDays) } : {}),
|
|
85
103
|
lineItems: [
|
|
86
104
|
{
|
|
87
105
|
plan: {
|
|
88
106
|
appRecurringPricingDetails: {
|
|
89
107
|
price: { amount: input.amount, currencyCode: input.currencyCode },
|
|
90
|
-
interval: 'EVERY_30_DAYS',
|
|
108
|
+
interval: input.interval ?? 'EVERY_30_DAYS',
|
|
91
109
|
},
|
|
92
110
|
},
|
|
93
111
|
},
|
|
@@ -121,6 +139,7 @@ export async function listActiveAppSubscriptions(client) {
|
|
|
121
139
|
test: row.test === true,
|
|
122
140
|
createdAt,
|
|
123
141
|
currentPeriodEnd: instant(row.currentPeriodEnd),
|
|
142
|
+
interval: intervalOf(row.lineItems),
|
|
124
143
|
});
|
|
125
144
|
}
|
|
126
145
|
return found;
|
package/dist/billing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAsB3D,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GED
|
@@ -10,9 +10,13 @@ export interface AppSubscription {
|
|
|
10
10
|
createdAt: Date;
|
|
11
11
|
/** Null until the first period has started. */
|
|
12
12
|
currentPeriodEnd: Date | null;
|
|
13
|
+
/** How often its recurring charge bills (read always; left out means every 30 days). */
|
|
14
|
+
interval?: AppSubscriptionInterval;
|
|
13
15
|
}
|
|
16
|
+
/** Shopify's `AppPricingInterval` for a recurring charge. */
|
|
17
|
+
export type AppSubscriptionInterval = 'EVERY_30_DAYS' | 'ANNUAL';
|
|
14
18
|
/**
|
|
15
|
-
* Asks Shopify to charge the shop for a plan every 30 days. Nothing is charged until the
|
|
19
|
+
* Asks Shopify to charge the shop for a plan every 30 days, or every year (`ANNUAL`). Nothing is charged until the
|
|
16
20
|
* merchant approves on the page returned. An approved subscription replaces the shop's
|
|
17
21
|
* current one for this app at once; Shopify prorates.
|
|
18
22
|
*/
|
|
@@ -22,6 +26,13 @@ export declare function createAppSubscription(client: GraphQLRequester, input: {
|
|
|
22
26
|
currencyCode: string;
|
|
23
27
|
returnUrl: string;
|
|
24
28
|
test: boolean;
|
|
29
|
+
/** Every 30 days when left out. */
|
|
30
|
+
interval?: AppSubscriptionInterval;
|
|
31
|
+
/**
|
|
32
|
+
* Days before the first charge, counted from the merchant's approval. Left out (or 0):
|
|
33
|
+
* charged on approval.
|
|
34
|
+
*/
|
|
35
|
+
trialDays?: number;
|
|
25
36
|
}): Promise<{
|
|
26
37
|
subscriptionId: string;
|
|
27
38
|
confirmationUrl: string;
|
package/dist/cjs/billing.js
CHANGED
|
@@ -32,6 +32,7 @@ const CREATE_MUTATION = `
|
|
|
32
32
|
$test: Boolean
|
|
33
33
|
$lineItems: [AppSubscriptionLineItemInput!]!
|
|
34
34
|
$replacementBehavior: AppSubscriptionReplacementBehavior
|
|
35
|
+
$trialDays: Int
|
|
35
36
|
) {
|
|
36
37
|
appSubscriptionCreate(
|
|
37
38
|
name: $name
|
|
@@ -39,6 +40,7 @@ const CREATE_MUTATION = `
|
|
|
39
40
|
test: $test
|
|
40
41
|
lineItems: $lineItems
|
|
41
42
|
replacementBehavior: $replacementBehavior
|
|
43
|
+
trialDays: $trialDays
|
|
42
44
|
) {
|
|
43
45
|
appSubscription { id }
|
|
44
46
|
confirmationUrl
|
|
@@ -49,7 +51,10 @@ const CREATE_MUTATION = `
|
|
|
49
51
|
const ACTIVE_QUERY = `
|
|
50
52
|
query ActiveAppSubscriptions {
|
|
51
53
|
currentAppInstallation {
|
|
52
|
-
activeSubscriptions {
|
|
54
|
+
activeSubscriptions {
|
|
55
|
+
id name status test createdAt currentPeriodEnd
|
|
56
|
+
lineItems { plan { pricingDetails { __typename ... on AppRecurringPricing { interval } } } }
|
|
57
|
+
}
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
`;
|
|
@@ -89,18 +94,29 @@ const instant = (value) => {
|
|
|
89
94
|
const parsed = new Date(value);
|
|
90
95
|
return Number.isNaN(parsed.getTime()) ? null : parsed;
|
|
91
96
|
};
|
|
97
|
+
function intervalOf(lineItems) {
|
|
98
|
+
if (!Array.isArray(lineItems))
|
|
99
|
+
return "EVERY_30_DAYS";
|
|
100
|
+
const annual = lineItems.some((item) => {
|
|
101
|
+
const details = item?.plan?.pricingDetails;
|
|
102
|
+
return details?.interval === "ANNUAL";
|
|
103
|
+
});
|
|
104
|
+
return annual ? "ANNUAL" : "EVERY_30_DAYS";
|
|
105
|
+
}
|
|
92
106
|
async function createAppSubscription(client, input) {
|
|
93
107
|
const result = await client.request(CREATE_MUTATION, {
|
|
94
108
|
name: input.name,
|
|
95
109
|
returnUrl: input.returnUrl,
|
|
96
110
|
test: input.test,
|
|
97
111
|
replacementBehavior: "APPLY_IMMEDIATELY",
|
|
112
|
+
// Shopify takes whole days; a caller's fraction is rounded down, never charged after the trial.
|
|
113
|
+
...input.trialDays && input.trialDays > 0 ? { trialDays: Math.floor(input.trialDays) } : {},
|
|
98
114
|
lineItems: [
|
|
99
115
|
{
|
|
100
116
|
plan: {
|
|
101
117
|
appRecurringPricingDetails: {
|
|
102
118
|
price: { amount: input.amount, currencyCode: input.currencyCode },
|
|
103
|
-
interval: "EVERY_30_DAYS"
|
|
119
|
+
interval: input.interval ?? "EVERY_30_DAYS"
|
|
104
120
|
}
|
|
105
121
|
}
|
|
106
122
|
}
|
|
@@ -131,7 +147,8 @@ async function listActiveAppSubscriptions(client) {
|
|
|
131
147
|
status: typeof row.status === "string" ? row.status : "",
|
|
132
148
|
test: row.test === true,
|
|
133
149
|
createdAt,
|
|
134
|
-
currentPeriodEnd: instant(row.currentPeriodEnd)
|
|
150
|
+
currentPeriodEnd: instant(row.currentPeriodEnd),
|
|
151
|
+
interval: intervalOf(row.lineItems)
|
|
135
152
|
});
|
|
136
153
|
}
|
|
137
154
|
return found;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haatlabs-core/shopify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Shopify for Node apps: OAuth, session tokens, the Admin GraphQL client, products, webhooks and billing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"haatlabs",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@haatlabs-core/errors": "0.
|
|
76
|
+
"@haatlabs-core/errors": "0.22.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@nestjs/common": "12.1.2",
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
"jose": "^6.2.12",
|
|
84
84
|
"reflect-metadata": "^0.2.2",
|
|
85
85
|
"rxjs": "^7.8.2",
|
|
86
|
-
"@haatlabs-core/
|
|
87
|
-
"@haatlabs-core/
|
|
86
|
+
"@haatlabs-core/vitest-config": "0.22.0",
|
|
87
|
+
"@haatlabs-core/tsconfig": "0.22.0"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
90
|
"build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/build-cjs.mjs",
|