@lcdp/api-react-rest-client 2.11.4-LDS-4465-implementer-api-pharamaide-prod.14535776611 → 2.11.4-develop.14532467134

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.
@@ -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);
@@ -40,7 +40,7 @@ export interface ActiveProduct {
40
40
  * @type {SynchronizationMode}
41
41
  * @memberof ActiveProduct
42
42
  */
43
- synchronizationMode?: SynchronizationMode | null;
43
+ synchronizationMode?: SynchronizationMode;
44
44
  /**
45
45
  * Date of last update of the product
46
46
  * @type {Date}
@@ -21,7 +21,7 @@ export interface ActiveProductUpdateParameters {
21
21
  * @type {SynchronizationMode}
22
22
  * @memberof ActiveProductUpdateParameters
23
23
  */
24
- synchronizationMode?: SynchronizationMode | null;
24
+ synchronizationMode?: SynchronizationMode;
25
25
  }
26
26
  /**
27
27
  * Check if a given object implements the ActiveProductUpdateParameters interface.
@@ -11,6 +11,14 @@
11
11
  */
12
12
  /**
13
13
  * Synchronization state of the product
14
+ * * UP_AND_DOWN: Automatic creation/update and deletion of sale offers according to your available stock.
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 productId with SynchronizationMode 'UP_AND_DOWN' will delete the associated sale offers.
17
+ * * DOWN: Automatic update of existing sale offers according to your available stock.
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 productId with SynchronizationMode 'DOWN' will not archive the existing sale offers.
20
+ * * NONE: Do not synchronize productId according to available stock.
21
+ *
14
22
  * @export
15
23
  */
