@lcdp/api-react-rest-client 2.1.0-develop.4176088962 → 2.1.0-develop.4240713474
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.
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { BaseAPI, ApiResponse } from '../runtime';
|
|
13
|
-
import { ActiveProductUpdateParameters, OverstockProductUpdateParameters } from '../models';
|
|
12
|
+
import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
|
|
13
|
+
import { ActiveProductUpdateParameters, OverstockProductUpdateParameters, Synchroneity } from '../models';
|
|
14
14
|
export interface UpdateCurrentInventoryActiveProductsRequest {
|
|
15
15
|
activeProductUpdateParameters: ActiveProductUpdateParameters;
|
|
16
16
|
pEq?: number;
|
|
@@ -29,6 +29,10 @@ export interface UpdateInventoryOverstockProductsRequest {
|
|
|
29
29
|
overstockProductUpdateParameters: OverstockProductUpdateParameters;
|
|
30
30
|
pEq?: number;
|
|
31
31
|
}
|
|
32
|
+
export interface UpdateInventorySynchroneityRequest {
|
|
33
|
+
inventoryId: number;
|
|
34
|
+
synchroneity: Synchroneity;
|
|
35
|
+
}
|
|
32
36
|
/**
|
|
33
37
|
* no description
|
|
34
38
|
*/
|
|
@@ -65,4 +69,14 @@ export declare class ManageInventoryApi extends BaseAPI {
|
|
|
65
69
|
* Add product to black list
|
|
66
70
|
*/
|
|
67
71
|
updateInventoryOverstockProducts(requestParameters: UpdateInventoryOverstockProductsRequest): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
74
|
+
* Modify synchroneity state of a user
|
|
75
|
+
*/
|
|
76
|
+
updateInventorySynchroneityRaw(requestParameters: UpdateInventorySynchroneityRequest): Promise<ApiResponse<Synchroneity | BlobWithMeta>>;
|
|
77
|
+
/**
|
|
78
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
79
|
+
* Modify synchroneity state of a user
|
|
80
|
+
*/
|
|
81
|
+
updateInventorySynchroneity(requestParameters: UpdateInventorySynchroneityRequest): Promise<Synchroneity | BlobWithMeta>;
|
|
68
82
|
}
|
|
@@ -341,6 +341,86 @@ var ManageInventoryApi = /** @class */ (function (_super) {
|
|
|
341
341
|
});
|
|
342
342
|
});
|
|
343
343
|
};
|
|
344
|
+
/**
|
|
345
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
346
|
+
* Modify synchroneity state of a user
|
|
347
|
+
*/
|
|
348
|
+
ManageInventoryApi.prototype.updateInventorySynchroneityRaw = function (requestParameters) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
350
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_5;
|
|
351
|
+
return __generator(this, function (_a) {
|
|
352
|
+
switch (_a.label) {
|
|
353
|
+
case 0:
|
|
354
|
+
if (requestParameters.inventoryId === null || requestParameters.inventoryId === undefined) {
|
|
355
|
+
throw new runtime_1.RequiredError('inventoryId', 'Required parameter requestParameters.inventoryId was null or undefined when calling updateInventorySynchroneity.');
|
|
356
|
+
}
|
|
357
|
+
if (requestParameters.synchroneity === null || requestParameters.synchroneity === undefined) {
|
|
358
|
+
throw new runtime_1.RequiredError('synchroneity', 'Required parameter requestParameters.synchroneity was null or undefined when calling updateInventorySynchroneity.');
|
|
359
|
+
}
|
|
360
|
+
queryParameters = {};
|
|
361
|
+
headerParameters = {};
|
|
362
|
+
headerParameters['Content-Type'] = 'application/merge-patch+json';
|
|
363
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
364
|
+
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
|
|
365
|
+
}
|
|
366
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
367
|
+
token = this.configuration.accessToken;
|
|
368
|
+
tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
|
|
369
|
+
if (tokenString) {
|
|
370
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
_a.label = 1;
|
|
374
|
+
case 1:
|
|
375
|
+
_a.trys.push([1, 3, , 4]);
|
|
376
|
+
return [4 /*yield*/, this.request({
|
|
377
|
+
path: "/inventories/{inventoryId}/synchroneity".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters.inventoryId))),
|
|
378
|
+
method: 'PATCH',
|
|
379
|
+
headers: headerParameters,
|
|
380
|
+
query: queryParameters,
|
|
381
|
+
body: (0, models_1.SynchroneityToJSON)(requestParameters.synchroneity),
|
|
382
|
+
})];
|
|
383
|
+
case 2:
|
|
384
|
+
response = _a.sent();
|
|
385
|
+
contentType = response.headers.get("content-type");
|
|
386
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
387
|
+
return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.SynchroneityFromJSON)(jsonValue); })];
|
|
388
|
+
}
|
|
389
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
390
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
391
|
+
}
|
|
392
|
+
else {
|
|
393
|
+
// TODO : Better handling of others application types
|
|
394
|
+
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
395
|
+
}
|
|
396
|
+
return [3 /*break*/, 4];
|
|
397
|
+
case 3:
|
|
398
|
+
response_5 = _a.sent();
|
|
399
|
+
console.debug(response_5);
|
|
400
|
+
throw response_5;
|
|
401
|
+
case 4: return [2 /*return*/];
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* Allow to update sycnrhoneity of an inventory. For example to force resynchronize of a source, you can send source synchronizationScheduled to \'True\'. If you want to restart synchronization from the beginning of human life, you can send souyrce lastSynchronizationDate to \'0\'
|
|
408
|
+
* Modify synchroneity state of a user
|
|
409
|
+
*/
|
|
410
|
+
ManageInventoryApi.prototype.updateInventorySynchroneity = function (requestParameters) {
|
|
411
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
412
|
+
var response;
|
|
413
|
+
return __generator(this, function (_a) {
|
|
414
|
+
switch (_a.label) {
|
|
415
|
+
case 0: return [4 /*yield*/, this.updateInventorySynchroneityRaw(requestParameters)];
|
|
416
|
+
case 1:
|
|
417
|
+
response = _a.sent();
|
|
418
|
+
return [4 /*yield*/, response.value()];
|
|
419
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
};
|
|
344
424
|
return ManageInventoryApi;
|
|
345
425
|
}(runtime_1.BaseAPI));
|
|
346
426
|
exports.ManageInventoryApi = ManageInventoryApi;
|