@shopify/shopify-app-remix 2.4.0 → 2.5.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/README.md +44 -0
- package/build/cjs/server/authenticate/admin/authenticate.js +2 -0
- package/build/cjs/server/authenticate/admin/billing/check.js +39 -0
- package/build/cjs/server/authenticate/admin/helpers/render-app-bridge.js +2 -1
- package/build/cjs/server/authenticate/admin/helpers/validate-redirect-url.js +45 -0
- package/build/cjs/server/authenticate/flow/authenticate.js +68 -0
- package/build/cjs/server/errors.js +9 -0
- package/build/cjs/server/index.js +2 -0
- package/build/cjs/server/shopify-app.js +8 -8
- package/build/cjs/server/types.js +4 -0
- package/build/cjs/server/unauthenticated/admin/factory.js +2 -2
- package/build/cjs/server/unauthenticated/storefront/factory.js +2 -2
- package/build/cjs/server/version.js +1 -1
- package/build/ts/server/__test-helpers/request-mock.js.map +1 -1
- package/build/ts/server/authenticate/admin/authenticate.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/authenticate.js +1 -0
- package/build/ts/server/authenticate/admin/authenticate.js.map +1 -1
- package/build/ts/server/authenticate/admin/billing/check.d.ts +6 -0
- package/build/ts/server/authenticate/admin/billing/check.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/billing/check.js +43 -0
- package/build/ts/server/authenticate/admin/billing/check.js.map +1 -0
- package/build/ts/server/authenticate/admin/billing/index.d.ts +1 -0
- package/build/ts/server/authenticate/admin/billing/index.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/billing/index.js +3 -1
- package/build/ts/server/authenticate/admin/billing/index.js.map +1 -1
- package/build/ts/server/authenticate/admin/billing/types.d.ts +59 -1
- package/build/ts/server/authenticate/admin/billing/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/helpers/render-app-bridge.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/helpers/render-app-bridge.js +2 -1
- package/build/ts/server/authenticate/admin/helpers/render-app-bridge.js.map +1 -1
- package/build/ts/server/authenticate/admin/helpers/validate-redirect-url.d.ts +8 -0
- package/build/ts/server/authenticate/admin/helpers/validate-redirect-url.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/helpers/validate-redirect-url.js +49 -0
- package/build/ts/server/authenticate/admin/helpers/validate-redirect-url.js.map +1 -0
- package/build/ts/server/authenticate/admin/strategies/auth-code-flow.js.map +1 -1
- package/build/ts/server/authenticate/flow/authenticate.d.ts +5 -0
- package/build/ts/server/authenticate/flow/authenticate.d.ts.map +1 -0
- package/build/ts/server/authenticate/flow/authenticate.flow.doc.d.ts +4 -0
- package/build/ts/server/authenticate/flow/authenticate.flow.doc.d.ts.map +1 -0
- package/build/ts/server/authenticate/flow/authenticate.flow.doc.js +33 -0
- package/build/ts/server/authenticate/flow/authenticate.flow.doc.js.map +1 -0
- package/build/ts/server/authenticate/flow/authenticate.js +67 -0
- package/build/ts/server/authenticate/flow/authenticate.js.map +1 -0
- package/build/ts/server/authenticate/flow/types.d.ts +82 -0
- package/build/ts/server/authenticate/flow/types.d.ts.map +1 -0
- package/build/ts/server/authenticate/flow/types.js +3 -0
- package/build/ts/server/authenticate/flow/types.js.map +1 -0
- package/build/ts/server/authenticate/webhooks/types.d.ts.map +1 -1
- package/build/ts/server/clients/admin/types.d.ts +12 -0
- package/build/ts/server/clients/admin/types.d.ts.map +1 -1
- package/build/ts/server/clients/types.d.ts +1 -3
- package/build/ts/server/clients/types.d.ts.map +1 -1
- package/build/ts/server/config-types.d.ts +1 -3
- package/build/ts/server/config-types.d.ts.map +1 -1
- package/build/ts/server/errors.d.ts +4 -0
- package/build/ts/server/errors.d.ts.map +1 -0
- package/build/ts/server/errors.js +14 -0
- package/build/ts/server/errors.js.map +1 -0
- package/build/ts/server/future/flags.d.ts +4 -1
- package/build/ts/server/future/flags.d.ts.map +1 -1
- package/build/ts/server/index.d.ts +1 -0
- package/build/ts/server/index.d.ts.map +1 -1
- package/build/ts/server/index.js +2 -0
- package/build/ts/server/index.js.map +1 -1
- package/build/ts/server/shopify-app.d.ts.map +1 -1
- package/build/ts/server/shopify-app.doc.d.ts.map +1 -1
- package/build/ts/server/shopify-app.doc.js +1 -0
- package/build/ts/server/shopify-app.doc.js.map +1 -1
- package/build/ts/server/shopify-app.js +4 -4
- package/build/ts/server/shopify-app.js.map +1 -1
- package/build/ts/server/types.d.ts +48 -11
- package/build/ts/server/types.d.ts.map +1 -1
- package/build/ts/server/types.js.map +1 -1
- package/build/ts/server/unauthenticated/admin/factory.d.ts.map +1 -1
- package/build/ts/server/unauthenticated/admin/factory.js +2 -2
- package/build/ts/server/unauthenticated/admin/factory.js.map +1 -1
- package/build/ts/server/unauthenticated/admin/types.d.ts +76 -0
- package/build/ts/server/unauthenticated/admin/types.d.ts.map +1 -1
- package/build/ts/server/unauthenticated/admin/unauthenticated.admin.doc.d.ts.map +1 -1
- package/build/ts/server/unauthenticated/admin/unauthenticated.admin.doc.js +2 -5
- package/build/ts/server/unauthenticated/admin/unauthenticated.admin.doc.js.map +1 -1
- package/build/ts/server/unauthenticated/storefront/factory.d.ts.map +1 -1
- package/build/ts/server/unauthenticated/storefront/factory.js +2 -2
- package/build/ts/server/unauthenticated/storefront/factory.js.map +1 -1
- package/build/ts/server/unauthenticated/storefront/unauthenticated.storefront.doc.d.ts.map +1 -1
- package/build/ts/server/unauthenticated/storefront/unauthenticated.storefront.doc.js +1 -4
- package/build/ts/server/unauthenticated/storefront/unauthenticated.storefront.doc.js.map +1 -1
- package/build/ts/server/version.d.ts +1 -1
- package/build/ts/server/version.js +1 -1
- package/package.json +9 -9
|
@@ -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,kEAAsE;AACtE,qEAAgF;AAChF,qDAAiD;AACjD,kDAAyE;AACzE,oDAAwD;AACxD,iDAA2E;A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AAe,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"}
|
|
@@ -3,16 +3,16 @@ import { SessionStorage } from '@shopify/shopify-app-session-storage';
|
|
|
3
3
|
import type { AppConfig, AppConfigArg } from './config-types';
|
|
4
4
|
import type { AuthenticateWebhook, RegisterWebhooksOptions } from './authenticate/webhooks/types';
|
|
5
5
|
import type { AuthenticatePublic } from './authenticate/public/types';
|
|
6
|
-
import type {
|
|
6
|
+
import type { AuthenticateAdmin } from './authenticate/admin/types';
|
|
7
7
|
import type { Unauthenticated } from './unauthenticated/types';
|
|
8
|
-
import {
|
|
8
|
+
import type { AuthenticateFlow } from './authenticate/flow/types';
|
|
9
|
+
import type { FutureFlagOptions } from './future/flags';
|
|
9
10
|
export interface BasicParams<Future extends FutureFlagOptions = FutureFlagOptions> {
|
|
10
11
|
api: Shopify<ApiConfigWithFutureFlags<Future>, ShopifyRestResources, ApiFutureFlags<Future>>;
|
|
11
12
|
config: AppConfig;
|
|
12
13
|
logger: Shopify['logger'];
|
|
13
14
|
}
|
|
14
|
-
export interface ApiFutureFlags<
|
|
15
|
-
unstable_tokenExchange?: Future extends FutureFlags ? Future['unstable_newEmbeddedAuthStrategy'] : boolean;
|
|
15
|
+
export interface ApiFutureFlags<_Future extends FutureFlagOptions> {
|
|
16
16
|
}
|
|
17
17
|
export type ApiConfigWithFutureFlags<Future extends FutureFlagOptions> = ConfigParams<ShopifyRestResources, ApiFutureFlags<Future>>;
|
|
18
18
|
export type JSONValue = string | number | boolean | null | JSONObject | JSONArray;
|
|
@@ -37,7 +37,6 @@ export interface LoginError {
|
|
|
37
37
|
}
|
|
38
38
|
type Login = (request: Request) => Promise<LoginError | never>;
|
|
39
39
|
type AddDocumentResponseHeaders = (request: Request, headers: Headers) => void;
|
|
40
|
-
type AuthenticateAdmin<Config extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = (request: Request) => Promise<AdminContext<Config, Resources>>;
|
|
41
40
|
type RestResourcesType<Config extends AppConfigArg> = Config['restResources'] extends ShopifyRestResources ? Config['restResources'] : ShopifyRestResources;
|
|
42
41
|
type SessionStorageType<Config extends AppConfigArg> = Config['sessionStorage'] extends SessionStorage ? Config['sessionStorage'] : SessionStorage;
|
|
43
42
|
interface Authenticate<Config extends AppConfigArg> {
|
|
@@ -51,6 +50,17 @@ interface Authenticate<Config extends AppConfigArg> {
|
|
|
51
50
|
* @example
|
|
52
51
|
* <caption>Authenticating a request for an embedded app.</caption>
|
|
53
52
|
* ```ts
|
|
53
|
+
* // /app/routes/**\/*.jsx
|
|
54
|
+
* import { LoaderFunctionArgs, json } from "@remix-run/node";
|
|
55
|
+
* import { authenticate } from "../../shopify.server";
|
|
56
|
+
*
|
|
57
|
+
* export async function loader({ request }: LoaderFunctionArgs) {
|
|
58
|
+
* const {admin, session, sessionToken, billing} = authenticate.admin(request);
|
|
59
|
+
*
|
|
60
|
+
* return json(await admin.rest.resources.Product.count({ session }));
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
* ```ts
|
|
54
64
|
* // /app/shopify.server.ts
|
|
55
65
|
* import { LATEST_API_VERSION, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
56
66
|
* import { restResources } from "@shopify/shopify-api/rest/admin/2023-04";
|
|
@@ -62,19 +72,46 @@ interface Authenticate<Config extends AppConfigArg> {
|
|
|
62
72
|
* export default shopify;
|
|
63
73
|
* export const authenticate = shopify.authenticate;
|
|
64
74
|
* ```
|
|
75
|
+
*/
|
|
76
|
+
admin: AuthenticateAdmin<Config, RestResourcesType<Config>>;
|
|
77
|
+
/**
|
|
78
|
+
* Authenticate a Flow extension Request and get back an authenticated context, containing an admin context to access
|
|
79
|
+
* the API, and the payload of the request.
|
|
80
|
+
*
|
|
81
|
+
* If there is no session for the Request, this will return an HTTP 400 error.
|
|
82
|
+
*
|
|
83
|
+
* Note that this will always be a POST request.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* <caption>Authenticating a Flow extension request.</caption>
|
|
65
87
|
* ```ts
|
|
66
88
|
* // /app/routes/**\/*.jsx
|
|
67
|
-
* import {
|
|
89
|
+
* import { ActionFunctionArgs, json } from "@remix-run/node";
|
|
68
90
|
* import { authenticate } from "../../shopify.server";
|
|
69
91
|
*
|
|
70
|
-
* export async function
|
|
71
|
-
* const {admin, session,
|
|
92
|
+
* export async function action({ request }: ActionFunctionArgs) {
|
|
93
|
+
* const {admin, session, payload} = authenticate.flow(request);
|
|
72
94
|
*
|
|
73
|
-
*
|
|
95
|
+
* // Perform flow extension logic
|
|
96
|
+
*
|
|
97
|
+
* // Return a 200 response
|
|
98
|
+
* return null;
|
|
74
99
|
* }
|
|
75
100
|
* ```
|
|
101
|
+
* ```ts
|
|
102
|
+
* // /app/shopify.server.ts
|
|
103
|
+
* import { LATEST_API_VERSION, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
104
|
+
* import { restResources } from "@shopify/shopify-api/rest/admin/2023-04";
|
|
105
|
+
*
|
|
106
|
+
* const shopify = shopifyApp({
|
|
107
|
+
* restResources,
|
|
108
|
+
* // ...etc
|
|
109
|
+
* });
|
|
110
|
+
* export default shopify;
|
|
111
|
+
* export const authenticate = shopify.authenticate;
|
|
112
|
+
* ```
|
|
76
113
|
*/
|
|
77
|
-
|
|
114
|
+
flow: AuthenticateFlow<RestResourcesType<Config>>;
|
|
78
115
|
/**
|
|
79
116
|
* Authenticate a public request and get back a session token.
|
|
80
117
|
*
|
|
@@ -164,7 +201,7 @@ export interface ShopifyAppBase<Config extends AppConfigArg> {
|
|
|
164
201
|
* import prisma from "~/db.server";
|
|
165
202
|
*
|
|
166
203
|
* const shopify = shopifyApp({
|
|
167
|
-
*
|
|
204
|
+
* sessionStorage: new PrismaSessionStorage(prisma),
|
|
168
205
|
* // ...etc
|
|
169
206
|
* })
|
|
170
207
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/server/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,OAAO,EACP,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAEpE,OAAO,KAAK,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/server/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,cAAc,EACd,OAAO,EACP,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,MAAM,sCAAsC,CAAC;AAEpE,OAAO,KAAK,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,yBAAyB,CA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";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/server/types.ts"],"names":[],"mappings":";;;AA4CA,+CAA+C;AAC/C,sFAAsF;AACtF,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,yCAAsB,CAAA;IACtB,qDAAkC,CAAA;IAClC,iDAA8B,CAAA;AAChC,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B;AAmBD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,8CAA4B,CAAA;IAC5B,8CAA4B,CAAA;AAC9B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/factory.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAIxC,OAAO,EAAC,2BAA2B,EAAC,MAAM,SAAS,CAAC;AAEpD,wBAAgB,kCAAkC,CAChD,SAAS,SAAS,oBAAoB,EACtC,MAAM,EAAE,WAAW,UAEX,MAAM,KACX,QAAQ,4BAA4B,SAAS,CAAC,CAAC,CAcnD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.unauthenticatedAdminContextFactory = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var
|
|
5
|
+
var errors_1 = require("../../errors");
|
|
6
6
|
var admin_1 = require("../../clients/admin");
|
|
7
7
|
var helpers_1 = require("../helpers");
|
|
8
8
|
function unauthenticatedAdminContextFactory(params) {
|
|
@@ -15,7 +15,7 @@ function unauthenticatedAdminContextFactory(params) {
|
|
|
15
15
|
case 1:
|
|
16
16
|
session = _a.sent();
|
|
17
17
|
if (!session) {
|
|
18
|
-
throw new
|
|
18
|
+
throw new errors_1.SessionNotFoundError("Could not find a session for shop ".concat(shop, " when creating unauthenticated admin context"));
|
|
19
19
|
}
|
|
20
20
|
return [2 /*return*/, {
|
|
21
21
|
session: session,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/factory.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/factory.ts"],"names":[],"mappings":";;;;AAEA,uCAAkD;AAElD,6CAAuD;AACvD,sCAA6C;AAI7C,SAAgB,kCAAkC,CAEhD,MAAmB;IAFrB,iBAmBC;IAhBC,OAAO,UACL,IAAY;;;;wBAEI,qBAAM,IAAA,2BAAiB,EAAC,IAAI,EAAE,MAAM,CAAC,EAAA;;oBAA/C,OAAO,GAAG,SAAqC;oBAErD,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,MAAM,IAAI,6BAAoB,CAC5B,4CAAqC,IAAI,iDAA8C,CACxF,CAAC;oBACJ,CAAC;oBAED,sBAAO;4BACL,OAAO,SAAA;4BACP,KAAK,EAAE,IAAA,0BAAkB,EAAY,EAAC,MAAM,QAAA,EAAE,OAAO,SAAA,EAAC,CAAC;yBACxD,EAAC;;;SACH,CAAC;AACJ,CAAC;AAnBD,gFAmBC"}
|
|
@@ -27,6 +27,82 @@ export interface UnauthenticatedAdminContext<Resources extends ShopifyRestResour
|
|
|
27
27
|
session: Session;
|
|
28
28
|
/**
|
|
29
29
|
* Methods for interacting with the GraphQL / REST Admin APIs for the given store.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <caption>Performing a GET request to the REST API.</caption>
|
|
33
|
+
* <description>Use `admin.rest.get` to make custom requests to make a request to to the `customer/count` endpoint</description>
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* // /app/routes/**\/*.ts
|
|
37
|
+
* import { LoaderFunctionArgs, json } from "@remix-run/node";
|
|
38
|
+
* import { unauthenticated } from "../shopify.server";
|
|
39
|
+
*
|
|
40
|
+
* export const loader = async ({ request }: LoaderFunctionArgs) => {
|
|
41
|
+
* const { admin, session } = await unauthenticated.admin(request);
|
|
42
|
+
*
|
|
43
|
+
* const response = await admin.rest.get(
|
|
44
|
+
* {
|
|
45
|
+
* path: "/customers/count.json"
|
|
46
|
+
* }
|
|
47
|
+
* );
|
|
48
|
+
* const customers = await response.json();
|
|
49
|
+
*
|
|
50
|
+
* return json({ customers });
|
|
51
|
+
* };
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
* // /app/shopify.server.ts
|
|
56
|
+
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
57
|
+
* import { restResources } from "@shopify/shopify-api/rest/admin/2023-04";
|
|
58
|
+
*
|
|
59
|
+
* const shopify = shopifyApp({
|
|
60
|
+
* restResources,
|
|
61
|
+
* // ...etc
|
|
62
|
+
* });
|
|
63
|
+
*
|
|
64
|
+
* export default shopify;
|
|
65
|
+
* export const unauthenticated = shopify.unauthenticated;
|
|
66
|
+
* ```
|
|
67
|
+
* @example
|
|
68
|
+
* <caption>Querying the GraphQL API.</caption>
|
|
69
|
+
* <description>Use `admin.graphql` to make query / mutation requests.</description>
|
|
70
|
+
* ```ts
|
|
71
|
+
* // /app/routes/**\/*.ts
|
|
72
|
+
* import { ActionFunctionArgs } from "@remix-run/node";
|
|
73
|
+
* import { unauthenticated } from "../shopify.server";
|
|
74
|
+
*
|
|
75
|
+
* export async function action({ request }: ActionFunctionArgs) {
|
|
76
|
+
* const { admin } = await unauthenticated.admin(request);
|
|
77
|
+
*
|
|
78
|
+
* const response = await admin.graphql(
|
|
79
|
+
* `#graphql
|
|
80
|
+
* mutation populateProduct($input: ProductInput!) {
|
|
81
|
+
* productCreate(input: $input) {
|
|
82
|
+
* product {
|
|
83
|
+
* id
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* }`,
|
|
87
|
+
* { variables: { input: { title: "Product Name" } } }
|
|
88
|
+
* );
|
|
89
|
+
*
|
|
90
|
+
* const productData = await response.json();
|
|
91
|
+
* return json({ data: productData.data });
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* ```ts
|
|
96
|
+
* // /app/shopify.server.ts
|
|
97
|
+
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
98
|
+
*
|
|
99
|
+
* const shopify = shopifyApp({
|
|
100
|
+
* restResources,
|
|
101
|
+
* // ...etc
|
|
102
|
+
* });
|
|
103
|
+
* export default shopify;
|
|
104
|
+
* export const unauthenticated = shopify.unauthenticated;
|
|
105
|
+
* ```
|
|
30
106
|
*/
|
|
31
107
|
admin: AdminApiContext<Resources>;
|
|
32
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,2BAA2B,CAC1C,SAAS,SAAS,oBAAoB;IAEtC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,MAAM,WAAW,2BAA2B,CAC1C,SAAS,SAAS,oBAAoB;IAEtC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8EG;IACH,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACnC;AAED,MAAM,MAAM,8BAA8B,CACxC,SAAS,SAAS,oBAAoB,IACpC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthenticated.admin.doc.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/unauthenticated.admin.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"unauthenticated.admin.doc.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/unauthenticated.admin.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAmCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var data = {
|
|
4
4
|
name: 'Unauthenticated admin',
|
|
5
|
-
description: "Allows interacting with the Admin API
|
|
6
|
-
'\n\n> Caution: This should only be used for Requests that do not originate from Shopify.' +
|
|
7
|
-
'\n> You must do your own authentication before using this method.' +
|
|
8
|
-
"\n>This function doesn't perform **any** validation and shouldn't rely on unvalidated user input.",
|
|
5
|
+
description: "Allows interacting with the Admin API when working outside of Shopify requests.\nThis enables apps to integrate with 3rd party services and perform background tasks.\n\n> Caution:\n> This function doesn't perform **any** validation and shouldn't rely on raw user input.\n\nWhen using this function, consider the following:\n\n#### Background tasks\n\nApps should ensure that the shop domain is authenticated when enqueueing jobs.\n\n#### 3rd party service requests\n\nApps must obtain the shop domain from the 3rd party service in a secure way.",
|
|
9
6
|
category: 'Unauthenticated',
|
|
10
7
|
type: 'object',
|
|
11
8
|
isVisualComponent: false,
|
|
@@ -16,7 +13,7 @@ var data = {
|
|
|
16
13
|
type: 'GetUnauthenticatedAdminContext',
|
|
17
14
|
},
|
|
18
15
|
],
|
|
19
|
-
jsDocTypeExamples: ['UnauthenticatedAdminContext'
|
|
16
|
+
jsDocTypeExamples: ['UnauthenticatedAdminContext'],
|
|
20
17
|
related: [
|
|
21
18
|
{
|
|
22
19
|
name: 'API context',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthenticated.admin.doc.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/unauthenticated.admin.doc.ts"],"names":[],"mappings":";;AAEA,IAAM,IAAI,GAAkC;IAC1C,IAAI,EAAE,uBAAuB;IAC7B,WAAW,
|
|
1
|
+
{"version":3,"file":"unauthenticated.admin.doc.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/admin/unauthenticated.admin.doc.ts"],"names":[],"mappings":";;AAEA,IAAM,IAAI,GAAkC;IAC1C,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,kiBAc8D;IAC3E,QAAQ,EAAE,iBAAiB;IAC3B,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,KAAK;IACxB,WAAW,EAAE;QACX;YACE,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,2CAA2C;YACxD,IAAI,EAAE,gCAAgC;SACvC;KACF;IACD,iBAAiB,EAAE,CAAC,6BAA6B,CAAC;IAClD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,8BAA8B;YACxC,GAAG,EAAE,4CAA4C;SAClD;KACF;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAIxC,OAAO,EAEL,mCAAmC,EACpC,MAAM,SAAS,CAAC;AAEjB,wBAAgB,uCAAuC,CACrD,MAAM,EAAE,WAAW,GAClB,mCAAmC,CAerC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.unauthenticatedStorefrontContextFactory = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var
|
|
5
|
+
var errors_1 = require("../../errors");
|
|
6
6
|
var storefront_1 = require("../../clients/storefront");
|
|
7
7
|
var helpers_1 = require("../helpers");
|
|
8
8
|
function unauthenticatedStorefrontContextFactory(params) {
|
|
@@ -15,7 +15,7 @@ function unauthenticatedStorefrontContextFactory(params) {
|
|
|
15
15
|
case 1:
|
|
16
16
|
session = _a.sent();
|
|
17
17
|
if (!session) {
|
|
18
|
-
throw new
|
|
18
|
+
throw new errors_1.SessionNotFoundError("Could not find a session for shop ".concat(shop, " when creating unauthenticated storefront context"));
|
|
19
19
|
}
|
|
20
20
|
return [2 /*return*/, {
|
|
21
21
|
session: session,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/factory.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/factory.ts"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAElD,uDAAiE;AACjE,sCAA6C;AAO7C,SAAgB,uCAAuC,CACrD,MAAmB;IADrB,iBAiBC;IAdC,OAAO,UAAO,IAAY;;;;wBACR,qBAAM,IAAA,2BAAiB,EAAC,IAAI,EAAE,MAAM,CAAC,EAAA;;oBAA/C,OAAO,GAAG,SAAqC;oBAErD,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,MAAM,IAAI,6BAAoB,CAC5B,4CAAqC,IAAI,sDAAmD,CAC7F,CAAC;oBACJ,CAAC;oBAED,sBAAO;4BACL,OAAO,SAAA;4BACP,UAAU,EAAE,IAAA,oCAAuB,EAAC,EAAC,MAAM,QAAA,EAAE,OAAO,SAAA,EAAC,CAAC;yBACvD,EAAC;;;SACH,CAAC;AACJ,CAAC;AAjBD,0FAiBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthenticated.storefront.doc.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/unauthenticated.storefront.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"unauthenticated.storefront.doc.d.ts","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/unauthenticated.storefront.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAmCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var data = {
|
|
4
4
|
name: 'Unauthenticated storefront',
|
|
5
|
-
description: "Allows interacting with the Storefront API
|
|
6
|
-
'\n\n> Caution: This should only be used for Requests that do not originate from Shopify.' +
|
|
7
|
-
'\n> You must do your own authentication before using this method.' +
|
|
8
|
-
"\n>This function doesn't perform **any** validation and shouldn't rely on unvalidated user input.",
|
|
5
|
+
description: "Allows interacting with the Storefront API when working outside of Shopify requests.\nThis enables apps to integrate with 3rd party services and perform background tasks.\n\n> Caution:\n> This function doesn't perform **any** validation and shouldn't rely on raw user input.\n\nWhen using this function, consider the following:\n\n#### Background tasks\n\nApps should ensure that the shop domain is authenticated when enqueueing jobs.\n\n#### 3rd party service requests\n\nApps must obtain the shop domain from the 3rd party service in a secure way.",
|
|
9
6
|
category: 'Unauthenticated',
|
|
10
7
|
type: 'object',
|
|
11
8
|
isVisualComponent: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unauthenticated.storefront.doc.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/unauthenticated.storefront.doc.ts"],"names":[],"mappings":";;AAEA,IAAM,IAAI,GAAkC;IAC1C,IAAI,EAAE,4BAA4B;IAClC,WAAW,
|
|
1
|
+
{"version":3,"file":"unauthenticated.storefront.doc.js","sourceRoot":"","sources":["../../../../../src/server/unauthenticated/storefront/unauthenticated.storefront.doc.ts"],"names":[],"mappings":";;AAEA,IAAM,IAAI,GAAkC;IAC1C,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,uiBAc8D;IAC3E,QAAQ,EAAE,iBAAiB;IAC3B,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,KAAK;IACxB,WAAW,EAAE;QACX;YACE,KAAK,EAAE,4BAA4B;YACnC,WAAW,EAAE,gDAAgD;YAC7D,IAAI,EAAE,qCAAqC;SAC5C;KACF;IACD,iBAAiB,EAAE,CAAC,kCAAkC,EAAE,mBAAmB,CAAC;IAC5E,OAAO,EAAE;QACP;YACE,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,mCAAmC;YAC7C,GAAG,EAAE,iDAAiD;SACvD;KACF;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SHOPIFY_REMIX_LIBRARY_VERSION = "2.
|
|
1
|
+
export declare const SHOPIFY_REMIX_LIBRARY_VERSION = "2.5.1";
|
|
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.5.1",
|
|
4
4
|
"description": "Shopify Remix - to simplify the building of Shopify Apps with Remix",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"Storefront API"
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@remix-run/react": "^2.5.
|
|
53
|
+
"@remix-run/react": "^2.5.1",
|
|
54
54
|
"@shopify/generate-docs": "^0.13.1",
|
|
55
|
-
"@shopify/polaris": "^
|
|
55
|
+
"@shopify/polaris": "^12.12.1",
|
|
56
56
|
"@shopify/react-testing": "^5.1.3",
|
|
57
|
-
"@shopify/shopify-app-session-storage-memory": "^
|
|
57
|
+
"@shopify/shopify-app-session-storage-memory": "^3.0.0",
|
|
58
58
|
"@types/jsonwebtoken": "^9.0.5",
|
|
59
59
|
"@types/react": "^18.2.18",
|
|
60
60
|
"@types/semver": "^7.5.6",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"react-dom": "^18.2.0"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@remix-run/server-runtime": "^2.
|
|
68
|
-
"@shopify/admin-api-client": "^0.2.
|
|
69
|
-
"@shopify/shopify-api": "^9.0
|
|
70
|
-
"@shopify/shopify-app-session-storage": "^2.0
|
|
71
|
-
"@shopify/storefront-api-client": "^0.2.
|
|
67
|
+
"@remix-run/server-runtime": "^2.5.1",
|
|
68
|
+
"@shopify/admin-api-client": "^0.2.3",
|
|
69
|
+
"@shopify/shopify-api": "^9.2.0",
|
|
70
|
+
"@shopify/shopify-app-session-storage": "^2.1.0",
|
|
71
|
+
"@shopify/storefront-api-client": "^0.2.3",
|
|
72
72
|
"isbot": "^3.7.1",
|
|
73
73
|
"semver": "^7.5.4"
|
|
74
74
|
},
|