@shopify/shopify-app-remix 1.2.0 → 1.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/README.md +6 -6
- package/build/cjs/react/components/AppProvider/AppProvider.js +35 -4
- package/build/cjs/server/authenticate/admin/billing/request.js +4 -2
- package/build/cjs/server/authenticate/public/appProxy/authenticate.js +7 -1
- package/build/cjs/server/boundary/index.js +6 -6
- package/build/cjs/server/clients/storefront/factory.js +35 -0
- package/build/cjs/server/shopify-app.js +7 -5
- package/build/cjs/server/types.js +1 -1
- package/build/cjs/server/unauthenticated/admin/factory.js +2 -2
- package/build/cjs/server/unauthenticated/helpers/get-offline-session.js +14 -0
- package/build/cjs/server/unauthenticated/storefront/factory.js +25 -0
- package/build/cjs/server/version.js +1 -1
- package/build/ts/react/components/AppProvider/AppProvider.d.ts +48 -8
- package/build/ts/react/components/AppProvider/AppProvider.d.ts.map +1 -1
- package/build/ts/react/components/AppProvider/AppProvider.doc.d.ts +4 -0
- package/build/ts/react/components/AppProvider/AppProvider.doc.d.ts.map +1 -0
- package/build/ts/react/components/AppProvider/AppProvider.doc.js +34 -0
- package/build/ts/react/components/AppProvider/AppProvider.doc.js.map +1 -0
- package/build/ts/react/components/AppProvider/AppProvider.js +35 -3
- package/build/ts/react/components/AppProvider/AppProvider.js.map +1 -1
- package/build/ts/server/__test-helpers/expect-admin-api-client.d.ts +1 -1
- package/build/ts/server/__test-helpers/expect-admin-api-client.d.ts.map +1 -1
- package/build/ts/server/__test-helpers/expect-storefront-api-client.d.ts +8 -0
- package/build/ts/server/__test-helpers/expect-storefront-api-client.d.ts.map +1 -0
- package/build/ts/server/__test-helpers/expect-storefront-api-client.js +57 -0
- package/build/ts/server/__test-helpers/expect-storefront-api-client.js.map +1 -0
- package/build/ts/server/__test-helpers/index.d.ts +1 -0
- package/build/ts/server/__test-helpers/index.d.ts.map +1 -1
- package/build/ts/server/__test-helpers/index.js +1 -0
- package/build/ts/server/__test-helpers/index.js.map +1 -1
- package/build/ts/server/authenticate/admin/authenticate.admin.doc.d.ts +4 -0
- package/build/ts/server/authenticate/admin/authenticate.admin.doc.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/authenticate.admin.doc.js +35 -0
- package/build/ts/server/authenticate/admin/authenticate.admin.doc.js.map +1 -0
- package/build/ts/server/authenticate/admin/authenticate.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/authenticate.js.map +1 -1
- package/build/ts/server/authenticate/admin/billing/authenticate.admin.billing.doc.d.ts +4 -0
- package/build/ts/server/authenticate/admin/billing/authenticate.admin.billing.doc.d.ts.map +1 -0
- package/build/ts/server/authenticate/admin/billing/authenticate.admin.billing.doc.js +26 -0
- package/build/ts/server/authenticate/admin/billing/authenticate.admin.billing.doc.js.map +1 -0
- package/build/ts/server/authenticate/admin/billing/request.d.ts +1 -1
- package/build/ts/server/authenticate/admin/billing/request.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/billing/request.js +2 -8
- package/build/ts/server/authenticate/admin/billing/request.js.map +1 -1
- package/build/ts/server/authenticate/admin/billing/types.d.ts +63 -55
- package/build/ts/server/authenticate/admin/billing/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/admin/types.d.ts +66 -30
- package/build/ts/server/authenticate/admin/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/helpers/add-response-headers.d.ts +2 -1
- package/build/ts/server/authenticate/helpers/add-response-headers.d.ts.map +1 -1
- package/build/ts/server/authenticate/helpers/add-response-headers.js.map +1 -1
- package/build/ts/server/authenticate/public/appProxy/authenticate.js +4 -2
- package/build/ts/server/authenticate/public/appProxy/authenticate.js.map +1 -1
- package/build/ts/server/authenticate/public/appProxy/authenticate.public.app-proxy.doc.d.ts +4 -0
- package/build/ts/server/authenticate/public/appProxy/authenticate.public.app-proxy.doc.d.ts.map +1 -0
- package/build/ts/server/authenticate/public/appProxy/authenticate.public.app-proxy.doc.js +32 -0
- package/build/ts/server/authenticate/public/appProxy/authenticate.public.app-proxy.doc.js.map +1 -0
- package/build/ts/server/authenticate/public/appProxy/types.d.ts +67 -11
- package/build/ts/server/authenticate/public/appProxy/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/public/checkout/authenticate.public.checkout.doc.d.ts +4 -0
- package/build/ts/server/authenticate/public/checkout/authenticate.public.checkout.doc.d.ts.map +1 -0
- package/build/ts/server/authenticate/public/checkout/authenticate.public.checkout.doc.js +21 -0
- package/build/ts/server/authenticate/public/checkout/authenticate.public.checkout.doc.js.map +1 -0
- package/build/ts/server/authenticate/public/checkout/types.d.ts +15 -13
- package/build/ts/server/authenticate/public/checkout/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/public/types.d.ts +19 -17
- package/build/ts/server/authenticate/public/types.d.ts.map +1 -1
- package/build/ts/server/authenticate/webhooks/authenticate.webhooks.doc.d.ts +4 -0
- package/build/ts/server/authenticate/webhooks/authenticate.webhooks.doc.d.ts.map +1 -0
- package/build/ts/server/authenticate/webhooks/authenticate.webhooks.doc.js +20 -0
- package/build/ts/server/authenticate/webhooks/authenticate.webhooks.doc.js.map +1 -0
- package/build/ts/server/authenticate/webhooks/types.d.ts +103 -0
- package/build/ts/server/authenticate/webhooks/types.d.ts.map +1 -1
- package/build/ts/server/boundary/index.d.ts +6 -6
- package/build/ts/server/boundary/index.js +6 -6
- package/build/ts/server/clients/admin/authenticate.admin.api.doc.d.ts +4 -0
- package/build/ts/server/clients/admin/authenticate.admin.api.doc.d.ts.map +1 -0
- package/build/ts/server/clients/admin/authenticate.admin.api.doc.js +32 -0
- package/build/ts/server/clients/admin/authenticate.admin.api.doc.js.map +1 -0
- package/build/ts/server/clients/admin/factory.d.ts +1 -1
- package/build/ts/server/clients/admin/factory.d.ts.map +1 -1
- package/build/ts/server/clients/admin/factory.js.map +1 -1
- package/build/ts/server/clients/admin/graphql.d.ts +3 -15
- package/build/ts/server/clients/admin/graphql.d.ts.map +1 -1
- package/build/ts/server/clients/admin/graphql.js.map +1 -1
- package/build/ts/server/clients/admin/index.d.ts +1 -0
- package/build/ts/server/clients/admin/index.d.ts.map +1 -1
- package/build/ts/server/clients/admin/index.js +1 -0
- package/build/ts/server/clients/admin/index.js.map +1 -1
- package/build/ts/server/clients/admin/rest.d.ts +1 -1
- package/build/ts/server/clients/admin/rest.d.ts.map +1 -1
- package/build/ts/server/clients/admin/types.d.ts +105 -1
- package/build/ts/server/clients/admin/types.d.ts.map +1 -1
- package/build/ts/server/clients/index.d.ts +3 -0
- package/build/ts/server/clients/index.d.ts.map +1 -0
- package/build/ts/server/clients/index.js +6 -0
- package/build/ts/server/clients/index.js.map +1 -0
- package/build/ts/server/clients/storefront/authenticate.storefront.api.doc.d.ts +4 -0
- package/build/ts/server/clients/storefront/authenticate.storefront.api.doc.d.ts.map +1 -0
- package/build/ts/server/clients/storefront/authenticate.storefront.api.doc.js +32 -0
- package/build/ts/server/clients/storefront/authenticate.storefront.api.doc.js.map +1 -0
- package/build/ts/server/clients/storefront/factory.d.ts +8 -0
- package/build/ts/server/clients/storefront/factory.d.ts.map +1 -0
- package/build/ts/server/clients/storefront/factory.js +39 -0
- package/build/ts/server/clients/storefront/factory.js.map +1 -0
- package/build/ts/server/clients/storefront/index.d.ts +3 -0
- package/build/ts/server/clients/storefront/index.d.ts.map +1 -0
- package/build/ts/server/clients/storefront/index.js +6 -0
- package/build/ts/server/clients/storefront/index.js.map +1 -0
- package/build/ts/server/clients/storefront/types.d.ts +29 -0
- package/build/ts/server/clients/storefront/types.d.ts.map +1 -0
- package/build/ts/server/clients/storefront/types.js +3 -0
- package/build/ts/server/clients/storefront/types.js.map +1 -0
- package/build/ts/server/clients/types.d.ts +15 -0
- package/build/ts/server/clients/types.d.ts.map +1 -0
- package/build/ts/server/clients/types.js +3 -0
- package/build/ts/server/clients/types.js.map +1 -0
- package/build/ts/server/config-types.d.ts +26 -117
- package/build/ts/server/config-types.d.ts.map +1 -1
- package/build/ts/server/shopify-app.d.ts +3 -3
- package/build/ts/server/shopify-app.d.ts.map +1 -1
- package/build/ts/server/shopify-app.doc.d.ts +4 -0
- package/build/ts/server/shopify-app.doc.d.ts.map +1 -0
- package/build/ts/server/shopify-app.doc.js +36 -0
- package/build/ts/server/shopify-app.doc.js.map +1 -0
- package/build/ts/server/shopify-app.js +6 -4
- package/build/ts/server/shopify-app.js.map +1 -1
- package/build/ts/server/types.d.ts +200 -168
- 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 +3 -4
- package/build/ts/server/unauthenticated/admin/factory.js.map +1 -1
- package/build/ts/server/unauthenticated/admin/types.d.ts +9 -7
- package/build/ts/server/unauthenticated/admin/types.d.ts.map +1 -1
- package/build/ts/server/unauthenticated/admin/unauthenticated.admin.doc.d.ts +4 -0
- package/build/ts/server/unauthenticated/admin/unauthenticated.admin.doc.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/admin/unauthenticated.admin.doc.js +29 -0
- package/build/ts/server/unauthenticated/admin/unauthenticated.admin.doc.js.map +1 -0
- package/build/ts/server/unauthenticated/helpers/get-offline-session.d.ts +4 -0
- package/build/ts/server/unauthenticated/helpers/get-offline-session.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/helpers/get-offline-session.js +22 -0
- package/build/ts/server/unauthenticated/helpers/get-offline-session.js.map +1 -0
- package/build/ts/server/unauthenticated/helpers/index.d.ts +2 -0
- package/build/ts/server/unauthenticated/helpers/index.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/helpers/index.js +5 -0
- package/build/ts/server/unauthenticated/helpers/index.js.map +1 -0
- package/build/ts/server/unauthenticated/storefront/factory.d.ts +4 -0
- package/build/ts/server/unauthenticated/storefront/factory.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/storefront/factory.js +29 -0
- package/build/ts/server/unauthenticated/storefront/factory.js.map +1 -0
- package/build/ts/server/unauthenticated/storefront/index.d.ts +2 -0
- package/build/ts/server/unauthenticated/storefront/index.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/storefront/index.js +5 -0
- package/build/ts/server/unauthenticated/storefront/index.js.map +1 -0
- package/build/ts/server/unauthenticated/storefront/types.d.ts +34 -0
- package/build/ts/server/unauthenticated/storefront/types.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/storefront/types.js +3 -0
- package/build/ts/server/unauthenticated/storefront/types.js.map +1 -0
- package/build/ts/server/unauthenticated/storefront/unauthenticated.storefront.doc.d.ts +4 -0
- package/build/ts/server/unauthenticated/storefront/unauthenticated.storefront.doc.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/storefront/unauthenticated.storefront.doc.js +29 -0
- package/build/ts/server/unauthenticated/storefront/unauthenticated.storefront.doc.js.map +1 -0
- package/build/ts/server/unauthenticated/types.d.ts +66 -0
- package/build/ts/server/unauthenticated/types.d.ts.map +1 -0
- package/build/ts/server/unauthenticated/types.js +3 -0
- package/build/ts/server/unauthenticated/types.js.map +1 -0
- package/build/ts/server/version.d.ts +1 -1
- package/build/ts/server/version.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,kDAAwB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { GraphQLClient } from '../types';
|
|
2
|
+
export interface StorefrontContext {
|
|
3
|
+
/**
|
|
4
|
+
* Method for interacting with the Shopify Storefront GraphQL API
|
|
5
|
+
*
|
|
6
|
+
* If you're getting incorrect type hints in the Shopify template, follow [these instructions](https://github.com/Shopify/shopify-app-template-remix/tree/main#incorrect-graphql-hints).
|
|
7
|
+
*
|
|
8
|
+
* {@link https://shopify.dev/docs/api/storefront}
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <caption>Querying the GraphQL API.</caption>
|
|
12
|
+
* <description>Use `storefront.graphql` to make query / mutation requests.</description>
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { ActionArgs } from "@remix-run/node";
|
|
15
|
+
* import { authenticate } from "../shopify.server";
|
|
16
|
+
*
|
|
17
|
+
* export async function action({ request }: ActionArgs) {
|
|
18
|
+
* const { storefront } = await authenticate.storefront(request);
|
|
19
|
+
*
|
|
20
|
+
* const response = await storefront.graphql(`{blogs(first: 10) { edges { node { id } } } }`);
|
|
21
|
+
*
|
|
22
|
+
* const productData = await response.json();
|
|
23
|
+
* return json({ data: productData.data });
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
graphql: GraphQLClient;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/server/clients/storefront/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApiVersion } from '@shopify/shopify-api';
|
|
2
|
+
interface QueryVariables {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface GraphQLQueryOptions {
|
|
6
|
+
variables?: QueryVariables;
|
|
7
|
+
apiVersion?: ApiVersion;
|
|
8
|
+
headers?: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
tries?: number;
|
|
12
|
+
}
|
|
13
|
+
export type GraphQLClient = (query: string, options?: GraphQLQueryOptions) => Promise<Response>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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,UAAU,cAAc;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,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,GAAG,CAC1B,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,mBAAmB,KAC1B,OAAO,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/server/clients/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,24 +1,26 @@
|
|
|
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 { AppDistribution } from './types';
|
|
4
|
-
import {
|
|
5
|
-
import { GraphqlQueryFunction } from './clients/admin/graphql';
|
|
3
|
+
import type { AppDistribution } from './types';
|
|
4
|
+
import type { AdminApiContext } from './clients';
|
|
6
5
|
export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRestResources, Storage extends SessionStorage = SessionStorage> extends Omit<ApiConfigArg<Resources>, 'hostName' | 'hostScheme' | 'isEmbeddedApp' | 'apiVersion' | 'isCustomStoreApp'> {
|
|
7
6
|
/**
|
|
8
7
|
* The URL your app is running on.
|
|
9
8
|
*
|
|
10
|
-
* The `@shopify/cli` provides this URL as `process.env.SHOPIFY_APP_URL`. For development this is probably a tunnel URL that points to your local machine. If production this is your production URL.
|
|
9
|
+
* The `@shopify/cli` provides this URL as `process.env.SHOPIFY_APP_URL`. For development this is probably a tunnel URL that points to your local machine. If this is a production app, this is your production URL.
|
|
11
10
|
*/
|
|
12
11
|
appUrl: string;
|
|
13
12
|
/**
|
|
14
13
|
* An adaptor for storing sessions in your database of choice.
|
|
15
14
|
*
|
|
16
|
-
* Shopify provides multiple session storage adaptors and you can create your own.
|
|
15
|
+
* Shopify provides multiple session storage adaptors and you can create your own.
|
|
16
|
+
*
|
|
17
|
+
* {@link https://github.com/Shopify/shopify-app-js/blob/main/README.md#session-storage-options}
|
|
17
18
|
*
|
|
18
19
|
* @example
|
|
19
|
-
*
|
|
20
|
+
* <caption>Storing sessions with Prisma.</caption>
|
|
21
|
+
* <description>Add the `@shopify/shopify-app-session-storage-prisma` package to use the Prisma session storage.</description>
|
|
20
22
|
* ```ts
|
|
21
|
-
* import { shopifyApp } from "@shopify/shopify-app-remix";
|
|
23
|
+
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
22
24
|
* import { PrismaSessionStorage } from "@shopify/shopify-app-session-storage-prisma";
|
|
23
25
|
*
|
|
24
26
|
* import prisma from "~/db.server";
|
|
@@ -32,9 +34,9 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
32
34
|
*/
|
|
33
35
|
sessionStorage: Storage;
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
37
|
+
* Whether your app use online or offline tokens.
|
|
36
38
|
*
|
|
37
|
-
* If your app uses online tokens both online and offline tokens will be saved to your database. This ensures your app can perform background jobs
|
|
39
|
+
* If your app uses online tokens, then both online and offline tokens will be saved to your database. This ensures your app can perform background jobs.
|
|
38
40
|
*
|
|
39
41
|
* {@link https://shopify.dev/docs/apps/auth/oauth/access-modes}
|
|
40
42
|
*
|
|
@@ -49,10 +51,10 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
49
51
|
* This can be in used in conjunction with the afterAuth hook to register webhook topics when a user installs your app. Or you can use this function in other processes such as background jobs.
|
|
50
52
|
*
|
|
51
53
|
* @example
|
|
52
|
-
* Registering for a webhook when a merchant uninstalls your app
|
|
54
|
+
* <caption>Registering for a webhook when a merchant uninstalls your app.</caption>
|
|
53
55
|
* ```ts
|
|
54
|
-
* // app/shopify.server.ts
|
|
55
|
-
* import { DeliveryMethod, shopifyApp } from "@shopify/shopify-app-remix";
|
|
56
|
+
* // /app/shopify.server.ts
|
|
57
|
+
* import { DeliveryMethod, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
56
58
|
*
|
|
57
59
|
* const shopify = shopifyApp({
|
|
58
60
|
* webhooks: {
|
|
@@ -71,7 +73,7 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
71
73
|
* export default shopify;
|
|
72
74
|
* export const authenticate = shopify.authenticate;
|
|
73
75
|
*
|
|
74
|
-
* // app/routes/webhooks.jsx
|
|
76
|
+
* // /app/routes/webhooks.jsx
|
|
75
77
|
* import { ActionArgs } from "@remix-run/node";
|
|
76
78
|
*
|
|
77
79
|
* import { authenticate } from "../shopify.server";
|
|
@@ -101,9 +103,9 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
101
103
|
* These functions are called in the context of the request that triggered them. This means you can access the session.
|
|
102
104
|
*
|
|
103
105
|
* @example
|
|
104
|
-
* Seeding your database custom data when a merchant installs your app
|
|
106
|
+
* <caption>Seeding your database custom data when a merchant installs your app.</caption>
|
|
105
107
|
* ```ts
|
|
106
|
-
* import { DeliveryMethod, shopifyApp } from "@shopify/shopify-app-remix";
|
|
108
|
+
* import { DeliveryMethod, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
107
109
|
* import { seedStoreData } from "~/db/seeds"
|
|
108
110
|
*
|
|
109
111
|
* const shopify = shopifyApp({
|
|
@@ -126,7 +128,7 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
126
128
|
*/
|
|
127
129
|
isEmbeddedApp?: boolean;
|
|
128
130
|
/**
|
|
129
|
-
* How your app is distributed.
|
|
131
|
+
* How your app is distributed. Default is `AppDistribution.AppStore`.
|
|
130
132
|
*
|
|
131
133
|
* {@link https://shopify.dev/docs/apps/distribution}
|
|
132
134
|
*/
|
|
@@ -139,9 +141,9 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
139
141
|
* @defaultValue `LATEST_API_VERSION` from `@shopify/shopify-app-remix`
|
|
140
142
|
*
|
|
141
143
|
* @example
|
|
142
|
-
* Using the latest API Version (Recommended)
|
|
144
|
+
* <caption>Using the latest API Version (Recommended)</caption>
|
|
143
145
|
* ```ts
|
|
144
|
-
* import { LATEST_API_VERSION, shopifyApp } from "@shopify/shopify-app-remix";
|
|
146
|
+
* import { LATEST_API_VERSION, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
145
147
|
*
|
|
146
148
|
* const shopify = shopifyApp({
|
|
147
149
|
* // ...etc
|
|
@@ -158,10 +160,10 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
158
160
|
* @default `"/auth"`
|
|
159
161
|
*
|
|
160
162
|
* @example
|
|
161
|
-
* Using the latest API Version (Recommended)
|
|
163
|
+
* <caption>Using the latest API Version (Recommended)</caption>
|
|
162
164
|
* ```ts
|
|
163
|
-
* // app/shopify.server.ts
|
|
164
|
-
* import { LATEST_API_VERSION, shopifyApp } from "@shopify/shopify-app-remix";
|
|
165
|
+
* // /app/shopify.server.ts
|
|
166
|
+
* import { LATEST_API_VERSION, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
165
167
|
*
|
|
166
168
|
* const shopify = shopifyApp({
|
|
167
169
|
* // ...etc
|
|
@@ -170,7 +172,7 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
|
|
|
170
172
|
* export default shopify;
|
|
171
173
|
* export const authenticate = shopify.authenticate;
|
|
172
174
|
*
|
|
173
|
-
* // app/routes/auth/$.jsx
|
|
175
|
+
* // /app/routes/auth/$.jsx
|
|
174
176
|
* import { LoaderArgs } from "@remix-run/node";
|
|
175
177
|
* import { authenticate } from "../../shopify.server";
|
|
176
178
|
*
|
|
@@ -210,9 +212,9 @@ interface HooksConfig {
|
|
|
210
212
|
* @param context.admin - An object with access to the Shopify Admin API's.
|
|
211
213
|
*
|
|
212
214
|
* @example
|
|
213
|
-
* Registering webhooks and seeding data when a merchant installs your app
|
|
215
|
+
* <caption>Registering webhooks and seeding data when a merchant installs your app.</caption>
|
|
214
216
|
* ```ts
|
|
215
|
-
* import { DeliveryMethod, shopifyApp } from "@shopify/shopify-app-remix";
|
|
217
|
+
* import { DeliveryMethod, shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
216
218
|
* import { seedStoreData } from "~/db/seeds"
|
|
217
219
|
*
|
|
218
220
|
* const shopify = shopifyApp({
|
|
@@ -238,98 +240,5 @@ export interface AfterAuthOptions<R extends ShopifyRestResources = ShopifyRestRe
|
|
|
238
240
|
session: Session;
|
|
239
241
|
admin: AdminApiContext<R>;
|
|
240
242
|
}
|
|
241
|
-
export interface AdminApiContext<Resources extends ShopifyRestResources = ShopifyRestResources> {
|
|
242
|
-
/**
|
|
243
|
-
* Methods for interacting with the Shopify Admin REST API
|
|
244
|
-
*
|
|
245
|
-
* There are methods for interacting with individual REST resources. You can also make plain `GET`, `POST`, `PUT` and `DELETE` requests should the REST resources not meet your needs.
|
|
246
|
-
*
|
|
247
|
-
* {@link https://shopify.dev/docs/api/admin-rest}
|
|
248
|
-
*
|
|
249
|
-
* @example
|
|
250
|
-
* Getting the number of orders in a store using rest resources
|
|
251
|
-
* ```ts
|
|
252
|
-
* // app/shopify.server.ts
|
|
253
|
-
* import { shopifyApp } from "@shopify/shopify-app-remix";
|
|
254
|
-
* import { restResources } from "@shopify/shopify-api/rest/admin/2023-07";
|
|
255
|
-
*
|
|
256
|
-
* const shopify = shopifyApp({
|
|
257
|
-
* restResources,
|
|
258
|
-
* // ...etc
|
|
259
|
-
* });
|
|
260
|
-
* export default shopify;
|
|
261
|
-
* export const authenticate = shopify.authenticate;
|
|
262
|
-
*
|
|
263
|
-
* // app/routes/**\/.ts
|
|
264
|
-
* import { LoaderArgs, json } from "@remix-run/node";
|
|
265
|
-
* import { authenticate } from "../shopify.server";
|
|
266
|
-
*
|
|
267
|
-
* export const loader = async ({ request }: LoaderArgs) => {
|
|
268
|
-
* const { admin, session } = await authenticate.admin(request);
|
|
269
|
-
* return json(admin.rest.resources.Order.count({ session }));
|
|
270
|
-
* };
|
|
271
|
-
* ```
|
|
272
|
-
*
|
|
273
|
-
* @example
|
|
274
|
-
* Making a GET request to the REST API
|
|
275
|
-
* ```ts
|
|
276
|
-
* // app/shopify.server.ts
|
|
277
|
-
* import { shopifyApp } from "@shopify/shopify-app-remix";
|
|
278
|
-
* import { restResources } from "@shopify/shopify-api/rest/admin/2023-04";
|
|
279
|
-
*
|
|
280
|
-
* const shopify = shopifyApp({
|
|
281
|
-
* restResources,
|
|
282
|
-
* // ...etc
|
|
283
|
-
* });
|
|
284
|
-
* export default shopify;
|
|
285
|
-
* export const authenticate = shopify.authenticate;
|
|
286
|
-
*
|
|
287
|
-
* // app/routes/**\/.ts
|
|
288
|
-
* import { LoaderArgs, json } from "@remix-run/node";
|
|
289
|
-
* import { authenticate } from "../shopify.server";
|
|
290
|
-
*
|
|
291
|
-
* export const loader = async ({ request }: LoaderArgs) => {
|
|
292
|
-
* const { admin, session } = await authenticate.admin(request);
|
|
293
|
-
* const response = await admin.rest.get({ path: "/customers/count.json" });
|
|
294
|
-
* const customers = await response.json();
|
|
295
|
-
* return json({ customers });
|
|
296
|
-
* };
|
|
297
|
-
* ```
|
|
298
|
-
*/
|
|
299
|
-
rest: RestClientWithResources<Resources>;
|
|
300
|
-
/**
|
|
301
|
-
* Methods for interacting with the Shopify Admin GraphQL API
|
|
302
|
-
*
|
|
303
|
-
* {@link https://shopify.dev/docs/api/admin-graphql}
|
|
304
|
-
* {@link https://github.com/Shopify/shopify-api-js/blob/main/docs/reference/clients/Graphql.md}
|
|
305
|
-
*
|
|
306
|
-
* @example
|
|
307
|
-
* Creating a new product
|
|
308
|
-
* ```ts
|
|
309
|
-
* import { ActionArgs } from "@remix-run/node";
|
|
310
|
-
* import { authenticate } from "../shopify.server";
|
|
311
|
-
*
|
|
312
|
-
* export async function action({ request }: ActionArgs) {
|
|
313
|
-
* const { admin } = await authenticate.admin(request);
|
|
314
|
-
*
|
|
315
|
-
* const response = await admin.graphql(
|
|
316
|
-
* `#graphql
|
|
317
|
-
* mutation populateProduct($input: ProductInput!) {
|
|
318
|
-
* productCreate(input: $input) {
|
|
319
|
-
* product {
|
|
320
|
-
* id
|
|
321
|
-
* }
|
|
322
|
-
* }
|
|
323
|
-
* }`,
|
|
324
|
-
* { variables: { input: { title: "Product Name" } } }
|
|
325
|
-
* );
|
|
326
|
-
*
|
|
327
|
-
* const productData = await response.json();
|
|
328
|
-
* return json({ data: productData.data });
|
|
329
|
-
* }
|
|
330
|
-
* ```
|
|
331
|
-
*/
|
|
332
|
-
graphql: GraphqlQueryFunction;
|
|
333
|
-
}
|
|
334
243
|
export {};
|
|
335
244
|
//# sourceMappingURL=config-types.d.ts.map
|
|
@@ -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,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"config-types.d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G,cAAc,CACxE,SAAQ,SAAS;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,UAAU,UAAU;IAClB,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"}
|
|
@@ -6,13 +6,13 @@ import { type ShopifyApp } from './types';
|
|
|
6
6
|
/**
|
|
7
7
|
* Creates an object your app will use to interact with Shopify.
|
|
8
8
|
*
|
|
9
|
-
* @param appConfig Configuration options for your
|
|
9
|
+
* @param appConfig Configuration options for your Shopify app, such as the scopes your app needs.
|
|
10
10
|
* @returns `ShopifyApp` An object constructed using your appConfig. It has methods for interacting with Shopify.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* The minimum viable configuration
|
|
13
|
+
* <caption>The minimum viable configuration</caption>
|
|
14
14
|
* ```ts
|
|
15
|
-
* import { shopifyApp } from "@shopify/shopify-app-remix";
|
|
15
|
+
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
16
16
|
*
|
|
17
17
|
* const shopify = shopifyApp({
|
|
18
18
|
* apiKey: process.env.SHOPIFY_API_KEY!,
|
|
@@ -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,EAML,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,EAML,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;AAYjB;;;;;;;;;;;;;;;;;;;GAmBG;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,CAyCvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shopify-app.doc.d.ts","sourceRoot":"","sources":["../../../src/server/shopify-app.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BAgCX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var data = {
|
|
4
|
+
name: 'shopifyApp',
|
|
5
|
+
description: "Returns a set of functions that can be used by the app's backend to be able to respond to all Shopify requests." +
|
|
6
|
+
'\n\nThe shape of the returned object changes depending on the value of `distribution`. If it is `AppDistribution.ShopifyAdmin`, then only `ShopifyAppBase` objects are returned, otherwise `ShopifyAppLogin` objects are included.',
|
|
7
|
+
category: 'Entrypoints',
|
|
8
|
+
type: 'function',
|
|
9
|
+
isVisualComponent: false,
|
|
10
|
+
definitions: [
|
|
11
|
+
{
|
|
12
|
+
title: 'shopifyApp',
|
|
13
|
+
description: 'Function to create a new Shopify API object.',
|
|
14
|
+
type: 'ShopifyAppGeneratedType',
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
jsDocTypeExamples: [
|
|
18
|
+
'ShopifyAppGeneratedType',
|
|
19
|
+
'ShopifyAppBase',
|
|
20
|
+
'ShopifyAppLogin',
|
|
21
|
+
],
|
|
22
|
+
related: [
|
|
23
|
+
{
|
|
24
|
+
name: 'Authenticated contexts',
|
|
25
|
+
subtitle: 'Authenticate requests coming from Shopify.',
|
|
26
|
+
url: '/docs/api/shopify-app-remix/authenticate',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Unauthenticated contexts',
|
|
30
|
+
subtitle: 'Interact with the API on non-Shopify requests.',
|
|
31
|
+
url: '/docs/api/shopify-app-remix/unauthenticated',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
exports.default = data;
|
|
36
|
+
//# sourceMappingURL=shopify-app.doc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shopify-app.doc.js","sourceRoot":"","sources":["../../../src/server/shopify-app.doc.ts"],"names":[],"mappings":";;AAEA,IAAM,IAAI,GAAkC;IAC1C,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,iHAAiH;QACjH,oOAAoO;IACtO,QAAQ,EAAE,aAAa;IACvB,IAAI,EAAE,UAAU;IAChB,iBAAiB,EAAE,KAAK;IACxB,WAAW,EAAE;QACX;YACE,KAAK,EAAE,YAAY;YACnB,WAAW,EAAE,8CAA8C;YAC3D,IAAI,EAAE,yBAAyB;SAChC;KACF;IACD,iBAAiB,EAAE;QACjB,yBAAyB;QACzB,gBAAgB;QAChB,iBAAiB;KAClB;IACD,OAAO,EAAE;QACP;YACE,IAAI,EAAE,wBAAwB;YAC9B,QAAQ,EAAE,4CAA4C;YACtD,GAAG,EAAE,0CAA0C;SAChD;QACD;YACE,IAAI,EAAE,0BAA0B;YAChC,QAAQ,EAAE,gDAAgD;YAC1D,GAAG,EAAE,6CAA6C;SACnD;KACF;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -14,16 +14,17 @@ var helpers_1 = require("./authenticate/helpers");
|
|
|
14
14
|
var login_1 = require("./authenticate/login/login");
|
|
15
15
|
var admin_1 = require("./unauthenticated/admin");
|
|
16
16
|
var public_1 = require("./authenticate/public");
|
|
17
|
+
var storefront_1 = require("./unauthenticated/storefront");
|
|
17
18
|
/**
|
|
18
19
|
* Creates an object your app will use to interact with Shopify.
|
|
19
20
|
*
|
|
20
|
-
* @param appConfig Configuration options for your
|
|
21
|
+
* @param appConfig Configuration options for your Shopify app, such as the scopes your app needs.
|
|
21
22
|
* @returns `ShopifyApp` An object constructed using your appConfig. It has methods for interacting with Shopify.
|
|
22
23
|
*
|
|
23
24
|
* @example
|
|
24
|
-
* The minimum viable configuration
|
|
25
|
+
* <caption>The minimum viable configuration</caption>
|
|
25
26
|
* ```ts
|
|
26
|
-
* import { shopifyApp } from "@shopify/shopify-app-remix";
|
|
27
|
+
* import { shopifyApp } from "@shopify/shopify-app-remix/server";
|
|
27
28
|
*
|
|
28
29
|
* const shopify = shopifyApp({
|
|
29
30
|
* apiKey: process.env.SHOPIFY_API_KEY!,
|
|
@@ -54,6 +55,7 @@ function shopifyApp(appConfig) {
|
|
|
54
55
|
},
|
|
55
56
|
unauthenticated: {
|
|
56
57
|
admin: (0, admin_1.unauthenticatedAdminContextFactory)(params),
|
|
58
|
+
storefront: (0, storefront_1.unauthenticatedStorefrontContextFactory)(params),
|
|
57
59
|
},
|
|
58
60
|
};
|
|
59
61
|
if (isAppStoreApp(shopify, appConfig) ||
|
|
@@ -94,7 +96,7 @@ function deriveApi(appConfig) {
|
|
|
94
96
|
function deriveConfig(appConfig, apiConfig) {
|
|
95
97
|
var _a, _b, _c;
|
|
96
98
|
if (!appConfig.sessionStorage) {
|
|
97
|
-
throw new shopify_api_1.ShopifyError('Please provide a valid session storage.
|
|
99
|
+
throw new shopify_api_1.ShopifyError('Please provide a valid session storage. Refer to https://github.com/Shopify/shopify-app-js/blob/main/README.md#session-storage-options for options.');
|
|
98
100
|
}
|
|
99
101
|
var authPathPrefix = appConfig.authPathPrefix || '/auth';
|
|
100
102
|
appConfig.distribution = (_a = appConfig.distribution) !== null && _a !== void 0 ? _a : types_1.AppDistribution.AppStore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify-app.js","sourceRoot":"","sources":["../../../src/server/shopify-app.ts"],"names":[],"mappings":";;;;AAAA,iDAA+C;AAC/C,oDAQ8B;AAI9B,iCASiB;AACjB,qCAAwD;AACxD,oDAAgE;AAChE,kEAA+D;AAC/D,qEAAgF;AAChF,qDAAiD;AACjD,kDAAyE;AACzE,oDAAwD;AACxD,iDAA2E;AAC3E,gDAAgE;
|
|
1
|
+
{"version":3,"file":"shopify-app.js","sourceRoot":"","sources":["../../../src/server/shopify-app.ts"],"names":[],"mappings":";;;;AAAA,iDAA+C;AAC/C,oDAQ8B;AAI9B,iCASiB;AACjB,qCAAwD;AACxD,oDAAgE;AAChE,kEAA+D;AAC/D,qEAAgF;AAChF,qDAAiD;AACjD,kDAAyE;AACzE,oDA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