@salesforce/commerce-sdk-react 1.0.0-preview.0 → 1.0.0-preview.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 (53) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/README.md +4 -0
  3. package/auth/index.d.ts +16 -1
  4. package/auth/index.js +49 -1
  5. package/hooks/ShopperBaskets/mutation.d.ts +61 -280
  6. package/hooks/ShopperBaskets/mutation.js +60 -254
  7. package/hooks/ShopperBaskets/query.d.ts +10 -0
  8. package/hooks/ShopperBaskets/query.js +10 -0
  9. package/hooks/ShopperContexts/mutation.d.ts +16 -11
  10. package/hooks/ShopperContexts/mutation.js +16 -11
  11. package/hooks/ShopperContexts/query.d.ts +3 -1
  12. package/hooks/ShopperContexts/query.js +3 -1
  13. package/hooks/ShopperCustomers/mutation.d.ts +20 -80
  14. package/hooks/ShopperCustomers/mutation.js +20 -81
  15. package/hooks/ShopperCustomers/query.d.ts +27 -2
  16. package/hooks/ShopperCustomers/query.js +28 -2
  17. package/hooks/ShopperExperience/query.d.ts +12 -8
  18. package/hooks/ShopperExperience/query.js +12 -8
  19. package/hooks/ShopperGiftCertificates/query.d.ts +2 -0
  20. package/hooks/ShopperGiftCertificates/query.js +2 -0
  21. package/hooks/ShopperLogin/mutation.d.ts +19 -47
  22. package/hooks/ShopperLogin/mutation.js +19 -41
  23. package/hooks/ShopperLogin/query.d.ts +8 -0
  24. package/hooks/ShopperLogin/query.js +8 -0
  25. package/hooks/ShopperOrders/mutation.d.ts +19 -23
  26. package/hooks/ShopperOrders/mutation.js +19 -21
  27. package/hooks/ShopperOrders/query.d.ts +6 -0
  28. package/hooks/ShopperOrders/query.js +7 -1
  29. package/hooks/ShopperProducts/query.d.ts +8 -0
  30. package/hooks/ShopperProducts/query.js +8 -0
  31. package/hooks/ShopperPromotions/query.d.ts +4 -0
  32. package/hooks/ShopperPromotions/query.js +4 -0
  33. package/hooks/ShopperSearch/query.d.ts +11 -3
  34. package/hooks/ShopperSearch/query.js +11 -3
  35. package/hooks/types.d.ts +3 -0
  36. package/hooks/useAccessToken.d.ts +6 -0
  37. package/hooks/useAccessToken.js +8 -0
  38. package/hooks/useAuthHelper.d.ts +14 -0
  39. package/hooks/useAuthHelper.js +19 -0
  40. package/hooks/useCommerceApi.d.ts +2 -0
  41. package/hooks/useCommerceApi.js +2 -0
  42. package/hooks/useCustomerId.d.ts +2 -0
  43. package/hooks/useCustomerId.js +2 -0
  44. package/hooks/useCustomerType.d.ts +3 -0
  45. package/hooks/useCustomerType.js +12 -1
  46. package/hooks/useEncUserId.d.ts +3 -0
  47. package/hooks/useEncUserId.js +3 -0
  48. package/hooks/useUsid.d.ts +2 -0
  49. package/hooks/useUsid.js +2 -0
  50. package/package.json +8 -6
  51. package/provider.d.ts +27 -1
  52. package/provider.js +27 -1
  53. package/scripts/build-and-release-docs.js +1 -0
@@ -58,8 +58,12 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
58
58
  // requiredParameters
59
59
  // })
60
60
  // }
