@shopify/shopify-app-remix 3.8.5 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/README.md +2 -3
  2. package/dist/cjs/react/components/AppProvider/AppProvider.js +15 -0
  3. package/dist/cjs/react/components/AppProvider/AppProvider.js.map +1 -1
  4. package/dist/cjs/server/adapters/node/index.js +0 -2
  5. package/dist/cjs/server/adapters/node/index.js.map +1 -1
  6. package/dist/cjs/server/authenticate/admin/authenticate.js.map +1 -1
  7. package/dist/cjs/server/authenticate/admin/helpers/create-admin-api-context.js.map +1 -1
  8. package/dist/cjs/server/authenticate/admin/helpers/trigger-after-auth-hook.js.map +1 -1
  9. package/dist/cjs/server/authenticate/admin/scope/client/fetch-scopes-details.js.map +1 -1
  10. package/dist/cjs/server/authenticate/admin/scope/client/revoke-scopes.js.map +1 -1
  11. package/dist/cjs/server/authenticate/admin/scope/factory.js.map +1 -1
  12. package/dist/cjs/server/authenticate/admin/scope/query.js.map +1 -1
  13. package/dist/cjs/server/authenticate/admin/scope/request.js.map +1 -1
  14. package/dist/cjs/server/authenticate/admin/scope/revoke.js.map +1 -1
  15. package/dist/cjs/server/authenticate/admin/strategies/auth-code-flow.js.map +1 -1
  16. package/dist/cjs/server/authenticate/admin/strategies/merchant-custom-app.js.map +1 -1
  17. package/dist/cjs/server/authenticate/admin/strategies/token-exchange.js.map +1 -1
  18. package/dist/cjs/server/authenticate/flow/authenticate.js.map +1 -1
  19. package/dist/cjs/server/authenticate/fulfillment-service/authenticate.js.map +1 -1
  20. package/dist/cjs/server/authenticate/public/appProxy/authenticate.js.map +1 -1
  21. package/dist/cjs/server/authenticate/public/factory.js.map +1 -1
  22. package/dist/cjs/server/authenticate/webhooks/authenticate.js.map +1 -1
  23. package/dist/cjs/server/clients/admin/factory.js +0 -11
  24. package/dist/cjs/server/clients/admin/factory.js.map +1 -1
  25. package/dist/cjs/server/clients/admin/graphql.js +1 -2
  26. package/dist/cjs/server/clients/admin/graphql.js.map +1 -1
  27. package/dist/cjs/server/future/flags.js.map +1 -1
  28. package/dist/cjs/server/index.js +0 -8
  29. package/dist/cjs/server/index.js.map +1 -1
  30. package/dist/cjs/server/override-logger.js +2 -2
  31. package/dist/cjs/server/override-logger.js.map +1 -1
  32. package/dist/cjs/server/shopify-app.js +1 -2
  33. package/dist/cjs/server/shopify-app.js.map +1 -1
  34. package/dist/cjs/server/test-helpers/test-config.js.map +1 -1
  35. package/dist/cjs/server/types.js.map +1 -1
  36. package/dist/cjs/server/unauthenticated/admin/factory.js.map +1 -1
  37. package/dist/cjs/server/version.js +1 -1
  38. package/dist/cjs/server/version.js.map +1 -1
  39. package/dist/esm/react/components/AppProvider/AppProvider.mjs +15 -0
  40. package/dist/esm/react/components/AppProvider/AppProvider.mjs.map +1 -1
  41. package/dist/esm/server/adapters/node/index.mjs +1 -3
  42. package/dist/esm/server/adapters/node/index.mjs.map +1 -1
  43. package/dist/esm/server/authenticate/admin/authenticate.mjs.map +1 -1
  44. package/dist/esm/server/authenticate/admin/helpers/create-admin-api-context.mjs.map +1 -1
  45. package/dist/esm/server/authenticate/admin/helpers/trigger-after-auth-hook.mjs.map +1 -1
  46. package/dist/esm/server/authenticate/admin/scope/client/fetch-scopes-details.mjs.map +1 -1
  47. package/dist/esm/server/authenticate/admin/scope/client/revoke-scopes.mjs.map +1 -1
  48. package/dist/esm/server/authenticate/admin/scope/factory.mjs.map +1 -1
  49. package/dist/esm/server/authenticate/admin/scope/query.mjs.map +1 -1
  50. package/dist/esm/server/authenticate/admin/scope/request.mjs.map +1 -1
  51. package/dist/esm/server/authenticate/admin/scope/revoke.mjs.map +1 -1
  52. package/dist/esm/server/authenticate/admin/strategies/auth-code-flow.mjs.map +1 -1
  53. package/dist/esm/server/authenticate/admin/strategies/merchant-custom-app.mjs.map +1 -1
  54. package/dist/esm/server/authenticate/admin/strategies/token-exchange.mjs.map +1 -1
  55. package/dist/esm/server/authenticate/flow/authenticate.mjs.map +1 -1
  56. package/dist/esm/server/authenticate/fulfillment-service/authenticate.mjs.map +1 -1
  57. package/dist/esm/server/authenticate/public/appProxy/authenticate.mjs.map +1 -1
  58. package/dist/esm/server/authenticate/public/factory.mjs.map +1 -1
  59. package/dist/esm/server/authenticate/webhooks/authenticate.mjs.map +1 -1
  60. package/dist/esm/server/clients/admin/factory.mjs +0 -11
  61. package/dist/esm/server/clients/admin/factory.mjs.map +1 -1
  62. package/dist/esm/server/clients/admin/graphql.mjs +1 -2
  63. package/dist/esm/server/clients/admin/graphql.mjs.map +1 -1
  64. package/dist/esm/server/future/flags.mjs.map +1 -1
  65. package/dist/esm/server/index.mjs +1 -1
  66. package/dist/esm/server/index.mjs.map +1 -1
  67. package/dist/esm/server/override-logger.mjs +2 -2
  68. package/dist/esm/server/override-logger.mjs.map +1 -1
  69. package/dist/esm/server/shopify-app.mjs +2 -3
  70. package/dist/esm/server/shopify-app.mjs.map +1 -1
  71. package/dist/esm/server/test-helpers/test-config.mjs.map +1 -1
  72. package/dist/esm/server/types.mjs.map +1 -1
  73. package/dist/esm/server/unauthenticated/admin/factory.mjs.map +1 -1
  74. package/dist/esm/server/version.mjs +1 -1
  75. package/dist/esm/server/version.mjs.map +1 -1
  76. package/dist/ts/react/components/AppProvider/AppProvider.d.ts.map +1 -1
  77. package/dist/ts/server/authenticate/admin/authenticate.admin.doc.d.ts.map +1 -1
  78. package/dist/ts/server/authenticate/admin/authenticate.d.ts +2 -2
  79. package/dist/ts/server/authenticate/admin/authenticate.d.ts.map +1 -1
  80. package/dist/ts/server/authenticate/admin/billing/types.d.ts +1 -2
  81. package/dist/ts/server/authenticate/admin/billing/types.d.ts.map +1 -1
  82. package/dist/ts/server/authenticate/admin/helpers/create-admin-api-context.d.ts +2 -3
  83. package/dist/ts/server/authenticate/admin/helpers/create-admin-api-context.d.ts.map +1 -1
  84. package/dist/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.d.ts +2 -3
  85. package/dist/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.d.ts.map +1 -1
  86. package/dist/ts/server/authenticate/admin/scope/client/fetch-scopes-details.d.ts +1 -2
  87. package/dist/ts/server/authenticate/admin/scope/client/fetch-scopes-details.d.ts.map +1 -1
  88. package/dist/ts/server/authenticate/admin/scope/client/revoke-scopes.d.ts +1 -2
  89. package/dist/ts/server/authenticate/admin/scope/client/revoke-scopes.d.ts.map +1 -1
  90. package/dist/ts/server/authenticate/admin/scope/factory.d.ts +1 -2
  91. package/dist/ts/server/authenticate/admin/scope/factory.d.ts.map +1 -1
  92. package/dist/ts/server/authenticate/admin/scope/query.d.ts +1 -2
  93. package/dist/ts/server/authenticate/admin/scope/query.d.ts.map +1 -1
  94. package/dist/ts/server/authenticate/admin/scope/request.d.ts +1 -2
  95. package/dist/ts/server/authenticate/admin/scope/request.d.ts.map +1 -1
  96. package/dist/ts/server/authenticate/admin/scope/revoke.d.ts +1 -2
  97. package/dist/ts/server/authenticate/admin/scope/revoke.d.ts.map +1 -1
  98. package/dist/ts/server/authenticate/admin/strategies/auth-code-flow.d.ts +3 -3
  99. package/dist/ts/server/authenticate/admin/strategies/auth-code-flow.d.ts.map +1 -1
  100. package/dist/ts/server/authenticate/admin/strategies/merchant-custom-app.d.ts +2 -2
  101. package/dist/ts/server/authenticate/admin/strategies/merchant-custom-app.d.ts.map +1 -1
  102. package/dist/ts/server/authenticate/admin/strategies/token-exchange.d.ts +2 -2
  103. package/dist/ts/server/authenticate/admin/strategies/token-exchange.d.ts.map +1 -1
  104. package/dist/ts/server/authenticate/admin/types.d.ts +9 -9
  105. package/dist/ts/server/authenticate/admin/types.d.ts.map +1 -1
  106. package/dist/ts/server/authenticate/flow/authenticate.d.ts +1 -3
  107. package/dist/ts/server/authenticate/flow/authenticate.d.ts.map +1 -1
  108. package/dist/ts/server/authenticate/flow/types.d.ts +4 -5
  109. package/dist/ts/server/authenticate/flow/types.d.ts.map +1 -1
  110. package/dist/ts/server/authenticate/fulfillment-service/authenticate.d.ts +1 -3
  111. package/dist/ts/server/authenticate/fulfillment-service/authenticate.d.ts.map +1 -1
  112. package/dist/ts/server/authenticate/fulfillment-service/types.d.ts +4 -5
  113. package/dist/ts/server/authenticate/fulfillment-service/types.d.ts.map +1 -1
  114. package/dist/ts/server/authenticate/public/appProxy/authenticate.d.ts +1 -3
  115. package/dist/ts/server/authenticate/public/appProxy/authenticate.d.ts.map +1 -1
  116. package/dist/ts/server/authenticate/public/appProxy/types.d.ts +6 -7
  117. package/dist/ts/server/authenticate/public/appProxy/types.d.ts.map +1 -1
  118. package/dist/ts/server/authenticate/public/factory.d.ts +1 -3
  119. package/dist/ts/server/authenticate/public/factory.d.ts.map +1 -1
  120. package/dist/ts/server/authenticate/public/types.d.ts +2 -3
  121. package/dist/ts/server/authenticate/public/types.d.ts.map +1 -1
  122. package/dist/ts/server/authenticate/webhooks/authenticate.d.ts +1 -3
  123. package/dist/ts/server/authenticate/webhooks/authenticate.d.ts.map +1 -1
  124. package/dist/ts/server/authenticate/webhooks/types.d.ts +5 -6
  125. package/dist/ts/server/authenticate/webhooks/types.d.ts.map +1 -1
  126. package/dist/ts/server/clients/admin/factory.d.ts +3 -4
  127. package/dist/ts/server/clients/admin/factory.d.ts.map +1 -1
  128. package/dist/ts/server/clients/admin/graphql.d.ts.map +1 -1
  129. package/dist/ts/server/clients/admin/types.d.ts +2 -134
  130. package/dist/ts/server/clients/admin/types.d.ts.map +1 -1
  131. package/dist/ts/server/config-types.d.ts +14 -16
  132. package/dist/ts/server/config-types.d.ts.map +1 -1
  133. package/dist/ts/server/future/flags.d.ts +2 -22
  134. package/dist/ts/server/future/flags.d.ts.map +1 -1
  135. package/dist/ts/server/index.d.ts +1 -1
  136. package/dist/ts/server/index.d.ts.map +1 -1
  137. package/dist/ts/server/shopify-app.d.ts +1 -2
  138. package/dist/ts/server/shopify-app.d.ts.map +1 -1
  139. package/dist/ts/server/test-helpers/test-config.d.ts +2 -2
  140. package/dist/ts/server/test-helpers/test-config.d.ts.map +1 -1
  141. package/dist/ts/server/types-contexts.d.ts +17 -31
  142. package/dist/ts/server/types-contexts.d.ts.map +1 -1
  143. package/dist/ts/server/types.d.ts +13 -14
  144. package/dist/ts/server/types.d.ts.map +1 -1
  145. package/dist/ts/server/unauthenticated/admin/factory.d.ts +1 -3
  146. package/dist/ts/server/unauthenticated/admin/factory.d.ts.map +1 -1
  147. package/dist/ts/server/unauthenticated/admin/types.d.ts +5 -6
  148. package/dist/ts/server/unauthenticated/admin/types.d.ts.map +1 -1
  149. package/dist/ts/server/unauthenticated/types.d.ts +3 -5
  150. package/dist/ts/server/unauthenticated/types.d.ts.map +1 -1
  151. package/dist/ts/server/version.d.ts +1 -1
  152. package/dist/tsconfig.build.tsbuildinfo +1 -1
  153. package/package.json +13 -16
  154. package/dist/cjs/server/clients/admin/rest.js +0 -132
  155. package/dist/cjs/server/clients/admin/rest.js.map +0 -1
  156. package/dist/esm/server/clients/admin/rest.mjs +0 -130
  157. package/dist/esm/server/clients/admin/rest.mjs.map +0 -1
  158. package/dist/ts/server/clients/admin/rest.d.ts +0 -39
  159. package/dist/ts/server/clients/admin/rest.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sources":["../../../../src/server/types.ts"],"sourcesContent":["import {\n RegisterReturn,\n Shopify,\n ShopifyRestResources,\n} from '@shopify/shopify-api';\nimport {SessionStorage} from '@shopify/shopify-app-session-storage';\n\nimport type {AuthenticateAdmin} from './authenticate/admin/types';\nimport type {AuthenticateFlow} from './authenticate/flow/types';\nimport {AuthenticateFulfillmentService} from './authenticate/fulfillment-service/types';\nimport type {AuthenticatePublic} from './authenticate/public/types';\nimport type {\n AuthenticateWebhook,\n RegisterWebhooksOptions,\n} from './authenticate/webhooks/types';\nimport type {AppConfig, AppConfigArg} from './config-types';\nimport type {\n ApiConfigWithFutureFlags,\n ApiFutureFlags,\n FutureFlagOptions,\n} from './future/flags';\nimport type {Unauthenticated} from './unauthenticated/types';\n\nexport interface BasicParams<\n Future extends FutureFlagOptions = FutureFlagOptions,\n> {\n api: Shopify<\n ApiConfigWithFutureFlags<Future>,\n ShopifyRestResources,\n ApiFutureFlags<Future>\n >;\n config: AppConfig;\n logger: Shopify['logger'];\n}\n\n// eslint-disable-next-line no-warning-comments\n// TODO: Use this enum to replace the isCustomStoreApp config option in shopify-api-js\nexport enum AppDistribution {\n AppStore = 'app_store',\n SingleMerchant = 'single_merchant',\n ShopifyAdmin = 'shopify_admin',\n}\n\ntype RegisterWebhooks = (\n options: RegisterWebhooksOptions,\n) => Promise<RegisterReturn | void>;\n\nexport enum LoginErrorType {\n MissingShop = 'MISSING_SHOP',\n InvalidShop = 'INVALID_SHOP',\n}\n\nexport interface LoginError {\n shop?: LoginErrorType;\n}\n\ntype Login = (request: Request) => Promise<LoginError | never>;\n\ntype AddDocumentResponseHeaders = (request: Request, headers: Headers) => void;\n\ntype RestResourcesType<Config extends AppConfigArg> =\n Config['restResources'] extends ShopifyRestResources\n ? Config['restResources']\n : ShopifyRestResources;\n\ntype SessionStorageType<Config extends AppConfigArg> =\n Config['sessionStorage'] extends SessionStorage\n ? Config['sessionStorage']\n : SessionStorage;\n\ninterface Authenticate<Config extends AppConfigArg> {\n /**\n * Authenticate an admin Request and get back an authenticated admin context. Use the authenticated admin context to interact with Shopify.\n *\n * Examples of when to use this are requests from your app's UI, or requests from admin extensions.\n *\n * If there is no session for the Request, this will redirect the merchant to correct auth flows.\n *\n * @example\n * <caption>Authenticating a request for an embedded app.</caption>\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticate } from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const {admin, session, sessionToken, billing} = authenticate.admin(request);\n * const response = await admin.graphql(`{ shop { name } }`)\n *\n * return json(await response.json());\n * }\n * ```\n * ```ts\n * // /app/shopify.server.ts\n * import { LATEST_API_VERSION, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n admin: AuthenticateAdmin<Config, RestResourcesType<Config>>;\n\n /**\n * Authenticate a Flow extension Request and get back an authenticated context, containing an admin context to access\n * the API, and the payload of the request.\n *\n * If there is no session for the Request, this will return an HTTP 400 error.\n *\n * Note that this will always be a POST request.\n *\n * @example\n * <caption>Authenticating a Flow extension request.</caption>\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { ActionFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticate } from \"../../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const {admin, session, payload} = authenticate.flow(request);\n *\n * // Perform flow extension logic\n *\n * // Return a 200 response\n * return null;\n * }\n * ```\n * ```ts\n * // /app/shopify.server.ts\n * import { LATEST_API_VERSION, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n flow: AuthenticateFlow<Config, RestResourcesType<Config>>;\n\n /**\n * Authenticate a request from a fulfillment service and get back an authenticated context.\n *\n * @example\n * <caption>Shopify session for the fulfillment service request.</caption>\n * <description>Use the session associated with this request to use the Admin GraphQL API </description>\n * ```ts\n * // /app/routes/fulfillment_order_notification.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { admin, session } = await authenticate.fulfillmentService(request);\n *\n * console.log(session.id)\n *\n * return new Response();\n * }\n * ```\n * */\n fulfillmentService: AuthenticateFulfillmentService<\n Config,\n RestResourcesType<Config>\n >;\n\n /**\n * Authenticate a public request and get back a session token.\n *\n * @example\n * <caption>Authenticating a request from a checkout extension</caption>\n *\n * ```ts\n * // /app/routes/api/checkout.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticate } from \"../../shopify.server\";\n * import { getWidgets } from \"~/db/widgets\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const {sessionToken} = authenticate.public.checkout(request);\n *\n * return json(await getWidgets(sessionToken));\n * }\n * ```\n */\n public: AuthenticatePublic<Config>;\n\n /**\n * Authenticate a Shopify webhook request, get back an authenticated admin context and details on the webhook request\n * \n * @example\n * <caption>Authenticating a webhook request</caption>\n *\n * ```ts\n * // app/routes/webhooks.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n * import db from \"../db.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { topic, shop, session, payload } = await authenticate.webhook(request);\n * \n * // Webhook requests can trigger after an app is uninstalled\n * // If the app is already uninstalled, the session may be undefined.\n * if (!session) {\n * throw new Response();\n * }\n * \n * // Handle the webhook\n * console.log(`${TOPIC} webhook received with payload:`, JSON.stringify(payload))\n *\n * throw new Response();\n * };\n * ```\n * \n * @example\n * <caption>Registering app-specific webhooks (Recommended)</caption>\n * ```toml\n * # shopify.app.toml\n * [webhooks]\n * api_version = \"2024-07\"\n\n * [[webhooks.subscriptions]]\n * topics = [\"products/create\"]\n * uri = \"/webhooks/products/create\"\n * \n * ```\n * \n * @example\n * <caption>Registering shop-specific webhooks.</caption>\n * <description>In many cases you won't need this. Please see: [https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-vs-shop-specific-subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-vs-shop-specific-subscriptions)\n * </description>\n * ```ts\n * // app/shopify.server.ts\n * import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * webhooks: {\n * PRODUCTS_CREATE: {\n * deliveryMethod: DeliveryMethod.Http,\n * callbackUrl: \"/webhooks/products/create\",\n * },\n * },\n * hooks: {\n * afterAuth: async ({ session }) => {\n * // Register webhooks for the shop\n * // In this example, every shop will have these webhooks\n * // You could wrap this in some custom shop specific conditional logic if needed\n * shopify.registerWebhooks({ session });\n * },\n * },\n * // ...etc\n * });\n * ```\n */\n webhook: AuthenticateWebhook<Config, RestResourcesType<Config>, string>;\n}\n\nexport interface ShopifyAppBase<Config extends AppConfigArg> {\n /**\n * The `SessionStorage` instance you passed in as a config option.\n *\n * @example\n * <caption>Storing sessions with Prisma.</caption>\n * <description>Import the `@shopify/shopify-app-session-storage-prisma` package to store sessions in your Prisma database.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n * import { PrismaSessionStorage } from \"@shopify/shopify-app-session-storage-prisma\";\n * import prisma from \"~/db.server\";\n *\n * const shopify = shopifyApp({\n * sessionStorage: new PrismaSessionStorage(prisma),\n * // ...etc\n * })\n *\n * // shopify.sessionStorage is an instance of PrismaSessionStorage\n * ```\n */\n sessionStorage?: SessionStorageType<Config>;\n\n /**\n * Adds the required Content Security Policy headers for Shopify apps to the given Headers object.\n *\n * {@link https://shopify.dev/docs/apps/store/security/iframe-protection}\n *\n * @example\n * <caption>Return headers on all requests.</caption>\n * <description>Add headers to all HTML requests by calling `shopify.addDocumentResponseHeaders` in `entry.server.tsx`.</description>\n *\n * ```\n * // ~/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * export const addDocumentResponseheaders = shopify.addDocumentResponseheaders;\n * ```\n *\n * ```ts\n * // entry.server.tsx\n * import { addDocumentResponseHeaders } from \"~/shopify.server\";\n *\n * export default function handleRequest(\n * request: Request,\n * responseStatusCode: number,\n * responseHeaders: Headers,\n * remixContext: EntryContext\n * ) {\n * const markup = renderToString(\n * <RemixServer context={remixContext} url={request.url} />\n * );\n *\n * responseHeaders.set(\"Content-Type\", \"text/html\");\n * addDocumentResponseHeaders(request, responseHeaders);\n *\n * return new Response(\"<!DOCTYPE html>\" + markup, {\n * status: responseStatusCode,\n * headers: responseHeaders,\n * });\n * }\n * ```\n */\n addDocumentResponseHeaders: AddDocumentResponseHeaders;\n\n /**\n * Register shop-specific webhook subscriptions using the Admin GraphQL API.\n *\n * In many cases defining app-specific webhooks in the `shopify.app.toml` will be sufficient and easier to manage. Please see:\n *\n * {@link https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-vs-shop-specific-subscriptions}\n *\n * You should only use this if you need shop-specific webhooks.\n *\n * @example\n * <caption>Registering shop-specific webhooks after install</caption>\n * <description>Trigger the registration to create the shop-specific webhook subscriptions after a merchant installs your app using the `afterAuth` hook. Learn more about [subscribing to webhooks.](https://shopify.dev/docs/api/shopify-app-remix/v3/guide-webhooks)</description>\n * ```ts\n * // app/shopify.server.ts\n * import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * webhooks: {\n * PRODUCTS_CREATE: {\n * deliveryMethod: DeliveryMethod.Http,\n * callbackUrl: \"/webhooks/products/create\",\n * },\n * },\n * hooks: {\n * afterAuth: async ({ session }) => {\n * // Register webhooks for the shop\n * // In this example, every shop will have these webhooks\n * // You could wrap this in some custom shop specific conditional logic if needed\n * shopify.registerWebhooks({ session });\n * },\n * },\n * // ...etc\n * });\n * ```\n */\n registerWebhooks: RegisterWebhooks;\n\n /**\n * Ways to authenticate requests from different surfaces across Shopify.\n *\n * @example\n * <caption>Authenticate Shopify requests.</caption>\n * <description>Use the functions in `authenticate` to validate requests coming from Shopify.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { LATEST_API_VERSION, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * ```\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import shopify from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const {admin, session, sessionToken, billing} = shopify.authenticate.admin(request);\n * const response = admin.graphql(`{ shop { name } }`)\n *\n * return json(await response.json());\n * }\n * ```\n */\n authenticate: Authenticate<Config>;\n\n /**\n * Ways to get Contexts from requests that do not originate from Shopify.\n *\n * @example\n * <caption>Using unauthenticated contexts.</caption>\n * <description>Create contexts for requests that don't come from Shopify.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { LATEST_API_VERSION, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * ```\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticateExternal } from \"~/helpers/authenticate\"\n * import shopify from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const shop = await authenticateExternal(request)\n * const {admin} = await shopify.unauthenticated.admin(shop);\n * const response = admin.graphql(`{ shop { currencyCode } }`)\n *\n * return json(await response.json());\n * }\n * ```\n */\n unauthenticated: Unauthenticated<Config, RestResourcesType<Config>>;\n}\n\nexport interface ShopifyAppLogin {\n /**\n * Log a merchant in, and redirect them to the app root. Will redirect the merchant to authentication if a shop is\n * present in the URL search parameters or form data.\n *\n * This function won't be present when the `distribution` config option is set to `AppDistribution.ShopifyAdmin`,\n * because Admin apps aren't allowed to show a login page.\n *\n * @example\n * <caption>Creating a login page.</caption>\n * <description>Use `shopify.login` to create a login form, in a route that can handle GET and POST requests.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { LATEST_API_VERSION, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * ```\n * ```ts\n * // /app/routes/auth/login.tsx\n * import shopify from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const errors = shopify.login(request);\n *\n * return json(errors);\n * }\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const errors = shopify.login(request);\n *\n * return json(errors);\n * }\n *\n * export default function Auth() {\n * const actionData = useActionData<typeof action>();\n * const [shop, setShop] = useState(\"\");\n *\n * return (\n * <Page>\n * <Card>\n * <Form method=\"post\">\n * <FormLayout>\n * <Text variant=\"headingMd\" as=\"h2\">\n * Login\n * </Text>\n * <TextField\n * type=\"text\"\n * name=\"shop\"\n * label=\"Shop domain\"\n * helpText=\"e.g: my-shop-domain.myshopify.com\"\n * value={shop}\n * onChange={setShop}\n * autoComplete=\"on\"\n * error={actionData?.errors.shop}\n * />\n * <Button submit primary>\n * Submit\n * </Button>\n * </FormLayout>\n * </Form>\n * </Card>\n * </Page>\n * );\n * }\n * ```\n */\n login: Login;\n}\n\nexport type AdminApp<Config extends AppConfigArg> = ShopifyAppBase<Config>;\nexport type SingleMerchantApp<Config extends AppConfigArg> =\n ShopifyAppBase<Config> & ShopifyAppLogin;\nexport type AppStoreApp<Config extends AppConfigArg> = ShopifyAppBase<Config> &\n ShopifyAppLogin;\n\ntype EnforceSessionStorage<Config extends AppConfigArg, Base> = Base & {\n sessionStorage: SessionStorageType<Config>;\n};\n\n/**\n * An object your app can use to interact with Shopify.\n *\n * By default, the app's distribution is `AppStore`.\n */\nexport type ShopifyApp<Config extends AppConfigArg> =\n Config['distribution'] extends AppDistribution.ShopifyAdmin\n ? AdminApp<Config>\n : Config['distribution'] extends AppDistribution.SingleMerchant\n ? EnforceSessionStorage<Config, SingleMerchantApp<Config>>\n : Config['distribution'] extends AppDistribution.AppStore\n ? EnforceSessionStorage<Config, AppStoreApp<Config>>\n : EnforceSessionStorage<Config, AppStoreApp<Config>>;\n"],"names":[],"mappings":"AAmCA;AACA;IACY;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,WAAsB;AACtB,IAAA,eAAA,CAAA,gBAAA,CAAA,GAAA,iBAAkC;AAClC,IAAA,eAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAChC,CAAC,EAJW,eAAe,KAAf,eAAe,GAAA,EAAA,CAAA,CAAA;IAUf;AAAZ,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,cAA4B;AAC5B,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,cAA4B;AAC9B,CAAC,EAHW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"types.mjs","sources":["../../../../src/server/types.ts"],"sourcesContent":["import {RegisterReturn, Shopify} from '@shopify/shopify-api';\nimport {SessionStorage} from '@shopify/shopify-app-session-storage';\n\nimport type {AuthenticateAdmin} from './authenticate/admin/types';\nimport type {AuthenticateFlow} from './authenticate/flow/types';\nimport {AuthenticateFulfillmentService} from './authenticate/fulfillment-service/types';\nimport type {AuthenticatePublic} from './authenticate/public/types';\nimport type {\n AuthenticateWebhook,\n RegisterWebhooksOptions,\n} from './authenticate/webhooks/types';\nimport type {AppConfig, AppConfigArg} from './config-types';\nimport type {\n ApiConfigWithFutureFlags,\n ApiFutureFlags,\n FutureFlagOptions,\n} from './future/flags';\nimport type {Unauthenticated} from './unauthenticated/types';\n\nexport interface BasicParams<\n Future extends FutureFlagOptions = FutureFlagOptions,\n> {\n api: Shopify<ApiConfigWithFutureFlags<Future>, ApiFutureFlags<Future>>;\n config: AppConfig;\n logger: Shopify['logger'];\n}\n\n// eslint-disable-next-line no-warning-comments\n// TODO: Use this enum to replace the isCustomStoreApp config option in shopify-api-js\nexport enum AppDistribution {\n AppStore = 'app_store',\n SingleMerchant = 'single_merchant',\n ShopifyAdmin = 'shopify_admin',\n}\n\ntype RegisterWebhooks = (\n options: RegisterWebhooksOptions,\n) => Promise<RegisterReturn | void>;\n\nexport enum LoginErrorType {\n MissingShop = 'MISSING_SHOP',\n InvalidShop = 'INVALID_SHOP',\n}\n\nexport interface LoginError {\n shop?: LoginErrorType;\n}\n\ntype Login = (request: Request) => Promise<LoginError | never>;\n\ntype AddDocumentResponseHeaders = (request: Request, headers: Headers) => void;\n\ntype SessionStorageType<Config extends AppConfigArg> =\n Config['sessionStorage'] extends SessionStorage\n ? Config['sessionStorage']\n : SessionStorage;\n\ninterface Authenticate<Config extends AppConfigArg> {\n /**\n * Authenticate an admin Request and get back an authenticated admin context. Use the authenticated admin context to interact with Shopify.\n *\n * Examples of when to use this are requests from your app's UI, or requests from admin extensions.\n *\n * If there is no session for the Request, this will redirect the merchant to correct auth flows.\n *\n * @example\n * <caption>Authenticating a request for an embedded app.</caption>\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticate } from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const {admin, session, sessionToken, billing} = authenticate.admin(request);\n * const response = await admin.graphql(`{ shop { name } }`)\n *\n * return json(await response.json());\n * }\n * ```\n * ```ts\n * // /app/shopify.server.ts\n * import { ApiVersion, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n admin: AuthenticateAdmin<Config>;\n\n /**\n * Authenticate a Flow extension Request and get back an authenticated context, containing an admin context to access\n * the API, and the payload of the request.\n *\n * If there is no session for the Request, this will return an HTTP 400 error.\n *\n * Note that this will always be a POST request.\n *\n * @example\n * <caption>Authenticating a Flow extension request.</caption>\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { ActionFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticate } from \"../../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const {admin, session, payload} = authenticate.flow(request);\n *\n * // Perform flow extension logic\n *\n * // Return a 200 response\n * return null;\n * }\n * ```\n * ```ts\n * // /app/shopify.server.ts\n * import { ApiVersion, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * export const authenticate = shopify.authenticate;\n * ```\n */\n flow: AuthenticateFlow;\n\n /**\n * Authenticate a request from a fulfillment service and get back an authenticated context.\n *\n * @example\n * <caption>Shopify session for the fulfillment service request.</caption>\n * <description>Use the session associated with this request to use the Admin GraphQL API </description>\n * ```ts\n * // /app/routes/fulfillment_order_notification.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const { admin, session } = await authenticate.fulfillmentService(request);\n *\n * console.log(session.id)\n *\n * return new Response();\n * }\n * ```\n * */\n fulfillmentService: AuthenticateFulfillmentService;\n\n /**\n * Authenticate a public request and get back a session token.\n *\n * @example\n * <caption>Authenticating a request from a checkout extension</caption>\n *\n * ```ts\n * // /app/routes/api/checkout.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticate } from \"../../shopify.server\";\n * import { getWidgets } from \"~/db/widgets\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const {sessionToken} = authenticate.public.checkout(request);\n *\n * return json(await getWidgets(sessionToken));\n * }\n * ```\n */\n public: AuthenticatePublic;\n\n /**\n * Authenticate a Shopify webhook request, get back an authenticated admin context and details on the webhook request\n * \n * @example\n * <caption>Authenticating a webhook request</caption>\n *\n * ```ts\n * // app/routes/webhooks.ts\n * import { ActionFunctionArgs } from \"@remix-run/node\";\n * import { authenticate } from \"../shopify.server\";\n * import db from \"../db.server\";\n *\n * export const action = async ({ request }: ActionFunctionArgs) => {\n * const { topic, shop, session, payload } = await authenticate.webhook(request);\n * \n * // Webhook requests can trigger after an app is uninstalled\n * // If the app is already uninstalled, the session may be undefined.\n * if (!session) {\n * throw new Response();\n * }\n * \n * // Handle the webhook\n * console.log(`${TOPIC} webhook received with payload:`, JSON.stringify(payload))\n *\n * throw new Response();\n * };\n * ```\n * \n * @example\n * <caption>Registering app-specific webhooks (Recommended)</caption>\n * ```toml\n * # shopify.app.toml\n * [webhooks]\n * api_version = \"2024-07\"\n\n * [[webhooks.subscriptions]]\n * topics = [\"products/create\"]\n * uri = \"/webhooks/products/create\"\n * \n * ```\n * \n * @example\n * <caption>Registering shop-specific webhooks.</caption>\n * <description>In many cases you won't need this. Please see: [https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-vs-shop-specific-subscriptions](https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-vs-shop-specific-subscriptions)\n * </description>\n * ```ts\n * // app/shopify.server.ts\n * import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * webhooks: {\n * PRODUCTS_CREATE: {\n * deliveryMethod: DeliveryMethod.Http,\n * callbackUrl: \"/webhooks/products/create\",\n * },\n * },\n * hooks: {\n * afterAuth: async ({ session }) => {\n * // Register webhooks for the shop\n * // In this example, every shop will have these webhooks\n * // You could wrap this in some custom shop specific conditional logic if needed\n * shopify.registerWebhooks({ session });\n * },\n * },\n * // ...etc\n * });\n * ```\n */\n webhook: AuthenticateWebhook<string>;\n}\n\nexport interface ShopifyAppBase<Config extends AppConfigArg> {\n /**\n * The `SessionStorage` instance you passed in as a config option.\n *\n * @example\n * <caption>Storing sessions with Prisma.</caption>\n * <description>Import the `@shopify/shopify-app-session-storage-prisma` package to store sessions in your Prisma database.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n * import { PrismaSessionStorage } from \"@shopify/shopify-app-session-storage-prisma\";\n * import prisma from \"~/db.server\";\n *\n * const shopify = shopifyApp({\n * sessionStorage: new PrismaSessionStorage(prisma),\n * // ...etc\n * })\n *\n * // shopify.sessionStorage is an instance of PrismaSessionStorage\n * ```\n */\n sessionStorage?: SessionStorageType<Config>;\n\n /**\n * Adds the required Content Security Policy headers for Shopify apps to the given Headers object.\n *\n * {@link https://shopify.dev/docs/apps/store/security/iframe-protection}\n *\n * @example\n * <caption>Return headers on all requests.</caption>\n * <description>Add headers to all HTML requests by calling `shopify.addDocumentResponseHeaders` in `entry.server.tsx`.</description>\n *\n * ```\n * // ~/shopify.server.ts\n * import { shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * export const addDocumentResponseheaders = shopify.addDocumentResponseheaders;\n * ```\n *\n * ```ts\n * // entry.server.tsx\n * import { addDocumentResponseHeaders } from \"~/shopify.server\";\n *\n * export default function handleRequest(\n * request: Request,\n * responseStatusCode: number,\n * responseHeaders: Headers,\n * remixContext: EntryContext\n * ) {\n * const markup = renderToString(\n * <RemixServer context={remixContext} url={request.url} />\n * );\n *\n * responseHeaders.set(\"Content-Type\", \"text/html\");\n * addDocumentResponseHeaders(request, responseHeaders);\n *\n * return new Response(\"<!DOCTYPE html>\" + markup, {\n * status: responseStatusCode,\n * headers: responseHeaders,\n * });\n * }\n * ```\n */\n addDocumentResponseHeaders: AddDocumentResponseHeaders;\n\n /**\n * Register shop-specific webhook subscriptions using the Admin GraphQL API.\n *\n * In many cases defining app-specific webhooks in the `shopify.app.toml` will be sufficient and easier to manage. Please see:\n *\n * {@link https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-vs-shop-specific-subscriptions}\n *\n * You should only use this if you need shop-specific webhooks.\n *\n * @example\n * <caption>Registering shop-specific webhooks after install</caption>\n * <description>Trigger the registration to create the shop-specific webhook subscriptions after a merchant installs your app using the `afterAuth` hook. Learn more about [subscribing to webhooks.](https://shopify.dev/docs/api/shopify-app-remix/v3/guide-webhooks)</description>\n * ```ts\n * // app/shopify.server.ts\n * import { DeliveryMethod, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * webhooks: {\n * PRODUCTS_CREATE: {\n * deliveryMethod: DeliveryMethod.Http,\n * callbackUrl: \"/webhooks/products/create\",\n * },\n * },\n * hooks: {\n * afterAuth: async ({ session }) => {\n * // Register webhooks for the shop\n * // In this example, every shop will have these webhooks\n * // You could wrap this in some custom shop specific conditional logic if needed\n * shopify.registerWebhooks({ session });\n * },\n * },\n * // ...etc\n * });\n * ```\n */\n registerWebhooks: RegisterWebhooks;\n\n /**\n * Ways to authenticate requests from different surfaces across Shopify.\n *\n * @example\n * <caption>Authenticate Shopify requests.</caption>\n * <description>Use the functions in `authenticate` to validate requests coming from Shopify.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { ApiVersion, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * ```\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import shopify from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const {admin, session, sessionToken, billing} = shopify.authenticate.admin(request);\n * const response = admin.graphql(`{ shop { name } }`)\n *\n * return json(await response.json());\n * }\n * ```\n */\n authenticate: Authenticate<Config>;\n\n /**\n * Ways to get Contexts from requests that do not originate from Shopify.\n *\n * @example\n * <caption>Using unauthenticated contexts.</caption>\n * <description>Create contexts for requests that don't come from Shopify.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { ApiVersion, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * ```\n * ```ts\n * // /app/routes/**\\/*.jsx\n * import { LoaderFunctionArgs, json } from \"@remix-run/node\";\n * import { authenticateExternal } from \"~/helpers/authenticate\"\n * import shopify from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const shop = await authenticateExternal(request)\n * const {admin} = await shopify.unauthenticated.admin(shop);\n * const response = admin.graphql(`{ shop { currencyCode } }`)\n *\n * return json(await response.json());\n * }\n * ```\n */\n unauthenticated: Unauthenticated;\n}\n\nexport interface ShopifyAppLogin {\n /**\n * Log a merchant in, and redirect them to the app root. Will redirect the merchant to authentication if a shop is\n * present in the URL search parameters or form data.\n *\n * This function won't be present when the `distribution` config option is set to `AppDistribution.ShopifyAdmin`,\n * because Admin apps aren't allowed to show a login page.\n *\n * @example\n * <caption>Creating a login page.</caption>\n * <description>Use `shopify.login` to create a login form, in a route that can handle GET and POST requests.</description>\n * ```ts\n * // /app/shopify.server.ts\n * import { ApiVersion, shopifyApp } from \"@shopify/shopify-app-remix/server\";\n *\n * const shopify = shopifyApp({\n * // ...etc\n * });\n * export default shopify;\n * ```\n * ```ts\n * // /app/routes/auth/login.tsx\n * import shopify from \"../../shopify.server\";\n *\n * export async function loader({ request }: LoaderFunctionArgs) {\n * const errors = shopify.login(request);\n *\n * return json(errors);\n * }\n *\n * export async function action({ request }: ActionFunctionArgs) {\n * const errors = shopify.login(request);\n *\n * return json(errors);\n * }\n *\n * export default function Auth() {\n * const actionData = useActionData<typeof action>();\n * const [shop, setShop] = useState(\"\");\n *\n * return (\n * <Page>\n * <Card>\n * <Form method=\"post\">\n * <FormLayout>\n * <Text variant=\"headingMd\" as=\"h2\">\n * Login\n * </Text>\n * <TextField\n * type=\"text\"\n * name=\"shop\"\n * label=\"Shop domain\"\n * helpText=\"e.g: my-shop-domain.myshopify.com\"\n * value={shop}\n * onChange={setShop}\n * autoComplete=\"on\"\n * error={actionData?.errors.shop}\n * />\n * <Button submit primary>\n * Submit\n * </Button>\n * </FormLayout>\n * </Form>\n * </Card>\n * </Page>\n * );\n * }\n * ```\n */\n login: Login;\n}\n\nexport type AdminApp<Config extends AppConfigArg> = ShopifyAppBase<Config>;\nexport type SingleMerchantApp<Config extends AppConfigArg> =\n ShopifyAppBase<Config> & ShopifyAppLogin;\nexport type AppStoreApp<Config extends AppConfigArg> = ShopifyAppBase<Config> &\n ShopifyAppLogin;\n\ntype EnforceSessionStorage<Config extends AppConfigArg, Base> = Base & {\n sessionStorage: SessionStorageType<Config>;\n};\n\n/**\n * An object your app can use to interact with Shopify.\n *\n * By default, the app's distribution is `AppStore`.\n */\nexport type ShopifyApp<Config extends AppConfigArg> =\n Config['distribution'] extends AppDistribution.ShopifyAdmin\n ? AdminApp<Config>\n : Config['distribution'] extends AppDistribution.SingleMerchant\n ? EnforceSessionStorage<Config, SingleMerchantApp<Config>>\n : Config['distribution'] extends AppDistribution.AppStore\n ? EnforceSessionStorage<Config, AppStoreApp<Config>>\n : EnforceSessionStorage<Config, AppStoreApp<Config>>;\n"],"names":[],"mappings":"AA2BA;AACA;IACY;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,WAAsB;AACtB,IAAA,eAAA,CAAA,gBAAA,CAAA,GAAA,iBAAkC;AAClC,IAAA,eAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAChC,CAAC,EAJW,eAAe,KAAf,eAAe,GAAA,EAAA,CAAA,CAAA;IAUf;AAAZ,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,cAA4B;AAC5B,IAAA,cAAA,CAAA,aAAA,CAAA,GAAA,cAA4B;AAC9B,CAAC,EAHW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.mjs","sources":["../../../../../../src/server/unauthenticated/admin/factory.ts"],"sourcesContent":["import {ShopifyRestResources} from '@shopify/shopify-api';\n\nimport {AppConfigArg} from '../../config-types';\nimport {createOrLoadOfflineSession} from '../../authenticate/helpers/create-or-load-offline-session';\nimport {SessionNotFoundError} from '../../errors';\nimport {BasicParams} from '../../types';\nimport {adminClientFactory} from '../../clients/admin';\n\nimport {UnauthenticatedAdminContext} from './types';\n\nexport function unauthenticatedAdminContextFactory<\n ConfigArg extends AppConfigArg,\n Resources extends ShopifyRestResources,\n>(params: BasicParams) {\n return async (\n shop: string,\n ): Promise<UnauthenticatedAdminContext<ConfigArg, Resources>> => {\n const session = await createOrLoadOfflineSession(shop, params);\n\n if (!session) {\n throw new SessionNotFoundError(\n `Could not find a session for shop ${shop} when creating unauthenticated admin context`,\n );\n }\n\n return {\n session,\n admin: adminClientFactory<ConfigArg, Resources>({params, session}),\n };\n };\n}\n"],"names":[],"mappings":";;;;AAUM,SAAU,kCAAkC,CAGhD,MAAmB,EAAA;AACnB,IAAA,OAAO,OACL,IAAY,KACkD;QAC9D,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,IAAI,EAAE,MAAM,CAAC;QAE9D,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,MAAM,IAAI,oBAAoB,CAC5B,qCAAqC,IAAI,CAAA,4CAAA,CAA8C,CACxF;QACH;QAEA,OAAO;YACL,OAAO;YACP,KAAK,EAAE,kBAAkB,CAAuB,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC;SACnE;AACH,IAAA,CAAC;AACH;;;;"}
