From 8845906b90dbf3c3c9a5f03ac280531636b03ce3 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Thu, 25 Jan 2024 11:19:19 -0700 Subject: [PATCH 01/19] Ran npm run build-docs without any changes --- .../docs/generated/generated_docs_data.json | 2469 +++++++++++------ 1 file changed, 1617 insertions(+), 852 deletions(-) diff --git a/packages/shopify-app-remix/docs/generated/generated_docs_data.json b/packages/shopify-app-remix/docs/generated/generated_docs_data.json index 7d94cf2021..5a3406a9ec 100644 --- a/packages/shopify-app-remix/docs/generated/generated_docs_data.json +++ b/packages/shopify-app-remix/docs/generated/generated_docs_data.json @@ -713,6 +713,14 @@ } ] }, + "SearchParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "SearchParams", + "value": "Record", + "description": "", + "members": [] + }, "HeaderParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -728,115 +736,48 @@ "value": "GetRequestParams & {\n data: Record | string;\n}", "description": "" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", - "description": "", - "params": [ - { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" - }, - { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" - } - ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "AdminOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminOperations", + "value": "AdminQueries & AdminMutations", + "description": "" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "AdminQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminQueries", "description": "", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + "value": "export interface AdminQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "ApiVersion": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "ApiVersion", - "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", + "AdminMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminMutations", + "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October22", - "value": "2022-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January23", - "value": "2023-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "April23", - "value": "2023-04" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "July23", - "value": "2023-07" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October23", - "value": "2023-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January24", - "value": "2024-01" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "Unstable", - "value": "unstable" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } - ] + ], + "value": "export interface AdminMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, "BillingContext": { "filePath": "src/server/authenticate/admin/billing/types.ts", @@ -2715,6 +2656,14 @@ } ] }, + "SearchParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "SearchParams", + "value": "Record", + "description": "", + "members": [] + }, "HeaderParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -2730,115 +2679,48 @@ "value": "GetRequestParams & {\n data: Record | string;\n}", "description": "" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", - "description": "", - "params": [ - { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" - }, - { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" - } - ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "AdminOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminOperations", + "value": "AdminQueries & AdminMutations", + "description": "" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "AdminQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminQueries", "description": "", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + "value": "export interface AdminQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "ApiVersion": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "ApiVersion", - "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", + "AdminMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminMutations", + "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October22", - "value": "2022-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January23", - "value": "2023-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "April23", - "value": "2023-04" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "July23", - "value": "2023-07" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October23", - "value": "2023-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January24", - "value": "2024-01" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "Unstable", - "value": "unstable" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } - ] + ], + "value": "export interface AdminMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, "StorefrontContext": { "filePath": "src/server/clients/storefront/types.ts", @@ -2866,6 +2748,49 @@ } ], "value": "export interface StorefrontContext {\n /**\n * Method for interacting with the Shopify Storefront GraphQL API\n *\n * 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).\n *\n * {@link https://shopify.dev/docs/api/storefront}\n *\n * @example\n * Querying the GraphQL API.\n * Use `storefront.graphql` to make query / mutation requests.\n * ```ts\n * // app/routes/**\\/.ts\n * import { json } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { storefront } = await authenticate.public.appProxy(request);\n *\n * const response = await storefront.graphql(`{blogs(first: 10) { edges { node { id } } } }`);\n *\n * return json(await response.json());\n * }\n * ```\n */\n graphql: GraphQLClient;\n}" + }, + "StorefrontOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StorefrontOperations", + "value": "StorefrontQueries & StorefrontMutations", + "description": "" + }, + "StorefrontQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontQueries", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" + } + ], + "value": "interface StorefrontQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" + }, + "StorefrontMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontMutations", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" + } + ], + "value": "interface StorefrontMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" } } } @@ -3600,14 +3525,14 @@ { "filePath": "src/server/types.ts", "syntaxKind": "MethodSignature", - "name": "__@iterator@1657", + "name": "__@iterator@482", "value": "() => IterableIterator", "description": "Iterator" }, { "filePath": "src/server/types.ts", "syntaxKind": "PropertySignature", - "name": "__@unscopables@1659", + "name": "__@unscopables@484", "value": "{ [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; at?: boolean; }", "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement." }, @@ -4297,6 +4222,14 @@ } ] }, + "SearchParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "SearchParams", + "value": "Record", + "description": "", + "members": [] + }, "HeaderParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -4312,120 +4245,53 @@ "value": "GetRequestParams & {\n data: Record | string;\n}", "description": "" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", + "AdminOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminOperations", + "value": "AdminQueries & AdminMutations", + "description": "" + }, + "AdminQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminQueries", "description": "", - "params": [ + "members": [ { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "value": "export interface AdminQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "AdminMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminMutations", "description": "", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + "value": "export interface AdminMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "ApiVersion": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "ApiVersion", - "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", - "members": [ - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October22", - "value": "2022-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January23", - "value": "2023-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "April23", - "value": "2023-04" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "July23", - "value": "2023-07" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October23", - "value": "2023-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January24", - "value": "2024-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "Unstable", - "value": "unstable" - } - ] - }, - "BillingContext": { - "filePath": "src/server/authenticate/admin/billing/types.ts", - "name": "BillingContext", - "description": "", + "BillingContext": { + "filePath": "src/server/authenticate/admin/billing/types.ts", + "name": "BillingContext", + "description": "", "members": [ { "filePath": "src/server/authenticate/admin/billing/types.ts", @@ -5034,6 +4900,283 @@ ], "value": "export declare class RestClient {\n static config: ConfigInterface;\n static formatPaths: boolean;\n static LINK_HEADER_REGEXP: RegExp;\n static DEFAULT_LIMIT: string;\n static RETRY_WAIT_TIME: number;\n static readonly DEPRECATION_ALERT_DELAY = 300000;\n loggedDeprecations: Record;\n readonly client: AdminRestApiClient;\n readonly session: Session;\n readonly apiVersion: ApiVersion;\n constructor({ session, apiVersion }: RestClientParams);\n /**\n * Performs a GET request on the given path.\n */\n get(params: GetRequestParams): Promise>;\n /**\n * Performs a POST request on the given path.\n */\n post(params: PostRequestParams): Promise>;\n /**\n * Performs a PUT request on the given path.\n */\n put(params: PutRequestParams): Promise>;\n /**\n * Performs a DELETE request on the given path.\n */\n delete(params: DeleteRequestParams): Promise>;\n protected request(params: RequestParams): Promise>;\n private restClass;\n private buildRequestParams;\n private logDeprecations;\n}" }, + "AdminRestApiClient": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "AdminRestApiClient", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "get", + "value": "(path: string, options?: GetRequestOptions) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "put", + "value": "(path: string, options?: PutRequestOptions) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "post", + "value": "(path: string, options?: PostRequestOptions) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "delete", + "value": "(path: string, options?: DeleteRequestOptions) => Promise", + "description": "" + } + ], + "value": "export interface AdminRestApiClient {\n get: (path: string, options?: GetRequestOptions) => ReturnType;\n put: (path: string, options?: PutRequestOptions) => ReturnType;\n post: (path: string, options?: PostRequestOptions) => ReturnType;\n delete: (path: string, options?: DeleteRequestOptions) => ReturnType;\n}" + }, + "GetRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "GetRequestOptions", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "string | Record", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "apiVersion", + "value": "string", + "description": "", + "isOptional": true + } + ], + "value": "export interface GetRequestOptions {\n headers?: HeaderOptions;\n data?: Record | string;\n searchParams?: SearchParams;\n retries?: number;\n apiVersion?: string;\n}" + }, + "HeaderOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "HeaderOptions", + "value": "Record", + "description": "", + "members": [] + }, + "PutRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "PutRequestOptions", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "string | Record", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "apiVersion", + "value": "string", + "description": "", + "isOptional": true + } + ], + "value": "export interface PutRequestOptions extends PostRequestOptions {\n}" + }, + "PostRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "PostRequestOptions", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "string | Record", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "apiVersion", + "value": "string", + "description": "", + "isOptional": true + } + ], + "value": "export interface PostRequestOptions extends GetRequestOptions {\n data: Required[\"data\"];\n}" + }, + "DeleteRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "DeleteRequestOptions", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "string | Record", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "apiVersion", + "value": "string", + "description": "", + "isOptional": true + } + ], + "value": "export interface DeleteRequestOptions extends GetRequestOptions {\n}" + }, + "ApiVersion": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "syntaxKind": "EnumDeclaration", + "name": "ApiVersion", + "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "name": "October22", + "value": "2022-10" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "name": "January23", + "value": "2023-01" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "name": "April23", + "value": "2023-04" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "name": "July23", + "value": "2023-07" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "name": "October23", + "value": "2023-10" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "name": "January24", + "value": "2024-01" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", + "name": "Unstable", + "value": "unstable" + } + ] + }, "RestRequestReturn": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/types.d.ts", "name": "RestRequestReturn", @@ -5064,14 +5207,6 @@ ], "value": "export interface RestRequestReturn {\n body: T;\n headers: Headers;\n pageInfo?: PageInfo;\n}" }, - "Headers": { - "filePath": "../../node_modules/@shopify/shopify-api/runtime/http/types.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "Headers", - "value": "Record", - "description": "", - "members": [] - }, "PageInfo": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/types.d.ts", "name": "PageInfo", @@ -5871,6 +6006,168 @@ ], "value": "export declare class GraphqlClient {\n static config: ConfigInterface;\n readonly session: Session;\n readonly client: AdminApiClient;\n readonly apiVersion?: ApiVersion;\n constructor(params: GraphqlClientParams);\n query(params: GraphqlParams): Promise>;\n request(operation: Operation, options?: GraphqlQueryOptions): Promise : T>>;\n private graphqlClass;\n}" }, + "AdminApiClient": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminApiClient", + "value": "ApiClient", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "config", + "value": "Readonly", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "getHeaders", + "value": "(headers?: Headers) => Headers", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "getApiUrl", + "value": "(apiVersion?: string) => string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "fetch", + "value": "ApiClientFetch", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "request", + "value": "ApiClientRequest", + "description": "" + } + ] + }, + "Readonly": { + "filePath": "../../node_modules/@shopify/polaris/build/ts/src/components/TextField/TextField.d.ts", + "name": "Readonly", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/polaris/build/ts/src/components/TextField/TextField.d.ts", + "syntaxKind": "PropertySignature", + "name": "readonly", + "value": "true", + "description": "", + "isOptional": true + } + ], + "value": "interface Readonly {\n readonly?: true;\n}" + }, + "ApiClientFetch": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ApiClientFetch", + "description": "", + "params": [ + { + "name": "params", + "description": "", + "value": "ApiClientRequestParams", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + } + ], + "returns": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "description": "", + "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", + "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" + }, + "value": "type ApiClientFetch = (...params: ApiClientRequestParams) => Promise>>>;" + }, + "ApiClientRequestParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ApiClientRequestParams", + "value": "[\n operation: Operation,\n options?: ApiClientRequestOptions\n]", + "description": "", + "members": [ + { + "name": "[0]", + "value": "operation: Operation", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + }, + { + "name": "[1]", + "value": "options?: ApiClientRequestOptions", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + } + ] + }, + "ApiClientRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ApiClientRequestOptions", + "value": "{\n apiVersion?: string;\n headers?: Headers;\n retries?: number;\n} & (Operation extends keyof Operations ? OperationVariables : {\n variables?: Record;\n})", + "description": "" + }, + "Headers": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "Headers", + "value": "Record", + "description": "", + "members": [] + }, + "OperationVariables": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "OperationVariables", + "value": "Operations[Operation][\"variables\"] extends Record ? Record : {\n variables?: {\n [k in keyof Operations[Operation][\"variables\"]]: UnpackedInputMaybe;\n };\n}", + "description": "" + }, + "UnpackedInputMaybe": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "UnpackedInputMaybe", + "value": "InputType extends InputMaybe ? InputMaybe> : UnpackedInput", + "description": "" + }, + "InputMaybe": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "InputMaybe", + "value": "never", + "description": "" + }, + "UnpackedInput": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "UnpackedInput", + "value": "\"input\" extends keyof InputType ? InputType[\"input\"] : InputType", + "description": "" + }, + "ApiClientRequest": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ApiClientRequest", + "description": "", + "params": [ + { + "name": "params", + "description": "", + "value": "ApiClientRequestParams", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + } + ], + "returns": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "description": "", + "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", + "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" + }, + "value": "type ApiClientRequest = (...params: ApiClientRequestParams) => Promise : TData>>;" + }, "GraphqlParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -5933,6 +6230,93 @@ ], "value": "export interface GraphqlQueryOptions {\n variables?: ApiClientRequestOptions['variables'];\n headers?: Record;\n retries?: number;\n}" }, + "ClientResponse": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ClientResponse", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "errors", + "value": "ResponseErrors", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "TData", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "extensions", + "value": "GQLExtensions", + "description": "", + "isOptional": true + } + ], + "value": "interface ClientResponse extends FetchResponseBody {\n errors?: ResponseErrors;\n}" + }, + "ResponseErrors": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ResponseErrors", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "networkStatusCode", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "message", + "value": "string", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "graphQLErrors", + "value": "any[]", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "response", + "value": "Response", + "description": "", + "isOptional": true + } + ], + "value": "interface ResponseErrors {\n networkStatusCode?: number;\n message?: string;\n graphQLErrors?: any[];\n response?: Response;\n}" + }, + "GQLExtensions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "GQLExtensions", + "value": "Record", + "description": "", + "members": [] + }, + "ReturnData": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ReturnData", + "value": "Operation extends keyof Operations ? Operations[Operation][\"return\"] : any", + "description": "" + }, "StorefrontClient": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/storefront/client.d.ts", "name": "StorefrontClient", @@ -5976,6 +6360,93 @@ ], "value": "export declare class StorefrontClient {\n static config: ConfigInterface;\n readonly session: Session;\n readonly client: StorefrontApiClient;\n readonly apiVersion?: ApiVersion;\n constructor(params: GraphqlClientParams);\n query(params: GraphqlParams): Promise>;\n request(operation: Operation, options?: GraphqlQueryOptions): Promise : T>>;\n private storefrontClass;\n}" }, + "StorefrontApiClient": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StorefrontApiClient", + "value": "ApiClient", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "config", + "value": "Readonly", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "getHeaders", + "value": "(headers?: Headers) => Headers", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "getApiUrl", + "value": "(apiVersion?: string) => string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "fetch", + "value": "ApiClientFetch", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "request", + "value": "ApiClientRequest", + "description": "" + } + ] + }, + "StorefrontOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StorefrontOperations", + "value": "StorefrontQueries & StorefrontMutations", + "description": "" + }, + "StorefrontQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontQueries", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" + } + ], + "value": "interface StorefrontQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" + }, + "StorefrontMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontMutations", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" + } + ], + "value": "interface StorefrontMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" + }, "GraphqlProxy": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/graphql_proxy/types.d.ts", "name": "GraphqlProxy", @@ -8205,6 +8676,14 @@ } ] }, + "SearchParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "SearchParams", + "value": "Record", + "description": "", + "members": [] + }, "HeaderParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -8220,115 +8699,48 @@ "value": "GetRequestParams & {\n data: Record | string;\n}", "description": "" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", - "description": "", - "params": [ - { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" - }, - { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" - } - ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "AdminOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminOperations", + "value": "AdminQueries & AdminMutations", + "description": "" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "AdminQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminQueries", "description": "", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + "value": "export interface AdminQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "ApiVersion": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "ApiVersion", - "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", + "AdminMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminMutations", + "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October22", - "value": "2022-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January23", - "value": "2023-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "April23", - "value": "2023-04" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "July23", - "value": "2023-07" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October23", - "value": "2023-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January24", - "value": "2024-01" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "Unstable", - "value": "unstable" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } - ] + ], + "value": "export interface AdminMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" } } } @@ -8470,115 +8882,48 @@ ], "value": "export interface StorefrontContext {\n /**\n * Method for interacting with the Shopify Storefront GraphQL API\n *\n * 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).\n *\n * {@link https://shopify.dev/docs/api/storefront}\n *\n * @example\n * Querying the GraphQL API.\n * Use `storefront.graphql` to make query / mutation requests.\n * ```ts\n * // app/routes/**\\/.ts\n * import { json } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { storefront } = await authenticate.public.appProxy(request);\n *\n * const response = await storefront.graphql(`{blogs(first: 10) { edges { node { id } } } }`);\n *\n * return json(await response.json());\n * }\n * ```\n */\n graphql: GraphQLClient;\n}" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", - "description": "", - "params": [ - { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" - }, - { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" - } - ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "StorefrontOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StorefrontOperations", + "value": "StorefrontQueries & StorefrontMutations", + "description": "" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "StorefrontQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontQueries", "description": "", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + "value": "interface StorefrontQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "ApiVersion": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "ApiVersion", - "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", + "StorefrontMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontMutations", + "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October22", - "value": "2022-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January23", - "value": "2023-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "April23", - "value": "2023-04" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "July23", - "value": "2023-07" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October23", - "value": "2023-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January24", - "value": "2024-01" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "Unstable", - "value": "unstable" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" } - ] + ], + "value": "interface StorefrontMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" } } } @@ -8652,7 +8997,7 @@ "name": "ShopifyApp>", "value": "ShopifyApp>" }, - "value": "export function shopifyApp<\n Config extends AppConfigArg,\n Resources extends ShopifyRestResources,\n Storage extends SessionStorage,\n>(appConfig: Config): ShopifyApp {\n const api = deriveApi(appConfig);\n const config = deriveConfig(appConfig, api.config);\n const logger = overrideLogger(api.logger);\n\n if (appConfig.webhooks) {\n api.webhooks.addHandlers(appConfig.webhooks);\n }\n\n const params: BasicParams = {api, config, logger};\n const oauth = new AuthCodeFlowStrategy(params);\n const authStrategy = authStrategyFactory({\n ...params,\n strategy: oauth,\n });\n\n const shopify:\n | AdminApp\n | AppStoreApp\n | SingleMerchantApp = {\n sessionStorage: config.sessionStorage,\n addDocumentResponseHeaders: addDocumentResponseHeadersFactory(params),\n registerWebhooks: registerWebhooksFactory(params),\n authenticate: {\n admin: authStrategy,\n public: authenticatePublicFactory(params),\n webhook: authenticateWebhookFactory<\n Config['future'],\n Resources,\n keyof Config['webhooks'] | MandatoryTopics\n >(params),\n },\n unauthenticated: {\n admin: unauthenticatedAdminContextFactory(params),\n storefront: unauthenticatedStorefrontContextFactory(params),\n },\n };\n\n if (\n isAppStoreApp(shopify, appConfig) ||\n isSingleMerchantApp(shopify, appConfig)\n ) {\n shopify.login = loginFactory(params);\n }\n\n return shopify as ShopifyApp;\n}", + "value": "export function shopifyApp<\n Config extends AppConfigArg,\n Resources extends ShopifyRestResources,\n Storage extends SessionStorage,\n>(appConfig: Config): ShopifyApp {\n const api = deriveApi(appConfig);\n const config = deriveConfig(appConfig, api.config);\n const logger = overrideLogger(api.logger);\n\n if (appConfig.webhooks) {\n api.webhooks.addHandlers(appConfig.webhooks);\n }\n\n const params: BasicParams = {api, config, logger};\n const authStrategy = authStrategyFactory({\n ...params,\n strategy:\n config.future.unstable_newEmbeddedAuthStrategy && config.isEmbeddedApp\n ? new TokenExchangeStrategy(params)\n : new AuthCodeFlowStrategy(params),\n });\n\n const shopify:\n | AdminApp\n | AppStoreApp\n | SingleMerchantApp = {\n sessionStorage: config.sessionStorage,\n addDocumentResponseHeaders: addDocumentResponseHeadersFactory(params),\n registerWebhooks: registerWebhooksFactory(params),\n authenticate: {\n admin: authStrategy,\n public: authenticatePublicFactory(params),\n webhook: authenticateWebhookFactory<\n Config['future'],\n Resources,\n keyof Config['webhooks'] | MandatoryTopics\n >(params),\n },\n unauthenticated: {\n admin: unauthenticatedAdminContextFactory(params),\n storefront: unauthenticatedStorefrontContextFactory(params),\n },\n };\n\n if (\n isAppStoreApp(shopify, appConfig) ||\n isSingleMerchantApp(shopify, appConfig)\n ) {\n shopify.login = loginFactory(params);\n }\n\n return shopify as ShopifyApp;\n}", "examples": [ { "title": "The minimum viable configuration", @@ -9676,6 +10021,14 @@ } ] }, + "SearchParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "SearchParams", + "value": "Record", + "description": "", + "members": [] + }, "HeaderParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -9691,72 +10044,79 @@ "value": "GetRequestParams & {\n data: Record | string;\n}", "description": "" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", + "AdminOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminOperations", + "value": "AdminQueries & AdminMutations", + "description": "" + }, + "AdminQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminQueries", "description": "", - "params": [ + "members": [ { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "value": "export interface AdminQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" + }, + "AdminMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminMutations", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" + } + ], + "value": "export interface AdminMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "ShopifyRestResources": { + "filePath": "../../node_modules/@shopify/shopify-api/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ShopifyRestResources", + "value": "Record", "description": "", + "members": [] + }, + "AppDistribution": { + "filePath": "src/server/types.ts", + "syntaxKind": "EnumDeclaration", + "name": "AppDistribution", + "value": "export enum AppDistribution {\n AppStore = 'app_store',\n SingleMerchant = 'single_merchant',\n ShopifyAdmin = 'shopify_admin',\n}", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true + "filePath": "src/server/types.ts", + "name": "AppStore", + "value": "app_store" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "src/server/types.ts", + "name": "SingleMerchant", + "value": "single_merchant" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "src/server/types.ts", + "name": "ShopifyAdmin", + "value": "shopify_admin" } - ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + ] }, "ApiVersion": { "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", @@ -9801,37 +10161,6 @@ } ] }, - "ShopifyRestResources": { - "filePath": "../../node_modules/@shopify/shopify-api/rest/types.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ShopifyRestResources", - "value": "Record", - "description": "", - "members": [] - }, - "AppDistribution": { - "filePath": "src/server/types.ts", - "syntaxKind": "EnumDeclaration", - "name": "AppDistribution", - "value": "export enum AppDistribution {\n AppStore = 'app_store',\n SingleMerchant = 'single_merchant',\n ShopifyAdmin = 'shopify_admin',\n}", - "members": [ - { - "filePath": "src/server/types.ts", - "name": "AppStore", - "value": "app_store" - }, - { - "filePath": "src/server/types.ts", - "name": "SingleMerchant", - "value": "single_merchant" - }, - { - "filePath": "src/server/types.ts", - "name": "ShopifyAdmin", - "value": "shopify_admin" - } - ] - }, "BillingConfig": { "filePath": "../../node_modules/@shopify/shopify-api/lib/billing/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -10050,14 +10379,6 @@ }, "value": "type AddDocumentResponseHeaders = (request: Request, headers: Headers) => void;" }, - "Headers": { - "filePath": "../../node_modules/@shopify/shopify-api/runtime/http/types.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "Headers", - "value": "Record", - "description": "", - "members": [] - }, "RegisterWebhooks": { "filePath": "src/server/types.ts", "name": "RegisterWebhooks", @@ -10073,10 +10394,10 @@ "returns": { "filePath": "src/server/types.ts", "description": "", - "name": "Promise", - "value": "Promise" + "name": "Promise", + "value": "Promise" }, - "value": "type RegisterWebhooks = (\n options: RegisterWebhooksOptions,\n) => Promise;" + "value": "type RegisterWebhooks = (\n options: RegisterWebhooksOptions,\n) => Promise;" }, "RegisterWebhooksOptions": { "filePath": "src/server/authenticate/webhooks/types.ts", @@ -11176,6 +11497,49 @@ ], "value": "export interface StorefrontContext {\n /**\n * Method for interacting with the Shopify Storefront GraphQL API\n *\n * 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).\n *\n * {@link https://shopify.dev/docs/api/storefront}\n *\n * @example\n * Querying the GraphQL API.\n * Use `storefront.graphql` to make query / mutation requests.\n * ```ts\n * // app/routes/**\\/.ts\n * import { json } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { storefront } = await authenticate.public.appProxy(request);\n *\n * const response = await storefront.graphql(`{blogs(first: 10) { edges { node { id } } } }`);\n *\n * return json(await response.json());\n * }\n * ```\n */\n graphql: GraphQLClient;\n}" }, + "StorefrontOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StorefrontOperations", + "value": "StorefrontQueries & StorefrontMutations", + "description": "" + }, + "StorefrontQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontQueries", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" + } + ], + "value": "interface StorefrontQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" + }, + "StorefrontMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontMutations", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" + } + ], + "value": "interface StorefrontMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" + }, "AuthenticatePublicLegacy": { "filePath": "src/server/authenticate/public/types.ts", "syntaxKind": "TypeAliasDeclaration", @@ -11579,14 +11943,14 @@ { "filePath": "src/server/types.ts", "syntaxKind": "MethodSignature", - "name": "__@iterator@1657", + "name": "__@iterator@482", "value": "() => IterableIterator", "description": "Iterator" }, { "filePath": "src/server/types.ts", "syntaxKind": "PropertySignature", - "name": "__@unscopables@1659", + "name": "__@unscopables@484", "value": "{ [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; at?: boolean; }", "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement." }, @@ -11718,119 +12082,353 @@ ] }, { - "filePath": "src/server/authenticate/webhooks/types.ts", + "filePath": "src/server/authenticate/webhooks/types.ts", + "syntaxKind": "PropertySignature", + "name": "payload", + "value": "JSONValue", + "description": "The payload from the webhook request.", + "examples": [ + { + "title": "Webhook payload", + "description": "Get the request's POST payload.", + "tabs": [ + { + "code": "import { ActionFunction } from \"@remix-run/node\";\nimport { authenticate } from \"../shopify.server\";\n\nexport const action: ActionFunction = async ({ request }) => {\n const { payload } = await authenticate.webhook(request);\n return new Response();\n};", + "title": "/app/routes/webhooks.tsx" + } + ] + } + ] + } + ], + "value": "export interface WebhookContextWithSession<\n Future extends FutureFlagOptions,\n Resources extends ShopifyRestResources,\n Topics = string | number | symbol,\n> extends Context {\n /**\n * A session with an offline token for the shop.\n *\n * Returned only if there is a session for the shop.\n */\n session: Session;\n\n /**\n * An admin context for the webhook.\n *\n * Returned only if there is a session for the shop.\n *\n * @example\n * [V3] Webhook admin context.\n * With the `v3_webhookAdminContext` future flag enabled, use the `admin` object in the context to interact with the Admin API.\n * ```ts\n * // /app/routes/webhooks.tsx\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { admin } = await authenticate.webhook(request);\n *\n * const response = await admin?.graphql(\n * `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * { variables: { input: { title: \"Product Name\" } } }\n * );\n *\n * const productData = await response.json();\n * return json({ data: productData.data });\n * }\n * ```\n *\n * @example\n * Webhook admin context.\n * Use the `admin` object in the context to interact with the Admin API. This format will be removed in V3 of the package.\n * ```ts\n * // /app/routes/webhooks.tsx\n * import { json, ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { admin } = await authenticate.webhook(request);\n *\n * const response = await admin?.graphql.query({\n * data: {\n * query: `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * variables: { input: { title: \"Product Name\" } },\n * },\n * });\n *\n * const productData = response?.body.data;\n * return json({ data: productData.data });\n * }\n * ```\n */\n admin: WebhookAdminContext;\n}" + }, + "WebhookAdminContext": { + "filePath": "src/server/authenticate/webhooks/types.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "WebhookAdminContext", + "value": "FeatureEnabled extends true\n ? AdminApiContext\n : LegacyWebhookAdminApiContext", + "description": "" + }, + "LegacyWebhookAdminApiContext": { + "filePath": "src/server/authenticate/webhooks/types.ts", + "name": "LegacyWebhookAdminApiContext", + "description": "", + "members": [ + { + "filePath": "src/server/authenticate/webhooks/types.ts", + "syntaxKind": "PropertySignature", + "name": "rest", + "value": "RestClient & Resources", + "description": "A REST client." + }, + { + "filePath": "src/server/authenticate/webhooks/types.ts", + "syntaxKind": "PropertySignature", + "name": "graphql", + "value": "InstanceType", + "description": "A GraphQL client." + } + ], + "value": "export interface LegacyWebhookAdminApiContext<\n Resources extends ShopifyRestResources,\n> {\n /** A REST client. */\n rest: InstanceType & Resources;\n /** A GraphQL client. */\n graphql: InstanceType;\n}" + }, + "RestClient": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "name": "RestClient", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "loggedDeprecations", + "value": "Record", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "client", + "value": "AdminRestApiClient", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "session", + "value": "Session", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "apiVersion", + "value": "ApiVersion", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "get", + "value": "(params: GetRequestParams) => Promise>", + "description": "Performs a GET request on the given path." + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "post", + "value": "(params: PostRequestParams) => Promise>", + "description": "Performs a POST request on the given path." + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "put", + "value": "(params: PostRequestParams) => Promise>", + "description": "Performs a PUT request on the given path." + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "delete", + "value": "(params: GetRequestParams) => Promise>", + "description": "Performs a DELETE request on the given path." + } + ], + "value": "export declare class RestClient {\n static config: ConfigInterface;\n static formatPaths: boolean;\n static LINK_HEADER_REGEXP: RegExp;\n static DEFAULT_LIMIT: string;\n static RETRY_WAIT_TIME: number;\n static readonly DEPRECATION_ALERT_DELAY = 300000;\n loggedDeprecations: Record;\n readonly client: AdminRestApiClient;\n readonly session: Session;\n readonly apiVersion: ApiVersion;\n constructor({ session, apiVersion }: RestClientParams);\n /**\n * Performs a GET request on the given path.\n */\n get(params: GetRequestParams): Promise>;\n /**\n * Performs a POST request on the given path.\n */\n post(params: PostRequestParams): Promise>;\n /**\n * Performs a PUT request on the given path.\n */\n put(params: PutRequestParams): Promise>;\n /**\n * Performs a DELETE request on the given path.\n */\n delete(params: DeleteRequestParams): Promise>;\n protected request(params: RequestParams): Promise>;\n private restClass;\n private buildRequestParams;\n private logDeprecations;\n}" + }, + "AdminRestApiClient": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "AdminRestApiClient", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "get", + "value": "(path: string, options?: GetRequestOptions) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "put", + "value": "(path: string, options?: PutRequestOptions) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "post", + "value": "(path: string, options?: PostRequestOptions) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "delete", + "value": "(path: string, options?: DeleteRequestOptions) => Promise", + "description": "" + } + ], + "value": "export interface AdminRestApiClient {\n get: (path: string, options?: GetRequestOptions) => ReturnType;\n put: (path: string, options?: PutRequestOptions) => ReturnType;\n post: (path: string, options?: PostRequestOptions) => ReturnType;\n delete: (path: string, options?: DeleteRequestOptions) => ReturnType;\n}" + }, + "GetRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "GetRequestOptions", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "string | Record", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", "syntaxKind": "PropertySignature", - "name": "payload", - "value": "JSONValue", - "description": "The payload from the webhook request.", - "examples": [ - { - "title": "Webhook payload", - "description": "Get the request's POST payload.", - "tabs": [ - { - "code": "import { ActionFunction } from \"@remix-run/node\";\nimport { authenticate } from \"../shopify.server\";\n\nexport const action: ActionFunction = async ({ request }) => {\n const { payload } = await authenticate.webhook(request);\n return new Response();\n};", - "title": "/app/routes/webhooks.tsx" - } - ] - } - ] + "name": "apiVersion", + "value": "string", + "description": "", + "isOptional": true } ], - "value": "export interface WebhookContextWithSession<\n Future extends FutureFlagOptions,\n Resources extends ShopifyRestResources,\n Topics = string | number | symbol,\n> extends Context {\n /**\n * A session with an offline token for the shop.\n *\n * Returned only if there is a session for the shop.\n */\n session: Session;\n\n /**\n * An admin context for the webhook.\n *\n * Returned only if there is a session for the shop.\n *\n * @example\n * [V3] Webhook admin context.\n * With the `v3_webhookAdminContext` future flag enabled, use the `admin` object in the context to interact with the Admin API.\n * ```ts\n * // /app/routes/webhooks.tsx\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { admin } = await authenticate.webhook(request);\n *\n * const response = await admin?.graphql(\n * `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * { variables: { input: { title: \"Product Name\" } } }\n * );\n *\n * const productData = await response.json();\n * return json({ data: productData.data });\n * }\n * ```\n *\n * @example\n * Webhook admin context.\n * Use the `admin` object in the context to interact with the Admin API. This format will be removed in V3 of the package.\n * ```ts\n * // /app/routes/webhooks.tsx\n * import { json, ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { admin } = await authenticate.webhook(request);\n *\n * const response = await admin?.graphql.query({\n * data: {\n * query: `#graphql\n * mutation populateProduct($input: ProductInput!) {\n * productCreate(input: $input) {\n * product {\n * id\n * }\n * }\n * }`,\n * variables: { input: { title: \"Product Name\" } },\n * },\n * });\n *\n * const productData = response?.body.data;\n * return json({ data: productData.data });\n * }\n * ```\n */\n admin: WebhookAdminContext;\n}" + "value": "export interface GetRequestOptions {\n headers?: HeaderOptions;\n data?: Record | string;\n searchParams?: SearchParams;\n retries?: number;\n apiVersion?: string;\n}" }, - "WebhookAdminContext": { - "filePath": "src/server/authenticate/webhooks/types.ts", + "HeaderOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", "syntaxKind": "TypeAliasDeclaration", - "name": "WebhookAdminContext", - "value": "FeatureEnabled extends true\n ? AdminApiContext\n : LegacyWebhookAdminApiContext", - "description": "" + "name": "HeaderOptions", + "value": "Record", + "description": "", + "members": [] }, - "LegacyWebhookAdminApiContext": { - "filePath": "src/server/authenticate/webhooks/types.ts", - "name": "LegacyWebhookAdminApiContext", + "PutRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "PutRequestOptions", "description": "", "members": [ { - "filePath": "src/server/authenticate/webhooks/types.ts", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", "syntaxKind": "PropertySignature", - "name": "rest", - "value": "RestClient & Resources", - "description": "A REST client." + "name": "data", + "value": "string | Record", + "description": "" }, { - "filePath": "src/server/authenticate/webhooks/types.ts", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", "syntaxKind": "PropertySignature", - "name": "graphql", - "value": "InstanceType", - "description": "A GraphQL client." + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "apiVersion", + "value": "string", + "description": "", + "isOptional": true } ], - "value": "export interface LegacyWebhookAdminApiContext<\n Resources extends ShopifyRestResources,\n> {\n /** A REST client. */\n rest: InstanceType & Resources;\n /** A GraphQL client. */\n graphql: InstanceType;\n}" + "value": "export interface PutRequestOptions extends PostRequestOptions {\n}" }, - "RestClient": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "name": "RestClient", + "PostRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "PostRequestOptions", "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "loggedDeprecations", - "value": "Record", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "string | Record", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "client", - "value": "AdminRestApiClient", - "description": "" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "session", - "value": "Session", - "description": "" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "PropertyDeclaration", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", "name": "apiVersion", - "value": "ApiVersion", - "description": "" + "value": "string", + "description": "", + "isOptional": true + } + ], + "value": "export interface PostRequestOptions extends GetRequestOptions {\n data: Required[\"data\"];\n}" + }, + "DeleteRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "name": "DeleteRequestOptions", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "headers", + "value": "HeaderOptions", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "get", - "value": "(params: GetRequestParams) => Promise>", - "description": "Performs a GET request on the given path." + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "string | Record", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "post", - "value": "(params: PostRequestParams) => Promise>", - "description": "Performs a POST request on the given path." + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "searchParams", + "value": "SearchParams", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "put", - "value": "(params: PostRequestParams) => Promise>", - "description": "Performs a PUT request on the given path." + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "retries", + "value": "number", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/rest/client.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "delete", - "value": "(params: GetRequestParams) => Promise>", - "description": "Performs a DELETE request on the given path." + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "apiVersion", + "value": "string", + "description": "", + "isOptional": true } ], - "value": "export declare class RestClient {\n static config: ConfigInterface;\n static formatPaths: boolean;\n static LINK_HEADER_REGEXP: RegExp;\n static DEFAULT_LIMIT: string;\n static RETRY_WAIT_TIME: number;\n static readonly DEPRECATION_ALERT_DELAY = 300000;\n loggedDeprecations: Record;\n readonly client: AdminRestApiClient;\n readonly session: Session;\n readonly apiVersion: ApiVersion;\n constructor({ session, apiVersion }: RestClientParams);\n /**\n * Performs a GET request on the given path.\n */\n get(params: GetRequestParams): Promise>;\n /**\n * Performs a POST request on the given path.\n */\n post(params: PostRequestParams): Promise>;\n /**\n * Performs a PUT request on the given path.\n */\n put(params: PutRequestParams): Promise>;\n /**\n * Performs a DELETE request on the given path.\n */\n delete(params: DeleteRequestParams): Promise>;\n protected request(params: RequestParams): Promise>;\n private restClass;\n private buildRequestParams;\n private logDeprecations;\n}" + "value": "export interface DeleteRequestOptions extends GetRequestOptions {\n}" }, "RestRequestReturn": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/admin/types.d.ts", @@ -12599,6 +13197,168 @@ ], "value": "export declare class GraphqlClient {\n static config: ConfigInterface;\n readonly session: Session;\n readonly client: AdminApiClient;\n readonly apiVersion?: ApiVersion;\n constructor(params: GraphqlClientParams);\n query(params: GraphqlParams): Promise>;\n request(operation: Operation, options?: GraphqlQueryOptions): Promise : T>>;\n private graphqlClass;\n}" }, + "AdminApiClient": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminApiClient", + "value": "ApiClient", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "config", + "value": "Readonly", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "getHeaders", + "value": "(headers?: Headers) => Headers", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "getApiUrl", + "value": "(apiVersion?: string) => string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "fetch", + "value": "ApiClientFetch", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "request", + "value": "ApiClientRequest", + "description": "" + } + ] + }, + "Readonly": { + "filePath": "../../node_modules/@shopify/polaris/build/ts/src/components/TextField/TextField.d.ts", + "name": "Readonly", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/polaris/build/ts/src/components/TextField/TextField.d.ts", + "syntaxKind": "PropertySignature", + "name": "readonly", + "value": "true", + "description": "", + "isOptional": true + } + ], + "value": "interface Readonly {\n readonly?: true;\n}" + }, + "ApiClientFetch": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ApiClientFetch", + "description": "", + "params": [ + { + "name": "params", + "description": "", + "value": "ApiClientRequestParams", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + } + ], + "returns": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "description": "", + "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", + "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" + }, + "value": "type ApiClientFetch = (...params: ApiClientRequestParams) => Promise>>>;" + }, + "ApiClientRequestParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ApiClientRequestParams", + "value": "[\n operation: Operation,\n options?: ApiClientRequestOptions\n]", + "description": "", + "members": [ + { + "name": "[0]", + "value": "operation: Operation", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + }, + { + "name": "[1]", + "value": "options?: ApiClientRequestOptions", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + } + ] + }, + "ApiClientRequestOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ApiClientRequestOptions", + "value": "{\n apiVersion?: string;\n headers?: Headers;\n retries?: number;\n} & (Operation extends keyof Operations ? OperationVariables : {\n variables?: Record;\n})", + "description": "" + }, + "Headers": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "Headers", + "value": "Record", + "description": "", + "members": [] + }, + "OperationVariables": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "OperationVariables", + "value": "Operations[Operation][\"variables\"] extends Record ? Record : {\n variables?: {\n [k in keyof Operations[Operation][\"variables\"]]: UnpackedInputMaybe;\n };\n}", + "description": "" + }, + "UnpackedInputMaybe": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "UnpackedInputMaybe", + "value": "InputType extends InputMaybe ? InputMaybe> : UnpackedInput", + "description": "" + }, + "InputMaybe": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "InputMaybe", + "value": "never", + "description": "" + }, + "UnpackedInput": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "UnpackedInput", + "value": "\"input\" extends keyof InputType ? InputType[\"input\"] : InputType", + "description": "" + }, + "ApiClientRequest": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ApiClientRequest", + "description": "", + "params": [ + { + "name": "params", + "description": "", + "value": "ApiClientRequestParams", + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts" + } + ], + "returns": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "description": "", + "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", + "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" + }, + "value": "type ApiClientRequest = (...params: ApiClientRequestParams) => Promise : TData>>;" + }, "GraphqlParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -12661,6 +13421,93 @@ ], "value": "export interface GraphqlQueryOptions {\n variables?: ApiClientRequestOptions['variables'];\n headers?: Record;\n retries?: number;\n}" }, + "ClientResponse": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ClientResponse", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "errors", + "value": "ResponseErrors", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "data", + "value": "TData", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "extensions", + "value": "GQLExtensions", + "description": "", + "isOptional": true + } + ], + "value": "interface ClientResponse extends FetchResponseBody {\n errors?: ResponseErrors;\n}" + }, + "ResponseErrors": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "name": "ResponseErrors", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "networkStatusCode", + "value": "number", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "message", + "value": "string", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "graphQLErrors", + "value": "any[]", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "response", + "value": "Response", + "description": "", + "isOptional": true + } + ], + "value": "interface ResponseErrors {\n networkStatusCode?: number;\n message?: string;\n graphQLErrors?: any[];\n response?: Response;\n}" + }, + "GQLExtensions": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "GQLExtensions", + "value": "Record", + "description": "", + "members": [] + }, + "ReturnData": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/graphql-client/dist/graphql-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ReturnData", + "value": "Operation extends keyof Operations ? Operations[Operation][\"return\"] : any", + "description": "" + }, "StorefrontClient": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/storefront/client.d.ts", "name": "StorefrontClient", @@ -12704,6 +13551,50 @@ ], "value": "export declare class StorefrontClient {\n static config: ConfigInterface;\n readonly session: Session;\n readonly client: StorefrontApiClient;\n readonly apiVersion?: ApiVersion;\n constructor(params: GraphqlClientParams);\n query(params: GraphqlParams): Promise>;\n request(operation: Operation, options?: GraphqlQueryOptions): Promise : T>>;\n private storefrontClass;\n}" }, + "StorefrontApiClient": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StorefrontApiClient", + "value": "ApiClient", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "config", + "value": "Readonly", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "getHeaders", + "value": "(headers?: Headers) => Headers", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "getApiUrl", + "value": "(apiVersion?: string) => string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "fetch", + "value": "ApiClientFetch", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "PropertySignature", + "name": "request", + "value": "ApiClientRequest", + "description": "" + } + ] + }, "GraphqlProxy": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/graphql_proxy/types.d.ts", "name": "GraphqlProxy", @@ -15143,6 +16034,14 @@ } ] }, + "SearchParams": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/rest/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "SearchParams", + "value": "Record", + "description": "", + "members": [] + }, "HeaderParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/clients/types.d.ts", "syntaxKind": "TypeAliasDeclaration", @@ -15158,115 +16057,48 @@ "value": "GetRequestParams & {\n data: Record | string;\n}", "description": "" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", - "description": "", - "params": [ - { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" - }, - { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" - } - ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "AdminOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AdminOperations", + "value": "AdminQueries & AdminMutations", + "description": "" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "AdminQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminQueries", "description": "", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + "value": "export interface AdminQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "ApiVersion": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "ApiVersion", - "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", + "AdminMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "AdminMutations", + "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October22", - "value": "2022-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January23", - "value": "2023-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "April23", - "value": "2023-04" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "July23", - "value": "2023-07" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October23", - "value": "2023-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January24", - "value": "2024-01" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "Unstable", - "value": "unstable" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/admin-api-client/dist/ts/graphql/types.d.ts", + "name": "[key: number | symbol]", + "value": "never" } - ] + ], + "value": "export interface AdminMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" } } } @@ -15715,115 +16547,48 @@ ], "value": "export interface StorefrontContext {\n /**\n * Method for interacting with the Shopify Storefront GraphQL API\n *\n * 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).\n *\n * {@link https://shopify.dev/docs/api/storefront}\n *\n * @example\n * Querying the GraphQL API.\n * Use `storefront.graphql` to make query / mutation requests.\n * ```ts\n * // app/routes/**\\/.ts\n * import { json } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { storefront } = await authenticate.public.appProxy(request);\n *\n * const response = await storefront.graphql(`{blogs(first: 10) { edges { node { id } } } }`);\n *\n * return json(await response.json());\n * }\n * ```\n */\n graphql: GraphQLClient;\n}" }, - "GraphQLClient": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLClient", - "description": "", - "params": [ - { - "name": "query", - "description": "", - "value": "Operation extends keyof Operations", - "filePath": "src/server/clients/types.ts" - }, - { - "name": "options", - "description": "", - "value": "GraphQLQueryOptions", - "isOptional": true, - "filePath": "src/server/clients/types.ts" - } - ], - "returns": { - "filePath": "src/server/clients/types.ts", - "description": "", - "name": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}", - "value": "interface Promise {\n /**\n * Attaches callbacks for the resolution and/or rejection of the Promise.\n * @param onfulfilled The callback to execute when the Promise is resolved.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of which ever callback is executed.\n */\n then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise;\n\n /**\n * Attaches a callback for only the rejection of the Promise.\n * @param onrejected The callback to execute when the Promise is rejected.\n * @returns A Promise for the completion of the callback.\n */\n catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise;\n}, interface Promise {}, Promise: PromiseConstructor, interface Promise {\n readonly [Symbol.toStringTag]: string;\n}, interface Promise {\n /**\n * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The\n * resolved value cannot be modified from the callback.\n * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).\n * @returns A Promise for the completion of the callback.\n */\n finally(onfinally?: (() => void) | undefined | null): Promise;\n}" - }, - "value": "export type GraphQLClient = <\n Operation extends keyof Operations,\n>(\n query: Operation,\n options?: GraphQLQueryOptions,\n) => Promise<\n ResponseWithType>>\n>;" + "StorefrontOperations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StorefrontOperations", + "value": "StorefrontQueries & StorefrontMutations", + "description": "" }, - "GraphQLQueryOptions": { - "filePath": "src/server/clients/types.ts", - "name": "GraphQLQueryOptions", + "StorefrontQueries": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontQueries", "description": "", "members": [ { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "variables", - "value": "ApiClientRequestOptions[\"variables\"]", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "", - "isOptional": true - }, - { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "headers", - "value": "{ [key: string]: any; }", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "src/server/clients/types.ts", - "syntaxKind": "PropertySignature", - "name": "tries", - "value": "number", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" } ], - "value": "export interface GraphQLQueryOptions<\n Operation extends keyof Operations,\n Operations extends AllOperations,\n> {\n variables?: ApiClientRequestOptions['variables'];\n apiVersion?: ApiVersion;\n headers?: {[key: string]: any};\n tries?: number;\n}" + "value": "interface StorefrontQueries {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" }, - "ApiVersion": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "ApiVersion", - "value": "export declare enum ApiVersion {\n October22 = \"2022-10\",\n January23 = \"2023-01\",\n April23 = \"2023-04\",\n July23 = \"2023-07\",\n October23 = \"2023-10\",\n January24 = \"2024-01\",\n Unstable = \"unstable\"\n}", + "StorefrontMutations": { + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "StorefrontMutations", + "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October22", - "value": "2022-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January23", - "value": "2023-01" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "April23", - "value": "2023-04" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "July23", - "value": "2023-07" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "October23", - "value": "2023-10" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "January24", - "value": "2024-01" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: string]", + "value": "{\n variables: any;\n return: any;\n }" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/types.d.ts", - "name": "Unstable", - "value": "unstable" + "filePath": "../../node_modules/@shopify/shopify-api/node_modules/@shopify/storefront-api-client/dist/storefront-api-client.d.ts", + "name": "[key: number | symbol]", + "value": "never" } - ] + ], + "value": "interface StorefrontMutations {\n [key: string]: {\n variables: any;\n return: any;\n };\n [key: number | symbol]: never;\n}" } } } @@ -15881,4 +16646,4 @@ ] } } -] \ No newline at end of file +] From 21b630f780c774fbb7ae20b4573d3a81000f97bf Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Thu, 25 Jan 2024 11:36:31 -0700 Subject: [PATCH 02/19] add unstable_newEmbeddedAuthStrategy future flag to docs --- .../docs/generated/generated_docs_data.json | 2 +- .../docs/generated/generated_static_pages.json | 6 ++++++ .../docs/staticPages/future-flags.doc.ts | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/shopify-app-remix/docs/generated/generated_docs_data.json b/packages/shopify-app-remix/docs/generated/generated_docs_data.json index 5a3406a9ec..59fe26f64c 100644 --- a/packages/shopify-app-remix/docs/generated/generated_docs_data.json +++ b/packages/shopify-app-remix/docs/generated/generated_docs_data.json @@ -16646,4 +16646,4 @@ ] } } -] +] \ No newline at end of file diff --git a/packages/shopify-app-remix/docs/generated/generated_static_pages.json b/packages/shopify-app-remix/docs/generated/generated_static_pages.json index 820614e730..02510f1984 100644 --- a/packages/shopify-app-remix/docs/generated/generated_static_pages.json +++ b/packages/shopify-app-remix/docs/generated/generated_static_pages.json @@ -163,6 +163,12 @@ "value": "", "description": "Returns the same `admin` context (`AdminApiContext`) from `authenticate.webhook` that is returned from `authenticate.admin`.\n\nSee [authenticate.webhook](/docs/api/shopify-app-remix/authenticate/webhook#example-admin) for more details.", "isOptional": true + }, + { + "name": "unstable_newEmbeddedAuthStrategy", + "value": "", + "description": "Embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.\n\nSee [Token Exchange](ZL:TODO link to shopify.dev) for more details.", + "isOptional": true } ] } diff --git a/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts b/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts index 26b1e56155..0515e61d08 100644 --- a/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts @@ -70,6 +70,14 @@ const data: LandingTemplateSchema = { '\n\nSee [authenticate.webhook](/docs/api/shopify-app-remix/authenticate/webhook#example-admin) for more details.', isOptional: true, }, + { + name: 'unstable_newEmbeddedAuthStrategy', + value: '', + description: + 'Embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.' + + '\n\nSee [Token Exchange](ZL:TODO link to shopify.dev) for more details.', + isOptional: true, + }, ], }, ], From 704b15d17a5dbe885cac3eb260d3050982390639 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Thu, 25 Jan 2024 13:46:06 -0700 Subject: [PATCH 03/19] Fix future flag docs to use shopifyApp and not ShopifyApi flags --- .../docs/generated/generated_docs_data.json | 39 ++++++++++++------- .../src/server/shopify-app.doc.ts | 1 + 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/packages/shopify-app-remix/docs/generated/generated_docs_data.json b/packages/shopify-app-remix/docs/generated/generated_docs_data.json index 59fe26f64c..97e9b0a3c3 100644 --- a/packages/shopify-app-remix/docs/generated/generated_docs_data.json +++ b/packages/shopify-app-remix/docs/generated/generated_docs_data.json @@ -3525,14 +3525,14 @@ { "filePath": "src/server/types.ts", "syntaxKind": "MethodSignature", - "name": "__@iterator@482", + "name": "__@iterator@483", "value": "() => IterableIterator", "description": "Iterator" }, { "filePath": "src/server/types.ts", "syntaxKind": "PropertySignature", - "name": "__@unscopables@484", + "name": "__@unscopables@485", "value": "{ [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; at?: boolean; }", "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement." }, @@ -11943,14 +11943,14 @@ { "filePath": "src/server/types.ts", "syntaxKind": "MethodSignature", - "name": "__@iterator@482", + "name": "__@iterator@483", "value": "() => IterableIterator", "description": "Iterator" }, { "filePath": "src/server/types.ts", "syntaxKind": "PropertySignature", - "name": "__@unscopables@484", + "name": "__@unscopables@485", "value": "{ [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; at?: boolean; }", "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement." }, @@ -15333,28 +15333,39 @@ "type": "FutureFlags", "typeDefinitions": { "FutureFlags": { - "filePath": "../../node_modules/@shopify/shopify-api/future/flags.d.ts", + "filePath": "src/server/future/flags.ts", "name": "FutureFlags", "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/future/flags.d.ts", + "filePath": "src/server/future/flags.ts", "syntaxKind": "PropertySignature", - "name": "unstable_tokenExchange", + "name": "v3_webhookAdminContext", "value": "boolean", - "description": "", - "isOptional": true + "description": "When enabled, returns the same `admin` context (`AdminApiContext`) from `authenticate.webhook` that is returned from `authenticate.admin`.", + "isOptional": true, + "defaultValue": "false" }, { - "filePath": "../../node_modules/@shopify/shopify-api/future/flags.d.ts", + "filePath": "src/server/future/flags.ts", "syntaxKind": "PropertySignature", - "name": "unstable_lineItemBilling", + "name": "v3_authenticatePublic", "value": "boolean", - "description": "", - "isOptional": true + "description": "When enabled authenticate.public() will not work. Use authenticate.public.checkout() instead.", + "isOptional": true, + "defaultValue": "false" + }, + { + "filePath": "src/server/future/flags.ts", + "syntaxKind": "PropertySignature", + "name": "unstable_newEmbeddedAuthStrategy", + "value": "boolean", + "description": "When enabled, embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.", + "isOptional": true, + "defaultValue": "false" } ], - "value": "export interface FutureFlags {\n unstable_tokenExchange?: boolean;\n unstable_lineItemBilling?: boolean;\n}" + "value": "export interface FutureFlags {\n /**\n * When enabled, returns the same `admin` context (`AdminApiContext`) from `authenticate.webhook` that is returned from `authenticate.admin`.\n *\n * @default false\n */\n v3_webhookAdminContext?: boolean;\n\n /**\n * When enabled authenticate.public() will not work. Use authenticate.public.checkout() instead.\n *\n * @default false\n */\n v3_authenticatePublic?: boolean;\n\n /**\n * When enabled, embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n}" } } } diff --git a/packages/shopify-app-remix/src/server/shopify-app.doc.ts b/packages/shopify-app-remix/src/server/shopify-app.doc.ts index eb8f1594d6..fc87d8ab7c 100644 --- a/packages/shopify-app-remix/src/server/shopify-app.doc.ts +++ b/packages/shopify-app-remix/src/server/shopify-app.doc.ts @@ -20,6 +20,7 @@ const data: ReferenceEntityTemplateSchema = { 'Set future flags using the `future` configuration field to opt in to upcoming breaking changes.' + '\n\nWith this feature, you can prepare for major releases ahead of time, as well as try out new features before they are released.', type: 'FutureFlags', + filePath: 'src/server/future/flags.ts', }, ], jsDocTypeExamples: [ From e9a3f8b5a63ed380cb47b06931452db4c8db768d Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 09:24:38 -0700 Subject: [PATCH 04/19] Add README blob for enabling token exchange --- packages/shopify-app-remix/README.md | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index 6f0ae55fa7..bdc56b23ce 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -174,6 +174,43 @@ Here are some guides to help you set up your app: You can also authenticate requests from surfaces other than the admin. To see all supported methods, see [the `shopify.authenticate` object documentation](https://shopify.dev/docs/api/shopify-app-remix/latest/authenticate). +### Using the new Token Exchange OAuth flow +> [!TIP] +> If you are building an embedded app, we **strongly** recommend using [Shopify managed install](ZL:TODO) with [Token Exchange](#token-exchange) instead of the Authorization Code Grant Flow. + +We've introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization. It +can replace the existing [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant). + +You can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installation and scope updates, while using +[Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user. + +> [!NOTE] +> Newly created Remix apps from the template after February 1st 2024 will have token exchange enabled by default. + +##### Enabling Token Exchange in your app +1. Turn on [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration). +2. Turn on the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file. + +```ts +// my-app/app/shopify.server.ts +const shopify = shopifyApp({ + ... + isEmbeddedApp: true, + future: { + unstable_newEmbeddedAuthStrategy: true, + } +}) + +``` +3. Enjoy painless no-redirect OAuth flow, and app installation process. + +Learn more about: + - [How Token Exchange Works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) + - [Using Shopify Managed Install for your app's installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) + - [Configuring Access Scopes Through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration) + + ## Gotchas / Troubleshooting If you're experiencing unexpected behaviors when using this package, check our [app template's documentation](https://github.com/Shopify/shopify-app-template-remix#gotchas--troubleshooting) for the solution to common issues. From 33094e1f6c13b5cfbde9a4462d0bbbc8ad545e55 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 09:26:46 -0700 Subject: [PATCH 05/19] Link changelog to token exchange README --- packages/shopify-app-remix/CHANGELOG.md | 4 +++- packages/shopify-app-remix/README.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/shopify-app-remix/CHANGELOG.md b/packages/shopify-app-remix/CHANGELOG.md index 51dd03c34e..e1a656e257 100644 --- a/packages/shopify-app-remix/CHANGELOG.md +++ b/packages/shopify-app-remix/CHANGELOG.md @@ -4,7 +4,9 @@ ### Minor Changes -- 2473c85: Add new embedded authorization strategy relying on Shopify managed install and OAuth token exchange +- 2473c85: Add new embedded authorization strategy relying on Shopify managed install and OAuth token + + :exclamation: For more information on how to enable this feature, see [Using the New Token Exchange OAuth Flow](./README.md#using-the-new-token-exchange-oauth-flow) ### Patch Changes diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index bdc56b23ce..dea1d7c5a4 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -174,7 +174,7 @@ Here are some guides to help you set up your app: You can also authenticate requests from surfaces other than the admin. To see all supported methods, see [the `shopify.authenticate` object documentation](https://shopify.dev/docs/api/shopify-app-remix/latest/authenticate). -### Using the new Token Exchange OAuth flow +### Using the New Token Exchange OAuth flow > [!TIP] > If you are building an embedded app, we **strongly** recommend using [Shopify managed install](ZL:TODO) with [Token Exchange](#token-exchange) instead of the Authorization Code Grant Flow. From 357883853b7a5040d2372a3b91b9db2da23132a7 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 09:33:44 -0700 Subject: [PATCH 06/19] Update doc links --- packages/shopify-app-remix/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index dea1d7c5a4..b35a60949e 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -176,7 +176,8 @@ To see all supported methods, see [the `shopify.authenticate` object documentati ### Using the New Token Exchange OAuth flow > [!TIP] -> If you are building an embedded app, we **strongly** recommend using [Shopify managed install](ZL:TODO) with [Token Exchange](#token-exchange) instead of the Authorization Code Grant Flow. +> If you are building an embedded app, we **strongly** recommend using [Shopify managed install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +with [Token Exchange](#token-exchange) instead of the Authorization Code Grant Flow. We've introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization. It can replace the existing [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant). @@ -184,10 +185,10 @@ can replace the existing [Authorization Code install and grant flow](https://sho You can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installation and scope updates, while using [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user. +##### Enabling Token Exchange in your app > [!NOTE] > Newly created Remix apps from the template after February 1st 2024 will have token exchange enabled by default. -##### Enabling Token Exchange in your app 1. Turn on [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration). 2. Turn on the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file. @@ -205,12 +206,11 @@ const shopify = shopifyApp({ ``` 3. Enjoy painless no-redirect OAuth flow, and app installation process. -Learn more about: +###### Learn more about: - [How Token Exchange Works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) - [Using Shopify Managed Install for your app's installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) - [Configuring Access Scopes Through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration) - ## Gotchas / Troubleshooting If you're experiencing unexpected behaviors when using this package, check our [app template's documentation](https://github.com/Shopify/shopify-app-template-remix#gotchas--troubleshooting) for the solution to common issues. From a91582b9fcfbb0165ba99b56895f9e89137b77a1 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 11:35:42 -0700 Subject: [PATCH 07/19] Update links in remix reference --- .../docs/generated/generated_docs_data.json | 1049 ++++++++--------- .../generated/generated_static_pages.json | 2 +- .../docs/staticPages/future-flags.doc.ts | 2 +- .../src/server/future/flags.ts | 3 +- 4 files changed, 526 insertions(+), 530 deletions(-) diff --git a/packages/shopify-app-remix/docs/generated/generated_docs_data.json b/packages/shopify-app-remix/docs/generated/generated_docs_data.json index 97e9b0a3c3..5e7796c012 100644 --- a/packages/shopify-app-remix/docs/generated/generated_docs_data.json +++ b/packages/shopify-app-remix/docs/generated/generated_docs_data.json @@ -3928,7 +3928,7 @@ "filePath": "src/server/authenticate/webhooks/types.ts", "syntaxKind": "TypeAliasDeclaration", "name": "WebhookAdminContext", - "value": "FeatureEnabled extends true\n ? AdminApiContext\n : LegacyWebhookAdminApiContext", + "value": "FeatureEnabled extends true\n ? AdminApiContext\n : LegacyWebhookAdminApiContext", "description": "" }, "AdminContext": { @@ -9242,462 +9242,184 @@ }, "WebhookConfig": { "filePath": "src/server/config-types.ts", + "syntaxKind": "TypeAliasDeclaration", "name": "WebhookConfig", + "value": "Record", + "description": "", + "members": [] + }, + "HooksConfig": { + "filePath": "src/server/config-types.ts", + "name": "HooksConfig", "description": "", "members": [ { "filePath": "src/server/config-types.ts", - "name": "[key: string]", - "value": "WebhookHandler | WebhookHandler[]" + "syntaxKind": "PropertySignature", + "name": "afterAuth", + "value": "(options: AfterAuthOptions) => void | Promise", + "description": "A function to call after a merchant installs your app", + "isOptional": true, + "examples": [ + { + "title": "Registering webhooks and seeding data when a merchant installs your app", + "description": "", + "tabs": [ + { + "code": "import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\nimport { seedStoreData } from \"~/db/seeds\"\n\nconst shopify = shopifyApp({\n hooks: {\n afterAuth: async ({ session }) => {\n shopify.registerWebhooks({ session });\n seedStoreData({session})\n }\n },\n webhooks: {\n APP_UNINSTALLED: {\n deliveryMethod: DeliveryMethod.Http,\n callbackUrl: \"/webhooks\",\n },\n },\n // ...etc\n});", + "title": "Example" + } + ] + } + ] } ], - "value": "export interface WebhookConfig {\n [key: string]: WebhookHandler | WebhookHandler[];\n}" - }, - "WebhookHandler": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "WebhookHandler", - "value": "HttpWebhookHandler | HttpWebhookHandlerWithCallback | EventBridgeWebhookHandler | PubSubWebhookHandler", - "description": "" + "value": "interface HooksConfig {\n /**\n * A function to call after a merchant installs your app\n *\n * @param context - An object with context about the request that triggered the hook.\n * @param context.session - The session of the merchant that installed your app. This is the output of sessionStorage.loadSession in case people want to load their own.\n * @param context.admin - An object with access to the Shopify Admin API's.\n *\n * @example\n * Registering webhooks and seeding data when a merchant installs your app.\n * ```ts\n * import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n * import { seedStoreData } from \"~/db/seeds\"\n *\n * const shopify = shopifyApp({\n * hooks: {\n * afterAuth: async ({ session }) => {\n * shopify.registerWebhooks({ session });\n * seedStoreData({session})\n * }\n * },\n * webhooks: {\n * APP_UNINSTALLED: {\n * deliveryMethod: DeliveryMethod.Http,\n * callbackUrl: \"/webhooks\",\n * },\n * },\n * // ...etc\n * });\n * ```\n */\n afterAuth?: (options: AfterAuthOptions) => void | Promise;\n}" }, - "HttpWebhookHandler": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "HttpWebhookHandler", + "AfterAuthOptions": { + "filePath": "src/server/config-types.ts", + "name": "AfterAuthOptions", "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "filePath": "src/server/config-types.ts", "syntaxKind": "PropertySignature", - "name": "deliveryMethod", - "value": "DeliveryMethod.Http", + "name": "session", + "value": "Session", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "filePath": "src/server/config-types.ts", "syntaxKind": "PropertySignature", - "name": "callbackUrl", - "value": "string", + "name": "admin", + "value": "AdminApiContext", "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "id", - "value": "string", - "description": "", - "isOptional": true - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "includeFields", - "value": "string[]", - "description": "", - "isOptional": true - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "metafieldNamespaces", - "value": "string[]", - "description": "", - "isOptional": true } ], - "value": "export interface HttpWebhookHandler extends BaseWebhookHandler {\n deliveryMethod: DeliveryMethod.Http;\n callbackUrl: string;\n}" + "value": "export interface AfterAuthOptions<\n R extends ShopifyRestResources = ShopifyRestResources,\n> {\n session: Session;\n admin: AdminApiContext;\n}" }, - "DeliveryMethod": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "EnumDeclaration", - "name": "DeliveryMethod", - "value": "export declare enum DeliveryMethod {\n Http = \"http\",\n EventBridge = \"eventbridge\",\n PubSub = \"pubsub\"\n}", + "Session": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "name": "Session", + "description": "Stores App information from logged in merchants so they can make authenticated requests to the Admin API.", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "Http", - "value": "http" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "id", + "value": "string", + "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "EventBridge", - "value": "eventbridge" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "shop", + "value": "string", + "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "PubSub", - "value": "pubsub" - } - ] - }, - "HttpWebhookHandlerWithCallback": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "HttpWebhookHandlerWithCallback", - "description": "", - "members": [ - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "callback", - "value": "WebhookHandlerFunction", + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "state", + "value": "string", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "deliveryMethod", - "value": "DeliveryMethod.Http", + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "isOnline", + "value": "boolean", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "callbackUrl", + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "scope", "value": "string", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "id", + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "expires", + "value": "Date", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "accessToken", "value": "string", - "description": "", - "isOptional": true + "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "includeFields", - "value": "string[]", - "description": "", - "isOptional": true + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "PropertyDeclaration", + "name": "onlineAccessInfo", + "value": "OnlineAccessInfo", + "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "metafieldNamespaces", - "value": "string[]", - "description": "", - "isOptional": true - } - ], - "value": "export interface HttpWebhookHandlerWithCallback extends HttpWebhookHandler {\n callback: WebhookHandlerFunction;\n}" - }, - "WebhookHandlerFunction": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "WebhookHandlerFunction", - "description": "", - "params": [ + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "isActive", + "value": "(scopes: string | string[] | AuthScopes) => boolean", + "description": "" + }, { - "name": "topic", - "description": "", - "value": "string", - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "isScopeChanged", + "value": "(scopes: string | string[] | AuthScopes) => boolean", + "description": "" }, { - "name": "shop_domain", - "description": "", - "value": "string", - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "isExpired", + "value": "(withinMillisecondsOfExpiry?: number) => boolean", + "description": "" }, { - "name": "body", - "description": "", - "value": "string", - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "toObject", + "value": "() => SessionParams", + "description": "" }, { - "name": "webhookId", - "description": "", - "value": "string", - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "equals", + "value": "(other: Session) => boolean", + "description": "" }, { - "name": "apiVersion", - "description": "", - "value": "string", - "isOptional": true, - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", + "syntaxKind": "MethodDeclaration", + "name": "toPropertyArray", + "value": "() => [string, string | number | boolean][]", + "description": "" } ], - "returns": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "description": "", - "name": "Promise", - "value": "Promise" - }, - "value": "export type WebhookHandlerFunction = (topic: string, shop_domain: string, body: string, webhookId: string, apiVersion?: string) => Promise;" + "value": "export declare class Session {\n static fromPropertyArray(entries: [string, string | number | boolean][]): Session;\n readonly id: string;\n shop: string;\n state: string;\n isOnline: boolean;\n scope?: string;\n expires?: Date;\n accessToken?: string;\n onlineAccessInfo?: OnlineAccessInfo;\n constructor(params: SessionParams);\n isActive(scopes: AuthScopes | string | string[]): boolean;\n isScopeChanged(scopes: AuthScopes | string | string[]): boolean;\n isExpired(withinMillisecondsOfExpiry?: number): boolean;\n toObject(): SessionParams;\n equals(other: Session | undefined): boolean;\n toPropertyArray(): [string, string | number | boolean][];\n}" }, - "EventBridgeWebhookHandler": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "EventBridgeWebhookHandler", + "OnlineAccessInfo": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", + "name": "OnlineAccessInfo", "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", "syntaxKind": "PropertySignature", - "name": "deliveryMethod", - "value": "DeliveryMethod.EventBridge", + "name": "expires_in", + "value": "number", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", "syntaxKind": "PropertySignature", - "name": "arn", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "id", - "value": "string", - "description": "", - "isOptional": true - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "includeFields", - "value": "string[]", - "description": "", - "isOptional": true - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "metafieldNamespaces", - "value": "string[]", - "description": "", - "isOptional": true - } - ], - "value": "export interface EventBridgeWebhookHandler extends BaseWebhookHandler {\n deliveryMethod: DeliveryMethod.EventBridge;\n arn: string;\n}" - }, - "PubSubWebhookHandler": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "name": "PubSubWebhookHandler", - "description": "", - "members": [ - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "deliveryMethod", - "value": "DeliveryMethod.PubSub", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "pubSubProject", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "pubSubTopic", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "id", - "value": "string", - "description": "", - "isOptional": true - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "includeFields", - "value": "string[]", - "description": "", - "isOptional": true - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "metafieldNamespaces", - "value": "string[]", - "description": "", - "isOptional": true - } - ], - "value": "export interface PubSubWebhookHandler extends BaseWebhookHandler {\n deliveryMethod: DeliveryMethod.PubSub;\n pubSubProject: string;\n pubSubTopic: string;\n}" - }, - "HooksConfig": { - "filePath": "src/server/config-types.ts", - "name": "HooksConfig", - "description": "", - "members": [ - { - "filePath": "src/server/config-types.ts", - "syntaxKind": "PropertySignature", - "name": "afterAuth", - "value": "(options: AfterAuthOptions) => void | Promise", - "description": "A function to call after a merchant installs your app", - "isOptional": true, - "examples": [ - { - "title": "Registering webhooks and seeding data when a merchant installs your app", - "description": "", - "tabs": [ - { - "code": "import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\nimport { seedStoreData } from \"~/db/seeds\"\n\nconst shopify = shopifyApp({\n hooks: {\n afterAuth: async ({ session }) => {\n shopify.registerWebhooks({ session });\n seedStoreData({session})\n }\n },\n webhooks: {\n APP_UNINSTALLED: {\n deliveryMethod: DeliveryMethod.Http,\n callbackUrl: \"/webhooks\",\n },\n },\n // ...etc\n});", - "title": "Example" - } - ] - } - ] - } - ], - "value": "interface HooksConfig {\n /**\n * A function to call after a merchant installs your app\n *\n * @param context - An object with context about the request that triggered the hook.\n * @param context.session - The session of the merchant that installed your app. This is the output of sessionStorage.loadSession in case people want to load their own.\n * @param context.admin - An object with access to the Shopify Admin API's.\n *\n * @example\n * Registering webhooks and seeding data when a merchant installs your app.\n * ```ts\n * import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n * import { seedStoreData } from \"~/db/seeds\"\n *\n * const shopify = shopifyApp({\n * hooks: {\n * afterAuth: async ({ session }) => {\n * shopify.registerWebhooks({ session });\n * seedStoreData({session})\n * }\n * },\n * webhooks: {\n * APP_UNINSTALLED: {\n * deliveryMethod: DeliveryMethod.Http,\n * callbackUrl: \"/webhooks\",\n * },\n * },\n * // ...etc\n * });\n * ```\n */\n afterAuth?: (options: AfterAuthOptions) => void | Promise;\n}" - }, - "AfterAuthOptions": { - "filePath": "src/server/config-types.ts", - "name": "AfterAuthOptions", - "description": "", - "members": [ - { - "filePath": "src/server/config-types.ts", - "syntaxKind": "PropertySignature", - "name": "session", - "value": "Session", - "description": "" - }, - { - "filePath": "src/server/config-types.ts", - "syntaxKind": "PropertySignature", - "name": "admin", - "value": "AdminApiContext", - "description": "" - } - ], - "value": "export interface AfterAuthOptions<\n R extends ShopifyRestResources = ShopifyRestResources,\n> {\n session: Session;\n admin: AdminApiContext;\n}" - }, - "Session": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "name": "Session", - "description": "Stores App information from logged in merchants so they can make authenticated requests to the Admin API.", - "members": [ - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "id", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "shop", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "state", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "isOnline", - "value": "boolean", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "scope", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "expires", - "value": "Date", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "accessToken", - "value": "string", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "PropertyDeclaration", - "name": "onlineAccessInfo", - "value": "OnlineAccessInfo", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "isActive", - "value": "(scopes: string | string[] | AuthScopes) => boolean", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "isScopeChanged", - "value": "(scopes: string | string[] | AuthScopes) => boolean", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "isExpired", - "value": "(withinMillisecondsOfExpiry?: number) => boolean", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "toObject", - "value": "() => SessionParams", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "equals", - "value": "(other: Session) => boolean", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/session.d.ts", - "syntaxKind": "MethodDeclaration", - "name": "toPropertyArray", - "value": "() => [string, string | number | boolean][]", - "description": "" - } - ], - "value": "export declare class Session {\n static fromPropertyArray(entries: [string, string | number | boolean][]): Session;\n readonly id: string;\n shop: string;\n state: string;\n isOnline: boolean;\n scope?: string;\n expires?: Date;\n accessToken?: string;\n onlineAccessInfo?: OnlineAccessInfo;\n constructor(params: SessionParams);\n isActive(scopes: AuthScopes | string | string[]): boolean;\n isScopeChanged(scopes: AuthScopes | string | string[]): boolean;\n isExpired(withinMillisecondsOfExpiry?: number): boolean;\n toObject(): SessionParams;\n equals(other: Session | undefined): boolean;\n toPropertyArray(): [string, string | number | boolean][];\n}" - }, - "OnlineAccessInfo": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", - "name": "OnlineAccessInfo", - "description": "", - "members": [ - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "expires_in", - "value": "number", - "description": "" - }, - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", - "syntaxKind": "PropertySignature", - "name": "associated_user_scope", + "name": "associated_user_scope", "value": "string", "description": "" }, @@ -10227,7 +9949,7 @@ "filePath": "src/server/types.ts", "syntaxKind": "TypeAliasDeclaration", "name": "ShopifyApp", - "value": "Config['distribution'] extends AppDistribution.ShopifyAdmin\n ? AdminApp\n : Config['distribution'] extends AppDistribution.SingleMerchant\n ? SingleMerchantApp\n : Config['distribution'] extends AppDistribution.AppStore\n ? AppStoreApp\n : AppStoreApp", + "value": "Config['distribution'] extends AppDistribution.ShopifyAdmin\n ? AdminApp\n : Config['distribution'] extends AppDistribution.SingleMerchant\n ? SingleMerchantApp\n : Config['distribution'] extends AppDistribution.AppStore\n ? AppStoreApp\n : AppStoreApp", "description": "An object your app can use to interact with Shopify.\n\nBy default, the app's distribution is `AppStore`." }, "AdminApp": { @@ -12107,7 +11829,7 @@ "filePath": "src/server/authenticate/webhooks/types.ts", "syntaxKind": "TypeAliasDeclaration", "name": "WebhookAdminContext", - "value": "FeatureEnabled extends true\n ? AdminApiContext\n : LegacyWebhookAdminApiContext", + "value": "FeatureEnabled extends true\n ? AdminApiContext\n : LegacyWebhookAdminApiContext", "description": "" }, "LegacyWebhookAdminApiContext": { @@ -13970,212 +13692,485 @@ "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/index.d.ts", - "syntaxKind": "PropertySignature", - "name": "decodeSessionToken", - "value": "(token: string, { checkAudience }?: DecodeSessionTokenOptions) => Promise", - "description": "" + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "decodeSessionToken", + "value": "(token: string, { checkAudience }?: DecodeSessionTokenOptions) => Promise", + "description": "" + } + ] + }, + "GetCurrentSessionIdParams": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", + "name": "GetCurrentSessionIdParams", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "isOnline", + "value": "boolean", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "rawRequest", + "value": "AdapterRequest", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "rawResponse", + "value": "AdapterResponse", + "description": "", + "isOptional": true + } + ], + "value": "export interface GetCurrentSessionIdParams extends AdapterArgs {\n isOnline: boolean;\n}" + }, + "DecodeSessionTokenOptions": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/decode-session-token.d.ts", + "name": "DecodeSessionTokenOptions", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/session/decode-session-token.d.ts", + "syntaxKind": "PropertySignature", + "name": "checkAudience", + "value": "boolean", + "description": "", + "isOptional": true + } + ], + "value": "export interface DecodeSessionTokenOptions {\n checkAudience?: boolean;\n}" + }, + "ShopifyUtils": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ShopifyUtils", + "value": "ReturnType", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "sanitizeShop", + "value": "(shop: string, throwOnInvalid?: boolean) => string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "sanitizeHost", + "value": "(host: string, throwOnInvalid?: boolean) => string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "validateHmac", + "value": "(query: AuthQuery, { signator }?: { signator: HMACSignator; }) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "versionCompatible", + "value": "(referenceVersion: ApiVersion, currentVersion?: ApiVersion) => boolean", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "versionPriorTo", + "value": "(referenceVersion: ApiVersion, currentVersion?: ApiVersion) => boolean", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "shopAdminUrlToLegacyUrl", + "value": "(shopAdminUrl: string) => string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "legacyUrlToShopAdminUrl", + "value": "(legacyAdminUrl: string) => string", + "description": "" + } + ] + }, + "AuthQuery": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", + "name": "AuthQuery", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", + "name": "[key: string]", + "value": "string | undefined" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "hmac", + "value": "string", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "signature", + "value": "string", + "description": "", + "isOptional": true + } + ], + "value": "export interface AuthQuery {\n [key: string]: string | undefined;\n hmac?: string;\n signature?: string;\n}" + }, + "HMACSignator": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/hmac-validator.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "HMACSignator", + "value": "'admin' | 'appProxy'", + "description": "" + }, + "ShopifyWebhooks": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ShopifyWebhooks", + "value": "ReturnType", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "addHandlers", + "value": "(handlersToAdd: AddHandlersParams) => void", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "getTopicsAdded", + "value": "() => string[]", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "getHandlers", + "value": "(topic: string) => WebhookHandler[]", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "register", + "value": "({ session, }: RegisterParams) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "process", + "value": "({ rawBody, ...adapterArgs }: WebhookProcessParams) => Promise", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "syntaxKind": "PropertySignature", + "name": "validate", + "value": "({ rawBody, ...adapterArgs }: WebhookValidateParams) => Promise", + "description": "" + } + ] + }, + "AddHandlersParams": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "AddHandlersParams", + "value": "Record", + "description": "", + "members": [] + }, + "WebhookHandler": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "WebhookHandler", + "value": "HttpWebhookHandler | HttpWebhookHandlerWithCallback | EventBridgeWebhookHandler | PubSubWebhookHandler", + "description": "" + }, + "HttpWebhookHandler": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "HttpWebhookHandler", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "deliveryMethod", + "value": "DeliveryMethod.Http", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "callbackUrl", + "value": "string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "string", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "includeFields", + "value": "string[]", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "metafieldNamespaces", + "value": "string[]", + "description": "", + "isOptional": true + } + ], + "value": "export interface HttpWebhookHandler extends BaseWebhookHandler {\n deliveryMethod: DeliveryMethod.Http;\n callbackUrl: string;\n}" + }, + "DeliveryMethod": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "EnumDeclaration", + "name": "DeliveryMethod", + "value": "export declare enum DeliveryMethod {\n Http = \"http\",\n EventBridge = \"eventbridge\",\n PubSub = \"pubsub\"\n}", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "Http", + "value": "http" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "EventBridge", + "value": "eventbridge" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "PubSub", + "value": "pubsub" } ] }, - "GetCurrentSessionIdParams": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", - "name": "GetCurrentSessionIdParams", + "HttpWebhookHandlerWithCallback": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "HttpWebhookHandlerWithCallback", "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "isOnline", - "value": "boolean", + "name": "callback", + "value": "WebhookHandlerFunction", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "rawRequest", - "value": "AdapterRequest", + "name": "deliveryMethod", + "value": "DeliveryMethod.Http", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/types.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "rawResponse", - "value": "AdapterResponse", + "name": "callbackUrl", + "value": "string", + "description": "" + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "string", "description": "", "isOptional": true - } - ], - "value": "export interface GetCurrentSessionIdParams extends AdapterArgs {\n isOnline: boolean;\n}" - }, - "DecodeSessionTokenOptions": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/decode-session-token.d.ts", - "name": "DecodeSessionTokenOptions", - "description": "", - "members": [ + }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/session/decode-session-token.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "checkAudience", - "value": "boolean", + "name": "includeFields", + "value": "string[]", + "description": "", + "isOptional": true + }, + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "syntaxKind": "PropertySignature", + "name": "metafieldNamespaces", + "value": "string[]", "description": "", "isOptional": true } ], - "value": "export interface DecodeSessionTokenOptions {\n checkAudience?: boolean;\n}" + "value": "export interface HttpWebhookHandlerWithCallback extends HttpWebhookHandler {\n callback: WebhookHandlerFunction;\n}" }, - "ShopifyUtils": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ShopifyUtils", - "value": "ReturnType", + "WebhookHandlerFunction": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "WebhookHandlerFunction", "description": "", - "members": [ + "params": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", - "syntaxKind": "PropertySignature", - "name": "sanitizeShop", - "value": "(shop: string, throwOnInvalid?: boolean) => string", - "description": "" + "name": "topic", + "description": "", + "value": "string", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", - "syntaxKind": "PropertySignature", - "name": "sanitizeHost", - "value": "(host: string, throwOnInvalid?: boolean) => string", - "description": "" + "name": "shop_domain", + "description": "", + "value": "string", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", - "syntaxKind": "PropertySignature", - "name": "validateHmac", - "value": "(query: AuthQuery, { signator }?: { signator: HMACSignator; }) => Promise", - "description": "" + "name": "body", + "description": "", + "value": "string", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", - "syntaxKind": "PropertySignature", - "name": "versionCompatible", - "value": "(referenceVersion: ApiVersion, currentVersion?: ApiVersion) => boolean", - "description": "" + "name": "webhookId", + "description": "", + "value": "string", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "name": "apiVersion", + "description": "", + "value": "string", + "isOptional": true, + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts" + } + ], + "returns": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "description": "", + "name": "Promise", + "value": "Promise" + }, + "value": "export type WebhookHandlerFunction = (topic: string, shop_domain: string, body: string, webhookId: string, apiVersion?: string) => Promise;" + }, + "EventBridgeWebhookHandler": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "EventBridgeWebhookHandler", + "description": "", + "members": [ + { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "versionPriorTo", - "value": "(referenceVersion: ApiVersion, currentVersion?: ApiVersion) => boolean", + "name": "deliveryMethod", + "value": "DeliveryMethod.EventBridge", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "shopAdminUrlToLegacyUrl", - "value": "(shopAdminUrl: string) => string", + "name": "arn", + "value": "string", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "legacyUrlToShopAdminUrl", - "value": "(legacyAdminUrl: string) => string", - "description": "" - } - ] - }, - "AuthQuery": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", - "name": "AuthQuery", - "description": "", - "members": [ - { - "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", - "name": "[key: string]", - "value": "string | undefined" + "name": "id", + "value": "string", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "hmac", - "value": "string", + "name": "includeFields", + "value": "string[]", "description": "", "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/auth/oauth/types.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "signature", - "value": "string", + "name": "metafieldNamespaces", + "value": "string[]", "description": "", "isOptional": true } ], - "value": "export interface AuthQuery {\n [key: string]: string | undefined;\n hmac?: string;\n signature?: string;\n}" - }, - "HMACSignator": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/utils/hmac-validator.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "HMACSignator", - "value": "'admin' | 'appProxy'", - "description": "" + "value": "export interface EventBridgeWebhookHandler extends BaseWebhookHandler {\n deliveryMethod: DeliveryMethod.EventBridge;\n arn: string;\n}" }, - "ShopifyWebhooks": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ShopifyWebhooks", - "value": "ReturnType", + "PubSubWebhookHandler": { + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", + "name": "PubSubWebhookHandler", "description": "", "members": [ { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "addHandlers", - "value": "(handlersToAdd: AddHandlersParams) => void", + "name": "deliveryMethod", + "value": "DeliveryMethod.PubSub", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "getTopicsAdded", - "value": "() => string[]", + "name": "pubSubProject", + "value": "string", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "getHandlers", - "value": "(topic: string) => WebhookHandler[]", + "name": "pubSubTopic", + "value": "string", "description": "" }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "register", - "value": "({ session, }: RegisterParams) => Promise", - "description": "" + "name": "id", + "value": "string", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "process", - "value": "({ rawBody, ...adapterArgs }: WebhookProcessParams) => Promise", - "description": "" + "name": "includeFields", + "value": "string[]", + "description": "", + "isOptional": true }, { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/index.d.ts", + "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", "syntaxKind": "PropertySignature", - "name": "validate", - "value": "({ rawBody, ...adapterArgs }: WebhookValidateParams) => Promise", - "description": "" + "name": "metafieldNamespaces", + "value": "string[]", + "description": "", + "isOptional": true } - ] - }, - "AddHandlersParams": { - "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "AddHandlersParams", - "value": "Record", - "description": "", - "members": [] + ], + "value": "export interface PubSubWebhookHandler extends BaseWebhookHandler {\n deliveryMethod: DeliveryMethod.PubSub;\n pubSubProject: string;\n pubSubTopic: string;\n}" }, "RegisterParams": { "filePath": "../../node_modules/@shopify/shopify-api/lib/webhooks/types.d.ts", @@ -15360,12 +15355,12 @@ "syntaxKind": "PropertySignature", "name": "unstable_newEmbeddedAuthStrategy", "value": "boolean", - "description": "When enabled, embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.", + "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview). This assumes app are using declarative scopes with [Shopify managing installs](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).", "isOptional": true, "defaultValue": "false" } ], - "value": "export interface FutureFlags {\n /**\n * When enabled, returns the same `admin` context (`AdminApiContext`) from `authenticate.webhook` that is returned from `authenticate.admin`.\n *\n * @default false\n */\n v3_webhookAdminContext?: boolean;\n\n /**\n * When enabled authenticate.public() will not work. Use authenticate.public.checkout() instead.\n *\n * @default false\n */\n v3_authenticatePublic?: boolean;\n\n /**\n * When enabled, embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n}" + "value": "export interface FutureFlags {\n /**\n * When enabled, returns the same `admin` context (`AdminApiContext`) from `authenticate.webhook` that is returned from `authenticate.admin`.\n *\n * @default false\n */\n v3_webhookAdminContext?: boolean;\n\n /**\n * When enabled authenticate.public() will not work. Use authenticate.public.checkout() instead.\n *\n * @default false\n */\n v3_authenticatePublic?: boolean;\n\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n * This assumes app are using declarative scopes with [Shopify managing installs](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n}" } } } diff --git a/packages/shopify-app-remix/docs/generated/generated_static_pages.json b/packages/shopify-app-remix/docs/generated/generated_static_pages.json index 02510f1984..a55eac4893 100644 --- a/packages/shopify-app-remix/docs/generated/generated_static_pages.json +++ b/packages/shopify-app-remix/docs/generated/generated_static_pages.json @@ -167,7 +167,7 @@ { "name": "unstable_newEmbeddedAuthStrategy", "value": "", - "description": "Embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.\n\nSee [Token Exchange](ZL:TODO link to shopify.dev) for more details.", + "description": "Embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.\n\nSee [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) for more details.", "isOptional": true } ] diff --git a/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts b/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts index 0515e61d08..5f1de21598 100644 --- a/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts @@ -75,7 +75,7 @@ const data: LandingTemplateSchema = { value: '', description: 'Embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.' + - '\n\nSee [Token Exchange](ZL:TODO link to shopify.dev) for more details.', + '\n\nSee [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) for more details.', isOptional: true, }, ], diff --git a/packages/shopify-app-remix/src/server/future/flags.ts b/packages/shopify-app-remix/src/server/future/flags.ts index e8d75841ea..a0b58430bf 100644 --- a/packages/shopify-app-remix/src/server/future/flags.ts +++ b/packages/shopify-app-remix/src/server/future/flags.ts @@ -16,7 +16,8 @@ export interface FutureFlags { v3_authenticatePublic?: boolean; /** - * When enabled, embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs. + * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview). + * This assumes app are using declarative scopes with [Shopify managing installs](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation). * * @default false */ From 9ff900e38fea6daf18c6e8bc0dc1a1842f575ada Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 12:07:12 -0700 Subject: [PATCH 08/19] Add token exchange to remix doc index --- packages/shopify-app-remix/README.md | 3 +- .../generated/generated_static_pages.json | 18 ++++++++++- .../index/token-exchange-config.example.ts | 10 ++++++ .../docs/staticPages/index.doc.ts | 32 ++++++++++++++++++- 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 packages/shopify-app-remix/docs/staticPages/examples/index/token-exchange-config.example.ts diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index b35a60949e..422d703f53 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -182,7 +182,8 @@ with [Token Exchange](#token-exchange) instead of the Authorization Code Grant F We've introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization. It can replace the existing [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant). -You can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installation and scope updates, while using +You can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +to handle automatic app installations and scope updates, while using [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user. ##### Enabling Token Exchange in your app diff --git a/packages/shopify-app-remix/docs/generated/generated_static_pages.json b/packages/shopify-app-remix/docs/generated/generated_static_pages.json index a55eac4893..752a7afff7 100644 --- a/packages/shopify-app-remix/docs/generated/generated_static_pages.json +++ b/packages/shopify-app-remix/docs/generated/generated_static_pages.json @@ -422,7 +422,7 @@ "type": "Generic", "anchorLink": "auth-route", "title": "OAuth route", - "sectionContent": "To install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`.\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.", + "sectionContent": "> Note: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using [Token Exchange](#token-exchange) for OAuth and installation flow.\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`.\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.", "codeblock": { "title": "Add OAuth route", "tabs": [ @@ -434,6 +434,22 @@ ] } }, + { + "type": "Generic", + "anchorLink": "token-exchange", + "title": "Using Token exchange for OAuth", + "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\nIf you're building an embedded app, we **strongly** recommend using Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview)\n\n We have introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization. It can replace the legacy [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant) to eliminate app redirects and installation handling\n\nYou can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have token exchange enabled by default.\n\n1. Turn on [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Turn on the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", + "codeblock": { + "title": "Enabling token exchange", + "tabs": [ + { + "title": "/app/shopify.server.ts", + "language": "ts", + "code": "// ... imports\nconst shopify = shopifyApp({\n // .. and the rest of the config\n isEmbeddedApp: true,\n future: {\n unstable_newEmbeddedAuthStrategy: true,\n },\n)};\n\n// ... exports\n" + } + ] + } + }, { "type": "Generic", "anchorLink": "app-provider", diff --git a/packages/shopify-app-remix/docs/staticPages/examples/index/token-exchange-config.example.ts b/packages/shopify-app-remix/docs/staticPages/examples/index/token-exchange-config.example.ts new file mode 100644 index 0000000000..4c3d2a9a61 --- /dev/null +++ b/packages/shopify-app-remix/docs/staticPages/examples/index/token-exchange-config.example.ts @@ -0,0 +1,10 @@ +// ... imports +const shopify = shopifyApp({ + // .. and the rest of the config + isEmbeddedApp: true, + future: { + unstable_newEmbeddedAuthStrategy: true, + }, +)}; + +// ... exports diff --git a/packages/shopify-app-remix/docs/staticPages/index.doc.ts b/packages/shopify-app-remix/docs/staticPages/index.doc.ts index 4a0dd634bd..917c89932b 100644 --- a/packages/shopify-app-remix/docs/staticPages/index.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/index.doc.ts @@ -138,7 +138,8 @@ const data: LandingTemplateSchema = { anchorLink: 'auth-route', title: 'OAuth route', sectionContent: - "To install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`." + + "> Note: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using [Token Exchange](#token-exchange) for OAuth and installation flow." + + "\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`." + '\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.' + '\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.', codeblock: { @@ -152,6 +153,35 @@ const data: LandingTemplateSchema = { ], }, }, + { + type: 'Generic', + anchorLink: 'token-exchange', + title: 'Using Token exchange for OAuth', + sectionContent: + "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)." + + "\nIf you're building an embedded app, we **strongly** recommend using Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview)" + + "\n\n We have introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization." + + " It can replace the legacy [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant) to eliminate app redirects and installation handling" + + "\n\nYou can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + + " to handle automatic app installations and scope updates, while using" + + " [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user." + + "\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have token exchange enabled by default." + + "\n\n1. Turn on [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + + " by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration)." + + "\n2. Turn on the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file." + + "\n3. Enjoy no-redirect OAuth flow, and app installation process.", + codeblock: { + title: 'Enabling token exchange', + tabs: [ + { + title: '/app/shopify.server.ts', + language: 'ts', + code: './examples/index/token-exchange-config.example.ts', + + } + ], + } + }, { type: 'Generic', anchorLink: 'app-provider', From 72874e276046873018b54cf591e7d2e4475707a5 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 12:37:56 -0700 Subject: [PATCH 09/19] Rewording --- packages/shopify-app-remix/CHANGELOG.md | 4 +-- packages/shopify-app-remix/README.md | 28 ++++++++++--------- .../docs/generated/generated_docs_data.json | 4 +-- .../generated/generated_static_pages.json | 12 ++++---- ...edded-app-auth-strategy-config.example.ts} | 0 .../docs/staticPages/future-flags.doc.ts | 4 +-- .../docs/staticPages/index.doc.ts | 27 +++++++++--------- .../src/server/future/flags.ts | 4 ++- 8 files changed, 44 insertions(+), 39 deletions(-) rename packages/shopify-app-remix/docs/staticPages/examples/index/{token-exchange-config.example.ts => embedded-app-auth-strategy-config.example.ts} (100%) diff --git a/packages/shopify-app-remix/CHANGELOG.md b/packages/shopify-app-remix/CHANGELOG.md index e1a656e257..33243d2eb7 100644 --- a/packages/shopify-app-remix/CHANGELOG.md +++ b/packages/shopify-app-remix/CHANGELOG.md @@ -4,9 +4,9 @@ ### Minor Changes -- 2473c85: Add new embedded authorization strategy relying on Shopify managed install and OAuth token +- 2473c85: Add new embedded authorization strategy relying on Shopify managed install and OAuth token exchange - :exclamation: For more information on how to enable this feature, see [Using the New Token Exchange OAuth Flow](./README.md#using-the-new-token-exchange-oauth-flow) + :exclamation: For more information on how to enable this feature, see ["New Embedded Authorization Strategy"](./README.md#new-embedded-authorization-strategy) ### Patch Changes diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index 422d703f53..bc400c2f57 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -174,25 +174,27 @@ Here are some guides to help you set up your app: You can also authenticate requests from surfaces other than the admin. To see all supported methods, see [the `shopify.authenticate` object documentation](https://shopify.dev/docs/api/shopify-app-remix/latest/authenticate). -### Using the New Token Exchange OAuth flow +### New embedded authorization strategy > [!TIP] -> If you are building an embedded app, we **strongly** recommend using [Shopify managed install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) -with [Token Exchange](#token-exchange) instead of the Authorization Code Grant Flow. +> If you are building an embedded app, we **strongly** recommend using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) instead of the legacy authorization code grant flow. -We've introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization. It -can replace the existing [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant). +We've introduced a new installation and authorization strategy for **embedded apps** that +eliminates the redirects that were previously necessary. +It replaces the existing [installation and authorization code grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant). -You can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) -to handle automatic app installations and scope updates, while using -[Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user. +This is achieved by using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +to handle automatic app installations and scope updates, while utilizing +[token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to retrieve an access token for +authenticated API access. -##### Enabling Token Exchange in your app +##### Enabling this new strategy in your app > [!NOTE] -> Newly created Remix apps from the template after February 1st 2024 will have token exchange enabled by default. +> Newly created Remix apps from the template after February 1st 2024 will have this feature enabled by default. -1. Turn on [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +1. Enable [Shopify managed install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration). -2. Turn on the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file. +2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file. ```ts // my-app/app/shopify.server.ts @@ -205,7 +207,7 @@ const shopify = shopifyApp({ }) ``` -3. Enjoy painless no-redirect OAuth flow, and app installation process. +3. Enjoy no-redirect OAuth flow, and app installation process. ###### Learn more about: - [How Token Exchange Works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) diff --git a/packages/shopify-app-remix/docs/generated/generated_docs_data.json b/packages/shopify-app-remix/docs/generated/generated_docs_data.json index 5e7796c012..24e955ba97 100644 --- a/packages/shopify-app-remix/docs/generated/generated_docs_data.json +++ b/packages/shopify-app-remix/docs/generated/generated_docs_data.json @@ -15355,12 +15355,12 @@ "syntaxKind": "PropertySignature", "name": "unstable_newEmbeddedAuthStrategy", "value": "boolean", - "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview). This assumes app are using declarative scopes with [Shopify managing installs](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).", + "description": "When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview). This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", "isOptional": true, "defaultValue": "false" } ], - "value": "export interface FutureFlags {\n /**\n * When enabled, returns the same `admin` context (`AdminApiContext`) from `authenticate.webhook` that is returned from `authenticate.admin`.\n *\n * @default false\n */\n v3_webhookAdminContext?: boolean;\n\n /**\n * When enabled authenticate.public() will not work. Use authenticate.public.checkout() instead.\n *\n * @default false\n */\n v3_authenticatePublic?: boolean;\n\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n * This assumes app are using declarative scopes with [Shopify managing installs](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n}" + "value": "export interface FutureFlags {\n /**\n * When enabled, returns the same `admin` context (`AdminApiContext`) from `authenticate.webhook` that is returned from `authenticate.admin`.\n *\n * @default false\n */\n v3_webhookAdminContext?: boolean;\n\n /**\n * When enabled authenticate.public() will not work. Use authenticate.public.checkout() instead.\n *\n * @default false\n */\n v3_authenticatePublic?: boolean;\n\n /**\n * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n *\n * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).\n *\n * @default false\n */\n unstable_newEmbeddedAuthStrategy?: boolean;\n}" } } } diff --git a/packages/shopify-app-remix/docs/generated/generated_static_pages.json b/packages/shopify-app-remix/docs/generated/generated_static_pages.json index 752a7afff7..d6258d1815 100644 --- a/packages/shopify-app-remix/docs/generated/generated_static_pages.json +++ b/packages/shopify-app-remix/docs/generated/generated_static_pages.json @@ -167,7 +167,7 @@ { "name": "unstable_newEmbeddedAuthStrategy", "value": "", - "description": "Embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.\n\nSee [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) for more details.", + "description": "Embedded apps will fetch access tokens via token exchange. This assumes the app has declared scopes for Shopify managed installations.\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).", "isOptional": true } ] @@ -422,7 +422,7 @@ "type": "Generic", "anchorLink": "auth-route", "title": "OAuth route", - "sectionContent": "> Note: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using [Token Exchange](#token-exchange) for OAuth and installation flow.\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`.\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.", + "sectionContent": "> Tip: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using the [new embedded authorization strategy](#embedded-auth-strategy) for OAuth and installation flow. If you're building an embedded app, we **strongly** recommend using the [new embedded authorization strategy](#embedded-auth-strategy)\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`.\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.", "codeblock": { "title": "Add OAuth route", "tabs": [ @@ -436,11 +436,11 @@ }, { "type": "Generic", - "anchorLink": "token-exchange", - "title": "Using Token exchange for OAuth", - "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\nIf you're building an embedded app, we **strongly** recommend using Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview)\n\n We have introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization. It can replace the legacy [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant) to eliminate app redirects and installation handling\n\nYou can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have token exchange enabled by default.\n\n1. Turn on [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Turn on the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", + "anchorLink": "embedded-auth-strategy", + "title": "New embedded authorization strategy", + "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary. It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant).\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have this feature enabled by default.\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", "codeblock": { - "title": "Enabling token exchange", + "title": "Enabling the new embedded auth strategy", "tabs": [ { "title": "/app/shopify.server.ts", diff --git a/packages/shopify-app-remix/docs/staticPages/examples/index/token-exchange-config.example.ts b/packages/shopify-app-remix/docs/staticPages/examples/index/embedded-app-auth-strategy-config.example.ts similarity index 100% rename from packages/shopify-app-remix/docs/staticPages/examples/index/token-exchange-config.example.ts rename to packages/shopify-app-remix/docs/staticPages/examples/index/embedded-app-auth-strategy-config.example.ts diff --git a/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts b/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts index 5f1de21598..93a1fbbb5c 100644 --- a/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/future-flags.doc.ts @@ -74,8 +74,8 @@ const data: LandingTemplateSchema = { name: 'unstable_newEmbeddedAuthStrategy', value: '', description: - 'Embedded apps will fetch access tokens via token exchange. This assumes app are using declarative scopes with Shopify managing installs.' + - '\n\nSee [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) for more details.', + 'Embedded apps will fetch access tokens via token exchange. This assumes the app has declared scopes for Shopify managed installations.' + + '\n\nLearn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).', isOptional: true, }, ], diff --git a/packages/shopify-app-remix/docs/staticPages/index.doc.ts b/packages/shopify-app-remix/docs/staticPages/index.doc.ts index 917c89932b..5b2b79a3da 100644 --- a/packages/shopify-app-remix/docs/staticPages/index.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/index.doc.ts @@ -138,7 +138,8 @@ const data: LandingTemplateSchema = { anchorLink: 'auth-route', title: 'OAuth route', sectionContent: - "> Note: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using [Token Exchange](#token-exchange) for OAuth and installation flow." + + "> Tip: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using the [new embedded authorization strategy](#embedded-auth-strategy) for OAuth and installation flow. If you're building an embedded app, we **strongly** recommend using the" + + " [new embedded authorization strategy](#embedded-auth-strategy)" + "\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`." + '\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.' + '\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.', @@ -155,28 +156,28 @@ const data: LandingTemplateSchema = { }, { type: 'Generic', - anchorLink: 'token-exchange', - title: 'Using Token exchange for OAuth', + anchorLink: 'embedded-auth-strategy', + title: 'New embedded authorization strategy', sectionContent: "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)." + - "\nIf you're building an embedded app, we **strongly** recommend using Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview)" + - "\n\n We have introduced a new installation and OAuth flow for **embedded apps** that eliminates the redirects used for installation and authorization." + - " It can replace the legacy [Authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant) to eliminate app redirects and installation handling" + - "\n\nYou can take advantage of [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + + "\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview)." + + "\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary." + + " It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant)." + + "\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + " to handle automatic app installations and scope updates, while using" + - " [Token Exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user." + - "\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have token exchange enabled by default." + - "\n\n1. Turn on [Shopify Managed Install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + + " [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user." + + "\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have this feature enabled by default." + + "\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + " by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration)." + - "\n2. Turn on the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file." + + "\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file." + "\n3. Enjoy no-redirect OAuth flow, and app installation process.", codeblock: { - title: 'Enabling token exchange', + title: 'Enabling the new embedded auth strategy', tabs: [ { title: '/app/shopify.server.ts', language: 'ts', - code: './examples/index/token-exchange-config.example.ts', + code: './examples/index/embedded-app-auth-strategy-config.example.ts', } ], diff --git a/packages/shopify-app-remix/src/server/future/flags.ts b/packages/shopify-app-remix/src/server/future/flags.ts index a0b58430bf..b9091951db 100644 --- a/packages/shopify-app-remix/src/server/future/flags.ts +++ b/packages/shopify-app-remix/src/server/future/flags.ts @@ -17,7 +17,9 @@ export interface FutureFlags { /** * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview). - * This assumes app are using declarative scopes with [Shopify managing installs](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation). + * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation). + * + * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy). * * @default false */ From d53215f31cdfad767725a2bf1b0005ec7138b30d Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 13:15:43 -0700 Subject: [PATCH 10/19] Add changelog --- packages/shopify-app-remix/.changeset/README.md | 8 ++++++++ packages/shopify-app-remix/.changeset/config.json | 11 +++++++++++ .../shopify-app-remix/.changeset/new-baboons-tap.md | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 packages/shopify-app-remix/.changeset/README.md create mode 100644 packages/shopify-app-remix/.changeset/config.json create mode 100644 packages/shopify-app-remix/.changeset/new-baboons-tap.md diff --git a/packages/shopify-app-remix/.changeset/README.md b/packages/shopify-app-remix/.changeset/README.md new file mode 100644 index 0000000000..e5b6d8d6a6 --- /dev/null +++ b/packages/shopify-app-remix/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/packages/shopify-app-remix/.changeset/config.json b/packages/shopify-app-remix/.changeset/config.json new file mode 100644 index 0000000000..6d2119a459 --- /dev/null +++ b/packages/shopify-app-remix/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/packages/shopify-app-remix/.changeset/new-baboons-tap.md b/packages/shopify-app-remix/.changeset/new-baboons-tap.md new file mode 100644 index 0000000000..da8a7f5e1c --- /dev/null +++ b/packages/shopify-app-remix/.changeset/new-baboons-tap.md @@ -0,0 +1,5 @@ +--- +'@shopify/shopify-app-remix': patch +--- + +Add documentation for the [new embedded authorization strategy](./README.md#new-embedded-authorization-strategy) From 1638d31659b703b2e3b1162b5ea103490b423ff4 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Fri, 26 Jan 2024 14:01:50 -0700 Subject: [PATCH 11/19] Change capitalization --- packages/shopify-app-remix/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index bc400c2f57..cb56d049d9 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -192,7 +192,7 @@ authenticated API access. > [!NOTE] > Newly created Remix apps from the template after February 1st 2024 will have this feature enabled by default. -1. Enable [Shopify managed install](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration). 2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file. @@ -210,9 +210,9 @@ const shopify = shopifyApp({ 3. Enjoy no-redirect OAuth flow, and app installation process. ###### Learn more about: - - [How Token Exchange Works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) - - [Using Shopify Managed Install for your app's installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) - - [Configuring Access Scopes Through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration) + - [How token exchange works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) + - [Using Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) + - [Configuring access scopes through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration) ## Gotchas / Troubleshooting From 8dcb1862ad794c77c99929bd612f4a3d17e67b70 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Mon, 29 Jan 2024 08:57:08 -0700 Subject: [PATCH 12/19] Remove changeset for remix --- .changeset/lucky-cooks-glow.md | 2 ++ packages/shopify-app-remix/.changeset/README.md | 8 -------- packages/shopify-app-remix/.changeset/config.json | 11 ----------- .../shopify-app-remix/.changeset/new-baboons-tap.md | 5 ----- 4 files changed, 2 insertions(+), 24 deletions(-) create mode 100644 .changeset/lucky-cooks-glow.md delete mode 100644 packages/shopify-app-remix/.changeset/README.md delete mode 100644 packages/shopify-app-remix/.changeset/config.json delete mode 100644 packages/shopify-app-remix/.changeset/new-baboons-tap.md diff --git a/.changeset/lucky-cooks-glow.md b/.changeset/lucky-cooks-glow.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/lucky-cooks-glow.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/shopify-app-remix/.changeset/README.md b/packages/shopify-app-remix/.changeset/README.md deleted file mode 100644 index e5b6d8d6a6..0000000000 --- a/packages/shopify-app-remix/.changeset/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Changesets - -Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works -with multi-package repos, or single-package repos to help you version and publish your code. You can -find the full documentation for it [in our repository](https://github.com/changesets/changesets) - -We have a quick list of common questions to get you started engaging with this project in -[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/packages/shopify-app-remix/.changeset/config.json b/packages/shopify-app-remix/.changeset/config.json deleted file mode 100644 index 6d2119a459..0000000000 --- a/packages/shopify-app-remix/.changeset/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", - "changelog": "@changesets/cli/changelog", - "commit": false, - "fixed": [], - "linked": [], - "access": "restricted", - "baseBranch": "main", - "updateInternalDependencies": "patch", - "ignore": [] -} diff --git a/packages/shopify-app-remix/.changeset/new-baboons-tap.md b/packages/shopify-app-remix/.changeset/new-baboons-tap.md deleted file mode 100644 index da8a7f5e1c..0000000000 --- a/packages/shopify-app-remix/.changeset/new-baboons-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/shopify-app-remix': patch ---- - -Add documentation for the [new embedded authorization strategy](./README.md#new-embedded-authorization-strategy) From 652936f725e004c0abe103548099aac9ec305635 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Mon, 29 Jan 2024 09:00:24 -0700 Subject: [PATCH 13/19] Address comment --- packages/shopify-app-remix/README.md | 2 +- .../docs/generated/generated_static_pages.json | 2 +- packages/shopify-app-remix/docs/staticPages/index.doc.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index cb56d049d9..0d15e9e12b 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -190,7 +190,7 @@ authenticated API access. ##### Enabling this new strategy in your app > [!NOTE] -> Newly created Remix apps from the template after February 1st 2024 will have this feature enabled by default. +> Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default. 1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration). diff --git a/packages/shopify-app-remix/docs/generated/generated_static_pages.json b/packages/shopify-app-remix/docs/generated/generated_static_pages.json index d6258d1815..dba754eed0 100644 --- a/packages/shopify-app-remix/docs/generated/generated_static_pages.json +++ b/packages/shopify-app-remix/docs/generated/generated_static_pages.json @@ -438,7 +438,7 @@ "type": "Generic", "anchorLink": "embedded-auth-strategy", "title": "New embedded authorization strategy", - "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary. It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant).\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have this feature enabled by default.\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", + "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary. It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant).\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default.\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", "codeblock": { "title": "Enabling the new embedded auth strategy", "tabs": [ diff --git a/packages/shopify-app-remix/docs/staticPages/index.doc.ts b/packages/shopify-app-remix/docs/staticPages/index.doc.ts index 5b2b79a3da..58eae52f16 100644 --- a/packages/shopify-app-remix/docs/staticPages/index.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/index.doc.ts @@ -166,7 +166,7 @@ const data: LandingTemplateSchema = { "\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + " to handle automatic app installations and scope updates, while using" + " [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user." + - "\n\n > Note: Newly created Remix apps from the template after February 1st 2024 will have this feature enabled by default." + + "\n\n > Note: Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default." + "\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + " by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration)." + "\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file." + From ac5b0f0c8773b173a12381456383bcc488d53ea3 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Mon, 29 Jan 2024 11:01:17 -0700 Subject: [PATCH 14/19] Rewording embedded app authorization strategy --- packages/shopify-app-remix/README.md | 4 ++-- .../docs/generated/generated_static_pages.json | 4 ++-- packages/shopify-app-remix/docs/staticPages/index.doc.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index 0d15e9e12b..e20165fd39 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -174,7 +174,7 @@ Here are some guides to help you set up your app: You can also authenticate requests from surfaces other than the admin. To see all supported methods, see [the `shopify.authenticate` object documentation](https://shopify.dev/docs/api/shopify-app-remix/latest/authenticate). -### New embedded authorization strategy +### New embedded app authorization strategy > [!TIP] > If you are building an embedded app, we **strongly** recommend using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) instead of the legacy authorization code grant flow. @@ -207,7 +207,7 @@ const shopify = shopifyApp({ }) ``` -3. Enjoy no-redirect OAuth flow, and app installation process. +3. Enjoy a smoother and faster app installation process. ###### Learn more about: - [How token exchange works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) diff --git a/packages/shopify-app-remix/docs/generated/generated_static_pages.json b/packages/shopify-app-remix/docs/generated/generated_static_pages.json index dba754eed0..1bbcd15cad 100644 --- a/packages/shopify-app-remix/docs/generated/generated_static_pages.json +++ b/packages/shopify-app-remix/docs/generated/generated_static_pages.json @@ -422,7 +422,7 @@ "type": "Generic", "anchorLink": "auth-route", "title": "OAuth route", - "sectionContent": "> Tip: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using the [new embedded authorization strategy](#embedded-auth-strategy) for OAuth and installation flow. If you're building an embedded app, we **strongly** recommend using the [new embedded authorization strategy](#embedded-auth-strategy)\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`.\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.", + "sectionContent": "> Tip: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using the [new embedded app authorization strategy](#embedded-auth-strategy) for OAuth and installation flow. If you're building an embedded app, we **strongly** recommend using the [new embedded app authorization strategy](#embedded-auth-strategy)\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`.\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.", "codeblock": { "title": "Add OAuth route", "tabs": [ @@ -437,7 +437,7 @@ { "type": "Generic", "anchorLink": "embedded-auth-strategy", - "title": "New embedded authorization strategy", + "title": "New embedded app authorization strategy", "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary. It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant).\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default.\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", "codeblock": { "title": "Enabling the new embedded auth strategy", diff --git a/packages/shopify-app-remix/docs/staticPages/index.doc.ts b/packages/shopify-app-remix/docs/staticPages/index.doc.ts index 58eae52f16..2f9160345c 100644 --- a/packages/shopify-app-remix/docs/staticPages/index.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/index.doc.ts @@ -138,8 +138,8 @@ const data: LandingTemplateSchema = { anchorLink: 'auth-route', title: 'OAuth route', sectionContent: - "> Tip: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using the [new embedded authorization strategy](#embedded-auth-strategy) for OAuth and installation flow. If you're building an embedded app, we **strongly** recommend using the" + - " [new embedded authorization strategy](#embedded-auth-strategy)" + + "> Tip: This is only applicable to non-embedded apps or legacy embedded apps that are **not** using the [new embedded app authorization strategy](#embedded-auth-strategy) for OAuth and installation flow. If you're building an embedded app, we **strongly** recommend using the" + + " [new embedded app authorization strategy](#embedded-auth-strategy)" + "\n\nTo install an app or refresh tokens, you'll need to set up an [OAuth](docs/apps/auth/oauth) route. To do that, set up a [splat route](https://remix.run/docs/en/main/guides/routing#splats) that calls `authenticate.admin`." + '\n\nWhen that function is called, the package will start the OAuth process, and handle the callback from Shopify after it completes.' + '\n\nThe default route is `/app/routes/auth/$.tsx`, but you can configure this route using the `authPathPrefix` option.', @@ -157,7 +157,7 @@ const data: LandingTemplateSchema = { { type: 'Generic', anchorLink: 'embedded-auth-strategy', - title: 'New embedded authorization strategy', + title: 'New embedded app authorization strategy', sectionContent: "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)." + "\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview)." + From 3f67d9a3a35cebb6d74296a2260794649b0d9937 Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Mon, 29 Jan 2024 11:18:13 -0700 Subject: [PATCH 15/19] Ran Prettier linter --- packages/shopify-app-remix/README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index e20165fd39..0944c5057d 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -175,9 +175,10 @@ You can also authenticate requests from surfaces other than the admin. To see all supported methods, see [the `shopify.authenticate` object documentation](https://shopify.dev/docs/api/shopify-app-remix/latest/authenticate). ### New embedded app authorization strategy + > [!TIP] > If you are building an embedded app, we **strongly** recommend using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) -with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) instead of the legacy authorization code grant flow. +> with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) instead of the legacy authorization code grant flow. We've introduced a new installation and authorization strategy for **embedded apps** that eliminates the redirects that were previously necessary. @@ -189,11 +190,12 @@ to handle automatic app installations and scope updates, while utilizing authenticated API access. ##### Enabling this new strategy in your app + > [!NOTE] > Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default. 1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) -by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration). + by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration). 2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file. ```ts @@ -207,12 +209,14 @@ const shopify = shopifyApp({ }) ``` + 3. Enjoy a smoother and faster app installation process. ###### Learn more about: - - [How token exchange works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) - - [Using Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) - - [Configuring access scopes through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration) + +- [How token exchange works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) +- [Using Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) +- [Configuring access scopes through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration) ## Gotchas / Troubleshooting From b16fc02d65742603e0fe5a88e3099649cce0518b Mon Sep 17 00:00:00 2001 From: "A.J. Bale (Age)" Date: Wed, 31 Jan 2024 09:00:23 -0500 Subject: [PATCH 16/19] Update token exchange link --- packages/shopify-app-remix/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/shopify-app-remix/README.md b/packages/shopify-app-remix/README.md index 0944c5057d..9c1e412381 100644 --- a/packages/shopify-app-remix/README.md +++ b/packages/shopify-app-remix/README.md @@ -178,7 +178,7 @@ To see all supported methods, see [the `shopify.authenticate` object documentati > [!TIP] > If you are building an embedded app, we **strongly** recommend using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) -> with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) instead of the legacy authorization code grant flow. +> with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange) instead of the legacy authorization code grant flow. We've introduced a new installation and authorization strategy for **embedded apps** that eliminates the redirects that were previously necessary. @@ -186,7 +186,7 @@ It replaces the existing [installation and authorization code grant flow](https: This is achieved by using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while utilizing -[token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to retrieve an access token for +[token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange) to retrieve an access token for authenticated API access. ##### Enabling this new strategy in your app @@ -214,7 +214,7 @@ const shopify = shopifyApp({ ###### Learn more about: -- [How token exchange works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) +- [How token exchange works](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange) - [Using Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) - [Configuring access scopes through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration) From 04da1cfb193ac06c264866f697dedfb5015a51b9 Mon Sep 17 00:00:00 2001 From: "A.J. Bale (Age)" Date: Wed, 31 Jan 2024 09:02:19 -0500 Subject: [PATCH 17/19] Fix token exchange link --- .../docs/generated/generated_static_pages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shopify-app-remix/docs/generated/generated_static_pages.json b/packages/shopify-app-remix/docs/generated/generated_static_pages.json index 1bbcd15cad..31436aa471 100644 --- a/packages/shopify-app-remix/docs/generated/generated_static_pages.json +++ b/packages/shopify-app-remix/docs/generated/generated_static_pages.json @@ -438,7 +438,7 @@ "type": "Generic", "anchorLink": "embedded-auth-strategy", "title": "New embedded app authorization strategy", - "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview).\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary. It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant).\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default.\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", + "sectionContent": "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation).\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange).\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary. It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant).\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) to handle automatic app installations and scope updates, while using [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange) to get an access token for the logged-in user.\n\n > Note: Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default.\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation) by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration).\n2. Enable the future flag `unstable_newEmbeddedAuthStrategy` in your app's server configuration file.\n3. Enjoy no-redirect OAuth flow, and app installation process.", "codeblock": { "title": "Enabling the new embedded auth strategy", "tabs": [ @@ -537,4 +537,4 @@ } ] } -] \ No newline at end of file +] From 0d4b6a7e223cb7c02208070be98af74fad7bf42a Mon Sep 17 00:00:00 2001 From: "A.J. Bale (Age)" Date: Wed, 31 Jan 2024 09:03:30 -0500 Subject: [PATCH 18/19] Update token exchange link --- packages/shopify-app-remix/docs/staticPages/index.doc.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shopify-app-remix/docs/staticPages/index.doc.ts b/packages/shopify-app-remix/docs/staticPages/index.doc.ts index 2f9160345c..6652f75b25 100644 --- a/packages/shopify-app-remix/docs/staticPages/index.doc.ts +++ b/packages/shopify-app-remix/docs/staticPages/index.doc.ts @@ -160,12 +160,12 @@ const data: LandingTemplateSchema = { title: 'New embedded app authorization strategy', sectionContent: "> Tip: This is available for embedded apps that are using [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)." + - "\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview)." + + "\n> If you're building an embedded app, we **strongly** recommend using this feature that utilizes Shopify managed install with [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange)." + "\n\n We have introduced a new authorization and installation strategy for **embedded apps** that eliminates the redirects that were previously necessary." + " It replaces the legacy [authorization Code install and grant flow](https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant)." + "\n\nIt takes advantage of [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + " to handle automatic app installations and scope updates, while using" + - " [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview) to get an access token for the logged-in user." + + " [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange) to get an access token for the logged-in user." + "\n\n > Note: Newly created Remix apps from the template after February 1st 2024 has this feature enabled by default." + "\n\n1. Enable [Shopify managed installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation)" + " by configuring your scopes [through the Shopify CLI](https://shopify.dev/docs/apps/tools/cli/configuration)." + From 8af1c9b73ea92d11dd37c4a9099f9c5c23afb4df Mon Sep 17 00:00:00 2001 From: "A.J. Bale (Age)" Date: Wed, 31 Jan 2024 09:04:23 -0500 Subject: [PATCH 19/19] Update token exchange link --- packages/shopify-app-remix/src/server/future/flags.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shopify-app-remix/src/server/future/flags.ts b/packages/shopify-app-remix/src/server/future/flags.ts index b9091951db..894c876e85 100644 --- a/packages/shopify-app-remix/src/server/future/flags.ts +++ b/packages/shopify-app-remix/src/server/future/flags.ts @@ -16,7 +16,7 @@ export interface FutureFlags { v3_authenticatePublic?: boolean; /** - * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange/overview). + * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation). * * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy).