@lcdp/api-react-rest-client 3.1.11-develop.24569946879 → 3.1.11

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 (51) hide show
  1. package/catalog/src/models/ProductInsight.d.ts +6 -6
  2. package/catalog/src/models/ProductInsight.js +6 -6
  3. package/catalog/src/models/ProductInsightCreateOrUpdateParameters.d.ts +6 -8
  4. package/catalog/src/models/ProductInsightCreateOrUpdateParameters.js +4 -6
  5. package/catalog/src/models/ProductSecondaryTypeLink.d.ts +43 -0
  6. package/catalog/src/models/ProductSecondaryTypeLink.js +51 -0
  7. package/catalog/src/models/ProductTypeLink.d.ts +43 -0
  8. package/catalog/src/models/ProductTypeLink.js +51 -0
  9. package/catalog/src/models/index.d.ts +2 -2
  10. package/catalog/src/models/index.js +2 -2
  11. package/factory/src/models/Product.d.ts +3 -4
  12. package/factory/src/models/Product.js +2 -3
  13. package/factory/src/models/index.d.ts +0 -1
  14. package/factory/src/models/index.js +0 -1
  15. package/package.json +1 -1
  16. package/product/src/apis/ManageProductApi.d.ts +2 -2
  17. package/product/src/apis/ManageProductApi.js +2 -2
  18. package/product/src/apis/SearchProductMetadataApi.d.ts +56 -0
  19. package/product/src/apis/SearchProductMetadataApi.js +390 -0
  20. package/product/src/apis/index.d.ts +1 -0
  21. package/product/src/apis/index.js +1 -0
  22. package/product/src/models/ProductCreationOrUpdateParameters.d.ts +6 -8
  23. package/product/src/models/ProductCreationOrUpdateParameters.js +4 -6
  24. package/product/src/models/ProductSecondaryType.d.ts +19 -7
  25. package/product/src/models/ProductSecondaryType.js +17 -18
  26. package/product/src/models/ProductType.d.ts +19 -10
  27. package/product/src/models/ProductType.js +17 -21
  28. package/user/src/apis/ManageUserRestrictionApi.d.ts +25 -1
  29. package/user/src/apis/ManageUserRestrictionApi.js +152 -12
  30. package/user/src/apis/SearchUserRestrictionApi.d.ts +12 -1
  31. package/user/src/apis/SearchUserRestrictionApi.js +79 -0
  32. package/user/src/models/ProductTypeLink.d.ts +43 -0
  33. package/user/src/models/ProductTypeLink.js +51 -0
  34. package/user/src/models/User.d.ts +2 -3
  35. package/user/src/models/User.js +2 -3
  36. package/user/src/models/UserRestrictedProductTypeCreationParameter.d.ts +31 -0
  37. package/user/src/models/UserRestrictedProductTypeCreationParameter.js +47 -0
  38. package/user/src/models/UserUpdateParameters.d.ts +0 -7
  39. package/user/src/models/UserUpdateParameters.js +0 -3
  40. package/user/src/models/index.d.ts +2 -2
  41. package/user/src/models/index.js +2 -2
  42. package/catalog/src/models/ProductSecondaryType.d.ts +0 -25
  43. package/catalog/src/models/ProductSecondaryType.js +0 -48
  44. package/catalog/src/models/ProductType.d.ts +0 -28
  45. package/catalog/src/models/ProductType.js +0 -51
  46. package/factory/src/models/ProductType.d.ts +0 -28
  47. package/factory/src/models/ProductType.js +0 -51
  48. package/user/src/models/ProductType.d.ts +0 -28
  49. package/user/src/models/ProductType.js +0 -51
  50. package/user/src/models/RestrictedProductType.d.ts +0 -45
  51. package/user/src/models/RestrictedProductType.js +0 -54
