@lcdp/api-react-rest-client 2.2.0-LDS-3043.5255236497 → 2.2.0-develop.5257142523

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 (75) hide show
  1. package/package.json +1 -1
  2. package/product/src/apis/ManageProductApi.d.ts +0 -2
  3. package/product/src/apis/ManageProductApi.js +0 -6
  4. package/product/src/apis/SearchProductApi.d.ts +1 -39
  5. package/product/src/apis/SearchProductApi.js +4 -290
  6. package/product/src/apis/SearchProductMetadataApi.d.ts +34 -0
  7. package/{catalog/src/apis/SearchProductInsightApi.js → product/src/apis/SearchProductMetadataApi.js} +22 -48
  8. package/product/src/apis/index.d.ts +1 -0
  9. package/product/src/apis/index.js +1 -0
  10. package/product/src/models/Product.d.ts +37 -38
  11. package/product/src/models/Product.js +31 -31
  12. package/product/src/models/ProductCreationOrUpdateParameters.d.ts +6 -0
  13. package/product/src/models/ProductCreationOrUpdateParameters.js +2 -0
  14. package/product/src/models/{DataProvider.d.ts → ProductProvider.d.ts} +5 -7
  15. package/product/src/models/ProductProvider.js +38 -0
  16. package/product/src/models/index.d.ts +1 -4
  17. package/product/src/models/index.js +1 -4
  18. package/catalog/index.d.ts +0 -1
  19. package/catalog/index.js +0 -17
  20. package/catalog/src/apis/ManageProductInsightApi.d.ts +0 -54
  21. package/catalog/src/apis/ManageProductInsightApi.js +0 -295
  22. package/catalog/src/apis/SearchProductInsightApi.d.ts +0 -53
  23. package/catalog/src/apis/index.d.ts +0 -2
  24. package/catalog/src/apis/index.js +0 -18
  25. package/catalog/src/index.d.ts +0 -3
  26. package/catalog/src/index.js +0 -19
  27. package/catalog/src/models/Barcodes.d.ts +0 -45
  28. package/catalog/src/models/Barcodes.js +0 -48
  29. package/catalog/src/models/HttpLink.d.ts +0 -27
  30. package/catalog/src/models/HttpLink.js +0 -41
  31. package/catalog/src/models/LaboratoryLink.d.ts +0 -34
  32. package/catalog/src/models/LaboratoryLink.js +0 -50
  33. package/catalog/src/models/LaboratoryLinkAllOf.d.ts +0 -33
  34. package/catalog/src/models/LaboratoryLinkAllOf.js +0 -44
  35. package/catalog/src/models/PaginatedObject.d.ts +0 -28
  36. package/catalog/src/models/PaginatedObject.js +0 -42
  37. package/catalog/src/models/PaginatedProductInsights.d.ts +0 -29
  38. package/catalog/src/models/PaginatedProductInsights.js +0 -50
  39. package/catalog/src/models/PaginatedProductInsightsAllOf.d.ts +0 -28
  40. package/catalog/src/models/PaginatedProductInsightsAllOf.js +0 -42
  41. package/catalog/src/models/PagingMetadata.d.ts +0 -45
  42. package/catalog/src/models/PagingMetadata.js +0 -47
  43. package/catalog/src/models/ProductInsight.d.ts +0 -100
  44. package/catalog/src/models/ProductInsight.js +0 -71
  45. package/catalog/src/models/ProductInsightCreationOrUpdateParameters.d.ts +0 -83
  46. package/catalog/src/models/ProductInsightCreationOrUpdateParameters.js +0 -62
  47. package/catalog/src/models/ProductInsightJournal.d.ts +0 -33
  48. package/catalog/src/models/ProductInsightJournal.js +0 -44
  49. package/catalog/src/models/ProductSecondaryTypeLink.d.ts +0 -34
  50. package/catalog/src/models/ProductSecondaryTypeLink.js +0 -50
  51. package/catalog/src/models/ProductSecondaryTypeLinkAllOf.d.ts +0 -33
  52. package/catalog/src/models/ProductSecondaryTypeLinkAllOf.js +0 -44
  53. package/catalog/src/models/ProductStorageType.d.ts +0 -25
  54. package/catalog/src/models/ProductStorageType.js +0 -40
  55. package/catalog/src/models/ProductTypeLink.d.ts +0 -34
  56. package/catalog/src/models/ProductTypeLink.js +0 -50
  57. package/catalog/src/models/ProductTypeLinkAllOf.d.ts +0 -33
  58. package/catalog/src/models/ProductTypeLinkAllOf.js +0 -44
  59. package/catalog/src/models/RestError.d.ts +0 -85
  60. package/catalog/src/models/RestError.js +0 -97
  61. package/catalog/src/models/VatLink.d.ts +0 -40
  62. package/catalog/src/models/VatLink.js +0 -50
  63. package/catalog/src/models/VatLinkAllOf.d.ts +0 -39
  64. package/catalog/src/models/VatLinkAllOf.js +0 -46
  65. package/catalog/src/models/index.d.ts +0 -19
  66. package/catalog/src/models/index.js +0 -35
  67. package/catalog/src/runtime.d.ts +0 -149
  68. package/catalog/src/runtime.js +0 -480
  69. package/product/src/models/DataProvider.js +0 -40
  70. package/product/src/models/ProductJournal.d.ts +0 -27
  71. package/product/src/models/ProductJournal.js +0 -41
  72. package/product/src/models/ProductMetadata.d.ts +0 -28
  73. package/product/src/models/ProductMetadata.js +0 -42
  74. package/product/src/models/ProductMetadataSources.d.ts +0 -124
  75. package/product/src/models/ProductMetadataSources.js +0 -75
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.2.0-LDS-3043.5255236497",
3
+ "version": "2.2.0-develop.5257142523",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -13,12 +13,10 @@ import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
13
13
  import { Product, ProductCreationOrUpdateParameters } from '../models';
