@digital8/lighting-illusions-ts-sdk 0.0.979 → 0.0.981

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 (124) hide show
  1. package/.openapi-generator/VERSION +1 -1
  2. package/README.md +3 -3
  3. package/dist/apis/AssetApi.d.ts +16 -0
  4. package/dist/apis/AssetApi.js +110 -58
  5. package/dist/apis/AttributeApi.d.ts +60 -0
  6. package/dist/apis/AttributeApi.js +424 -229
  7. package/dist/apis/DefinitionApi.d.ts +24 -0
  8. package/dist/apis/DefinitionApi.js +164 -86
  9. package/dist/apis/DocumentApi.d.ts +36 -0
  10. package/dist/apis/DocumentApi.js +250 -133
  11. package/dist/apis/ExternalApiLogApi.d.ts +4 -0
  12. package/dist/apis/ExternalApiLogApi.js +26 -13
  13. package/dist/apis/GoogleCategoryApi.d.ts +4 -0
  14. package/dist/apis/GoogleCategoryApi.js +26 -13
  15. package/dist/apis/OverlayTemplateApi.d.ts +48 -0
  16. package/dist/apis/OverlayTemplateApi.js +340 -184
  17. package/dist/apis/ProductApi.d.ts +84 -0
  18. package/dist/apis/ProductApi.js +600 -327
  19. package/dist/apis/ProductCategoryApi.d.ts +52 -0
  20. package/dist/apis/ProductCategoryApi.js +364 -195
  21. package/dist/apis/ProductTypeApi.d.ts +36 -0
  22. package/dist/apis/ProductTypeApi.js +256 -139
  23. package/dist/apis/SiteApi.d.ts +32 -0
  24. package/dist/apis/SiteApi.js +220 -116
  25. package/dist/apis/SupplierApi.d.ts +32 -0
  26. package/dist/apis/SupplierApi.js +234 -130
  27. package/dist/apis/TagApi.d.ts +32 -0
  28. package/dist/apis/TagApi.js +226 -122
  29. package/dist/models/AttachAttributeProductTypeRequest.d.ts +1 -1
  30. package/dist/models/AttachDocumentablesDocumentRequestDocumentablesInner.d.ts +1 -1
  31. package/dist/models/AttachProductTypeAttributeRequest.d.ts +1 -1
  32. package/dist/models/DetachAssetableOverlayTemplateRequest.d.ts +1 -1
  33. package/dist/models/DetachDocumentablesDocumentRequestDocumentablesInner.d.ts +1 -1
  34. package/dist/models/GetAllAttributeRequest.d.ts +3 -3
  35. package/dist/models/GetAllDefinitionRequest.d.ts +2 -2
  36. package/dist/models/GetAllDocumentRequest.d.ts +3 -3
  37. package/dist/models/GetAllGoogleCategoryRequest.d.ts +2 -2
  38. package/dist/models/GetAllOverlayTemplateRequest.d.ts +3 -3
  39. package/dist/models/GetAllProductCategoryRequest.d.ts +3 -3
  40. package/dist/models/GetAllProductChildRequest.d.ts +3 -3
  41. package/dist/models/GetAllProductRequest.d.ts +3 -3
  42. package/dist/models/GetAllProductTypeRequest.d.ts +3 -3
  43. package/dist/models/GetAllSupplierRequest.d.ts +3 -3
  44. package/dist/models/IndexAttributeRequest.d.ts +3 -3
  45. package/dist/models/IndexAttributeValueRequest.d.ts +3 -3
  46. package/dist/models/IndexDefinitionRequest.d.ts +2 -2
  47. package/dist/models/IndexDocumentRequest.d.ts +3 -3
  48. package/dist/models/IndexExternalApiLogRequest.d.ts +2 -2
  49. package/dist/models/IndexOverlayTemplateRequest.d.ts +3 -3
  50. package/dist/models/IndexProductCategoryRequest.d.ts +3 -3
  51. package/dist/models/IndexProductChildRequest.d.ts +3 -3
  52. package/dist/models/IndexProductRequest.d.ts +3 -3
  53. package/dist/models/IndexProductTypeRequest.d.ts +3 -3
  54. package/dist/models/IndexSiteNotificationRequest.d.ts +2 -2
  55. package/dist/models/IndexSiteRequest.d.ts +2 -2
  56. package/dist/models/IndexSupplierRequest.d.ts +3 -3
  57. package/dist/models/IndexTagRequest.d.ts +3 -3
  58. package/dist/models/PreviewAutomationRulesProductCategoryRequest.d.ts +1 -1
  59. package/dist/models/StoreAssetForAssetableRequest.d.ts +1 -1
  60. package/dist/models/StoreAttributeRequest.d.ts +1 -1
  61. package/dist/models/StoreOverlayTemplateAssetRequest.d.ts +1 -1
  62. package/dist/models/StoreProductCategoryRequest.d.ts +1 -1
  63. package/dist/models/StoreProductCategoryRequestAutomationRulesInner.d.ts +2 -2
  64. package/dist/models/StoreTagRequest.d.ts +1 -1
  65. package/dist/models/UpdateAttributeRequest.d.ts +1 -1
  66. package/dist/models/UpdateOverlayTemplateAssetRequest.d.ts +1 -1
  67. package/dist/models/UpdateProductCategoryRequest.d.ts +1 -1
  68. package/dist/models/UpdateSiteRequest.d.ts +1 -1
  69. package/dist/models/UpdateTagRequest.d.ts +1 -1
  70. package/package.json +1 -1
  71. package/src/apis/AssetApi.ts +48 -16
  72. package/src/apis/AttributeApi.ts +180 -60
  73. package/src/apis/DefinitionApi.ts +72 -24
  74. package/src/apis/DocumentApi.ts +108 -36
  75. package/src/apis/ExternalApiLogApi.ts +12 -4
  76. package/src/apis/GoogleCategoryApi.ts +12 -4
  77. package/src/apis/OverlayTemplateApi.ts +144 -48
  78. package/src/apis/ProductApi.ts +252 -84
  79. package/src/apis/ProductCategoryApi.ts +156 -52
  80. package/src/apis/ProductTypeApi.ts +108 -36
  81. package/src/apis/SiteApi.ts +96 -32
  82. package/src/apis/SupplierApi.ts +96 -32
  83. package/src/apis/TagApi.ts +96 -32
  84. package/src/models/AttachAttributeProductTypeRequest.ts +1 -1
  85. package/src/models/AttachDocumentablesDocumentRequestDocumentablesInner.ts +1 -1
  86. package/src/models/AttachProductTypeAttributeRequest.ts +1 -1
  87. package/src/models/DetachAssetableOverlayTemplateRequest.ts +1 -1
  88. package/src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts +1 -1
  89. package/src/models/GetAllAttributeRequest.ts +3 -3
  90. package/src/models/GetAllDefinitionRequest.ts +2 -2
  91. package/src/models/GetAllDocumentRequest.ts +3 -3
  92. package/src/models/GetAllGoogleCategoryRequest.ts +2 -2
  93. package/src/models/GetAllOverlayTemplateRequest.ts +3 -3
  94. package/src/models/GetAllProductCategoryRequest.ts +3 -3
  95. package/src/models/GetAllProductChildRequest.ts +3 -3
  96. package/src/models/GetAllProductRequest.ts +3 -3
  97. package/src/models/GetAllProductTypeRequest.ts +3 -3
  98. package/src/models/GetAllSupplierRequest.ts +3 -3
  99. package/src/models/IndexAttributeRequest.ts +3 -3
  100. package/src/models/IndexAttributeValueRequest.ts +3 -3
  101. package/src/models/IndexDefinitionRequest.ts +2 -2
  102. package/src/models/IndexDocumentRequest.ts +3 -3
  103. package/src/models/IndexExternalApiLogRequest.ts +2 -2
  104. package/src/models/IndexOverlayTemplateRequest.ts +3 -3
  105. package/src/models/IndexProductCategoryRequest.ts +3 -3
  106. package/src/models/IndexProductChildRequest.ts +3 -3
  107. package/src/models/IndexProductRequest.ts +3 -3
  108. package/src/models/IndexProductTypeRequest.ts +3 -3
  109. package/src/models/IndexSiteNotificationRequest.ts +2 -2
  110. package/src/models/IndexSiteRequest.ts +2 -2
  111. package/src/models/IndexSupplierRequest.ts +3 -3
  112. package/src/models/IndexTagRequest.ts +3 -3
  113. package/src/models/PreviewAutomationRulesProductCategoryRequest.ts +1 -1
  114. package/src/models/StoreAssetForAssetableRequest.ts +1 -1
  115. package/src/models/StoreAttributeRequest.ts +1 -1
  116. package/src/models/StoreOverlayTemplateAssetRequest.ts +1 -1
  117. package/src/models/StoreProductCategoryRequest.ts +1 -1
  118. package/src/models/StoreProductCategoryRequestAutomationRulesInner.ts +2 -2
  119. package/src/models/StoreTagRequest.ts +1 -1
  120. package/src/models/UpdateAttributeRequest.ts +1 -1
  121. package/src/models/UpdateOverlayTemplateAssetRequest.ts +1 -1
  122. package/src/models/UpdateProductCategoryRequest.ts +1 -1
  123. package/src/models/UpdateSiteRequest.ts +1 -1
  124. package/src/models/UpdateTagRequest.ts +1 -1
@@ -75,31 +75,44 @@ var ProductCategoryApi = /** @class */ (function (_super) {
75
75
  function ProductCategoryApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Creates request options for attachProductsProductCategory without sending the request
80
+ */
81
+ ProductCategoryApi.prototype.attachProductsProductCategoryRequestOpts = function (requestParameters) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, urlPath;
84
+ return __generator(this, function (_a) {
85
+ if (requestParameters['productCategory'] == null) {
86
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling attachProductsProductCategory().');
87
+ }
88
+ queryParameters = {};
89
+ headerParameters = {};
90
+ headerParameters['Content-Type'] = 'application/json';
91
+ urlPath = "/admin-api/product-category/{productCategory}/attach-products";
92
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
93
+ return [2 /*return*/, {
94
+ path: urlPath,
95
+ method: 'POST',
96
+ headers: headerParameters,
97
+ query: queryParameters,
98
+ body: (0, index_1.AttachProductsProductCategoryRequestToJSON)(requestParameters['attachProductsProductCategoryRequest']),
99
+ }];
100
+ });
101
+ });
102
+ };
78
103
  /**
79
104
  * Auto-generated: attachProductsProductCategory
80
105
  */
81
106
  ProductCategoryApi.prototype.attachProductsProductCategoryRaw = function (requestParameters, initOverrides) {
82
107
  return __awaiter(this, void 0, void 0, function () {
83
- var queryParameters, headerParameters, urlPath, response;
108
+ var requestOptions, response;
84
109
  return __generator(this, function (_a) {
85
110
  switch (_a.label) {
86
- case 0:
87
- if (requestParameters['productCategory'] == null) {
88
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling attachProductsProductCategory().');
89
- }
90
- queryParameters = {};
91
- headerParameters = {};
92
- headerParameters['Content-Type'] = 'application/json';
93
- urlPath = "/admin-api/product-category/{productCategory}/attach-products";
94
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
95
- return [4 /*yield*/, this.request({
96
- path: urlPath,
97
- method: 'POST',
98
- headers: headerParameters,
99
- query: queryParameters,
100
- body: (0, index_1.AttachProductsProductCategoryRequestToJSON)(requestParameters['attachProductsProductCategoryRequest']),
101
- }, initOverrides)];
111
+ case 0: return [4 /*yield*/, this.attachProductsProductCategoryRequestOpts(requestParameters)];
102
112
  case 1:
113
+ requestOptions = _a.sent();
114
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
115
+ case 2:
103
116
  response = _a.sent();
104
117
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryResourceFromJSON)(jsonValue); })];
105
118
  }
@@ -123,29 +136,42 @@ var ProductCategoryApi = /** @class */ (function (_super) {
123
136
  });
124
137
  });
125
138
  };
139
+ /**
140
+ * Creates request options for bulkDetachProductsProductCategory without sending the request
141
+ */
142
+ ProductCategoryApi.prototype.bulkDetachProductsProductCategoryRequestOpts = function (requestParameters) {
143
+ return __awaiter(this, void 0, void 0, function () {
144
+ var queryParameters, headerParameters, urlPath;
145
+ return __generator(this, function (_a) {
146
+ if (requestParameters['productCategory'] == null) {
147
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling bulkDetachProductsProductCategory().');
148
+ }
149
+ queryParameters = {};
150
+ headerParameters = {};
151
+ urlPath = "/admin-api/product-category/{productCategory}/bulk-detach-products";
152
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
153
+ return [2 /*return*/, {
154
+ path: urlPath,
155
+ method: 'DELETE',
156
+ headers: headerParameters,
157
+ query: queryParameters,
158
+ }];
159
+ });
160
+ });
161
+ };
126
162
  /**
127
163
  * Auto-generated: bulkDetachProductsProductCategory
128
164
  */
129
165
  ProductCategoryApi.prototype.bulkDetachProductsProductCategoryRaw = function (requestParameters, initOverrides) {
130
166
  return __awaiter(this, void 0, void 0, function () {
131
- var queryParameters, headerParameters, urlPath, response;
167
+ var requestOptions, response;
132
168
  return __generator(this, function (_a) {
133
169
  switch (_a.label) {
134
- case 0:
135
- if (requestParameters['productCategory'] == null) {
136
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling bulkDetachProductsProductCategory().');
137
- }
138
- queryParameters = {};
139
- headerParameters = {};
140
- urlPath = "/admin-api/product-category/{productCategory}/bulk-detach-products";
141
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
142
- return [4 /*yield*/, this.request({
143
- path: urlPath,
144
- method: 'DELETE',
145
- headers: headerParameters,
146
- query: queryParameters,
147
- }, initOverrides)];
170
+ case 0: return [4 /*yield*/, this.bulkDetachProductsProductCategoryRequestOpts(requestParameters)];
148
171
  case 1:
172
+ requestOptions = _a.sent();
173
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
174
+ case 2:
149
175
  response = _a.sent();
150
176
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GenericResponseFromJSON)(jsonValue); })];
151
177
  }
@@ -169,29 +195,42 @@ var ProductCategoryApi = /** @class */ (function (_super) {
169
195
  });
170
196
  });
171
197
  };
198
+ /**
199
+ * Creates request options for destroyProductCategory without sending the request
200
+ */
201
+ ProductCategoryApi.prototype.destroyProductCategoryRequestOpts = function (requestParameters) {
202
+ return __awaiter(this, void 0, void 0, function () {
203
+ var queryParameters, headerParameters, urlPath;
204
+ return __generator(this, function (_a) {
205
+ if (requestParameters['productCategory'] == null) {
206
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling destroyProductCategory().');
207
+ }
208
+ queryParameters = {};
209
+ headerParameters = {};
210
+ urlPath = "/admin-api/product-category/{productCategory}/delete";
211
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
212
+ return [2 /*return*/, {
213
+ path: urlPath,
214
+ method: 'DELETE',
215
+ headers: headerParameters,
216
+ query: queryParameters,
217
+ }];
218
+ });
219
+ });
220
+ };
172
221
  /**
173
222
  * Auto-generated: destroyProductCategory
174
223
  */
