@epcc-sdk/sdks-shopper 0.0.43 → 0.1.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 +33 -1
- package/dist/client/@tanstack/react-query.gen.cjs +36 -2
- package/dist/client/@tanstack/react-query.gen.cjs.map +1 -1
- package/dist/client/@tanstack/react-query.gen.d.cts +24 -2
- package/dist/client/@tanstack/react-query.gen.d.ts +24 -2
- package/dist/client/@tanstack/react-query.gen.mjs +33 -1
- package/dist/client/@tanstack/react-query.gen.mjs.map +1 -1
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.cjs +20 -2
- package/dist/client/sdk.gen.cjs.map +1 -1
- package/dist/client/sdk.gen.d.cts +10 -4
- package/dist/client/sdk.gen.d.ts +10 -4
- package/dist/client/sdk.gen.mjs +18 -1
- package/dist/client/sdk.gen.mjs.map +1 -1
- package/dist/client/transformers.gen.cjs +22 -2
- package/dist/client/transformers.gen.cjs.map +1 -1
- package/dist/client/transformers.gen.d.cts +3 -2
- package/dist/client/transformers.gen.d.ts +3 -2
- package/dist/client/transformers.gen.mjs +20 -1
- package/dist/client/transformers.gen.mjs.map +1 -1
- package/dist/client/types.gen.cjs.map +1 -1
- package/dist/client/types.gen.d.cts +301 -53
- package/dist/client/types.gen.d.ts +301 -53
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/react-query.d.cts +1 -1
- package/dist/react-query.d.ts +1 -1
- package/package.json +1 -1
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
|
-
"
|
|
1643
|
+
"EP-Pricebook-IDs-Of-Available-Prices-To-Show": "header-value", // OPTIONAL
|
|
1612
1644
|
},
|
|
1613
1645
|
};
|
|
1614
1646
|
|
|
@@ -297,7 +297,10 @@ __export(react_query_gen_exports, {
|
|
|
297
297
|
updateCustomDiscountForCartMutation: () => updateCustomDiscountForCartMutation,
|
|
298
298
|
updatePasswordProfileInfoMutation: () => updatePasswordProfileInfoMutation,
|
|
299
299
|
updateRuleMutation: () => updateRuleMutation,
|
|
300
|
-
updateShippingGroupMutation: () => updateShippingGroupMutation
|
|
300
|
+
updateShippingGroupMutation: () => updateShippingGroupMutation,
|
|
301
|
+
validateCatalogRulesMutation: () => validateCatalogRulesMutation,
|
|
302
|
+
validateCatalogRulesOptions: () => validateCatalogRulesOptions,
|
|
303
|
+
validateCatalogRulesQueryKey: () => validateCatalogRulesQueryKey
|
|
301
304
|
});
|
|
302
305
|
module.exports = __toCommonJS(react_query_gen_exports);
|
|
303
306
|
var import_react_query = require("@tanstack/react-query");
|
|
@@ -841,6 +844,34 @@ const updateRuleMutation = (options) => {
|
|
|
841
844
|
};
|
|
842
845
|
return mutationOptions;
|
|
843
846
|
};
|
|
847
|
+
const validateCatalogRulesQueryKey = (options) => [createQueryKey("validateCatalogRules", options)];
|
|
848
|
+
const validateCatalogRulesOptions = (options) => {
|
|
849
|
+
return (0, import_react_query.queryOptions)({
|
|
850
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
851
|
+
const { data } = await (0, import_sdk.validateCatalogRules)({
|
|
852
|
+
...options,
|
|
853
|
+
...queryKey[0],
|
|
854
|
+
signal,
|
|
855
|
+
throwOnError: true
|
|
856
|
+
});
|
|
857
|
+
return data;
|
|
858
|
+
},
|
|
859
|
+
queryKey: validateCatalogRulesQueryKey(options)
|
|
860
|
+
});
|
|
861
|
+
};
|
|
862
|
+
const validateCatalogRulesMutation = (options) => {
|
|
863
|
+
const mutationOptions = {
|
|
864
|
+
mutationFn: async (localOptions) => {
|
|
865
|
+
const { data } = await (0, import_sdk.validateCatalogRules)({
|
|
866
|
+
...options,
|
|
867
|
+
...localOptions,
|
|
868
|
+
throwOnError: true
|
|
869
|
+
});
|
|
870
|
+
return data;
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
return mutationOptions;
|
|
874
|
+
};
|
|
844
875
|
const getAllHierarchiesQueryKey = (options) => [createQueryKey("getAllHierarchies", options)];
|
|
845
876
|
const getAllHierarchiesOptions = (options) => {
|
|
846
877
|
return (0, import_react_query.queryOptions)({
|
|
@@ -3110,6 +3141,9 @@ const postMultiSearchMutation = (options) => {
|
|
|
3110
3141
|
updateCustomDiscountForCartMutation,
|
|
3111
3142
|
updatePasswordProfileInfoMutation,
|
|
3112
3143
|
updateRuleMutation,
|
|
3113
|
-
updateShippingGroupMutation
|
|
3144
|
+
updateShippingGroupMutation,
|
|
3145
|
+
validateCatalogRulesMutation,
|
|
3146
|
+
validateCatalogRulesOptions,
|
|
3147
|
+
validateCatalogRulesQueryKey
|
|
3114
3148
|
});
|
|
3115
3149
|
//# sourceMappingURL=react-query.gen.cjs.map
|