14
14
  export interface CreateProductRequest {
15
15
  productCreationOrUpdateParameters: ProductCreationOrUpdateParameters;
16
- xWithSync?: boolean;
17
16
  }
18
17
  export interface UpdateProductRequest {
19
18
  productId: number;
20
19
  productCreationOrUpdateParameters: ProductCreationOrUpdateParameters;
21
- xWithSync?: boolean;
22
20
  }
23
21
  /**
24
22
  * no description
@@ -91,9 +91,6 @@ var ManageProductApi = /** @class */ (function (_super) {
91
91
  queryParameters = {};
92
92
  headerParameters = {};
93
93
  headerParameters['Content-Type'] = 'application/json';
94
- if (requestParameters.xWithSync !== undefined && requestParameters.xWithSync !== null) {
95
- headerParameters['X-With-Sync'] = String(requestParameters.xWithSync);
96
- }
97
94
  if (this.configuration && this.configuration.apiKey) {
98
95
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
99
96
  }
@@ -174,9 +171,6 @@ var ManageProductApi = /** @class */ (function (_super) {
174
171
  queryParameters = {};
175
172
  headerParameters = {};
176
173
  headerParameters['Content-Type'] = 'application/merge-patch+json';
177
- if (requestParameters.xWithSync !== undefined && requestParameters.xWithSync !== null) {
178
- headerParameters['X-With-Sync'] = String(requestParameters.xWithSync);
179
- }
180
174
  if (this.configuration && this.configuration.apiKey) {
181
175
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
182
176
  }
@@ -10,16 +10,10 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
13
- import { PaginatedProducts, Product, ProductSecondaryType, ProductStatus, ProductType } from '../models';
13
+ import { PaginatedProducts, Product, ProductStatus } from '../models';
14
14
  export interface GetProductRequest {
15
15
  productId: number;
16
16
  }
17
- export interface GetProductSecondaryTypeRequest {
18
- secondaryTypeId: string;
19
- }
20
- export interface GetProductTypeRequest {
21
- typeId: string;
22
- }
23
17
  export interface GetProductsRequest {
24
18
  q?: string;
25
19
  barcodesAnyeq?: Array<string>;
@@ -47,38 +41,6 @@ export declare class SearchProductApi extends BaseAPI {
47
41
  * Retrieve a product with ID
48
42
  */
49
43
  getProduct(requestParameters: GetProductRequest): Promise<Product | BlobWithMeta>;
50
- /**
51
- * Get product secondary type
52
- */
53
- getProductSecondaryTypeRaw(requestParameters: GetProductSecondaryTypeRequest): Promise<ApiResponse<ProductSecondaryType | BlobWithMeta>>;
54
- /**
55
- * Get product secondary type
56
- */
57
- getProductSecondaryType(requestParameters: GetProductSecondaryTypeRequest): Promise<ProductSecondaryType | BlobWithMeta>;
58
- /**
59
- * Get product secondary types
60
- */
61
- getProductSecondaryTypesRaw(): Promise<ApiResponse<Array<ProductSecondaryType> | BlobWithMeta>>;
62
- /**
63
- * Get product secondary types
64
- */
65
- getProductSecondaryTypes(): Promise<Array<ProductSecondaryType> | BlobWithMeta>;
66
- /**
67
- * Get product type
68
- */
69
- getProductTypeRaw(requestParameters: GetProductTypeRequest): Promise<ApiResponse<ProductType | BlobWithMeta>>;
70
- /**
71
- * Get product type
72
- */
73
- getProductType(requestParameters: GetProductTypeRequest): Promise<ProductType | BlobWithMeta>;
74
- /**
75
- * Get product types
76
- */
77
- getProductTypesRaw(): Promise<ApiResponse<Array<ProductType> | BlobWithMeta>>;
78
- /**
79
- * Get product types
80
- */
81
- getProductTypes(): Promise<Array<ProductType> | BlobWithMeta>;
82
44
  /**
83
45
  * Search for products with his name or status
84
46
  */
@@ -148,298 +148,12 @@ var SearchProductApi = /** @class */ (function (_super) {
148
148
  });
149
149
  });
150
150
  };
151
- /**
152
- * Get product secondary type
153
- */
154
- SearchProductApi.prototype.getProductSecondaryTypeRaw = function (requestParameters) {
155
- return __awaiter(this, void 0, void 0, function () {
156
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_2;
157
- return __generator(this, function (_a) {
158
- switch (_a.label) {
159
- case 0:
160
- if (requestParameters.secondaryTypeId === null || requestParameters.secondaryTypeId === undefined) {
161
- throw new runtime_1.RequiredError('secondaryTypeId', 'Required parameter requestParameters.secondaryTypeId was null or undefined when calling getProductSecondaryType.');
162
- }
163
- queryParameters = {};
164
- headerParameters = {};
165
- if (this.configuration && this.configuration.apiKey) {
166
- headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
167
- }
168
- if (this.configuration && this.configuration.accessToken) {
169
- token = this.configuration.accessToken;
170
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
171
- if (tokenString) {
172
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
173
- }
174
- }
175
- _a.label = 1;
176
- case 1:
177
- _a.trys.push([1, 3, , 4]);
178
- return [4 /*yield*/, this.request({
179
- path: "/products/secondary-types/{secondaryTypeId}".replace("{".concat("secondaryTypeId", "}"), encodeURIComponent(String(requestParameters.secondaryTypeId))),
180
- method: 'GET',
181
- headers: headerParameters,
182
- query: queryParameters,
183
- })];
184
- case 2:
185
- response = _a.sent();
186
- contentType = response.headers.get("content-type");
187
- if (contentType && contentType.indexOf("application/json") !== -1) {
188
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ProductSecondaryTypeFromJSON)(jsonValue); })];
189
- }
190
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
191
- return [2 /*return*/, new runtime_1.TextApiResponse(response)];
192
- }
193
- else {
194
- // TODO : Better handling of others application types
195
- return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
196
- }
197
- return [3 /*break*/, 4];
198
- case 3:
199
- response_2 = _a.sent();
200
- console.debug(response_2);
201
- throw response_2;
202
- case 4: return [2 /*return*/];
203
- }
204
- });
205
- });
206
- };
207
- /**
208
- * Get product secondary type
209
- */
210
- SearchProductApi.prototype.getProductSecondaryType = function (requestParameters) {
211
- return __awaiter(this, void 0, void 0, function () {
212
- var response;
213
- return __generator(this, function (_a) {
214
- switch (_a.label) {
215
- case 0: return [4 /*yield*/, this.getProductSecondaryTypeRaw(requestParameters)];
216
- case 1:
217
- response = _a.sent();
218
- return [4 /*yield*/, response.value()];
219
- case 2: return [2 /*return*/, _a.sent()];
220
- }
221
- });
222
- });
223
- };
224
- /**
225
- * Get product secondary types
226
- */
227
- SearchProductApi.prototype.getProductSecondaryTypesRaw = function () {
228
- return __awaiter(this, void 0, void 0, function () {
229
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_3;
230
- return __generator(this, function (_a) {
231
- switch (_a.label) {
232
- case 0:
233
- queryParameters = {};
234
- headerParameters = {};
235
- if (this.configuration && this.configuration.apiKey) {
236
- headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
237
- }
238
- if (this.configuration && this.configuration.accessToken) {
239
- token = this.configuration.accessToken;
240
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
241
- if (tokenString) {
242
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
243
- }
244
- }
245
- _a.label = 1;
246
- case 1:
247
- _a.trys.push([1, 3, , 4]);
248
- return [4 /*yield*/, this.request({
249
- path: "/products/secondary-types",
250
- method: 'GET',
251
- headers: headerParameters,
252
- query: queryParameters,
253
- })];
254
- case 2:
255
- response = _a.sent();
256
- contentType = response.headers.get("content-type");
257
- if (contentType && contentType.indexOf("application/json") !== -1) {
258
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.ProductSecondaryTypeFromJSON); })];
259
- }
260
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
261
- return [2 /*return*/, new runtime_1.TextApiResponse(response)];
262
- }
263
- else {
264
- // TODO : Better handling of others application types
265
- return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
266
- }
267
- return [3 /*break*/, 4];
268
- case 3:
269
- response_3 = _a.sent();
270
- console.debug(response_3);
271
- throw response_3;
272
- case 4: return [2 /*return*/];
273
- }
274
- });
275
- });
276
- };
277
- /**
278
- * Get product secondary types
279
- */
280
- SearchProductApi.prototype.getProductSecondaryTypes = function () {
281
- return __awaiter(this, void 0, void 0, function () {
282
- var response;
283
- return __generator(this, function (_a) {
284
- switch (_a.label) {
285
- case 0: return [4 /*yield*/, this.getProductSecondaryTypesRaw()];
286
- case 1:
287
- response = _a.sent();
288
- return [4 /*yield*/, response.value()];
289
- case 2: return [2 /*return*/, _a.sent()];
290
- }
291
- });
292
- });
293
- };
294
- /**
295
- * Get product type
296
- */
297
- SearchProductApi.prototype.getProductTypeRaw = function (requestParameters) {
298
- return __awaiter(this, void 0, void 0, function () {
299
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_4;
300
- return __generator(this, function (_a) {
301
- switch (_a.label) {
302
- case 0:
303
- if (requestParameters.typeId === null || requestParameters.typeId === undefined) {
304
- throw new runtime_1.RequiredError('typeId', 'Required parameter requestParameters.typeId was null or undefined when calling getProductType.');
305
- }
306
- queryParameters = {};
307
- headerParameters = {};
308
- if (this.configuration && this.configuration.apiKey) {
309
- headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
310
- }
311
- if (this.configuration && this.configuration.accessToken) {
312
- token = this.configuration.accessToken;
313
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
314
- if (tokenString) {
315
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
316
- }
317
- }
318
- _a.label = 1;
319
- case 1:
320
- _a.trys.push([1, 3, , 4]);
321
- return [4 /*yield*/, this.request({
322
- path: "/products/types/{typeId}".replace("{".concat("typeId", "}"), encodeURIComponent(String(requestParameters.typeId))),
323
- method: 'GET',
324
- headers: headerParameters,
325
- query: queryParameters,
326
- })];
327
- case 2:
328
- response = _a.sent();
329
- contentType = response.headers.get("content-type");
330
- if (contentType && contentType.indexOf("application/json") !== -1) {
331
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ProductTypeFromJSON)(jsonValue); })];
332
- }
333
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
334
- return [2 /*return*/, new runtime_1.TextApiResponse(response)];
335
- }
336
- else {
337
- // TODO : Better handling of others application types
338
- return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
339
- }
340
- return [3 /*break*/, 4];
341
- case 3:
342
- response_4 = _a.sent();
343
- console.debug(response_4);
344
- throw response_4;
345
- case 4: return [2 /*return*/];
346
- }
347
- });
348
- });
349
- };
350
- /**
351
- * Get product type
352
- */
353
- SearchProductApi.prototype.getProductType = function (requestParameters) {
354
- return __awaiter(this, void 0, void 0, function () {
355
- var response;
356
- return __generator(this, function (_a) {
357
- switch (_a.label) {
358
- case 0: return [4 /*yield*/, this.getProductTypeRaw(requestParameters)];
359
- case 1:
360
- response = _a.sent();
361
- return [4 /*yield*/, response.value()];
362
- case 2: return [2 /*return*/, _a.sent()];
363
- }
364
- });
365
- });
366
- };
367
- /**
368
- * Get product types
369
- */
370
- SearchProductApi.prototype.getProductTypesRaw = function () {
371
- return __awaiter(this, void 0, void 0, function () {
372
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_5;
373
- return __generator(this, function (_a) {
374
- switch (_a.label) {
375
- case 0:
376
- queryParameters = {};
377
- headerParameters = {};
378
- if (this.configuration && this.configuration.apiKey) {
379
- headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
380
- }
381
- if (this.configuration && this.configuration.accessToken) {
382
- token = this.configuration.accessToken;
383
- tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
384
- if (tokenString) {
385
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
386
- }
387
- }
388
- _a.label = 1;
389
- case 1:
390
- _a.trys.push([1, 3, , 4]);
391
- return [4 /*yield*/, this.request({
392
- path: "/products/types",
393
- method: 'GET',
394
- headers: headerParameters,
395
- query: queryParameters,
396
- })];
397
- case 2:
398
- response = _a.sent();
399
- contentType = response.headers.get("content-type");
400
- if (contentType && contentType.indexOf("application/json") !== -1) {
401
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.ProductTypeFromJSON); })];
402
- }
403
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
404
- return [2 /*return*/, new runtime_1.TextApiResponse(response)];
405
- }
406
- else {
407
- // TODO : Better handling of others application types
408
- return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
409
- }
410
- return [3 /*break*/, 4];
411
- case 3:
412
- response_5 = _a.sent();
413
- console.debug(response_5);
414
- throw response_5;
415
- case 4: return [2 /*return*/];
416
- }
417
- });
418
- });
419
- };
420
- /**
421
- * Get product types
422
- */
423
- SearchProductApi.prototype.getProductTypes = function () {
424
- return __awaiter(this, void 0, void 0, function () {
425
- var response;
426
- return __generator(this, function (_a) {
427
- switch (_a.label) {
428
- case 0: return [4 /*yield*/, this.getProductTypesRaw()];
429
- case 1:
430
- response = _a.sent();
431
- return [4 /*yield*/, response.value()];
432
- case 2: return [2 /*return*/, _a.sent()];
433
- }
434
- });
435
- });
436
- };
437
151
  /**
438
152
  * Search for products with his name or status
439
153
  */
