@lcdp/api-react-rest-client 2.13.3-LDS-4613.15762583436 → 2.13.3-LDS-4522-allow-to-retrigger-offer-planif.15782220374

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.
@@ -27,6 +27,10 @@ export interface CreateOrUpdateInventorySynchronizationsRequest {
27
27
  inventoryId: number;
28
28
  identifiedSynchronization: Array<IdentifiedSynchronization>;
29
29
  }
30
+ export interface OfferRefreshRequest {
31
+ inventoryId: number;
32
+ body?: string;
33
+ }
30
34
  export interface UpdateCurrentInventorySynchronizationsRequest {
31
35
  synchronization: Synchronization;
32
36
  idEq?: Array<number>;
@@ -76,6 +80,14 @@ export declare class ManageInventorySynchronizationApi extends runtime.BaseAPI {
76
80
  * Replace the list of product synchronizations for a user
77
81
  */
78
82
  createOrUpdateInventorySynchronizations(requestParameters: CreateOrUpdateInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
83
+ /**
84
+ * Refresh inventory offer
85
+ */
86
+ offerRefreshRaw(requestParameters: OfferRefreshRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
87
+ /**
88
+ * Refresh inventory offer
89
+ */
90
+ offerRefresh(requestParameters: OfferRefreshRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
79
91
  /**
80
92
  * Replace synchronization for each product matched by syncMode: If syncMode is not defined, so replace all product synchronization
81
93
  */
@@ -359,12 +359,80 @@ var ManageInventorySynchronizationApi = /** @class */ (function (_super) {
359
359
  });
360
360
  });
361
361
  };
362
+ /**
363
+ * Refresh inventory offer
364
+ */
365
+ ManageInventorySynchronizationApi.prototype.offerRefreshRaw = function (requestParameters, initOverrides) {
366
+ return __awaiter(this, void 0, void 0, function () {
367
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_5;
368
+ return __generator(this, function (_c) {
369
+ switch (_c.label) {
370
+ case 0:
371
+ if (requestParameters['inventoryId'] == null) {
372
+ throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling offerRefresh().');
373
+ }
374
+ queryParameters = {};
375
+ headerParameters = {};
376
+ headerParameters['Content-Type'] = 'application/json';
377
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
378
+ _a = headerParameters;
379
+ _b = "x-api-key";
380
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
381
+ case 1:
382
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
383
+ _c.label = 2;
384
+ case 2:
385
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
386
+ token = this.configuration.accessToken;
387
+ return [4 /*yield*/, token("bearerAuth", [])];
388
+ case 3:
389
+ tokenString = _c.sent();
390
+ if (tokenString) {
391
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
392
+ }
393
+ _c.label = 4;
394
+ case 4:
395
+ _c.trys.push([4, 6, , 7]);
396
+ return [4 /*yield*/, this.request({
397
+ path: "/inventories/{inventoryId}/offer-refreshes".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
398
+ method: 'POST',
399
+ headers: headerParameters,
400
+ query: queryParameters,
401
+ body: requestParameters['body'],
402
+ }, initOverrides)];
403
+ case 5:
404
+ response = _c.sent();
405
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
406
+ case 6:
407
+ response_5 = _c.sent();
408
+ console.debug(response_5);
409
+ throw response_5;
410
+ case 7: return [2 /*return*/];
411
+ }
412
+ });
413
+ });
414
+ };
415
+ /**
416
+ * Refresh inventory offer
417
+ */
418
+ ManageInventorySynchronizationApi.prototype.offerRefresh = function (requestParameters, initOverrides) {
419
+ return __awaiter(this, void 0, void 0, function () {
420
+ return __generator(this, function (_a) {
421
+ switch (_a.label) {
422
+ case 0: return [4 /*yield*/, this.offerRefreshRaw(requestParameters, initOverrides)];
423
+ case 1:
424
+ _a.sent();
425
+ return [2 /*return*/];
426
+ }
427
+ });
428
+ });
429
+ };
362
430
  /**
363
431
  * Replace synchronization for each product matched by syncMode: If syncMode is not defined, so replace all product synchronization
364
432
  */
365
433
  ManageInventorySynchronizationApi.prototype.updateCurrentInventorySynchronizationsRaw = function (requestParameters, initOverrides) {
366
434
  return __awaiter(this, void 0, void 0, function () {
367
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_5;
435
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_6;
368
436
  return __generator(this, function (_c) {
369
437
  switch (_c.label) {
370
438
  case 0:
@@ -413,9 +481,9 @@ var ManageInventorySynchronizationApi = /** @class */ (function (_super) {
413
481
  response = _c.sent();
414
482
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
415
483
  case 6:
416
- response_5 = _c.sent();
417
- console.debug(response_5);
418
- throw response_5;
484
+ response_6 = _c.sent();
485
+ console.debug(response_6);
486
+ throw response_6;
419
487
  case 7: return [2 /*return*/];
420
488
  }
421
489
  });
@@ -441,7 +509,7 @@ var ManageInventorySynchronizationApi = /** @class */ (function (_super) {
441
509
  */
442
510
  ManageInventorySynchronizationApi.prototype.updateInventorySynchronizationsRaw = function (requestParameters, initOverrides) {
443
511
  return __awaiter(this, void 0, void 0, function () {
444
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_6;
512
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_7;
445
513
  return __generator(this, function (_c) {
446
514
  switch (_c.label) {
447
515
  case 0:
@@ -493,9 +561,9 @@ var ManageInventorySynchronizationApi = /** @class */ (function (_super) {
493
561
  response = _c.sent();
494
562
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
495
563
  case 6:
496
- response_6 = _c.sent();
497
- console.debug(response_6);
498
- throw response_6;
564
+ response_7 = _c.sent();
565
+ console.debug(response_7);
566
+ throw response_7;
499
567
  case 7: return [2 /*return*/];
500
568
  }
501
569
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.13.3-LDS-4613.15762583436",
3
+ "version": "2.13.3-LDS-4522-allow-to-retrigger-offer-planif.15782220374",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },