@agnostack/next-shopify 1.8.2-alpha.3 → 1.8.2-alpha.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.
|
@@ -47,24 +47,22 @@ const handleAppBilling = (serverRuntimeConfig) => async (req, res) => {
|
|
|
47
47
|
activeSubscriptions {
|
|
48
48
|
id
|
|
49
49
|
}
|
|
50
|
-
oneTimePurchases(first: 250,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
status
|
|
55
|
-
}
|
|
50
|
+
oneTimePurchases(first: 250, reverse: true) {
|
|
51
|
+
nodes {
|
|
52
|
+
id
|
|
53
|
+
status
|
|
56
54
|
}
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
`,
|
|
60
58
|
});
|
|
61
|
-
const { currentAppInstallation: { oneTimePurchases: { nodes: _oneTimePurchases, } = {},
|
|
59
|
+
const { currentAppInstallation: { activeSubscriptions, oneTimePurchases: { nodes: _oneTimePurchases, } = {}, } = {}, } = utils_1.ensureObject((_b = currentInstallations === null || currentInstallations === void 0 ? void 0 : currentInstallations.body) === null || _b === void 0 ? void 0 : _b.data);
|
|
62
60
|
console.log(`>>> ~ currentInstallations`, currentInstallations);
|
|
63
|
-
const
|
|
64
|
-
console.log(`>>> ~ activeOneTimePurchases`, activeOneTimePurchases);
|
|
65
|
-
const activeSubscriptionPurchases = utils_1.ensureArray(_allSubscriptions).some((({ status } = {}) => (status === 'ACTIVE')));
|
|
61
|
+
const activeSubscriptionPurchases = utils_1.arrayNotEmpty(activeSubscriptions);
|
|
66
62
|
console.log(`>>> ~ activeSubscriptionPurchases`, activeSubscriptionPurchases);
|
|
67
|
-
|
|
63
|
+
const activeOneTimePurchases = utils_1.ensureArray(_oneTimePurchases).some((({ status } = {}) => (status === 'ACTIVE')));
|
|
64
|
+
console.log(`>>> ~ activeOneTimePurchases`, activeOneTimePurchases);
|
|
65
|
+
if (activeSubscriptionPurchases || activeOneTimePurchases) {
|
|
68
66
|
await Rest.delete({
|
|
69
67
|
path: '/admin/api_permissions/current.json',
|
|
70
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../../src/handlers/api/billing.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAyC;AACzC,wDAAiC;AAEjC,
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../../src/handlers/api/billing.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAyC;AACzC,wDAAiC;AAEjC,uCAOoB;AAEpB,wDAAwD;AACjD,MAAM,gBAAgB,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;;IAC1E,IAAI;QACF,MAAM,EAAE,uBAAuB,EAAE,IAAI,EAAE,GAAG,MAAA,GAAG,CAAC,OAAO,mCAAI,EAAE,CAAA;QAE3D,IAAI,mBAAW,CAAC,IAAI,CAAC,EAAE;YACrB,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAA;SAC3E;QAED,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,yBAAiB,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;QAE1E,mEAAmE;QACnE,MAAM,OAAO,GAAG,MAAM,kBAAU,CAAC,GAAG,CAAC,CAAA;QAErC,MAAM,KAA6B,MAAM,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;YACjE,OAAO;YACP,UAAU,EAAE,GAAG;YACf,WAAW,EAAE,GAAG;SACjB,CAAC,EAJI,EAAE,KAAK,OAIX,EAJgB,YAAY,cAAxB,SAA0B,CAI9B,CAAA;QAEF,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAA;QAClD,OAAO,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,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAA;aACxE;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAA;gBACjC,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,EAAE,CAAC,CAAA;aAC3E;SACF;QAED,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,YAAY,CAAC,CAAA;QAChE,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,oCAAoC,EAAE,CAAC,CAAA;KACjG;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAA;QAC9C,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC,CAAA;KACrF;AACH,CAAC,CAAA;AA9EY,QAAA,gBAAgB,oBA8E5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnostack/next-shopify",
|
|
3
|
-
"version": "1.8.2-alpha.
|
|
3
|
+
"version": "1.8.2-alpha.5",
|
|
4
4
|
"author": "agnoStack Dev <developers@agnostack.com> (https://agnostack.com)",
|
|
5
5
|
"owner": "agnoStack",
|
|
6
6
|
"description": "Please contact agnoStack via info@agnostack.com for any questions",
|