@@ -0,0 +1,390 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-monolith-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.SearchProductMetadataApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var SearchProductMetadataApi = /** @class */ (function (_super) {
74
+ __extends(SearchProductMetadataApi, _super);
75
+ function SearchProductMetadataApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Get product secondary type
80
+ */
81
+ SearchProductMetadataApi.prototype.getProductSecondaryTypeRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
84
+ return __generator(this, function (_c) {
85
+ switch (_c.label) {
86
+ case 0:
87
+ if (requestParameters['secondaryTypeId'] == null) {
88
+ throw new runtime.RequiredError('secondaryTypeId', 'Required parameter "secondaryTypeId" was null or undefined when calling getProductSecondaryType().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
93
+ _a = headerParameters;
94
+ _b = "x-api-key";
95
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
96
+ case 1:
97
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
98
+ _c.label = 2;
99
+ case 2:
100
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
101
+ token = this.configuration.accessToken;
102
+ return [4 /*yield*/, token("bearerAuth", [])];
103
+ case 3:
104
+ tokenString = _c.sent();
105
+ if (tokenString) {
106
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
107
+ }
108
+ _c.label = 4;
109
+ case 4:
110
+ _c.trys.push([4, 6, , 7]);
111
+ return [4 /*yield*/, this.request({
112
+ path: "/products/secondary-types/{secondaryTypeId}".replace("{".concat("secondaryTypeId", "}"), encodeURIComponent(String(requestParameters['secondaryTypeId']))),
113
+ method: 'GET',
114
+ headers: headerParameters,
115
+ query: queryParameters,
116
+ }, initOverrides)];
117
+ case 5:
118
+ response = _c.sent();
119
+ contentType = response.headers.get("content-type");
120
+ if (contentType && contentType.indexOf("application/json") !== -1) {
121
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductSecondaryTypeFromJSON)(jsonValue); })];
122
+ }
123
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
124
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
125
+ }
126
+ else {
127
+ // TODO : Better handling of others application types
128
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
129
+ }
130
+ return [3 /*break*/, 7];
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
+ * Get product secondary type
142
+ */
143
+ SearchProductMetadataApi.prototype.getProductSecondaryType = function (requestParameters, initOverrides) {
144
+ return __awaiter(this, void 0, void 0, function () {
145
+ var response;
146
+ return __generator(this, function (_a) {
147
+ switch (_a.label) {
148
+ case 0: return [4 /*yield*/, this.getProductSecondaryTypeRaw(requestParameters, initOverrides)];
149
+ case 1:
150
+ response = _a.sent();
151
+ return [4 /*yield*/, response.value()];
152
+ case 2: return [2 /*return*/, _a.sent()];
153
+ }
154
+ });
155
+ });
156
+ };
157
+ /**
158
+ * Get product secondary types
159
+ */
160
+ SearchProductMetadataApi.prototype.getProductSecondaryTypesRaw = function (initOverrides) {
161
+ return __awaiter(this, void 0, void 0, function () {
162
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
163
+ return __generator(this, function (_c) {
164
+ switch (_c.label) {
165
+ case 0:
166
+ queryParameters = {};
167
+ headerParameters = {};
168
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
169
+ _a = headerParameters;
170
+ _b = "x-api-key";
171
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
172
+ case 1:
173
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
174
+ _c.label = 2;
175
+ case 2:
176
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
177
+ token = this.configuration.accessToken;
178
+ return [4 /*yield*/, token("bearerAuth", [])];
179
+ case 3:
180
+ tokenString = _c.sent();
181
+ if (tokenString) {
182
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
183
+ }
184
+ _c.label = 4;
185
+ case 4:
186
+ _c.trys.push([4, 6, , 7]);
187
+ return [4 /*yield*/, this.request({
188
+ path: "/products/secondary-types",
189
+ method: 'GET',
190
+ headers: headerParameters,
191
+ query: queryParameters,
192
+ }, initOverrides)];
193
+ case 5:
194
+ response = _c.sent();
195
+ contentType = response.headers.get("content-type");
196
+ if (contentType && contentType.indexOf("application/json") !== -1) {
197
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ProductSecondaryTypeFromJSON); })];
198
+ }
199
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
200
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
201
+ }
202
+ else {
203
+ // TODO : Better handling of others application types
204
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
205
+ }
206
+ return [3 /*break*/, 7];
207
+ case 6:
208
+ response_2 = _c.sent();
209
+ console.debug(response_2);
210
+ throw response_2;
211
+ case 7: return [2 /*return*/];
212
+ }
213
+ });
214
+ });
215
+ };
216
+ /**
217
+ * Get product secondary types
218
+ */
219
+ SearchProductMetadataApi.prototype.getProductSecondaryTypes = function (initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function () {
221
+ var response;
222
+ return __generator(this, function (_a) {
223
+ switch (_a.label) {
224
+ case 0: return [4 /*yield*/, this.getProductSecondaryTypesRaw(initOverrides)];
225
+ case 1:
226
+ response = _a.sent();
227
+ return [4 /*yield*/, response.value()];
228
+ case 2: return [2 /*return*/, _a.sent()];
229
+ }
230
+ });
231
+ });
232
+ };
233
+ /**
234
+ * Get product type
235
+ */
236
+ SearchProductMetadataApi.prototype.getProductTypeRaw = function (requestParameters, initOverrides) {
237
+ return __awaiter(this, void 0, void 0, function () {
238
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_3;
239
+ return __generator(this, function (_c) {
240
+ switch (_c.label) {
241
+ case 0:
242
+ if (requestParameters['typeId'] == null) {
243
+ throw new runtime.RequiredError('typeId', 'Required parameter "typeId" was null or undefined when calling getProductType().');
244
+ }
245
+ queryParameters = {};
246
+ headerParameters = {};
247
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
248
+ _a = headerParameters;
249
+ _b = "x-api-key";
250
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
251
+ case 1:
252
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
253
+ _c.label = 2;
254
+ case 2:
255
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
256
+ token = this.configuration.accessToken;
257
+ return [4 /*yield*/, token("bearerAuth", [])];
258
+ case 3:
259
+ tokenString = _c.sent();
260
+ if (tokenString) {
261
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
262
+ }
263
+ _c.label = 4;
264
+ case 4:
265
+ _c.trys.push([4, 6, , 7]);
266
+ return [4 /*yield*/, this.request({
267
+ path: "/products/types/{typeId}".replace("{".concat("typeId", "}"), encodeURIComponent(String(requestParameters['typeId']))),
268
+ method: 'GET',
269
+ headers: headerParameters,
270
+ query: queryParameters,
271
+ }, initOverrides)];
272
+ case 5:
273
+ response = _c.sent();
274
+ contentType = response.headers.get("content-type");
275
+ if (contentType && contentType.indexOf("application/json") !== -1) {
276
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductTypeFromJSON)(jsonValue); })];
277
+ }
278
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
279
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
280
+ }
281
+ else {
282
+ // TODO : Better handling of others application types
283
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
284
+ }
285
+ return [3 /*break*/, 7];
286
+ case 6:
287
+ response_3 = _c.sent();
288
+ console.debug(response_3);
289
+ throw response_3;
290
+ case 7: return [2 /*return*/];
291
+ }
292
+ });
293
+ });
294
+ };
295
+ /**
296
+ * Get product type
297
+ */
298
+ SearchProductMetadataApi.prototype.getProductType = function (requestParameters, initOverrides) {
299
+ return __awaiter(this, void 0, void 0, function () {
300
+ var response;
301
+ return __generator(this, function (_a) {
302
+ switch (_a.label) {
303
+ case 0: return [4 /*yield*/, this.getProductTypeRaw(requestParameters, initOverrides)];
304
+ case 1:
305
+ response = _a.sent();
306
+ return [4 /*yield*/, response.value()];
307
+ case 2: return [2 /*return*/, _a.sent()];
308
+ }
309
+ });
310
+ });
311
+ };
312
+ /**
313
+ * Get product types
314
+ */
315
+ SearchProductMetadataApi.prototype.getProductTypesRaw = function (initOverrides) {
316
+ return __awaiter(this, void 0, void 0, function () {
317
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_4;
318
+ return __generator(this, function (_c) {
319
+ switch (_c.label) {
320
+ case 0:
321
+ queryParameters = {};
322
+ headerParameters = {};
323
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
324
+ _a = headerParameters;
325
+ _b = "x-api-key";
326
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
327
+ case 1:
328
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
329
+ _c.label = 2;
330
+ case 2:
331
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
332
+ token = this.configuration.accessToken;
333
+ return [4 /*yield*/, token("bearerAuth", [])];
334
+ case 3:
335
+ tokenString = _c.sent();
336
+ if (tokenString) {
337
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
338
+ }
339
+ _c.label = 4;
340
+ case 4:
341
+ _c.trys.push([4, 6, , 7]);
342
+ return [4 /*yield*/, this.request({
343
+ path: "/products/types",
344
+ method: 'GET',
345
+ headers: headerParameters,
346
+ query: queryParameters,
347
+ }, initOverrides)];
348
+ case 5:
349
+ response = _c.sent();
350
+ contentType = response.headers.get("content-type");
351
+ if (contentType && contentType.indexOf("application/json") !== -1) {
352
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ProductTypeFromJSON); })];
353
+ }
354
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
355
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
356
+ }
357
+ else {
358
+ // TODO : Better handling of others application types
359
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
360
+ }
361
+ return [3 /*break*/, 7];
362
+ case 6:
363
+ response_4 = _c.sent();
364
+ console.debug(response_4);
365
+ throw response_4;
366
+ case 7: return [2 /*return*/];
367
+ }
368
+ });
369
+ });
370
+ };
371
+ /**
372
+ * Get product types
373
+ */
374
+ SearchProductMetadataApi.prototype.getProductTypes = function (initOverrides) {
375
+ return __awaiter(this, void 0, void 0, function () {
376
+ var response;
377
+ return __generator(this, function (_a) {
378
+ switch (_a.label) {
379
+ case 0: return [4 /*yield*/, this.getProductTypesRaw(initOverrides)];
380
+ case 1:
381
+ response = _a.sent();
382
+ return [4 /*yield*/, response.value()];
383
+ case 2: return [2 /*return*/, _a.sent()];
384
+ }
385
+ });
386
+ });
387
+ };
388
+ return SearchProductMetadataApi;
389
+ }(runtime.BaseAPI));
390
+ exports.SearchProductMetadataApi = SearchProductMetadataApi;
@@ -3,4 +3,5 @@ export * from './ManageProductImageApi';
3
3
  export * from './ManageProductProscriptionApi';
