@lcdp/api-react-rest-client 2.11.5-develop.15065984688 → 2.11.5

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 (98) hide show
  1. package/auth/src/models/PagingMetadata.d.ts +4 -4
  2. package/auth/src/models/PagingMetadata.js +4 -0
  3. package/banking-operation/src/models/PagingMetadata.d.ts +4 -4
  4. package/banking-operation/src/models/PagingMetadata.js +4 -0
  5. package/catalog/src/models/PagingMetadata.d.ts +4 -4
  6. package/catalog/src/models/PagingMetadata.js +4 -0
  7. package/factory/src/models/PagingMetadata.d.ts +4 -4
  8. package/factory/src/models/PagingMetadata.js +4 -0
  9. package/favorite/src/models/PagingMetadata.d.ts +4 -4
  10. package/favorite/src/models/PagingMetadata.js +4 -0
  11. package/inventory/src/apis/ManageInventoryApi.d.ts +28 -1
  12. package/inventory/src/apis/ManageInventoryApi.js +165 -8
  13. package/inventory/src/apis/index.d.ts +0 -1
  14. package/inventory/src/apis/index.js +0 -1
  15. package/inventory/src/models/ActiveProductUpdateParameters.d.ts +32 -0
  16. package/inventory/src/models/ActiveProductUpdateParameters.js +46 -0
  17. package/inventory/src/models/PagingMetadata.d.ts +4 -4
  18. package/inventory/src/models/PagingMetadata.js +4 -0
  19. package/inventory/src/models/SynchronizationMode.d.ts +3 -3
  20. package/inventory/src/models/SynchronizationMode.js +3 -3
  21. package/inventory/src/models/index.d.ts +1 -7
  22. package/inventory/src/models/index.js +1 -7
  23. package/invoice/src/models/Invoice.d.ts +2 -2
  24. package/invoice/src/models/OrderTally.d.ts +4 -4
  25. package/invoice/src/models/PagingMetadata.d.ts +4 -4
  26. package/invoice/src/models/PagingMetadata.js +4 -0
  27. package/laboratory/src/models/PagingMetadata.d.ts +4 -4
  28. package/laboratory/src/models/PagingMetadata.js +4 -0
  29. package/laboratory-store/src/models/PagingMetadata.d.ts +4 -4
  30. package/laboratory-store/src/models/PagingMetadata.js +4 -0
  31. package/laboratory-store-log/src/models/PagingMetadata.d.ts +4 -4
  32. package/laboratory-store-log/src/models/PagingMetadata.js +4 -0
  33. package/lexicon/src/models/PagingMetadata.d.ts +4 -4
  34. package/lexicon/src/models/PagingMetadata.js +4 -0
  35. package/message/src/models/PagingMetadata.d.ts +4 -4
  36. package/message/src/models/PagingMetadata.js +4 -0
  37. package/notification/src/models/PagingMetadata.d.ts +4 -4
  38. package/notification/src/models/PagingMetadata.js +4 -0
  39. package/order/src/models/Order.d.ts +1 -1
  40. package/order/src/models/Order.js +2 -0
  41. package/order/src/models/PagingMetadata.d.ts +4 -4
  42. package/order/src/models/PagingMetadata.js +4 -0
  43. package/order/src/models/UserLink.d.ts +1 -1
  44. package/order-log/src/models/PagingMetadata.d.ts +4 -4
  45. package/order-log/src/models/PagingMetadata.js +4 -0
  46. package/outrage-message/src/models/PagingMetadata.d.ts +4 -4
  47. package/outrage-message/src/models/PagingMetadata.js +4 -0
  48. package/package.json +1 -1
  49. package/product/src/models/PagingMetadata.d.ts +4 -4
  50. package/product/src/models/PagingMetadata.js +4 -0
  51. package/pub/src/models/Image.d.ts +6 -0
  52. package/pub/src/models/Image.js +4 -0
  53. package/pub/src/models/PagingMetadata.d.ts +4 -4
  54. package/pub/src/models/PagingMetadata.js +4 -0
  55. package/recommendation/src/models/PagingMetadata.d.ts +4 -4
  56. package/recommendation/src/models/PagingMetadata.js +4 -0
  57. package/rfx/src/models/PagingMetadata.d.ts +4 -4
  58. package/rfx/src/models/PagingMetadata.js +4 -0
  59. package/sale-offer/src/models/PagingMetadata.d.ts +4 -4
  60. package/sale-offer/src/models/PagingMetadata.js +4 -0
  61. package/sale-offer-log/src/models/PagingMetadata.d.ts +4 -4
  62. package/sale-offer-log/src/models/PagingMetadata.js +4 -0
  63. package/shipment/src/models/PagingMetadata.d.ts +4 -4
  64. package/shipment/src/models/PagingMetadata.js +4 -0
  65. package/shopping-cart/src/models/ProductLink.d.ts +1 -1
  66. package/statistic/src/models/PagingMetadata.d.ts +4 -4
  67. package/statistic/src/models/PagingMetadata.js +4 -0
  68. package/subscription/src/models/PagingMetadata.d.ts +4 -4
  69. package/subscription/src/models/PagingMetadata.js +4 -0
  70. package/thread/src/models/PagingMetadata.d.ts +4 -4
  71. package/thread/src/models/PagingMetadata.js +4 -0
  72. package/ubo/src/models/Ubo.d.ts +2 -3
  73. package/ubo/src/models/Ubo.js +2 -3
  74. package/ubo/src/models/index.d.ts +0 -1
  75. package/ubo/src/models/index.js +0 -1
  76. package/user/src/models/PagingMetadata.d.ts +4 -4
  77. package/user/src/models/PagingMetadata.js +4 -0
  78. package/user/src/models/UserUpdateParameters.d.ts +1 -1
  79. package/wish/src/models/PagingMetadata.d.ts +4 -4
  80. package/wish/src/models/PagingMetadata.js +4 -0
  81. package/inventory/src/apis/ManageInventorySynchronizationApi.d.ts +0 -93
  82. package/inventory/src/apis/ManageInventorySynchronizationApi.js +0 -515
  83. package/inventory/src/models/AnyBuffer.d.ts +0 -26
  84. package/inventory/src/models/AnyBuffer.js +0 -50
  85. package/inventory/src/models/Buffer.d.ts +0 -33
  86. package/inventory/src/models/Buffer.js +0 -47
  87. package/inventory/src/models/FixedBuffer.d.ts +0 -37
  88. package/inventory/src/models/FixedBuffer.js +0 -49
  89. package/inventory/src/models/IdentifiedSynchronization.d.ts +0 -52
  90. package/inventory/src/models/IdentifiedSynchronization.js +0 -62
  91. package/inventory/src/models/SalesForecastBuffer.d.ts +0 -37
  92. package/inventory/src/models/SalesForecastBuffer.js +0 -49
  93. package/inventory/src/models/Synchronization.d.ts +0 -48
  94. package/inventory/src/models/Synchronization.js +0 -58
  95. package/inventory/src/models/SynchronizationProposal.d.ts +0 -56
  96. package/inventory/src/models/SynchronizationProposal.js +0 -63
  97. package/ubo/src/models/Birthplace.d.ts +0 -38
  98. package/ubo/src/models/Birthplace.js +0 -52