440
154
  SearchProductApi.prototype.getProductsRaw = function (requestParameters) {
441
155
  return __awaiter(this, void 0, void 0, function () {
442
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_6;
156
+ var queryParameters, headerParameters, token, tokenString, response, contentType, response_2;
443
157
  return __generator(this, function (_a) {
444
158
  switch (_a.label) {
445
159
  case 0:
@@ -518,9 +232,9 @@ var SearchProductApi = /** @class */ (function (_super) {
518
232
  }
519
233
  return [3 /*break*/, 4];
520
234
  case 3:
521
- response_6 = _a.sent();
522
- console.debug(response_6);
523
- throw response_6;
235
+ response_2 = _a.sent();
236
+ console.debug(response_2);
237
+ throw response_2;
524
238
  case 4: return [2 /*return*/];
525
239
  }
526
240
  });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * lcdp-monolith-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 { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
13
+ import { ProductSecondaryType, ProductType } from '../models';
14
+ /**
15
+ * no description
16
+ */
17
+ export declare class SearchProductMetadataApi extends BaseAPI {
18
+ /**
19
+ * Get product secondary types
20
+ */
21
+ getProductSecondaryTypesRaw(): Promise<ApiResponse<Array<ProductSecondaryType> | BlobWithMeta>>;
22
+ /**
23
+ * Get product secondary types
24
+ */
25
+ getProductSecondaryTypes(): Promise<Array<ProductSecondaryType> | BlobWithMeta>;
26
+ /**
27
+ * Get product types
28
+ */
29
+ getProductTypesRaw(): Promise<ApiResponse<Array<ProductType> | BlobWithMeta>>;
30
+ /**
31
+ * Get product types
32
+ */
33
+ getProductTypes(): Promise<Array<ProductType> | BlobWithMeta>;
34
+ }
@@ -2,8 +2,8 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  /**
5
- * lcdp-catalog
6
- * This is the REST API of LCDP catalog
5
+ * lcdp-monolith-service
6
+ * This is the REST API of LCDP products
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  * Contact: contact@lecomptoirdespharmacies.fr
@@ -64,29 +64,26 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  }
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.GetProductInsightsOrderByEnum = exports.SearchProductInsightApi = void 0;
67
+ exports.SearchProductMetadataApi = void 0;
68
68
  var runtime_1 = require("../runtime");
69
69
  var models_1 = require("../models");
70
70
  /**
71
71
  * no description
72
72
  */
73
- var SearchProductInsightApi = /** @class */ (function (_super) {
74
- __extends(SearchProductInsightApi, _super);
75
- function SearchProductInsightApi() {
73
+ var SearchProductMetadataApi = /** @class */ (function (_super) {
74
+ __extends(SearchProductMetadataApi, _super);
75
+ function SearchProductMetadataApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Retrieve a product insight with ID
79
+ * Get product secondary types
80
80
  */
81
- SearchProductInsightApi.prototype.getProductInsightRaw = function (requestParameters) {
81
+ SearchProductMetadataApi.prototype.getProductSecondaryTypesRaw = function () {
82
82
  return __awaiter(this, void 0, void 0, function () {
83
83
  var queryParameters, headerParameters, token, tokenString, response, contentType, response_1;
84
84
  return __generator(this, function (_a) {
85
85
  switch (_a.label) {
86
86
  case 0:
87
- if (requestParameters.productInsightId === null || requestParameters.productInsightId === undefined) {
88
- throw new runtime_1.RequiredError('productInsightId', 'Required parameter requestParameters.productInsightId was null or undefined when calling getProductInsight.');
89
- }
90
87
  queryParameters = {};
91
88
  headerParameters = {};
92
89
  if (this.configuration && this.configuration.apiKey) {
@@ -103,7 +100,7 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
103
100
  case 1:
104
101
  _a.trys.push([1, 3, , 4]);
105
102
  return [4 /*yield*/, this.request({
106
- path: "/product-insights/{productInsightId}".replace("{".concat("productInsightId", "}"), encodeURIComponent(String(requestParameters.productInsightId))),
103
+ path: "/products/secondary-types",
107
104
  method: 'GET',
108
105
  headers: headerParameters,
109
106
  query: queryParameters,
@@ -112,7 +109,7 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
112
109
  response = _a.sent();
113
110
  contentType = response.headers.get("content-type");
114
111
  if (contentType && contentType.indexOf("application/json") !== -1) {
115
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ProductInsightFromJSON)(jsonValue); })];
112
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.ProductSecondaryTypeFromJSON); })];
116
113
  }
117
114
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
118
115
  return [2 /*return*/, new runtime_1.TextApiResponse(response)];
@@ -132,14 +129,14 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
132
129
  });
133
130
  };
134
131
  /**
135
- * Retrieve a product insight with ID
132
+ * Get product secondary types
136
133
  */
137
- SearchProductInsightApi.prototype.getProductInsight = function (requestParameters) {
134
+ SearchProductMetadataApi.prototype.getProductSecondaryTypes = function () {
138
135
  return __awaiter(this, void 0, void 0, function () {
139
136
  var response;
140
137
  return __generator(this, function (_a) {
141
138
  switch (_a.label) {
142
- case 0: return [4 /*yield*/, this.getProductInsightRaw(requestParameters)];
139
+ case 0: return [4 /*yield*/, this.getProductSecondaryTypesRaw()];
143
140
  case 1:
144
141
  response = _a.sent();
145
142
  return [4 /*yield*/, response.value()];
@@ -149,27 +146,15 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
149
146
  });
150
147
  };
151
148
  /**
152
- * Search for product insights
149
+ * Get product types
153
150
  */
154
- SearchProductInsightApi.prototype.getProductInsightsRaw = function (requestParameters) {
151
+ SearchProductMetadataApi.prototype.getProductTypesRaw = function () {
155
152
  return __awaiter(this, void 0, void 0, function () {
156
153
  var queryParameters, headerParameters, token, tokenString, response, contentType, response_2;
157
154
  return __generator(this, function (_a) {
158
155
  switch (_a.label) {
159
156
  case 0:
160
157
  queryParameters = {};
161
- if (requestParameters.barcodesAnyeq) {
162
- queryParameters['barcodes[anyeq]'] = requestParameters.barcodesAnyeq;
163
- }
164
- if (requestParameters.orderBy !== undefined) {
165
- queryParameters['orderBy'] = requestParameters.orderBy;
166
- }
167
- if (requestParameters.p !== undefined) {
168
- queryParameters['p'] = requestParameters.p;
169
- }
170
- if (requestParameters.pp !== undefined) {
171
- queryParameters['pp'] = requestParameters.pp;
172
- }
173
158
  headerParameters = {};
174
159
  if (this.configuration && this.configuration.apiKey) {
175
160
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
@@ -185,7 +170,7 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
185
170
  case 1:
186
171
  _a.trys.push([1, 3, , 4]);
187
172
  return [4 /*yield*/, this.request({
188
- path: "/product-insights",
173
+ path: "/products/types",
189
174
  method: 'GET',
190
175
  headers: headerParameters,
191
176
  query: queryParameters,
@@ -194,7 +179,7 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
194
179
  response = _a.sent();
195
180
  contentType = response.headers.get("content-type");
196
181
  if (contentType && contentType.indexOf("application/json") !== -1) {
197
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.PaginatedProductInsightsFromJSON)(jsonValue); })];
182
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.ProductTypeFromJSON); })];
198
183
  }
199
184
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
200
185
  return [2 /*return*/, new runtime_1.TextApiResponse(response)];
@@ -214,14 +199,14 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
214
199
  });
215
200
  };
216
201
  /**
217
- * Search for product insights
202
+ * Get product types
218
203
  */
219
- SearchProductInsightApi.prototype.getProductInsights = function (requestParameters) {
204
+ SearchProductMetadataApi.prototype.getProductTypes = function () {
220
205
  return __awaiter(this, void 0, void 0, function () {
221
206
  var response;
222
207
  return __generator(this, function (_a) {
223
208
  switch (_a.label) {
224
- case 0: return [4 /*yield*/, this.getProductInsightsRaw(requestParameters)];
209
+ case 0: return [4 /*yield*/, this.getProductTypesRaw()];
225
210
  case 1:
226
211
  response = _a.sent();
227
212
  return [4 /*yield*/, response.value()];
@@ -230,17 +215,6 @@ var SearchProductInsightApi = /** @class */ (function (_super) {
230
215
  });
231
216
  });
232
217
  };
233
- return SearchProductInsightApi;
218
+ return SearchProductMetadataApi;
234
219
  }(runtime_1.BaseAPI));
235
- exports.SearchProductInsightApi = SearchProductInsightApi;
236
- /**
237
- * @export
238
- * @enum {string}
239
- */
240
- var GetProductInsightsOrderByEnum;
241
- (function (GetProductInsightsOrderByEnum) {
242
- GetProductInsightsOrderByEnum["PRODUCTNAMEASC"] = "PRODUCT_NAME:ASC";
243
- GetProductInsightsOrderByEnum["PRODUCTNAMEDESC"] = "PRODUCT_NAME:DESC";
244
- GetProductInsightsOrderByEnum["BARCODESPRINCIPALASC"] = "BARCODES_PRINCIPAL:ASC";
245
- GetProductInsightsOrderByEnum["BARCODESPRINCIPALDESC"] = "BARCODES_PRINCIPAL:DESC";
246
- })(GetProductInsightsOrderByEnum = exports.GetProductInsightsOrderByEnum || (exports.GetProductInsightsOrderByEnum = {}));
220
+ 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';
@@ -19,4 +19,5 @@ __exportStar(require("./ManageProductImageApi"), exports);
19
19
  __exportStar(require("./ManageProductProscriptionApi"), exports);
20
20
  __exportStar(require("./SearchProductApi"), exports);
21
21
  __exportStar(require("./SearchProductImageApi"), exports);
22
+ __exportStar(require("./SearchProductMetadataApi"), exports);
22
23
  __exportStar(require("./SearchProductProscriptionApi"), exports);