175
224
  ProductCategoryApi.prototype.destroyProductCategoryRaw = function (requestParameters, initOverrides) {
176
225
  return __awaiter(this, void 0, void 0, function () {
177
- var queryParameters, headerParameters, urlPath, response;
226
+ var requestOptions, response;
178
227
  return __generator(this, function (_a) {
179
228
  switch (_a.label) {
180
- case 0:
181
- if (requestParameters['productCategory'] == null) {
182
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling destroyProductCategory().');
183
- }
184
- queryParameters = {};
185
- headerParameters = {};
186
- urlPath = "/admin-api/product-category/{productCategory}/delete";
187
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
188
- return [4 /*yield*/, this.request({
189
- path: urlPath,
190
- method: 'DELETE',
191
- headers: headerParameters,
192
- query: queryParameters,
193
- }, initOverrides)];
229
+ case 0: return [4 /*yield*/, this.destroyProductCategoryRequestOpts(requestParameters)];
194
230
  case 1:
231
+ requestOptions = _a.sent();
232
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
233
+ case 2:
195
234
  response = _a.sent();
196
235
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GenericResponseFromJSON)(jsonValue); })];
197
236
  }
@@ -215,31 +254,44 @@ var ProductCategoryApi = /** @class */ (function (_super) {
215
254
  });
216
255
  });
217
256
  };
257
+ /**
258
+ * Creates request options for detachProductsProductCategory without sending the request
259
+ */
260
+ ProductCategoryApi.prototype.detachProductsProductCategoryRequestOpts = function (requestParameters) {
261
+ return __awaiter(this, void 0, void 0, function () {
262
+ var queryParameters, headerParameters, urlPath;
263
+ return __generator(this, function (_a) {
264
+ if (requestParameters['productCategory'] == null) {
265
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling detachProductsProductCategory().');
266
+ }
267
+ queryParameters = {};
268
+ headerParameters = {};
269
+ headerParameters['Content-Type'] = 'application/json';
270
+ urlPath = "/admin-api/product-category/{productCategory}/detach-products";
271
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
272
+ return [2 /*return*/, {
273
+ path: urlPath,
274
+ method: 'POST',
275
+ headers: headerParameters,
276
+ query: queryParameters,
277
+ body: (0, index_1.DetachProductsProductCategoryRequestToJSON)(requestParameters['detachProductsProductCategoryRequest']),
278
+ }];
279
+ });
280
+ });
281
+ };
218
282
  /**
219
283
  * Auto-generated: detachProductsProductCategory
220
284
  */
221
285
  ProductCategoryApi.prototype.detachProductsProductCategoryRaw = function (requestParameters, initOverrides) {
222
286
  return __awaiter(this, void 0, void 0, function () {
223
- var queryParameters, headerParameters, urlPath, response;
287
+ var requestOptions, response;
224
288
  return __generator(this, function (_a) {
225
289
  switch (_a.label) {
226
- case 0:
227
- if (requestParameters['productCategory'] == null) {
228
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling detachProductsProductCategory().');
229
- }
230
- queryParameters = {};
231
- headerParameters = {};
232
- headerParameters['Content-Type'] = 'application/json';
233
- urlPath = "/admin-api/product-category/{productCategory}/detach-products";
234
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
235
- return [4 /*yield*/, this.request({
236
- path: urlPath,
237
- method: 'POST',
238
- headers: headerParameters,
239
- query: queryParameters,
240
- body: (0, index_1.DetachProductsProductCategoryRequestToJSON)(requestParameters['detachProductsProductCategoryRequest']),
241
- }, initOverrides)];
290
+ case 0: return [4 /*yield*/, this.detachProductsProductCategoryRequestOpts(requestParameters)];
242
291
  case 1:
292
+ requestOptions = _a.sent();
293
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
294
+ case 2:
243
295
  response = _a.sent();
244
296
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryResourceFromJSON)(jsonValue); })];
245
297
  }
@@ -263,31 +315,44 @@ var ProductCategoryApi = /** @class */ (function (_super) {
263
315
  });
264
316
  });
265
317
  };
318
+ /**
319
+ * Creates request options for getAllChildrenProductCategory without sending the request
320
+ */
321
+ ProductCategoryApi.prototype.getAllChildrenProductCategoryRequestOpts = function (requestParameters) {
322
+ return __awaiter(this, void 0, void 0, function () {
323
+ var queryParameters, headerParameters, urlPath;
324
+ return __generator(this, function (_a) {
325
+ if (requestParameters['productCategory'] == null) {
326
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling getAllChildrenProductCategory().');
327
+ }
328
+ queryParameters = {};
329
+ headerParameters = {};
330
+ headerParameters['Content-Type'] = 'application/json';
331
+ urlPath = "/admin-api/product-category/{productCategory}/children/all";
332
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
333
+ return [2 /*return*/, {
334
+ path: urlPath,
335
+ method: 'POST',
336
+ headers: headerParameters,
337
+ query: queryParameters,
338
+ body: (0, index_1.GetAllProductCategoryRequestToJSON)(requestParameters['getAllProductCategoryRequest']),
339
+ }];
340
+ });
341
+ });
342
+ };
266
343
  /**
267
344
  * Auto-generated: getAllChildrenProductCategory
268
345
  */