@@ -16,17 +16,17 @@
16
16
  */
17
17
  export interface PagingMetadata {
18
18
  /**
19
- * Current page requested. Start at 0. May not be present if user do not request specific page.
19
+ * Current page requested. Start at 0.
20
20
  * @type {number}
21
21
  * @memberof PagingMetadata
22
22
  */
23
- page?: number;
23
+ page: number;
24
24
  /**
25
- * Number of item per page. 0 means that you only required metadata. May not be present if user do not request specific perPage.
25
+ * Number of item per page. 0 means that you only required metdata.
26
26
  * @type {number}
27
27
  * @memberof PagingMetadata
28
28
  */
29
- perPage?: number;
29
+ perPage: number;
30
30
  /**
31
31
  * Total number of item visible by the client in the request
32
32
  * @type {number}
@@ -18,6 +18,10 @@ exports.PagingMetadataToJSON = exports.PagingMetadataFromJSONTyped = exports.Pag
18
18
  * Check if a given object implements the PagingMetadata interface.
19
19
  */
20
20
  function instanceOfPagingMetadata(value) {
21
+ if (!('page' in value) || value['page'] === undefined)
22
+ return false;
23
+ if (!('perPage' in value) || value['perPage'] === undefined)
24
+ return false;
21
25
  if (!('totalVisible' in value) || value['totalVisible'] === undefined)
22
26
  return false;
23
27
  if (!('totalFound' in value) || value['totalFound'] === undefined)
@@ -16,17 +16,17 @@
16
16
  */
17
17
  export interface PagingMetadata {
18
18
  /**
19
- * Current page requested. Start at 0. May not be present if user do not request specific page.
19
+ * Current page requested. Start at 0.
20
20
  * @type {number}
21
21
  * @memberof PagingMetadata
22
22
  */
23
- page?: number;
23
+ page: number;
24
24
  /**
25
- * Number of item per page. 0 means that you only required metadata. May not be present if user do not request specific perPage.
25
+ * Number of item per page. 0 means that you only required metdata.
26
26
  * @type {number}
27
27
  * @memberof PagingMetadata
28
28
  */
29
- perPage?: number;
29
+ perPage: number;
30
30
  /**
31
31
  * Total number of item visible by the client in the request
32
32
  * @type {number}
@@ -18,6 +18,10 @@ exports.PagingMetadataToJSON = exports.PagingMetadataFromJSONTyped = exports.Pag
18
18
  * Check if a given object implements the PagingMetadata interface.
19
19
  */
20
20
  function instanceOfPagingMetadata(value) {
21
+ if (!('page' in value) || value['page'] === undefined)
22
+ return false;
23
+ if (!('perPage' in value) || value['perPage'] === undefined)
24
+ return false;
21
25
  if (!('totalVisible' in value) || value['totalVisible'] === undefined)
22
26
  return false;
23
27
  if (!('totalFound' in value) || value['totalFound'] === undefined)
@@ -16,17 +16,17 @@
16
16
  */
17
17
  export interface PagingMetadata {
18
18
  /**
19
- * Current page requested. Start at 0. May not be present if user do not request specific page.
19
+ * Current page requested. Start at 0.
20
20
  * @type {number}
21
21
  * @memberof PagingMetadata
22
22
  */
23
- page?: number;
23
+ page: number;
24
24
  /**
25
- * Number of item per page. 0 means that you only required metadata. May not be present if user do not request specific perPage.
25
+ * Number of item per page. 0 means that you only required metdata.
26
26
  * @type {number}
27
27
  * @memberof PagingMetadata
28
28
  */
29
- perPage?: number;
29
+ perPage: number;
30
30
  /**
31
31
  * Total number of item visible by the client in the request
32
32
  * @type {number}
@@ -18,6 +18,10 @@ exports.PagingMetadataToJSON = exports.PagingMetadataFromJSONTyped = exports.Pag
18
18
  * Check if a given object implements the PagingMetadata interface.
19
19
  */
20
20
  function instanceOfPagingMetadata(value) {
21
+ if (!('page' in value) || value['page'] === undefined)
22
+ return false;
23
+ if (!('perPage' in value) || value['perPage'] === undefined)
24
+ return false;
21
25
  if (!('totalVisible' in value) || value['totalVisible'] === undefined)
22
26
  return false;
23
27
  if (!('totalFound' in value) || value['totalFound'] === undefined)
@@ -16,17 +16,17 @@
16
16
  */
17
17
  export interface PagingMetadata {
18
18
  /**
19
- * Current page requested. Start at 0. May not be present if user do not request specific page.
19
+ * Current page requested. Start at 0.
20
20
  * @type {number}
21
21
  * @memberof PagingMetadata
22
22
  */
23
- page?: number;
23
+ page: number;
24
24
  /**
25
- * Number of item per page. 0 means that you only required metadata. May not be present if user do not request specific perPage.
25
+ * Number of item per page. 0 means that you only required metdata.
26
26
  * @type {number}
27
27
  * @memberof PagingMetadata
28
28
  */
29
- perPage?: number;
29
+ perPage: number;
30
30
  /**
31
31
  * Total number of item visible by the client in the request
32
32
  * @type {number}
@@ -18,6 +18,10 @@ exports.PagingMetadataToJSON = exports.PagingMetadataFromJSONTyped = exports.Pag
18
18
  * Check if a given object implements the PagingMetadata interface.
19
19
  */
20
20
  function instanceOfPagingMetadata(value) {
21
+ if (!('page' in value) || value['page'] === undefined)
22
+ return false;
23
+ if (!('perPage' in value) || value['perPage'] === undefined)
24
+ return false;
21
25
  if (!('totalVisible' in value) || value['totalVisible'] === undefined)
22
26
  return false;
23
27
  if (!('totalFound' in value) || value['totalFound'] === undefined)
@@ -16,17 +16,17 @@
16
16
  */
17
17
  export interface PagingMetadata {
18
18
  /**
19
- * Current page requested. Start at 0. May not be present if user do not request specific page.
19
+ * Current page requested. Start at 0.
20
20
  * @type {number}
21
21
  * @memberof PagingMetadata
22
22
  */
23
- page?: number;
23
+ page: number;
24
24
  /**
25
- * Number of item per page. 0 means that you only required metadata. May not be present if user do not request specific perPage.
25
+ * Number of item per page. 0 means that you only required metdata.
26
26
  * @type {number}
27
27
  * @memberof PagingMetadata
28
28
  */
29
- perPage?: number;
29
+ perPage: number;
30
30
  /**
31
31
  * Total number of item visible by the client in the request
32
32
  * @type {number}
@@ -18,6 +18,10 @@ exports.PagingMetadataToJSON = exports.PagingMetadataFromJSONTyped = exports.Pag
18
18
  * Check if a given object implements the PagingMetadata interface.
19
19
  */
20
20
  function instanceOfPagingMetadata(value) {
21
+ if (!('page' in value) || value['page'] === undefined)
22
+ return false;
23
+ if (!('perPage' in value) || value['perPage'] === undefined)
24
+ return false;
21
25
  if (!('totalVisible' in value) || value['totalVisible'] === undefined)
22
26
  return false;
23
27
  if (!('totalFound' in value) || value['totalFound'] === undefined)
@@ -10,11 +10,22 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { OverstockProductUpdateParameters } from '../models/index';
13
+ import type { ActiveProductUpdateParameters, OverstockProductUpdateParameters, SynchronizationMode } from '../models/index';
14
+ export interface UpdateCurrentInventoryActiveProductsRequest {
15
+ syncModeEq: Array<SynchronizationMode>;
16
+ activeProductUpdateParameters: ActiveProductUpdateParameters;
17
+ pEq?: Array<number>;
18
+ }
14
19
  export interface UpdateCurrentInventoryOverstockProductsRequest {
15
20
  overstockProductUpdateParameters: OverstockProductUpdateParameters;
16
21
  pEq?: number;
17
22
  }
23
+ export interface UpdateInventoryActiveProductsRequest {
24
+ inventoryId: number;
25
+ syncModeEq: Array<SynchronizationMode>;
26
+ activeProductUpdateParameters: ActiveProductUpdateParameters;
27
+ pEq?: Array<number>;
28
+ }
18
29
  export interface UpdateInventoryOverstockProductsRequest {
19
30
  inventoryId: number;
20
31
  overstockProductUpdateParameters: OverstockProductUpdateParameters;
@@ -24,6 +35,14 @@ export interface UpdateInventoryOverstockProductsRequest {
24
35
  *
25
36
  */
26
37
  export declare class ManageInventoryApi extends runtime.BaseAPI {
38
+ /**
39
+ * Allows to enable / disable automatic update on products for current user
40
+ */
41
+ updateCurrentInventoryActiveProductsRaw(requestParameters: UpdateCurrentInventoryActiveProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
42
+ /**
43
+ * Allows to enable / disable automatic update on products for current user
44
+ */
45
+ updateCurrentInventoryActiveProducts(requestParameters: UpdateCurrentInventoryActiveProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
27
46
  /**
28
47
  * Add product to black list
29
48
  */
@@ -32,6 +51,14 @@ export declare class ManageInventoryApi extends runtime.BaseAPI {
32
51
  * Add product to black list
33
52
  */
34
53
  updateCurrentInventoryOverstockProducts(requestParameters: UpdateCurrentInventoryOverstockProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
54
+ /**
55
+ * Allows to enable / disable automatic update on products for an inventory
56
+ */
57
+ updateInventoryActiveProductsRaw(requestParameters: UpdateInventoryActiveProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
58
+ /**
59
+ * Allows to enable / disable automatic update on products for an inventory
60
+ */
61
+ updateInventoryActiveProducts(requestParameters: UpdateInventoryActiveProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
35
62
  /**
36
63
  * Add product to black list
37
64
  */
@@ -75,12 +75,89 @@ var ManageInventoryApi = /** @class */ (function (_super) {
75
75
  function ManageInventoryApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Allows to enable / disable automatic update on products for current user
80
+ */
81
+ ManageInventoryApi.prototype.updateCurrentInventoryActiveProductsRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_1;
84
+ return __generator(this, function (_c) {
85
+ switch (_c.label) {
86
+ case 0:
87
+ if (requestParameters['syncModeEq'] == null) {
88
+ throw new runtime.RequiredError('syncModeEq', 'Required parameter "syncModeEq" was null or undefined when calling updateCurrentInventoryActiveProducts().');
89
+ }
90
+ if (requestParameters['activeProductUpdateParameters'] == null) {
91
+ throw new runtime.RequiredError('activeProductUpdateParameters', 'Required parameter "activeProductUpdateParameters" was null or undefined when calling updateCurrentInventoryActiveProducts().');
92
+ }
93
+ queryParameters = {};
94
+ if (requestParameters['pEq'] != null) {
95
+ queryParameters['p[eq]'] = requestParameters['pEq'];
96
+ }
97
+ if (requestParameters['syncModeEq'] != null) {
98
+ queryParameters['syncMode[eq]'] = requestParameters['syncModeEq'];
99
+ }
100
+ headerParameters = {};
101
+ headerParameters['Content-Type'] = 'application/json';
102
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
103
+ _a = headerParameters;
104
+ _b = "x-api-key";
105
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
106
+ case 1:
107
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
108
+ _c.label = 2;
109
+ case 2:
110
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
111
+ token = this.configuration.accessToken;
112
+ return [4 /*yield*/, token("bearerAuth", [])];
113
+ case 3:
114
+ tokenString = _c.sent();
115
+ if (tokenString) {
116
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
117
+ }
118
+ _c.label = 4;
119
+ case 4:
120
+ _c.trys.push([4, 6, , 7]);
121
+ return [4 /*yield*/, this.request({
122
+ path: "/inventories/me/active-products",
123
+ method: 'PATCH',
124
+ headers: headerParameters,
125
+ query: queryParameters,
126
+ body: (0, index_1.ActiveProductUpdateParametersToJSON)(requestParameters['activeProductUpdateParameters']),
127
+ }, initOverrides)];
128
+ case 5:
129
+ response = _c.sent();
130
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
131
+ case 6:
132
+ response_1 = _c.sent();
133
+ console.debug(response_1);
134
+ throw response_1;
135
+ case 7: return [2 /*return*/];
136
+ }
137
+ });
138
+ });
139
+ };
140
+ /**
141
+ * Allows to enable / disable automatic update on products for current user
142
+ */
143
+ ManageInventoryApi.prototype.updateCurrentInventoryActiveProducts = function (requestParameters, initOverrides) {
144
+ return __awaiter(this, void 0, void 0, function () {
145
+ return __generator(this, function (_a) {
146
+ switch (_a.label) {
147
+ case 0: return [4 /*yield*/, this.updateCurrentInventoryActiveProductsRaw(requestParameters, initOverrides)];
148
+ case 1:
149
+ _a.sent();
150
+ return [2 /*return*/];
151
+ }
152
+ });
153
+ });
154
+ };
78
155
  /**
79
156
  * Add product to black list
80
157
  */
81
158
  ManageInventoryApi.prototype.updateCurrentInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
82
159
  return __awaiter(this, void 0, void 0, function () {
83
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_1;
160
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
84
161
  return __generator(this, function (_c) {
85
162
  switch (_c.label) {
86
163
  case 0:
@@ -123,9 +200,9 @@ var ManageInventoryApi = /** @class */ (function (_super) {
123
200
  response = _c.sent();
124
201
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
125
202
  case 6:
126
- response_1 = _c.sent();
127
- console.debug(response_1);
128
- throw response_1;
203
+ response_2 = _c.sent();
204
+ console.debug(response_2);
205
+ throw response_2;
129
206
  case 7: return [2 /*return*/];
130
207
  }
131
208
  });
@@ -146,12 +223,92 @@ var ManageInventoryApi = /** @class */ (function (_super) {
146
223
  });
147
224
  });
148
225
  };
226
+ /**
227
+ * Allows to enable / disable automatic update on products for an inventory
228
+ */
229
+ ManageInventoryApi.prototype.updateInventoryActiveProductsRaw = function (requestParameters, initOverrides) {
230
+ return __awaiter(this, void 0, void 0, function () {
231
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_3;
232
+ return __generator(this, function (_c) {
233
+ switch (_c.label) {
234
+ case 0:
235
+ if (requestParameters['inventoryId'] == null) {
236
+ throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling updateInventoryActiveProducts().');
237
+ }
238
+ if (requestParameters['syncModeEq'] == null) {
239
+ throw new runtime.RequiredError('syncModeEq', 'Required parameter "syncModeEq" was null or undefined when calling updateInventoryActiveProducts().');
240
+ }
241
+ if (requestParameters['activeProductUpdateParameters'] == null) {
242
+ throw new runtime.RequiredError('activeProductUpdateParameters', 'Required parameter "activeProductUpdateParameters" was null or undefined when calling updateInventoryActiveProducts().');
243
+ }
244
+ queryParameters = {};
245
+ if (requestParameters['pEq'] != null) {
246
+ queryParameters['p[eq]'] = requestParameters['pEq'];
247
+ }
248
+ if (requestParameters['syncModeEq'] != null) {
249
+ queryParameters['syncMode[eq]'] = requestParameters['syncModeEq'];
250
+ }
251
+ headerParameters = {};
252
+ headerParameters['Content-Type'] = 'application/json';
253
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
254
+ _a = headerParameters;
255
+ _b = "x-api-key";
256
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
257
+ case 1:
258
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
259
+ _c.label = 2;
260
+ case 2:
261
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
262
+ token = this.configuration.accessToken;
263
+ return [4 /*yield*/, token("bearerAuth", [])];
264
+ case 3:
265
+ tokenString = _c.sent();
266
+ if (tokenString) {
267
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
268
+ }
269
+ _c.label = 4;
270
+ case 4:
271
+ _c.trys.push([4, 6, , 7]);
272
+ return [4 /*yield*/, this.request({
273
+ path: "/inventories/{inventoryId}/active-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
274
+ method: 'PATCH',
275
+ headers: headerParameters,
276
+ query: queryParameters,
277
+ body: (0, index_1.ActiveProductUpdateParametersToJSON)(requestParameters['activeProductUpdateParameters']),
278
+ }, initOverrides)];
279
+ case 5:
280
+ response = _c.sent();
281
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
282
+ case 6:
283
+ response_3 = _c.sent();
284
+ console.debug(response_3);
285
+ throw response_3;
286
+ case 7: return [2 /*return*/];
287
+ }
288
+ });
289
+ });
290
+ };
291
+ /**
292
+ * Allows to enable / disable automatic update on products for an inventory
293
+ */
294
+ ManageInventoryApi.prototype.updateInventoryActiveProducts = function (requestParameters, initOverrides) {
295
+ return __awaiter(this, void 0, void 0, function () {
296
+ return __generator(this, function (_a) {
297
+ switch (_a.label) {
298
+ case 0: return [4 /*yield*/, this.updateInventoryActiveProductsRaw(requestParameters, initOverrides)];
299
+ case 1:
300
+ _a.sent();
301
+ return [2 /*return*/];
302
+ }
303
+ });
304
+ });
305
+ };
149
306
  /**
150
307
  * Add product to black list
151
308
  */
152
309
  ManageInventoryApi.prototype.updateInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
153
310
  return __awaiter(this, void 0, void 0, function () {
154
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
311
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_4;
155
312
  return __generator(this, function (_c) {
156
313
  switch (_c.label) {
157
314
  case 0:
@@ -197,9 +354,9 @@ var ManageInventoryApi = /** @class */ (function (_super) {
197
354
  response = _c.sent();
198
355
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
199
356
  case 6:
200
- response_2 = _c.sent();
201
- console.debug(response_2);
202
- throw response_2;
357
+ response_4 = _c.sent();
358
+ console.debug(response_4);
359
+ throw response_4;
203
360
  case 7: return [2 /*return*/];
204
361
  }
205
362
  });
@@ -1,3 +1,2 @@
1
1
  export * from './ManageInventoryApi';
2
- export * from './ManageInventorySynchronizationApi';
3
2
  export * from './SearchInventoryApi';
@@ -17,5 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./ManageInventoryApi"), exports);
20
- __exportStar(require("./ManageInventorySynchronizationApi"), exports);
21
20
  __exportStar(require("./SearchInventoryApi"), exports);
@@ -0,0 +1,32 @@
1
+ /**
2
+ * lcdp-pharmaide-service
3
+ * This is the REST API of LCDP products
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: contact@lecomptoirdespharmacies.fr
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SynchronizationMode } from './SynchronizationMode';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ActiveProductUpdateParameters
17
+ */
18
+ export interface ActiveProductUpdateParameters {
19
+ /**
20
+ *
21
+ * @type {SynchronizationMode}
22
+ * @memberof ActiveProductUpdateParameters
23
+ */
24
+ synchronizationMode?: SynchronizationMode;
25
+ }
26
+ /**
27
+ * Check if a given object implements the ActiveProductUpdateParameters interface.
28
+ */
29
+ export declare function instanceOfActiveProductUpdateParameters(value: object): value is ActiveProductUpdateParameters;
30
+ export declare function ActiveProductUpdateParametersFromJSON(json: any): ActiveProductUpdateParameters;
31
+ export declare function ActiveProductUpdateParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActiveProductUpdateParameters;
32
+ export declare function ActiveProductUpdateParametersToJSON(value?: ActiveProductUpdateParameters | null): any;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-pharmaide-service
6
+ * This is the REST API of LCDP products
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: contact@lecomptoirdespharmacies.fr
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ActiveProductUpdateParametersToJSON = exports.ActiveProductUpdateParametersFromJSONTyped = exports.ActiveProductUpdateParametersFromJSON = exports.instanceOfActiveProductUpdateParameters = void 0;
17
+ var SynchronizationMode_1 = require("./SynchronizationMode");
18
+ /**
19
+ * Check if a given object implements the ActiveProductUpdateParameters interface.
20
+ */
21
+ function instanceOfActiveProductUpdateParameters(value) {
22
+ return true;
23
+ }
24
+ exports.instanceOfActiveProductUpdateParameters = instanceOfActiveProductUpdateParameters;
25
+ function ActiveProductUpdateParametersFromJSON(json) {
26
+ return ActiveProductUpdateParametersFromJSONTyped(json, false);
27
+ }
28
+ exports.ActiveProductUpdateParametersFromJSON = ActiveProductUpdateParametersFromJSON;
29
+ function ActiveProductUpdateParametersFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'synchronizationMode': (json['synchronizationMode'] === null || json['synchronizationMode'] === undefined) ? json['synchronizationMode'] : (0, SynchronizationMode_1.SynchronizationModeFromJSON)(json['synchronizationMode']),
35
+ };
36
+ }
37
+ exports.ActiveProductUpdateParametersFromJSONTyped = ActiveProductUpdateParametersFromJSONTyped;
38
+ function ActiveProductUpdateParametersToJSON(value) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'synchronizationMode': (0, SynchronizationMode_1.SynchronizationModeToJSON)(value['synchronizationMode']),
44
+ };
45
+ }
46
+ exports.ActiveProductUpdateParametersToJSON = ActiveProductUpdateParametersToJSON;
@@ -16,17 +16,17 @@
16
16
  */
17
17
  export interface PagingMetadata {
18
18
  /**
19
- * Current page requested. Start at 0. May not be present if user do not request specific page.
19
+ * Current page requested. Start at 0.
20
20
  * @type {number}
21
21
  * @memberof PagingMetadata
22
22
  */
23
- page?: number;
23
+ page: number;
24
24
  /**
25
- * Number of item per page. 0 means that you only required metadata. May not be present if user do not request specific perPage.
25
+ * Number of item per page. 0 means that you only required metdata.
26
26
  * @type {number}
27
27
  * @memberof PagingMetadata
28
28
  */
29
- perPage?: number;
29
+ perPage: number;
30
30
  /**
31
31
  * Total number of item visible by the client in the request
32
32
  * @type {number}
@@ -18,6 +18,10 @@ exports.PagingMetadataToJSON = exports.PagingMetadataFromJSONTyped = exports.Pag
18
18
  * Check if a given object implements the PagingMetadata interface.
19
19
  */
20
20
  function instanceOfPagingMetadata(value) {
21
+ if (!('page' in value) || value['page'] === undefined)
22
+ return false;
23
+ if (!('perPage' in value) || value['perPage'] === undefined)
24
+ return false;
21
25
  if (!('totalVisible' in value) || value['totalVisible'] === undefined)
22
26
  return false;
23
27
  if (!('totalFound' in value) || value['totalFound'] === undefined)
@@ -13,11 +13,11 @@
13
13
  * Synchronization state of the product
14
14
  * * UP_AND_DOWN: Automatic creation/update and deletion of sale offers according to your available stock.
15
15
  * Note : Will create its own offer, meaning if you already have a sale offer on a product, it will create a duplicate.
16
- * Note 2 : Setting 'NONE' to a synchronizationId with mode 'UP_AND_DOWN' will delete the associated sale offers.
16
+ * Note 2 : Setting 'NONE' to a productId with SynchronizationMode 'UP_AND_DOWN' will delete the associated sale offers.
17
17
  * * DOWN: Automatic update of existing sale offers according to your available stock.
18
18
  * Note : Will only update sale offer if there is only one sale offer active on a given product.
19
- * Note 2 : Setting 'NONE' to a synchronizationId with mode 'DOWN' will not archive the existing sale offers.
20
- * * NONE: Do not synchronize synchronizationId according to available stock.
19
+ * Note 2 : Setting 'NONE' to a productId with SynchronizationMode 'DOWN' will not archive the existing sale offers.
20
+ * * NONE: Do not synchronize productId according to available stock.
21
21
  *
22
22
  * @export
23
23
  */
@@ -18,11 +18,11 @@ exports.SynchronizationModeToJSON = exports.SynchronizationModeFromJSONTyped = e
18
18
  * Synchronization state of the product
19
19
  * * UP_AND_DOWN: Automatic creation/update and deletion of sale offers according to your available stock.
20
20
  * Note : Will create its own offer, meaning if you already have a sale offer on a product, it will create a duplicate.
21
- * Note 2 : Setting 'NONE' to a synchronizationId with mode 'UP_AND_DOWN' will delete the associated sale offers.
21
+ * Note 2 : Setting 'NONE' to a productId with SynchronizationMode 'UP_AND_DOWN' will delete the associated sale offers.
22
22
  * * DOWN: Automatic update of existing sale offers according to your available stock.
23
23
  * Note : Will only update sale offer if there is only one sale offer active on a given product.
24
- * Note 2 : Setting 'NONE' to a synchronizationId with mode 'DOWN' will not archive the existing sale offers.
25
- * * NONE: Do not synchronize synchronizationId according to available stock.
24
+ * Note 2 : Setting 'NONE' to a productId with SynchronizationMode 'DOWN' will not archive the existing sale offers.
25
+ * * NONE: Do not synchronize productId according to available stock.
26
26
  *
27
27
  * @export
28
28
  */
@@ -1,10 +1,7 @@
1
1
  export * from './ActiveProduct';
2
- export * from './AnyBuffer';
2
+ export * from './ActiveProductUpdateParameters';
3
3
  export * from './Barcodes';
4
- export * from './Buffer';
5
- export * from './FixedBuffer';
6
4
  export * from './HttpLink';
7
- export * from './IdentifiedSynchronization';
8
5
  export * from './Inventory';
9
6
  export * from './InventoryJournal';
10
7
  export * from './MisalignedProduct';
@@ -19,12 +16,9 @@ export * from './PaginatedUnderstockProducts';
19
16
  export * from './PagingMetadata';
20
17
  export * from './ProductLink';
21
18
  export * from './RestError';
22
- export * from './SalesForecastBuffer';
23
19
  export * from './Statistics';
24
20
  export * from './StatisticsActiveProducts';
25
21
  export * from './StatisticsMisalignedProducts';
26
22
  export * from './StatisticsOverstockProducts';
27
- export * from './Synchronization';
28
23
  export * from './SynchronizationMode';
29
- export * from './SynchronizationProposal';
30
24
  export * from './UnderstockProduct';