@shopify/shopify-app-remix 3.4.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/cjs/server/authenticate/admin/authenticate.js +4 -7
  2. package/dist/cjs/server/authenticate/admin/authenticate.js.map +1 -1
  3. package/dist/cjs/server/authenticate/admin/helpers/create-admin-api-context.js.map +1 -1
  4. package/dist/cjs/server/authenticate/admin/helpers/trigger-after-auth-hook.js +2 -1
  5. package/dist/cjs/server/authenticate/admin/helpers/trigger-after-auth-hook.js.map +1 -1
  6. package/dist/cjs/server/authenticate/admin/scope/client/fetch-scopes-details.js.map +1 -1
  7. package/dist/cjs/server/authenticate/admin/scope/client/revoke-scopes.js.map +1 -1
  8. package/dist/cjs/server/authenticate/admin/scope/factory.js.map +1 -1
  9. package/dist/cjs/server/authenticate/admin/scope/query.js.map +1 -1
  10. package/dist/cjs/server/authenticate/admin/scope/request.js.map +1 -1
  11. package/dist/cjs/server/authenticate/admin/scope/revoke.js.map +1 -1
  12. package/dist/cjs/server/authenticate/admin/strategies/merchant-custom-app.js.map +1 -1
  13. package/dist/cjs/server/authenticate/flow/authenticate.js.map +1 -1
  14. package/dist/cjs/server/authenticate/fulfillment-service/authenticate.js.map +1 -1
  15. package/dist/cjs/server/authenticate/helpers/respond-to-invalid-session-token.js.map +1 -1
  16. package/dist/cjs/server/authenticate/public/appProxy/authenticate.js.map +1 -1
  17. package/dist/cjs/server/authenticate/public/customer-account/authenticate.js.map +1 -1
  18. package/dist/cjs/server/authenticate/public/extension/authenticate.js.map +1 -1
  19. package/dist/cjs/server/authenticate/public/factory.js.map +1 -1
  20. package/dist/cjs/server/authenticate/webhooks/authenticate.js.map +1 -1
  21. package/dist/cjs/server/clients/admin/factory.js +5 -0
  22. package/dist/cjs/server/clients/admin/factory.js.map +1 -1
  23. package/dist/cjs/server/clients/admin/rest.js +8 -0
  24. package/dist/cjs/server/clients/admin/rest.js.map +1 -1
  25. package/dist/cjs/server/future/flags.js +0 -3
  26. package/dist/cjs/server/future/flags.js.map +1 -1
  27. package/dist/cjs/server/shopify-app.js.map +1 -1
  28. package/dist/cjs/server/unauthenticated/admin/factory.js.map +1 -1
  29. package/dist/cjs/server/version.js +1 -1
  30. package/dist/esm/server/authenticate/admin/authenticate.mjs +4 -7
  31. package/dist/esm/server/authenticate/admin/authenticate.mjs.map +1 -1
  32. package/dist/esm/server/authenticate/admin/helpers/create-admin-api-context.mjs.map +1 -1
  33. package/dist/esm/server/authenticate/admin/helpers/trigger-after-auth-hook.mjs +2 -1
  34. package/dist/esm/server/authenticate/admin/helpers/trigger-after-auth-hook.mjs.map +1 -1
  35. package/dist/esm/server/authenticate/admin/scope/client/fetch-scopes-details.mjs.map +1 -1
  36. package/dist/esm/server/authenticate/admin/scope/client/revoke-scopes.mjs.map +1 -1
  37. package/dist/esm/server/authenticate/admin/scope/factory.mjs.map +1 -1
  38. package/dist/esm/server/authenticate/admin/scope/query.mjs.map +1 -1
  39. package/dist/esm/server/authenticate/admin/scope/request.mjs.map +1 -1
  40. package/dist/esm/server/authenticate/admin/scope/revoke.mjs.map +1 -1
  41. package/dist/esm/server/authenticate/admin/strategies/merchant-custom-app.mjs.map +1 -1
  42. package/dist/esm/server/authenticate/flow/authenticate.mjs.map +1 -1
  43. package/dist/esm/server/authenticate/fulfillment-service/authenticate.mjs.map +1 -1
  44. package/dist/esm/server/authenticate/helpers/respond-to-invalid-session-token.mjs.map +1 -1
  45. package/dist/esm/server/authenticate/public/appProxy/authenticate.mjs.map +1 -1
  46. package/dist/esm/server/authenticate/public/customer-account/authenticate.mjs.map +1 -1
  47. package/dist/esm/server/authenticate/public/extension/authenticate.mjs.map +1 -1
  48. package/dist/esm/server/authenticate/public/factory.mjs.map +1 -1
  49. package/dist/esm/server/authenticate/webhooks/authenticate.mjs.map +1 -1
  50. package/dist/esm/server/clients/admin/factory.mjs +5 -0
  51. package/dist/esm/server/clients/admin/factory.mjs.map +1 -1
  52. package/dist/esm/server/clients/admin/rest.mjs +8 -0
  53. package/dist/esm/server/clients/admin/rest.mjs.map +1 -1
  54. package/dist/esm/server/future/flags.mjs +0 -3
  55. package/dist/esm/server/future/flags.mjs.map +1 -1
  56. package/dist/esm/server/shopify-app.mjs.map +1 -1
  57. package/dist/esm/server/unauthenticated/admin/factory.mjs.map +1 -1
  58. package/dist/esm/server/version.mjs +1 -1
  59. package/dist/ts/server/authenticate/admin/authenticate.admin.doc.d.ts.map +1 -1
  60. package/dist/ts/server/authenticate/admin/authenticate.d.ts.map +1 -1
  61. package/dist/ts/server/authenticate/admin/helpers/create-admin-api-context.d.ts +2 -1
  62. package/dist/ts/server/authenticate/admin/helpers/create-admin-api-context.d.ts.map +1 -1
  63. package/dist/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.d.ts +2 -1
  64. package/dist/ts/server/authenticate/admin/helpers/trigger-after-auth-hook.d.ts.map +1 -1
  65. package/dist/ts/server/authenticate/admin/scope/authenticate.admin.scopes.doc.d.ts +4 -0
  66. package/dist/ts/server/authenticate/admin/scope/authenticate.admin.scopes.doc.d.ts.map +1 -0
  67. package/dist/ts/server/authenticate/admin/scope/client/fetch-scopes-details.d.ts +2 -1
  68. package/dist/ts/server/authenticate/admin/scope/client/fetch-scopes-details.d.ts.map +1 -1
  69. package/dist/ts/server/authenticate/admin/scope/client/revoke-scopes.d.ts +2 -1
  70. package/dist/ts/server/authenticate/admin/scope/client/revoke-scopes.d.ts.map +1 -1
  71. package/dist/ts/server/authenticate/admin/scope/factory.d.ts +2 -1
  72. package/dist/ts/server/authenticate/admin/scope/factory.d.ts.map +1 -1
  73. package/dist/ts/server/authenticate/admin/scope/query.d.ts +2 -1
  74. package/dist/ts/server/authenticate/admin/scope/query.d.ts.map +1 -1
  75. package/dist/ts/server/authenticate/admin/scope/request.d.ts +2 -1
  76. package/dist/ts/server/authenticate/admin/scope/request.d.ts.map +1 -1
  77. package/dist/ts/server/authenticate/admin/scope/revoke.d.ts +2 -1
  78. package/dist/ts/server/authenticate/admin/scope/revoke.d.ts.map +1 -1
  79. package/dist/ts/server/authenticate/admin/scope/types.d.ts +148 -8
  80. package/dist/ts/server/authenticate/admin/scope/types.d.ts.map +1 -1
  81. package/dist/ts/server/authenticate/admin/strategies/merchant-custom-app.d.ts +4 -4
  82. package/dist/ts/server/authenticate/admin/strategies/merchant-custom-app.d.ts.map +1 -1
  83. package/dist/ts/server/authenticate/admin/types.d.ts +3 -4
  84. package/dist/ts/server/authenticate/admin/types.d.ts.map +1 -1
  85. package/dist/ts/server/authenticate/flow/authenticate.d.ts +2 -1
  86. package/dist/ts/server/authenticate/flow/authenticate.d.ts.map +1 -1
  87. package/dist/ts/server/authenticate/flow/types.d.ts +6 -6
  88. package/dist/ts/server/authenticate/flow/types.d.ts.map +1 -1
  89. package/dist/ts/server/authenticate/fulfillment-service/authenticate.d.ts +2 -1
  90. package/dist/ts/server/authenticate/fulfillment-service/authenticate.d.ts.map +1 -1
  91. package/dist/ts/server/authenticate/fulfillment-service/types.d.ts +11 -44
  92. package/dist/ts/server/authenticate/fulfillment-service/types.d.ts.map +1 -1
  93. package/dist/ts/server/authenticate/helpers/respond-to-invalid-session-token.d.ts +1 -1
  94. package/dist/ts/server/authenticate/helpers/respond-to-invalid-session-token.d.ts.map +1 -1
  95. package/dist/ts/server/authenticate/public/appProxy/authenticate.d.ts +2 -1
  96. package/dist/ts/server/authenticate/public/appProxy/authenticate.d.ts.map +1 -1
  97. package/dist/ts/server/authenticate/public/appProxy/types.d.ts +5 -4
  98. package/dist/ts/server/authenticate/public/appProxy/types.d.ts.map +1 -1
  99. package/dist/ts/server/authenticate/public/customer-account/authenticate.d.ts +1 -1
  100. package/dist/ts/server/authenticate/public/customer-account/authenticate.d.ts.map +1 -1
  101. package/dist/ts/server/authenticate/public/extension/authenticate.d.ts +1 -1
  102. package/dist/ts/server/authenticate/public/extension/authenticate.d.ts.map +1 -1
  103. package/dist/ts/server/authenticate/public/factory.d.ts +2 -1
  104. package/dist/ts/server/authenticate/public/factory.d.ts.map +1 -1
  105. package/dist/ts/server/authenticate/public/types.d.ts +4 -3
  106. package/dist/ts/server/authenticate/public/types.d.ts.map +1 -1
  107. package/dist/ts/server/authenticate/webhooks/authenticate.d.ts +2 -1
  108. package/dist/ts/server/authenticate/webhooks/authenticate.d.ts.map +1 -1
  109. package/dist/ts/server/authenticate/webhooks/types.d.ts +5 -4
  110. package/dist/ts/server/authenticate/webhooks/types.d.ts.map +1 -1
  111. package/dist/ts/server/clients/admin/factory.d.ts +2 -1
  112. package/dist/ts/server/clients/admin/factory.d.ts.map +1 -1
  113. package/dist/ts/server/clients/admin/rest.d.ts +8 -0
  114. package/dist/ts/server/clients/admin/rest.d.ts.map +1 -1
  115. package/dist/ts/server/clients/admin/types.d.ts +109 -102
  116. package/dist/ts/server/clients/admin/types.d.ts.map +1 -1
  117. package/dist/ts/server/config-types.d.ts +5 -5
  118. package/dist/ts/server/config-types.d.ts.map +1 -1
  119. package/dist/ts/server/future/flags.d.ts +15 -2
  120. package/dist/ts/server/future/flags.d.ts.map +1 -1
  121. package/dist/ts/server/shopify-app.d.ts.map +1 -1
  122. package/dist/ts/server/types-contexts.d.ts +8 -8
  123. package/dist/ts/server/types-contexts.d.ts.map +1 -1
  124. package/dist/ts/server/types.d.ts +21 -39
  125. package/dist/ts/server/types.d.ts.map +1 -1
  126. package/dist/ts/server/unauthenticated/admin/factory.d.ts +2 -1
  127. package/dist/ts/server/unauthenticated/admin/factory.d.ts.map +1 -1
  128. package/dist/ts/server/unauthenticated/admin/types.d.ts +4 -40
  129. package/dist/ts/server/unauthenticated/admin/types.d.ts.map +1 -1
  130. package/dist/ts/server/unauthenticated/types.d.ts +5 -5
  131. package/dist/ts/server/unauthenticated/types.d.ts.map +1 -1
  132. package/dist/ts/server/version.d.ts +1 -1
  133. package/dist/tsconfig.build.tsbuildinfo +1 -1
  134. package/package.json +5 -5
@@ -1,26 +1,26 @@
1
1
  import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
+ import { AppConfigArg } from '../../config-types';
2
3
  import type { AdminApiContext } from '../../clients';
3
4
  export type FulfillmentServicePayload = Record<string, any> & {
4
5
  kind: string;
5
6
  };
6
- export interface FulfillmentServiceContext<Resources extends ShopifyRestResources = ShopifyRestResources> {
7
+ export interface FulfillmentServiceContext<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> {
7
8
  /**
8
9
  * A session with an offline token for the shop.
9
10
  *
10
11
  * Returned only if there is a session for the shop.
11
12
  * @example
12
13
  * <caption>Shopify session for the fulfillment service notification request.</caption>
13
- * <description>Use the session associated with this request to use REST resources.</description>
14
+ * <description>Use the session associated with this request.</description>
14
15
  * ```ts
15
16
  * // /app/routes/fulfillment_service_notification.tsx
16
17
  * import { ActionFunctionArgs } from "@remix-run/node";
17
18
  * import { authenticate } from "../shopify.server";
18
19
  *
19
- * export const action = async ({ request }: ActionFunctionArgs) => {
20
+ * export const action = async ({ request }: ActionFunctionArgs) => {
20
21
  * const { session, admin } = await authenticate.fulfillmentService(request);
21
22
  *
22
- * const products = await admin?.rest.resources.Product.all({ session });
23
- * // Use products
23
+ * console.log(session.id)
24
24
  *
25
25
  * return new Response();
26
26
  * };
@@ -41,48 +41,15 @@ export interface FulfillmentServiceContext<Resources extends ShopifyRestResource
41
41
  * import { authenticate } from "../shopify.server";
42
42
  *
43
43
  * export async function action({ request }: ActionFunctionArgs) {
44
- * const { admin } = await authenticate.fulfillmentService(request);
45
- * const response = await admin?.graphql(
46
- * `#graphql
47
- * query {
48
- * shop {
49
- * assignedFulfillmentOrders(first: 10, assignmentStatus: FULFILLMENT_REQUESTED) {
50
- * edges {
51
- * node {
52
- * id
53
- * destination {
54
- * firstName
55
- * lastName
56
- * }
57
- * lineItems(first: 10) {
58
- * edges {
59
- * node {
60
- * id
61
- * productTitle
62
- * sku
63
- * remainingQuantity
64
- * }
65
- * }
66
- * }
67
- * merchantRequests(first: 10, kind: FULFILLMENT_REQUEST) {
68
- * edges {
69
- * node {
70
- * message
71
- * }
72
- * }
73
- * }
74
- * }
75
- * }
76
- * }
77
- * }
78
- * }`);
44
+ * const { admin, session } = await authenticate.fulfillmentService(request);
79
45
  *
80
- * const fulfillments = await response.json();
81
- * return json({ data: fulfillments.data });
46
+ * console.log(session.id)
47
+ *
48
+ * return new Response();
82
49
  * }
83
50
  * ```
84
51
  */
85
- admin: AdminApiContext<Resources>;
52
+ admin: AdminApiContext<ConfigArg, Resources>;
86
53
  /**
87
54
  * The payload from the fulfillment service request.
88
55
  *
@@ -106,5 +73,5 @@ export interface FulfillmentServiceContext<Resources extends ShopifyRestResource
106
73
  */
107
74
  payload: FulfillmentServicePayload;
108
75
  }
109
- export type AuthenticateFulfillmentService<Resources extends ShopifyRestResources = ShopifyRestResources> = (request: Request) => Promise<FulfillmentServiceContext<Resources>>;
76
+ export type AuthenticateFulfillmentService<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = (request: Request) => Promise<FulfillmentServiceContext<ConfigArg, Resources>>;
110
77
  //# 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,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,oBAAoB,GAAG,oBAAoB;IAE7D;;;;;;;;;;;;;;;;;;;;;SAqBK;IACL,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsDG;IACH,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,MAAM,MAAM,8BAA8B,CACxC,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,IAC3D,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,yBAAyB,CAAC,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,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,4 +1,4 @@
1
- import { BasicParams } from 'src/server/types';
1
+ import { BasicParams } from '../../types';
2
2
  interface RespondToInvalidSessionTokenParams {
3
3
  params: BasicParams;
4
4
  request: Request;
@@ -1 +1 @@
1
- {"version":3,"file":"respond-to-invalid-session-token.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/helpers/respond-to-invalid-session-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAK7C,UAAU,kCAAkC;IAC1C,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,OAAO,EACP,YAAoB,GACrB,EAAE,kCAAkC,SAapC"}
1
+ {"version":3,"file":"respond-to-invalid-session-token.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/helpers/respond-to-invalid-session-token.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAExC,UAAU,kCAAkC;IAC1C,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,OAAO,EACP,YAAoB,GACrB,EAAE,kCAAkC,SAapC"}
@@ -1,5 +1,6 @@
1
1
  import { ShopifyRestResources } from '@shopify/shopify-api';
2
+ import { AppConfigArg } from '../../../config-types';
2
3
  import { BasicParams } from '../../../types';
3
4
  import { AuthenticateAppProxy } from './types';
4
- export declare function authenticateAppProxyFactory<Resources extends ShopifyRestResources>(params: BasicParams): AuthenticateAppProxy;
5
+ export declare function authenticateAppProxyFactory<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources>(params: BasicParams): AuthenticateAppProxy<ConfigArg, Resources>;
5
6
  //# sourceMappingURL=authenticate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/appProxy/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAGL,oBAAoB,EAErB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,2BAA2B,CACzC,SAAS,SAAS,oBAAoB,EACtC,MAAM,EAAE,WAAW,GAAG,oBAAoB,CA+C3C"}
1
+ {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/appProxy/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAGL,oBAAoB,EAErB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,2BAA2B,CACzC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,EACtC,MAAM,EAAE,WAAW,GAAG,oBAAoB,CAAC,SAAS,EAAE,SAAS,CAAC,CAiDjE"}
@@ -1,6 +1,7 @@
1
1
  import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
+ import { AppConfigArg } from '../../../config-types';
2
3
  import { AdminApiContext, StorefrontContext } from '../../../clients';
3
- export type AuthenticateAppProxy = (request: Request) => Promise<AppProxyContext | AppProxyContextWithSession>;
4
+ export type AuthenticateAppProxy<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = (request: Request) => Promise<AppProxyContext | AppProxyContextWithSession<ConfigArg, Resources>>;
4
5
  interface Options {
5
6
  /**
6
7
  * Whether to use the shop's theme layout around the Liquid content.
@@ -98,7 +99,7 @@ export interface AppProxyContext extends Context {
98
99
  */
99
100
  storefront: undefined;
100
101
  }
101
- export interface AppProxyContextWithSession<Resources extends ShopifyRestResources = ShopifyRestResources> extends Context {
102
+ export interface AppProxyContextWithSession<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> extends Context {
102
103
  /**
103
104
  * The session for the shop that made the request.
104
105
  *
@@ -133,7 +134,7 @@ export interface AppProxyContextWithSession<Resources extends ShopifyRestResourc
133
134
  *
134
135
  * @example
135
136
  * <caption>Interacting with the Admin API.</caption>
136
- * <description>Use the `admin` object to interact with the REST or GraphQL APIs.</description>
137
+ * <description>Use the `admin` object to interact with the admin GraphQL API.</description>
137
138
  * ```ts
138
139
  * // app/routes/**\/.ts
139
140
  * import { json } from "@remix-run/node";
@@ -163,7 +164,7 @@ export interface AppProxyContextWithSession<Resources extends ShopifyRestResourc
163
164
  * }
164
165
  * ```
165
166
  */
166
- admin: AdminApiContext<Resources>;
167
+ admin: AdminApiContext<ConfigArg, Resources>;
167
168
  /**
168
169
  * Method for interacting with the Shopify Storefront Graphql API for the store that made the request.
169
170
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/appProxy/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,eAAe,GAAG,0BAA0B,CAAC,CAAC;AAE3D,UAAU,OAAO;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,sBAAsB,GAAG,CACnC,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,YAAY,GAAG,OAAO,CAAC,KAC/C,QAAQ,CAAC;AAEd,UAAU,OAAO;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoEG;IACH,MAAM,EAAE,sBAAsB,CAAC;CAChC;AAED,MAAM,WAAW,eAAgB,SAAQ,OAAO;IAC9C;;;;OAIG;IACH,OAAO,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,UAAU,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B,CACzC,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,CAC7D,SAAQ,OAAO;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,UAAU,EAAE,iBAAiB,CAAC;CAC/B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/appProxy/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAEpE,MAAM,MAAM,oBAAoB,CAC9B,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,IAC3D,CACF,OAAO,EAAE,OAAO,KACb,OAAO,CACV,eAAe,GAAG,0BAA0B,CAAC,SAAS,EAAE,SAAS,CAAC,CACnE,CAAC;AAEF,UAAU,OAAO;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,sBAAsB,GAAG,CACnC,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,YAAY,GAAG,OAAO,CAAC,KAC/C,QAAQ,CAAC;AAEd,UAAU,OAAO;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoEG;IACH,MAAM,EAAE,sBAAsB,CAAC;CAChC;AAED,MAAM,WAAW,eAAgB,SAAQ,OAAO;IAC9C;;;;OAIG;IACH,OAAO,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,UAAU,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,0BAA0B,CACzC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,CAC7D,SAAQ,OAAO;IACf;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,KAAK,EAAE,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,UAAU,EAAE,iBAAiB,CAAC;CAC/B"}
@@ -1,4 +1,4 @@
1
- import { BasicParams } from 'src/server/types';
1
+ import { BasicParams } from '../../../types';
2
2
  import { AuthenticateCustomerAccount } from './types';
3
3
  export declare function authenticateCustomerAccountFactory(params: BasicParams): AuthenticateCustomerAccount;
4
4
  //# sourceMappingURL=authenticate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/customer-account/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAI7C,OAAO,EAAC,2BAA2B,EAAC,MAAM,SAAS,CAAC;AAEpD,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,WAAW,GAClB,2BAA2B,CAK7B"}
1
+ {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/customer-account/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAC,2BAA2B,EAAC,MAAM,SAAS,CAAC;AAEpD,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,WAAW,GAClB,2BAA2B,CAK7B"}
@@ -1,4 +1,4 @@
1
- import { BasicParams } from 'src/server/types';
1
+ import { BasicParams } from '../../../types';
2
2
  import { AuthenticateExtension } from './types';
3
3
  export declare function authenticateExtensionFactory(params: BasicParams, requestType: string): AuthenticateExtension;
4
4
  //# sourceMappingURL=authenticate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/extension/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAU7C,OAAO,EAAC,qBAAqB,EAAmB,MAAM,SAAS,CAAC;AAEhE,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,GAClB,qBAAqB,CAkCvB"}
1
+ {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../../src/server/authenticate/public/extension/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAS3C,OAAO,EAAC,qBAAqB,EAAmB,MAAM,SAAS,CAAC;AAEhE,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,GAClB,qBAAqB,CAkCvB"}
@@ -1,5 +1,6 @@
1
1
  import { ShopifyRestResources } from '@shopify/shopify-api';
2
+ import { AppConfigArg } from '../../config-types';
2
3
  import { BasicParams } from '../../types';
3
4
  import { AuthenticatePublic } from './types';
4
- export declare function authenticatePublicFactory<Resources extends ShopifyRestResources>(params: BasicParams): AuthenticatePublic;
5
+ export declare function authenticatePublicFactory<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources>(params: BasicParams): AuthenticatePublic<ConfigArg>;
5
6
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/public/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAKxC,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAE3C,wBAAgB,yBAAyB,CACvC,SAAS,SAAS,oBAAoB,EACtC,MAAM,EAAE,WAAW,sBAapB"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/public/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAKxC,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAE3C,wBAAgB,yBAAyB,CACvC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,EACtC,MAAM,EAAE,WAAW,iCAgBpB"}
@@ -1,7 +1,8 @@
1
+ import type { AppConfigArg } from '../../config-types';
1
2
  import type { AuthenticateCheckout } from './checkout/types';
2
3
  import type { AuthenticateAppProxy } from './appProxy/types';
3
- import { AuthenticateCustomerAccount } from './customer-account/types';
4
- export interface AuthenticatePublic {
4
+ import type { AuthenticateCustomerAccount } from './customer-account/types';
5
+ export interface AuthenticatePublic<Config extends AppConfigArg> {
5
6
  /**
6
7
  * Authenticate a request from a checkout extension
7
8
  *
@@ -44,7 +45,7 @@ export interface AuthenticatePublic {
44
45
  * };
45
46
  * ```
46
47
  */
47
- appProxy: AuthenticateAppProxy;
48
+ appProxy: AuthenticateAppProxy<Config>;
48
49
  /**
49
50
  * Authenticate a request from a customer account extension
50
51
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/public/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAC,2BAA2B,EAAC,MAAM,0BAA0B,CAAC;AAOrE,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,EAAE,oBAAoB,CAAC;IAE/B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,EAAE,oBAAoB,CAAC;IAE/B;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,EAAE,2BAA2B,CAAC;CAC9C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/public/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAC,2BAA2B,EAAC,MAAM,0BAA0B,CAAC;AAO1E,MAAM,WAAW,kBAAkB,CAAC,MAAM,SAAS,YAAY;IAC7D;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,EAAE,oBAAoB,CAAC;IAE/B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAEvC;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,EAAE,2BAA2B,CAAC;CAC9C"}
@@ -1,5 +1,6 @@
1
1
  import { ShopifyRestResources } from '@shopify/shopify-api';
2
+ import { AppConfigArg } from '../../config-types';
2
3
  import type { BasicParams } from '../../types';
3
4
  import type { AuthenticateWebhook } from './types';
4
- export declare function authenticateWebhookFactory<Resources extends ShopifyRestResources, Topics extends string>(params: BasicParams): AuthenticateWebhook<Resources, Topics>;
5
+ export declare function authenticateWebhookFactory<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources, Topics extends string>(params: BasicParams): AuthenticateWebhook<ConfigArg, Resources, Topics>;
5
6
  //# sourceMappingURL=authenticate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/webhooks/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAK7C,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,0BAA0B,CACxC,SAAS,SAAS,oBAAoB,EACtC,MAAM,SAAS,MAAM,EACrB,MAAM,EAAE,WAAW,GAAG,mBAAmB,CAAC,SAAS,EAAE,MAAM,CAAC,CAgE7D"}
1
+ {"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/webhooks/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAK7C,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,0BAA0B,CACxC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,EACtC,MAAM,SAAS,MAAM,EACrB,MAAM,EAAE,WAAW,GAAG,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAgExE"}
@@ -1,4 +1,5 @@
1
1
  import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
+ import { AppConfigArg } from '../../config-types';
2
3
  import type { AdminApiContext } from '../../clients';
3
4
  export interface RegisterWebhooksOptions {
4
5
  /**
@@ -128,7 +129,7 @@ export interface WebhookContextWithoutSession<Topics = string | number | symbol>
128
129
  session: undefined;
129
130
  admin: undefined;
130
131
  }
131
- export interface WebhookContextWithSession<Resources extends ShopifyRestResources, Topics = string | number | symbol> extends Context<Topics> {
132
+ export interface WebhookContextWithSession<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources, Topics = string | number | symbol> extends Context<Topics> {
132
133
  /**
133
134
  * A session with an offline token for the shop.
134
135
  *
@@ -200,9 +201,9 @@ export interface WebhookContextWithSession<Resources extends ShopifyRestResource
200
201
  * }
201
202
  * ```
202
203
  */
203
- admin: AdminApiContext<Resources>;
204
+ admin: AdminApiContext<ConfigArg, Resources>;
204
205
  }
205
- export type WebhookContext<Resources extends ShopifyRestResources, Topics = string | number | symbol> = WebhookContextWithoutSession<Topics> | WebhookContextWithSession<Resources, Topics>;
206
- export type AuthenticateWebhook<Resources extends ShopifyRestResources, Topics = string | number | symbol> = (request: Request) => Promise<WebhookContext<Resources, Topics>>;
206
+ export type WebhookContext<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources, Topics = string | number | symbol> = WebhookContextWithoutSession<Topics> | WebhookContextWithSession<ConfigArg, Resources, Topics>;
207
+ export type AuthenticateWebhook<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources, Topics = string | number | symbol> = (request: Request) => Promise<WebhookContext<ConfigArg, Resources, Topics>>;
207
208
  export {};
208
209
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/authenticate/webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EA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IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB,CACxC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,EACtC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CACjC,SAAQ,OAAO,CAAC,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,EAAE,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CAC9C;AAED,MAAM,MAAM,cAAc,CACxB,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,EACtC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAE/B,4BAA4B,CAAC,MAAM,CAAC,GACpC,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAE5D,MAAM,MAAM,mBAAmB,CAC7B,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,EACtC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAC/B,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
+ import type { AppConfigArg } from '../../config-types';
2
3
  import { BasicParams } from '../../types';
3
4
  import type { AdminApiContext } from './types';
4
5
  interface RestClientOptions {
@@ -6,6 +7,6 @@ interface RestClientOptions {
6
7
  session: Session;
7
8
  handleClientError?: (error: any) => Promise<void>;
8
9
  }
9
- export declare function adminClientFactory<Resources extends ShopifyRestResources = ShopifyRestResources>({ params, handleClientError, session, }: RestClientOptions): AdminApiContext<Resources>;
10
+ export declare function adminClientFactory<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources>({ params, handleClientError, session, }: RestClientOptions): AdminApiContext<ConfigArg, Resources>;
10
11
  export {};
11
12
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAIxC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAE7C,UAAU,iBAAiB;IACzB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AAED,wBAAgB,kBAAkB,CAChC,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,EAC7D,EACA,MAAM,EACN,iBAAiB,EACjB,OAAO,GACR,EAAE,iBAAiB,GAAG,eAAe,CAAC,SAAS,CAAC,CAShD"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AAEnE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAIxC,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAE7C,UAAU,iBAAiB;IACzB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AAED,wBAAgB,kBAAkB,CAChC,SAAS,SAAS,YAAY,EAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,EAC7D,EACA,MAAM,EACN,iBAAiB,EACjB,OAAO,GACR,EAAE,iBAAiB,GAAG,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAe3D"}
@@ -11,18 +11,26 @@ declare class RemixRestClient {
11
11
  constructor({ params, session, handleClientError }: AdminClientOptions);
12
12
  /**
13
13
  * Performs a GET request on the given path.
14
+ *
15
+ * @deprecated In a future major release REST will be removed from this package. Please see [all-in on graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql).
14
16
  */
15
17
  get(params: GetRequestParams): Promise<Response>;
16
18
  /**
17
19
  * Performs a POST request on the given path.
20
+ *
21
+ * @deprecated In a future major release REST will be removed from this package. Please see [all-in on graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql).
18
22
  */
19
23
  post(params: PostRequestParams): Promise<Response>;
20
24
  /**
21
25
  * Performs a PUT request on the given path.
26
+ *
27
+ * @deprecated In a future major release REST will be removed from this package. Please see [all-in on graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql).
22
28
  */
23
29
  put(params: PutRequestParams): Promise<Response>;
24
30
  /**
25
31
  * Performs a DELETE request on the given path.
32
+ *
33
+ * @deprecated In a future major release REST will be removed from this package. Please see [all-in on graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql).
26
34
  */
27
35
  delete(params: DeleteRequestParams): Promise<Response>;
28
36
  protected makeRequest(params: RequestParams): Promise<Response>;
@@ -1 +1 @@
1
- {"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,OAAO,EAEP,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAC,kBAAkB,EAAC,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,MAAM,EACN,iBAAiB,EACjB,OAAO,GACR,EAAE,kBAAkB,GAAG,uBAAuB,CAAC,SAAS,CAAC,CA+BzD;AAED,cAAM,eAAe;IACZ,OAAO,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,iBAAiB,CAA0C;gBAEvD,EAAC,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAC,EAAE,kBAAkB;IAMpE;;;;OAIG;IACU,GAAG,CAAC,MAAM,EAAE,gBAAgB;IAOzC;;;;OAIG;IACU,IAAI,CAAC,MAAM,EAAE,iBAAiB;IAO3C;;;;OAIG;IACU,GAAG,CAAC,MAAM,EAAE,gBAAgB;IAOzC;;;;OAIG;IACU,MAAM,CAAC,MAAM,EAAE,mBAAmB;cAO/B,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;CAwBtE"}
@@ -1,5 +1,7 @@
1
- import { Session, ShopifyRestResources } from '@shopify/shopify-api';
2
1
  import { AdminOperations } from '@shopify/admin-api-client';
2
+ import { Session, ShopifyRestResources } from '@shopify/shopify-api';
3
+ import type { AppConfigArg } from '../../config-types';
4
+ import type { FeatureEnabled } from '../../future/flags';
3
5
  import { BasicParams } from '../../types';
4
6
  import { GraphQLClient } from '../types';
5
7
  import type { RestClientWithResources } from './rest';
@@ -13,10 +15,115 @@ export type HandleAdminClientError = (arg: {
13
15
  params: BasicParams;
14
16
  session: Session;
15
17
  }) => Promise<void>;
16
- export interface AdminApiContext<Resources extends ShopifyRestResources = ShopifyRestResources> {
18
+ export type AdminApiContext<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> = FeatureEnabled<ConfigArg['future'], 'removeRest'> extends true ? AdminApiContextWithoutRest : AdminApiContextWithRest<Resources>;
19
+ export interface AdminApiContextWithoutRest {
20
+ /**
21
+ * Methods for interacting with the Shopify Admin GraphQL API
22
+ *
23
+ * {@link https://shopify.dev/docs/api/admin-graphql}
24
+ * {@link https://github.com/Shopify/shopify-app-js/blob/main/packages/apps/shopify-api/docs/reference/clients/Graphql.md}
25
+ *
26
+ * @example
27
+ * <caption>Querying the GraphQL API.</caption>
28
+ * <description>Use `admin.graphql` to make query / mutation requests.</description>
29
+ * ```ts
30
+ * // /app/routes/**\/*.ts
31
+ * import { ActionFunctionArgs } from "@remix-run/node";
32
+ * import { authenticate } from "../shopify.server";
33
+ *
34
+ * export const action = async ({ request }: ActionFunctionArgs) => {
35
+ * const { admin } = await authenticate.admin(request);
36
+ *
37
+ * const response = await admin.graphql(
38
+ * `#graphql
39
+ * mutation populateProduct($input: ProductInput!) {
40
+ * productCreate(input: $input) {
41
+ * product {
42
+ * id
43
+ * }
44
+ * }
45
+ * }`,
46
+ * {
47
+ * variables: {
48
+ * input: { title: "Product Name" },
49
+ * },
50
+ * },
51
+ * );
52
+ *
53
+ * const productData = await response.json();
54
+ * return json({
55
+ * productId: productData.data?.productCreate?.product?.id,
56
+ * });
57
+ * }
58
+ * ```
59
+ *
60
+ * ```ts
61
+ * // /app/shopify.server.ts
62
+ * import { shopifyApp } from "@shopify/shopify-app-remix/server";
63
+ *
64
+ * const shopify = shopifyApp({
65
+ * // ...
66
+ * });
67
+ * export default shopify;
68
+ * export const authenticate = shopify.authenticate;
69
+ * ```
70
+ *
71
+ * @example
72
+ * <caption>Handling GraphQL errors.</caption>
73
+ * <description>Catch `GraphqlQueryError` errors to see error messages from the API.</description>
74
+ * ```ts
75
+ * // /app/routes/**\/*.ts
76
+ * import { ActionFunctionArgs } from "@remix-run/node";
77
+ * import { authenticate } from "../shopify.server";
78
+ *
79
+ * export const action = async ({ request }: ActionFunctionArgs) => {
80
+ * const { admin } = await authenticate.admin(request);
81
+ *
82
+ * try {
83
+ * const response = await admin.graphql(
84
+ * `#graphql
85
+ * query incorrectQuery {
86
+ * products(first: 10) {
87
+ * nodes {
88
+ * not_a_field
89
+ * }
90
+ * }
91
+ * }`,
92
+ * );
93
+ *
94
+ * return json({ data: await response.json() });
95
+ * } catch (error) {
96
+ * if (error instanceof GraphqlQueryError) {
97
+ * // error.body.errors:
98
+ * // { graphQLErrors: [
99
+ * // { message: "Field 'not_a_field' doesn't exist on type 'Product'" }
100
+ * // ] }
101
+ * return json({ errors: error.body?.errors }, { status: 500 });
102
+ * }
103
+ * return json({ message: "An error occurred" }, { status: 500 });
104
+ * }
105
+ * }
106
+ * ```
107
+ *
108
+ * ```ts
109
+ * // /app/shopify.server.ts
110
+ * import { shopifyApp } from "@shopify/shopify-app-remix/server";
111
+ *
112
+ * const shopify = shopifyApp({
113
+ * // ...
114
+ * });
115
+ * export default shopify;
116
+ * export const authenticate = shopify.authenticate;
117
+ * ```
118
+ */
119
+ graphql: GraphQLClient<AdminOperations>;
120
+ }
121
+ export interface AdminApiContextWithRest<Resources extends ShopifyRestResources = ShopifyRestResources> extends AdminApiContextWithoutRest {
17
122
  /**
18
123
  * Methods for interacting with the Shopify Admin REST API
19
124
  *
125
+ * @deprecated In a future major release REST will be removed from this package. Please see [all-in on graphql](https://www.shopify.com/ca/partners/blog/all-in-on-graphql).
126
+ *
20
127
  * There are methods for interacting with individual REST resources. You can also make `GET`, `POST`, `PUT` and `DELETE` requests should the REST resources not meet your needs.
21
128
  *
22
129
  * {@link https://shopify.dev/docs/api/admin-rest}
@@ -138,105 +245,5 @@ export interface AdminApiContext<Resources extends ShopifyRestResources = Shopif
138
245
  * ```
139
246
  */
140
247
  rest: RestClientWithResources<Resources>;
141
- /**
142
- * Methods for interacting with the Shopify Admin GraphQL API
143
- *
144
- * {@link https://shopify.dev/docs/api/admin-graphql}
145
- * {@link https://github.com/Shopify/shopify-app-js/blob/main/packages/apps/shopify-api/docs/reference/clients/Graphql.md}
146
- *
147
- * @example
148
- * <caption>Querying the GraphQL API.</caption>
149
- * <description>Use `admin.graphql` to make query / mutation requests.</description>
150
- * ```ts
151
- * // /app/routes/**\/*.ts
152
- * import { ActionFunctionArgs } from "@remix-run/node";
153
- * import { authenticate } from "../shopify.server";
154
- *
155
- * export const action = async ({ request }: ActionFunctionArgs) => {
156
- * const { admin } = await authenticate.admin(request);
157
- *
158
- * const response = await admin.graphql(
159
- * `#graphql
160
- * mutation populateProduct($input: ProductInput!) {
161
- * productCreate(input: $input) {
162
- * product {
163
- * id
164
- * }
165
- * }
166
- * }`,
167
- * {
168
- * variables: {
169
- * input: { title: "Product Name" },
170
- * },
171
- * },
172
- * );
173
- *
174
- * const productData = await response.json();
175
- * return json({
176
- * productId: productData.data?.productCreate?.product?.id,
177
- * });
178
- * }
179
- * ```
180
- *
181
- * ```ts
182
- * // /app/shopify.server.ts
183
- * import { shopifyApp } from "@shopify/shopify-app-remix/server";
184
- *
185
- * const shopify = shopifyApp({
186
- * // ...
187
- * });
188
- * export default shopify;
189
- * export const authenticate = shopify.authenticate;
190
- * ```
191
- *
192
- * @example
193
- * <caption>Handling GraphQL errors.</caption>
194
- * <description>Catch `GraphqlQueryError` errors to see error messages from the API.</description>
195
- * ```ts
196
- * // /app/routes/**\/*.ts
197
- * import { ActionFunctionArgs } from "@remix-run/node";
198
- * import { authenticate } from "../shopify.server";
199
- *
200
- * export const action = async ({ request }: ActionFunctionArgs) => {
201
- * const { admin } = await authenticate.admin(request);
202
- *
203
- * try {
204
- * const response = await admin.graphql(
205
- * `#graphql
206
- * query incorrectQuery {
207
- * products(first: 10) {
208
- * nodes {
209
- * not_a_field
210
- * }
211
- * }
212
- * }`,
213
- * );
214
- *
215
- * return json({ data: await response.json() });
216
- * } catch (error) {
217
- * if (error instanceof GraphqlQueryError) {
218
- * // error.body.errors:
219
- * // { graphQLErrors: [
220
- * // { message: "Field 'not_a_field' doesn't exist on type 'Product'" }
221
- * // ] }
222
- * return json({ errors: error.body?.errors }, { status: 500 });
223
- * }
224
- * return json({ message: "An error occurred" }, { status: 500 });
225
- * }
226
- * }
227
- * ```
228
- *
229
- * ```ts
230
- * // /app/shopify.server.ts
231
- * import { shopifyApp } from "@shopify/shopify-app-remix/server";
232
- *
233
- * const shopify = shopifyApp({
234
- * // ...
235
- * });
236
- * export default shopify;
237
- * export const authenticate = shopify.authenticate;
238
- * ```
239
- */
240
- graphql: GraphQLClient<AdminOperations>;
241
248
  }
242
249
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/server/clients/admin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,oBAAoB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,QAAQ,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;CAC5C;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,GAAG,EAAE;IACzC,KAAK,EAAE,GAAG,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpB,MAAM,WAAW,eAAe,CAC9B,SAAS,SAAS,oBAAoB,GAAG,oBAAoB;IAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0HG;IACH,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA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EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,uBAAuB,CACtC,SAAS,SAAS,oBAAoB,GAAG,oBAAoB,CAC7D,SAAQ,0BAA0B;IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4HG;IACH,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC1C"}
@@ -143,7 +143,7 @@ export interface AppConfigArg<Resources extends ShopifyRestResources = ShopifyRe
143
143
  * });
144
144
  * ```
145
145
  */
146
- hooks?: HooksConfig;
146
+ hooks?: HooksConfig<AppConfigArg<Resources, Storage, Future>, Resources>;
147
147
  /**
148
148
  * Does your app render embedded inside the Shopify Admin or on its own.
149
149
  *
@@ -240,7 +240,7 @@ export interface AuthConfig {
240
240
  loginPath: string;
241
241
  }
242
242
  export type WebhookConfig = Record<string, WebhookHandler | WebhookHandler[]>;
243
- interface HooksConfig {
243
+ interface HooksConfig<ConfigArg extends AppConfigArg = AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> {
244
244
  /**
245
245
  * A function to call after a merchant installs your app
246
246
  *
@@ -264,11 +264,11 @@ interface HooksConfig {
264
264
  * });
265
265
  * ```
266
266
  */
267
- afterAuth?: (options: AfterAuthOptions) => void | Promise<void>;
267
+ afterAuth?: (options: AfterAuthOptions<ConfigArg, Resources>) => void | Promise<void>;
268
268
  }
269
- export interface AfterAuthOptions<R extends ShopifyRestResources = ShopifyRestResources> {
269
+ export interface AfterAuthOptions<ConfigArg extends AppConfigArg, Resources extends ShopifyRestResources = ShopifyRestResources> {
270
270
  session: Session;
271
- admin: AdminApiContext<R>;
271
+ admin: AdminApiContext<ConfigArg, Resources>;
272
272
  }
273
273
  export {};
274
274
  //# sourceMappingURL=config-types.d.ts.map