269
346
  ProductCategoryApi.prototype.getAllChildrenProductCategoryRaw = function (requestParameters, initOverrides) {
270
347
  return __awaiter(this, void 0, void 0, function () {
271
- var queryParameters, headerParameters, urlPath, response;
348
+ var requestOptions, response;
272
349
  return __generator(this, function (_a) {
273
350
  switch (_a.label) {
274
- case 0:
275
- if (requestParameters['productCategory'] == null) {
276
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling getAllChildrenProductCategory().');
277
- }
278
- queryParameters = {};
279
- headerParameters = {};
280
- headerParameters['Content-Type'] = 'application/json';
281
- urlPath = "/admin-api/product-category/{productCategory}/children/all";
282
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
283
- return [4 /*yield*/, this.request({
284
- path: urlPath,
285
- method: 'POST',
286
- headers: headerParameters,
287
- query: queryParameters,
288
- body: (0, index_1.GetAllProductCategoryRequestToJSON)(requestParameters['getAllProductCategoryRequest']),
289
- }, initOverrides)];
351
+ case 0: return [4 /*yield*/, this.getAllChildrenProductCategoryRequestOpts(requestParameters)];
290
352
  case 1:
353
+ requestOptions = _a.sent();
354
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
355
+ case 2:
291
356
  response = _a.sent();
292
357
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryListResourceArrayResponseFromJSON)(jsonValue); })];
293
358
  }
@@ -311,27 +376,40 @@ var ProductCategoryApi = /** @class */ (function (_super) {
311
376
  });
312
377
  });
313
378
  };
379
+ /**
380
+ * Creates request options for getAllProductCategory without sending the request
381
+ */
382
+ ProductCategoryApi.prototype.getAllProductCategoryRequestOpts = function (requestParameters) {
383
+ return __awaiter(this, void 0, void 0, function () {
384
+ var queryParameters, headerParameters, urlPath;
385
+ return __generator(this, function (_a) {
386
+ queryParameters = {};
387
+ headerParameters = {};
388
+ headerParameters['Content-Type'] = 'application/json';
389
+ urlPath = "/admin-api/product-category/all";
390
+ return [2 /*return*/, {
391
+ path: urlPath,
392
+ method: 'POST',
393
+ headers: headerParameters,
394
+ query: queryParameters,
395
+ body: (0, index_1.GetAllProductCategoryRequestToJSON)(requestParameters['getAllProductCategoryRequest']),
396
+ }];
397
+ });
398
+ });
399
+ };
314
400
  /**
315
401
  * Auto-generated: getAllProductCategory
316
402
  */
317
403
  ProductCategoryApi.prototype.getAllProductCategoryRaw = function (requestParameters, initOverrides) {
318
404
  return __awaiter(this, void 0, void 0, function () {
319
- var queryParameters, headerParameters, urlPath, response;
405
+ var requestOptions, response;
320
406
  return __generator(this, function (_a) {
321
407
  switch (_a.label) {
322
- case 0:
323
- queryParameters = {};
324
- headerParameters = {};
325
- headerParameters['Content-Type'] = 'application/json';
326
- urlPath = "/admin-api/product-category/all";
327
- return [4 /*yield*/, this.request({
328
- path: urlPath,
329
- method: 'POST',
330
- headers: headerParameters,
331
- query: queryParameters,
332
- body: (0, index_1.GetAllProductCategoryRequestToJSON)(requestParameters['getAllProductCategoryRequest']),
333
- }, initOverrides)];
408
+ case 0: return [4 /*yield*/, this.getAllProductCategoryRequestOpts(requestParameters)];
334
409
  case 1:
410
+ requestOptions = _a.sent();
411
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
412
+ case 2:
335
413
  response = _a.sent();
336
414
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryLiteResourceArrayResponseFromJSON)(jsonValue); })];
337
415
  }
@@ -356,31 +434,44 @@ var ProductCategoryApi = /** @class */ (function (_super) {
356
434
  });
357
435
  });
358
436
  };
437
+ /**
438
+ * Creates request options for getChildrenProductCategory without sending the request
439
+ */
440
+ ProductCategoryApi.prototype.getChildrenProductCategoryRequestOpts = function (requestParameters) {
441
+ return __awaiter(this, void 0, void 0, function () {
442
+ var queryParameters, headerParameters, urlPath;
443
+ return __generator(this, function (_a) {
444
+ if (requestParameters['productCategory'] == null) {
445
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling getChildrenProductCategory().');
446
+ }
447
+ queryParameters = {};
448
+ headerParameters = {};
449
+ headerParameters['Content-Type'] = 'application/json';
450
+ urlPath = "/admin-api/product-category/{productCategory}/children";
451
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
452
+ return [2 /*return*/, {
453
+ path: urlPath,
454
+ method: 'GET',
455
+ headers: headerParameters,
456
+ query: queryParameters,
457
+ body: (0, index_1.IndexProductCategoryRequestToJSON)(requestParameters['indexProductCategoryRequest']),
458
+ }];
459
+ });
460
+ });
461
+ };
359
462
  /**
360
463
  * Auto-generated: getChildrenProductCategory
361
464
  */