61
+
61
62
  /**
62
- * Gets a customer with all existing addresses and payment instruments associated with the requested customer.
63
+ * Gets a customer's information.
64
+ *
65
+ * @group ShopperCustomers
66
+ * @category Query
63
67
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
64
68
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
65
69
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomer` endpoint.
@@ -98,6 +102,8 @@ const useCustomer = (apiOptions, queryOptions = {}) => {
98
102
  };
99
103
  /**
100
104
  * Retrieves a customer's address by address name.
105
+ * @group ShopperCustomers
106
+ * @category Query
101
107
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
102
108
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
103
109
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomerAddress` endpoint.
@@ -137,6 +143,8 @@ const useCustomerAddress = (apiOptions, queryOptions = {}) => {
137
143
  };
138
144
  /**
139
145
  * Gets the baskets of a customer.
146
+ * @group ShopperCustomers
147
+ * @category Query
140
148
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
141
149
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
142
150
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomerBaskets` endpoint.
@@ -175,7 +183,11 @@ const useCustomerBaskets = (apiOptions, queryOptions = {}) => {
175
183
  });
176
184
  };
177
185
  /**
178
- * Returns a pageable list of all customer's orders. The default page size is 10.
186
+ * Returns a pageable list of all customer's orders.
187
+ *
188
+ * The default page size is 10.
189
+ * @group ShopperCustomers
190
+ * @category Query
179
191
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
180
192
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
181
193
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomerOrders` endpoint.
@@ -215,6 +227,8 @@ const useCustomerOrders = (apiOptions, queryOptions = {}) => {
215
227
  };
216
228
  /**
217
229
  * Retrieves a customer's payment instrument by its ID.
230
+ * @group ShopperCustomers
231
+ * @category Query
218
232
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
219
233
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
220
234
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomerPaymentInstrument` endpoint.
@@ -254,6 +268,8 @@ const useCustomerPaymentInstrument = (apiOptions, queryOptions = {}) => {
254
268
  };
255
269
  /**
256
270
  * Returns all customer product lists.
271
+ * @group ShopperCustomers
272
+ * @category Query
257
273
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
258
274
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
259
275
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomerProductLists` endpoint.
@@ -293,6 +309,8 @@ const useCustomerProductLists = (apiOptions, queryOptions = {}) => {
293
309
  };
294
310
  /**
295
311
  * Returns a customer product list of the given customer and the items in the list.
312
+ * @group ShopperCustomers
313
+ * @category Query
296
314
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
297
315
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
298
316
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomerProductList` endpoint.
@@ -332,6 +350,8 @@ const useCustomerProductList = (apiOptions, queryOptions = {}) => {
332
350
  };
333
351
  /**
334
352
  * Returns an item of a customer product list and the actual product details like image, availability and price.
353
+ * @group ShopperCustomers
354
+ * @category Query
335
355
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
336
356
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
337
357
  * @returns A TanStack Query query hook with data from the Shopper Customers `getCustomerProductListItem` endpoint.
@@ -371,6 +391,8 @@ const useCustomerProductListItem = (apiOptions, queryOptions = {}) => {
371
391
  };
372
392
  /**
373
393
  * Retrieves all public product lists as defined by the given search term (for example, email OR first name and last name).
394
+ * @group ShopperCustomers
395
+ * @category Query
374
396
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
375
397
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
376
398
  * @returns A TanStack Query query hook with data from the Shopper Customers `getPublicProductListsBySearchTerm` endpoint.
@@ -410,6 +432,8 @@ const usePublicProductListsBySearchTerm = (apiOptions, queryOptions = {}) => {
410
432
  };
411
433
  /**
412
434
  * Retrieves a public product list by ID and the items under that product list.
435
+ * @group ShopperCustomers
436
+ * @category Query
413
437
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
414
438
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
415
439
  * @returns A TanStack Query query hook with data from the Shopper Customers `getPublicProductList` endpoint.
@@ -449,6 +473,8 @@ const usePublicProductList = (apiOptions, queryOptions = {}) => {
449
473
  };
450
474
  /**
451
475
  * Retrieves an item from a public product list and the actual product details like product, image, availability and price.
476
+ * @group ShopperCustomers
477
+ * @category Query
452
478
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
453
479
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
454
480
  * @returns A TanStack Query query hook with data from the Shopper Customers `getProductListItem` endpoint.
@@ -2,11 +2,12 @@ import { UseQueryResult } from '@tanstack/react-query';
2
2
  import { ApiClients, ApiQueryOptions, Argument, DataType, NullableParameters } from '../types';
3
3
  declare type Client = ApiClients['shopperExperience'];
4
4
  /**
5
- * Get Page Designer pages. The results will apply the visibility rules for each page's components, such as personalization or scheduled visibility.
6
-
7
- Either `categoryId` or `productId` must be given in addition to `aspectTypeId`. Because only a single page-to-product and page-to-category assignment per aspect type can be authored today, the returned results contains one element at most.
8
-
9
- **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
5
+ * Get Page Designer pages.
6
+ *
7
+ * The results will apply the visibility rules for each page's components, such as personalization or scheduled visibility. Either `categoryId` or `productId` must be given in addition to `aspectTypeId`. Because only a single page-to-product and page-to-category assignment per aspect type can be authored today, the returned results contains one element at most.
8
+ * **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
9
+ * @group ShopperExperience
10
+ * @category Query
10
11
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
11
12
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
12
13
  * @returns A TanStack Query query hook with data from the Shopper Experience `getPages` endpoint.
@@ -16,9 +17,12 @@ Either `categoryId` or `productId` must be given in addition to `aspectTypeId`.
16
17
  */
