@salesforce/commerce-sdk-react 1.0.0-preview.0 → 1.0.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +4 -0
- package/auth/index.d.ts +19 -4
- package/auth/index.js +49 -1
- package/auth/storage.d.ts +1 -1
- package/components/ShopperExperience/Component/index.d.ts +1 -1
- package/components/ShopperExperience/Page/index.d.ts +2 -2
- package/components/ShopperExperience/types.d.ts +5 -5
- package/hooks/ShopperBaskets/cache.d.ts +1 -1
- package/hooks/ShopperBaskets/mutation.d.ts +63 -282
- package/hooks/ShopperBaskets/mutation.js +60 -254
- package/hooks/ShopperBaskets/query.d.ts +11 -1
- package/hooks/ShopperBaskets/query.js +10 -0
- package/hooks/ShopperBaskets/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperContexts/cache.d.ts +1 -1
- package/hooks/ShopperContexts/mutation.d.ts +18 -13
- package/hooks/ShopperContexts/mutation.js +16 -11
- package/hooks/ShopperContexts/query.d.ts +4 -2
- package/hooks/ShopperContexts/query.js +3 -1
- package/hooks/ShopperContexts/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperCustomers/cache.d.ts +1 -1
- package/hooks/ShopperCustomers/mutation.d.ts +22 -82
- package/hooks/ShopperCustomers/mutation.js +20 -81
- package/hooks/ShopperCustomers/query.d.ts +28 -3
- package/hooks/ShopperCustomers/query.js +28 -2
- package/hooks/ShopperCustomers/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperExperience/query.d.ts +13 -9
- package/hooks/ShopperExperience/query.js +12 -8
- package/hooks/ShopperExperience/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperGiftCertificates/query.d.ts +3 -1
- package/hooks/ShopperGiftCertificates/query.js +2 -0
- package/hooks/ShopperGiftCertificates/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperLogin/mutation.d.ts +21 -49
- package/hooks/ShopperLogin/mutation.js +19 -41
- package/hooks/ShopperLogin/query.d.ts +9 -1
- package/hooks/ShopperLogin/query.js +8 -0
- package/hooks/ShopperLogin/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperOrders/cache.d.ts +1 -1
- package/hooks/ShopperOrders/mutation.d.ts +21 -25
- package/hooks/ShopperOrders/mutation.js +19 -21
- package/hooks/ShopperOrders/query.d.ts +7 -1
- package/hooks/ShopperOrders/query.js +7 -1
- package/hooks/ShopperOrders/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperProducts/query.d.ts +9 -1
- package/hooks/ShopperProducts/query.js +8 -0
- package/hooks/ShopperProducts/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperPromotions/query.d.ts +5 -1
- package/hooks/ShopperPromotions/query.js +4 -0
- package/hooks/ShopperPromotions/queryKeyHelpers.d.ts +4 -4
- package/hooks/ShopperSearch/query.d.ts +12 -4
- package/hooks/ShopperSearch/query.js +11 -3
- package/hooks/ShopperSearch/queryKeyHelpers.d.ts +4 -4
- package/hooks/types.d.ts +30 -27
- package/hooks/useAccessToken.d.ts +6 -0
- package/hooks/useAccessToken.js +8 -0
- package/hooks/useAuthHelper.d.ts +15 -1
- package/hooks/useAuthHelper.js +19 -0
- package/hooks/useCommerceApi.d.ts +2 -0
- package/hooks/useCommerceApi.js +2 -0
- package/hooks/useCustomerId.d.ts +2 -0
- package/hooks/useCustomerId.js +2 -0
- package/hooks/useCustomerType.d.ts +5 -2
- package/hooks/useCustomerType.js +12 -1
- package/hooks/useEncUserId.d.ts +3 -0
- package/hooks/useEncUserId.js +3 -0
- package/hooks/useLocalStorage.d.ts +1 -1
- package/hooks/useUsid.d.ts +2 -0
- package/hooks/useUsid.js +2 -0
- package/package.json +15 -13
- package/provider.d.ts +27 -1
- package/provider.js +27 -1
- package/scripts/build-and-release-docs.js +1 -0
|
@@ -17,36 +17,41 @@ 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
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Mutation for Shopper Contexts.
|
|
22
|
+
* @group ShopperContexts
|
|
23
|
+
* @category Mutation
|
|
24
|
+
* @enum
|
|
25
|
+
*/
|
|
21
26
|
const ShopperContextsMutations = {
|
|
22
27
|
/**
|
|
23
28
|
* Creates the shopper's context based on shopperJWT.
|
|
24
29
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Contexts `createShopperContext` endpoint.
|
|
25
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-contexts?meta=createShopperContext| Salesforce Developer Center} for more information about the API endpoint.
|
|
26
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercontexts.shoppercontexts-1.html#createshoppercontext | `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
|
CreateShopperContext: 'createShopperContext',
|
|
30
32
|
/**
|
|
31
33
|
* Gets the shopper's context based on the shopperJWT.
|
|
32
34
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Contexts `deleteShopperContext` endpoint.
|
|
33
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-contexts?meta=deleteShopperContext| Salesforce Developer Center} for more information about the API endpoint.
|
|
34
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercontexts.shoppercontexts-1.html#deleteshoppercontext | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
35
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
36
35
|
*/
|
|
37
36
|
DeleteShopperContext: 'deleteShopperContext',
|
|
38
37
|
/**
|
|
39
38
|
* Updates the shopper's context based on the Shopper JWT. If the shopper context exists, it's updated with the patch body. If a customer qualifier or an `effectiveDateTime` is already present in the existing shopper context, its value is replaced by the corresponding value from the patch body. If a customer qualifers' value is set to `null` it's deleted from existing shopper context. If `effectiveDateTime` value is set to set to an empty string (\"\"), it's deleted from existing shopper context. If `effectiveDateTime` value is set to `null` it's ignored. If an `effectiveDateTime` or customer qualifiiers' value is new, it's added to the existing Shopper context.
|
|
40
39
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Contexts `updateShopperContext` endpoint.
|
|
41
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-contexts?meta=updateShopperContext| Salesforce Developer Center} for more information about the API endpoint.
|
|
42
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercontexts.shoppercontexts-1.html#updateshoppercontext | `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
40
|
*/
|
|
45
41
|
UpdateShopperContext: 'updateShopperContext'
|
|
46
42
|
};
|
|
47
43
|
|
|
48
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Mutation for Shopper Contexts.
|
|
46
|
+
* @group ShopperContexts
|
|
47
|
+
* @category Mutation
|
|
48
|
+
*/
|
|
49
49
|
exports.ShopperContextsMutations = ShopperContextsMutations;
|
|
50
|
+
/**
|
|
51
|
+
* Mutation hook for Shopper Contexts.
|
|
52
|
+
* @group ShopperContexts
|
|
53
|
+
* @category Mutation
|
|
54
|
+
*/
|
|
50
55
|
function useShopperContextsMutation(mutation) {
|
|
51
56
|
const getCacheUpdates = _cache.cacheUpdateMatrix[mutation];
|
|
52
57
|
// TODO: Remove this check when all mutations are implemented.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { ApiClients, ApiQueryOptions, Argument, DataType, NullableParameters } from '../types';
|
|
3
|
-
|
|
3
|
+
type Client = ApiClients['shopperContexts'];
|
|
4
4
|
/**
|
|
5
|
-
* Gets the shopper's context based on the shopperJWT.
|
|
5
|
+
* Gets the shopper's context based on the shopperJWT.
|
|
6
|
+
* @group ShopperContexts
|
|
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 Contexts `getShopperContext` endpoint.
|
|
@@ -19,7 +19,9 @@ 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
|
-
* Gets the shopper's context based on the shopperJWT.
|
|
22
|
+
* Gets the shopper's context based on the shopperJWT.
|
|
23
|
+
* @group ShopperContexts
|
|
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 Contexts `getShopperContext` endpoint.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ShopperContexts } from 'commerce-sdk-isomorphic';
|
|
2
2
|
import { Argument, ExcludeTail } from '../types';
|
|
3
|
-
|
|
3
|
+
type Client = ShopperContexts<{
|
|
4
4
|
shortCode: string;
|
|
5
5
|
}>;
|
|
6
|
-
|
|
7
|
-
export
|
|
6
|
+
type Params<T extends keyof QueryKeys> = Partial<Argument<Client[T]>['parameters']>;
|
|
7
|
+
export type QueryKeys = {
|
|
8
8
|
getShopperContext: [
|
|
9
9
|
'/commerce-sdk-react',
|
|
10
10
|
'/organizations/',
|
|
@@ -14,7 +14,7 @@ export declare type QueryKeys = {
|
|
|
14
14
|
Params<'getShopperContext'>
|
|
15
15
|
];
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type QueryKeyHelper<T extends keyof QueryKeys> = {
|
|
18
18
|
/**
|
|
19
19
|
* Reduces the given parameters (which may have additional, unknown properties) to an object
|
|
20
20
|
* containing *only* the properties required for an endpoint.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiClients, CacheUpdateMatrix } from '../types';
|
|
2
|
-
|
|
2
|
+
type Client = ApiClients['shopperCustomers'];
|
|
3
3
|
export declare const cacheUpdateMatrix: CacheUpdateMatrix<Client>;
|
|
4
4
|
export {};
|
|
5
5
|
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -1,163 +1,103 @@
|
|
|
1
1
|
import { ApiClients, Argument, DataType } from '../types';
|
|
2
2
|
import { UseMutationResult } from '@tanstack/react-query';
|
|
3
|
-
|
|
4
|
-
/**
|
|
3
|
+
type Client = ApiClients['shopperCustomers'];
|
|
4
|
+
/**
|
|
5
|
+
* Mutations available for Shopper Customers.
|
|
6
|
+
* @group ShopperCustomers
|
|
7
|
+
* @category Mutation
|
|
8
|
+
* @enum
|
|
9
|
+
*/
|
|
5
10
|
export declare const ShopperCustomersMutations: {
|
|
6
11
|
/**
|
|
7
12
|
* Registers a new customer. The mandatory data are the credentials, profile last name, and email. This requires a JSON Web Token (JWT) which needs to be obtained using the POST /customers/auth API with type \"guest\".
|
|
8
13
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `registerCustomer` endpoint.
|
|
9
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=registerCustomer| Salesforce Developer Center} for more information about the API endpoint.
|
|
10
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#registercustomer | `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 RegisterCustomer: "registerCustomer";
|
|
14
16
|
/**
|
|
15
17
|
* Reset customer password, after obtaining a reset token. This is the second step in the reset customer password flow, where a customer password is reset by providing the new credentials along with a reset token. This call should be preceded by a call to the /create-reset-token endpoint.
|
|
16
18
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `resetPassword` endpoint.
|
|
17
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=resetPassword| Salesforce Developer Center} for more information about the API endpoint.
|
|
18
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#resetpassword | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
19
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
20
19
|
*/
|
|
21
20
|
readonly ResetPassword: "resetPassword";
|
|
22
21
|
/**
|
|
23
22
|
* Get reset password token. This is the first step in the reset customer password flow, where a password reset token is requested for future use to reset a customer password. This call should be followed by a call to the /reset endpoint.
|
|
24
23
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `getResetPasswordToken` endpoint.
|
|
25
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=getResetPasswordToken| Salesforce Developer Center} for more information about the API endpoint.
|
|
26
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#getresetpasswordtoken | `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
24
|
*/
|
|
29
25
|
readonly GetResetPasswordToken: "getResetPasswordToken";
|
|
30
26
|
/**
|
|
31
27
|
* Updates a customer.
|
|
32
28
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomer` endpoint.
|
|
33
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomer| Salesforce Developer Center} for more information about the API endpoint.
|
|
34
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomer | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
35
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
36
29
|
*/
|
|
37
30
|
readonly UpdateCustomer: "updateCustomer";
|
|
38
31
|
/**
|
|
39
32
|
* Creates a new address with the given name for the given customer.
|
|
40
33
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerAddress` endpoint.
|
|
41
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerAddress| Salesforce Developer Center} for more information about the API endpoint.
|
|
42
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomeraddress | `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
34
|
*/
|
|
45
35
|
readonly CreateCustomerAddress: "createCustomerAddress";
|
|
46
36
|
/**
|
|
47
37
|
* Deletes a customer's address by address name.
|
|
48
38
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `removeCustomerAddress` endpoint.
|
|
49
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=removeCustomerAddress| Salesforce Developer Center} for more information about the API endpoint.
|
|
50
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#removecustomeraddress | `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
39
|
*/
|
|
53
40
|
readonly RemoveCustomerAddress: "removeCustomerAddress";
|
|
54
41
|
/**
|
|
55
42
|
* Updates a customer's address by address name.
|
|
56
43
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerAddress` endpoint.
|
|
57
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerAddress| Salesforce Developer Center} for more information about the API endpoint.
|
|
58
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomeraddress | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
59
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
60
44
|
*/
|
|
61
45
|
readonly UpdateCustomerAddress: "updateCustomerAddress";
|
|
62
46
|
/**
|
|
63
47
|
* Updates the customer's password.
|
|
64
48
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerPassword` endpoint.
|
|
65
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerPassword| Salesforce Developer Center} for more information about the API endpoint.
|
|
66
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomerpassword | `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
49
|
*/
|
|
69
50
|
readonly UpdateCustomerPassword: "updateCustomerPassword";
|
|
70
51
|
/**
|
|
71
52
|
* Adds a payment instrument to the customer information.
|
|
72
53
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerPaymentInstrument` endpoint.
|
|
73
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerPaymentInstrument| Salesforce Developer Center} for more information about the API endpoint.
|
|
74
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomerpaymentinstrument | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
75
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
76
54
|
*/
|
|
77
55
|
readonly CreateCustomerPaymentInstrument: "createCustomerPaymentInstrument";
|
|
78
56
|
/**
|
|
79
57
|
* Deletes a customer's payment instrument.
|
|
80
58
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `deleteCustomerPaymentInstrument` endpoint.
|
|
81
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=deleteCustomerPaymentInstrument| Salesforce Developer Center} for more information about the API endpoint.
|
|
82
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#deletecustomerpaymentinstrument | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
83
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
84
59
|
*/
|
|
85
60
|
readonly DeleteCustomerPaymentInstrument: "deleteCustomerPaymentInstrument";
|
|
86
61
|
/**
|
|
87
62
|
* Creates a customer product list.
|
|
88
63
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerProductList` endpoint.
|
|
89
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerProductList| Salesforce Developer Center} for more information about the API endpoint.
|
|
90
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomerproductlist | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
91
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
92
64
|
*/
|
|
93
65
|
readonly CreateCustomerProductList: "createCustomerProductList";
|
|
94
66
|
/**
|
|
95
67
|
* Deletes a customer product list.
|
|
96
68
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `deleteCustomerProductList` endpoint.
|
|
97
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=deleteCustomerProductList| Salesforce Developer Center} for more information about the API endpoint.
|
|
98
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#deletecustomerproductlist | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
99
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
100
69
|
*/
|
|
101
70
|
readonly DeleteCustomerProductList: "deleteCustomerProductList";
|
|
102
71
|
/**
|
|
103
72
|
* Changes a product list. Changeable properties are the name, description, and if the list is public.
|
|
104
73
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerProductList` endpoint.
|
|
105
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerProductList| Salesforce Developer Center} for more information about the API endpoint.
|
|
106
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomerproductlist | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
107
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
108
74
|
*/
|
|
109
75
|
readonly UpdateCustomerProductList: "updateCustomerProductList";
|
|
110
76
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
type: A valid type, mandatory. This is the type of the item to be added to the customer's product.
|
|
114
|
-
list.
|
|
115
|
-
priority: This is the priority of the item to be added to the customer's product list.
|
|
116
|
-
public: This is the flag whether the item to be added to the customer's product list is public.
|
|
117
|
-
product_id: A valid product ID, used for product item type only. This is the ID (SKU)
|
|
118
|
-
of the product related to the item to be added to the customer's product list. It is mandatory for
|
|
119
|
-
product item type, and it must be a valid product id, otherwise
|
|
120
|
-
ProductListProductIdMissingException or ProductListProductNotFoundException
|
|
121
|
-
will be thrown.
|
|
122
|
-
quantity: Used for product item type only. This is the quantity of the item to be
|
|
123
|
-
added to the customer's product list.
|
|
124
|
-
custom properties in the form c_\<CUSTOM_NAME\>: The custom property must correspond to a custom
|
|
125
|
-
attribute (\<CUSTOM_NAME\>) defined for ProductListItem. The value of this property must be valid for the
|
|
126
|
-
type of custom attribute defined for ProductListItem.
|
|
127
|
-
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerProductListItem` endpoint.
|
|
128
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerProductListItem| Salesforce Developer Center} for more information about the API endpoint.
|
|
129
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomerproductlistitem | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
130
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
131
|
-
*/
|
|
77
|
+
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerProductListItem` endpoint.
|
|
78
|
+
*/
|
|
132
79
|
readonly CreateCustomerProductListItem: "createCustomerProductListItem";
|
|
133
80
|
/**
|
|
134
81
|
* Removes an item from a customer product list.
|
|
135
82
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `deleteCustomerProductListItem` endpoint.
|
|
136
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=deleteCustomerProductListItem| Salesforce Developer Center} for more information about the API endpoint.
|
|
137
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#deletecustomerproductlistitem | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
138
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
139
83
|
*/
|
|
140
84
|
readonly DeleteCustomerProductListItem: "deleteCustomerProductListItem";
|
|
141
85
|
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
priority: This is the priority of the customer's product list item.
|
|
146
|
-
public: This is the flag whether the customer's product list item is public.
|
|
147
|
-
quantity: This is the quantity of
|
|
148
|
-
the customer's product list item. Used for product item type only.
|
|
149
|
-
custom properties in the form c_\<CUSTOM_NAME\>: The custom property
|
|
150
|
-
must correspond to a custom attribute (\<CUSTOM_NAME\>) defined for ProductListItem.
|
|
151
|
-
The value of this property must be valid for the type of custom attribute defined for ProductListItem.
|
|
152
|
-
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerProductListItem` endpoint.
|
|
153
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerProductListItem| Salesforce Developer Center} for more information about the API endpoint.
|
|
154
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomerproductlistitem | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
155
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
156
|
-
*/
|
|
86
|
+
* Updates an item of a customer's product list.
|
|
87
|
+
*/
|
|
157
88
|
readonly UpdateCustomerProductListItem: "updateCustomerProductListItem";
|
|
158
89
|
};
|
|
159
|
-
/**
|
|
160
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Mutation for Shopper Customers.
|
|
92
|
+
* @group ShopperCustomers
|
|
93
|
+
* @category Mutation
|
|
94
|
+
*/
|
|
95
|
+
export type ShopperCustomersMutation = (typeof ShopperCustomersMutations)[keyof typeof ShopperCustomersMutations];
|
|
96
|
+
/**
|
|
97
|
+
* Mutation hook for Shopper Customers.
|
|
98
|
+
* @group ShopperCustomers
|
|
99
|
+
* @category Mutation
|
|
100
|
+
*/
|
|
161
101
|
export declare function useShopperCustomersMutation<Mutation extends ShopperCustomersMutation>(mutation: Mutation): UseMutationResult<DataType<Client[Mutation]>, unknown, Argument<Client[Mutation]>>;
|
|
162
102
|
export {};
|
|
163
103
|
//# sourceMappingURL=mutation.d.ts.map
|
|
@@ -17,171 +17,110 @@ 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
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Mutations available for Shopper Customers.
|
|
22
|
+
* @group ShopperCustomers
|
|
23
|
+
* @category Mutation
|
|
24
|
+
* @enum
|
|
25
|
+
*/
|
|
21
26
|
const ShopperCustomersMutations = {
|
|
22
27
|
/**
|
|
23
28
|
* Registers a new customer. The mandatory data are the credentials, profile last name, and email. This requires a JSON Web Token (JWT) which needs to be obtained using the POST /customers/auth API with type \"guest\".
|
|
24
29
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `registerCustomer` endpoint.
|
|
25
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=registerCustomer| Salesforce Developer Center} for more information about the API endpoint.
|
|
26
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#registercustomer | `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
|
RegisterCustomer: 'registerCustomer',
|
|
30
32
|
/**
|
|
31
33
|
* Reset customer password, after obtaining a reset token. This is the second step in the reset customer password flow, where a customer password is reset by providing the new credentials along with a reset token. This call should be preceded by a call to the /create-reset-token endpoint.
|
|
32
34
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `resetPassword` endpoint.
|
|
33
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=resetPassword| Salesforce Developer Center} for more information about the API endpoint.
|
|
34
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#resetpassword | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
35
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
36
35
|
*/
|
|
37
36
|
ResetPassword: 'resetPassword',
|
|
38
37
|
/**
|
|
39
38
|
* Get reset password token. This is the first step in the reset customer password flow, where a password reset token is requested for future use to reset a customer password. This call should be followed by a call to the /reset endpoint.
|
|
40
39
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `getResetPasswordToken` endpoint.
|
|
41
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=getResetPasswordToken| Salesforce Developer Center} for more information about the API endpoint.
|
|
42
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#getresetpasswordtoken | `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
40
|
*/
|
|
45
41
|
GetResetPasswordToken: 'getResetPasswordToken',
|
|
46
42
|
// TODO: Re-implement (and update description from RAML spec) when the endpoint exits closed beta.
|
|
47
43
|
// /**
|
|
48
44
|
// * Registers a new external profile for a customer. This endpoint is in closed beta, available to select few customers. Please get in touch with your Account Team if you'd like to participate in the beta program
|
|
49
45
|
// * @returns A TanStack Query mutation hook for interacting with the Shopper Customers `registerExternalProfile` endpoint.
|
|
50
|
-
// * @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=registerExternalProfile| Salesforce Developer Center} for more information about the API endpoint.
|
|
51
|
-
// * @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#registerexternalprofile | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
52
|
-
// * @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
53
46
|
// */
|
|
54
47
|
// RegisterExternalProfile: 'registerExternalProfile',
|
|
55
48
|
/**
|
|
56
49
|
* Updates a customer.
|
|
57
50
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomer` endpoint.
|
|
58
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomer| Salesforce Developer Center} for more information about the API endpoint.
|
|
59
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomer | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
60
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
61
51
|
*/
|
|
62
52
|
UpdateCustomer: 'updateCustomer',
|
|
63
53
|
/**
|
|
64
54
|
* Creates a new address with the given name for the given customer.
|
|
65
55
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerAddress` endpoint.
|
|
66
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerAddress| Salesforce Developer Center} for more information about the API endpoint.
|
|
67
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomeraddress | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
68
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
69
56
|
*/
|
|
70
57
|
CreateCustomerAddress: 'createCustomerAddress',
|
|
71
58
|
/**
|
|
72
59
|
* Deletes a customer's address by address name.
|
|
73
60
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `removeCustomerAddress` endpoint.
|
|
74
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=removeCustomerAddress| Salesforce Developer Center} for more information about the API endpoint.
|
|
75
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#removecustomeraddress | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
76
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
77
61
|
*/
|
|
78
62
|
RemoveCustomerAddress: 'removeCustomerAddress',
|
|
79
63
|
/**
|
|
80
64
|
* Updates a customer's address by address name.
|
|
81
65
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerAddress` endpoint.
|
|
82
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerAddress| Salesforce Developer Center} for more information about the API endpoint.
|
|
83
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomeraddress | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
84
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
85
66
|
*/
|
|
86
67
|
UpdateCustomerAddress: 'updateCustomerAddress',
|
|
87
68
|
/**
|
|
88
69
|
* Updates the customer's password.
|
|
89
70
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerPassword` endpoint.
|
|
90
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerPassword| Salesforce Developer Center} for more information about the API endpoint.
|
|
91
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomerpassword | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
92
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
93
71
|
*/
|
|
94
72
|
UpdateCustomerPassword: 'updateCustomerPassword',
|
|
95
73
|
/**
|
|
96
74
|
* Adds a payment instrument to the customer information.
|
|
97
75
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerPaymentInstrument` endpoint.
|
|
98
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerPaymentInstrument| Salesforce Developer Center} for more information about the API endpoint.
|
|
99
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomerpaymentinstrument | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
100
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
101
76
|
*/
|
|
102
77
|
CreateCustomerPaymentInstrument: 'createCustomerPaymentInstrument',
|
|
103
78
|
/**
|
|
104
79
|
* Deletes a customer's payment instrument.
|
|
105
80
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `deleteCustomerPaymentInstrument` endpoint.
|
|
106
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=deleteCustomerPaymentInstrument| Salesforce Developer Center} for more information about the API endpoint.
|
|
107
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#deletecustomerpaymentinstrument | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
108
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
109
81
|
*/
|
|
110
82
|
DeleteCustomerPaymentInstrument: 'deleteCustomerPaymentInstrument',
|
|
111
83
|
/**
|
|
112
84
|
* Creates a customer product list.
|
|
113
85
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerProductList` endpoint.
|
|
114
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerProductList| Salesforce Developer Center} for more information about the API endpoint.
|
|
115
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomerproductlist | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
116
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
117
86
|
*/
|
|
118
87
|
CreateCustomerProductList: 'createCustomerProductList',
|
|
119
88
|
/**
|
|
120
89
|
* Deletes a customer product list.
|
|
121
90
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `deleteCustomerProductList` endpoint.
|
|
122
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=deleteCustomerProductList| Salesforce Developer Center} for more information about the API endpoint.
|
|
123
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#deletecustomerproductlist | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
124
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
125
91
|
*/
|
|
126
92
|
DeleteCustomerProductList: 'deleteCustomerProductList',
|
|
127
93
|
/**
|
|
128
94
|
* Changes a product list. Changeable properties are the name, description, and if the list is public.
|
|
129
95
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerProductList` endpoint.
|
|
130
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerProductList| Salesforce Developer Center} for more information about the API endpoint.
|
|
131
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomerproductlist | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
132
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
133
96
|
*/
|
|
134
97
|
UpdateCustomerProductList: 'updateCustomerProductList',
|
|
135
98
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
list.
|
|
139
|
-
priority: This is the priority of the item to be added to the customer's product list.
|
|
140
|
-
public: This is the flag whether the item to be added to the customer's product list is public.
|
|
141
|
-
product_id: A valid product ID, used for product item type only. This is the ID (SKU)
|
|
142
|
-
of the product related to the item to be added to the customer's product list. It is mandatory for
|
|
143
|
-
product item type, and it must be a valid product id, otherwise
|
|
144
|
-
ProductListProductIdMissingException or ProductListProductNotFoundException
|
|
145
|
-
will be thrown.
|
|
146
|
-
quantity: Used for product item type only. This is the quantity of the item to be
|
|
147
|
-
added to the customer's product list.
|
|
148
|
-
custom properties in the form c_\<CUSTOM_NAME\>: The custom property must correspond to a custom
|
|
149
|
-
attribute (\<CUSTOM_NAME\>) defined for ProductListItem. The value of this property must be valid for the
|
|
150
|
-
type of custom attribute defined for ProductListItem.
|
|
151
|
-
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerProductListItem` endpoint.
|
|
152
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=createCustomerProductListItem| Salesforce Developer Center} for more information about the API endpoint.
|
|
153
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#createcustomerproductlistitem | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
154
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
155
|
-
*/
|
|
99
|
+
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `createCustomerProductListItem` endpoint.
|
|
100
|
+
*/
|
|
156
101
|
CreateCustomerProductListItem: 'createCustomerProductListItem',
|
|
157
102
|
/**
|
|
158
103
|
* Removes an item from a customer product list.
|
|
159
104
|
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `deleteCustomerProductListItem` endpoint.
|
|
160
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=deleteCustomerProductListItem| Salesforce Developer Center} for more information about the API endpoint.
|
|
161
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#deletecustomerproductlistitem | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
162
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
163
105
|
*/
|
|
164
106
|
DeleteCustomerProductListItem: 'deleteCustomerProductListItem',
|
|
165
107
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
priority: This is the priority of the customer's product list item.
|
|
169
|
-
public: This is the flag whether the customer's product list item is public.
|
|
170
|
-
quantity: This is the quantity of
|
|
171
|
-
the customer's product list item. Used for product item type only.
|
|
172
|
-
custom properties in the form c_\<CUSTOM_NAME\>: The custom property
|
|
173
|
-
must correspond to a custom attribute (\<CUSTOM_NAME\>) defined for ProductListItem.
|
|
174
|
-
The value of this property must be valid for the type of custom attribute defined for ProductListItem.
|
|
175
|
-
* @returns A TanStack Query mutation hook for interacting with the Shopper Customers `updateCustomerProductListItem` endpoint.
|
|
176
|
-
* @see {@link https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-customers?meta=updateCustomerProductListItem| Salesforce Developer Center} for more information about the API endpoint.
|
|
177
|
-
* @see {@link https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/classes/shoppercustomers.shoppercustomers-1.html#updatecustomerproductlistitem | `commerce-sdk-isomorphic` documentation} for more information on the parameters and returned data type.
|
|
178
|
-
* @see {@link https://tanstack.com/query/latest/docs/react/reference/useMutation | TanStack Query `useMutation` reference} for more information about the return value.
|
|
179
|
-
*/
|
|
108
|
+
* Updates an item of a customer's product list.
|
|
109
|
+
*/
|
|
180
110
|
UpdateCustomerProductListItem: 'updateCustomerProductListItem'
|
|
181
111
|
};
|
|
182
112
|
|
|
183
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* Mutation for Shopper Customers.
|
|
115
|
+
* @group ShopperCustomers
|
|
116
|
+
* @category Mutation
|
|
117
|
+
*/
|
|
184
118
|
exports.ShopperCustomersMutations = ShopperCustomersMutations;
|
|
119
|
+
/**
|
|
120
|
+
* Mutation hook for Shopper Customers.
|
|
121
|
+
* @group ShopperCustomers
|
|
122
|
+
* @category Mutation
|
|
123
|
+
*/
|
|
185
124
|
function useShopperCustomersMutation(mutation) {
|
|
186
125
|
const getCacheUpdates = _cache.cacheUpdateMatrix[mutation];
|
|
187
126
|
// TODO: Remove this check when all mutations are implemented.
|