362
465
  ProductCategoryApi.prototype.getChildrenProductCategoryRaw = function (requestParameters, initOverrides) {
363
466
  return __awaiter(this, void 0, void 0, function () {
364
- var queryParameters, headerParameters, urlPath, response;
467
+ var requestOptions, response;
365
468
  return __generator(this, function (_a) {
366
469
  switch (_a.label) {
367
- case 0:
368
- if (requestParameters['productCategory'] == null) {
369
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling getChildrenProductCategory().');
370
- }
371
- queryParameters = {};
372
- headerParameters = {};
373
- headerParameters['Content-Type'] = 'application/json';
374
- urlPath = "/admin-api/product-category/{productCategory}/children";
375
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
376
- return [4 /*yield*/, this.request({
377
- path: urlPath,
378
- method: 'GET',
379
- headers: headerParameters,
380
- query: queryParameters,
381
- body: (0, index_1.IndexProductCategoryRequestToJSON)(requestParameters['indexProductCategoryRequest']),
382
- }, initOverrides)];
470
+ case 0: return [4 /*yield*/, this.getChildrenProductCategoryRequestOpts(requestParameters)];
383
471
  case 1:
472
+ requestOptions = _a.sent();
473
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
474
+ case 2:
384
475
  response = _a.sent();
385
476
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductCategoryListResourceResponseFromJSON)(jsonValue); })];
386
477
  }
@@ -404,27 +495,40 @@ var ProductCategoryApi = /** @class */ (function (_super) {
404
495
  });
405
496
  });
406
497
  };
498
+ /**
499
+ * Creates request options for getHierarchyProductCategory without sending the request
500
+ */
501
+ ProductCategoryApi.prototype.getHierarchyProductCategoryRequestOpts = function (requestParameters) {
502
+ return __awaiter(this, void 0, void 0, function () {
503
+ var queryParameters, headerParameters, urlPath;
504
+ return __generator(this, function (_a) {
505
+ queryParameters = {};
506
+ headerParameters = {};
507
+ headerParameters['Content-Type'] = 'application/json';
508
+ urlPath = "/admin-api/product-category/hierarchy";
509
+ return [2 /*return*/, {
510
+ path: urlPath,
511
+ method: 'POST',
512
+ headers: headerParameters,
513
+ query: queryParameters,
514
+ body: (0, index_1.GetHierarchyProductCategoryRequestToJSON)(requestParameters['getHierarchyProductCategoryRequest']),
515
+ }];
516
+ });
517
+ });
518
+ };
407
519
  /**
408
520
  * Auto-generated: getHierarchyProductCategory
409
521
  */
410
522
  ProductCategoryApi.prototype.getHierarchyProductCategoryRaw = function (requestParameters, initOverrides) {
411
523
  return __awaiter(this, void 0, void 0, function () {
412
- var queryParameters, headerParameters, urlPath, response;
524
+ var requestOptions, response;
413
525
  return __generator(this, function (_a) {
414
526
  switch (_a.label) {
415
- case 0:
416
- queryParameters = {};
417
- headerParameters = {};
418
- headerParameters['Content-Type'] = 'application/json';
419
- urlPath = "/admin-api/product-category/hierarchy";
420
- return [4 /*yield*/, this.request({
421
- path: urlPath,
422
- method: 'POST',
423
- headers: headerParameters,
424
- query: queryParameters,
425
- body: (0, index_1.GetHierarchyProductCategoryRequestToJSON)(requestParameters['getHierarchyProductCategoryRequest']),
426
- }, initOverrides)];
527
+ case 0: return [4 /*yield*/, this.getHierarchyProductCategoryRequestOpts(requestParameters)];
427
528
  case 1:
529
+ requestOptions = _a.sent();
530
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
531
+ case 2:
428
532
  response = _a.sent();
429
533
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryHierarchyResourceArrayResponseFromJSON)(jsonValue); })];
430
534
  }
@@ -449,27 +553,40 @@ var ProductCategoryApi = /** @class */ (function (_super) {
449
553
  });
450
554
  });
451
555
  };
556
+ /**
557
+ * Creates request options for indexProductCategory without sending the request
558
+ */
559
+ ProductCategoryApi.prototype.indexProductCategoryRequestOpts = function (requestParameters) {
560
+ return __awaiter(this, void 0, void 0, function () {
561
+ var queryParameters, headerParameters, urlPath;
562
+ return __generator(this, function (_a) {
563
+ queryParameters = {};
564
+ headerParameters = {};
565
+ headerParameters['Content-Type'] = 'application/json';
566
+ urlPath = "/admin-api/product-category/list";
567
+ return [2 /*return*/, {
568
+ path: urlPath,
569
+ method: 'POST',
570
+ headers: headerParameters,
571
+ query: queryParameters,
572
+ body: (0, index_1.IndexProductCategoryRequestToJSON)(requestParameters['indexProductCategoryRequest']),
573
+ }];
574
+ });
575
+ });
576
+ };
452
577
  /**
453
578
  * Auto-generated: indexProductCategory
454
579
  */
455
580
  ProductCategoryApi.prototype.indexProductCategoryRaw = function (requestParameters, initOverrides) {
456
581
  return __awaiter(this, void 0, void 0, function () {
457
- var queryParameters, headerParameters, urlPath, response;
582
+ var requestOptions, response;
458
583
  return __generator(this, function (_a) {
459
584
  switch (_a.label) {
460
- case 0:
461
- queryParameters = {};
462
- headerParameters = {};
463
- headerParameters['Content-Type'] = 'application/json';
464
- urlPath = "/admin-api/product-category/list";
465
- return [4 /*yield*/, this.request({
466
- path: urlPath,
467
- method: 'POST',
468
- headers: headerParameters,
469
- query: queryParameters,
470
- body: (0, index_1.IndexProductCategoryRequestToJSON)(requestParameters['indexProductCategoryRequest']),
471
- }, initOverrides)];
585
+ case 0: return [4 /*yield*/, this.indexProductCategoryRequestOpts(requestParameters)];
472
586
  case 1:
587
+ requestOptions = _a.sent();
588
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
589
+ case 2:
473
590
  response = _a.sent();
474
591
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductCategoryListResourceResponseFromJSON)(jsonValue); })];
475
592
  }
@@ -494,27 +611,40 @@ var ProductCategoryApi = /** @class */ (function (_super) {
494
611
  });
495
612
  });