4
4
  export * from './SearchProductApi';
5
5
  export * from './SearchProductImageApi';
6
+ export * from './SearchProductMetadataApi';
6
7
  export * from './SearchProductProscriptionApi';
@@ -21,4 +21,5 @@ __exportStar(require("./ManageProductImageApi"), exports);
21
21
  __exportStar(require("./ManageProductProscriptionApi"), exports);
22
22
  __exportStar(require("./SearchProductApi"), exports);
23
23
  __exportStar(require("./SearchProductImageApi"), exports);
24
+ __exportStar(require("./SearchProductMetadataApi"), exports);
24
25
  __exportStar(require("./SearchProductProscriptionApi"), exports);
@@ -9,9 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { ProductSecondaryType } from './ProductSecondaryType';
13
12
  import type { ProductStorageType } from './ProductStorageType';
14
- import type { ProductType } from './ProductType';
15
13
  import type { ProductMarketStatus } from './ProductMarketStatus';
16
14
  import type { ProductStatus } from './ProductStatus';
17
15
  import type { Barcodes } from './Barcodes';
@@ -65,17 +63,17 @@ export interface ProductCreationOrUpdateParameters {
65
63
  */
66
64
  unitPriceEffectiveDate?: Date | null;
67
65
  /**
68
- *
69
- * @type {ProductType}
66
+ * Product Type Identifier
67
+ * @type {string}
70
68
  * @memberof ProductCreationOrUpdateParameters
71
69
  */
72
- type?: ProductType | null;
70
+ typeId?: string | null;
73
71
  /**
74
- *
75
- * @type {ProductSecondaryType}
72
+ * Product Secondary Type Identifier
73
+ * @type {string}
76
74
  * @memberof ProductCreationOrUpdateParameters
77
75
  */
78
- secondaryType?: ProductSecondaryType | null;
76
+ secondaryTypeId?: string | null;
79
77
  /**
80
78
  * Laboratory ID
81
79
  * @type {number}
@@ -14,9 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ProductCreationOrUpdateParametersToJSON = exports.ProductCreationOrUpdateParametersFromJSONTyped = exports.ProductCreationOrUpdateParametersFromJSON = exports.instanceOfProductCreationOrUpdateParameters = void 0;
17
- var ProductSecondaryType_1 = require("./ProductSecondaryType");
18
17
  var ProductStorageType_1 = require("./ProductStorageType");
19
- var ProductType_1 = require("./ProductType");
20
18
  var ProductMarketStatus_1 = require("./ProductMarketStatus");
21
19
  var ProductStatus_1 = require("./ProductStatus");
22
20
  var Barcodes_1 = require("./Barcodes");
@@ -44,8 +42,8 @@ function ProductCreationOrUpdateParametersFromJSONTyped(json, ignoreDiscriminato
44
42
  'unitWeight': json['unitWeight'],
45
43
  'unitPrice': json['unitPrice'],
46
44
  'unitPriceEffectiveDate': (json['unitPriceEffectiveDate'] === null || json['unitPriceEffectiveDate'] === undefined) ? json['unitPriceEffectiveDate'] : new Date(json['unitPriceEffectiveDate']),
47
- 'type': (json['type'] === null || json['type'] === undefined) ? json['type'] : (0, ProductType_1.ProductTypeFromJSON)(json['type']),
48
- 'secondaryType': (json['secondaryType'] === null || json['secondaryType'] === undefined) ? json['secondaryType'] : (0, ProductSecondaryType_1.ProductSecondaryTypeFromJSON)(json['secondaryType']),
45
+ 'typeId': json['typeId'],
46
+ 'secondaryTypeId': json['secondaryTypeId'],
49
47
  'laboratoryId': json['laboratoryId'],
50
48
  'vatId': json['vatId'],
51
49
  'narcoticPrescription': json['narcoticPrescription'],
@@ -71,8 +69,8 @@ function ProductCreationOrUpdateParametersToJSON(value) {
71
69
  'unitWeight': value['unitWeight'],
72
70
  'unitPrice': value['unitPrice'],
73
71
  'unitPriceEffectiveDate': (value['unitPriceEffectiveDate'] === null || value['unitPriceEffectiveDate'] === undefined) ? value['unitPriceEffectiveDate'] : value['unitPriceEffectiveDate'].toISOString(),
74
- 'type': (0, ProductType_1.ProductTypeToJSON)(value['type']),
75
- 'secondaryType': (0, ProductSecondaryType_1.ProductSecondaryTypeToJSON)(value['secondaryType']),
72
+ 'typeId': value['typeId'],
73
+ 'secondaryTypeId': value['secondaryTypeId'],
76
74
  'laboratoryId': value['laboratoryId'],
77
75
  'vatId': value['vatId'],
78
76
  'narcoticPrescription': value['narcoticPrescription'],
@@ -12,14 +12,26 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
+ * @interface ProductSecondaryType
15
16
  */
16
- export declare const ProductSecondaryType: {
17
- readonly OTC: "OTC";
18
- readonly VIGNETTE: "VIGNETTE";
19
- readonly NR: "NR";
20
- };
21
- export declare type ProductSecondaryType = typeof ProductSecondaryType[keyof typeof ProductSecondaryType];
22
- export declare function instanceOfProductSecondaryType(value: any): boolean;
17
+ export interface ProductSecondaryType {
18
+ /**
19
+ * Id of the product secondary type
20
+ * @type {string}
21
+ * @memberof ProductSecondaryType
22
+ */
23
+ id?: string;
24
+ /**
25
+ * Readable name for display
26
+ * @type {string}
27
+ * @memberof ProductSecondaryType
28
+ */
29
+ name?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ProductSecondaryType interface.
33
+ */
34
+ export declare function instanceOfProductSecondaryType(value: object): value is ProductSecondaryType;
23
35
  export declare function ProductSecondaryTypeFromJSON(json: any): ProductSecondaryType;
24
36
  export declare function ProductSecondaryTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductSecondaryType;
25
37
  export declare function ProductSecondaryTypeToJSON(value?: ProductSecondaryType | null): any;
@@ -13,25 +13,12 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProductSecondaryTypeToJSON = exports.ProductSecondaryTypeFromJSONTyped = exports.ProductSecondaryTypeFromJSON = exports.instanceOfProductSecondaryType = exports.ProductSecondaryType = void 0;
16
+ exports.ProductSecondaryTypeToJSON = exports.ProductSecondaryTypeFromJSONTyped = exports.ProductSecondaryTypeFromJSON = exports.instanceOfProductSecondaryType = void 0;
17
17
  /**
18
- *
19
- * @export
18
+ * Check if a given object implements the ProductSecondaryType interface.
20
19
  */
21
- exports.ProductSecondaryType = {
22
- OTC: 'OTC',
23
- VIGNETTE: 'VIGNETTE',
24
- NR: 'NR'
25
- };
26
20
  function instanceOfProductSecondaryType(value) {
27
- for (var key in exports.ProductSecondaryType) {
28
- if (Object.prototype.hasOwnProperty.call(exports.ProductSecondaryType, key)) {
29
- if (exports.ProductSecondaryType[key] === value) {
30
- return true;
31
- }
32
- }
33
- }
34
- return false;
21
+ return true;
35
22
  }
36
23
  exports.instanceOfProductSecondaryType = instanceOfProductSecondaryType;
37
24
  function ProductSecondaryTypeFromJSON(json) {
@@ -39,10 +26,22 @@ function ProductSecondaryTypeFromJSON(json) {
39
26
  }
40
27
  exports.ProductSecondaryTypeFromJSON = ProductSecondaryTypeFromJSON;
41
28
  function ProductSecondaryTypeFromJSONTyped(json, ignoreDiscriminator) {
42
- return json;
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'id': json['id'],
34
+ 'name': json['name'],
35
+ };
43
36
  }
44
37
  exports.ProductSecondaryTypeFromJSONTyped = ProductSecondaryTypeFromJSONTyped;
45
38
  function ProductSecondaryTypeToJSON(value) {
46
- return value;
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'id': value['id'],
44
+ 'name': value['name'],
45
+ };
47
46
  }
48
47
  exports.ProductSecondaryTypeToJSON = ProductSecondaryTypeToJSON;
@@ -12,17 +12,26 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
+ * @interface ProductType
15
16
  */
16
- export declare const ProductType: {
17
- readonly PARAPHARMACIE: "PARAPHARMACIE";
18
- readonly DM: "DM";
19
- readonly MEDICAMENT: "MEDICAMENT";
20
- readonly HOMEOPATHIE: "HOMEOPATHIE";
21
- readonly VETERINAIRE: "VETERINAIRE";
22
- readonly COMPLEMENT: "COMPLEMENT";
23
- };
24
- export declare type ProductType = typeof ProductType[keyof typeof ProductType];
25
- export declare function instanceOfProductType(value: any): boolean;
17
+ export interface ProductType {
18
+ /**
19
+ * Id of the product type (machine name)
20
+ * @type {string}
21
+ * @memberof ProductType
22
+ */
23
+ id?: string;
24
+ /**
25
+ * Readable name for display
26
+ * @type {string}
27
+ * @memberof ProductType
28
+ */
29
+ name?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ProductType interface.
33
+ */
34
+ export declare function instanceOfProductType(value: object): value is ProductType;
26
35
  export declare function ProductTypeFromJSON(json: any): ProductType;
27
36
  export declare function ProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductType;
28
37
  export declare function ProductTypeToJSON(value?: ProductType | null): any;
@@ -13,28 +13,12 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = exports.ProductType = void 0;
16
+ exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = void 0;
17
17
  /**
18
- *
19
- * @export
18
+ * Check if a given object implements the ProductType interface.
20
19
  */
21
- exports.ProductType = {
22
- PARAPHARMACIE: 'PARAPHARMACIE',
23
- DM: 'DM',
24
- MEDICAMENT: 'MEDICAMENT',
25
- HOMEOPATHIE: 'HOMEOPATHIE',
26
- VETERINAIRE: 'VETERINAIRE',
27
- COMPLEMENT: 'COMPLEMENT'
28
- };
29
20
  function instanceOfProductType(value) {
30
- for (var key in exports.ProductType) {
31
- if (Object.prototype.hasOwnProperty.call(exports.ProductType, key)) {
32
- if (exports.ProductType[key] === value) {
33
- return true;
34
- }
35
- }
36
- }
37
- return false;
21
+ return true;
38
22
  }
39
23
  exports.instanceOfProductType = instanceOfProductType;
40
24
  function ProductTypeFromJSON(json) {
@@ -42,10 +26,22 @@ function ProductTypeFromJSON(json) {
42
26
  }
43
27
  exports.ProductTypeFromJSON = ProductTypeFromJSON;
44
28
  function ProductTypeFromJSONTyped(json, ignoreDiscriminator) {
45
- return json;
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'id': json['id'],
34
+ 'name': json['name'],
35
+ };
46
36
  }
47
37
  exports.ProductTypeFromJSONTyped = ProductTypeFromJSONTyped;
48
38
  function ProductTypeToJSON(value) {
49
- return value;
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'id': value['id'],
44
+ 'name': value['name'],
45
+ };
50
46
  }
51
47
  exports.ProductTypeToJSON = ProductTypeToJSON;