1
+ {"version":3,"file":"factory.mjs","sources":["../../../../../../src/server/unauthenticated/admin/factory.ts"],"sourcesContent":["import {createOrLoadOfflineSession} from '../../authenticate/helpers/create-or-load-offline-session';\nimport {SessionNotFoundError} from '../../errors';\nimport {BasicParams} from '../../types';\nimport {adminClientFactory} from '../../clients/admin';\n\nimport {UnauthenticatedAdminContext} from './types';\n\nexport function unauthenticatedAdminContextFactory(params: BasicParams) {\n return async (shop: string): Promise<UnauthenticatedAdminContext> => {\n const session = await createOrLoadOfflineSession(shop, params);\n\n if (!session) {\n throw new SessionNotFoundError(\n `Could not find a session for shop ${shop} when creating unauthenticated admin context`,\n );\n }\n\n return {\n session,\n admin: adminClientFactory({params, session}),\n };\n };\n}\n"],"names":[],"mappings":";;;;AAOM,SAAU,kCAAkC,CAAC,MAAmB,EAAA;AACpE,IAAA,OAAO,OAAO,IAAY,KAA0C;QAClE,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,IAAI,EAAE,MAAM,CAAC;QAE9D,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,MAAM,IAAI,oBAAoB,CAC5B,qCAAqC,IAAI,CAAA,4CAAA,CAA8C,CACxF;QACH;QAEA,OAAO;YACL,OAAO;YACP,KAAK,EAAE,kBAAkB,CAAC,EAAC,MAAM,EAAE,OAAO,EAAC,CAAC;SAC7C;AACH,IAAA,CAAC;AACH;;;;"}
@@ -1,4 +1,4 @@
1
- const SHOPIFY_REMIX_LIBRARY_VERSION = '3.8.5';
1
+ const SHOPIFY_REMIX_LIBRARY_VERSION = '4.0.1';
2
2
 