16
24
  export declare const SynchronizationMode: {
@@ -16,6 +16,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SynchronizationModeToJSON = exports.SynchronizationModeFromJSONTyped = exports.SynchronizationModeFromJSON = exports.instanceOfSynchronizationMode = exports.SynchronizationMode = void 0;
17
17
  /**
18
18
  * Synchronization state of the product
19
+ * * UP_AND_DOWN: Automatic creation/update and deletion of sale offers according to your available stock.
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 productId with SynchronizationMode 'UP_AND_DOWN' will delete the associated sale offers.
22
+ * * DOWN: Automatic update of existing sale offers according to your available stock.
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 productId with SynchronizationMode 'DOWN' will not archive the existing sale offers.
25
+ * * NONE: Do not synchronize productId according to available stock.
26
+ *
19
27
  * @export
20
28
  */
21
29
  exports.SynchronizationMode = {
@@ -1,9 +1,7 @@
1
1
  export * from './ActiveProduct';
2
2
  export * from './ActiveProductUpdateParameters';
3
3
  export * from './Barcodes';
4
- export * from './BufferStrategy';
5
4
  export * from './HttpLink';
6
- export * from './IdentifiedProductSynchronization';
7
5
  export * from './Inventory';
8
6
  export * from './InventoryJournal';
9
7
  export * from './MisalignedProduct';
@@ -17,7 +15,6 @@ export * from './PaginatedOverstockProducts';
17
15
  export * from './PaginatedUnderstockProducts';
18
16
  export * from './PagingMetadata';
19
17
  export * from './ProductLink';
20
- export * from './ProductSynchronization';
21
18
  export * from './RestError';
22
19
  export * from './Statistics';
23
20
  export * from './StatisticsActiveProducts';
@@ -19,9 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./ActiveProduct"), exports);
20
20
  __exportStar(require("./ActiveProductUpdateParameters"), exports);
21
21
  __exportStar(require("./Barcodes"), exports);
22
- __exportStar(require("./BufferStrategy"), exports);
23
22
  __exportStar(require("./HttpLink"), exports);
24
- __exportStar(require("./IdentifiedProductSynchronization"), exports);
25
23
  __exportStar(require("./Inventory"), exports);
26
24
  __exportStar(require("./InventoryJournal"), exports);
27
25
  __exportStar(require("./MisalignedProduct"), exports);
@@ -35,7 +33,6 @@ __exportStar(require("./PaginatedOverstockProducts"), exports);
35
33
  __exportStar(require("./PaginatedUnderstockProducts"), exports);
36
34
  __exportStar(require("./PagingMetadata"), exports);
37
35
  __exportStar(require("./ProductLink"), exports);
38
- __exportStar(require("./ProductSynchronization"), exports);
39
36
  __exportStar(require("./RestError"), exports);
40
37
  __exportStar(require("./Statistics"), exports);
41
38
  __exportStar(require("./StatisticsActiveProducts"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.11.4-LDS-4465-implementer-api-pharamaide-prod.14535776611",
3
+ "version": "2.11.4-develop.14532467134",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -1,67 +0,0 @@
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 { IdentifiedProductSynchronization, ProductSynchronization } from '../models/index';
14
- export interface ReplaceCurrentProductSynchronizationRequest {
15
- productId: number;
16
- productSynchronization: ProductSynchronization;
17
- }
18
- export interface ReplaceCurrentProductsSynchronizationRequest {
19
- inventoryId: number;
20
- identifiedProductSynchronization: Array<IdentifiedProductSynchronization>;
21
- }
22
- export interface ReplaceUserProductSynchronizationRequest {
23
- inventoryId: number;
24
- productId: number;
25
- productSynchronization: ProductSynchronization;
26
- }
27
- export interface ReplaceUserProductsSynchronizationRequest {
28
- inventoryId: number;
29
- identifiedProductSynchronization: Array<IdentifiedProductSynchronization>;
30
- }
31
- /**
32
- *
33
- */
34
- export declare class ManageInventorySynchronizationApi extends runtime.BaseAPI {
35
- /**
36
- * Change synchronization mode on products for current user
37
- */
38
- replaceCurrentProductSynchronizationRaw(requestParameters: ReplaceCurrentProductSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
39
- /**
40
- * Change synchronization mode on products for current user
41
- */
42
- replaceCurrentProductSynchronization(requestParameters: ReplaceCurrentProductSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
43
- /**
44
- * Replace the list of product synchronizations for the current user
45
- */
46
- replaceCurrentProductsSynchronizationRaw(requestParameters: ReplaceCurrentProductsSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
47
- /**
48
- * Replace the list of product synchronizations for the current user
49
- */
50
- replaceCurrentProductsSynchronization(requestParameters: ReplaceCurrentProductsSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
51
- /**
52
- * Change synchronization mode on products for a user
53
- */
54
- replaceUserProductSynchronizationRaw(requestParameters: ReplaceUserProductSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
55
- /**
56
- * Change synchronization mode on products for a user
57
- */
58
- replaceUserProductSynchronization(requestParameters: ReplaceUserProductSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
59
- /**
60
- * Replace the list of product synchronizations for a user
61
- */
62
- replaceUserProductsSynchronizationRaw(requestParameters: ReplaceUserProductsSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
63
- /**
64
- * Replace the list of product synchronizations for a user
65
- */
66
- replaceUserProductsSynchronization(requestParameters: ReplaceUserProductsSynchronizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
67
- }
@@ -1,367 +0,0 @@
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
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
- return new (P || (P = Promise))(function (resolve, reject) {
33
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
- step((generator = generator.apply(thisArg, _arguments || [])).next());
37
- });
38
- };
39
- var __generator = (this && this.__generator) || function (thisArg, body) {
40
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
41
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
- function verb(n) { return function (v) { return step([n, v]); }; }
43
- function step(op) {
44
- if (f) throw new TypeError("Generator is already executing.");
45
- while (_) try {
46
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
47
- if (y = 0, t) op = [op[0] & 2, t.value];
48
- switch (op[0]) {
49
- case 0: case 1: t = op; break;
50
- case 4: _.label++; return { value: op[1], done: false };
51
- case 5: _.label++; y = op[1]; op = [0]; continue;
52
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
- default:
54
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
- if (t[2]) _.ops.pop();
59
- _.trys.pop(); continue;
60
- }
61
- op = body.call(thisArg, _);
62
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
- }
65
- };
66
- Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.ManageInventorySynchronizationApi = void 0;
68
- var runtime = require("../runtime");
69
- var index_1 = require("../models/index");
70
- /**
71
- *
72
- */
73
- var ManageInventorySynchronizationApi = /** @class */ (function (_super) {
74
- __extends(ManageInventorySynchronizationApi, _super);
75
- function ManageInventorySynchronizationApi() {
76
- return _super !== null && _super.apply(this, arguments) || this;
77
- }
78
- /**
79
- * Change synchronization mode on products for current user
80
- */
81
- ManageInventorySynchronizationApi.prototype.replaceCurrentProductSynchronizationRaw = 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['productId'] == null) {
88
- throw new runtime.RequiredError('productId', 'Required parameter "productId" was null or undefined when calling replaceCurrentProductSynchronization().');
89
- }
90
- if (requestParameters['productSynchronization'] == null) {
91
- throw new runtime.RequiredError('productSynchronization', 'Required parameter "productSynchronization" was null or undefined when calling replaceCurrentProductSynchronization().');
92
- }
93
- queryParameters = {};
94
- headerParameters = {};
95
- headerParameters['Content-Type'] = 'application/json';
96
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
97
- _a = headerParameters;
98
- _b = "x-api-key";
99
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
100
- case 1:
101
- _a[_b] = _c.sent(); // apiKeyAuth authentication
102
- _c.label = 2;
103
- case 2:
104
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
105
- token = this.configuration.accessToken;
106
- return [4 /*yield*/, token("bearerAuth", [])];
107
- case 3:
108
- tokenString = _c.sent();
109
- if (tokenString) {
110
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
111
- }
112
- _c.label = 4;
113
- case 4:
114
- _c.trys.push([4, 6, , 7]);
115
- return [4 /*yield*/, this.request({
116
- path: "/inventories/me/synchronizations/{productId}".replace("{".concat("productId", "}"), encodeURIComponent(String(requestParameters['productId']))),
117
- method: 'PUT',
118
- headers: headerParameters,
119
- query: queryParameters,
120
- body: (0, index_1.ProductSynchronizationToJSON)(requestParameters['productSynchronization']),
121
- }, initOverrides)];
122
- case 5:
123
- response = _c.sent();
124
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
125
- case 6:
126
- response_1 = _c.sent();
127
- console.debug(response_1);
128
- throw response_1;
129
- case 7: return [2 /*return*/];
130
- }
131
- });
132
- });
133
- };
134
- /**
135
- * Change synchronization mode on products for current user
136
- */
137
- ManageInventorySynchronizationApi.prototype.replaceCurrentProductSynchronization = function (requestParameters, initOverrides) {
138
- return __awaiter(this, void 0, void 0, function () {
139
- return __generator(this, function (_a) {
140
- switch (_a.label) {
141
- case 0: return [4 /*yield*/, this.replaceCurrentProductSynchronizationRaw(requestParameters, initOverrides)];
142
- case 1:
143
- _a.sent();
144
- return [2 /*return*/];
145
- }
146
- });
147
- });
148
- };
149
- /**
150
- * Replace the list of product synchronizations for the current user
151
- */
152
- ManageInventorySynchronizationApi.prototype.replaceCurrentProductsSynchronizationRaw = function (requestParameters, initOverrides) {
153
- return __awaiter(this, void 0, void 0, function () {
154
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
155
- return __generator(this, function (_c) {
156
- switch (_c.label) {
157
- case 0:
158
- if (requestParameters['inventoryId'] == null) {
159
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling replaceCurrentProductsSynchronization().');
160
- }
161
- if (requestParameters['identifiedProductSynchronization'] == null) {
162
- throw new runtime.RequiredError('identifiedProductSynchronization', 'Required parameter "identifiedProductSynchronization" was null or undefined when calling replaceCurrentProductsSynchronization().');
163
- }
164
- queryParameters = {};
165
- headerParameters = {};
166
- headerParameters['Content-Type'] = 'application/json';
167
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
168
- _a = headerParameters;
169
- _b = "x-api-key";
170
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
171
- case 1:
172
- _a[_b] = _c.sent(); // apiKeyAuth authentication
173
- _c.label = 2;
174
- case 2:
175
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
176
- token = this.configuration.accessToken;
177
- return [4 /*yield*/, token("bearerAuth", [])];
178
- case 3:
179
- tokenString = _c.sent();
180
- if (tokenString) {
181
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
182
- }
183
- _c.label = 4;
184
- case 4:
185
- _c.trys.push([4, 6, , 7]);
186
- return [4 /*yield*/, this.request({
187
- path: "/inventories/me/synchronizations/products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
188
- method: 'PUT',
189
- headers: headerParameters,
190
- query: queryParameters,
191
- body: requestParameters['identifiedProductSynchronization'].map(index_1.IdentifiedProductSynchronizationToJSON),
192
- }, initOverrides)];
193
- case 5:
194
- response = _c.sent();
195
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
196
- case 6:
197
- response_2 = _c.sent();
198
- console.debug(response_2);
199
- throw response_2;
200
- case 7: return [2 /*return*/];
201
- }
202
- });
203
- });
204
- };
205
- /**
206
- * Replace the list of product synchronizations for the current user
207
- */
208
- ManageInventorySynchronizationApi.prototype.replaceCurrentProductsSynchronization = function (requestParameters, initOverrides) {
209
- return __awaiter(this, void 0, void 0, function () {
210
- return __generator(this, function (_a) {
211
- switch (_a.label) {
212
- case 0: return [4 /*yield*/, this.replaceCurrentProductsSynchronizationRaw(requestParameters, initOverrides)];
213
- case 1:
214
- _a.sent();
215
- return [2 /*return*/];
216
- }
217
- });
218
- });
219
- };
220
- /**
221
- * Change synchronization mode on products for a user
222
- */
223
- ManageInventorySynchronizationApi.prototype.replaceUserProductSynchronizationRaw = function (requestParameters, initOverrides) {
224
- return __awaiter(this, void 0, void 0, function () {
225
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_3;
226
- return __generator(this, function (_c) {
227
- switch (_c.label) {
228
- case 0:
229
- if (requestParameters['inventoryId'] == null) {
230
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling replaceUserProductSynchronization().');
231
- }
232
- if (requestParameters['productId'] == null) {
233
- throw new runtime.RequiredError('productId', 'Required parameter "productId" was null or undefined when calling replaceUserProductSynchronization().');
234
- }
235
- if (requestParameters['productSynchronization'] == null) {
236
- throw new runtime.RequiredError('productSynchronization', 'Required parameter "productSynchronization" was null or undefined when calling replaceUserProductSynchronization().');
237
- }
238
- queryParameters = {};
239
- headerParameters = {};
240
- headerParameters['Content-Type'] = 'application/json';
241
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
242
- _a = headerParameters;
243
- _b = "x-api-key";
244
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
245
- case 1:
246
- _a[_b] = _c.sent(); // apiKeyAuth authentication
247
- _c.label = 2;
248
- case 2:
249
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
250
- token = this.configuration.accessToken;
251
- return [4 /*yield*/, token("bearerAuth", [])];
252
- case 3:
253
- tokenString = _c.sent();
254
- if (tokenString) {
255
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
256
- }
257
- _c.label = 4;
258
- case 4:
259
- _c.trys.push([4, 6, , 7]);
260
- return [4 /*yield*/, this.request({
261
- path: "/inventories/{inventoryId}/synchronizations/{productId}".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))).replace("{".concat("productId", "}"), encodeURIComponent(String(requestParameters['productId']))),
262
- method: 'PUT',
263
- headers: headerParameters,
264
- query: queryParameters,
265
- body: (0, index_1.ProductSynchronizationToJSON)(requestParameters['productSynchronization']),
266
- }, initOverrides)];
267
- case 5:
268
- response = _c.sent();
269
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
270
- case 6:
271
- response_3 = _c.sent();
272
- console.debug(response_3);
273
- throw response_3;
274
- case 7: return [2 /*return*/];
275
- }
276
- });
277
- });
278
- };
279
- /**
280
- * Change synchronization mode on products for a user
281
- */
282
- ManageInventorySynchronizationApi.prototype.replaceUserProductSynchronization = function (requestParameters, initOverrides) {
283
- return __awaiter(this, void 0, void 0, function () {
284
- return __generator(this, function (_a) {
285
- switch (_a.label) {
286
- case 0: return [4 /*yield*/, this.replaceUserProductSynchronizationRaw(requestParameters, initOverrides)];
287
- case 1:
288
- _a.sent();
289
- return [2 /*return*/];
290
- }
291
- });
292
- });
293
- };
294
- /**
295
- * Replace the list of product synchronizations for a user
296
- */
297
- ManageInventorySynchronizationApi.prototype.replaceUserProductsSynchronizationRaw = function (requestParameters, initOverrides) {
298
- return __awaiter(this, void 0, void 0, function () {
299
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_4;
300
- return __generator(this, function (_c) {
301
- switch (_c.label) {
302
- case 0:
303
- if (requestParameters['inventoryId'] == null) {
304
- throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling replaceUserProductsSynchronization().');
305
- }
306
- if (requestParameters['identifiedProductSynchronization'] == null) {
307
- throw new runtime.RequiredError('identifiedProductSynchronization', 'Required parameter "identifiedProductSynchronization" was null or undefined when calling replaceUserProductsSynchronization().');
308
- }
309
- queryParameters = {};
310
- headerParameters = {};
311
- headerParameters['Content-Type'] = 'application/json';
312
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
313
- _a = headerParameters;
314
- _b = "x-api-key";
315
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
316
- case 1:
317
- _a[_b] = _c.sent(); // apiKeyAuth authentication
318
- _c.label = 2;
319
- case 2:
320
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
321
- token = this.configuration.accessToken;
322
- return [4 /*yield*/, token("bearerAuth", [])];
323
- case 3:
324
- tokenString = _c.sent();
325
- if (tokenString) {
326
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
327
- }
328
- _c.label = 4;
329
- case 4:
330
- _c.trys.push([4, 6, , 7]);
331
- return [4 /*yield*/, this.request({
332
- path: "/inventories/{inventoryId}/synchronizations/products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
333
- method: 'PUT',
334
- headers: headerParameters,
335
- query: queryParameters,
336
- body: requestParameters['identifiedProductSynchronization'].map(index_1.IdentifiedProductSynchronizationToJSON),
337
- }, initOverrides)];
338
- case 5:
339
- response = _c.sent();
340
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
341
- case 6:
342
- response_4 = _c.sent();
343
- console.debug(response_4);
344
- throw response_4;
345
- case 7: return [2 /*return*/];
346
- }
347
- });
348
- });
349
- };
350
- /**
351
- * Replace the list of product synchronizations for a user
352
- */
353
- ManageInventorySynchronizationApi.prototype.replaceUserProductsSynchronization = function (requestParameters, initOverrides) {
354
- return __awaiter(this, void 0, void 0, function () {
355
- return __generator(this, function (_a) {
356
- switch (_a.label) {
357
- case 0: return [4 /*yield*/, this.replaceUserProductsSynchronizationRaw(requestParameters, initOverrides)];
358
- case 1:
359
- _a.sent();
360
- return [2 /*return*/];
361
- }
362
- });
363
- });
364
- };
365
- return ManageInventorySynchronizationApi;
366
- }(runtime.BaseAPI));
367
- exports.ManageInventorySynchronizationApi = ManageInventorySynchronizationApi;
@@ -1,24 +0,0 @@
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
- /**
13
- * Buffer strategy
14
- * @export
15
- */
16
- export declare const BufferStrategy: {
17
- readonly FIXED: "FIXED";
18
- readonly SALES_FORECAST: "SALES_FORECAST";
19
- };
20
- export declare type BufferStrategy = typeof BufferStrategy[keyof typeof BufferStrategy];
21
- export declare function instanceOfBufferStrategy(value: any): boolean;
22
- export declare function BufferStrategyFromJSON(json: any): BufferStrategy;
23
- export declare function BufferStrategyFromJSONTyped(json: any, ignoreDiscriminator: boolean): BufferStrategy;
24
- export declare function BufferStrategyToJSON(value?: BufferStrategy | null): any;
@@ -1,47 +0,0 @@
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.BufferStrategyToJSON = exports.BufferStrategyFromJSONTyped = exports.BufferStrategyFromJSON = exports.instanceOfBufferStrategy = exports.BufferStrategy = void 0;
17
- /**
18
- * Buffer strategy
19
- * @export
20
- */
21
- exports.BufferStrategy = {
22
- FIXED: 'FIXED',
23
- SALES_FORECAST: 'SALES_FORECAST'
24
- };
25
- function instanceOfBufferStrategy(value) {
26
- for (var key in exports.BufferStrategy) {
27
- if (Object.prototype.hasOwnProperty.call(exports.BufferStrategy, key)) {
28
- if (exports.BufferStrategy[key] === value) {
29
- return true;
30
- }
31
- }
32
- }
33
- return false;
34
- }
35
- exports.instanceOfBufferStrategy = instanceOfBufferStrategy;
36
- function BufferStrategyFromJSON(json) {
37
- return BufferStrategyFromJSONTyped(json, false);
38
- }
39
- exports.BufferStrategyFromJSON = BufferStrategyFromJSON;
40
- function BufferStrategyFromJSONTyped(json, ignoreDiscriminator) {
41
- return json;
42
- }
43
- exports.BufferStrategyFromJSONTyped = BufferStrategyFromJSONTyped;
44
- function BufferStrategyToJSON(value) {
45
- return value;
46
- }
47
- exports.BufferStrategyToJSON = BufferStrategyToJSON;
@@ -1,51 +0,0 @@
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
- import type { BufferStrategy } from './BufferStrategy';
14
- /**
15
- *
16
- * @export
17
- * @interface IdentifiedProductSynchronization
18
- */
19
- export interface IdentifiedProductSynchronization {
20
- /**
21
- *
22
- * @type {BufferStrategy}
23
- * @memberof IdentifiedProductSynchronization
24
- */
25
- buffer: BufferStrategy | null;
26
- /**
27
- * Sale offer infos for this product synchronization
28
- * @type {object}
29
- * @memberof IdentifiedProductSynchronization
30
- */
31
- saleOfferInfos: object | null;
32
- /**
33
- *
34
- * @type {SynchronizationMode}
35
- * @memberof IdentifiedProductSynchronization
36
- */
37
- synchronizationMode: SynchronizationMode | null;
38
- /**
39
- *
40
- * @type {number}
41
- * @memberof IdentifiedProductSynchronization
42
- */
43
- productId: number;
44
- }
45
- /**
46
- * Check if a given object implements the IdentifiedProductSynchronization interface.
47
- */
48
- export declare function instanceOfIdentifiedProductSynchronization(value: object): value is IdentifiedProductSynchronization;
49
- export declare function IdentifiedProductSynchronizationFromJSON(json: any): IdentifiedProductSynchronization;
50
- export declare function IdentifiedProductSynchronizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentifiedProductSynchronization;
51
- export declare function IdentifiedProductSynchronizationToJSON(value?: IdentifiedProductSynchronization | null): any;
@@ -1,61 +0,0 @@
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.IdentifiedProductSynchronizationToJSON = exports.IdentifiedProductSynchronizationFromJSONTyped = exports.IdentifiedProductSynchronizationFromJSON = exports.instanceOfIdentifiedProductSynchronization = void 0;
17
- var SynchronizationMode_1 = require("./SynchronizationMode");
18
- var BufferStrategy_1 = require("./BufferStrategy");
19
- /**
20
- * Check if a given object implements the IdentifiedProductSynchronization interface.
21
- */
22
- function instanceOfIdentifiedProductSynchronization(value) {
23
- if (!('buffer' in value) || value['buffer'] === undefined)
24
- return false;
25
- if (!('saleOfferInfos' in value) || value['saleOfferInfos'] === undefined)
26
- return false;
27
- if (!('synchronizationMode' in value) || value['synchronizationMode'] === undefined)
28
- return false;
29
- if (!('productId' in value) || value['productId'] === undefined)
30
- return false;
31
- return true;
32
- }
33
- exports.instanceOfIdentifiedProductSynchronization = instanceOfIdentifiedProductSynchronization;
34
- function IdentifiedProductSynchronizationFromJSON(json) {
35
- return IdentifiedProductSynchronizationFromJSONTyped(json, false);
36
- }
37
- exports.IdentifiedProductSynchronizationFromJSON = IdentifiedProductSynchronizationFromJSON;
38
- function IdentifiedProductSynchronizationFromJSONTyped(json, ignoreDiscriminator) {
39
- if (json == null) {
40
- return json;
41
- }
42
- return {
43
- 'buffer': (json['buffer'] === null || json['buffer'] === undefined) ? json['buffer'] : (0, BufferStrategy_1.BufferStrategyFromJSON)(json['buffer']),
44
- 'saleOfferInfos': json['saleOfferInfos'],
45
- 'synchronizationMode': (json['synchronizationMode'] === null || json['synchronizationMode'] === undefined) ? json['synchronizationMode'] : (0, SynchronizationMode_1.SynchronizationModeFromJSON)(json['synchronizationMode']),
46
- 'productId': json['productId'],
47
- };
48
- }
49
- exports.IdentifiedProductSynchronizationFromJSONTyped = IdentifiedProductSynchronizationFromJSONTyped;
50
- function IdentifiedProductSynchronizationToJSON(value) {
51
- if (value == null) {
52
- return value;
53
- }
54
- return {
55
- 'buffer': (0, BufferStrategy_1.BufferStrategyToJSON)(value['buffer']),
56
- 'saleOfferInfos': value['saleOfferInfos'],
57
- 'synchronizationMode': (0, SynchronizationMode_1.SynchronizationModeToJSON)(value['synchronizationMode']),
58
- 'productId': value['productId'],
59
- };
60
- }
61
- exports.IdentifiedProductSynchronizationToJSON = IdentifiedProductSynchronizationToJSON;
@@ -1,45 +0,0 @@
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
- import type { BufferStrategy } from './BufferStrategy';
14
- /**
15
- *
16
- * @export
17
- * @interface ProductSynchronization
18
- */
19
- export interface ProductSynchronization {
20
- /**
21
- *
22
- * @type {BufferStrategy}
23
- * @memberof ProductSynchronization
24
- */
25
- buffer: BufferStrategy | null;
26
- /**
27
- * Sale offer infos for this product synchronization
28
- * @type {object}
29
- * @memberof ProductSynchronization
30
- */
31
- saleOfferInfos: object | null;
32
- /**
33
- *
34
- * @type {SynchronizationMode}
35
- * @memberof ProductSynchronization
36
- */
37
- synchronizationMode: SynchronizationMode | null;
38
- }
39
- /**
40
- * Check if a given object implements the ProductSynchronization interface.
41
- */
42
- export declare function instanceOfProductSynchronization(value: object): value is ProductSynchronization;
43
- export declare function ProductSynchronizationFromJSON(json: any): ProductSynchronization;
44
- export declare function ProductSynchronizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductSynchronization;
45
- export declare function ProductSynchronizationToJSON(value?: ProductSynchronization | null): any;
@@ -1,57 +0,0 @@
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.ProductSynchronizationToJSON = exports.ProductSynchronizationFromJSONTyped = exports.ProductSynchronizationFromJSON = exports.instanceOfProductSynchronization = void 0;
17
- var SynchronizationMode_1 = require("./SynchronizationMode");
18
- var BufferStrategy_1 = require("./BufferStrategy");
19
- /**
20
- * Check if a given object implements the ProductSynchronization interface.
21
- */
22
- function instanceOfProductSynchronization(value) {
23
- if (!('buffer' in value) || value['buffer'] === undefined)
24
- return false;
25
- if (!('saleOfferInfos' in value) || value['saleOfferInfos'] === undefined)
26
- return false;
27
- if (!('synchronizationMode' in value) || value['synchronizationMode'] === undefined)
28
- return false;
29
- return true;
30
- }
31
- exports.instanceOfProductSynchronization = instanceOfProductSynchronization;
32
- function ProductSynchronizationFromJSON(json) {
33
- return ProductSynchronizationFromJSONTyped(json, false);
34
- }
35
- exports.ProductSynchronizationFromJSON = ProductSynchronizationFromJSON;
36
- function ProductSynchronizationFromJSONTyped(json, ignoreDiscriminator) {
37
- if (json == null) {
38
- return json;
39
- }
40
- return {
41
- 'buffer': (json['buffer'] === null || json['buffer'] === undefined) ? json['buffer'] : (0, BufferStrategy_1.BufferStrategyFromJSON)(json['buffer']),
42
- 'saleOfferInfos': json['saleOfferInfos'],
43
- 'synchronizationMode': (json['synchronizationMode'] === null || json['synchronizationMode'] === undefined) ? json['synchronizationMode'] : (0, SynchronizationMode_1.SynchronizationModeFromJSON)(json['synchronizationMode']),
44
- };
45
- }
46
- exports.ProductSynchronizationFromJSONTyped = ProductSynchronizationFromJSONTyped;
47
- function ProductSynchronizationToJSON(value) {
48
- if (value == null) {
49
- return value;
50
- }
51
- return {
52
- 'buffer': (0, BufferStrategy_1.BufferStrategyToJSON)(value['buffer']),
53
- 'saleOfferInfos': value['saleOfferInfos'],
54
- 'synchronizationMode': (0, SynchronizationMode_1.SynchronizationModeToJSON)(value['synchronizationMode']),
55
- };
56
- }
57
- exports.ProductSynchronizationToJSON = ProductSynchronizationToJSON;