17
18
  export declare const usePages: (apiOptions: NullableParameters<Argument<Client['getPages']>>, queryOptions?: ApiQueryOptions<Client['getPages']>) => UseQueryResult<DataType<Client['getPages']>>;
18
19
  /**
19
- * Get a Page Designer page based on a single page ID. The results will apply the visibility rules for the page's components, such as personalization or scheduled visibility.
20
-
21
- **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
20
+ * Get a Page Designer page based on a single page ID.
21
+ *
22
+ * The results will apply the visibility rules for the page's components, such as personalization or scheduled visibility.
23
+ * **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
24
+ * @group ShopperExperience
25
+ * @category Query
22
26
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
23
27
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
24
28
  * @returns A TanStack Query query hook with data from the Shopper Experience `getPage` endpoint.
@@ -19,11 +19,12 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
19
19
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
20
20
  */
21
21
  /**
22
- * Get Page Designer pages. The results will apply the visibility rules for each page's components, such as personalization or scheduled visibility.
23
-
24
- Either `categoryId` or `productId` must be given in addition to `aspectTypeId`. Because only a single page-to-product and page-to-category assignment per aspect type can be authored today, the returned results contains one element at most.
25
-
26
- **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
22
+ * Get Page Designer pages.
23
+ *
24
+ * The results will apply the visibility rules for each page's components, such as personalization or scheduled visibility. Either `categoryId` or `productId` must be given in addition to `aspectTypeId`. Because only a single page-to-product and page-to-category assignment per aspect type can be authored today, the returned results contains one element at most.
25
+ * **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
26
+ * @group ShopperExperience
27
+ * @category Query
27
28
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
28
29
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
29
30
  * @returns A TanStack Query query hook with data from the Shopper Experience `getPages` endpoint.
@@ -61,9 +62,12 @@ const usePages = (apiOptions, queryOptions = {}) => {
61
62
  });
62
63
  };
63
64
  /**
64
- * Get a Page Designer page based on a single page ID. The results will apply the visibility rules for the page's components, such as personalization or scheduled visibility.
65
-
66
- **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
65
+ * Get a Page Designer page based on a single page ID.
66
+ *
67
+ * The results will apply the visibility rules for the page's components, such as personalization or scheduled visibility.
68
+ * **Important**: Because this resource uses the GET method, you must not pass sensitive data (payment card information, for example) and must not perform any transactional processes within the server-side scripts that are run for the page and components.
69
+ * @group ShopperExperience
70
+ * @category Query
67
71
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
68
72
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
69
73
  * @returns A TanStack Query query hook with data from the Shopper Experience `getPage` endpoint.
@@ -3,6 +3,8 @@ import { ApiClients, ApiQueryOptions, Argument, DataType, NullableParameters } f
3
3
  declare type Client = ApiClients['shopperGiftCertificates'];
4
4
  /**
5
5
  * Action to retrieve an existing gift certificate.
6
+ * @group ShopperGiftCertificates
7
+ * @category Query
6
8
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
7
9
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
8
10
  * @returns A TanStack Query query hook with data from the Shopper Gift Certificates `getGiftCertificate` endpoint.
@@ -25,6 +25,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
25
25
  */
26
26
  /**
27
27
  * Action to retrieve an existing gift certificate.
28
+ * @group ShopperGiftCertificates
29
+ * @category Query
28
30
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
29
31
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
30
32
  * @returns A TanStack Query query hook with data from the Shopper Gift Certificates `getGiftCertificate` endpoint.
@@ -1,14 +1,16 @@
1
1
  import { ApiClients, Argument, DataType } from '../types';
2
2
  import { UseMutationResult } from '@tanstack/react-query';
3
3
  declare type Client = ApiClients['shopperLogin'];
4
- /** Mutations available for Shopper Login. */
4
+ /**
5
+ * Mutations available for Shopper Login
6
+ * @group ShopperLogin
7
+ * @category Mutation
8
+ * @enum
9
+ */
5
10
  export declare const ShopperLoginMutations: {
6
11
  /**
7
12
  * Allows the customer to authenticate when their identity provider is down.
8
13
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `authorizePasswordlessCustomer` endpoint.
9
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=authorizePasswordlessCustomer| Salesforce Developer Center} for more information about the API endpoint.
10
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#authorizepasswordlesscustomer | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
11
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
12
14
  */
13
15
  readonly AuthorizePasswordlessCustomer: "authorizePasswordlessCustomer";
14
16
  /**
@@ -18,30 +20,12 @@ Required header: Authorization header bearer token of the Shopper access token t
18
20
 
19
21
  Required parameters: `refresh token`, `channel_id`, and `client`.
20
22
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `logoutCustomer` endpoint.
21
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=logoutCustomer| Salesforce Developer Center} for more information about the API endpoint.
22
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#logoutcustomer | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
23
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
24
23
  */
25
24
  readonly LogoutCustomer: "logoutCustomer";
26
25
  /**
27
- * Get the shopper or guest JWT access token and a refresh token. This is the second step of the OAuth 2.1 authorization code flow.
28
-
29
- For a private client, an application is able to get an access token for the shopper through the back channel (a trusted server) by passing in the client credentials and the authorization code retrieved from the `authorize` endpoint.
30
-
31
- For a guest user, get the shopper JWT access token and a refresh token. This is where a client appplication is able to get an access token for the guest user through the back channel (a trusted server) by passing in the client credentials.
32
-
33
- For a public client using PKCE, an application will pass a PKCE `code_verifier`` that matches the `code_challenge`` that was used to `authorize` the customer along with the authorization code.
34
-
35
- When refreshing the access token with a private client ID and client secret, the refresh token is _not_ regenerated. However, when refreshing the access token with a public client ID, the refresh token is _always_ regenerated. The old refresh token is voided with every refresh call, so the refresh token on the client needs to be replaced to always store the new refresh token.
36
-
37
- See the Body section for required parameters, including `grant_type` and others, depending on the value of `grant_type`.
38
-
39
- **Important**: We strongly recommended using the `channel_id` query parameter because **it will be required in the future**.
40
- * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getAccessToken` endpoint.
41
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getAccessToken| Salesforce Developer Center} for more information about the API endpoint.
42
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#getaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
43
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
44
- */
26
+ * Get the shopper or guest JWT access token and a refresh token. This is the second step of the OAuth 2.1 authorization code flow.
27
+ * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getAccessToken` endpoint.
28
+ */
45
29
  readonly GetAccessToken: "getAccessToken";
46
30
  /**
47
31
  * Get a shopper JWT access token for a registered customer using session bridge.
@@ -50,9 +34,6 @@ For public client id requests the grant_type must be set to `session_bridge`.
50
34
 
51
35
  For private client_id and secret the grant_type must be set to `client_credentials` along with a basic authorization header.
52
36
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getSessionBridgeAccessToken` endpoint.
53
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getSessionBridgeAccessToken| Salesforce Developer Center} for more information about the API endpoint.
54
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#getsessionbridgeaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
55
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
56
37
  */
57
38
  readonly GetSessionBridgeAccessToken: "getSessionBridgeAccessToken";
58
39
  /**
@@ -62,9 +43,6 @@ For external trusted-system requests, a basic authorization header that includes
62
43
 
63
44
  For internal trusted-system requests, the bearer token must be a C2C JWT.
64
45
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getTrustedSystemAccessToken` endpoint.
65
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedSystemAccessToken| Salesforce Developer Center} for more information about the API endpoint.
66
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#gettrustedsystemaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
67
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
68
46
  */
69
47
  readonly GetTrustedSystemAccessToken: "getTrustedSystemAccessToken";
70
48
  /**
@@ -74,46 +52,40 @@ If using a SLAS private client ID, you must also use an `_sfdc_client_auth` head
74
52
 
75
53
  The value of the `_sfdc_client_auth` header must be a Base64-encoded string. The string is composed of a SLAS private client ID and client secret, separated by a colon (`:`). For example, `privateClientId:privateClientsecret` becomes `cHJpdmF0ZUNsaWVudElkOnByaXZhdGVDbGllbnRzZWNyZXQ=` after Base64 encoding.
76
54
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getTrustedAgentAccessToken` endpoint.
77
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAccessToken| Salesforce Developer Center} for more information about the API endpoint.
78
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#gettrustedagentaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
79
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
80
55
  */
81
56
  readonly GetTrustedAgentAccessToken: "getTrustedAgentAccessToken";
82
57
  /**
83
58
  * Creates a new password
84
59
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `resetPassword` endpoint.
85
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=resetPassword| Salesforce Developer Center} for more information about the API endpoint.
86
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#resetpassword | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
87
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
88
60
  */
89
61
  readonly ResetPassword: "resetPassword";
90
62
  /**
91
63
  * Issue a shopper token (JWT).
92
64
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getPasswordLessAccessToken` endpoint.
93
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getPasswordLessAccessToken| Salesforce Developer Center} for more information about the API endpoint.
94
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#getpasswordlessaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
95
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
96
65
  */