496
613
  };
614
+ /**
615
+ * Creates request options for previewAutomationRulesProductCategory without sending the request
616
+ */
617
+ ProductCategoryApi.prototype.previewAutomationRulesProductCategoryRequestOpts = function (requestParameters) {
618
+ return __awaiter(this, void 0, void 0, function () {
619
+ var queryParameters, headerParameters, urlPath;
620
+ return __generator(this, function (_a) {
621
+ queryParameters = {};
622
+ headerParameters = {};
623
+ headerParameters['Content-Type'] = 'application/json';
624
+ urlPath = "/admin-api/product-category/preview-automation-rules";
625
+ return [2 /*return*/, {
626
+ path: urlPath,
627
+ method: 'POST',
628
+ headers: headerParameters,
629
+ query: queryParameters,
630
+ body: (0, index_1.PreviewAutomationRulesProductCategoryRequestToJSON)(requestParameters['previewAutomationRulesProductCategoryRequest']),
631
+ }];
632
+ });
633
+ });
634
+ };
497
635
  /**
498
636
  * Auto-generated: previewAutomationRulesProductCategory
499
637
  */
500
638
  ProductCategoryApi.prototype.previewAutomationRulesProductCategoryRaw = function (requestParameters, initOverrides) {
501
639
  return __awaiter(this, void 0, void 0, function () {
502
- var queryParameters, headerParameters, urlPath, response;
640
+ var requestOptions, response;
503
641
  return __generator(this, function (_a) {
504
642
  switch (_a.label) {
505
- case 0:
506
- queryParameters = {};
507
- headerParameters = {};
508
- headerParameters['Content-Type'] = 'application/json';
509
- urlPath = "/admin-api/product-category/preview-automation-rules";
510
- return [4 /*yield*/, this.request({
511
- path: urlPath,
512
- method: 'POST',
513
- headers: headerParameters,
514
- query: queryParameters,
515
- body: (0, index_1.PreviewAutomationRulesProductCategoryRequestToJSON)(requestParameters['previewAutomationRulesProductCategoryRequest']),
516
- }, initOverrides)];
643
+ case 0: return [4 /*yield*/, this.previewAutomationRulesProductCategoryRequestOpts(requestParameters)];
517
644
  case 1:
645
+ requestOptions = _a.sent();
646
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
647
+ case 2:
518
648
  response = _a.sent();
519
649
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PreviewAutomationRulesResourceFromJSON)(jsonValue); })];
520
650
  }
@@ -539,29 +669,42 @@ var ProductCategoryApi = /** @class */ (function (_super) {
539
669
  });
540
670
  });
541
671
  };
672
+ /**
673
+ * Creates request options for showProductCategory without sending the request
674
+ */
675
+ ProductCategoryApi.prototype.showProductCategoryRequestOpts = function (requestParameters) {
676
+ return __awaiter(this, void 0, void 0, function () {
677
+ var queryParameters, headerParameters, urlPath;
678
+ return __generator(this, function (_a) {
679
+ if (requestParameters['productCategory'] == null) {
680
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling showProductCategory().');
681
+ }
682
+ queryParameters = {};
683
+ headerParameters = {};
684
+ urlPath = "/admin-api/product-category/{productCategory}";
685
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
686
+ return [2 /*return*/, {
687
+ path: urlPath,
688
+ method: 'GET',
689
+ headers: headerParameters,
690
+ query: queryParameters,
691
+ }];
692
+ });
693
+ });
694
+ };
542
695
  /**
543
696
  * Auto-generated: showProductCategory
544
697
  */
545
698
  ProductCategoryApi.prototype.showProductCategoryRaw = function (requestParameters, initOverrides) {
546
699
  return __awaiter(this, void 0, void 0, function () {
547
- var queryParameters, headerParameters, urlPath, response;
700
+ var requestOptions, response;
548
701
  return __generator(this, function (_a) {
549
702
  switch (_a.label) {
550
- case 0:
551
- if (requestParameters['productCategory'] == null) {
552
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling showProductCategory().');
553
- }
554
- queryParameters = {};
555
- headerParameters = {};
556
- urlPath = "/admin-api/product-category/{productCategory}";
557
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
558
- return [4 /*yield*/, this.request({
559
- path: urlPath,
560
- method: 'GET',
561
- headers: headerParameters,
562
- query: queryParameters,
563
- }, initOverrides)];
703
+ case 0: return [4 /*yield*/, this.showProductCategoryRequestOpts(requestParameters)];
564
704
  case 1:
705
+ requestOptions = _a.sent();
706
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
707
+ case 2:
565
708
  response = _a.sent();
566
709
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryResourceFromJSON)(jsonValue); })];
567
710
  }
@@ -585,27 +728,40 @@ var ProductCategoryApi = /** @class */ (function (_super) {
585
728
  });
586
729
  });
