@shopify/shopify-app-remix 2.1.0 → 2.3.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/build/cjs/server/authenticate/admin/authenticate.js +119 -501
- package/build/cjs/server/authenticate/admin/helpers/create-admin-api-context.js +18 -0
- package/build/cjs/server/authenticate/admin/helpers/ensure-app-is-embedded-if-required.js +27 -0
- package/build/cjs/server/authenticate/admin/helpers/ensure-session-token-search-param-if-required.js +25 -0
- package/build/cjs/server/authenticate/admin/helpers/redirect-to-bounce-page.js +22 -0
- package/build/cjs/server/authenticate/admin/helpers/redirect-to-shopify-or-app-root.js +22 -0
- package/build/cjs/server/authenticate/admin/helpers/trigger-after-auth-hook.js +21 -0
- package/build/cjs/server/authenticate/admin/helpers/validate-shop-and-host-params.js +32 -0
- package/build/cjs/server/authenticate/admin/strategies/auth-code-flow.js +307 -0
- package/build/cjs/server/authenticate/helpers/get-session-token-header.js +6 -0
- package/build/cjs/server/authenticate/helpers/reject-bot-request.js +2 -2
- package/build/cjs/server/authenticate/public/checkout/authenticate.js +1 -1
- package/build/cjs/server/authenticate/webhooks/authenticate.js +14 -6
- package/build/cjs/server/clients/admin/graphql.js +7 -16
- package/build/cjs/server/clients/storefront/factory.js +5 -12
- package/build/cjs/server/shopify-app.js +13 -6
- package/build/cjs/server/version.js +1 -1
- package/build/ts/server/__test-helpers/expect-admin-api-client.d.ts.map +1 -1
- package/build/ts/server/__test-helpers/expect-admin-api-client.js +2 -2
- package/build/ts/server/__test-helpers/expect-admin-api-client.js.map +1 -1
- package/build/ts/server/__test-helpers/expect-storefront-api-client.js +1 -1
- package/build/ts/server/__test-helpers/expect-storefront-api-client.js.map +1 -1
- package/build/ts/server/__test-helpers/request-mock.d.ts.map +1 -1
- package/build/ts/server/__test-helpers/request-mock.js +1 -1
- package/build/ts/server/__test-helpers/request-mock.js.map +1 -1
- package/build/ts/server/__test-helpers/test-config.d.ts +36 -7
- package/build/ts/server/__test-helpers/test-config.d.ts.map +1 -1
- package/build/ts/server/__test-helpers/test-config.js +34 -6
- package/build/ts/server/__test-helpers/test-config.js.map +1 -1
- package/build/ts/server/authenticate/admin/authenticate.d.ts +8 -25
- package/build/ts/server/authenticate/admin/authenticate.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/authenticate.js +124 -488
- package/build/ts/server/authenticate/admin/authenticate.js.map +1 -1
- package/build/ts/server/authenticate/admin/billing/types.d.ts +11 -3
- package/build/ts/server/authenticate/admin/billing/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/helpers/create-admin-api-context.d.ts +5 -0
- package/build/ts/server/authenticate/admin/helpers/create-admin-api-context.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/create-admin-api-context.js +16 -0
- package/build/ts/server/authenticate/admin/helpers/create-admin-api-context.js.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-app-is-embedded-if-required.d.ts +3 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-app-is-embedded-if-required.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-app-is-embedded-if-required.js +25 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-app-is-embedded-if-required.js.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-session-token-search-param-if-required.d.ts +3 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-session-token-search-param-if-required.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-session-token-search-param-if-required.js +23 -0
- package/build/ts/server/authenticate/admin/helpers/ensure-session-token-search-param-if-required.js.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/index.d.ts +7 -0
- package/build/ts/server/authenticate/admin/helpers/index.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/helpers/index.js +7 -0
- package/build/ts/server/authenticate/admin/helpers/index.js.map +1 -1
- package/build/ts/server/authenticate/admin/helpers/redirect-to-bounce-page.d.ts +3 -0
- package/build/ts/server/authenticate/admin/helpers/redirect-to-bounce-page.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/redirect-to-bounce-page.js +16 -0
- package/build/ts/server/authenticate/admin/helpers/redirect-to-bounce-page.js.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/redirect-to-shopify-or-app-root.d.ts +3 -0
- package/build/ts/server/authenticate/admin/helpers/redirect-to-shopify-or-app-root.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/redirect-to-shopify-or-app-root.js +32 -0
- package/build/ts/server/authenticate/admin/helpers/redirect-to-shopify-or-app-root.js.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.d.ts +4 -0
- package/build/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.js +28 -0
- package/build/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.js.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/validate-shop-and-host-params.d.ts +3 -0
- package/build/ts/server/authenticate/admin/helpers/validate-shop-and-host-params.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/validate-shop-and-host-params.js +26 -0
- package/build/ts/server/authenticate/admin/helpers/validate-shop-and-host-params.js.map +1 -0
- package/build/ts/server/authenticate/admin/strategies/auth-code-flow.d.ts +22 -0
- package/build/ts/server/authenticate/admin/strategies/auth-code-flow.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/strategies/auth-code-flow.js +321 -0
- package/build/ts/server/authenticate/admin/strategies/auth-code-flow.js.map +1 -0
- package/build/ts/server/authenticate/admin/strategies/types.d.ts +11 -0
- package/build/ts/server/authenticate/admin/strategies/types.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/strategies/types.js +3 -0
- package/build/ts/server/authenticate/admin/strategies/types.js.map +1 -0
- package/build/ts/server/authenticate/admin/types.d.ts +4 -0
- package/build/ts/server/authenticate/admin/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/helpers/get-session-token-header.d.ts +1 -0
- package/build/ts/server/authenticate/helpers/get-session-token-header.d.ts.map +1 -1
- package/build/ts/server/authenticate/helpers/get-session-token-header.js +7 -1
- package/build/ts/server/authenticate/helpers/get-session-token-header.js.map +1 -1
- package/build/ts/server/authenticate/helpers/reject-bot-request.d.ts +1 -1
- package/build/ts/server/authenticate/helpers/reject-bot-request.d.ts.map +1 -1
- package/build/ts/server/authenticate/helpers/reject-bot-request.js +3 -3
- package/build/ts/server/authenticate/helpers/reject-bot-request.js.map +1 -1
- package/build/ts/server/authenticate/public/appProxy/authenticate.public.app-proxy.doc.d.ts.map +1 -1
- package/build/ts/server/authenticate/public/appProxy/authenticate.public.app-proxy.doc.js +2 -2
- package/build/ts/server/authenticate/public/appProxy/authenticate.public.app-proxy.doc.js.map +1 -1
- package/build/ts/server/authenticate/public/appProxy/types.d.ts +6 -3
- package/build/ts/server/authenticate/public/appProxy/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/public/checkout/authenticate.js +1 -1
- package/build/ts/server/authenticate/public/checkout/authenticate.js.map +1 -1
- package/build/ts/server/authenticate/webhooks/authenticate.d.ts.map +1 -1
- package/build/ts/server/authenticate/webhooks/authenticate.js +12 -2
- package/build/ts/server/authenticate/webhooks/authenticate.js.map +1 -1
- package/build/ts/server/authenticate/webhooks/types.d.ts +12 -5
- package/build/ts/server/authenticate/webhooks/types.d.ts.map +1 -1
- package/build/ts/server/clients/admin/graphql.d.ts +3 -3
- package/build/ts/server/clients/admin/graphql.d.ts.map +1 -1
- package/build/ts/server/clients/admin/graphql.js +6 -9
- package/build/ts/server/clients/admin/graphql.js.map +1 -1
- package/build/ts/server/clients/admin/types.d.ts +53 -11
- package/build/ts/server/clients/admin/types.d.ts.map +1 -1
- package/build/ts/server/clients/storefront/factory.d.ts.map +1 -1
- package/build/ts/server/clients/storefront/factory.js +5 -8
- package/build/ts/server/clients/storefront/factory.js.map +1 -1
- package/build/ts/server/clients/storefront/types.d.ts +6 -5
- package/build/ts/server/clients/storefront/types.d.ts.map +1 -1
- package/build/ts/server/clients/types.d.ts +4 -7
- package/build/ts/server/clients/types.d.ts.map +1 -1
- package/build/ts/server/config-types.d.ts +5 -5
- package/build/ts/server/config-types.d.ts.map +1 -1
- package/build/ts/server/future/flags.d.ts.map +1 -1
- package/build/ts/server/shopify-app.d.ts +1 -0
- package/build/ts/server/shopify-app.d.ts.map +1 -1
- package/build/ts/server/shopify-app.js +6 -3
- package/build/ts/server/shopify-app.js.map +1 -1
- package/build/ts/server/types.d.ts +3 -2
- package/build/ts/server/types.d.ts.map +1 -1
- package/build/ts/server/version.d.ts +1 -1
- package/build/ts/server/version.js +1 -1
- package/package.json +12 -10
|
@@ -15,7 +15,8 @@ interface Context<Topics = string | number | symbol> {
|
|
|
15
15
|
* @example
|
|
16
16
|
* <caption>Webhook API version.</caption>
|
|
17
17
|
* <description>Get the API version used for webhook request.</description>
|
|
18
|
-
* ```
|
|
18
|
+
* ```ts
|
|
19
|
+
* // /app/routes/webhooks.tsx
|
|
19
20
|
* import { ActionFunction } from "@remix-run/node";
|
|
20
21
|
* import { authenticate } from "../shopify.server";
|
|
21
22
|
*
|
|
@@ -32,7 +33,8 @@ interface Context<Topics = string | number | symbol> {
|
|
|
32
33
|
* @example
|
|
33
34
|
* <caption>Webhook shop.</caption>
|
|
34
35
|
* <description>Get the shop that triggered a webhook.</description>
|
|
35
|
-
* ```
|
|
36
|
+
* ```ts
|
|
37
|
+
* // /app/routes/webhooks.tsx
|
|
36
38
|
* import { ActionFunction } from "@remix-run/node";
|
|
37
39
|
* import { authenticate } from "../shopify.server";
|
|
38
40
|
*
|
|
@@ -49,7 +51,8 @@ interface Context<Topics = string | number | symbol> {
|
|
|
49
51
|
* @example
|
|
50
52
|
* <caption>Webhook topic.</caption>
|
|
51
53
|
* <description>Get the event topic for the webhook.</description>
|
|
52
|
-
* ```
|
|
54
|
+
* ```ts
|
|
55
|
+
* // /app/routes/webhooks.tsx
|
|
53
56
|
* import { ActionFunction } from "@remix-run/node";
|
|
54
57
|
* import { authenticate } from "../shopify.server";
|
|
55
58
|
*
|
|
@@ -73,7 +76,8 @@ interface Context<Topics = string | number | symbol> {
|
|
|
73
76
|
* @example
|
|
74
77
|
* <caption>Webhook ID.</caption>
|
|
75
78
|
* <description>Get the webhook ID.</description>
|
|
76
|
-
* ```
|
|
79
|
+
* ```ts
|
|
80
|
+
* // /app/routes/webhooks.tsx
|
|
77
81
|
* import { ActionFunction } from "@remix-run/node";
|
|
78
82
|
* import { authenticate } from "../shopify.server";
|
|
79
83
|
*
|
|
@@ -90,7 +94,8 @@ interface Context<Topics = string | number | symbol> {
|
|
|
90
94
|
* @example
|
|
91
95
|
* <caption>Webhook payload.</caption>
|
|
92
96
|
* <description>Get the request's POST payload.</description>
|
|
93
|
-
* ```
|
|
97
|
+
* ```ts
|
|
98
|
+
* // /app/routes/webhooks.tsx
|
|
94
99
|
* import { ActionFunction } from "@remix-run/node";
|
|
95
100
|
* import { authenticate } from "../shopify.server";
|
|
96
101
|
*
|
|
@@ -129,6 +134,7 @@ export interface WebhookContextWithSession<Future extends FutureFlagOptions, Res
|
|
|
129
134
|
* <caption>[V3] Webhook admin context.</caption>
|
|
130
135
|
* <description>With the `v3_webhookAdminContext` future flag enabled, use the `admin` object in the context to interact with the Admin API.</description>
|
|
131
136
|
* ```ts
|
|
137
|
+
* // /app/routes/webhooks.tsx
|
|
132
138
|
* import { ActionFunctionArgs } from "@remix-run/node";
|
|
133
139
|
* import { authenticate } from "../shopify.server";
|
|
134
140
|
*
|
|
@@ -156,6 +162,7 @@ export interface WebhookContextWithSession<Future extends FutureFlagOptions, Res
|
|
|
156
162
|
* <caption>Webhook admin context.</caption>
|
|
157
163
|
* <description>Use the `admin` object in the context to interact with the Admin API. This format will be removed in V3 of the package.</description>
|
|
158
164
|
* ```ts
|
|
165
|
+
* // /app/routes/webhooks.tsx
|
|
159
166
|
* import { json, ActionFunctionArgs } from "@remix-run/node";
|
|
160
167
|
* import { authenticate } from "../shopify.server";
|
|
161
168
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE5E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAC,cAAc,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAE1E,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM;IACjD
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE5E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAC,cAAc,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAE1E,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM;IACjD;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;OAgB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GAAG,MAAM,IAE/B,4BAA4B,CAAC,MAAM,CAAC,GACpC,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,mBAAmB,CAC7B,MAAM,SAAS,iBAAiB,EAChC,SAAS,SAAS,oBAAoB,EACtC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAC/B,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdminOperations } from '@shopify/admin-api-client';
|
|
2
|
+
import { GraphQLClient } from '../types';
|
|
2
3
|
import { AdminClientOptions } from './types';
|
|
3
|
-
export
|
|
4
|
-
export declare function graphqlClientFactory({ params, handleClientError, session, }: AdminClientOptions): GraphQLClient;
|
|
4
|
+
export declare function graphqlClientFactory({ params, handleClientError, session, }: AdminClientOptions): GraphQLClient<AdminOperations>;
|
|
5
5
|
//# sourceMappingURL=graphql.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/graphql.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAM3C,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,iBAAiB,EACjB,OAAO,GACR,EAAE,kBAAkB,GAAG,aAAa,CAAC,eAAe,CAAC,CAwBrD"}
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.graphqlClientFactory = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var runtime_1 = require("@shopify/shopify-api/runtime");
|
|
6
5
|
// eslint-disable-next-line no-warning-comments
|
|
7
6
|
// TODO: This is actually just a call through to the Shopify API client, but with a different API. We should eventually
|
|
8
7
|
// move this over to the library layer. While doing that, we should also allow the apiVersion to be passed into the REST
|
|
9
8
|
// client request calls.
|
|
10
9
|
function graphqlClientFactory(_a) {
|
|
11
10
|
var params = _a.params, handleClientError = _a.handleClientError, session = _a.session;
|
|
12
|
-
return function query(
|
|
11
|
+
return function query(operation, options) {
|
|
13
12
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
14
13
|
var client, apiResponse, error_1;
|
|
15
14
|
return tslib_1.__generator(this, function (_a) {
|
|
@@ -22,16 +21,14 @@ function graphqlClientFactory(_a) {
|
|
|
22
21
|
_a.label = 1;
|
|
23
22
|
case 1:
|
|
24
23
|
_a.trys.push([1, 3, , 6]);
|
|
25
|
-
return [4 /*yield*/, client.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
return [4 /*yield*/, client.request(operation, {
|
|
25
|
+
variables: options === null || options === void 0 ? void 0 : options.variables,
|
|
26
|
+
retries: (options === null || options === void 0 ? void 0 : options.tries) ? options.tries - 1 : 0,
|
|
27
|
+
headers: options === null || options === void 0 ? void 0 : options.headers,
|
|
29
28
|
})];
|
|
30
29
|
case 2:
|
|
31
30
|
apiResponse = _a.sent();
|
|
32
|
-
return [2 /*return*/, new Response(JSON.stringify(apiResponse
|
|
33
|
-
headers: (0, runtime_1.flatHeaders)(apiResponse.headers),
|
|
34
|
-
})];
|
|
31
|
+
return [2 /*return*/, new Response(JSON.stringify(apiResponse))];
|
|
35
32
|
case 3:
|
|
36
33
|
error_1 = _a.sent();
|
|
37
34
|
if (!handleClientError) return [3 /*break*/, 5];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../../src/server/clients/admin/graphql.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../../src/server/clients/admin/graphql.ts"],"names":[],"mappings":";;;;AAMA,+CAA+C;AAC/C,uHAAuH;AACvH,wHAAwH;AACxH,wBAAwB;AACxB,SAAgB,oBAAoB,CAAC,EAIhB;QAHnB,MAAM,YAAA,EACN,iBAAiB,uBAAA,EACjB,OAAO,aAAA;IAEP,OAAO,SAAe,KAAK,CAAC,SAAS,EAAE,OAAO;;;;;;wBACtC,MAAM,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;4BAC5C,OAAO,SAAA;4BACP,UAAU,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU;yBAChC,CAAC,CAAC;;;;wBAImB,qBAAM,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE;gCAClD,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;gCAC7B,OAAO,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,EAAC,CAAC,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gCAC/C,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;6BAC1B,CAAC,EAAA;;wBAJI,WAAW,GAAG,SAIlB;wBAEF,sBAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,EAAC;;;6BAE7C,iBAAiB,EAAjB,wBAAiB;wBACb,qBAAM,iBAAiB,CAAC,EAAC,KAAK,SAAA,EAAE,MAAM,QAAA,EAAE,OAAO,SAAA,EAAC,CAAC,EAAA;4BAAvD,MAAM,SAAiD,CAAC;4BAG1D,MAAM,OAAK,CAAC;;;;;KAEf,CAAC;AACJ,CAAC;AA5BD,oDA4BC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Session, ShopifyRestResources } from '@shopify/shopify-api';
|
|
2
|
+
import { AdminOperations } from '@shopify/admin-api-client';
|
|
2
3
|
import { BasicParams } from '../../types';
|
|
3
4
|
import { GraphQLClient } from '../types';
|
|
4
5
|
import type { RestClientWithResources } from './rest';
|
|
@@ -22,7 +23,19 @@ export interface AdminApiContext<Resources extends ShopifyRestResources = Shopif
|
|
|
22
23
|
*
|
|
23
24
|
* @example
|
|
24
25
|
* <caption>Using REST resources.</caption>
|
|
25
|
-
* <description>Getting the number of orders in a store using REST resources
|
|
26
|
+
* <description>Getting the number of orders in a store using REST resources. Visit the [Admin REST API references](/docs/api/admin-rest) for examples on using each resource. </description>
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* // /app/routes/**\/*.ts
|
|
30
|
+
* import { LoaderFunctionArgs, json } from "@remix-run/node";
|
|
31
|
+
* import { authenticate } from "../shopify.server";
|
|
32
|
+
*
|
|
33
|
+
* export const loader = async ({ request }: LoaderFunctionArgs) => {
|
|
34
|
+
* const { admin, session } = await authenticate.admin(request);
|
|
35
|
+
* return json(admin.rest.resources.Order.count({ session }));
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
26
39
|
*
|
|
27
40
|
* ```ts
|
|
28
41
|
* // /app/shopify.server.ts
|
|
@@ -37,6 +50,11 @@ export interface AdminApiContext<Resources extends ShopifyRestResources = Shopif
|
|
|
37
50
|
* export const authenticate = shopify.authenticate;
|
|
38
51
|
* ```
|
|
39
52
|
*
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* <caption>Performing a GET request to the REST API.</caption>
|
|
56
|
+
* <description>Use `admin.rest.get` to make custom requests to make a request to to the `customer/count` endpoint</description>
|
|
57
|
+
*
|
|
40
58
|
* ```ts
|
|
41
59
|
* // /app/routes/**\/*.ts
|
|
42
60
|
* import { LoaderFunctionArgs, json } from "@remix-run/node";
|
|
@@ -44,14 +62,12 @@ export interface AdminApiContext<Resources extends ShopifyRestResources = Shopif
|
|
|
44
62
|
*
|
|
45
63
|
* export const loader = async ({ request }: LoaderFunctionArgs) => {
|
|
46
64
|
* const { admin, session } = await authenticate.admin(request);
|
|
47
|
-
*
|
|
65
|
+
* const response = await admin.rest.get({ path: "/customers/count.json" });
|
|
66
|
+
* const customers = await response.json();
|
|
67
|
+
* return json({ customers });
|
|
48
68
|
* };
|
|
49
69
|
* ```
|
|
50
70
|
*
|
|
51
|
-
* @example
|
|
52
|
-
* <caption>Performing a GET request to the REST API.</caption>
|
|
53
|
-
* <description>Use `admin.rest.<method>` to make custom requests to the API.</description>
|
|
54
|
-
*
|
|
55
71
|
* ```ts
|
|
56
72
|
* // /app/shopify.server.ts
|
|
57
73
|
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
@@ -64,7 +80,9 @@ export interface AdminApiContext<Resources extends ShopifyRestResources = Shopif
|
|
|
64
80
|
* export default shopify;
|
|
65
81
|
* export const authenticate = shopify.authenticate;
|
|
66
82
|
* ```
|
|
67
|
-
*
|
|
83
|
+
* @example
|
|
84
|
+
* <caption>Performing a POST request to the REST API.</caption>
|
|
85
|
+
* <description>Use `admin.rest.post` to make custom requests to make a request to to the `customers.json` endpoint to send a welcome email</description>
|
|
68
86
|
* ```ts
|
|
69
87
|
* // /app/routes/**\/*.ts
|
|
70
88
|
* import { LoaderFunctionArgs, json } from "@remix-run/node";
|
|
@@ -72,11 +90,35 @@ export interface AdminApiContext<Resources extends ShopifyRestResources = Shopif
|
|
|
72
90
|
*
|
|
73
91
|
* export const loader = async ({ request }: LoaderFunctionArgs) => {
|
|
74
92
|
* const { admin, session } = await authenticate.admin(request);
|
|
75
|
-
* const response =
|
|
76
|
-
*
|
|
77
|
-
*
|
|
93
|
+
* const response = admin.rest.post({
|
|
94
|
+
* path: "customers/7392136888625/send_invite.json",
|
|
95
|
+
* body: {
|
|
96
|
+
* customer_invite: {
|
|
97
|
+
* to: "new_test_email@shopify.com",
|
|
98
|
+
* from: "j.limited@example.com",
|
|
99
|
+
* bcc: ["j.limited@example.com"],
|
|
100
|
+
* subject: "Welcome to my new shop",
|
|
101
|
+
* custom_message: "My awesome new store",
|
|
102
|
+
* },
|
|
103
|
+
* },
|
|
104
|
+
* });
|
|
105
|
+
* const customerInvite = await response.json();
|
|
106
|
+
* return json({ customerInvite });
|
|
78
107
|
* };
|
|
79
108
|
* ```
|
|
109
|
+
*
|
|
110
|
+
* ```ts
|
|
111
|
+
* // /app/shopify.server.ts
|
|
112
|
+
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
113
|
+
* import { restResources } from "@shopify/shopify-api/rest/admin/2023-04";
|
|
114
|
+
*
|
|
115
|
+
* const shopify = shopifyApp({
|
|
116
|
+
* restResources,
|
|
117
|
+
* // ...etc
|
|
118
|
+
* });
|
|
119
|
+
* export default shopify;
|
|
120
|
+
* export const authenticate = shopify.authenticate;
|
|
121
|
+
* ```
|
|
80
122
|
*/
|
|
81
123
|
rest: RestClientWithResources<Resources>;
|
|
82
124
|
/**
|
|
@@ -112,6 +154,6 @@ export interface AdminApiContext<Resources extends ShopifyRestResources = Shopif
|
|
|
112
154
|
* }
|
|
113
155
|
* ```
|
|
114
156
|
*/
|
|
115
|
-
graphql: GraphQLClient
|
|
157
|
+
graphql: GraphQLClient<AdminOperations>;
|
|
116
158
|
}
|
|
117
159
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,QAAQ,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;CAC5C;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,GAAG,EAAE;IACzC,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpB,MAAM,WAAW,eAAe,CAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB;IAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyGG;IACH,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,OAAO,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,GAAG,CAAC;AAEzC,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,OAAO,GACR,EAAE;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,iBAAiB,CAmBpB"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.storefrontClientFactory = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var runtime_1 = require("@shopify/shopify-api/runtime");
|
|
6
5
|
function storefrontClientFactory(_a) {
|
|
7
6
|
var _this = this;
|
|
8
7
|
var params = _a.params, session = _a.session;
|
|
@@ -19,16 +18,14 @@ function storefrontClientFactory(_a) {
|
|
|
19
18
|
session: session,
|
|
20
19
|
apiVersion: options.apiVersion,
|
|
21
20
|
});
|
|
22
|
-
return [4 /*yield*/, client.query
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
return [4 /*yield*/, client.request(query, {
|
|
22
|
+
variables: options === null || options === void 0 ? void 0 : options.variables,
|
|
23
|
+
retries: (options === null || options === void 0 ? void 0 : options.tries) ? options.tries - 1 : 0,
|
|
24
|
+
headers: options === null || options === void 0 ? void 0 : options.headers,
|
|
26
25
|
})];
|
|
27
26
|
case 1:
|
|
28
27
|
apiResponse = _a.sent();
|
|
29
|
-
return [2 /*return*/, new Response(JSON.stringify(apiResponse
|
|
30
|
-
headers: (0, runtime_1.flatHeaders)(apiResponse.headers),
|
|
31
|
-
})];
|
|
28
|
+
return [2 /*return*/, new Response(JSON.stringify(apiResponse))];
|
|
32
29
|
}
|
|
33
30
|
});
|
|
34
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/factory.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/factory.ts"],"names":[],"mappings":";;;;AAMA,SAAgB,uBAAuB,CAAC,EAMvC;IAND,iBAyBC;QAxBC,MAAM,YAAA,EACN,OAAO,aAAA;IAKA,IAAA,GAAG,GAAI,MAAM,IAAV,CAAW;IAErB,OAAO;QACL,OAAO,EAAE,UAAO,KAAK,EAAE,OAAY;YAAZ,wBAAA,EAAA,YAAY;;;;;;4BAC3B,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC;gCACxC,OAAO,SAAA;gCACP,UAAU,EAAE,OAAO,CAAC,UAAU;6BAC/B,CAAC,CAAC;4BAEiB,qBAAM,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE;oCAC9C,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;oCAC7B,OAAO,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,EAAC,CAAC,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oCAC/C,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;iCAC1B,CAAC,EAAA;;4BAJI,WAAW,GAAG,SAIlB;4BAEF,sBAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,EAAC;;;;SAClD;KACF,CAAC;AACJ,CAAC;AAzBD,0DAyBC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StorefrontOperations } from '@shopify/storefront-api-client';
|
|
1
2
|
import { GraphQLClient } from '../types';
|
|
2
3
|
export interface StorefrontContext {
|
|
3
4
|
/**
|
|
@@ -11,19 +12,19 @@ export interface StorefrontContext {
|
|
|
11
12
|
* <caption>Querying the GraphQL API.</caption>
|
|
12
13
|
* <description>Use `storefront.graphql` to make query / mutation requests.</description>
|
|
13
14
|
* ```ts
|
|
14
|
-
*
|
|
15
|
+
* // app/routes/**\/.ts
|
|
16
|
+
* import { json } from "@remix-run/node";
|
|
15
17
|
* import { authenticate } from "../shopify.server";
|
|
16
18
|
*
|
|
17
19
|
* export async function action({ request }: ActionFunctionArgs) {
|
|
18
|
-
* const { storefront } = await authenticate.
|
|
20
|
+
* const { storefront } = await authenticate.public.appProxy(request);
|
|
19
21
|
*
|
|
20
22
|
* const response = await storefront.graphql(`{blogs(first: 10) { edges { node { id } } } }`);
|
|
21
23
|
*
|
|
22
|
-
*
|
|
23
|
-
* return json({ data: productData.data });
|
|
24
|
+
* return json(await response.json());
|
|
24
25
|
* }
|
|
25
26
|
* ```
|
|
26
27
|
*/
|
|
27
|
-
graphql: GraphQLClient
|
|
28
|
+
graphql: GraphQLClient<StorefrontOperations>;
|
|
28
29
|
}
|
|
29
30
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,EAAE,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
+
import type { AllOperations, ReturnData, FetchResponseBody, ApiClientRequestOptions, ResponseWithType } from '@shopify/admin-api-client';
|
|
1
2
|
import { ApiVersion } from '@shopify/shopify-api';
|
|
2
|
-
interface
|
|
3
|
-
[
|
|
4
|
-
}
|
|
5
|
-
export interface GraphQLQueryOptions {
|
|
6
|
-
variables?: QueryVariables;
|
|
3
|
+
export interface GraphQLQueryOptions<Operation extends keyof Operations, Operations extends AllOperations> {
|
|
4
|
+
variables?: ApiClientRequestOptions<Operation, Operations>['variables'];
|
|
7
5
|
apiVersion?: ApiVersion;
|
|
8
6
|
headers?: {
|
|
9
7
|
[key: string]: any;
|
|
10
8
|
};
|
|
11
9
|
tries?: number;
|
|
12
10
|
}
|
|
13
|
-
export type GraphQLClient = (query:
|
|
14
|
-
export {};
|
|
11
|
+
export type GraphQLClient<Operations extends AllOperations> = <Operation extends keyof Operations>(query: Operation, options?: GraphQLQueryOptions<Operation, Operations>) => Promise<ResponseWithType<FetchResponseBody<ReturnData<Operation, Operations>>>>;
|
|
15
12
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/server/clients/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAEhD,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/server/clients/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAEhD,MAAM,WAAW,mBAAmB,CAClC,SAAS,SAAS,MAAM,UAAU,EAClC,UAAU,SAAS,aAAa;IAEhC,SAAS,CAAC,EAAE,uBAAuB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,WAAW,CAAC,CAAC;IACxE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,aAAa,CAAC,UAAU,SAAS,aAAa,IAAI,CAC5D,SAAS,SAAS,MAAM,UAAU,EAElC,KAAK,EAAE,SAAS,EAChB,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,KACjD,OAAO,CACV,gBAAgB,CAAC,iBAAiB,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,CACvE,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ConfigParams as ApiConfigArg, ConfigInterface as ApiConfig, ShopifyRestResources, Session, ApiVersion, WebhookHandler } from '@shopify/shopify-api';
|
|
2
2
|
import { SessionStorage } from '@shopify/shopify-app-session-storage';
|
|
3
|
-
import type { FutureFlags } from './future/flags';
|
|
3
|
+
import type { FutureFlagOptions, FutureFlags } from './future/flags';
|
|
4
4
|
import type { AppDistribution } from './types';
|
|
5
5
|
import type { AdminApiContext } from './clients';
|
|
6
|
-
export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRestResources, Storage extends SessionStorage = SessionStorage> extends Omit<ApiConfigArg<Resources>, 'hostName' | 'hostScheme' | 'isEmbeddedApp' | 'apiVersion' | 'isCustomStoreApp'> {
|
|
6
|
+
export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRestResources, Storage extends SessionStorage = SessionStorage, Future extends FutureFlagOptions = FutureFlagOptions> extends Omit<ApiConfigArg<Resources>, 'hostName' | 'hostScheme' | 'isEmbeddedApp' | 'apiVersion' | 'isCustomStoreApp' | 'future'> {
|
|
7
7
|
/**
|
|
8
8
|
* The URL your app is running on.
|
|
9
9
|
*
|
|
@@ -191,9 +191,9 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
191
191
|
* You can opt in to these features by setting the corresponding flags. By doing so, you can prepare for future
|
|
192
192
|
* releases in advance and provide feedback on the new features.
|
|
193
193
|
*/
|
|
194
|
-
future?:
|
|
194
|
+
future?: Future;
|
|
195
195
|
}
|
|
196
|
-
export interface AppConfig<Storage extends SessionStorage = SessionStorage> extends ApiConfig {
|
|
196
|
+
export interface AppConfig<Storage extends SessionStorage = SessionStorage> extends Omit<ApiConfig, 'future'> {
|
|
197
197
|
canUseLoginForm: boolean;
|
|
198
198
|
appUrl: string;
|
|
199
199
|
auth: AuthConfig;
|
|
@@ -202,7 +202,7 @@ export interface AppConfig<Storage extends SessionStorage = SessionStorage> exte
|
|
|
202
202
|
hooks: HooksConfig;
|
|
203
203
|
future: FutureFlags;
|
|
204
204
|
}
|
|
205
|
-
interface AuthConfig {
|
|
205
|
+
export interface AuthConfig {
|
|
206
206
|
path: string;
|
|
207
207
|
callbackPath: string;
|
|
208
208
|
exitIframePath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-types.d.ts","sourceRoot":"","sources":["../../../src/server/config-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,eAAe,IAAI,SAAS,EAC5B,oBAAoB,EACpB,OAAO,EACP,UAAU,EACV,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAEpE,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"config-types.d.ts","sourceRoot":"","sources":["../../../src/server/config-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,eAAe,IAAI,SAAS,EAC5B,oBAAoB,EACpB,OAAO,EACP,UAAU,EACV,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAEpE,OAAO,KAAK,EAAC,iBAAiB,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAC,eAAe,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EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,cAAc,EAAE,CAAC;CAClD;AAED,UAAU,WAAW;IACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,gBAAgB,CAC/B,CAAC,SAAS,oBAAoB,GAAG,oBAAoB;IAErD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../../src/server/future/flags.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../../src/server/future/flags.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,SAAS,CAAC;AAExD,MAAM,MAAM,cAAc,CACxB,MAAM,SAAS,iBAAiB,EAChC,IAAI,SAAS,MAAM,WAAW,IAC5B,MAAM,SAAS,WAAW,GAC1B,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,GACvB,IAAI,GACJ,KAAK,GACP,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify-app.d.ts","sourceRoot":"","sources":["../../../src/server/shopify-app.ts"],"names":[],"mappings":"AAAA,OAAO,uCAAuC,CAAC;AAC/C,OAAO,EAIL,oBAAoB,EAErB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAiB,KAAK,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAIL,KAAK,UAAU,EAKhB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"shopify-app.d.ts","sourceRoot":"","sources":["../../../src/server/shopify-app.ts"],"names":[],"mappings":"AAAA,OAAO,uCAAuC,CAAC;AAC/C,OAAO,EAIL,oBAAoB,EAErB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAiB,KAAK,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAIL,KAAK,UAAU,EAKhB,MAAM,SAAS,CAAC;AAajB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CACxB,MAAM,SAAS,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,EAC/C,SAAS,SAAS,oBAAoB,EACtC,OAAO,SAAS,cAAc,EAC9B,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CA8CvC"}
|
|
@@ -15,6 +15,7 @@ var login_1 = require("./authenticate/login/login");
|
|
|
15
15
|
var admin_1 = require("./unauthenticated/admin");
|
|
16
16
|
var public_1 = require("./authenticate/public");
|
|
17
17
|
var storefront_1 = require("./unauthenticated/storefront");
|
|
18
|
+
var auth_code_flow_1 = require("./authenticate/admin/strategies/auth-code-flow");
|
|
18
19
|
/**
|
|
19
20
|
* Creates an object your app will use to interact with Shopify.
|
|
20
21
|
*
|
|
@@ -24,6 +25,7 @@ var storefront_1 = require("./unauthenticated/storefront");
|
|
|
24
25
|
* @example
|
|
25
26
|
* <caption>The minimum viable configuration</caption>
|
|
26
27
|
* ```ts
|
|
28
|
+
* // /shopify.server.ts
|
|
27
29
|
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
28
30
|
*
|
|
29
31
|
* const shopify = shopifyApp({
|
|
@@ -43,13 +45,14 @@ function shopifyApp(appConfig) {
|
|
|
43
45
|
api.webhooks.addHandlers(appConfig.webhooks);
|
|
44
46
|
}
|
|
45
47
|
var params = { api: api, config: config, logger: logger };
|
|
46
|
-
var oauth = new
|
|
48
|
+
var oauth = new auth_code_flow_1.AuthCodeFlowStrategy(params);
|
|
49
|
+
var authStrategy = (0, authenticate_1.authStrategyFactory)(tslib_1.__assign(tslib_1.__assign({}, params), { strategy: oauth }));
|
|
47
50
|
var shopify = {
|
|
48
51
|
sessionStorage: config.sessionStorage,
|
|
49
52
|
addDocumentResponseHeaders: (0, helpers_1.addDocumentResponseHeadersFactory)(params),
|
|
50
53
|
registerWebhooks: (0, webhooks_1.registerWebhooksFactory)(params),
|
|
51
54
|
authenticate: {
|
|
52
|
-
admin:
|
|
55
|
+
admin: authStrategy,
|
|
53
56
|
public: (0, public_1.authenticatePublicFactory)(params),
|
|
54
57
|
webhook: (0, authenticate_2.authenticateWebhookFactory)(params),
|
|
55
58
|
},
|
|
@@ -90,7 +93,7 @@ function deriveApi(appConfig) {
|
|
|
90
93
|
if (appConfig.userAgentPrefix) {
|
|
91
94
|
userAgentPrefix = "".concat(appConfig.userAgentPrefix, " | ").concat(userAgentPrefix);
|
|
92
95
|
}
|
|
93
|
-
return (0, shopify_api_1.shopifyApi)(tslib_1.__assign(tslib_1.__assign({}, appConfig), { hostName: appUrl.host, hostScheme: appUrl.protocol.replace(':', ''), userAgentPrefix: userAgentPrefix, isEmbeddedApp: (_a = appConfig.isEmbeddedApp) !== null && _a !== void 0 ? _a : true, apiVersion: (_b = appConfig.apiVersion) !== null && _b !== void 0 ? _b : shopify_api_1.LATEST_API_VERSION, isCustomStoreApp: appConfig.distribution === types_1.AppDistribution.ShopifyAdmin }));
|
|
96
|
+
return (0, shopify_api_1.shopifyApi)(tslib_1.__assign(tslib_1.__assign({}, appConfig), { hostName: appUrl.host, hostScheme: appUrl.protocol.replace(':', ''), userAgentPrefix: userAgentPrefix, isEmbeddedApp: (_a = appConfig.isEmbeddedApp) !== null && _a !== void 0 ? _a : true, apiVersion: (_b = appConfig.apiVersion) !== null && _b !== void 0 ? _b : shopify_api_1.LATEST_API_VERSION, isCustomStoreApp: appConfig.distribution === types_1.AppDistribution.ShopifyAdmin, future: {} }));
|
|
94
97
|
}
|
|
95
98
|
function deriveConfig(appConfig, apiConfig) {
|
|
96
99
|
var _a, _b, _c, _d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify-app.js","sourceRoot":"","sources":["../../../src/server/shopify-app.ts"],"names":[],"mappings":";;;;AAAA,iDAA+C;AAC/C,oDAM8B;AAI9B,iCASiB;AACjB,qCAAwD;AACxD,oDAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"shopify-app.js","sourceRoot":"","sources":["../../../src/server/shopify-app.ts"],"names":[],"mappings":";;;;AAAA,iDAA+C;AAC/C,oDAM8B;AAI9B,iCASiB;AACjB,qCAAwD;AACxD,oDAAgE;AAChE,kEAAsE;AACtE,qEAAgF;AAChF,qDAAiD;AACjD,kDAAyE;AACzE,oDAAwD;AACxD,iDAA2E;AAC3E,gDAAgE;AAChE,2DAAqF;AACrF,iFAAoF;AAEpF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,UAAU,CAIxB,SAAiB;IACjB,IAAM,GAAG,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,IAAM,MAAM,GAAG,YAAY,CAAU,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5D,IAAM,MAAM,GAAG,IAAA,gCAAc,EAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE1C,IAAI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AM,cAAc,GAAG,SAAS,CAAC,cAAc,IAAI,OAAO,CAAC;IAC3D,SAAS,CAAC,YAAY,GAAG,MAAA,SAAS,CAAC,YAAY,mCAAI,uBAAe,CAAC,QAAQ,CAAC;IAE5E,8DACK,SAAS,GACT,SAAS,KACZ,eAAe,EAAE,SAAS,CAAC,YAAY,KAAK,uBAAe,CAAC,YAAY,EACxE,eAAe,EAAE,MAAA,SAAS,CAAC,eAAe,mCAAI,KAAK,EACnD,KAAK,EAAE,MAAA,SAAS,CAAC,KAAK,mCAAI,EAAE,EAC5B,cAAc,EAAE,SAAS,CAAC,cAAyB,EACnD,MAAM,EAAE,MAAA,SAAS,CAAC,MAAM,mCAAI,EAAE,EAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,cAAc;YACpB,YAAY,EAAE,UAAG,cAAc,cAAW;YAC1C,qBAAqB,EAAE,UAAG,cAAc,mBAAgB;YACxD,cAAc,EAAE,UAAG,cAAc,iBAAc;YAC/C,SAAS,EAAE,UAAG,cAAc,WAAQ;SACrC,IACD;AACJ,CAAC"}
|
|
@@ -216,9 +216,10 @@ export interface ShopifyAppBase<Config extends AppConfigArg> {
|
|
|
216
216
|
* Register webhook topics for a store using the given session. Most likely you want to use this in combination with the afterAuth hook.
|
|
217
217
|
*
|
|
218
218
|
* @example
|
|
219
|
-
* <caption>Registering webhooks
|
|
220
|
-
* <description>Trigger the registration after a merchant installs your app using the `afterAuth` hook
|
|
219
|
+
* <caption>Registering webhooks after install</caption>
|
|
220
|
+
* <description>Trigger the registration to create the webhook subscriptions after a merchant installs your app using the `afterAuth` hook. Learn more about [subscribing to webhooks.](/docs/api/shopify-app-remix/v1/guide-webhooks)</description>
|
|
221
221
|
* ```ts
|
|
222
|
+
* // /app/shopify.server.ts
|
|
222
223
|
* import { DeliveryMethod, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
223
224
|
*
|
|
224
225
|
* const shopify = shopifyApp({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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,CAAC,MAAM,CAAC,GAChB,MAAM,CAAC,cAAc,CAAC,SAAS,eAAe,CAAC,cAAc,GAC7D,iBAAiB,CAAC,MAAM,CAAC,GACzB,MAAM,CAAC,cAAc,CAAC,SAAS,eAAe,CAAC,QAAQ,GACvD,WAAW,CAAC,MAAM,CAAC,GACnB,WAAW,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SHOPIFY_REMIX_LIBRARY_VERSION = "2.
|
|
1
|
+
export declare const SHOPIFY_REMIX_LIBRARY_VERSION = "2.3.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopify/shopify-app-remix",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Shopify Remix - to simplify the building of Shopify Apps with Remix",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -54,25 +54,27 @@
|
|
|
54
54
|
"@shopify/generate-docs": "^0.11.1",
|
|
55
55
|
"@shopify/polaris": "^11.8.0",
|
|
56
56
|
"@shopify/react-testing": "^5.1.3",
|
|
57
|
-
"@shopify/shopify-app-session-storage-memory": "^2.0.
|
|
57
|
+
"@shopify/shopify-app-session-storage-memory": "^2.0.3",
|
|
58
58
|
"@types/jest": "^29.5.1",
|
|
59
|
-
"@types/jsonwebtoken": "^9.0.
|
|
59
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
60
60
|
"@types/react": "^18.2.18",
|
|
61
|
-
"@types/semver": "^7.
|
|
61
|
+
"@types/semver": "^7.5.6",
|
|
62
62
|
"jest": "^29.5.0",
|
|
63
63
|
"jest-fetch-mock": "^3.0.3",
|
|
64
|
-
"jsonwebtoken": "^9.0.
|
|
64
|
+
"jsonwebtoken": "^9.0.2",
|
|
65
65
|
"react": "^18.2.0",
|
|
66
66
|
"react-dom": "^18.2.0",
|
|
67
67
|
"ts-jest": "^29.1.0"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@remix-run/server-runtime": "^2.0.0",
|
|
71
|
-
"@shopify/
|
|
72
|
-
"@shopify/shopify-
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
71
|
+
"@shopify/admin-api-client": "^0.2.1",
|
|
72
|
+
"@shopify/shopify-api": "^9.0.1",
|
|
73
|
+
"@shopify/shopify-app-session-storage": "^2.0.3",
|
|
74
|
+
"@shopify/storefront-api-client": "^0.2.1",
|
|
75
|
+
"isbot": "^3.7.1",
|
|
76
|
+
"semver": "^7.5.4",
|
|
77
|
+
"tslib": "^2.6.2"
|
|
76
78
|
},
|
|
77
79
|
"peerDependencies": {
|
|
78
80
|
"@remix-run/react": "*",
|