97
66
  readonly GetPasswordLessAccessToken: "getPasswordLessAccessToken";
98
67
  /**
99
68
  * Invalidate the refresh token. A basic auth header with Base64-encoded `clientId:secret` is required in the Authorization header, and the refresh token to be revoked is required in the body.
100
69
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `revokeToken` endpoint.
101
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=revokeToken| Salesforce Developer Center} for more information about the API endpoint.
102
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#revoketoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
103
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
104
70
  */
105
71
  readonly RevokeToken: "revokeToken";
106
72
  /**
107
73
  * Returns the token properties. A basic auth header with Base64-encoded `clientId:secret` is required in the Authorization header, as well as an access token or refresh token. Use `token_type_hint` to help identify the token.
108
74
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `introspectToken` endpoint.
109
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=introspectToken| Salesforce Developer Center} for more information about the API endpoint.
110
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#introspecttoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
111
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
112
75
  */
113
76
  readonly IntrospectToken: "introspectToken";
114
77
  };
115
- /** Mutation for Shopper Login. */
78
+ /**
79
+ * Mutation for Shopper Login.
80
+ * @group ShopperLogin
81
+ * @category Mutation
82
+ */
116
83
  export declare type ShopperLoginMutation = (typeof ShopperLoginMutations)[keyof typeof ShopperLoginMutations];
84
+ /**
85
+ * Mutation hook for Shopper Login.
86
+ * @group ShopperLogin
87
+ * @category Mutation
88
+ */
117
89
  export declare function useShopperLoginMutation<Mutation extends ShopperLoginMutation>(mutation: Mutation): UseMutationResult<DataType<Client[Mutation]>, unknown, Argument<Client[Mutation]>>;
118
90
  export {};
119
91
  //# sourceMappingURL=mutation.d.ts.map
@@ -17,14 +17,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
17
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
18
18
  */
19
19
 
20
- /** Mutations available for Shopper Login. */
20
+ /**
21
+ * Mutations available for Shopper Login
22
+ * @group ShopperLogin
23
+ * @category Mutation
24
+ * @enum
25
+ */
21
26
  const ShopperLoginMutations = {
22
27
  /**
23
28
  * Allows the customer to authenticate when their identity provider is down.
24
29
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `authorizePasswordlessCustomer` endpoint.
25
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=authorizePasswordlessCustomer| Salesforce Developer Center} for more information about the API endpoint.
26
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#authorizepasswordlesscustomer | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
27
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
28
30
  */
29
31
  AuthorizePasswordlessCustomer: 'authorizePasswordlessCustomer',
30
32
  /**
@@ -32,33 +34,18 @@ const ShopperLoginMutations = {
32
34
  Required header: Authorization header bearer token of the Shopper access token to logout.
33
35
  Required parameters: `refresh token`, `channel_id`, and `client`.
34
36
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `logoutCustomer` endpoint.
35
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=logoutCustomer| Salesforce Developer Center} for more information about the API endpoint.
36
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#logoutcustomer | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
37
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
38
37
  */
39
38
  LogoutCustomer: 'logoutCustomer',
40
39
  /**
41
- * Get the shopper or guest JWT access token and a refresh token. This is the second step of the OAuth 2.1 authorization code flow.
42
- For a private client, an application is able to get an access token for the shopper through the back channel (a trusted server) by passing in the client credentials and the authorization code retrieved from the `authorize` endpoint.
43
- For a guest user, get the shopper JWT access token and a refresh token. This is where a client appplication is able to get an access token for the guest user through the back channel (a trusted server) by passing in the client credentials.
44
- For a public client using PKCE, an application will pass a PKCE `code_verifier`` that matches the `code_challenge`` that was used to `authorize` the customer along with the authorization code.
45
- When refreshing the access token with a private client ID and client secret, the refresh token is _not_ regenerated. However, when refreshing the access token with a public client ID, the refresh token is _always_ regenerated. The old refresh token is voided with every refresh call, so the refresh token on the client needs to be replaced to always store the new refresh token.
46
- See the Body section for required parameters, including `grant_type` and others, depending on the value of `grant_type`.
47
- **Important**: We strongly recommended using the `channel_id` query parameter because **it will be required in the future**.
48
- * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getAccessToken` endpoint.
49
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getAccessToken| Salesforce Developer Center} for more information about the API endpoint.
50
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#getaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
51
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
52
- */
40
+ * Get the shopper or guest JWT access token and a refresh token. This is the second step of the OAuth 2.1 authorization code flow.
41
+ * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getAccessToken` endpoint.
42
+ */
53
43
  GetAccessToken: 'getAccessToken',
54
44
  /**
55
45
  * Get a shopper JWT access token for a registered customer using session bridge.
56
46
  For public client id requests the grant_type must be set to `session_bridge`.
57
47
  For private client_id and secret the grant_type must be set to `client_credentials` along with a basic authorization header.
58
48
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getSessionBridgeAccessToken` endpoint.
59
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getSessionBridgeAccessToken| Salesforce Developer Center} for more information about the API endpoint.
60
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#getsessionbridgeaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
61
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
62
49
  */