587
730
  };
731
+ /**
732
+ * Creates request options for storeProductCategory without sending the request
733
+ */
734
+ ProductCategoryApi.prototype.storeProductCategoryRequestOpts = function (requestParameters) {
735
+ return __awaiter(this, void 0, void 0, function () {
736
+ var queryParameters, headerParameters, urlPath;
737
+ return __generator(this, function (_a) {
738
+ queryParameters = {};
739
+ headerParameters = {};
740
+ headerParameters['Content-Type'] = 'application/json';
741
+ urlPath = "/admin-api/product-category/create";
742
+ return [2 /*return*/, {
743
+ path: urlPath,
744
+ method: 'POST',
745
+ headers: headerParameters,
746
+ query: queryParameters,
747
+ body: (0, index_1.StoreProductCategoryRequestToJSON)(requestParameters['storeProductCategoryRequest']),
748
+ }];
749
+ });
750
+ });
751
+ };
588
752
  /**
589
753
  * Auto-generated: storeProductCategory
590
754
  */
591
755
  ProductCategoryApi.prototype.storeProductCategoryRaw = function (requestParameters, initOverrides) {
592
756
  return __awaiter(this, void 0, void 0, function () {
593
- var queryParameters, headerParameters, urlPath, response;
757
+ var requestOptions, response;
594
758
  return __generator(this, function (_a) {
595
759
  switch (_a.label) {
596
- case 0:
597
- queryParameters = {};
598
- headerParameters = {};
599
- headerParameters['Content-Type'] = 'application/json';
600
- urlPath = "/admin-api/product-category/create";
601
- return [4 /*yield*/, this.request({
602
- path: urlPath,
603
- method: 'POST',
604
- headers: headerParameters,
605
- query: queryParameters,
606
- body: (0, index_1.StoreProductCategoryRequestToJSON)(requestParameters['storeProductCategoryRequest']),
607
- }, initOverrides)];
760
+ case 0: return [4 /*yield*/, this.storeProductCategoryRequestOpts(requestParameters)];
608
761
  case 1:
762
+ requestOptions = _a.sent();
763
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
764
+ case 2:
609
765
  response = _a.sent();
610
766
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryResourceFromJSON)(jsonValue); })];
611
767
  }
@@ -630,31 +786,44 @@ var ProductCategoryApi = /** @class */ (function (_super) {
630
786
  });
631
787
  });
632
788
  };
789
+ /**
790
+ * Creates request options for updateProductCategory without sending the request
791
+ */
792
+ ProductCategoryApi.prototype.updateProductCategoryRequestOpts = function (requestParameters) {
793
+ return __awaiter(this, void 0, void 0, function () {
794
+ var queryParameters, headerParameters, urlPath;
795
+ return __generator(this, function (_a) {
796
+ if (requestParameters['productCategory'] == null) {
797
+ throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling updateProductCategory().');
798
+ }
799
+ queryParameters = {};
800
+ headerParameters = {};
801
+ headerParameters['Content-Type'] = 'application/json';
802
+ urlPath = "/admin-api/product-category/{productCategory}/update";
803
+ urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
804
+ return [2 /*return*/, {
805
+ path: urlPath,
806
+ method: 'PUT',
807
+ headers: headerParameters,
808
+ query: queryParameters,
809
+ body: (0, index_1.UpdateProductCategoryRequestToJSON)(requestParameters['updateProductCategoryRequest']),
810
+ }];
811
+ });
812
+ });
813
+ };
633
814
  /**
634
815
  * Auto-generated: updateProductCategory
635
816
  */
636
817
  ProductCategoryApi.prototype.updateProductCategoryRaw = function (requestParameters, initOverrides) {
637
818
  return __awaiter(this, void 0, void 0, function () {
638
- var queryParameters, headerParameters, urlPath, response;
819
+ var requestOptions, response;
639
820
  return __generator(this, function (_a) {
640
821
  switch (_a.label) {
641
- case 0:
642
- if (requestParameters['productCategory'] == null) {
643
- throw new runtime.RequiredError('productCategory', 'Required parameter "productCategory" was null or undefined when calling updateProductCategory().');
644
- }
645
- queryParameters = {};
646
- headerParameters = {};
647
- headerParameters['Content-Type'] = 'application/json';
648
- urlPath = "/admin-api/product-category/{productCategory}/update";
649
- urlPath = urlPath.replace("{".concat("productCategory", "}"), encodeURIComponent(String(requestParameters['productCategory'])));
650
- return [4 /*yield*/, this.request({
651
- path: urlPath,
652
- method: 'PUT',
653
- headers: headerParameters,
654
- query: queryParameters,
655
- body: (0, index_1.UpdateProductCategoryRequestToJSON)(requestParameters['updateProductCategoryRequest']),
656
- }, initOverrides)];
822
+ case 0: return [4 /*yield*/, this.updateProductCategoryRequestOpts(requestParameters)];
657
823
  case 1:
824
+ requestOptions = _a.sent();
825
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
826
+ case 2:
658
827
  response = _a.sent();
659
828
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductCategoryResourceFromJSON)(jsonValue); })];
660
829
  }