3
3
  export { SHOPIFY_REMIX_LIBRARY_VERSION };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../../src/server/version.ts"],"sourcesContent":["export const SHOPIFY_REMIX_LIBRARY_VERSION = '3.8.5';\n"],"names":[],"mappings":"AAAO,MAAM,6BAA6B,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../../src/server/version.ts"],"sourcesContent":["export const SHOPIFY_REMIX_LIBRARY_VERSION = '4.0.1';\n"],"names":[],"mappings":"AAAO,MAAM,6BAA6B,GAAG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppProvider.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/AppProvider/AppProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,IAAI,uBAAuB,EAC5C,MAAM,kBAAkB,CAAC;AAS1B,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,eAAe,GAAG,MAAM,CAAC;IAC/D;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACvC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAsBlD"}
1
+ {"version":3,"file":"AppProvider.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/AppProvider/AppProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,IAAI,uBAAuB,EAC5C,MAAM,kBAAkB,CAAC;AAW1B,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,uBAAuB,EAAE,eAAe,GAAG,MAAM,CAAC;IAC/D;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACvC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAuClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.admin.doc.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/admin/authenticate.admin.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BA+CX,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"authenticate.admin.doc.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/admin/authenticate.admin.doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,QAAA,MAAM,IAAI,EAAE,6BA8CX,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,4 +1,4 @@
1
- import { JwtPayload, ShopifyRestResources } from '@shopify/shopify-api';
1
+ import { JwtPayload } from '@shopify/shopify-api';
2
2
  import type { BasicParams } from '../../types';
3
3
  import type { AppConfigArg } from '../../config-types';
4
4
  import type { AuthenticateAdmin } from './types';
@@ -12,6 +12,6 @@ export interface SessionTokenContext {
12
12
  interface AuthStrategyParams extends BasicParams {
13
13
  strategy: AuthorizationStrategy;
14
14
  }
15
- export declare function authStrategyFactory<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources>({ strategy, ...params }: AuthStrategyParams): AuthenticateAdmin<ConfigArg, Resources>;
15
+ export declare function authStrategyFactory<ConfigArg extends AppConfigArg>({ strategy, ...params }: AuthStrategyParams): AuthenticateAdmin<ConfigArg>;
16
16
  export {};
17
17
  //# sourceMappingURL=authenticate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/admin/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAW,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE/E,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAmBrD,OAAO,KAAK,EAEV,iBAAiB,EAGlB,MAAM,SAAS,CAAC;AASjB,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAGzD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,UAAU,kBAAmB,SAAQ,WAAW;IAC9C,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,wBAAgB,mBAAmB,CACjC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,EAC7D,EACA,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,kBAAkB,GAAG,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC,CAwI9D"}
1
+ {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/admin/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAU,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAmBrD,OAAO,KAAK,EAEV,iBAAiB,EAGlB,MAAM,SAAS,CAAC;AASjB,OAAO,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAGzD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,UAAU,kBAAmB,SAAQ,WAAW;IAC9C,QAAQ,EAAE,qBAAqB,CAAC;CACjC;AAED,wBAAgB,mBAAmB,CAAC,SAAS,SAAS,YAAY,EAAE,EAClE,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,kBAAkB,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAwInD"}
@@ -1,5 +1,4 @@
1
1
  import { AppSubscription, BillingCheckParams, BillingCheckResponseObject, BillingRequestParams, UsageRecord } from '@shopify/shopify-api';
2
- import { ApiFutureFlags } from '../../../future/flags';
3
2
  import type { AppConfigArg } from '../../../config-types';
4
3
  export interface RequireBillingOptions<Config extends AppConfigArg> extends Omit<BillingCheckParams, 'session' | 'plans' | 'returnObject'> {
5
4
  /**
@@ -17,7 +16,7 @@ export interface CheckBillingOptions<Config extends AppConfigArg> extends Omit<B
17
16
  */
18
17
  plans?: (keyof Config['billing'])[];
19
18
  }
20
- export interface RequestBillingOptions<Config extends AppConfigArg> extends Omit<BillingRequestParams<ApiFutureFlags<Config['future']>>, 'session' | 'plan' | 'returnObject'> {
19
+ export interface RequestBillingOptions<Config extends AppConfigArg> extends Omit<BillingRequestParams, 'session' | 'plan' | 'returnObject'> {
21
20
  /**
22
21
  * The plan to request. Must be one of the values defined in the `billing` config option.
23
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sour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Session, ShopifyRestResources } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../../config-types';
1
+ import { Session } from '@shopify/shopify-api';
3
2
  import type { BasicParams } from '../../../types';
4
3
  import { AdminApiContext, HandleAdminClientError } from '../../../clients/admin';
5
- export declare function createAdminApiContext<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources>(session: Session, params: BasicParams, handleClientError: HandleAdminClientError): AdminApiContext<ConfigArg, Resources>;
4
+ export declare function createAdminApiContext(session: Session, params: BasicParams, handleClientError: HandleAdminClientError): AdminApiContext;
6
5
  //# sourceMappingURL=create-admin-api-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-admin-api-context.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/helpers/create-admin-api-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,qBAAqB,CACnC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,EAE7D,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,iBAAiB,EAAE,sBAAsB,GACxC,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAMvC"}
1
+ {"version":3,"file":"create-admin-api-context.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/helpers/create-admin-api-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,iBAAiB,EAAE,sBAAsB,GACxC,eAAe,CAMjB"}
@@ -1,6 +1,5 @@
1
- import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
- import type { AppConfigArg } from '../../../config-types';
1
+ import { Session } from '@shopify/shopify-api';
3
2
  import type { BasicParams } from '../../../types';
4
3
  import { AuthorizationStrategy } from '../strategies/types';
5
- export declare function triggerAfterAuthHook<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources>(params: BasicParams, session: Session, request: Request, authStrategy: AuthorizationStrategy): Promise<void>;
4
+ export declare function triggerAfterAuthHook(params: BasicParams, session: Session, request: Request, authStrategy: AuthorizationStrategy): Promise<void>;
6
5
  //# sourceMappingURL=trigger-after-auth-hook.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trigger-after-auth-hook.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/helpers/trigger-after-auth-hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAI1D,wBAAsB,oBAAoB,CACxC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,EAE7D,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,qBAAqB,iBAiBpC"}
1
+ {"version":3,"file":"trigger-after-auth-hook.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/helpers/trigger-after-auth-hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAI1D,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,qBAAqB,iBAiBpC"}
@@ -1,4 +1,3 @@
1
- import { AppConfigArg } from '../../../../config-types';
2
1
  import { AdminApiContext } from '../../../../clients';
3
2
  export interface FetchScopesDetailResponse {
4
3
  app: {
@@ -15,5 +14,5 @@ export interface FetchScopesDetailResponse {
15
14
  };
16
15
  };
17
16
  }
18
- export declare function fetchScopeDetail<ConfigArg extends AppConfigArg>(admin: AdminApiContext<ConfigArg>): Promise<FetchScopesDetailResponse>;
17
+ export declare function fetchScopeDetail(admin: AdminApiContext): Promise<FetchScopesDetailResponse>;
19
18
  //# sourceMappingURL=fetch-scopes-details.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-scopes-details.d.ts","sourceRoot":"","sources":["../../../../../../../src/server/authenticate/admin/scope/client/fetch-scopes-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE;QACH,qBAAqB,EAAE;YACrB,MAAM,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;QACJ,oBAAoB,EAAE;YACpB,MAAM,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;QACJ,YAAY,EAAE;YACZ,YAAY,EAAE;gBACZ,MAAM,EAAE,MAAM,CAAC;aAChB,EAAE,CAAC;SACL,CAAC;KACH,CAAC;CACH;AAmBD,wBAAsB,gBAAgB,CAAC,SAAS,SAAS,YAAY,EACnE,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAKpC"}
1
+ {"version":3,"file":"fetch-scopes-details.d.ts","sourceRoot":"","sources":["../../../../../../../src/server/authenticate/admin/scope/client/fetch-scopes-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE;QACH,qBAAqB,EAAE;YACrB,MAAM,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;QACJ,oBAAoB,EAAE;YACpB,MAAM,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;QACJ,YAAY,EAAE;YACZ,YAAY,EAAE;gBACZ,MAAM,EAAE,MAAM,CAAC;aAChB,EAAE,CAAC;SACL,CAAC;KACH,CAAC;CACH;AAmBD,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,yBAAyB,CAAC,CAKpC"}
@@ -1,4 +1,3 @@
1
- import { AppConfigArg } from '../../../../config-types';
2
1
  import { AdminApiContext } from '../../../../clients';
3
2
  export interface RevokeScopesResponse {
4
3
  revoked: {
@@ -9,5 +8,5 @@ export interface RevokeScopesResponse {
9
8
  message: string;
10
9
  }[];
11
10
  }
12
- export declare function revokeScopes<ConfigArg extends AppConfigArg>(admin: AdminApiContext<ConfigArg>, scopes: string[]): Promise<RevokeScopesResponse>;
11
+ export declare function revokeScopes(admin: AdminApiContext, scopes: string[]): Promise<RevokeScopesResponse>;
13
12
  //# sourceMappingURL=revoke-scopes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"revoke-scopes.d.ts","sourceRoot":"","sources":["../../../../../../../src/server/authenticate/admin/scope/client/revoke-scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL;AAeD,wBAAsB,YAAY,CAAC,SAAS,SAAS,YAAY,EAC/D,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,EACjC,MAAM,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,oBAAoB,CAAC,CAS/B"}
1
+ {"version":3,"file":"revoke-scopes.d.ts","sourceRoot":"","sources":["../../../../../../../src/server/authenticate/admin/scope/client/revoke-scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL;AAeD,wBAAsB,YAAY,CAChC,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,oBAAoB,CAAC,CAS/B"}
@@ -1,7 +1,6 @@
1
1
  import { Session } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../../config-types';
3
2
  import { BasicParams } from '../../../types';
4
3
  import { AdminApiContext } from '../../../clients';
5
4
  import { ScopesApiContext } from './types';
6
- export declare function scopesApiFactory<ConfigArg extends AppConfigArg>(params: BasicParams, session: Session, admin: AdminApiContext<ConfigArg>): ScopesApiContext;
5
+ export declare function scopesApiFactory(params: BasicParams, session: Session, admin: AdminApiContext): ScopesApiContext;
7
6
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAKzC,wBAAgB,gBAAgB,CAAC,SAAS,SAAS,YAAY,EAC7D,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,GAChC,gBAAgB,CAMlB"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAKzC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,GACrB,gBAAgB,CAMlB"}
@@ -1,9 +1,8 @@
1
1
  import { Session } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../../config-types';
3
2
  import { AdminApiContext } from '../../../clients';
4
3
  import type { BasicParams } from '../../../types';
5
4
  import { ScopesDetail } from './types';
6
5
  import { FetchScopesDetailResponse } from './client/fetch-scopes-details';
7
- export declare function queryScopesFactory<ConfigArg extends AppConfigArg>(params: BasicParams, session: Session, admin: AdminApiContext<ConfigArg>): () => Promise<ScopesDetail>;
6
+ export declare function queryScopesFactory(params: BasicParams, session: Session, admin: AdminApiContext): () => Promise<ScopesDetail>;
8
7
  export declare function mapFetchScopeDetail(scopesDetailResponse: FetchScopesDetailResponse): ScopesDetail;
9
8
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,yBAAyB,EAE1B,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,kBAAkB,CAAC,SAAS,SAAS,YAAY,EAC/D,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,+BAYlC;AAED,wBAAgB,mBAAmB,CACjC,oBAAoB,EAAE,yBAAyB,GAC9C,YAAY,CAoBd"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AACrC,OAAO,EACL,yBAAyB,EAE1B,MAAM,+BAA+B,CAAC;AAEvC,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,+BAYvB;AAED,wBAAgB,mBAAmB,CACjC,oBAAoB,EAAE,yBAAyB,GAC9C,YAAY,CAoBd"}
@@ -1,6 +1,5 @@
1
1
  import { Session } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../../config-types';
3
2
  import type { BasicParams } from '../../../types';
4
3
  import { AdminApiContext } from '../../../clients';
5
- export declare function requestScopesFactory<ConfigArg extends AppConfigArg>(params: BasicParams, session: Session, admin: AdminApiContext<ConfigArg>): (scopes: string[]) => Promise<void>;
4
+ export declare function requestScopesFactory(params: BasicParams, session: Session, admin: AdminApiContext): (scopes: string[]) => Promise<void>;
6
5
  //# sourceMappingURL=request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAIjD,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,YAAY,EACjE,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,IAEG,QAAQ,MAAM,EAAE,mBAqBrD"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAIjD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,IAEc,QAAQ,MAAM,EAAE,mBAkBrD"}
@@ -1,8 +1,7 @@
1
1
  import { Session } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../../config-types';
3
2
  import { AdminApiContext } from '../../../clients';
4
3
  import type { BasicParams } from '../../../types';
5
- export declare function revokeScopesFactory<ConfigArg extends AppConfigArg>(params: BasicParams, session: Session, admin: AdminApiContext<ConfigArg>): (scopes: string[]) => Promise<{
4
+ export declare function revokeScopesFactory(params: BasicParams, session: Session, admin: AdminApiContext): (scopes: string[]) => Promise<{
6
5
  revoked: string[];
7
6
  }>;
8
7
  //# sourceMappingURL=revoke.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"revoke.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/revoke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,wBAAgB,mBAAmB,CAAC,SAAS,SAAS,YAAY,EAChE,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,IAEJ,QAAQ,MAAM,EAAE;;GA6B9C"}
1
+ {"version":3,"file":"revoke.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/scope/revoke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,eAAe,IAEO,QAAQ,MAAM,EAAE;;GA6B9C"}
@@ -1,11 +1,11 @@
1
- import { Session, Shopify, ShopifyRestResources } from '@shopify/shopify-api';
1
+ import { Session, Shopify } from '@shopify/shopify-api';
2
2
  import type { BasicParams } from '../../../types';
3
3
  import { AppConfig, AppConfigArg } from '../../../config-types';
4
4
  import { HandleAdminClientError } from '../../../clients';
5
5
  import type { ApiConfigWithFutureFlags, ApiFutureFlags } from '../../../future/flags';
6
6
  import { AuthorizationStrategy, SessionContext } from './types';
7
- export declare class AuthCodeFlowStrategy<Config extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> implements AuthorizationStrategy {
8
- protected api: Shopify<ApiConfigWithFutureFlags<Config['future']>, ShopifyRestResources, ApiFutureFlags<Config['future']>>;
7
+ export declare class AuthCodeFlowStrategy<Config extends AppConfigArg> implements AuthorizationStrategy {
8
+ protected api: Shopify<ApiConfigWithFutureFlags<Config['future']>, ApiFutureFlags<Config['future']>>;
9
9
  protected config: AppConfig;
10
10
  protected logger: Shopify['logger'];
11
11
  constructor({ api, config, logger }: BasicParams);
@@ -1 +1 @@
1
- {"version":3,"file":"auth-code-flow.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/strategies/auth-code-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,OAAO,EACP,OAAO,EACP,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAUhD,OAAO,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAC,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAC,qBAAqB,EAAE,cAAc,EAAiB,MAAM,SAAS,CAAC;AAE9E,qBAAa,oBAAoB,CAC/B,MAAM,SAAS,YAAY,EAC3B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,CAC7D,YAAW,qBAAqB;IAEhC,SAAS,CAAC,GAAG,EAAE,O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AAqB;IAEhC,SAAS,CAAC,GAAG,EAAE,OAAO,CACpB,wBAAwB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAC1C,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CACjC,CAAC;IAEF,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAEjB,EAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAC,EAAE,WAAW;IAMxC,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IA0B/D,YAAY,CACvB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;IAqBpB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,sBAAsB;YAgBpD,qBAAqB;YAiDrB,sBAAsB;YAoBtB,yBAAyB;YAyCzB,iBAAiB;YAOjB,iBAAiB;YAIjB,mBAAmB;YAYnB,WAAW;YAgBX,kBAAkB;YA4BlB,2BAA2B;CAwC1C"}
@@ -1,11 +1,11 @@
1
- import { Session, Shopify, ShopifyRestResources } from '@shopify/shopify-api';
1
+ import { Session, Shopify } from '@shopify/shopify-api';
2
2
  import { AppConfig, AppConfigArg } from '../../../config-types';
3
3
  import { BasicParams } from '../../../types';
4
4
  import { ApiConfigWithFutureFlags, ApiFutureFlags } from '../../../future/flags';
5
5
  import { HandleAdminClientError } from '../../../clients';
6
6
  import { AuthorizationStrategy, SessionContext } from './types';
7
7
  export declare class MerchantCustomAuth<Config extends AppConfigArg> implements AuthorizationStrategy {
8
- protected api: Shopify<ApiConfigWithFutureFlags<Config['future']>, ShopifyRestResources, ApiFutureFlags<Config['future']>>;
8
+ protected api: Shopify<ApiConfigWithFutureFlags<Config['future']>, ApiFutureFlags<Config['future']>>;
9
9
  protected config: AppConfig;
10
10
  protected logger: Shopify['logger'];
11
11
  constructor({ api, config, logger }: BasicParams<Config['future']>);
@@ -1 +1 @@
1
- {"version":3,"file":"merchant-custom-app.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/strategies/merchant-custom-app.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,OAAO,EAEP,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,wBAAwB,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAC,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AAIxD,OAAO,EAAC,qBAAqB,EAAkB,cAAc,EAAC,MAAM,SAAS,CAAC;AAE9E,qBAAa,kBAAkB,CAAC,MAAM,SAAS,YAAY,CACzD,YAAW,qBAAqB;IAEhC,SAAS,CAAC,GAAG,EAAE,OAAO,CACpB,wBAAwB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAC1C,oBAAoB,EACpB,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CACjC,CAAC;IAEF,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAEjB,EAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAC,EAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM1D,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvD,YAAY,CACvB,QAAQ,EAAE,OAAO,EACjB,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;IAYpB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,sBAAsB;CAenE"}
1
+ {"version":3,"file":"merchant-custom-app.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/strategies/merchant-custom-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,OAAO,EAAe,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,wBAAwB,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAC,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AAIxD,OAAO,EAAC,qBAAqB,EAAkB,cAAc,EAAC,MAAM,SAAS,CAAC;AAE9E,qBAAa,kBAAkB,CAAC,MAAM,SAAS,YAAY,CACzD,YAAW,qBAAqB;IAEhC,SAAS,CAAC,GAAG,EAAE,OAAO,CACpB,wBAAwB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAC1C,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CACjC,CAAC;IAEF,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAEjB,EAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAC,EAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM1D,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvD,YAAY,CACvB,QAAQ,EAAE,OAAO,EACjB,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;IAYpB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,sBAAsB;CAenE"}
@@ -1,11 +1,11 @@
1
- import { Session, Shopify, ShopifyRestResources } from '@shopify/shopify-api';
1
+ import { Session, Shopify } from '@shopify/shopify-api';
2
2
  import { AppConfig, AppConfigArg } from '../../../config-types';
3
3
  import { BasicParams } from '../../../types';
4
4
  import { HandleAdminClientError } from '../../../clients';
5
5
  import type { ApiConfigWithFutureFlags, ApiFutureFlags } from '../../../future/flags';
6
6
  import { AuthorizationStrategy, SessionContext } from './types';
7
7
  export declare class TokenExchangeStrategy<Config extends AppConfigArg> implements AuthorizationStrategy {
8
- protected api: Shopify<ApiConfigWithFutureFlags<Config['future']>, ShopifyRestResources, ApiFutureFlags<Config['future']>>;
8
+ protected api: Shopify<ApiConfigWithFutureFlags<Config['future']>, ApiFutureFlags<Config['future']>>;
9
9
  protected config: AppConfig;
10
10
  protected logger: Shopify['logger'];
11
11
  constructor({ api, config, logger }: BasicParams<Config['future']>);
@@ -1 +1 @@
1
- {"version":3,"file":"token-exchange.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/admin/strategies/token-exchange.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,OAAO,EACP,OAAO,EACP,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,SAAS,EAAE,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAO3C,OAAO,EAAC,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EACV,wBAAwB,EACxB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAC,qBAAqB,EAAE,cAAc,EAAiB,MAAM,SAAS,CAAC;AAE9E,qBAAa,qBAAqB,CAAC,MAAM,SAAS,YAAY,CAC5D,YAAW,qBAAqB;IAEhC,SAAS,CAAC,GAAG,EAAE,OAAO,CACpB,wBAAwB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAC1C,oBAAoB,EACpB,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CACjC,CAAC;IAEF,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,MAAM,E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E,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM1D,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAExD,YAAY,CACvB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,OAAO,CAAC;IA8DZ,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,sBAAsB;YAoBpD,aAAa;YAwCb,mBAAmB;CAclC"}
@@ -1,11 +1,11 @@
1
- import { JwtPayload, Session, ShopifyRestResources } from '@shopify/shopify-api';
1
+ import { JwtPayload, Session } from '@shopify/shopify-api';
2
2
  import { EnsureCORSFunction } from '../helpers/ensure-cors-headers';
3
3
  import type { AppConfigArg } from '../../config-types';
4
4
  import type { AdminApiContext } from '../../clients';
5
5
  import type { BillingContext } from './billing/types';
6
6
  import { RedirectFunction } from './helpers/redirect';
7
7
  import { ScopesApiContext } from './scope/types';
8
- interface AdminContextInternal<Config extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> {
8
+ interface AdminContextInternal<Config extends AppConfigArg> {
9
9
  /**
10
10
  * The session for the user who made the request.
11
11
  *
@@ -66,9 +66,9 @@ interface AdminContextInternal<Config extends AppConfigArg, Resources extends Sh
66
66
  */
67
67
  session: Session;
68
68
  /**
69
- * Methods for interacting with the GraphQL / REST Admin APIs for the store that made the request.
69
+ * Methods for interacting with the GraphQL Admin API for the store that made the request.
70
70
  */
71
- admin: AdminApiContext<Config, Resources>;
71
+ admin: AdminApiContext;
72
72
  /**
73
73
  * Billing methods for this store, based on the plans defined in the `billing` config option.
74
74
  *
@@ -95,7 +95,7 @@ interface AdminContextInternal<Config extends AppConfigArg, Resources extends Sh
95
95
  */
96
96
  cors: EnsureCORSFunction;
97
97
  }
98
- export interface EmbeddedAdminContext<Config extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> extends AdminContextInternal<Config, Resources> {
98
+ export interface EmbeddedAdminContext<Config extends AppConfigArg> extends AdminContextInternal<Config> {
99
99
  /**
100
100
  * The decoded and validated session token for the request.
101
101
  *
@@ -182,16 +182,16 @@ export interface EmbeddedAdminContext<Config extends AppConfigArg, Resources ext
182
182
  */
183
183
  redirect: RedirectFunction;
184
184
  }
185
- export interface NonEmbeddedAdminContext<Config extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> extends AdminContextInternal<Config, Resources> {
185
+ export interface NonEmbeddedAdminContext<Config extends AppConfigArg> extends AdminContextInternal<Config> {
186
186
  }
187
- type EmbeddedTypedAdminContext<Config extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = Config['isEmbeddedApp'] extends false ? NonEmbeddedAdminContext<Config, Resources> : EmbeddedAdminContext<Config, Resources>;
187
+ type EmbeddedTypedAdminContext<Config extends AppConfigArg> = Config['isEmbeddedApp'] extends false ? NonEmbeddedAdminContext<Config> : EmbeddedAdminContext<Config>;
188
188
  export interface ScopesContext {
189
189
  /**
190
190
  * Methods to manage scopes for the store that made the request.
191
191
  */
192
192
  scopes: ScopesApiContext;
193
193
  }
194
- export type AdminContext<Config extends AppConfigArg, Resources extends ShopifyRestResources> = EmbeddedTypedAdminContext<Config, Resources> & ScopesContext;
195
- export type AuthenticateAdmin<Config extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = (request: Request) => Promise<AdminContext<Config, Resources>>;
194
+ export type AdminContext<Config extends AppConfigArg> = EmbeddedTypedAdminContext<Config> & ScopesContext;
195
+ export type AuthenticateAdmin<Config extends AppConfigArg> = (request: Request) => Promise<AdminContext<Config>>;
196
196
  export {};
197
197
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAC,kBAAkB,EAAC,MAAM,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H,KAAK,EAAE,eAAe,CAAC;IAEvB;;;;OAIG;IACH,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAEhC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB,CAAC,MAAM,SAAS,YAAY,CAC/D,SAAQ,oBAAoB,CAAC,MAAM,CAAC;IACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,YAAY,EAAE,UAAU,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AACD,MAAM,WAAW,uBAAuB,CAAC,MAAM,SAAS,YAAY,CAClE,SAAQ,oBAAoB,CAAC,MAAM,CAAC;CAAG;AAEzC,KAAK,yBAAyB,CAAC,MAAM,SAAS,YAAY,IACxD,MAAM,CAAC,eAAe,CAAC,SAAS,KAAK,GACjC,uBAAuB,CAAC,MAAM,CAAC,GAC/B,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEnC,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,MAAM,YAAY,CAAC,MAAM,SAAS,YAAY,IAClD,yBAAyB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC;AAEpD,MAAM,MAAM,iBAAiB,CAAC,MAAM,SAAS,YAAY,IAAI,CAC3D,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC"}
@@ -1,6 +1,4 @@
1
- import { ShopifyRestResources } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../config-types';
3
1
  import { BasicParams } from '../../types';
4
2
  import type { AuthenticateFlow } from './types';
5
- export declare function authenticateFlowFactory<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources>(params: BasicParams): AuthenticateFlow<ConfigArg, Resources>;
3
+ export declare function authenticateFlowFactory(params: BasicParams): AuthenticateFlow;
6
4
  //# sourceMappingURL=authenticate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/flow/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,EAAC,gBAAgB,EAAc,MAAM,SAAS,CAAC;AAE3D,wBAAgB,uBAAuB,CACrC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,EAC7D,MAAM,EAAE,WAAW,GAAG,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CA6D7D"}
1
+ {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/flow/authenticate.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,EAAC,gBAAgB,EAAc,MAAM,SAAS,CAAC;AAE3D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CA2D7E"}
@@ -1,7 +1,6 @@
1
- import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../config-types';
1
+ import { Session } from '@shopify/shopify-api';
3
2
  import type { AdminApiContext } from '../../clients';
4
- export interface FlowContext<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> {
3
+ export interface FlowContext {
5
4
  /**
6
5
  * A session with an offline token for the shop.
7
6
  *
@@ -76,7 +75,7 @@ export interface FlowContext<ConfigArg extends AppConfigArg, Resources extends S
76
75
  * }
77
76
  * ```
78
77
  */
79
- admin: AdminApiContext<ConfigArg, Resources>;
78
+ admin: AdminApiContext;
80
79
  }
81
- export type AuthenticateFlow<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = (request: Request) => Promise<FlowContext<ConfigArg, Resources>>;
80
+ export type AuthenticateFlow = (request: Request) => Promise<FlowContext>;
82
81
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/flow/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,WAAW,CAC1B,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB;IAE7D;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,EAAE,GAAG,CAAC;IAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,KAAK,EAAE,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CAC9C;AAED,MAAM,MAAM,gBAAgB,CAC1B,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,IAC3D,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,WAAW,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/flow/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,EAAE,GAAG,CAAC;IAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,KAAK,EAAE,eAAe,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC"}
@@ -1,6 +1,4 @@
1
- import { ShopifyRestResources } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../config-types';
3
1
  import { BasicParams } from '../../types';
4
2
  import type { AuthenticateFulfillmentService } from './types';
5
- export declare function authenticateFulfillmentServiceFactory<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources>(params: BasicParams): AuthenticateFulfillmentService<ConfigArg, Resources>;
3
+ export declare function authenticateFulfillmentServiceFactory(params: BasicParams): AuthenticateFulfillmentService;
6
4
  //# sourceMappingURL=authenticate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/fulfillment-service/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAgB,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAGxC,OAAO,KAAK,EACV,8BAA8B,EAE/B,MAAM,SAAS,CAAC;AAEjB,wBAAgB,qCAAqC,CACnD,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,EAC7D,MAAM,EAAE,WAAW,GAAG,8BAA8B,CAAC,SAAS,EAAE,SAAS,CAAC,CAoE3E"}
1
+ {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/fulfillment-service/authenticate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAGxC,OAAO,KAAK,EACV,8BAA8B,EAE/B,MAAM,SAAS,CAAC;AAEjB,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,WAAW,GAClB,8BAA8B,CAoEhC"}
@@ -1,10 +1,9 @@
1
- import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
- import { AppConfigArg } from '../../config-types';
1
+ import { Session } from '@shopify/shopify-api';
3
2
  import type { AdminApiContext } from '../../clients';
4
3
  export type FulfillmentServicePayload = Record<string, any> & {
5
4
  kind: string;
6
5
  };
7
- export interface FulfillmentServiceContext<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> {
6
+ export interface FulfillmentServiceContext {
8
7
  /**
9
8
  * A session with an offline token for the shop.
10
9
  *
@@ -49,7 +48,7 @@ export interface FulfillmentServiceContext<ConfigArg extends AppConfigArg, Resou
49
48
  * }
50
49
  * ```
51
50
  */
52
- admin: AdminApiContext<ConfigArg, Resources>;
51
+ admin: AdminApiContext;
53
52
  /**
54
53
  * The payload from the fulfillment service request.
55
54
  *
@@ -73,5 +72,5 @@ export interface FulfillmentServiceContext<ConfigArg extends AppConfigArg, Resou
73
72
  */
74
73
  payload: FulfillmentServicePayload;
75
74
  }
76
- export type AuthenticateFulfillmentService<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = (request: Request) => Promise<FulfillmentServiceContext<ConfigArg, Resources>>;
75
+ export type AuthenticateFulfillmentService = (request: Request) => Promise<FulfillmentServiceContext>;
77
76
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/fulfillment-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5D,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,yBAAyB,CACxC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB;IAE7D;;;;;;;;;;;;;;;;;;;;SAoBK;IACL,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,EAAE,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,MAAM,MAAM,8BAA8B,CACxC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,IAC3D,CACF,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,yBAAyB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/fulfillment-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5D,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACxC;;;;;;;;;;;;;;;;;;;;SAoBK;IACL,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,MAAM,MAAM,8BAA8B,GAAG,CAC3C,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,yBAAyB,CAAC,CAAC"}