63
50
  GetSessionBridgeAccessToken: 'getSessionBridgeAccessToken',
64
51
  /**
@@ -66,9 +53,6 @@ const ShopperLoginMutations = {
66
53
  For external trusted-system requests, a basic authorization header that includes a SLAS client ID and SLAS client secret can be used in place of the bearer token.
67
54
  For internal trusted-system requests, the bearer token must be a C2C JWT.
68
55
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getTrustedSystemAccessToken` endpoint.
69
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedSystemAccessToken| Salesforce Developer Center} for more information about the API endpoint.
70
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#gettrustedsystemaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
71
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
72
56
  */
73
57
  GetTrustedSystemAccessToken: 'getTrustedSystemAccessToken',
74
58
  /**
@@ -76,47 +60,41 @@ const ShopperLoginMutations = {
76
60
  If using a SLAS private client ID, you must also use an `_sfdc_client_auth` header.
77
61
  The value of the `_sfdc_client_auth` header must be a Base64-encoded string. The string is composed of a SLAS private client ID and client secret, separated by a colon (`:`). For example, `privateClientId:privateClientsecret` becomes `cHJpdmF0ZUNsaWVudElkOnByaXZhdGVDbGllbnRzZWNyZXQ=` after Base64 encoding.
78
62
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getTrustedAgentAccessToken` endpoint.
79
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getTrustedAgentAccessToken| Salesforce Developer Center} for more information about the API endpoint.
80
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#gettrustedagentaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
81
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
82
63
  */
83
64
  GetTrustedAgentAccessToken: 'getTrustedAgentAccessToken',
84
65
  /**
85
66
  * Creates a new password
86
67
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `resetPassword` endpoint.
87
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=resetPassword| Salesforce Developer Center} for more information about the API endpoint.
88
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#resetpassword | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
89
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
90
68
  */
91
69
  ResetPassword: 'resetPassword',
92
70
  /**
93
71
  * Issue a shopper token (JWT).
94
72
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `getPasswordLessAccessToken` endpoint.
95
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=getPasswordLessAccessToken| Salesforce Developer Center} for more information about the API endpoint.
96
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#getpasswordlessaccesstoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
97
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
98
73
  */
99
74
  GetPasswordLessAccessToken: 'getPasswordLessAccessToken',
100
75
  /**
101
76
  * Invalidate the refresh token. A basic auth header with Base64-encoded `clientId:secret` is required in the Authorization header, and the refresh token to be revoked is required in the body.
102
77
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `revokeToken` endpoint.
103
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=revokeToken| Salesforce Developer Center} for more information about the API endpoint.
104
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#revoketoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
105
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
106
78
  */
107
79
  RevokeToken: 'revokeToken',
108
80
  /**
109
81
  * Returns the token properties. A basic auth header with Base64-encoded `clientId:secret` is required in the Authorization header, as well as an access token or refresh token. Use `token_type_hint` to help identify the token.
110
82
  * @returns A TanStack Query mutation hook for interacting with the Shopper Login `introspectToken` endpoint.
111
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-login?meta=introspectToken| Salesforce Developer Center} for more information about the API endpoint.
112
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperlogin.shopperlogin-1.html#introspecttoken | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
113
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
114
83
  */
115
84
  IntrospectToken: 'introspectToken'
116
85
  };
117
86
 
118
- /** Mutation for Shopper Login. */
87
+ /**
88
+ * Mutation for Shopper Login.
89
+ * @group ShopperLogin
90
+ * @category Mutation
91
+ */
119
92
  exports.ShopperLoginMutations = ShopperLoginMutations;
93
+ /**
94
+ * Mutation hook for Shopper Login.
95
+ * @group ShopperLogin
96
+ * @category Mutation
97
+ */
120
98
  function useShopperLoginMutation(mutation) {
121
99
  const getCacheUpdates = _cache.cacheUpdateMatrix[mutation];
122
100
  // TODO: Remove this check when all mutations are implemented.
@@ -3,6 +3,8 @@ import { ApiClients, ApiQueryOptions, Argument, DataType, NullableParameters } f
3
3
  declare type Client = ApiClients['shopperLogin'];
4
4
  /**
5
5
  * Get credential quality statistics for a user.
6
+ * @group ShopperLogin
7
+ * @category Query
6
8
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
7
9
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
8
10
  * @returns A TanStack Query query hook with data from the Shopper Login `retrieveCredQualityUserInfo` endpoint.
@@ -13,6 +15,8 @@ declare type Client = ApiClients['shopperLogin'];
13
15
  export declare const useCredQualityUserInfo: (apiOptions: NullableParameters<Argument<Client['retrieveCredQualityUserInfo']>>, queryOptions?: ApiQueryOptions<Client['retrieveCredQualityUserInfo']>) => UseQueryResult<DataType<Client['retrieveCredQualityUserInfo']>>;
14
16
  /**
15
17
  * Returns a JSON listing of claims about the currently authenticated user.
18
+ * @group ShopperLogin
19
+ * @category Query
16
20
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
17
21
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
18
22
  * @returns A TanStack Query query hook with data from the Shopper Login `getUserInfo` endpoint.
@@ -23,6 +27,8 @@ export declare const useCredQualityUserInfo: (apiOptions: NullableParameters<Arg
23
27
  export declare const useUserInfo: (apiOptions: NullableParameters<Argument<Client['getUserInfo']>>, queryOptions?: ApiQueryOptions<Client['getUserInfo']>) => UseQueryResult<DataType<Client['getUserInfo']>>;
24
28
  /**
25
29
  * Returns a JSON listing of the OpenID/OAuth endpoints, supported scopes and claims, public keys used to sign the tokens, and other details.
30
+ * @group ShopperLogin
31
+ * @category Query
26
32
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
27
33
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
28
34
  * @returns A TanStack Query query hook with data from the Shopper Login `getWellknownOpenidConfiguration` endpoint.
@@ -33,6 +39,8 @@ export declare const useUserInfo: (apiOptions: NullableParameters<Argument<Clien
33
39
  export declare const useWellknownOpenidConfiguration: (apiOptions: NullableParameters<Argument<Client['getWellknownOpenidConfiguration']>>, queryOptions?: ApiQueryOptions<Client['getWellknownOpenidConfiguration']>) => UseQueryResult<DataType<Client['getWellknownOpenidConfiguration']>>;
34
40
  /**
35
41
  * Returns a JSON Web Key Set (JWKS) containing the current, past, and future public keys. The key set enables clients to validate the Shopper JSON Web Token (JWT) issued by SLAS.
42
+ * @group ShopperLogin
43
+ * @category Query
36
44
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
37
45
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
38
46
  * @returns A TanStack Query query hook with data from the Shopper Login `getJwksUri` endpoint.
@@ -20,6 +20,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
20
20
  */
21
21
  /**
22
22
  * Get credential quality statistics for a user.
23
+ * @group ShopperLogin
24
+ * @category Query
23
25
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
24
26
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
25
27
  * @returns A TanStack Query query hook with data from the Shopper Login `retrieveCredQualityUserInfo` endpoint.
@@ -58,6 +60,8 @@ const useCredQualityUserInfo = (apiOptions, queryOptions = {}) => {
58
60
  };
59
61
  /**
60
62
  * Returns a JSON listing of claims about the currently authenticated user.
63
+ * @group ShopperLogin
64
+ * @category Query
61
65
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
62
66
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
63
67
  * @returns A TanStack Query query hook with data from the Shopper Login `getUserInfo` endpoint.
@@ -97,6 +101,8 @@ const useUserInfo = (apiOptions, queryOptions = {}) => {
97
101
  };
98
102
  /**
99
103
  * Returns a JSON listing of the OpenID/OAuth endpoints, supported scopes and claims, public keys used to sign the tokens, and other details.
104
+ * @group ShopperLogin
105
+ * @category Query
100
106
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
101
107
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
102
108
  * @returns A TanStack Query query hook with data from the Shopper Login `getWellknownOpenidConfiguration` endpoint.
@@ -136,6 +142,8 @@ const useWellknownOpenidConfiguration = (apiOptions, queryOptions = {}) => {
136
142
  };
137
143
  /**
138
144
  * Returns a JSON Web Key Set (JWKS) containing the current, past, and future public keys. The key set enables clients to validate the Shopper JSON Web Token (JWT) issued by SLAS.
145
+ * @group ShopperLogin
146
+ * @category Query
139
147
  * @parameter apiOptions - Options to pass through to `commerce-sdk-isomorphic`, with `null` accepted for unset API parameters.
140
148
  * @parameter queryOptions - TanStack Query query options, with `enabled` by default set to check that all required API parameters have been set.
141
149
  * @returns A TanStack Query query hook with data from the Shopper Login `getJwksUri` endpoint.
@@ -1,14 +1,16 @@
1
1
  import { ApiClients, Argument, DataType } from '../types';
2
2
  import { UseMutationResult } from '@tanstack/react-query';
3
3
  declare type Client = ApiClients['shopperOrders'];
4
- /** Mutations available for Shopper Orders. */
4
+ /**
5
+ * Mutations available for Shopper Orders
6
+ * @group ShopperOrders
7
+ * @category Mutation
8
+ * @enum
9
+ */
5
10
  export declare const ShopperOrdersMutations: {
6
11
  /**
7
12
  * Submits an order based on a prepared basket. The only considered value from the request body is basketId.
8
13
  * @returns A TanStack Query mutation hook for interacting with the Shopper Orders `createOrder` endpoint.
9
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=createOrder| Salesforce Developer Center} for more information about the API endpoint.
10
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperorders.shopperorders-1.html#createorder | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
11
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
12
14
  */
13
15
  readonly CreateOrder: "createOrder";
14
16
  /**
@@ -19,36 +21,30 @@ Details:
19
21
  The payment instrument is added with the provided details. The payment method must be applicable for the order see GET
20
22
  /baskets/\{basketId\}/payment-methods, if the payment method is 'CREDIT_CARD' a paymentCard must be specified in the request.
21
23
  * @returns A TanStack Query mutation hook for interacting with the Shopper Orders `createPaymentInstrumentForOrder` endpoint.
22
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=createPaymentInstrumentForOrder| Salesforce Developer Center} for more information about the API endpoint.
23
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperorders.shopperorders-1.html#createpaymentinstrumentfororder | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
24
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
25
24
  */
26
25
  readonly CreatePaymentInstrumentForOrder: "createPaymentInstrumentForOrder";
27
26
  /**
28
27
  * Removes a payment instrument of an order.
29
28
  * @returns A TanStack Query mutation hook for interacting with the Shopper Orders `removePaymentInstrumentFromOrder` endpoint.
30
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=removePaymentInstrumentFromOrder| Salesforce Developer Center} for more information about the API endpoint.
31
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperorders.shopperorders-1.html#removepaymentinstrumentfromorder | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
32
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
33
29
  */
34
30
  readonly RemovePaymentInstrumentFromOrder: "removePaymentInstrumentFromOrder";
35
31
  /**
36
- * Updates a payment instrument of an order.
37
-
38
- Details:
39
-
40
- The payment instrument is updated with the provided details. The payment method must be applicable for the
41
- order see GET /baskets/\{basketId\}/payment-methods, if the payment method is 'CREDIT_CARD' a
42
- paymentCard must be specified in the request.
43
- * @returns A TanStack Query mutation hook for interacting with the Shopper Orders `updatePaymentInstrumentForOrder` endpoint.
44
- * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-orders?meta=updatePaymentInstrumentForOrder| Salesforce Developer Center} for more information about the API endpoint.
45
- * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shopperorders.shopperorders-1.html#updatepaymentinstrumentfororder | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
46
- * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
47
- */
32
+ * Updates a payment instrument of an order.
33
+ * @returns A TanStack Query mutation hook for interacting with the Shopper Orders `updatePaymentInstrumentForOrder` endpoint.
34
+ */
48
35
  readonly UpdatePaymentInstrumentForOrder: "updatePaymentInstrumentForOrder";
49
36
  };
50
- /** Mutation for Shopper Orders. */
37
+ /**
38
+ * Mutation for Shopper Orders.
39
+ * @group ShopperOrders
40
+ * @category Mutation
41
+ */
51
42
  export declare type ShopperOrdersMutation = (typeof ShopperOrdersMutations)[keyof typeof ShopperOrdersMutations];
43
+ /**
44
+ * Mutation hook for Shopper Orders.
45
+ * @group ShopperOrders
46
+ * @category Mutation
47
+ */
52
48
  export declare function useShopperOrdersMutation<Mutation extends ShopperOrdersMutation>(mutation: Mutation): UseMutationResult<DataType<Client[Mutation]>, unknown, Argument<Client[Mutation]>>;
53
49
  export {};
54
50
  //# sourceMappingURL=mutation.d.ts.map