@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.
- package/.openapi-generator/VERSION +1 -1
- package/README.md +3 -3
- package/dist/apis/AssetApi.d.ts +16 -0
- package/dist/apis/AssetApi.js +110 -58
- package/dist/apis/AttributeApi.d.ts +60 -0
- package/dist/apis/AttributeApi.js +424 -229
- package/dist/apis/DefinitionApi.d.ts +24 -0
- package/dist/apis/DefinitionApi.js +164 -86
- package/dist/apis/DocumentApi.d.ts +36 -0
- package/dist/apis/DocumentApi.js +250 -133
- package/dist/apis/ExternalApiLogApi.d.ts +4 -0
- package/dist/apis/ExternalApiLogApi.js +26 -13
- package/dist/apis/GoogleCategoryApi.d.ts +4 -0
- package/dist/apis/GoogleCategoryApi.js +26 -13
- package/dist/apis/OverlayTemplateApi.d.ts +48 -0
- package/dist/apis/OverlayTemplateApi.js +340 -184
- package/dist/apis/ProductApi.d.ts +84 -0
- package/dist/apis/ProductApi.js +600 -327
- package/dist/apis/ProductCategoryApi.d.ts +52 -0
- package/dist/apis/ProductCategoryApi.js +364 -195
- package/dist/apis/ProductTypeApi.d.ts +36 -0
- package/dist/apis/ProductTypeApi.js +256 -139
- package/dist/apis/SiteApi.d.ts +32 -0
- package/dist/apis/SiteApi.js +220 -116
- package/dist/apis/SupplierApi.d.ts +32 -0
- package/dist/apis/SupplierApi.js +234 -130
- package/dist/apis/TagApi.d.ts +32 -0
- package/dist/apis/TagApi.js +226 -122
- package/dist/models/AttachAttributeProductTypeRequest.d.ts +1 -1
- package/dist/models/AttachDocumentablesDocumentRequestDocumentablesInner.d.ts +1 -1
- package/dist/models/AttachProductTypeAttributeRequest.d.ts +1 -1
- package/dist/models/DetachAssetableOverlayTemplateRequest.d.ts +1 -1
- package/dist/models/DetachDocumentablesDocumentRequestDocumentablesInner.d.ts +1 -1
- package/dist/models/GetAllAttributeRequest.d.ts +3 -3
- package/dist/models/GetAllDefinitionRequest.d.ts +2 -2
- package/dist/models/GetAllDocumentRequest.d.ts +3 -3
- package/dist/models/GetAllGoogleCategoryRequest.d.ts +2 -2
- package/dist/models/GetAllOverlayTemplateRequest.d.ts +3 -3
- package/dist/models/GetAllProductCategoryRequest.d.ts +3 -3
- package/dist/models/GetAllProductChildRequest.d.ts +3 -3
- package/dist/models/GetAllProductRequest.d.ts +3 -3
- package/dist/models/GetAllProductTypeRequest.d.ts +3 -3
- package/dist/models/GetAllSupplierRequest.d.ts +3 -3
- package/dist/models/IndexAttributeRequest.d.ts +3 -3
- package/dist/models/IndexAttributeValueRequest.d.ts +3 -3
- package/dist/models/IndexDefinitionRequest.d.ts +2 -2
- package/dist/models/IndexDocumentRequest.d.ts +3 -3
- package/dist/models/IndexExternalApiLogRequest.d.ts +2 -2
- package/dist/models/IndexOverlayTemplateRequest.d.ts +3 -3
- package/dist/models/IndexProductCategoryRequest.d.ts +3 -3
- package/dist/models/IndexProductChildRequest.d.ts +3 -3
- package/dist/models/IndexProductRequest.d.ts +3 -3
- package/dist/models/IndexProductTypeRequest.d.ts +3 -3
- package/dist/models/IndexSiteNotificationRequest.d.ts +2 -2
- package/dist/models/IndexSiteRequest.d.ts +2 -2
- package/dist/models/IndexSupplierRequest.d.ts +3 -3
- package/dist/models/IndexTagRequest.d.ts +3 -3
- package/dist/models/PreviewAutomationRulesProductCategoryRequest.d.ts +1 -1
- package/dist/models/StoreAssetForAssetableRequest.d.ts +1 -1
- package/dist/models/StoreAttributeRequest.d.ts +1 -1
- package/dist/models/StoreOverlayTemplateAssetRequest.d.ts +1 -1
- package/dist/models/StoreProductCategoryRequest.d.ts +1 -1
- package/dist/models/StoreProductCategoryRequestAutomationRulesInner.d.ts +2 -2
- package/dist/models/StoreTagRequest.d.ts +1 -1
- package/dist/models/UpdateAttributeRequest.d.ts +1 -1
- package/dist/models/UpdateOverlayTemplateAssetRequest.d.ts +1 -1
- package/dist/models/UpdateProductCategoryRequest.d.ts +1 -1
- package/dist/models/UpdateSiteRequest.d.ts +1 -1
- package/dist/models/UpdateTagRequest.d.ts +1 -1
- package/package.json +1 -1
- package/src/apis/AssetApi.ts +48 -16
- package/src/apis/AttributeApi.ts +180 -60
- package/src/apis/DefinitionApi.ts +72 -24
- package/src/apis/DocumentApi.ts +108 -36
- package/src/apis/ExternalApiLogApi.ts +12 -4
- package/src/apis/GoogleCategoryApi.ts +12 -4
- package/src/apis/OverlayTemplateApi.ts +144 -48
- package/src/apis/ProductApi.ts +252 -84
- package/src/apis/ProductCategoryApi.ts +156 -52
- package/src/apis/ProductTypeApi.ts +108 -36
- package/src/apis/SiteApi.ts +96 -32
- package/src/apis/SupplierApi.ts +96 -32
- package/src/apis/TagApi.ts +96 -32
- package/src/models/AttachAttributeProductTypeRequest.ts +1 -1
- package/src/models/AttachDocumentablesDocumentRequestDocumentablesInner.ts +1 -1
- package/src/models/AttachProductTypeAttributeRequest.ts +1 -1
- package/src/models/DetachAssetableOverlayTemplateRequest.ts +1 -1
- package/src/models/DetachDocumentablesDocumentRequestDocumentablesInner.ts +1 -1
- package/src/models/GetAllAttributeRequest.ts +3 -3
- package/src/models/GetAllDefinitionRequest.ts +2 -2
- package/src/models/GetAllDocumentRequest.ts +3 -3
- package/src/models/GetAllGoogleCategoryRequest.ts +2 -2
- package/src/models/GetAllOverlayTemplateRequest.ts +3 -3
- package/src/models/GetAllProductCategoryRequest.ts +3 -3
- package/src/models/GetAllProductChildRequest.ts +3 -3
- package/src/models/GetAllProductRequest.ts +3 -3
- package/src/models/GetAllProductTypeRequest.ts +3 -3
- package/src/models/GetAllSupplierRequest.ts +3 -3
- package/src/models/IndexAttributeRequest.ts +3 -3
- package/src/models/IndexAttributeValueRequest.ts +3 -3
- package/src/models/IndexDefinitionRequest.ts +2 -2
- package/src/models/IndexDocumentRequest.ts +3 -3
- package/src/models/IndexExternalApiLogRequest.ts +2 -2
- package/src/models/IndexOverlayTemplateRequest.ts +3 -3
- package/src/models/IndexProductCategoryRequest.ts +3 -3
- package/src/models/IndexProductChildRequest.ts +3 -3
- package/src/models/IndexProductRequest.ts +3 -3
- package/src/models/IndexProductTypeRequest.ts +3 -3
- package/src/models/IndexSiteNotificationRequest.ts +2 -2
- package/src/models/IndexSiteRequest.ts +2 -2
- package/src/models/IndexSupplierRequest.ts +3 -3
- package/src/models/IndexTagRequest.ts +3 -3
- package/src/models/PreviewAutomationRulesProductCategoryRequest.ts +1 -1
- package/src/models/StoreAssetForAssetableRequest.ts +1 -1
- package/src/models/StoreAttributeRequest.ts +1 -1
- package/src/models/StoreOverlayTemplateAssetRequest.ts +1 -1
- package/src/models/StoreProductCategoryRequest.ts +1 -1
- package/src/models/StoreProductCategoryRequestAutomationRulesInner.ts +2 -2
- package/src/models/StoreTagRequest.ts +1 -1
- package/src/models/UpdateAttributeRequest.ts +1 -1
- package/src/models/UpdateOverlayTemplateAssetRequest.ts +1 -1
- package/src/models/UpdateProductCategoryRequest.ts +1 -1
- package/src/models/UpdateSiteRequest.ts +1 -1
- package/src/models/UpdateTagRequest.ts +1 -1
package/dist/apis/ProductApi.js
CHANGED
|
@@ -75,31 +75,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function ProductApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates request options for attachAccessoriesProductChild without sending the request
|
|
80
|
+
*/
|
|
81
|
+
ProductApi.prototype.attachAccessoriesProductChildRequestOpts = 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['productChild'] == null) {
|
|
86
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling attachAccessoriesProductChild().');
|
|
87
|
+
}
|
|
88
|
+
queryParameters = {};
|
|
89
|
+
headerParameters = {};
|
|
90
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
91
|
+
urlPath = "/admin-api/product/children/{productChild}/accessory/attach";
|
|
92
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
93
|
+
return [2 /*return*/, {
|
|
94
|
+
path: urlPath,
|
|
95
|
+
method: 'POST',
|
|
96
|
+
headers: headerParameters,
|
|
97
|
+
query: queryParameters,
|
|
98
|
+
body: (0, index_1.AttachAccessoriesProductChildRequestToJSON)(requestParameters['attachAccessoriesProductChildRequest']),
|
|
99
|
+
}];
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
};
|
|
78
103
|
/**
|
|
79
104
|
* Auto-generated: attachAccessoriesProductChild
|
|
80
105
|
*/
|
|
81
106
|
ProductApi.prototype.attachAccessoriesProductChildRaw = function (requestParameters, initOverrides) {
|
|
82
107
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var
|
|
108
|
+
var requestOptions, response;
|
|
84
109
|
return __generator(this, function (_a) {
|
|
85
110
|
switch (_a.label) {
|
|
86
|
-
case 0:
|
|
87
|
-
if (requestParameters['productChild'] == null) {
|
|
88
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling attachAccessoriesProductChild().');
|
|
89
|
-
}
|
|
90
|
-
queryParameters = {};
|
|
91
|
-
headerParameters = {};
|
|
92
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
93
|
-
urlPath = "/admin-api/product/children/{productChild}/accessory/attach";
|
|
94
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
95
|
-
return [4 /*yield*/, this.request({
|
|
96
|
-
path: urlPath,
|
|
97
|
-
method: 'POST',
|
|
98
|
-
headers: headerParameters,
|
|
99
|
-
query: queryParameters,
|
|
100
|
-
body: (0, index_1.AttachAccessoriesProductChildRequestToJSON)(requestParameters['attachAccessoriesProductChildRequest']),
|
|
101
|
-
}, initOverrides)];
|
|
111
|
+
case 0: return [4 /*yield*/, this.attachAccessoriesProductChildRequestOpts(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.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
105
118
|
}
|
|
@@ -123,31 +136,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
123
136
|
});
|
|
124
137
|
});
|
|
125
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* Creates request options for attachCompatibleProductsProductChild without sending the request
|
|
141
|
+
*/
|
|
142
|
+
ProductApi.prototype.attachCompatibleProductsProductChildRequestOpts = 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['productChild'] == null) {
|
|
147
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling attachCompatibleProductsProductChild().');
|
|
148
|
+
}
|
|
149
|
+
queryParameters = {};
|
|
150
|
+
headerParameters = {};
|
|
151
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
152
|
+
urlPath = "/admin-api/product/children/{productChild}/compatible-product/attach";
|
|
153
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
154
|
+
return [2 /*return*/, {
|
|
155
|
+
path: urlPath,
|
|
156
|
+
method: 'POST',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
body: (0, index_1.AttachAccessoriesProductChildRequestToJSON)(requestParameters['attachAccessoriesProductChildRequest']),
|
|
160
|
+
}];
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
};
|
|
126
164
|
/**
|
|
127
165
|
* Auto-generated: attachCompatibleProductsProductChild
|
|
128
166
|
*/
|
|
129
167
|
ProductApi.prototype.attachCompatibleProductsProductChildRaw = function (requestParameters, initOverrides) {
|
|
130
168
|
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
-
var
|
|
169
|
+
var requestOptions, response;
|
|
132
170
|
return __generator(this, function (_a) {
|
|
133
171
|
switch (_a.label) {
|
|
134
|
-
case 0:
|
|
135
|
-
if (requestParameters['productChild'] == null) {
|
|
136
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling attachCompatibleProductsProductChild().');
|
|
137
|
-
}
|
|
138
|
-
queryParameters = {};
|
|
139
|
-
headerParameters = {};
|
|
140
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
141
|
-
urlPath = "/admin-api/product/children/{productChild}/compatible-product/attach";
|
|
142
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
143
|
-
return [4 /*yield*/, this.request({
|
|
144
|
-
path: urlPath,
|
|
145
|
-
method: 'POST',
|
|
146
|
-
headers: headerParameters,
|
|
147
|
-
query: queryParameters,
|
|
148
|
-
body: (0, index_1.AttachAccessoriesProductChildRequestToJSON)(requestParameters['attachAccessoriesProductChildRequest']),
|
|
149
|
-
}, initOverrides)];
|
|
172
|
+
case 0: return [4 /*yield*/, this.attachCompatibleProductsProductChildRequestOpts(requestParameters)];
|
|
150
173
|
case 1:
|
|
174
|
+
requestOptions = _a.sent();
|
|
175
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
176
|
+
case 2:
|
|
151
177
|
response = _a.sent();
|
|
152
178
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
153
179
|
}
|
|
@@ -171,31 +197,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
171
197
|
});
|
|
172
198
|
});
|
|
173
199
|
};
|
|
200
|
+
/**
|
|
201
|
+
* Creates request options for attachDocumentsProductChild without sending the request
|
|
202
|
+
*/
|
|
203
|
+
ProductApi.prototype.attachDocumentsProductChildRequestOpts = function (requestParameters) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
205
|
+
var queryParameters, headerParameters, urlPath;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
if (requestParameters['productChild'] == null) {
|
|
208
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling attachDocumentsProductChild().');
|
|
209
|
+
}
|
|
210
|
+
queryParameters = {};
|
|
211
|
+
headerParameters = {};
|
|
212
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
213
|
+
urlPath = "/admin-api/product/children/{productChild}/attach-documents";
|
|
214
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
215
|
+
return [2 /*return*/, {
|
|
216
|
+
path: urlPath,
|
|
217
|
+
method: 'POST',
|
|
218
|
+
headers: headerParameters,
|
|
219
|
+
query: queryParameters,
|
|
220
|
+
body: (0, index_1.AttachDocumentsProductChildRequestToJSON)(requestParameters['attachDocumentsProductChildRequest']),
|
|
221
|
+
}];
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
};
|
|
174
225
|
/**
|
|
175
226
|
* Auto-generated: attachDocumentsProductChild
|
|
176
227
|
*/
|
|
177
228
|
ProductApi.prototype.attachDocumentsProductChildRaw = function (requestParameters, initOverrides) {
|
|
178
229
|
return __awaiter(this, void 0, void 0, function () {
|
|
179
|
-
var
|
|
230
|
+
var requestOptions, response;
|
|
180
231
|
return __generator(this, function (_a) {
|
|
181
232
|
switch (_a.label) {
|
|
182
|
-
case 0:
|
|
183
|
-
if (requestParameters['productChild'] == null) {
|
|
184
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling attachDocumentsProductChild().');
|
|
185
|
-
}
|
|
186
|
-
queryParameters = {};
|
|
187
|
-
headerParameters = {};
|
|
188
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
189
|
-
urlPath = "/admin-api/product/children/{productChild}/attach-documents";
|
|
190
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
191
|
-
return [4 /*yield*/, this.request({
|
|
192
|
-
path: urlPath,
|
|
193
|
-
method: 'POST',
|
|
194
|
-
headers: headerParameters,
|
|
195
|
-
query: queryParameters,
|
|
196
|
-
body: (0, index_1.AttachDocumentsProductChildRequestToJSON)(requestParameters['attachDocumentsProductChildRequest']),
|
|
197
|
-
}, initOverrides)];
|
|
233
|
+
case 0: return [4 /*yield*/, this.attachDocumentsProductChildRequestOpts(requestParameters)];
|
|
198
234
|
case 1:
|
|
235
|
+
requestOptions = _a.sent();
|
|
236
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
237
|
+
case 2:
|
|
199
238
|
response = _a.sent();
|
|
200
239
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductChildResourceFromJSON)(jsonValue); })];
|
|
201
240
|
}
|
|
@@ -219,29 +258,42 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
219
258
|
});
|
|
220
259
|
});
|
|
221
260
|
};
|
|
261
|
+
/**
|
|
262
|
+
* Creates request options for destroyProduct without sending the request
|
|
263
|
+
*/
|
|
264
|
+
ProductApi.prototype.destroyProductRequestOpts = function (requestParameters) {
|
|
265
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
266
|
+
var queryParameters, headerParameters, urlPath;
|
|
267
|
+
return __generator(this, function (_a) {
|
|
268
|
+
if (requestParameters['product'] == null) {
|
|
269
|
+
throw new runtime.RequiredError('product', 'Required parameter "product" was null or undefined when calling destroyProduct().');
|
|
270
|
+
}
|
|
271
|
+
queryParameters = {};
|
|
272
|
+
headerParameters = {};
|
|
273
|
+
urlPath = "/admin-api/product/parent/{product}/delete";
|
|
274
|
+
urlPath = urlPath.replace("{".concat("product", "}"), encodeURIComponent(String(requestParameters['product'])));
|
|
275
|
+
return [2 /*return*/, {
|
|
276
|
+
path: urlPath,
|
|
277
|
+
method: 'DELETE',
|
|
278
|
+
headers: headerParameters,
|
|
279
|
+
query: queryParameters,
|
|
280
|
+
}];
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
};
|
|
222
284
|
/**
|
|
223
285
|
* Auto-generated: destroyProduct
|
|
224
286
|
*/
|
|
225
287
|
ProductApi.prototype.destroyProductRaw = function (requestParameters, initOverrides) {
|
|
226
288
|
return __awaiter(this, void 0, void 0, function () {
|
|
227
|
-
var
|
|
289
|
+
var requestOptions, response;
|
|
228
290
|
return __generator(this, function (_a) {
|
|
229
291
|
switch (_a.label) {
|
|
230
|
-
case 0:
|
|
231
|
-
if (requestParameters['product'] == null) {
|
|
232
|
-
throw new runtime.RequiredError('product', 'Required parameter "product" was null or undefined when calling destroyProduct().');
|
|
233
|
-
}
|
|
234
|
-
queryParameters = {};
|
|
235
|
-
headerParameters = {};
|
|
236
|
-
urlPath = "/admin-api/product/parent/{product}/delete";
|
|
237
|
-
urlPath = urlPath.replace("{".concat("product", "}"), encodeURIComponent(String(requestParameters['product'])));
|
|
238
|
-
return [4 /*yield*/, this.request({
|
|
239
|
-
path: urlPath,
|
|
240
|
-
method: 'DELETE',
|
|
241
|
-
headers: headerParameters,
|
|
242
|
-
query: queryParameters,
|
|
243
|
-
}, initOverrides)];
|
|
292
|
+
case 0: return [4 /*yield*/, this.destroyProductRequestOpts(requestParameters)];
|
|
244
293
|
case 1:
|
|
294
|
+
requestOptions = _a.sent();
|
|
295
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
296
|
+
case 2:
|
|
245
297
|
response = _a.sent();
|
|
246
298
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GenericResponseFromJSON)(jsonValue); })];
|
|
247
299
|
}
|
|
@@ -265,29 +317,42 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
265
317
|
});
|
|
266
318
|
});
|
|
267
319
|
};
|
|
320
|
+
/**
|
|
321
|
+
* Creates request options for destroyProductChild without sending the request
|
|
322
|
+
*/
|
|
323
|
+
ProductApi.prototype.destroyProductChildRequestOpts = function (requestParameters) {
|
|
324
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
325
|
+
var queryParameters, headerParameters, urlPath;
|
|
326
|
+
return __generator(this, function (_a) {
|
|
327
|
+
if (requestParameters['productChild'] == null) {
|
|
328
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling destroyProductChild().');
|
|
329
|
+
}
|
|
330
|
+
queryParameters = {};
|
|
331
|
+
headerParameters = {};
|
|
332
|
+
urlPath = "/admin-api/product/children/{productChild}/delete";
|
|
333
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
334
|
+
return [2 /*return*/, {
|
|
335
|
+
path: urlPath,
|
|
336
|
+
method: 'DELETE',
|
|
337
|
+
headers: headerParameters,
|
|
338
|
+
query: queryParameters,
|
|
339
|
+
}];
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
};
|
|
268
343
|
/**
|
|
269
344
|
* Auto-generated: destroyProductChild
|
|
270
345
|
*/
|
|
271
346
|
ProductApi.prototype.destroyProductChildRaw = function (requestParameters, initOverrides) {
|
|
272
347
|
return __awaiter(this, void 0, void 0, function () {
|
|
273
|
-
var
|
|
348
|
+
var requestOptions, response;
|
|
274
349
|
return __generator(this, function (_a) {
|
|
275
350
|
switch (_a.label) {
|
|
276
|
-
case 0:
|
|
277
|
-
if (requestParameters['productChild'] == null) {
|
|
278
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling destroyProductChild().');
|
|
279
|
-
}
|
|
280
|
-
queryParameters = {};
|
|
281
|
-
headerParameters = {};
|
|
282
|
-
urlPath = "/admin-api/product/children/{productChild}/delete";
|
|
283
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
284
|
-
return [4 /*yield*/, this.request({
|
|
285
|
-
path: urlPath,
|
|
286
|
-
method: 'DELETE',
|
|
287
|
-
headers: headerParameters,
|
|
288
|
-
query: queryParameters,
|
|
289
|
-
}, initOverrides)];
|
|
351
|
+
case 0: return [4 /*yield*/, this.destroyProductChildRequestOpts(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.GenericResponseFromJSON)(jsonValue); })];
|
|
293
358
|
}
|
|
@@ -311,33 +376,46 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
311
376
|
});
|
|
312
377
|
});
|
|
313
378
|
};
|
|
379
|
+
/**
|
|
380
|
+
* Creates request options for detachAccessoryProductChild without sending the request
|
|
381
|
+
*/
|
|
382
|
+
ProductApi.prototype.detachAccessoryProductChildRequestOpts = function (requestParameters) {
|
|
383
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
384
|
+
var queryParameters, headerParameters, urlPath;
|
|
385
|
+
return __generator(this, function (_a) {
|
|
386
|
+
if (requestParameters['productChild'] == null) {
|
|
387
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling detachAccessoryProductChild().');
|
|
388
|
+
}
|
|
389
|
+
if (requestParameters['accessory'] == null) {
|
|
390
|
+
throw new runtime.RequiredError('accessory', 'Required parameter "accessory" was null or undefined when calling detachAccessoryProductChild().');
|
|
391
|
+
}
|
|
392
|
+
queryParameters = {};
|
|
393
|
+
headerParameters = {};
|
|
394
|
+
urlPath = "/admin-api/product/children/{productChild}/accessory/detach/{accessory}";
|
|
395
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
396
|
+
urlPath = urlPath.replace("{".concat("accessory", "}"), encodeURIComponent(String(requestParameters['accessory'])));
|
|
397
|
+
return [2 /*return*/, {
|
|
398
|
+
path: urlPath,
|
|
399
|
+
method: 'DELETE',
|
|
400
|
+
headers: headerParameters,
|
|
401
|
+
query: queryParameters,
|
|
402
|
+
}];
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
};
|
|
314
406
|
/**
|
|
315
407
|
* Auto-generated: detachAccessoryProductChild
|
|
316
408
|
*/
|
|
317
409
|
ProductApi.prototype.detachAccessoryProductChildRaw = function (requestParameters, initOverrides) {
|
|
318
410
|
return __awaiter(this, void 0, void 0, function () {
|
|
319
|
-
var
|
|
411
|
+
var requestOptions, response;
|
|
320
412
|
return __generator(this, function (_a) {
|
|
321
413
|
switch (_a.label) {
|
|
322
|
-
case 0:
|
|
323
|
-
if (requestParameters['productChild'] == null) {
|
|
324
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling detachAccessoryProductChild().');
|
|
325
|
-
}
|
|
326
|
-
if (requestParameters['accessory'] == null) {
|
|
327
|
-
throw new runtime.RequiredError('accessory', 'Required parameter "accessory" was null or undefined when calling detachAccessoryProductChild().');
|
|
328
|
-
}
|
|
329
|
-
queryParameters = {};
|
|
330
|
-
headerParameters = {};
|
|
331
|
-
urlPath = "/admin-api/product/children/{productChild}/accessory/detach/{accessory}";
|
|
332
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
333
|
-
urlPath = urlPath.replace("{".concat("accessory", "}"), encodeURIComponent(String(requestParameters['accessory'])));
|
|
334
|
-
return [4 /*yield*/, this.request({
|
|
335
|
-
path: urlPath,
|
|
336
|
-
method: 'DELETE',
|
|
337
|
-
headers: headerParameters,
|
|
338
|
-
query: queryParameters,
|
|
339
|
-
}, initOverrides)];
|
|
414
|
+
case 0: return [4 /*yield*/, this.detachAccessoryProductChildRequestOpts(requestParameters)];
|
|
340
415
|
case 1:
|
|
416
|
+
requestOptions = _a.sent();
|
|
417
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
418
|
+
case 2:
|
|
341
419
|
response = _a.sent();
|
|
342
420
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
343
421
|
}
|
|
@@ -361,33 +439,46 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
361
439
|
});
|
|
362
440
|
});
|
|
363
441
|
};
|
|
442
|
+
/**
|
|
443
|
+
* Creates request options for detachCompatibleProductProductChild without sending the request
|
|
444
|
+
*/
|
|
445
|
+
ProductApi.prototype.detachCompatibleProductProductChildRequestOpts = function (requestParameters) {
|
|
446
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
447
|
+
var queryParameters, headerParameters, urlPath;
|
|
448
|
+
return __generator(this, function (_a) {
|
|
449
|
+
if (requestParameters['productChild'] == null) {
|
|
450
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling detachCompatibleProductProductChild().');
|
|
451
|
+
}
|
|
452
|
+
if (requestParameters['compatibleProduct'] == null) {
|
|
453
|
+
throw new runtime.RequiredError('compatibleProduct', 'Required parameter "compatibleProduct" was null or undefined when calling detachCompatibleProductProductChild().');
|
|
454
|
+
}
|
|
455
|
+
queryParameters = {};
|
|
456
|
+
headerParameters = {};
|
|
457
|
+
urlPath = "/admin-api/product/children/{productChild}/compatible-product/detach/{compatibleProduct}";
|
|
458
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
459
|
+
urlPath = urlPath.replace("{".concat("compatibleProduct", "}"), encodeURIComponent(String(requestParameters['compatibleProduct'])));
|
|
460
|
+
return [2 /*return*/, {
|
|
461
|
+
path: urlPath,
|
|
462
|
+
method: 'DELETE',
|
|
463
|
+
headers: headerParameters,
|
|
464
|
+
query: queryParameters,
|
|
465
|
+
}];
|
|
466
|
+
});
|
|
467
|
+
});
|
|
468
|
+
};
|
|
364
469
|
/**
|
|
365
470
|
* Auto-generated: detachCompatibleProductProductChild
|
|
366
471
|
*/
|
|
367
472
|
ProductApi.prototype.detachCompatibleProductProductChildRaw = function (requestParameters, initOverrides) {
|
|
368
473
|
return __awaiter(this, void 0, void 0, function () {
|
|
369
|
-
var
|
|
474
|
+
var requestOptions, response;
|
|
370
475
|
return __generator(this, function (_a) {
|
|
371
476
|
switch (_a.label) {
|
|
372
|
-
case 0:
|
|
373
|
-
if (requestParameters['productChild'] == null) {
|
|
374
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling detachCompatibleProductProductChild().');
|
|
375
|
-
}
|
|
376
|
-
if (requestParameters['compatibleProduct'] == null) {
|
|
377
|
-
throw new runtime.RequiredError('compatibleProduct', 'Required parameter "compatibleProduct" was null or undefined when calling detachCompatibleProductProductChild().');
|
|
378
|
-
}
|
|
379
|
-
queryParameters = {};
|
|
380
|
-
headerParameters = {};
|
|
381
|
-
urlPath = "/admin-api/product/children/{productChild}/compatible-product/detach/{compatibleProduct}";
|
|
382
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
383
|
-
urlPath = urlPath.replace("{".concat("compatibleProduct", "}"), encodeURIComponent(String(requestParameters['compatibleProduct'])));
|
|
384
|
-
return [4 /*yield*/, this.request({
|
|
385
|
-
path: urlPath,
|
|
386
|
-
method: 'DELETE',
|
|
387
|
-
headers: headerParameters,
|
|
388
|
-
query: queryParameters,
|
|
389
|
-
}, initOverrides)];
|
|
477
|
+
case 0: return [4 /*yield*/, this.detachCompatibleProductProductChildRequestOpts(requestParameters)];
|
|
390
478
|
case 1:
|
|
479
|
+
requestOptions = _a.sent();
|
|
480
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
481
|
+
case 2:
|
|
391
482
|
response = _a.sent();
|
|
392
483
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
393
484
|
}
|
|
@@ -411,31 +502,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
411
502
|
});
|
|
412
503
|
});
|
|
413
504
|
};
|
|
505
|
+
/**
|
|
506
|
+
* Creates request options for detachDocumentsProductChild without sending the request
|
|
507
|
+
*/
|
|
508
|
+
ProductApi.prototype.detachDocumentsProductChildRequestOpts = function (requestParameters) {
|
|
509
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
510
|
+
var queryParameters, headerParameters, urlPath;
|
|
511
|
+
return __generator(this, function (_a) {
|
|
512
|
+
if (requestParameters['productChild'] == null) {
|
|
513
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling detachDocumentsProductChild().');
|
|
514
|
+
}
|
|
515
|
+
queryParameters = {};
|
|
516
|
+
headerParameters = {};
|
|
517
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
518
|
+
urlPath = "/admin-api/product/children/{productChild}/detach-documents";
|
|
519
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
520
|
+
return [2 /*return*/, {
|
|
521
|
+
path: urlPath,
|
|
522
|
+
method: 'POST',
|
|
523
|
+
headers: headerParameters,
|
|
524
|
+
query: queryParameters,
|
|
525
|
+
body: (0, index_1.DetachDocumentsProductChildRequestToJSON)(requestParameters['detachDocumentsProductChildRequest']),
|
|
526
|
+
}];
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
};
|
|
414
530
|
/**
|
|
415
531
|
* Auto-generated: detachDocumentsProductChild
|
|
416
532
|
*/
|
|
417
533
|
ProductApi.prototype.detachDocumentsProductChildRaw = function (requestParameters, initOverrides) {
|
|
418
534
|
return __awaiter(this, void 0, void 0, function () {
|
|
419
|
-
var
|
|
535
|
+
var requestOptions, response;
|
|
420
536
|
return __generator(this, function (_a) {
|
|
421
537
|
switch (_a.label) {
|
|
422
|
-
case 0:
|
|
423
|
-
if (requestParameters['productChild'] == null) {
|
|
424
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling detachDocumentsProductChild().');
|
|
425
|
-
}
|
|
426
|
-
queryParameters = {};
|
|
427
|
-
headerParameters = {};
|
|
428
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
429
|
-
urlPath = "/admin-api/product/children/{productChild}/detach-documents";
|
|
430
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
431
|
-
return [4 /*yield*/, this.request({
|
|
432
|
-
path: urlPath,
|
|
433
|
-
method: 'POST',
|
|
434
|
-
headers: headerParameters,
|
|
435
|
-
query: queryParameters,
|
|
436
|
-
body: (0, index_1.DetachDocumentsProductChildRequestToJSON)(requestParameters['detachDocumentsProductChildRequest']),
|
|
437
|
-
}, initOverrides)];
|
|
538
|
+
case 0: return [4 /*yield*/, this.detachDocumentsProductChildRequestOpts(requestParameters)];
|
|
438
539
|
case 1:
|
|
540
|
+
requestOptions = _a.sent();
|
|
541
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
542
|
+
case 2:
|
|
439
543
|
response = _a.sent();
|
|
440
544
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductChildResourceFromJSON)(jsonValue); })];
|
|
441
545
|
}
|
|
@@ -459,31 +563,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
459
563
|
});
|
|
460
564
|
});
|
|
461
565
|
};
|
|
566
|
+
/**
|
|
567
|
+
* Creates request options for getAccessoriesProductChild without sending the request
|
|
568
|
+
*/
|
|
569
|
+
ProductApi.prototype.getAccessoriesProductChildRequestOpts = function (requestParameters) {
|
|
570
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
571
|
+
var queryParameters, headerParameters, urlPath;
|
|
572
|
+
return __generator(this, function (_a) {
|
|
573
|
+
if (requestParameters['productChild'] == null) {
|
|
574
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling getAccessoriesProductChild().');
|
|
575
|
+
}
|
|
576
|
+
queryParameters = {};
|
|
577
|
+
headerParameters = {};
|
|
578
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
579
|
+
urlPath = "/admin-api/product/children/{productChild}/accessory/list";
|
|
580
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
581
|
+
return [2 /*return*/, {
|
|
582
|
+
path: urlPath,
|
|
583
|
+
method: 'POST',
|
|
584
|
+
headers: headerParameters,
|
|
585
|
+
query: queryParameters,
|
|
586
|
+
body: (0, index_1.IndexProductChildRequestToJSON)(requestParameters['indexProductChildRequest']),
|
|
587
|
+
}];
|
|
588
|
+
});
|
|
589
|
+
});
|
|
590
|
+
};
|
|
462
591
|
/**
|
|
463
592
|
* Auto-generated: getAccessoriesProductChild
|
|
464
593
|
*/
|
|
465
594
|
ProductApi.prototype.getAccessoriesProductChildRaw = function (requestParameters, initOverrides) {
|
|
466
595
|
return __awaiter(this, void 0, void 0, function () {
|
|
467
|
-
var
|
|
596
|
+
var requestOptions, response;
|
|
468
597
|
return __generator(this, function (_a) {
|
|
469
598
|
switch (_a.label) {
|
|
470
|
-
case 0:
|
|
471
|
-
if (requestParameters['productChild'] == null) {
|
|
472
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling getAccessoriesProductChild().');
|
|
473
|
-
}
|
|
474
|
-
queryParameters = {};
|
|
475
|
-
headerParameters = {};
|
|
476
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
477
|
-
urlPath = "/admin-api/product/children/{productChild}/accessory/list";
|
|
478
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
479
|
-
return [4 /*yield*/, this.request({
|
|
480
|
-
path: urlPath,
|
|
481
|
-
method: 'POST',
|
|
482
|
-
headers: headerParameters,
|
|
483
|
-
query: queryParameters,
|
|
484
|
-
body: (0, index_1.IndexProductChildRequestToJSON)(requestParameters['indexProductChildRequest']),
|
|
485
|
-
}, initOverrides)];
|
|
599
|
+
case 0: return [4 /*yield*/, this.getAccessoriesProductChildRequestOpts(requestParameters)];
|
|
486
600
|
case 1:
|
|
601
|
+
requestOptions = _a.sent();
|
|
602
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
603
|
+
case 2:
|
|
487
604
|
response = _a.sent();
|
|
488
605
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
489
606
|
}
|
|
@@ -507,27 +624,40 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
507
624
|
});
|
|
508
625
|
});
|
|
509
626
|
};
|
|
627
|
+
/**
|
|
628
|
+
* Creates request options for getAllProduct without sending the request
|
|
629
|
+
*/
|
|
630
|
+
ProductApi.prototype.getAllProductRequestOpts = function (requestParameters) {
|
|
631
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
632
|
+
var queryParameters, headerParameters, urlPath;
|
|
633
|
+
return __generator(this, function (_a) {
|
|
634
|
+
queryParameters = {};
|
|
635
|
+
headerParameters = {};
|
|
636
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
637
|
+
urlPath = "/admin-api/product/parent/all";
|
|
638
|
+
return [2 /*return*/, {
|
|
639
|
+
path: urlPath,
|
|
640
|
+
method: 'POST',
|
|
641
|
+
headers: headerParameters,
|
|
642
|
+
query: queryParameters,
|
|
643
|
+
body: (0, index_1.GetAllProductRequestToJSON)(requestParameters['getAllProductRequest']),
|
|
644
|
+
}];
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
};
|
|
510
648
|
/**
|
|
511
649
|
* Auto-generated: getAllProduct
|
|
512
650
|
*/
|
|
513
651
|
ProductApi.prototype.getAllProductRaw = function (requestParameters, initOverrides) {
|
|
514
652
|
return __awaiter(this, void 0, void 0, function () {
|
|
515
|
-
var
|
|
653
|
+
var requestOptions, response;
|
|
516
654
|
return __generator(this, function (_a) {
|
|
517
655
|
switch (_a.label) {
|
|
518
|
-
case 0:
|
|
519
|
-
queryParameters = {};
|
|
520
|
-
headerParameters = {};
|
|
521
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
522
|
-
urlPath = "/admin-api/product/parent/all";
|
|
523
|
-
return [4 /*yield*/, this.request({
|
|
524
|
-
path: urlPath,
|
|
525
|
-
method: 'POST',
|
|
526
|
-
headers: headerParameters,
|
|
527
|
-
query: queryParameters,
|
|
528
|
-
body: (0, index_1.GetAllProductRequestToJSON)(requestParameters['getAllProductRequest']),
|
|
529
|
-
}, initOverrides)];
|
|
656
|
+
case 0: return [4 /*yield*/, this.getAllProductRequestOpts(requestParameters)];
|
|
530
657
|
case 1:
|
|
658
|
+
requestOptions = _a.sent();
|
|
659
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
660
|
+
case 2:
|
|
531
661
|
response = _a.sent();
|
|
532
662
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductLiteResourceArrayResponseFromJSON)(jsonValue); })];
|
|
533
663
|
}
|
|
@@ -552,27 +682,40 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
552
682
|
});
|
|
553
683
|
});
|
|
554
684
|
};
|
|
685
|
+
/**
|
|
686
|
+
* Creates request options for getAllProductChild without sending the request
|
|
687
|
+
*/
|
|
688
|
+
ProductApi.prototype.getAllProductChildRequestOpts = function (requestParameters) {
|
|
689
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
690
|
+
var queryParameters, headerParameters, urlPath;
|
|
691
|
+
return __generator(this, function (_a) {
|
|
692
|
+
queryParameters = {};
|
|
693
|
+
headerParameters = {};
|
|
694
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
695
|
+
urlPath = "/admin-api/product/children/all";
|
|
696
|
+
return [2 /*return*/, {
|
|
697
|
+
path: urlPath,
|
|
698
|
+
method: 'POST',
|
|
699
|
+
headers: headerParameters,
|
|
700
|
+
query: queryParameters,
|
|
701
|
+
body: (0, index_1.GetAllProductChildRequestToJSON)(requestParameters['getAllProductChildRequest']),
|
|
702
|
+
}];
|
|
703
|
+
});
|
|
704
|
+
});
|
|
705
|
+
};
|
|
555
706
|
/**
|
|
556
707
|
* Auto-generated: getAllProductChild
|
|
557
708
|
*/
|
|
558
709
|
ProductApi.prototype.getAllProductChildRaw = function (requestParameters, initOverrides) {
|
|
559
710
|
return __awaiter(this, void 0, void 0, function () {
|
|
560
|
-
var
|
|
711
|
+
var requestOptions, response;
|
|
561
712
|
return __generator(this, function (_a) {
|
|
562
713
|
switch (_a.label) {
|
|
563
|
-
case 0:
|
|
564
|
-
queryParameters = {};
|
|
565
|
-
headerParameters = {};
|
|
566
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
567
|
-
urlPath = "/admin-api/product/children/all";
|
|
568
|
-
return [4 /*yield*/, this.request({
|
|
569
|
-
path: urlPath,
|
|
570
|
-
method: 'POST',
|
|
571
|
-
headers: headerParameters,
|
|
572
|
-
query: queryParameters,
|
|
573
|
-
body: (0, index_1.GetAllProductChildRequestToJSON)(requestParameters['getAllProductChildRequest']),
|
|
574
|
-
}, initOverrides)];
|
|
714
|
+
case 0: return [4 /*yield*/, this.getAllProductChildRequestOpts(requestParameters)];
|
|
575
715
|
case 1:
|
|
716
|
+
requestOptions = _a.sent();
|
|
717
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
718
|
+
case 2:
|
|
576
719
|
response = _a.sent();
|
|
577
720
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductChildLiteResourceArrayResponseFromJSON)(jsonValue); })];
|
|
578
721
|
}
|
|
@@ -597,31 +740,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
597
740
|
});
|
|
598
741
|
});
|
|
599
742
|
};
|
|
743
|
+
/**
|
|
744
|
+
* Creates request options for getCompatibleProductsProductChild without sending the request
|
|
745
|
+
*/
|
|
746
|
+
ProductApi.prototype.getCompatibleProductsProductChildRequestOpts = function (requestParameters) {
|
|
747
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
748
|
+
var queryParameters, headerParameters, urlPath;
|
|
749
|
+
return __generator(this, function (_a) {
|
|
750
|
+
if (requestParameters['productChild'] == null) {
|
|
751
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling getCompatibleProductsProductChild().');
|
|
752
|
+
}
|
|
753
|
+
queryParameters = {};
|
|
754
|
+
headerParameters = {};
|
|
755
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
756
|
+
urlPath = "/admin-api/product/children/{productChild}/compatible-product/list";
|
|
757
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
758
|
+
return [2 /*return*/, {
|
|
759
|
+
path: urlPath,
|
|
760
|
+
method: 'POST',
|
|
761
|
+
headers: headerParameters,
|
|
762
|
+
query: queryParameters,
|
|
763
|
+
body: (0, index_1.IndexProductChildRequestToJSON)(requestParameters['indexProductChildRequest']),
|
|
764
|
+
}];
|
|
765
|
+
});
|
|
766
|
+
});
|
|
767
|
+
};
|
|
600
768
|
/**
|
|
601
769
|
* Auto-generated: getCompatibleProductsProductChild
|
|
602
770
|
*/
|
|
603
771
|
ProductApi.prototype.getCompatibleProductsProductChildRaw = function (requestParameters, initOverrides) {
|
|
604
772
|
return __awaiter(this, void 0, void 0, function () {
|
|
605
|
-
var
|
|
773
|
+
var requestOptions, response;
|
|
606
774
|
return __generator(this, function (_a) {
|
|
607
775
|
switch (_a.label) {
|
|
608
|
-
case 0:
|
|
609
|
-
if (requestParameters['productChild'] == null) {
|
|
610
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling getCompatibleProductsProductChild().');
|
|
611
|
-
}
|
|
612
|
-
queryParameters = {};
|
|
613
|
-
headerParameters = {};
|
|
614
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
615
|
-
urlPath = "/admin-api/product/children/{productChild}/compatible-product/list";
|
|
616
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
617
|
-
return [4 /*yield*/, this.request({
|
|
618
|
-
path: urlPath,
|
|
619
|
-
method: 'POST',
|
|
620
|
-
headers: headerParameters,
|
|
621
|
-
query: queryParameters,
|
|
622
|
-
body: (0, index_1.IndexProductChildRequestToJSON)(requestParameters['indexProductChildRequest']),
|
|
623
|
-
}, initOverrides)];
|
|
776
|
+
case 0: return [4 /*yield*/, this.getCompatibleProductsProductChildRequestOpts(requestParameters)];
|
|
624
777
|
case 1:
|
|
778
|
+
requestOptions = _a.sent();
|
|
779
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
780
|
+
case 2:
|
|
625
781
|
response = _a.sent();
|
|
626
782
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
627
783
|
}
|
|
@@ -645,27 +801,40 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
645
801
|
});
|
|
646
802
|
});
|
|
647
803
|
};
|
|
804
|
+
/**
|
|
805
|
+
* Creates request options for indexProduct without sending the request
|
|
806
|
+
*/
|
|
807
|
+
ProductApi.prototype.indexProductRequestOpts = function (requestParameters) {
|
|
808
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
809
|
+
var queryParameters, headerParameters, urlPath;
|
|
810
|
+
return __generator(this, function (_a) {
|
|
811
|
+
queryParameters = {};
|
|
812
|
+
headerParameters = {};
|
|
813
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
814
|
+
urlPath = "/admin-api/product/parent/list";
|
|
815
|
+
return [2 /*return*/, {
|
|
816
|
+
path: urlPath,
|
|
817
|
+
method: 'POST',
|
|
818
|
+
headers: headerParameters,
|
|
819
|
+
query: queryParameters,
|
|
820
|
+
body: (0, index_1.IndexProductRequestToJSON)(requestParameters['indexProductRequest']),
|
|
821
|
+
}];
|
|
822
|
+
});
|
|
823
|
+
});
|
|
824
|
+
};
|
|
648
825
|
/**
|
|
649
826
|
* Auto-generated: indexProduct
|
|
650
827
|
*/
|
|
651
828
|
ProductApi.prototype.indexProductRaw = function (requestParameters, initOverrides) {
|
|
652
829
|
return __awaiter(this, void 0, void 0, function () {
|
|
653
|
-
var
|
|
830
|
+
var requestOptions, response;
|
|
654
831
|
return __generator(this, function (_a) {
|
|
655
832
|
switch (_a.label) {
|
|
656
|
-
case 0:
|
|
657
|
-
queryParameters = {};
|
|
658
|
-
headerParameters = {};
|
|
659
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
660
|
-
urlPath = "/admin-api/product/parent/list";
|
|
661
|
-
return [4 /*yield*/, this.request({
|
|
662
|
-
path: urlPath,
|
|
663
|
-
method: 'POST',
|
|
664
|
-
headers: headerParameters,
|
|
665
|
-
query: queryParameters,
|
|
666
|
-
body: (0, index_1.IndexProductRequestToJSON)(requestParameters['indexProductRequest']),
|
|
667
|
-
}, initOverrides)];
|
|
833
|
+
case 0: return [4 /*yield*/, this.indexProductRequestOpts(requestParameters)];
|
|
668
834
|
case 1:
|
|
835
|
+
requestOptions = _a.sent();
|
|
836
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
837
|
+
case 2:
|
|
669
838
|
response = _a.sent();
|
|
670
839
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductListResourceResponseFromJSON)(jsonValue); })];
|
|
671
840
|
}
|
|
@@ -690,27 +859,40 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
690
859
|
});
|
|
691
860
|
});
|
|
692
861
|
};
|
|
862
|
+
/**
|
|
863
|
+
* Creates request options for indexProductChild without sending the request
|
|
864
|
+
*/
|
|
865
|
+
ProductApi.prototype.indexProductChildRequestOpts = function (requestParameters) {
|
|
866
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
867
|
+
var queryParameters, headerParameters, urlPath;
|
|
868
|
+
return __generator(this, function (_a) {
|
|
869
|
+
queryParameters = {};
|
|
870
|
+
headerParameters = {};
|
|
871
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
872
|
+
urlPath = "/admin-api/product/children/list";
|
|
873
|
+
return [2 /*return*/, {
|
|
874
|
+
path: urlPath,
|
|
875
|
+
method: 'POST',
|
|
876
|
+
headers: headerParameters,
|
|
877
|
+
query: queryParameters,
|
|
878
|
+
body: (0, index_1.IndexProductChildRequestToJSON)(requestParameters['indexProductChildRequest']),
|
|
879
|
+
}];
|
|
880
|
+
});
|
|
881
|
+
});
|
|
882
|
+
};
|
|
693
883
|
/**
|
|
694
884
|
* Auto-generated: indexProductChild
|
|
695
885
|
*/
|
|
696
886
|
ProductApi.prototype.indexProductChildRaw = function (requestParameters, initOverrides) {
|
|
697
887
|
return __awaiter(this, void 0, void 0, function () {
|
|
698
|
-
var
|
|
888
|
+
var requestOptions, response;
|
|
699
889
|
return __generator(this, function (_a) {
|
|
700
890
|
switch (_a.label) {
|
|
701
|
-
case 0:
|
|
702
|
-
queryParameters = {};
|
|
703
|
-
headerParameters = {};
|
|
704
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
705
|
-
urlPath = "/admin-api/product/children/list";
|
|
706
|
-
return [4 /*yield*/, this.request({
|
|
707
|
-
path: urlPath,
|
|
708
|
-
method: 'POST',
|
|
709
|
-
headers: headerParameters,
|
|
710
|
-
query: queryParameters,
|
|
711
|
-
body: (0, index_1.IndexProductChildRequestToJSON)(requestParameters['indexProductChildRequest']),
|
|
712
|
-
}, initOverrides)];
|
|
891
|
+
case 0: return [4 /*yield*/, this.indexProductChildRequestOpts(requestParameters)];
|
|
713
892
|
case 1:
|
|
893
|
+
requestOptions = _a.sent();
|
|
894
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
895
|
+
case 2:
|
|
714
896
|
response = _a.sent();
|
|
715
897
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedProductChildListResourceResponseFromJSON)(jsonValue); })];
|
|
716
898
|
}
|
|
@@ -735,29 +917,42 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
735
917
|
});
|
|
736
918
|
});
|
|
737
919
|
};
|
|
920
|
+
/**
|
|
921
|
+
* Creates request options for showAssetsProductChild without sending the request
|
|
922
|
+
*/
|
|
923
|
+
ProductApi.prototype.showAssetsProductChildRequestOpts = function (requestParameters) {
|
|
924
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
925
|
+
var queryParameters, headerParameters, urlPath;
|
|
926
|
+
return __generator(this, function (_a) {
|
|
927
|
+
if (requestParameters['productChild'] == null) {
|
|
928
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling showAssetsProductChild().');
|
|
929
|
+
}
|
|
930
|
+
queryParameters = {};
|
|
931
|
+
headerParameters = {};
|
|
932
|
+
urlPath = "/admin-api/product/children/{productChild}/assets";
|
|
933
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
934
|
+
return [2 /*return*/, {
|
|
935
|
+
path: urlPath,
|
|
936
|
+
method: 'GET',
|
|
937
|
+
headers: headerParameters,
|
|
938
|
+
query: queryParameters,
|
|
939
|
+
}];
|
|
940
|
+
});
|
|
941
|
+
});
|
|
942
|
+
};
|
|
738
943
|
/**
|
|
739
944
|
* Auto-generated: showAssetsProductChild
|
|
740
945
|
*/
|
|
741
946
|
ProductApi.prototype.showAssetsProductChildRaw = function (requestParameters, initOverrides) {
|
|
742
947
|
return __awaiter(this, void 0, void 0, function () {
|
|
743
|
-
var
|
|
948
|
+
var requestOptions, response;
|
|
744
949
|
return __generator(this, function (_a) {
|
|
745
950
|
switch (_a.label) {
|
|
746
|
-
case 0:
|
|
747
|
-
if (requestParameters['productChild'] == null) {
|
|
748
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling showAssetsProductChild().');
|
|
749
|
-
}
|
|
750
|
-
queryParameters = {};
|
|
751
|
-
headerParameters = {};
|
|
752
|
-
urlPath = "/admin-api/product/children/{productChild}/assets";
|
|
753
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
754
|
-
return [4 /*yield*/, this.request({
|
|
755
|
-
path: urlPath,
|
|
756
|
-
method: 'GET',
|
|
757
|
-
headers: headerParameters,
|
|
758
|
-
query: queryParameters,
|
|
759
|
-
}, initOverrides)];
|
|
951
|
+
case 0: return [4 /*yield*/, this.showAssetsProductChildRequestOpts(requestParameters)];
|
|
760
952
|
case 1:
|
|
953
|
+
requestOptions = _a.sent();
|
|
954
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
955
|
+
case 2:
|
|
761
956
|
response = _a.sent();
|
|
762
957
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AssetResourceArrayResponseFromJSON)(jsonValue); })];
|
|
763
958
|
}
|
|
@@ -781,29 +976,42 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
781
976
|
});
|
|
782
977
|
});
|
|
783
978
|
};
|
|
979
|
+
/**
|
|
980
|
+
* Creates request options for showProduct without sending the request
|
|
981
|
+
*/
|
|
982
|
+
ProductApi.prototype.showProductRequestOpts = function (requestParameters) {
|
|
983
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
984
|
+
var queryParameters, headerParameters, urlPath;
|
|
985
|
+
return __generator(this, function (_a) {
|
|
986
|
+
if (requestParameters['product'] == null) {
|
|
987
|
+
throw new runtime.RequiredError('product', 'Required parameter "product" was null or undefined when calling showProduct().');
|
|
988
|
+
}
|
|
989
|
+
queryParameters = {};
|
|
990
|
+
headerParameters = {};
|
|
991
|
+
urlPath = "/admin-api/product/parent/{product}";
|
|
992
|
+
urlPath = urlPath.replace("{".concat("product", "}"), encodeURIComponent(String(requestParameters['product'])));
|
|
993
|
+
return [2 /*return*/, {
|
|
994
|
+
path: urlPath,
|
|
995
|
+
method: 'GET',
|
|
996
|
+
headers: headerParameters,
|
|
997
|
+
query: queryParameters,
|
|
998
|
+
}];
|
|
999
|
+
});
|
|
1000
|
+
});
|
|
1001
|
+
};
|
|
784
1002
|
/**
|
|
785
1003
|
* Auto-generated: showProduct
|
|
786
1004
|
*/
|
|
787
1005
|
ProductApi.prototype.showProductRaw = function (requestParameters, initOverrides) {
|
|
788
1006
|
return __awaiter(this, void 0, void 0, function () {
|
|
789
|
-
var
|
|
1007
|
+
var requestOptions, response;
|
|
790
1008
|
return __generator(this, function (_a) {
|
|
791
1009
|
switch (_a.label) {
|
|
792
|
-
case 0:
|
|
793
|
-
if (requestParameters['product'] == null) {
|
|
794
|
-
throw new runtime.RequiredError('product', 'Required parameter "product" was null or undefined when calling showProduct().');
|
|
795
|
-
}
|
|
796
|
-
queryParameters = {};
|
|
797
|
-
headerParameters = {};
|
|
798
|
-
urlPath = "/admin-api/product/parent/{product}";
|
|
799
|
-
urlPath = urlPath.replace("{".concat("product", "}"), encodeURIComponent(String(requestParameters['product'])));
|
|
800
|
-
return [4 /*yield*/, this.request({
|
|
801
|
-
path: urlPath,
|
|
802
|
-
method: 'GET',
|
|
803
|
-
headers: headerParameters,
|
|
804
|
-
query: queryParameters,
|
|
805
|
-
}, initOverrides)];
|
|
1010
|
+
case 0: return [4 /*yield*/, this.showProductRequestOpts(requestParameters)];
|
|
806
1011
|
case 1:
|
|
1012
|
+
requestOptions = _a.sent();
|
|
1013
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1014
|
+
case 2:
|
|
807
1015
|
response = _a.sent();
|
|
808
1016
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductResourceFromJSON)(jsonValue); })];
|
|
809
1017
|
}
|
|
@@ -827,29 +1035,42 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
827
1035
|
});
|
|
828
1036
|
});
|
|
829
1037
|
};
|
|
1038
|
+
/**
|
|
1039
|
+
* Creates request options for showProductChild without sending the request
|
|
1040
|
+
*/
|
|
1041
|
+
ProductApi.prototype.showProductChildRequestOpts = function (requestParameters) {
|
|
1042
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1043
|
+
var queryParameters, headerParameters, urlPath;
|
|
1044
|
+
return __generator(this, function (_a) {
|
|
1045
|
+
if (requestParameters['productChild'] == null) {
|
|
1046
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling showProductChild().');
|
|
1047
|
+
}
|
|
1048
|
+
queryParameters = {};
|
|
1049
|
+
headerParameters = {};
|
|
1050
|
+
urlPath = "/admin-api/product/children/{productChild}";
|
|
1051
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
1052
|
+
return [2 /*return*/, {
|
|
1053
|
+
path: urlPath,
|
|
1054
|
+
method: 'GET',
|
|
1055
|
+
headers: headerParameters,
|
|
1056
|
+
query: queryParameters,
|
|
1057
|
+
}];
|
|
1058
|
+
});
|
|
1059
|
+
});
|
|
1060
|
+
};
|
|
830
1061
|
/**
|
|
831
1062
|
* Auto-generated: showProductChild
|
|
832
1063
|
*/
|
|
833
1064
|
ProductApi.prototype.showProductChildRaw = function (requestParameters, initOverrides) {
|
|
834
1065
|
return __awaiter(this, void 0, void 0, function () {
|
|
835
|
-
var
|
|
1066
|
+
var requestOptions, response;
|
|
836
1067
|
return __generator(this, function (_a) {
|
|
837
1068
|
switch (_a.label) {
|
|
838
|
-
case 0:
|
|
839
|
-
if (requestParameters['productChild'] == null) {
|
|
840
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling showProductChild().');
|
|
841
|
-
}
|
|
842
|
-
queryParameters = {};
|
|
843
|
-
headerParameters = {};
|
|
844
|
-
urlPath = "/admin-api/product/children/{productChild}";
|
|
845
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
846
|
-
return [4 /*yield*/, this.request({
|
|
847
|
-
path: urlPath,
|
|
848
|
-
method: 'GET',
|
|
849
|
-
headers: headerParameters,
|
|
850
|
-
query: queryParameters,
|
|
851
|
-
}, initOverrides)];
|
|
1069
|
+
case 0: return [4 /*yield*/, this.showProductChildRequestOpts(requestParameters)];
|
|
852
1070
|
case 1:
|
|
1071
|
+
requestOptions = _a.sent();
|
|
1072
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1073
|
+
case 2:
|
|
853
1074
|
response = _a.sent();
|
|
854
1075
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductChildResourceFromJSON)(jsonValue); })];
|
|
855
1076
|
}
|
|
@@ -873,27 +1094,40 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
873
1094
|
});
|
|
874
1095
|
});
|
|
875
1096
|
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Creates request options for storeProduct without sending the request
|
|
1099
|
+
*/
|
|
1100
|
+
ProductApi.prototype.storeProductRequestOpts = function (requestParameters) {
|
|
1101
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1102
|
+
var queryParameters, headerParameters, urlPath;
|
|
1103
|
+
return __generator(this, function (_a) {
|
|
1104
|
+
queryParameters = {};
|
|
1105
|
+
headerParameters = {};
|
|
1106
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1107
|
+
urlPath = "/admin-api/product/parent/create";
|
|
1108
|
+
return [2 /*return*/, {
|
|
1109
|
+
path: urlPath,
|
|
1110
|
+
method: 'POST',
|
|
1111
|
+
headers: headerParameters,
|
|
1112
|
+
query: queryParameters,
|
|
1113
|
+
body: (0, index_1.StoreProductRequestToJSON)(requestParameters['storeProductRequest']),
|
|
1114
|
+
}];
|
|
1115
|
+
});
|
|
1116
|
+
});
|
|
1117
|
+
};
|
|
876
1118
|
/**
|
|
877
1119
|
* Auto-generated: storeProduct
|
|
878
1120
|
*/
|
|
879
1121
|
ProductApi.prototype.storeProductRaw = function (requestParameters, initOverrides) {
|
|
880
1122
|
return __awaiter(this, void 0, void 0, function () {
|
|
881
|
-
var
|
|
1123
|
+
var requestOptions, response;
|
|
882
1124
|
return __generator(this, function (_a) {
|
|
883
1125
|
switch (_a.label) {
|
|
884
|
-
case 0:
|
|
885
|
-
queryParameters = {};
|
|
886
|
-
headerParameters = {};
|
|
887
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
888
|
-
urlPath = "/admin-api/product/parent/create";
|
|
889
|
-
return [4 /*yield*/, this.request({
|
|
890
|
-
path: urlPath,
|
|
891
|
-
method: 'POST',
|
|
892
|
-
headers: headerParameters,
|
|
893
|
-
query: queryParameters,
|
|
894
|
-
body: (0, index_1.StoreProductRequestToJSON)(requestParameters['storeProductRequest']),
|
|
895
|
-
}, initOverrides)];
|
|
1126
|
+
case 0: return [4 /*yield*/, this.storeProductRequestOpts(requestParameters)];
|
|
896
1127
|
case 1:
|
|
1128
|
+
requestOptions = _a.sent();
|
|
1129
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1130
|
+
case 2:
|
|
897
1131
|
response = _a.sent();
|
|
898
1132
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductResourceFromJSON)(jsonValue); })];
|
|
899
1133
|
}
|
|
@@ -918,27 +1152,40 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
918
1152
|
});
|
|
919
1153
|
});
|
|
920
1154
|
};
|
|
1155
|
+
/**
|
|
1156
|
+
* Creates request options for storeProductChild without sending the request
|
|
1157
|
+
*/
|
|
1158
|
+
ProductApi.prototype.storeProductChildRequestOpts = function (requestParameters) {
|
|
1159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1160
|
+
var queryParameters, headerParameters, urlPath;
|
|
1161
|
+
return __generator(this, function (_a) {
|
|
1162
|
+
queryParameters = {};
|
|
1163
|
+
headerParameters = {};
|
|
1164
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1165
|
+
urlPath = "/admin-api/product/children/create";
|
|
1166
|
+
return [2 /*return*/, {
|
|
1167
|
+
path: urlPath,
|
|
1168
|
+
method: 'POST',
|
|
1169
|
+
headers: headerParameters,
|
|
1170
|
+
query: queryParameters,
|
|
1171
|
+
body: (0, index_1.StoreProductChildRequestToJSON)(requestParameters['storeProductChildRequest']),
|
|
1172
|
+
}];
|
|
1173
|
+
});
|
|
1174
|
+
});
|
|
1175
|
+
};
|
|
921
1176
|
/**
|
|
922
1177
|
* Auto-generated: storeProductChild
|
|
923
1178
|
*/
|
|
924
1179
|
ProductApi.prototype.storeProductChildRaw = function (requestParameters, initOverrides) {
|
|
925
1180
|
return __awaiter(this, void 0, void 0, function () {
|
|
926
|
-
var
|
|
1181
|
+
var requestOptions, response;
|
|
927
1182
|
return __generator(this, function (_a) {
|
|
928
1183
|
switch (_a.label) {
|
|
929
|
-
case 0:
|
|
930
|
-
queryParameters = {};
|
|
931
|
-
headerParameters = {};
|
|
932
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
933
|
-
urlPath = "/admin-api/product/children/create";
|
|
934
|
-
return [4 /*yield*/, this.request({
|
|
935
|
-
path: urlPath,
|
|
936
|
-
method: 'POST',
|
|
937
|
-
headers: headerParameters,
|
|
938
|
-
query: queryParameters,
|
|
939
|
-
body: (0, index_1.StoreProductChildRequestToJSON)(requestParameters['storeProductChildRequest']),
|
|
940
|
-
}, initOverrides)];
|
|
1184
|
+
case 0: return [4 /*yield*/, this.storeProductChildRequestOpts(requestParameters)];
|
|
941
1185
|
case 1:
|
|
1186
|
+
requestOptions = _a.sent();
|
|
1187
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1188
|
+
case 2:
|
|
942
1189
|
response = _a.sent();
|
|
943
1190
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductChildResourceFromJSON)(jsonValue); })];
|
|
944
1191
|
}
|
|
@@ -963,31 +1210,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
963
1210
|
});
|
|
964
1211
|
});
|
|
965
1212
|
};
|
|
1213
|
+
/**
|
|
1214
|
+
* Creates request options for updateProduct without sending the request
|
|
1215
|
+
*/
|
|
1216
|
+
ProductApi.prototype.updateProductRequestOpts = function (requestParameters) {
|
|
1217
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1218
|
+
var queryParameters, headerParameters, urlPath;
|
|
1219
|
+
return __generator(this, function (_a) {
|
|
1220
|
+
if (requestParameters['product'] == null) {
|
|
1221
|
+
throw new runtime.RequiredError('product', 'Required parameter "product" was null or undefined when calling updateProduct().');
|
|
1222
|
+
}
|
|
1223
|
+
queryParameters = {};
|
|
1224
|
+
headerParameters = {};
|
|
1225
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1226
|
+
urlPath = "/admin-api/product/parent/{product}/update";
|
|
1227
|
+
urlPath = urlPath.replace("{".concat("product", "}"), encodeURIComponent(String(requestParameters['product'])));
|
|
1228
|
+
return [2 /*return*/, {
|
|
1229
|
+
path: urlPath,
|
|
1230
|
+
method: 'PUT',
|
|
1231
|
+
headers: headerParameters,
|
|
1232
|
+
query: queryParameters,
|
|
1233
|
+
body: (0, index_1.UpdateProductRequestToJSON)(requestParameters['updateProductRequest']),
|
|
1234
|
+
}];
|
|
1235
|
+
});
|
|
1236
|
+
});
|
|
1237
|
+
};
|
|
966
1238
|
/**
|
|
967
1239
|
* Auto-generated: updateProduct
|
|
968
1240
|
*/
|
|
969
1241
|
ProductApi.prototype.updateProductRaw = function (requestParameters, initOverrides) {
|
|
970
1242
|
return __awaiter(this, void 0, void 0, function () {
|
|
971
|
-
var
|
|
1243
|
+
var requestOptions, response;
|
|
972
1244
|
return __generator(this, function (_a) {
|
|
973
1245
|
switch (_a.label) {
|
|
974
|
-
case 0:
|
|
975
|
-
if (requestParameters['product'] == null) {
|
|
976
|
-
throw new runtime.RequiredError('product', 'Required parameter "product" was null or undefined when calling updateProduct().');
|
|
977
|
-
}
|
|
978
|
-
queryParameters = {};
|
|
979
|
-
headerParameters = {};
|
|
980
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
981
|
-
urlPath = "/admin-api/product/parent/{product}/update";
|
|
982
|
-
urlPath = urlPath.replace("{".concat("product", "}"), encodeURIComponent(String(requestParameters['product'])));
|
|
983
|
-
return [4 /*yield*/, this.request({
|
|
984
|
-
path: urlPath,
|
|
985
|
-
method: 'PUT',
|
|
986
|
-
headers: headerParameters,
|
|
987
|
-
query: queryParameters,
|
|
988
|
-
body: (0, index_1.UpdateProductRequestToJSON)(requestParameters['updateProductRequest']),
|
|
989
|
-
}, initOverrides)];
|
|
1246
|
+
case 0: return [4 /*yield*/, this.updateProductRequestOpts(requestParameters)];
|
|
990
1247
|
case 1:
|
|
1248
|
+
requestOptions = _a.sent();
|
|
1249
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1250
|
+
case 2:
|
|
991
1251
|
response = _a.sent();
|
|
992
1252
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductResourceFromJSON)(jsonValue); })];
|
|
993
1253
|
}
|
|
@@ -1011,31 +1271,44 @@ var ProductApi = /** @class */ (function (_super) {
|
|
|
1011
1271
|
});
|
|
1012
1272
|
});
|
|
1013
1273
|
};
|
|
1274
|
+
/**
|
|
1275
|
+
* Creates request options for updateProductChild without sending the request
|
|
1276
|
+
*/
|
|
1277
|
+
ProductApi.prototype.updateProductChildRequestOpts = function (requestParameters) {
|
|
1278
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1279
|
+
var queryParameters, headerParameters, urlPath;
|
|
1280
|
+
return __generator(this, function (_a) {
|
|
1281
|
+
if (requestParameters['productChild'] == null) {
|
|
1282
|
+
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling updateProductChild().');
|
|
1283
|
+
}
|
|
1284
|
+
queryParameters = {};
|
|
1285
|
+
headerParameters = {};
|
|
1286
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1287
|
+
urlPath = "/admin-api/product/children/{productChild}/update";
|
|
1288
|
+
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
1289
|
+
return [2 /*return*/, {
|
|
1290
|
+
path: urlPath,
|
|
1291
|
+
method: 'PUT',
|
|
1292
|
+
headers: headerParameters,
|
|
1293
|
+
query: queryParameters,
|
|
1294
|
+
body: (0, index_1.UpdateProductChildRequestToJSON)(requestParameters['updateProductChildRequest']),
|
|
1295
|
+
}];
|
|
1296
|
+
});
|
|
1297
|
+
});
|
|
1298
|
+
};
|
|
1014
1299
|
/**
|
|
1015
1300
|
* Auto-generated: updateProductChild
|
|
1016
1301
|
*/
|
|
1017
1302
|
ProductApi.prototype.updateProductChildRaw = function (requestParameters, initOverrides) {
|
|
1018
1303
|
return __awaiter(this, void 0, void 0, function () {
|
|
1019
|
-
var
|
|
1304
|
+
var requestOptions, response;
|
|
1020
1305
|
return __generator(this, function (_a) {
|
|
1021
1306
|
switch (_a.label) {
|
|
1022
|
-
case 0:
|
|
1023
|
-
if (requestParameters['productChild'] == null) {
|
|
1024
|
-
throw new runtime.RequiredError('productChild', 'Required parameter "productChild" was null or undefined when calling updateProductChild().');
|
|
1025
|
-
}
|
|
1026
|
-
queryParameters = {};
|
|
1027
|
-
headerParameters = {};
|
|
1028
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1029
|
-
urlPath = "/admin-api/product/children/{productChild}/update";
|
|
1030
|
-
urlPath = urlPath.replace("{".concat("productChild", "}"), encodeURIComponent(String(requestParameters['productChild'])));
|
|
1031
|
-
return [4 /*yield*/, this.request({
|
|
1032
|
-
path: urlPath,
|
|
1033
|
-
method: 'PUT',
|
|
1034
|
-
headers: headerParameters,
|
|
1035
|
-
query: queryParameters,
|
|
1036
|
-
body: (0, index_1.UpdateProductChildRequestToJSON)(requestParameters['updateProductChildRequest']),
|
|
1037
|
-
}, initOverrides)];
|
|
1307
|
+
case 0: return [4 /*yield*/, this.updateProductChildRequestOpts(requestParameters)];
|
|
1038
1308
|
case 1:
|
|
1309
|
+
requestOptions = _a.sent();
|
|
1310
|
+
return [4 /*yield*/, this.request(requestOptions, initOverrides)];
|
|
1311
|
+
case 2:
|
|
1039
1312
|
response = _a.sent();
|
|
1040
1313
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductChildResourceFromJSON)(jsonValue); })];
|
|
1041
1314
|
}
|