@agnostack/next-shopify 1.14.1-beta.9 → 1.15.0-beta.1
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/CHANGELOG.md +328 -0
- package/dist/lib/handlers/api/auth.js +32 -17
- package/dist/lib/handlers/api/auth.js.map +1 -1
- package/dist/lib/handlers/api/billing.d.ts.map +1 -1
- package/dist/lib/handlers/api/billing.js +31 -15
- package/dist/lib/handlers/api/billing.js.map +1 -1
- package/dist/lib/handlers/api/callback.js +54 -39
- package/dist/lib/handlers/api/callback.js.map +1 -1
- package/dist/lib/handlers/api/index.js +7 -12
- package/dist/lib/handlers/api/index.js.map +1 -1
- package/dist/lib/handlers/api/uninstall.d.ts.map +1 -1
- package/dist/lib/handlers/api/uninstall.js +30 -14
- package/dist/lib/handlers/api/uninstall.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/appInstallation.js +16 -12
- package/dist/lib/handlers/api/verifiable/appInstallation.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/graph.d.ts.map +1 -1
- package/dist/lib/handlers/api/verifiable/graph.js +55 -30
- package/dist/lib/handlers/api/verifiable/graph.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/index.js +5 -8
- package/dist/lib/handlers/api/verifiable/index.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/proxy.d.ts.map +1 -1
- package/dist/lib/handlers/api/verifiable/proxy.js +76 -51
- package/dist/lib/handlers/api/verifiable/proxy.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/rest.d.ts.map +1 -1
- package/dist/lib/handlers/api/verifiable/rest.js +51 -26
- package/dist/lib/handlers/api/verifiable/rest.js.map +1 -1
- package/dist/lib/handlers/api/verifiable/token.d.ts.map +1 -1
- package/dist/lib/handlers/api/verifiable/token.js +62 -36
- package/dist/lib/handlers/api/verifiable/token.js.map +1 -1
- package/dist/lib/handlers/api/webhook.d.ts.map +1 -1
- package/dist/lib/handlers/api/webhook.js +32 -16
- package/dist/lib/handlers/api/webhook.js.map +1 -1
- package/dist/lib/handlers/index.js +2 -5
- package/dist/lib/handlers/index.js.map +1 -1
- package/dist/lib/handlers/ssr/index.js +2 -5
- package/dist/lib/handlers/ssr/index.js.map +1 -1
- package/dist/lib/handlers/ssr/protect.js +26 -22
- package/dist/lib/handlers/ssr/protect.js.map +1 -1
- package/dist/lib/handlers/ssr/wrap.js +15 -11
- package/dist/lib/handlers/ssr/wrap.js.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +4 -12
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/utils/billing.js +27 -24
- package/dist/lib/utils/billing.js.map +1 -1
- package/dist/lib/utils/crypto.js +15 -23
- package/dist/lib/utils/crypto.js.map +1 -1
- package/dist/lib/utils/firebase.js +42 -32
- package/dist/lib/utils/firebase.js.map +1 -1
- package/dist/lib/utils/headers.js +6 -11
- package/dist/lib/utils/headers.js.map +1 -1
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.js +10 -13
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/{request.d.ts → rawbody.d.ts} +1 -1
- package/dist/lib/utils/rawbody.d.ts.map +1 -0
- package/dist/lib/utils/rawbody.js +30 -0
- package/dist/lib/utils/rawbody.js.map +1 -0
- package/dist/lib/utils/session.d.ts +1 -1
- package/dist/lib/utils/session.d.ts.map +1 -1
- package/dist/lib/utils/session.js +93 -82
- package/dist/lib/utils/session.js.map +1 -1
- package/dist/lib/utils/shopify-api-js/oauth.js +37 -22
- package/dist/lib/utils/shopify-api-js/oauth.js.map +1 -1
- package/dist/lib/utils/shopify.js +47 -37
- package/dist/lib/utils/shopify.js.map +1 -1
- package/dist/lib/utils/token.d.ts +2 -2
- package/dist/lib/utils/token.d.ts.map +1 -1
- package/dist/lib/utils/token.js +36 -20
- package/dist/lib/utils/token.js.map +1 -1
- package/dist/lib/utils/verification.d.ts +7 -1
- package/dist/lib/utils/verification.d.ts.map +1 -1
- package/dist/lib/utils/verification.js +68 -85
- package/dist/lib/utils/verification.js.map +1 -1
- package/dist/lib/withShopify.js +99 -84
- package/dist/lib/withShopify.js.map +1 -1
- package/dist/react/hooks/index.js +1 -4
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/hooks/useVerification.d.ts +3 -7
- package/dist/react/hooks/useVerification.d.ts.map +1 -1
- package/dist/react/hooks/useVerification.js +24 -61
- package/dist/react/hooks/useVerification.js.map +1 -1
- package/dist/react/index.js +1 -4
- package/dist/react/index.js.map +1 -1
- package/dist/runtime/index.js +1 -4
- package/dist/runtime/index.js.map +1 -1
- package/dist/shared/constants.js +11 -15
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/datetime.js +102 -119
- package/dist/shared/datetime.js.map +1 -1
- package/dist/shared/display.d.ts +0 -1
- package/dist/shared/display.d.ts.map +1 -1
- package/dist/shared/display.js +154 -241
- package/dist/shared/display.js.map +1 -1
- package/dist/shared/errors.d.ts +5 -0
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/errors.js +26 -12
- package/dist/shared/errors.js.map +1 -1
- package/dist/shared/graph.js +25 -18
- package/dist/shared/graph.js.map +1 -1
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +10 -11
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/match.js +17 -25
- package/dist/shared/match.js.map +1 -1
- package/dist/shared/request.d.ts +11 -0
- package/dist/shared/request.d.ts.map +1 -0
- package/dist/shared/request.js +32 -0
- package/dist/shared/request.js.map +1 -0
- package/dist/shared/shopify.d.ts +1 -1
- package/dist/shared/shopify.js +36 -34
- package/dist/shared/shopify.js.map +1 -1
- package/dist/shared/subtlecrypto.d.ts.map +1 -1
- package/dist/shared/subtlecrypto.js +39 -36
- package/dist/shared/subtlecrypto.js.map +1 -1
- package/dist/shared/verification.d.ts +24 -0
- package/dist/shared/verification.d.ts.map +1 -0
- package/dist/shared/verification.js +80 -0
- package/dist/shared/verification.js.map +1 -0
- package/dist/umd/lib/handlers/api/auth.d.ts +2 -0
- package/dist/umd/lib/handlers/api/auth.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/billing.d.ts +2 -0
- package/dist/umd/lib/handlers/api/billing.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/callback.d.ts +2 -0
- package/dist/umd/lib/handlers/api/callback.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/index.d.ts +10 -0
- package/dist/umd/lib/handlers/api/index.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/types.d.ts +1 -0
- package/dist/umd/lib/handlers/api/types.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/uninstall.d.ts +2 -0
- package/dist/umd/lib/handlers/api/uninstall.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/verifiable/appInstallation.d.ts +2 -0
- package/dist/umd/lib/handlers/api/verifiable/appInstallation.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/verifiable/graph.d.ts +2 -0
- package/dist/umd/lib/handlers/api/verifiable/graph.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/verifiable/index.d.ts +6 -0
- package/dist/umd/lib/handlers/api/verifiable/index.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/verifiable/proxy.d.ts +2 -0
- package/dist/umd/lib/handlers/api/verifiable/proxy.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/verifiable/rest.d.ts +2 -0
- package/dist/umd/lib/handlers/api/verifiable/rest.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/verifiable/token.d.ts +4 -0
- package/dist/umd/lib/handlers/api/verifiable/token.d.ts.map +1 -0
- package/dist/umd/lib/handlers/api/webhook.d.ts +2 -0
- package/dist/umd/lib/handlers/api/webhook.d.ts.map +1 -0
- package/dist/umd/lib/handlers/index.d.ts +3 -0
- package/dist/umd/lib/handlers/index.d.ts.map +1 -0
- package/dist/umd/lib/handlers/ssr/index.d.ts +3 -0
- package/dist/umd/lib/handlers/ssr/index.d.ts.map +1 -0
- package/dist/umd/lib/handlers/ssr/protect.d.ts +16 -0
- package/dist/umd/lib/handlers/ssr/protect.d.ts.map +1 -0
- package/dist/umd/lib/handlers/ssr/types.d.ts +1 -0
- package/dist/umd/lib/handlers/ssr/types.d.ts.map +1 -0
- package/dist/umd/lib/handlers/ssr/wrap.d.ts +9 -0
- package/dist/umd/lib/handlers/ssr/wrap.d.ts.map +1 -0
- package/dist/umd/lib/handlers/types.d.ts +1 -0
- package/dist/umd/lib/handlers/types.d.ts.map +1 -0
- package/dist/umd/lib/index.d.ts +5 -0
- package/dist/umd/lib/index.d.ts.map +1 -0
- package/dist/umd/lib/types.d.ts +1 -0
- package/dist/umd/lib/types.d.ts.map +1 -0
- package/dist/umd/lib/utils/billing.d.ts +24 -0
- package/dist/umd/lib/utils/billing.d.ts.map +1 -0
- package/dist/umd/lib/utils/crypto.d.ts +22 -0
- package/dist/umd/lib/utils/crypto.d.ts.map +1 -0
- package/dist/umd/lib/utils/firebase.d.ts +25 -0
- package/dist/umd/lib/utils/firebase.d.ts.map +1 -0
- package/dist/umd/lib/utils/headers.d.ts +5 -0
- package/dist/umd/lib/utils/headers.d.ts.map +1 -0
- package/dist/umd/lib/utils/index.d.ts +11 -0
- package/dist/umd/lib/utils/index.d.ts.map +1 -0
- package/dist/umd/lib/utils/rawbody.d.ts +2 -0
- package/dist/umd/lib/utils/rawbody.d.ts.map +1 -0
- package/dist/umd/lib/utils/session.d.ts +41 -0
- package/dist/umd/lib/utils/session.d.ts.map +1 -0
- package/dist/umd/lib/utils/shopify-api-js/oauth.d.ts +9 -0
- package/dist/umd/lib/utils/shopify-api-js/oauth.d.ts.map +1 -0
- package/dist/umd/lib/utils/shopify.d.ts +26 -0
- package/dist/umd/lib/utils/shopify.d.ts.map +1 -0
- package/dist/umd/lib/utils/token.d.ts +19 -0
- package/dist/umd/lib/utils/token.d.ts.map +1 -0
- package/dist/umd/lib/utils/types.d.ts +1 -0
- package/dist/umd/lib/utils/types.d.ts.map +1 -0
- package/dist/umd/lib/utils/verification.d.ts +8 -0
- package/dist/umd/lib/utils/verification.d.ts.map +1 -0
- package/dist/umd/lib/withShopify.d.ts +6 -0
- package/dist/umd/lib/withShopify.d.ts.map +1 -0
- package/dist/umd/react/hooks/index.d.ts +2 -0
- package/dist/umd/react/hooks/index.d.ts.map +1 -0
- package/dist/umd/react/hooks/useVerification.d.ts +8 -0
- package/dist/umd/react/hooks/useVerification.d.ts.map +1 -0
- package/dist/umd/react/index.d.ts +2 -0
- package/dist/umd/react/index.d.ts.map +1 -0
- package/dist/umd/react/types.d.ts +1 -0
- package/dist/umd/react/types.d.ts.map +1 -0
- package/dist/umd/react.js +813 -0
- package/dist/umd/react.js.map +1 -0
- package/dist/umd/runtime/index.d.ts +2 -0
- package/dist/umd/runtime/index.d.ts.map +1 -0
- package/dist/umd/runtime/types.d.ts +1 -0
- package/dist/umd/runtime/types.d.ts.map +1 -0
- package/dist/umd/runtime.js +2299 -0
- package/dist/umd/runtime.js.map +1 -0
- package/dist/umd/shared/constants.d.ts +211 -0
- package/dist/umd/shared/constants.d.ts.map +1 -0
- package/dist/umd/shared/datetime.d.ts +96 -0
- package/dist/umd/shared/datetime.d.ts.map +1 -0
- package/dist/umd/shared/display.d.ts +102 -0
- package/dist/umd/shared/display.d.ts.map +1 -0
- package/dist/umd/shared/errors.d.ts +24 -0
- package/dist/umd/shared/errors.d.ts.map +1 -0
- package/dist/umd/shared/graph.d.ts +24 -0
- package/dist/umd/shared/graph.d.ts.map +1 -0
- package/dist/umd/shared/index.d.ts +11 -0
- package/dist/umd/shared/index.d.ts.map +1 -0
- package/dist/umd/shared/match.d.ts +6 -0
- package/dist/umd/shared/match.d.ts.map +1 -0
- package/dist/umd/shared/request.d.ts +11 -0
- package/dist/umd/shared/request.d.ts.map +1 -0
- package/dist/umd/shared/shopify.d.ts +36 -0
- package/dist/umd/shared/shopify.d.ts.map +1 -0
- package/dist/umd/shared/subtlecrypto.d.ts +41 -0
- package/dist/umd/shared/subtlecrypto.d.ts.map +1 -0
- package/dist/umd/shared/types.d.ts +1 -0
- package/dist/umd/shared/types.d.ts.map +1 -0
- package/dist/umd/shared/verification.d.ts +24 -0
- package/dist/umd/shared/verification.d.ts.map +1 -0
- package/dist/umd/verification/index.d.ts +4 -0
- package/dist/umd/verification/index.d.ts.map +1 -0
- package/dist/umd/verification/rawbody.d.ts +2 -0
- package/dist/umd/verification/rawbody.d.ts.map +1 -0
- package/dist/umd/verification/types.d.ts +1 -0
- package/dist/umd/verification/types.d.ts.map +1 -0
- package/dist/umd/verification/verification.d.ts +8 -0
- package/dist/umd/verification/verification.d.ts.map +1 -0
- package/dist/umd/verification.js +2417 -0
- package/dist/umd/verification.js.map +1 -0
- package/dist/verification/index.d.ts +4 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +4 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/rawbody.d.ts +2 -0
- package/dist/verification/rawbody.d.ts.map +1 -0
- package/dist/verification/rawbody.js +30 -0
- package/dist/verification/rawbody.js.map +1 -0
- package/dist/verification/types.d.ts +1 -0
- package/dist/verification/types.d.ts.map +1 -0
- package/dist/verification/types.js +1 -0
- package/dist/verification/types.js.map +1 -0
- package/dist/verification/verification.d.ts +8 -0
- package/dist/verification/verification.d.ts.map +1 -0
- package/dist/verification/verification.js +72 -0
- package/dist/verification/verification.js.map +1 -0
- package/package.json +28 -4
- package/dist/lib/utils/request.d.ts.map +0 -1
- package/dist/lib/utils/request.js +0 -19
- package/dist/lib/utils/request.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,331 @@
|
|
|
1
|
+
# [1.15.0-beta.1](https://github.com/agnostack/next-shopify/compare/v1.14.1...v1.15.0-beta.1) (2023-12-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* added rollup ([3745a20](https://github.com/agnostack/next-shopify/commit/3745a2085199583b002627c12564a3d79705691c))
|
|
7
|
+
|
|
8
|
+
## [1.14.1](https://github.com/agnostack/next-shopify/compare/v1.14.0...v1.14.1) (2023-12-07)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* externalized useVerification methods ([98c66d6](https://github.com/agnostack/next-shopify/commit/98c66d626b40d0bb2b6b12bfb8c5e85d13a2d6d4))
|
|
14
|
+
* removed logs ([0f4dce9](https://github.com/agnostack/next-shopify/commit/0f4dce9b598c8133f49784ad78414375d4b84047))
|
|
15
|
+
* removed logs ([5ebe075](https://github.com/agnostack/next-shopify/commit/5ebe07542394a0e6ddc2d4bd8accbfb11aba4d0a))
|
|
16
|
+
* removed tslib importHelpers ([fc64a16](https://github.com/agnostack/next-shopify/commit/fc64a163bcacd56ed0856adc57dff8f4be97d8c8))
|
|
17
|
+
* wip ([91f00a2](https://github.com/agnostack/next-shopify/commit/91f00a26bc24f9bb1fa60ecef5ae1da1464c2c20))
|
|
18
|
+
* wip ([2972f35](https://github.com/agnostack/next-shopify/commit/2972f35ffb727ecf6eb5024147ed9cb1403be642))
|
|
19
|
+
* wip ([e350331](https://github.com/agnostack/next-shopify/commit/e3503310534755c7fcf10e4c5bc9f4cccd8e4e2a))
|
|
20
|
+
* wip ([8860ed9](https://github.com/agnostack/next-shopify/commit/8860ed90676ffaa74c82dd470481336e701338f0))
|
|
21
|
+
* wip ([7df99fa](https://github.com/agnostack/next-shopify/commit/7df99faf7e2458a6ab407fa150d1b39b4ddc06ee))
|
|
22
|
+
* wip ([b6ddf4d](https://github.com/agnostack/next-shopify/commit/b6ddf4d43671cd5c4e112e86eb92ac66c061ec6a))
|
|
23
|
+
* wip ([1749f1a](https://github.com/agnostack/next-shopify/commit/1749f1a290a4f8c6c0b16ad6e908f29f7a1745b1))
|
|
24
|
+
* wip ([e5c1c87](https://github.com/agnostack/next-shopify/commit/e5c1c8755864003c29998c6c0694d27cb17aa4cf))
|
|
25
|
+
* wip ([390b964](https://github.com/agnostack/next-shopify/commit/390b9644bc1f12db8277f3da0508a2b230280dcc))
|
|
26
|
+
* wip ([90983c7](https://github.com/agnostack/next-shopify/commit/90983c7a1768e69a5249d33e00e8d38880508394))
|
|
27
|
+
* wip ([f36ed69](https://github.com/agnostack/next-shopify/commit/f36ed691f5bef227fdfcdd516bfd226e6a2bba63))
|
|
28
|
+
* wip ([36870f3](https://github.com/agnostack/next-shopify/commit/36870f390f8658c90b71087410bbc2ab28ee09a0))
|
|
29
|
+
* wip ([2d84cd6](https://github.com/agnostack/next-shopify/commit/2d84cd68153347781fea5abeac23b6ae50b46d47))
|
|
30
|
+
* wip ([038544c](https://github.com/agnostack/next-shopify/commit/038544ce09ce8164375f4bdfce1a247a1bfd0388))
|
|
31
|
+
* wip ([49fe308](https://github.com/agnostack/next-shopify/commit/49fe3080c9993faff0fa0446ade2ae8c2c659891))
|
|
32
|
+
* wip ([c4ac3a5](https://github.com/agnostack/next-shopify/commit/c4ac3a56dabe2d86911ea2a727fc197772c4f0f3))
|
|
33
|
+
* wip ([cccdb81](https://github.com/agnostack/next-shopify/commit/cccdb8124dc99b62983810115b2119d350b4180d))
|
|
34
|
+
* wip ([7e82f0b](https://github.com/agnostack/next-shopify/commit/7e82f0b3e6289f393692636f30da2a26345ed362))
|
|
35
|
+
* wip ([b758513](https://github.com/agnostack/next-shopify/commit/b75851388f5b2d05bcf02895427f09db8bcf8427))
|
|
36
|
+
* wip ([8f22bc6](https://github.com/agnostack/next-shopify/commit/8f22bc63d86449a91d146701ab52df46bc8b2b1d))
|
|
37
|
+
* wip ([9cdb1b5](https://github.com/agnostack/next-shopify/commit/9cdb1b5a60a91e2cc9f7dded4fcbf72d9567697e))
|
|
38
|
+
* wip ([db3403c](https://github.com/agnostack/next-shopify/commit/db3403c6fd0ffdefbb5de804c2e830f405ccd3b0))
|
|
39
|
+
* wip ([f4c0c70](https://github.com/agnostack/next-shopify/commit/f4c0c701a66e3ad40f0a5de7ce66b322d6f9900d))
|
|
40
|
+
* wip ([fd45528](https://github.com/agnostack/next-shopify/commit/fd455288c785218525e325fd0c75bb5f1b7bf40f))
|
|
41
|
+
* wip ([5a1d666](https://github.com/agnostack/next-shopify/commit/5a1d66647f364d895709fba945829539b18aabe9))
|
|
42
|
+
* wip ([4ab8e64](https://github.com/agnostack/next-shopify/commit/4ab8e644c4b7a98128fbfd9919e253e2f15423f8))
|
|
43
|
+
* wip ([9f938fc](https://github.com/agnostack/next-shopify/commit/9f938fc02dc10c6c532e681bfe61b03f9a44ce2f))
|
|
44
|
+
* wip ([3a2608a](https://github.com/agnostack/next-shopify/commit/3a2608a7205ae22a88779ace18ebe082c0ebbcb9))
|
|
45
|
+
* wip ([4aa20a5](https://github.com/agnostack/next-shopify/commit/4aa20a5cd867e3c9f9d4eddb58e3cf447dfd7fbe))
|
|
46
|
+
* wip ([8af41cd](https://github.com/agnostack/next-shopify/commit/8af41cd728466bb05d7f2ac93cbbb51a8d1a5a96))
|
|
47
|
+
* wip ([a30ccc5](https://github.com/agnostack/next-shopify/commit/a30ccc5fc2a2973aebc7c350a6e552e7f2033a0c))
|
|
48
|
+
* wip ([65cb793](https://github.com/agnostack/next-shopify/commit/65cb793b99613677cf52aed2b5f3f754fc17559e))
|
|
49
|
+
* wip ([6f9f83a](https://github.com/agnostack/next-shopify/commit/6f9f83a55755b546b2f98318f10d84d36c4a92a3))
|
|
50
|
+
* wip ([cf749c7](https://github.com/agnostack/next-shopify/commit/cf749c7fd8c49ca8d3fabf9949c271b1ae1e62ad))
|
|
51
|
+
* wip ([5453e39](https://github.com/agnostack/next-shopify/commit/5453e395be18aac31c3a4dbe51aaee62e5353123))
|
|
52
|
+
* wip ([9ab8c8f](https://github.com/agnostack/next-shopify/commit/9ab8c8fa009d177f5a129960f64709ab89467dbd))
|
|
53
|
+
* wip ([d68314f](https://github.com/agnostack/next-shopify/commit/d68314fd2a0fdb6cbdaa086e1e932d4bd248611e))
|
|
54
|
+
* wip ([23dd785](https://github.com/agnostack/next-shopify/commit/23dd7853c1edb9657e856d66bbb4ca85d3072566))
|
|
55
|
+
* wip ([47d1e5e](https://github.com/agnostack/next-shopify/commit/47d1e5e2c4122370c05e78fdeb92ffe65f6e2f55))
|
|
56
|
+
* wip ([6fde15b](https://github.com/agnostack/next-shopify/commit/6fde15b0e46d4ef8ecf1e1960976ea0c79ffb74e))
|
|
57
|
+
* wip ([a150462](https://github.com/agnostack/next-shopify/commit/a1504621802508b70be2811e505e5dda39b82385))
|
|
58
|
+
* wip ([5848f92](https://github.com/agnostack/next-shopify/commit/5848f9267099abe8a34d6e83f8348035f298fd60))
|
|
59
|
+
* wip ([706c155](https://github.com/agnostack/next-shopify/commit/706c155ef8b262f009e652c22fd8fa8146f68d6a))
|
|
60
|
+
* wip ([4ddf4db](https://github.com/agnostack/next-shopify/commit/4ddf4db0f368adc29caf2e9c21a42fc710a5b37a))
|
|
61
|
+
|
|
62
|
+
## [1.14.1-beta.47](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.46...v1.14.1-beta.47) (2023-12-07)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* removed logs ([0f4dce9](https://github.com/agnostack/next-shopify/commit/0f4dce9b598c8133f49784ad78414375d4b84047))
|
|
68
|
+
|
|
69
|
+
## [1.14.1-beta.46](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.45...v1.14.1-beta.46) (2023-12-07)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* removed tslib importHelpers ([fc64a16](https://github.com/agnostack/next-shopify/commit/fc64a163bcacd56ed0856adc57dff8f4be97d8c8))
|
|
75
|
+
|
|
76
|
+
## [1.14.1-beta.45](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.44...v1.14.1-beta.45) (2023-12-07)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Bug Fixes
|
|
80
|
+
|
|
81
|
+
* removed logs ([5ebe075](https://github.com/agnostack/next-shopify/commit/5ebe07542394a0e6ddc2d4bd8accbfb11aba4d0a))
|
|
82
|
+
|
|
83
|
+
## [1.14.1-beta.44](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.43...v1.14.1-beta.44) (2023-12-07)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Bug Fixes
|
|
87
|
+
|
|
88
|
+
* wip ([91f00a2](https://github.com/agnostack/next-shopify/commit/91f00a26bc24f9bb1fa60ecef5ae1da1464c2c20))
|
|
89
|
+
|
|
90
|
+
## [1.14.1-beta.43](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.42...v1.14.1-beta.43) (2023-12-07)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Bug Fixes
|
|
94
|
+
|
|
95
|
+
* wip ([2972f35](https://github.com/agnostack/next-shopify/commit/2972f35ffb727ecf6eb5024147ed9cb1403be642))
|
|
96
|
+
|
|
97
|
+
## [1.14.1-beta.42](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.41...v1.14.1-beta.42) (2023-12-07)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
* wip ([e350331](https://github.com/agnostack/next-shopify/commit/e3503310534755c7fcf10e4c5bc9f4cccd8e4e2a))
|
|
103
|
+
|
|
104
|
+
## [1.14.1-beta.41](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.40...v1.14.1-beta.41) (2023-12-07)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Bug Fixes
|
|
108
|
+
|
|
109
|
+
* wip ([8860ed9](https://github.com/agnostack/next-shopify/commit/8860ed90676ffaa74c82dd470481336e701338f0))
|
|
110
|
+
|
|
111
|
+
## [1.14.1-beta.40](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.39...v1.14.1-beta.40) (2023-12-07)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Bug Fixes
|
|
115
|
+
|
|
116
|
+
* wip ([7df99fa](https://github.com/agnostack/next-shopify/commit/7df99faf7e2458a6ab407fa150d1b39b4ddc06ee))
|
|
117
|
+
|
|
118
|
+
## [1.14.1-beta.39](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.38...v1.14.1-beta.39) (2023-12-07)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### Bug Fixes
|
|
122
|
+
|
|
123
|
+
* externalized useVerification methods ([98c66d6](https://github.com/agnostack/next-shopify/commit/98c66d626b40d0bb2b6b12bfb8c5e85d13a2d6d4))
|
|
124
|
+
|
|
125
|
+
## [1.14.1-beta.38](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.37...v1.14.1-beta.38) (2023-12-07)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### Bug Fixes
|
|
129
|
+
|
|
130
|
+
* wip ([b6ddf4d](https://github.com/agnostack/next-shopify/commit/b6ddf4d43671cd5c4e112e86eb92ac66c061ec6a))
|
|
131
|
+
|
|
132
|
+
## [1.14.1-beta.37](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.36...v1.14.1-beta.37) (2023-12-07)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Bug Fixes
|
|
136
|
+
|
|
137
|
+
* wip ([1749f1a](https://github.com/agnostack/next-shopify/commit/1749f1a290a4f8c6c0b16ad6e908f29f7a1745b1))
|
|
138
|
+
|
|
139
|
+
## [1.14.1-beta.36](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.35...v1.14.1-beta.36) (2023-12-07)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Bug Fixes
|
|
143
|
+
|
|
144
|
+
* wip ([e5c1c87](https://github.com/agnostack/next-shopify/commit/e5c1c8755864003c29998c6c0694d27cb17aa4cf))
|
|
145
|
+
|
|
146
|
+
## [1.14.1-beta.35](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.34...v1.14.1-beta.35) (2023-12-07)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Bug Fixes
|
|
150
|
+
|
|
151
|
+
* wip ([390b964](https://github.com/agnostack/next-shopify/commit/390b9644bc1f12db8277f3da0508a2b230280dcc))
|
|
152
|
+
|
|
153
|
+
## [1.14.1-beta.34](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.33...v1.14.1-beta.34) (2023-12-07)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Bug Fixes
|
|
157
|
+
|
|
158
|
+
* wip ([90983c7](https://github.com/agnostack/next-shopify/commit/90983c7a1768e69a5249d33e00e8d38880508394))
|
|
159
|
+
|
|
160
|
+
## [1.14.1-beta.33](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.32...v1.14.1-beta.33) (2023-12-07)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Bug Fixes
|
|
164
|
+
|
|
165
|
+
* wip ([f36ed69](https://github.com/agnostack/next-shopify/commit/f36ed691f5bef227fdfcdd516bfd226e6a2bba63))
|
|
166
|
+
|
|
167
|
+
## [1.14.1-beta.32](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.31...v1.14.1-beta.32) (2023-12-07)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
### Bug Fixes
|
|
171
|
+
|
|
172
|
+
* wip ([36870f3](https://github.com/agnostack/next-shopify/commit/36870f390f8658c90b71087410bbc2ab28ee09a0))
|
|
173
|
+
|
|
174
|
+
## [1.14.1-beta.31](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.30...v1.14.1-beta.31) (2023-12-07)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### Bug Fixes
|
|
178
|
+
|
|
179
|
+
* wip ([2d84cd6](https://github.com/agnostack/next-shopify/commit/2d84cd68153347781fea5abeac23b6ae50b46d47))
|
|
180
|
+
|
|
181
|
+
## [1.14.1-beta.30](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.29...v1.14.1-beta.30) (2023-12-07)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
### Bug Fixes
|
|
185
|
+
|
|
186
|
+
* wip ([038544c](https://github.com/agnostack/next-shopify/commit/038544ce09ce8164375f4bdfce1a247a1bfd0388))
|
|
187
|
+
|
|
188
|
+
## [1.14.1-beta.29](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.28...v1.14.1-beta.29) (2023-12-07)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Bug Fixes
|
|
192
|
+
|
|
193
|
+
* wip ([49fe308](https://github.com/agnostack/next-shopify/commit/49fe3080c9993faff0fa0446ade2ae8c2c659891))
|
|
194
|
+
* wip ([c4ac3a5](https://github.com/agnostack/next-shopify/commit/c4ac3a56dabe2d86911ea2a727fc197772c4f0f3))
|
|
195
|
+
|
|
196
|
+
## [1.14.1-beta.28](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.27...v1.14.1-beta.28) (2023-12-07)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### Bug Fixes
|
|
200
|
+
|
|
201
|
+
* wip ([cccdb81](https://github.com/agnostack/next-shopify/commit/cccdb8124dc99b62983810115b2119d350b4180d))
|
|
202
|
+
|
|
203
|
+
## [1.14.1-beta.27](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.26...v1.14.1-beta.27) (2023-12-07)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
### Bug Fixes
|
|
207
|
+
|
|
208
|
+
* wip ([7e82f0b](https://github.com/agnostack/next-shopify/commit/7e82f0b3e6289f393692636f30da2a26345ed362))
|
|
209
|
+
|
|
210
|
+
## [1.14.1-beta.26](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.25...v1.14.1-beta.26) (2023-12-07)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
### Bug Fixes
|
|
214
|
+
|
|
215
|
+
* wip ([b758513](https://github.com/agnostack/next-shopify/commit/b75851388f5b2d05bcf02895427f09db8bcf8427))
|
|
216
|
+
|
|
217
|
+
## [1.14.1-beta.25](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.24...v1.14.1-beta.25) (2023-12-07)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
### Bug Fixes
|
|
221
|
+
|
|
222
|
+
* wip ([8f22bc6](https://github.com/agnostack/next-shopify/commit/8f22bc63d86449a91d146701ab52df46bc8b2b1d))
|
|
223
|
+
|
|
224
|
+
## [1.14.1-beta.24](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.23...v1.14.1-beta.24) (2023-12-07)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### Bug Fixes
|
|
228
|
+
|
|
229
|
+
* wip ([9cdb1b5](https://github.com/agnostack/next-shopify/commit/9cdb1b5a60a91e2cc9f7dded4fcbf72d9567697e))
|
|
230
|
+
|
|
231
|
+
## [1.14.1-beta.23](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.22...v1.14.1-beta.23) (2023-12-07)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### Bug Fixes
|
|
235
|
+
|
|
236
|
+
* wip ([db3403c](https://github.com/agnostack/next-shopify/commit/db3403c6fd0ffdefbb5de804c2e830f405ccd3b0))
|
|
237
|
+
|
|
238
|
+
## [1.14.1-beta.22](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.21...v1.14.1-beta.22) (2023-12-07)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### Bug Fixes
|
|
242
|
+
|
|
243
|
+
* wip ([f4c0c70](https://github.com/agnostack/next-shopify/commit/f4c0c701a66e3ad40f0a5de7ce66b322d6f9900d))
|
|
244
|
+
|
|
245
|
+
## [1.14.1-beta.21](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.20...v1.14.1-beta.21) (2023-12-07)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
### Bug Fixes
|
|
249
|
+
|
|
250
|
+
* wip ([fd45528](https://github.com/agnostack/next-shopify/commit/fd455288c785218525e325fd0c75bb5f1b7bf40f))
|
|
251
|
+
|
|
252
|
+
## [1.14.1-beta.20](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.19...v1.14.1-beta.20) (2023-12-07)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
### Bug Fixes
|
|
256
|
+
|
|
257
|
+
* wip ([5a1d666](https://github.com/agnostack/next-shopify/commit/5a1d66647f364d895709fba945829539b18aabe9))
|
|
258
|
+
|
|
259
|
+
## [1.14.1-beta.19](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.18...v1.14.1-beta.19) (2023-12-07)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
### Bug Fixes
|
|
263
|
+
|
|
264
|
+
* wip ([4ab8e64](https://github.com/agnostack/next-shopify/commit/4ab8e644c4b7a98128fbfd9919e253e2f15423f8))
|
|
265
|
+
|
|
266
|
+
## [1.14.1-beta.18](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.17...v1.14.1-beta.18) (2023-12-07)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
### Bug Fixes
|
|
270
|
+
|
|
271
|
+
* wip ([9f938fc](https://github.com/agnostack/next-shopify/commit/9f938fc02dc10c6c532e681bfe61b03f9a44ce2f))
|
|
272
|
+
|
|
273
|
+
## [1.14.1-beta.17](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.16...v1.14.1-beta.17) (2023-12-07)
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
### Bug Fixes
|
|
277
|
+
|
|
278
|
+
* wip ([3a2608a](https://github.com/agnostack/next-shopify/commit/3a2608a7205ae22a88779ace18ebe082c0ebbcb9))
|
|
279
|
+
|
|
280
|
+
## [1.14.1-beta.16](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.15...v1.14.1-beta.16) (2023-12-06)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
### Bug Fixes
|
|
284
|
+
|
|
285
|
+
* wip ([4aa20a5](https://github.com/agnostack/next-shopify/commit/4aa20a5cd867e3c9f9d4eddb58e3cf447dfd7fbe))
|
|
286
|
+
|
|
287
|
+
## [1.14.1-beta.15](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.14...v1.14.1-beta.15) (2023-12-06)
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
### Bug Fixes
|
|
291
|
+
|
|
292
|
+
* wip ([8af41cd](https://github.com/agnostack/next-shopify/commit/8af41cd728466bb05d7f2ac93cbbb51a8d1a5a96))
|
|
293
|
+
|
|
294
|
+
## [1.14.1-beta.14](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.13...v1.14.1-beta.14) (2023-12-06)
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
### Bug Fixes
|
|
298
|
+
|
|
299
|
+
* wip ([a30ccc5](https://github.com/agnostack/next-shopify/commit/a30ccc5fc2a2973aebc7c350a6e552e7f2033a0c))
|
|
300
|
+
|
|
301
|
+
## [1.14.1-beta.13](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.12...v1.14.1-beta.13) (2023-12-06)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
### Bug Fixes
|
|
305
|
+
|
|
306
|
+
* wip ([65cb793](https://github.com/agnostack/next-shopify/commit/65cb793b99613677cf52aed2b5f3f754fc17559e))
|
|
307
|
+
|
|
308
|
+
## [1.14.1-beta.12](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.11...v1.14.1-beta.12) (2023-12-06)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### Bug Fixes
|
|
312
|
+
|
|
313
|
+
* wip ([6f9f83a](https://github.com/agnostack/next-shopify/commit/6f9f83a55755b546b2f98318f10d84d36c4a92a3))
|
|
314
|
+
|
|
315
|
+
## [1.14.1-beta.11](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.10...v1.14.1-beta.11) (2023-12-06)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
### Bug Fixes
|
|
319
|
+
|
|
320
|
+
* wip ([cf749c7](https://github.com/agnostack/next-shopify/commit/cf749c7fd8c49ca8d3fabf9949c271b1ae1e62ad))
|
|
321
|
+
|
|
322
|
+
## [1.14.1-beta.10](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.9...v1.14.1-beta.10) (2023-12-06)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
### Bug Fixes
|
|
326
|
+
|
|
327
|
+
* wip ([5453e39](https://github.com/agnostack/next-shopify/commit/5453e395be18aac31c3a4dbe51aaee62e5353123))
|
|
328
|
+
|
|
1
329
|
## [1.14.1-beta.9](https://github.com/agnostack/next-shopify/compare/v1.14.1-beta.8...v1.14.1-beta.9) (2023-12-06)
|
|
2
330
|
|
|
3
331
|
|
|
@@ -1,31 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import { beginAuth, getCallback, getInitializedShopify, } from '../../utils';
|
|
22
|
+
import { isTrue, stringEmpty, PAGE_ROUTE_NAMES, } from '../../../shared';
|
|
7
23
|
// NOTE: typically handling: "/api/auth/online" and "/api/auth/offline"
|
|
8
|
-
const handleAuth = (serverRuntimeConfig) => (req, res, params) =>
|
|
24
|
+
export const handleAuth = (serverRuntimeConfig) => (req, res, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9
25
|
var _a;
|
|
10
26
|
const { PAGE_PATHS, API_PATHS, API_URLS, APP_CONFIG, } = serverRuntimeConfig;
|
|
11
27
|
const { isOnline } = params !== null && params !== void 0 ? params : {};
|
|
12
|
-
const _b = (_a = req.query) !== null && _a !== void 0 ? _a : {}, { reAuth: _reAuth } = _b, query =
|
|
28
|
+
const _b = (_a = req.query) !== null && _a !== void 0 ? _a : {}, { reAuth: _reAuth } = _b, query = __rest(_b, ["reAuth"]);
|
|
13
29
|
const { embedded, state, host, shop: _shop } = query;
|
|
14
|
-
const reAuth =
|
|
15
|
-
const shopify =
|
|
30
|
+
const reAuth = isTrue(_reAuth, 'undefined');
|
|
31
|
+
const shopify = getInitializedShopify(serverRuntimeConfig);
|
|
16
32
|
const shop = shopify.utils.sanitizeShop(_shop);
|
|
17
|
-
if (
|
|
18
|
-
return res.redirect(`${PAGE_PATHS[
|
|
33
|
+
if (stringEmpty(shop)) {
|
|
34
|
+
return res.redirect(`${PAGE_PATHS[PAGE_ROUTE_NAMES.ERROR]}?code=no_shop_provided&type=handleAuth`);
|
|
19
35
|
}
|
|
20
36
|
if (embedded === '1') {
|
|
21
|
-
const callbackUrl =
|
|
37
|
+
const callbackUrl = getCallback(API_URLS, { reAuth, isOnline });
|
|
22
38
|
// TODO: explore objectToQuerystring
|
|
23
39
|
const redirectUriParams = new URLSearchParams({ shop, host, state }).toString();
|
|
24
40
|
const queryParams = new URLSearchParams(Object.assign(Object.assign({}, query), { shop, redirectUri: `${callbackUrl}?${redirectUriParams}` })).toString();
|
|
25
|
-
return res.redirect(`${PAGE_PATHS[
|
|
41
|
+
return res.redirect(`${PAGE_PATHS[PAGE_ROUTE_NAMES.EXIT]}?${queryParams}`);
|
|
26
42
|
}
|
|
27
|
-
const callbackPath =
|
|
28
|
-
return
|
|
43
|
+
const callbackPath = getCallback(API_PATHS, { reAuth, isOnline });
|
|
44
|
+
return beginAuth({
|
|
29
45
|
shop,
|
|
30
46
|
state,
|
|
31
47
|
isOnline,
|
|
@@ -35,5 +51,4 @@ const handleAuth = (serverRuntimeConfig) => (req, res, params) => tslib_1.__awai
|
|
|
35
51
|
config: APP_CONFIG,
|
|
36
52
|
});
|
|
37
53
|
});
|
|
38
|
-
exports.handleAuth = handleAuth;
|
|
39
54
|
//# sourceMappingURL=auth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/lib/handlers/api/auth.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../src/lib/handlers/api/auth.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,MAAM,EACN,WAAW,EACX,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AAExB,wEAAwE;AACxE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAO,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;;IAC5E,MAAM,EACJ,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,GACX,GAAG,mBAAmB,CAAA;IACvB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAA;IACjC,MAAM,KAAgC,MAAA,GAAG,CAAC,KAAK,mCAAI,EAAE,EAA/C,EAAE,MAAM,EAAE,OAAO,OAA8B,EAAzB,K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EAAE,UAAU;KACnB,CAAC,CAAA;AACJ,CAAC,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../src/lib/handlers/api/billing.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../src/lib/handlers/api/billing.js"],"names":[],"mappings":"AAeO,iGAyDN"}
|
|
@@ -1,35 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import { getShopifyHelpers } from '../../utils';
|
|
22
|
+
import { ensureRawBody } from '../../../verification';
|
|
23
|
+
import { safeParse, stringEmpty, BILLING_EVENT_TYPES, } from '../../../shared';
|
|
7
24
|
const TERMINAL_STATUSES = [
|
|
8
25
|
'EXPIRED',
|
|
9
26
|
'DECLINED',
|
|
10
27
|
'CANCELLED'
|
|
11
28
|
];
|
|
12
29
|
// NOTE: typically handling: "/api/webhooks/app/billing"
|
|
13
|
-
const handleAppBilling = (serverRuntimeConfig) => (req, res) =>
|
|
30
|
+
export const handleAppBilling = (serverRuntimeConfig) => (req, res) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
31
|
var _a;
|
|
15
32
|
try {
|
|
16
33
|
const { 'x-shop-domain': shopDomain, 'x-shopify-shop-domain': shopifyShopDomain, 'x-shopify-shop': shop = shopifyShopDomain !== null && shopifyShopDomain !== void 0 ? shopifyShopDomain : shopDomain, } = (_a = req.headers) !== null && _a !== void 0 ? _a : {};
|
|
17
|
-
if (
|
|
34
|
+
if (stringEmpty(shop)) {
|
|
18
35
|
return res.status(200).json({ handler: 'billing', error: 'Missing shop' });
|
|
19
36
|
}
|
|
20
|
-
const { shopify, loadSession, updateSession, getVerifiedClients } = yield
|
|
21
|
-
// TODO: explore
|
|
22
|
-
const rawBody = yield
|
|
37
|
+
const { shopify, loadSession, updateSession, getVerifiedClients } = yield getShopifyHelpers(serverRuntimeConfig, { shop });
|
|
38
|
+
// TODO: explore getVerificationHelpers?
|
|
39
|
+
const rawBody = yield ensureRawBody(req);
|
|
23
40
|
const _b = yield shopify.webhooks.validate({
|
|
24
41
|
rawBody,
|
|
25
42
|
rawRequest: req,
|
|
26
43
|
rawResponse: res,
|
|
27
|
-
}), { valid } = _b, webhookCheck =
|
|
44
|
+
}), { valid } = _b, webhookCheck = __rest(_b, ["valid"]);
|
|
28
45
|
if (valid) {
|
|
29
46
|
try {
|
|
30
47
|
let message = 'ignored';
|
|
31
|
-
const [eventType, { status } = {}] = Object.entries(
|
|
32
|
-
if ((eventType ===
|
|
48
|
+
const [eventType, { status } = {}] = Object.entries(safeParse(rawBody || '{}'))[0];
|
|
49
|
+
if ((eventType === BILLING_EVENT_TYPES.SUBSCRIPTION) && TERMINAL_STATUSES.includes(status)) {
|
|
33
50
|
const { Rest } = yield getVerifiedClients();
|
|
34
51
|
// NOTE: this deletes the app in the case of subscription apps in a "terminal" state to cover the info in ShopifyApi docs for billing:
|
|
35
52
|
// "Note: the merchant may refuse payment when prompted or cancel subscriptions later on, but the app will already be installed at that point. We recommend using billing webhooks to revoke access for merchants when they cancel / decline payment."
|
|
@@ -57,5 +74,4 @@ const handleAppBilling = (serverRuntimeConfig) => (req, res) => tslib_1.__awaite
|
|
|
57
74
|
return res.status(200).json({ handler: 'billing', error: 'Error handling billing' });
|
|
58
75
|
}
|
|
59
76
|
});
|
|
60
|
-
exports.handleAppBilling = handleAppBilling;
|
|
61
77
|
//# sourceMappingURL=billing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../../../src/lib/handlers/api/billing.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../../../src/lib/handlers/api/billing.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EACL,SAAS,EACT,WAAW,EACX,mBAAmB,GACpB,MAAM,iBAAiB,CAAA;AAExB,MAAM,iBAAiB,GAAG;IACxB,SAAS;IACT,UAAU;IACV,WAAW;CACZ,CAAA;AAED,wDAAwD;AACxD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;;IAC1E,IAAI;QACF,MAAM,EACJ,eAAe,EAAE,UAAU,EAC3B,uBAAuB,EAAE,iBAAiB,EAC1C,gBAAgB,EAAE,IAAI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