@epcc-sdk/sdks-shopper 0.0.43 → 0.2.0

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/README.md CHANGED
@@ -1218,6 +1218,37 @@ const result: UpdateRuleResponse = await updateRule(params);
1218
1218
 
1219
1219
  ---
1220
1220
 
1221
+ ### **`validateCatalogRules`**
1222
+
1223
+ **Endpoint:** `POST /catalogs/rules/validate`
1224
+
1225
+ **Summary:** Validate catalog rules for a given context
1226
+
1227
+ **Description:** Validates catalog rules for a given context and returns a list of matching catalog rules.
1228
+
1229
+
1230
+ **TypeScript Example:**
1231
+
1232
+ ```typescript
1233
+ import { validateCatalogRules, type ValidateCatalogRulesData, type ValidateCatalogRulesResponse } from "@epcc-sdk/sdks-shopper";
1234
+
1235
+ const params: ValidateCatalogRulesData = {
1236
+ query: {
1237
+ "page[limit]": 10, // OPTIONAL
1238
+ "page[offset]": 0, // OPTIONAL
1239
+ },
1240
+ body: {
1241
+ data: {
1242
+ type: "resource"
1243
+ }
1244
+ },
1245
+ };
1246
+
1247
+ const result: ValidateCatalogRulesResponse = await validateCatalogRules(params);
1248
+ ```
1249
+
1250
+ ---
1251
+
1221
1252
  ### **`getAllHierarchies`**
1222
1253
 
1223
1254
  **Endpoint:** `GET /catalogs/{catalog_id}/releases/{release_id}/hierarchies`
@@ -1574,6 +1605,7 @@ const params: GetComponentProductIdsData = {
1574
1605
  },
1575
1606
  headers: {
1576
1607
  "EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
1608
+ "EP-Pricebook-IDs-Of-Available-Prices-To-Show": "header-value", // OPTIONAL
1577
1609
  },
1578
1610
  };
1579
1611
 
@@ -1608,7 +1640,7 @@ const params: GetChildProductsData = {
1608
1640
  },
1609
1641
  headers: {
1610
1642
  "EP-Pricebook-IDs-For-Price-Segmentation-Preview": "header-value", // OPTIONAL
1611
- "accept-language": "en-US", // OPTIONAL
1643
+ "EP-Pricebook-IDs-Of-Available-Prices-To-Show": "header-value", // OPTIONAL
1612
1644
  },
1613
1645
  };
1614
1646
 
