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

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 (28) hide show
  1. package/inventory/src/apis/ManageInventoryApi.d.ts +1 -28
  2. package/inventory/src/apis/ManageInventoryApi.js +8 -165
  3. package/inventory/src/apis/ManageInventorySynchronizationApi.d.ts +93 -0
  4. package/inventory/src/apis/ManageInventorySynchronizationApi.js +515 -0
  5. package/inventory/src/apis/index.d.ts +1 -0
  6. package/inventory/src/apis/index.js +1 -0
  7. package/inventory/src/models/AnyBuffer.d.ts +26 -0
  8. package/inventory/src/models/AnyBuffer.js +50 -0
  9. package/inventory/src/models/Buffer.d.ts +33 -0
  10. package/inventory/src/models/Buffer.js +47 -0
  11. package/inventory/src/models/FixedBuffer.d.ts +37 -0
  12. package/inventory/src/models/FixedBuffer.js +49 -0
  13. package/inventory/src/models/IdentifiedSynchronization.d.ts +52 -0
  14. package/inventory/src/models/IdentifiedSynchronization.js +62 -0
  15. package/inventory/src/models/SalesForecastBuffer.d.ts +37 -0
  16. package/inventory/src/models/SalesForecastBuffer.js +49 -0
  17. package/inventory/src/models/Synchronization.d.ts +48 -0
  18. package/inventory/src/models/Synchronization.js +58 -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/SynchronizationProposal.d.ts +56 -0
  22. package/inventory/src/models/SynchronizationProposal.js +63 -0
  23. package/inventory/src/models/index.d.ts +7 -1
  24. package/inventory/src/models/index.js +7 -1
  25. package/package.json +1 -1
  26. package/shopping-cart/src/models/ProductLink.d.ts +1 -1
  27. package/inventory/src/models/ActiveProductUpdateParameters.d.ts +0 -32
  28. package/inventory/src/models/ActiveProductUpdateParameters.js +0 -46
@@ -10,22 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
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
- }
13
+ import type { OverstockProductUpdateParameters } from '../models/index';
19
14
  export interface UpdateCurrentInventoryOverstockProductsRequest {
20
15
  overstockProductUpdateParameters: OverstockProductUpdateParameters;
21
16
  pEq?: number;
22
17
  }
23
- export interface UpdateInventoryActiveProductsRequest {
24
- inventoryId: number;
25
- syncModeEq: Array<SynchronizationMode>;
26
- activeProductUpdateParameters: ActiveProductUpdateParameters;
27
- pEq?: Array<number>;
28
- }
29
18
  export interface UpdateInventoryOverstockProductsRequest {
30
19
  inventoryId: number;
31
20
  overstockProductUpdateParameters: OverstockProductUpdateParameters;
@@ -35,14 +24,6 @@ export interface UpdateInventoryOverstockProductsRequest {
35
24
  *
36
25
  */
37
26
  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>;
46
27
  /**
47
28
  * Add product to black list
48
29
  */
@@ -51,14 +32,6 @@ export declare class ManageInventoryApi extends runtime.BaseAPI {
51
32
  * Add product to black list
52
33
  */
53
34
  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>;
62
35
  /**
63
36
  * Add product to black list
64
37
  */
@@ -75,89 +75,12 @@ 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
- };
155
78
  /**
156
79
  * Add product to black list
157
80
  */
158
81
  ManageInventoryApi.prototype.updateCurrentInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
159
82
  return __awaiter(this, void 0, void 0, function () {
160
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
83
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_1;
161
84
  return __generator(this, function (_c) {
162
85
  switch (_c.label) {
163
86
  case 0:
@@ -200,9 +123,9 @@ var ManageInventoryApi = /** @class */ (function (_super) {
200
123
  response = _c.sent();
201
124
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
202
125
  case 6:
203
- response_2 = _c.sent();
204
- console.debug(response_2);
205
- throw response_2;
126
+ response_1 = _c.sent();
127
+ console.debug(response_1);
128
+ throw response_1;
206
129
  case 7: return [2 /*return*/];
207
130
  }
208
131
  });
@@ -223,92 +146,12 @@ var ManageInventoryApi = /** @class */ (function (_super) {
223
146
  });
224
147
  });
225
148
  };
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
- };
306
149
  /**
307
150
  * Add product to black list
308
151
  */
309
152
  ManageInventoryApi.prototype.updateInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
310
153
  return __awaiter(this, void 0, void 0, function () {
311
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_4;
154
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
312
155
  return __generator(this, function (_c) {
313
156
  switch (_c.label) {
314
157
  case 0:
@@ -354,9 +197,9 @@ var ManageInventoryApi = /** @class */ (function (_super) {
354
197
  response = _c.sent();
355
198
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
356
199
  case 6:
357
- response_4 = _c.sent();
358
- console.debug(response_4);
359
- throw response_4;
200
+ response_2 = _c.sent();
201
+ console.debug(response_2);
202
+ throw response_2;
360
203
  case 7: return [2 /*return*/];
361
204
  }
362
205
  });
@@ -0,0 +1,93 @@
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 * as runtime from '../runtime';
13
+ import type { IdentifiedSynchronization, Synchronization, SynchronizationMode } from '../models/index';
14
+ export interface CreateOrUpdateCurrentInventorySynchronizationRequest {
15
+ synchronizationId: number;
16
+ synchronization: Synchronization;
17
+ }
18
+ export interface CreateOrUpdateCurrentInventorySynchronizationsRequest {
19
+ identifiedSynchronization: Array<IdentifiedSynchronization>;
20
+ }
21
+ export interface CreateOrUpdateInventorySynchronizationRequest {
22
+ inventoryId: number;
23
+ synchronizationId: number;
24
+ synchronization: Synchronization;
25
+ }
26
+ export interface CreateOrUpdateInventorySynchronizationsRequest {
27
+ inventoryId: number;
28
+ identifiedSynchronization: Array<IdentifiedSynchronization>;
29
+ }
30
+ export interface UpdateCurrentInventorySynchronizationsRequest {
31
+ synchronization: Synchronization;
32
+ idEq?: Array<number>;
33
+ modeEq?: Array<SynchronizationMode>;
34
+ }
35
+ export interface UpdateInventorySynchronizationsRequest {
36
+ inventoryId: number;
37
+ synchronization: Synchronization;
38
+ idEq?: Array<number>;
39
+ modeEq?: Array<SynchronizationMode>;
40
+ }
41
+ /**
42
+ *
43
+ */
44
+ export declare class ManageInventorySynchronizationApi extends runtime.BaseAPI {
45
+ /**
46
+ * Change synchronization mode on products for current user
47
+ */
48
+ createOrUpdateCurrentInventorySynchronizationRaw(requestParameters: CreateOrUpdateCurrentInventorySynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
49
+ /**
50
+ * Change synchronization mode on products for current user
51
+ */
52
+ createOrUpdateCurrentInventorySynchronization(requestParameters: CreateOrUpdateCurrentInventorySynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
53
+ /**
54
+ * Replace the list of product synchronizations for the current user
55
+ */
56
+ createOrUpdateCurrentInventorySynchronizationsRaw(requestParameters: CreateOrUpdateCurrentInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
57
+ /**
58
+ * Replace the list of product synchronizations for the current user
59
+ */
60
+ createOrUpdateCurrentInventorySynchronizations(requestParameters: CreateOrUpdateCurrentInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
61
+ /**
62
+ * Change synchronization mode on products for a user
63
+ */
64
+ createOrUpdateInventorySynchronizationRaw(requestParameters: CreateOrUpdateInventorySynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
65
+ /**
66
+ * Change synchronization mode on products for a user
67
+ */
68
+ createOrUpdateInventorySynchronization(requestParameters: CreateOrUpdateInventorySynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
69
+ /**
70
+ * Replace the list of product synchronizations for a user
71
+ */
72
+ createOrUpdateInventorySynchronizationsRaw(requestParameters: CreateOrUpdateInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
73
+ /**
74
+ * Replace the list of product synchronizations for a user
75
+ */
76
+ createOrUpdateInventorySynchronizations(requestParameters: CreateOrUpdateInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
77
+ /**
78
+ * Replace synchronization for each product matched by syncMode: If syncMode is not defined, so replace all product synchronization
79
+ */
80
+ updateCurrentInventorySynchronizationsRaw(requestParameters: UpdateCurrentInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
81
+ /**
82
+ * Replace synchronization for each product matched by syncMode: If syncMode is not defined, so replace all product synchronization
83
+ */
84
+ updateCurrentInventorySynchronizations(requestParameters: UpdateCurrentInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
85
+ /**
86
+ * Replace synchronization for each product matched by syncMode: If syncMode is not defined, so replace all product synchronization
87
+ */
88
+ updateInventorySynchronizationsRaw(requestParameters: UpdateInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
89
+ /**
90
+ * Replace synchronization for each product matched by syncMode: If syncMode is not defined, so replace all product synchronization
91
+ */
92
+ updateInventorySynchronizations(requestParameters: UpdateInventorySynchronizationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
93
+ }