@@ -21,6 +21,9 @@ __export(react_query_gen_exports, {
21
21
  addCustomDiscountToCartItemMutation: () => addCustomDiscountToCartItemMutation,
22
22
  addCustomDiscountToCartItemOptions: () => addCustomDiscountToCartItemOptions,
23
23
  addCustomDiscountToCartItemQueryKey: () => addCustomDiscountToCartItemQueryKey,
24
+ addTaxItemToCartItemComponentMutation: () => addTaxItemToCartItemComponentMutation,
25
+ addTaxItemToCartItemComponentOptions: () => addTaxItemToCartItemComponentOptions,
26
+ addTaxItemToCartItemComponentQueryKey: () => addTaxItemToCartItemComponentQueryKey,
24
27
  addTaxItemToCartMutation: () => addTaxItemToCartMutation,
25
28
  addTaxItemToCartOptions: () => addTaxItemToCartOptions,
26
29
  addTaxItemToCartQueryKey: () => addTaxItemToCartQueryKey,
@@ -101,6 +104,7 @@ __export(react_query_gen_exports, {
101
104
  deleteReleaseByIdMutation: () => deleteReleaseByIdMutation,
102
105
  deleteReleasesMutation: () => deleteReleasesMutation,
103
106
  deleteRuleByIdMutation: () => deleteRuleByIdMutation,
107
+ deleteTaxItemFromCartItemComponentMutation: () => deleteTaxItemFromCartItemComponentMutation,
104
108
  deleteV2AccountAddressMutation: () => deleteV2AccountAddressMutation,
105
109
  getACartOptions: () => getACartOptions,
106
110
  getACartQueryKey: () => getACartQueryKey,
@@ -234,6 +238,10 @@ __export(react_query_gen_exports, {
234
238
  getV2AccountsAccountIdQueryKey: () => getV2AccountsAccountIdQueryKey,
235
239
  getV2AccountsOptions: () => getV2AccountsOptions,
236
240
  getV2AccountsQueryKey: () => getV2AccountsQueryKey,
241
+ getV2SettingsCartOptions: () => getV2SettingsCartOptions,
242
+ getV2SettingsCartQueryKey: () => getV2SettingsCartQueryKey,
243
+ getV2SettingsCartStoreIdOptions: () => getV2SettingsCartStoreIdOptions,
244
+ getV2SettingsCartStoreIdQueryKey: () => getV2SettingsCartStoreIdQueryKey,
237
245
  listInvoicesOptions: () => listInvoicesOptions,
238
246
  listInvoicesQueryKey: () => listInvoicesQueryKey,
239
247
  listLocationsOptions: () => listLocationsOptions,
@@ -284,6 +292,8 @@ __export(react_query_gen_exports, {
284
292
  putShippingGroupByIdMutation: () => putShippingGroupByIdMutation,
285
293
  putV2AccountAddressMutation: () => putV2AccountAddressMutation,
286
294
  putV2AccountsAccountIdMutation: () => putV2AccountsAccountIdMutation,
295
+ putV2SettingsCartMutation: () => putV2SettingsCartMutation,
296
+ putV2SettingsCartStoreIdMutation: () => putV2SettingsCartStoreIdMutation,
287
297
  refundATransactionMutation: () => refundATransactionMutation,
288
298
  refundATransactionOptions: () => refundATransactionOptions,
289
299
  refundATransactionQueryKey: () => refundATransactionQueryKey,
@@ -297,7 +307,11 @@ __export(react_query_gen_exports, {
297
307
  updateCustomDiscountForCartMutation: () => updateCustomDiscountForCartMutation,
298
308
  updatePasswordProfileInfoMutation: () => updatePasswordProfileInfoMutation,
299
309
  updateRuleMutation: () => updateRuleMutation,
300
- updateShippingGroupMutation: () => updateShippingGroupMutation
310
+ updateShippingGroupMutation: () => updateShippingGroupMutation,
311
+ updateTaxItemFromCartItemComponentMutation: () => updateTaxItemFromCartItemComponentMutation,
312
+ validateCatalogRulesMutation: () => validateCatalogRulesMutation,
313
+ validateCatalogRulesOptions: () => validateCatalogRulesOptions,
314
+ validateCatalogRulesQueryKey: () => validateCatalogRulesQueryKey
301
315
  });
302
316
  module.exports = __toCommonJS(react_query_gen_exports);
303
317
  var import_react_query = require("@tanstack/react-query");
@@ -841,6 +855,34 @@ const updateRuleMutation = (options) => {
841
855
  };
842
856
  return mutationOptions;
843
857
  };
858
+ const validateCatalogRulesQueryKey = (options) => [createQueryKey("validateCatalogRules", options)];
859
+ const validateCatalogRulesOptions = (options) => {
860
+ return (0, import_react_query.queryOptions)({
861
+ queryFn: async ({ queryKey, signal }) => {
862
+ const { data } = await (0, import_sdk.validateCatalogRules)({
863
+ ...options,
864
+ ...queryKey[0],
865
+ signal,
866
+ throwOnError: true
867
+ });
868
+ return data;
869
+ },
870
+ queryKey: validateCatalogRulesQueryKey(options)
871
+ });
872
+ };
873
+ const validateCatalogRulesMutation = (options) => {
874
+ const mutationOptions = {
875
+ mutationFn: async (localOptions) => {
876
+ const { data } = await (0, import_sdk.validateCatalogRules)({
877
+ ...options,
878
+ ...localOptions,
879
+ throwOnError: true
880
+ });
881
+ return data;
882
+ }
883
+ };
884
+ return mutationOptions;
885
+ };
844
886
  const getAllHierarchiesQueryKey = (options) => [createQueryKey("getAllHierarchies", options)];
845
887
  const getAllHierarchiesOptions = (options) => {
846
888
  return (0, import_react_query.queryOptions)({
@@ -1373,6 +1415,60 @@ const addTaxItemToCartMutation = (options) => {
1373
1415
  };
1374
1416
  return mutationOptions;
1375
1417
  };
1418
+ const addTaxItemToCartItemComponentQueryKey = (options) => [createQueryKey("addTaxItemToCartItemComponent", options)];
1419
+ const addTaxItemToCartItemComponentOptions = (options) => {
1420
+ return (0, import_react_query.queryOptions)({
1421
+ queryFn: async ({ queryKey, signal }) => {
1422
+ const { data } = await (0, import_sdk.addTaxItemToCartItemComponent)({
1423
+ ...options,
1424
+ ...queryKey[0],
1425
+ signal,
1426
+ throwOnError: true
1427
+ });
1428
+ return data;
1429
+ },
1430
+ queryKey: addTaxItemToCartItemComponentQueryKey(options)
1431
+ });
1432
+ };
1433
+ const addTaxItemToCartItemComponentMutation = (options) => {
1434
+ const mutationOptions = {
1435
+ mutationFn: async (localOptions) => {
1436
+ const { data } = await (0, import_sdk.addTaxItemToCartItemComponent)({
1437
+ ...options,
1438
+ ...localOptions,
1439
+ throwOnError: true
1440
+ });
1441
+ return data;
1442
+ }
1443
+ };
1444
+ return mutationOptions;
1445
+ };
1446
+ const deleteTaxItemFromCartItemComponentMutation = (options) => {
1447
+ const mutationOptions = {
1448
+ mutationFn: async (localOptions) => {
1449
+ const { data } = await (0, import_sdk.deleteTaxItemFromCartItemComponent)({
1450
+ ...options,
1451
+ ...localOptions,
1452
+ throwOnError: true
1453
+ });
1454
+ return data;
1455
+ }
1456
+ };
1457
+ return mutationOptions;
1458
+ };
1459
+ const updateTaxItemFromCartItemComponentMutation = (options) => {
1460
+ const mutationOptions = {
1461
+ mutationFn: async (localOptions) => {
1462
+ const { data } = await (0, import_sdk.updateTaxItemFromCartItemComponent)({
1463
+ ...options,
1464
+ ...localOptions,
1465
+ throwOnError: true
1466
+ });
1467
+ return data;
1468
+ }
1469
+ };
1470
+ return mutationOptions;
1471
+ };
1376
1472
  const bulkDeleteTaxItemsFromCartMutation = (options) => {
1377
1473
  const mutationOptions = {
1378
1474
  mutationFn: async (localOptions) => {
@@ -2079,6 +2175,62 @@ const putShippingGroupByIdMutation = (options) => {
2079
2175
  };
2080
2176
  return mutationOptions;
2081
2177
  };
2178
+ const getV2SettingsCartQueryKey = (options) => [createQueryKey("getV2SettingsCart", options)];
2179
+ const getV2SettingsCartOptions = (options) => {
2180
+ return (0, import_react_query.queryOptions)({
2181
+ queryFn: async ({ queryKey, signal }) => {
2182
+ const { data } = await (0, import_sdk.getV2SettingsCart)({
2183
+ ...options,
2184
+ ...queryKey[0],
2185
+ signal,
2186
+ throwOnError: true
2187
+ });
2188
+ return data;
2189
+ },
2190
+ queryKey: getV2SettingsCartQueryKey(options)
2191
+ });
2192
+ };
2193
+ const putV2SettingsCartMutation = (options) => {
2194
+ const mutationOptions = {
2195
+ mutationFn: async (localOptions) => {
2196
+ const { data } = await (0, import_sdk.putV2SettingsCart)({
2197
+ ...options,
2198
+ ...localOptions,
2199
+ throwOnError: true
2200
+ });
2201
+ return data;
2202
+ }
2203
+ };
2204
+ return mutationOptions;
2205
+ };
2206
+ const getV2SettingsCartStoreIdQueryKey = (options) => [createQueryKey("getV2SettingsCartStoreId", options)];
2207
+ const getV2SettingsCartStoreIdOptions = (options) => {
2208
+ return (0, import_react_query.queryOptions)({
2209
+ queryFn: async ({ queryKey, signal }) => {
2210
+ const { data } = await (0, import_sdk.getV2SettingsCartStoreId)({
2211
+ ...options,
2212
+ ...queryKey[0],
2213
+ signal,
2214
+ throwOnError: true
2215
+ });
2216
+ return data;
2217
+ },
2218
+ queryKey: getV2SettingsCartStoreIdQueryKey(options)
2219
+ });
2220
+ };
2221
+ const putV2SettingsCartStoreIdMutation = (options) => {
2222
+ const mutationOptions = {
2223
+ mutationFn: async (localOptions) => {
2224
+ const { data } = await (0, import_sdk.putV2SettingsCartStoreId)({
2225
+ ...options,
2226
+ ...localOptions,
2227
+ throwOnError: true
2228
+ });
2229
+ return data;
2230
+ }
2231
+ };
2232
+ return mutationOptions;
2233
+ };
2082
2234
  const listOfferingsQueryKey = (options) => [
2083
2235
  createQueryKey("listOfferings", options)
2084
2236
  ];
@@ -2834,6 +2986,9 @@ const postMultiSearchMutation = (options) => {
2834
2986
  addCustomDiscountToCartItemMutation,
2835
2987
  addCustomDiscountToCartItemOptions,
2836
2988
  addCustomDiscountToCartItemQueryKey,
2989
+ addTaxItemToCartItemComponentMutation,
2990
+ addTaxItemToCartItemComponentOptions,
2991
+ addTaxItemToCartItemComponentQueryKey,
2837
2992
  addTaxItemToCartMutation,
2838
2993
  addTaxItemToCartOptions,
2839
2994
  addTaxItemToCartQueryKey,
@@ -2914,6 +3069,7 @@ const postMultiSearchMutation = (options) => {
2914
3069
  deleteReleaseByIdMutation,
2915
3070
  deleteReleasesMutation,
2916
3071
  deleteRuleByIdMutation,
3072
+ deleteTaxItemFromCartItemComponentMutation,
2917
3073
  deleteV2AccountAddressMutation,
2918
3074
  getACartOptions,
2919
3075
  getACartQueryKey,
@@ -3047,6 +3203,10 @@ const postMultiSearchMutation = (options) => {
3047
3203
  getV2AccountsAccountIdQueryKey,
3048
3204
  getV2AccountsOptions,
3049
3205
  getV2AccountsQueryKey,
3206
+ getV2SettingsCartOptions,
3207
+ getV2SettingsCartQueryKey,
3208
+ getV2SettingsCartStoreIdOptions,
3209
+ getV2SettingsCartStoreIdQueryKey,
3050
3210
  listInvoicesOptions,
3051
3211
  listInvoicesQueryKey,
3052
3212
  listLocationsOptions,
@@ -3097,6 +3257,8 @@ const postMultiSearchMutation = (options) => {
3097
3257
  putShippingGroupByIdMutation,
3098
3258
  putV2AccountAddressMutation,
3099
3259
  putV2AccountsAccountIdMutation,
3260
+ putV2SettingsCartMutation,
3261
+ putV2SettingsCartStoreIdMutation,
3100
3262
  refundATransactionMutation,
3101
3263
  refundATransactionOptions,
3102
3264
  refundATransactionQueryKey,
@@ -3110,6 +3272,10 @@ const postMultiSearchMutation = (options) => {
3110
3272
  updateCustomDiscountForCartMutation,
3111
3273
  updatePasswordProfileInfoMutation,
3112
3274
  updateRuleMutation,
3113
- updateShippingGroupMutation
3275
+ updateShippingGroupMutation,
3276
+ updateTaxItemFromCartItemComponentMutation,
3277
+ validateCatalogRulesMutation,
3278
+ validateCatalogRulesOptions,
3279
+ validateCatalogRulesQueryKey
3114
3280
  });
3115
3281
  //# sourceMappingURL=react-query.gen.cjs.map