@lcdp/api-react-rest-client 3.1.11 → 3.3.0

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 +8 -6
  4. package/catalog/src/models/ProductInsightCreateOrUpdateParameters.js +6 -4
  5. package/catalog/src/models/ProductSecondaryType.d.ts +25 -0
  6. package/catalog/src/models/ProductSecondaryType.js +48 -0
  7. package/catalog/src/models/ProductType.d.ts +28 -0
  8. package/catalog/src/models/ProductType.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 +4 -3
  12. package/factory/src/models/Product.js +3 -2
  13. package/factory/src/models/ProductType.d.ts +28 -0
  14. package/factory/src/models/ProductType.js +51 -0
  15. package/factory/src/models/index.d.ts +1 -0
  16. package/factory/src/models/index.js +1 -0
  17. package/package.json +1 -1
  18. package/product/src/apis/ManageProductApi.d.ts +2 -2
  19. package/product/src/apis/ManageProductApi.js +2 -2
  20. package/product/src/apis/index.d.ts +0 -1
  21. package/product/src/apis/index.js +0 -1
  22. package/product/src/models/ProductCreationOrUpdateParameters.d.ts +8 -6
  23. package/product/src/models/ProductCreationOrUpdateParameters.js +6 -4
  24. package/product/src/models/ProductSecondaryType.d.ts +7 -19
  25. package/product/src/models/ProductSecondaryType.js +18 -17
  26. package/product/src/models/ProductType.d.ts +10 -19
  27. package/product/src/models/ProductType.js +21 -17
  28. package/user/src/apis/ManageUserRestrictionApi.d.ts +1 -25
  29. package/user/src/apis/ManageUserRestrictionApi.js +12 -152
  30. package/user/src/apis/SearchUserRestrictionApi.d.ts +1 -12
  31. package/user/src/apis/SearchUserRestrictionApi.js +0 -79
  32. package/user/src/models/ProductType.d.ts +28 -0
  33. package/user/src/models/ProductType.js +51 -0
  34. package/user/src/models/RestrictedProductType.d.ts +46 -0
  35. package/user/src/models/RestrictedProductType.js +55 -0
  36. package/user/src/models/User.d.ts +3 -2
  37. package/user/src/models/User.js +3 -2
  38. package/user/src/models/UserUpdateParameters.d.ts +7 -0
  39. package/user/src/models/UserUpdateParameters.js +3 -0
  40. package/user/src/models/index.d.ts +2 -2
  41. package/user/src/models/index.js +2 -2
  42. package/catalog/src/models/ProductSecondaryTypeLink.d.ts +0 -43
  43. package/catalog/src/models/ProductSecondaryTypeLink.js +0 -51
  44. package/catalog/src/models/ProductTypeLink.d.ts +0 -43
  45. package/catalog/src/models/ProductTypeLink.js +0 -51
  46. package/product/src/apis/SearchProductMetadataApi.d.ts +0 -56
  47. package/product/src/apis/SearchProductMetadataApi.js +0 -390
  48. package/user/src/models/ProductTypeLink.d.ts +0 -43
  49. package/user/src/models/ProductTypeLink.js +0 -51
  50. package/user/src/models/UserRestrictedProductTypeCreationParameter.d.ts +0 -31
  51. package/user/src/models/UserRestrictedProductTypeCreationParameter.js +0 -47
@@ -13,12 +13,25 @@
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 = void 0;
16
+ exports.ProductSecondaryTypeToJSON = exports.ProductSecondaryTypeFromJSONTyped = exports.ProductSecondaryTypeFromJSON = exports.instanceOfProductSecondaryType = exports.ProductSecondaryType = void 0;
17
17
  /**
18
- * Check if a given object implements the ProductSecondaryType interface.
18
+ *
19
+ * @export
19
20
  */
21
+ exports.ProductSecondaryType = {
22
+ OTC: 'OTC',
23
+ VIGNETTE: 'VIGNETTE',
24
+ NR: 'NR'
25
+ };
20
26
  function instanceOfProductSecondaryType(value) {
21
- return true;
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;
22
35
  }
23
36
  exports.instanceOfProductSecondaryType = instanceOfProductSecondaryType;
24
37
  function ProductSecondaryTypeFromJSON(json) {
@@ -26,22 +39,10 @@ function ProductSecondaryTypeFromJSON(json) {
26
39
  }
27
40
  exports.ProductSecondaryTypeFromJSON = ProductSecondaryTypeFromJSON;
28
41
  function ProductSecondaryTypeFromJSONTyped(json, ignoreDiscriminator) {
29
- if (json == null) {
30
- return json;
31
- }
32
- return {
33
- 'id': json['id'],
34
- 'name': json['name'],
35
- };
42
+ return json;
36
43
  }
37
44
  exports.ProductSecondaryTypeFromJSONTyped = ProductSecondaryTypeFromJSONTyped;
38
45
  function ProductSecondaryTypeToJSON(value) {
39
- if (value == null) {
40
- return value;
41
- }
42
- return {
43
- 'id': value['id'],
44
- 'name': value['name'],
45
- };
46
+ return value;
46
47
  }
47
48
  exports.ProductSecondaryTypeToJSON = ProductSecondaryTypeToJSON;
@@ -12,26 +12,17 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface ProductType
16
15
  */
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;
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;
35
26
  export declare function ProductTypeFromJSON(json: any): ProductType;
36
27
  export declare function ProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductType;
37
28
  export declare function ProductTypeToJSON(value?: ProductType | null): any;
@@ -13,12 +13,28 @@
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 = void 0;
16
+ exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = exports.ProductType = void 0;
17
17
  /**
18
- * Check if a given object implements the ProductType interface.
18
+ *
19
+ * @export
19
20
  */
21
+ exports.ProductType = {
22
+ PARAPHARMACIE: 'PARAPHARMACIE',
23
+ DM: 'DM',
24
+ MEDICAMENT: 'MEDICAMENT',
25
+ HOMEOPATHIE: 'HOMEOPATHIE',
26
+ VETERINAIRE: 'VETERINAIRE',
27
+ COMPLEMENT: 'COMPLEMENT'
28
+ };
20
29
  function instanceOfProductType(value) {
21
- return true;
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;
22
38
  }
23
39
  exports.instanceOfProductType = instanceOfProductType;
24
40
  function ProductTypeFromJSON(json) {
@@ -26,22 +42,10 @@ function ProductTypeFromJSON(json) {
26
42
  }
27
43
  exports.ProductTypeFromJSON = ProductTypeFromJSON;
28
44
  function ProductTypeFromJSONTyped(json, ignoreDiscriminator) {
29
- if (json == null) {
30
- return json;
31
- }
32
- return {
33
- 'id': json['id'],
34
- 'name': json['name'],
35
- };
45
+ return json;
36
46
  }
37
47
  exports.ProductTypeFromJSONTyped = ProductTypeFromJSONTyped;
38
48
  function ProductTypeToJSON(value) {
39
- if (value == null) {
40
- return value;
41
- }
42
- return {
43
- 'id': value['id'],
44
- 'name': value['name'],
45
- };
49
+ return value;
46
50
  }
47
51
  exports.ProductTypeToJSON = ProductTypeToJSON;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { NotificationTypeId, UserRestrictedFeatureCreationParameter, UserRestrictedNotificationTypeCreationParameter, UserRestrictedProductTypeCreationParameter } from '../models/index';
13
+ import type { NotificationTypeId, UserRestrictedFeatureCreationParameter, UserRestrictedNotificationTypeCreationParameter } from '../models/index';
14
14
  export interface CreateCurrentUserRestrictedNotificationTypeRequest {
15
15
  userRestrictedNotificationTypeCreationParameter: UserRestrictedNotificationTypeCreationParameter;
16
16
  }
@@ -22,10 +22,6 @@ export interface CreateUserRestrictedNotificationTypeRequest {
22
22
  userId: number;
23
23
  userRestrictedNotificationTypeCreationParameter: UserRestrictedNotificationTypeCreationParameter;
24
24
  }
25
- export interface CreateUserRestrictedProductTypeRequest {
26
- userId: number;
27
- userRestrictedProductTypeCreationParameter: UserRestrictedProductTypeCreationParameter;
28
- }
29
25
  export interface DeleteCurrentUserRestrictedNotificationTypeRequest {
30
26
  notificationTypeId: NotificationTypeId;
31
27
  }
@@ -37,10 +33,6 @@ export interface DeleteUserRestrictedNotificationTypeRequest {
37
33
  userId: number;
38
34
  notificationTypeId: NotificationTypeId;
39
35
  }
40
- export interface DeleteUserRestrictedProductTypeRequest {
41
- userId: number;
42
- productTypeId: string;
43
- }
44
36
  /**
45
37
  *
46
38
  */
@@ -69,14 +61,6 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
69
61
  * Add this notification type in restricted user notification types
70
62
  */
71
63
  createUserRestrictedNotificationType(requestParameters: CreateUserRestrictedNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
72
- /**
73
- * Add this product type in restricted user product types
74
- */
75
- createUserRestrictedProductTypeRaw(requestParameters: CreateUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
76
- /**
77
- * Add this product type in restricted user product types
78
- */
79
- createUserRestrictedProductType(requestParameters: CreateUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
80
64
  /**
81
65
  * Delete this notification type from restricted user notification types
82
66
  */
@@ -101,12 +85,4 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
101
85
  * Delete this notification type from restricted user notification types
102
86
  */
103
87
  deleteUserRestrictedNotificationType(requestParameters: DeleteUserRestrictedNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
104
- /**
105
- * Delete this product type from restricted user product types
106
- */
107
- deleteUserRestrictedProductTypeRaw(requestParameters: DeleteUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
108
- /**
109
- * Delete this product type from restricted user product types
110
- */
111
- deleteUserRestrictedProductType(requestParameters: DeleteUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
112
88
  }
@@ -285,83 +285,12 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
285
285
  });
286
286
  });
287
287
  };
288
- /**
289
- * Add this product type in restricted user product types
290
- */
291
- ManageUserRestrictionApi.prototype.createUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
292
- return __awaiter(this, void 0, void 0, function () {
293
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_4;
294
- return __generator(this, function (_c) {
295
- switch (_c.label) {
296
- case 0:
297
- if (requestParameters['userId'] == null) {
298
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createUserRestrictedProductType().');
299
- }
300
- if (requestParameters['userRestrictedProductTypeCreationParameter'] == null) {
301
- throw new runtime.RequiredError('userRestrictedProductTypeCreationParameter', 'Required parameter "userRestrictedProductTypeCreationParameter" was null or undefined when calling createUserRestrictedProductType().');
302
- }
303
- queryParameters = {};
304
- headerParameters = {};
305
- headerParameters['Content-Type'] = 'application/json';
306
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
307
- _a = headerParameters;
308
- _b = "x-api-key";
309
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
310
- case 1:
311
- _a[_b] = _c.sent(); // apiKeyAuth authentication
312
- _c.label = 2;
313
- case 2:
314
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
315
- token = this.configuration.accessToken;
316
- return [4 /*yield*/, token("bearerAuth", [])];
317
- case 3:
318
- tokenString = _c.sent();
319
- if (tokenString) {
320
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
321
- }
322
- _c.label = 4;
323
- case 4:
324
- _c.trys.push([4, 6, , 7]);
325
- return [4 /*yield*/, this.request({
326
- path: "/users/{userId}/restricted-product-types".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
327
- method: 'POST',
328
- headers: headerParameters,
329
- query: queryParameters,
330
- body: (0, index_1.UserRestrictedProductTypeCreationParameterToJSON)(requestParameters['userRestrictedProductTypeCreationParameter']),
331
- }, initOverrides)];
332
- case 5:
333
- response = _c.sent();
334
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
335
- case 6:
336
- response_4 = _c.sent();
337
- console.debug(response_4);
338
- throw response_4;
339
- case 7: return [2 /*return*/];
340
- }
341
- });
342
- });
343
- };
344
- /**
345
- * Add this product type in restricted user product types
346
- */
347
- ManageUserRestrictionApi.prototype.createUserRestrictedProductType = function (requestParameters, initOverrides) {
348
- return __awaiter(this, void 0, void 0, function () {
349
- return __generator(this, function (_a) {
350
- switch (_a.label) {
351
- case 0: return [4 /*yield*/, this.createUserRestrictedProductTypeRaw(requestParameters, initOverrides)];
352
- case 1:
353
- _a.sent();
354
- return [2 /*return*/];
355
- }
356
- });
357
- });
358
- };
359
288
  /**
360
289
  * Delete this notification type from restricted user notification types
361
290
  */
362
291
  ManageUserRestrictionApi.prototype.deleteCurrentUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
363
292
  return __awaiter(this, void 0, void 0, function () {
364
- var queryParameters, headerParameters, token, tokenString, response, response_5;
293
+ var queryParameters, headerParameters, token, tokenString, response, response_4;
365
294
  return __generator(this, function (_a) {
366
295
  switch (_a.label) {
367
296
  case 0:
@@ -391,9 +320,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
391
320
  response = _a.sent();
392
321
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
393
322
  case 4:
394
- response_5 = _a.sent();
395
- console.debug(response_5);
396
- throw response_5;
323
+ response_4 = _a.sent();
324
+ console.debug(response_4);
325
+ throw response_4;
397
326
  case 5: return [2 /*return*/];
398
327
  }
399
328
  });
@@ -419,7 +348,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
419
348
  */
420
349
  ManageUserRestrictionApi.prototype.deleteUserRestrictedFeatureRaw = function (requestParameters, initOverrides) {
421
350
  return __awaiter(this, void 0, void 0, function () {
422
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_6;
351
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_5;
423
352
  return __generator(this, function (_c) {
424
353
  switch (_c.label) {
425
354
  case 0:
@@ -460,9 +389,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
460
389
  response = _c.sent();
461
390
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
462
391
  case 6:
463
- response_6 = _c.sent();
464
- console.debug(response_6);
465
- throw response_6;
392
+ response_5 = _c.sent();
393
+ console.debug(response_5);
394
+ throw response_5;
466
395
  case 7: return [2 /*return*/];
467
396
  }
468
397
  });
@@ -488,7 +417,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
488
417
  */
489
418
  ManageUserRestrictionApi.prototype.deleteUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
490
419
  return __awaiter(this, void 0, void 0, function () {
491
- var queryParameters, headerParameters, token, tokenString, response, response_7;
420
+ var queryParameters, headerParameters, token, tokenString, response, response_6;
492
421
  return __generator(this, function (_a) {
493
422
  switch (_a.label) {
494
423
  case 0:
@@ -521,9 +450,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
521
450
  response = _a.sent();
522
451
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
523
452
  case 4:
524
- response_7 = _a.sent();
525
- console.debug(response_7);
526
- throw response_7;
453
+ response_6 = _a.sent();
454
+ console.debug(response_6);
455
+ throw response_6;
527
456
  case 5: return [2 /*return*/];
528
457
  }
529
458
  });
@@ -544,75 +473,6 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
544
473
  });
545
474
  });
546
475
  };
547
- /**
548
- * Delete this product type from restricted user product types
549
- */
550
- ManageUserRestrictionApi.prototype.deleteUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
551
- return __awaiter(this, void 0, void 0, function () {
552
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_8;
553
- return __generator(this, function (_c) {
554
- switch (_c.label) {
555
- case 0:
556
- if (requestParameters['userId'] == null) {
557
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserRestrictedProductType().');
558
- }
559
- if (requestParameters['productTypeId'] == null) {
560
- throw new runtime.RequiredError('productTypeId', 'Required parameter "productTypeId" was null or undefined when calling deleteUserRestrictedProductType().');
561
- }
562
- queryParameters = {};
563
- headerParameters = {};
564
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
565
- _a = headerParameters;
566
- _b = "x-api-key";
567
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
568
- case 1:
569
- _a[_b] = _c.sent(); // apiKeyAuth authentication
570
- _c.label = 2;
571
- case 2:
572
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
573
- token = this.configuration.accessToken;
574
- return [4 /*yield*/, token("bearerAuth", [])];
575
- case 3:
576
- tokenString = _c.sent();
577
- if (tokenString) {
578
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
579
- }
580
- _c.label = 4;
581
- case 4:
582
- _c.trys.push([4, 6, , 7]);
583
- return [4 /*yield*/, this.request({
584
- path: "/users/{userId}/restricted-product-types/{productTypeId}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("productTypeId", "}"), encodeURIComponent(String(requestParameters['productTypeId']))),
585
- method: 'DELETE',
586
- headers: headerParameters,
587
- query: queryParameters,
588
- }, initOverrides)];
589
- case 5:
590
- response = _c.sent();
591
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
592
- case 6:
593
- response_8 = _c.sent();
594
- console.debug(response_8);
595
- throw response_8;
596
- case 7: return [2 /*return*/];
597
- }
598
- });
599
- });
600
- };
601
- /**
602
- * Delete this product type from restricted user product types
603
- */
604
- ManageUserRestrictionApi.prototype.deleteUserRestrictedProductType = function (requestParameters, initOverrides) {
605
- return __awaiter(this, void 0, void 0, function () {
606
- return __generator(this, function (_a) {
607
- switch (_a.label) {
608
- case 0: return [4 /*yield*/, this.deleteUserRestrictedProductTypeRaw(requestParameters, initOverrides)];
609
- case 1:
610
- _a.sent();
611
- return [2 /*return*/];
612
- }
613
- });
614
- });
615
- };
616
476
  return ManageUserRestrictionApi;
617
477
  }(runtime.BaseAPI));
618
478
  exports.ManageUserRestrictionApi = ManageUserRestrictionApi;
@@ -10,16 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { NotificationTypeLink, ProductTypeLink, UserFeature } from '../models/index';
13
+ import type { NotificationTypeLink, UserFeature } from '../models/index';
14
14
  export interface GetUserRestrictedFeaturesRequest {
15
15
  userId: number;
16
16
  }
17
17
  export interface GetUserRestrictedNotificationTypesRequest {
18
18
  userId: number;
19
19
  }
20
- export interface GetUserRestrictedProductTypesRequest {
21
- userId: number;
22
- }
23
20
  /**
24
21
  *
25
22
  */
@@ -48,12 +45,4 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
48
45
  * Get that will not be pushed outside the system (eg. mail)
49
46
  */
50
47
  getUserRestrictedNotificationTypes(requestParameters: GetUserRestrictedNotificationTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NotificationTypeLink> | runtime.BlobWithMeta>;
51
- /**
52
- * Get user restricted product types
53
- */
54
- getUserRestrictedProductTypesRaw(requestParameters: GetUserRestrictedProductTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProductTypeLink> | runtime.BlobWithMeta>>;
55
- /**
56
- * Get user restricted product types
57
- */
58
- getUserRestrictedProductTypes(requestParameters: GetUserRestrictedProductTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductTypeLink> | runtime.BlobWithMeta>;
59
48
  }
@@ -309,85 +309,6 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
309
309
  });
310
310
  });
311
311
  };
312
- /**
313
- * Get user restricted product types
314
- */
315
- SearchUserRestrictionApi.prototype.getUserRestrictedProductTypesRaw = function (requestParameters, 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
- if (requestParameters['userId'] == null) {
322
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserRestrictedProductTypes().');
323
- }
324
- queryParameters = {};
325
- headerParameters = {};
326
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
327
- _a = headerParameters;
328
- _b = "x-api-key";
329
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
330
- case 1:
331
- _a[_b] = _c.sent(); // apiKeyAuth authentication
332
- _c.label = 2;
333
- case 2:
334
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
335
- token = this.configuration.accessToken;
336
- return [4 /*yield*/, token("bearerAuth", [])];
337
- case 3:
338
- tokenString = _c.sent();
339
- if (tokenString) {
340
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
341
- }
342
- _c.label = 4;
343
- case 4:
344
- _c.trys.push([4, 6, , 7]);
345
- return [4 /*yield*/, this.request({
346
- path: "/users/{userId}/restricted-product-types".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
347
- method: 'GET',
348
- headers: headerParameters,
349
- query: queryParameters,
350
- }, initOverrides)];
351
- case 5:
352
- response = _c.sent();
353
- contentType = response.headers.get("content-type");
354
- if (contentType && contentType.indexOf("application/json") !== -1) {
355
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ProductTypeLinkFromJSON); })];
356
- }
357
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
358
- return [2 /*return*/, new runtime.TextApiResponse(response)];
359
- }
360
- else {
361
- // TODO : Better handling of others application types
362
- return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
363
- }
364
- return [3 /*break*/, 7];
365
- case 6:
366
- response_4 = _c.sent();
367
- console.debug(response_4);
368
- throw response_4;
369
- case 7: return [2 /*return*/];
370
- }
371
- });
372
- });
373
- };
374
- /**
375
- * Get user restricted product types
376
- */
377
- SearchUserRestrictionApi.prototype.getUserRestrictedProductTypes = function (requestParameters, initOverrides) {
378
- return __awaiter(this, void 0, void 0, function () {
379
- var response;
380
- return __generator(this, function (_a) {
381
- switch (_a.label) {
382
- case 0: return [4 /*yield*/, this.getUserRestrictedProductTypesRaw(requestParameters, initOverrides)];
383
- case 1:
384
- response = _a.sent();
385
- return [4 /*yield*/, response.value()];
386
- case 2: return [2 /*return*/, _a.sent()];
387
- }
388
- });
389
- });
390
- };
391
312
  return SearchUserRestrictionApi;
392
313
  }(runtime.BaseAPI));
393
314
  exports.SearchUserRestrictionApi = SearchUserRestrictionApi;
@@ -0,0 +1,28 @@
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
+ /**
13
+ *
14
+ * @export
15
+ */
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;
26
+ export declare function ProductTypeFromJSON(json: any): ProductType;
27
+ export declare function ProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductType;
28
+ export declare function ProductTypeToJSON(value?: ProductType | null): any;
@@ -0,0 +1,51 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = exports.ProductType = void 0;
17
+ /**
18
+ *
19
+ * @export
20
+ */
21
+ exports.ProductType = {
22
+ PARAPHARMACIE: 'PARAPHARMACIE',
23
+ DM: 'DM',
24
+ MEDICAMENT: 'MEDICAMENT',
25
+ HOMEOPATHIE: 'HOMEOPATHIE',
26
+ VETERINAIRE: 'VETERINAIRE',
27
+ COMPLEMENT: 'COMPLEMENT'
28
+ };
29
+ 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;
38
+ }
39
+ exports.instanceOfProductType = instanceOfProductType;
40
+ function ProductTypeFromJSON(json) {
41
+ return ProductTypeFromJSONTyped(json, false);
42
+ }
43
+ exports.ProductTypeFromJSON = ProductTypeFromJSON;
44
+ function ProductTypeFromJSONTyped(json, ignoreDiscriminator) {
45
+ return json;
46
+ }
47
+ exports.ProductTypeFromJSONTyped = ProductTypeFromJSONTyped;
48
+ function ProductTypeToJSON(value) {
49
+ return value;
50
+ }
51
+ exports.ProductTypeToJSON = ProductTypeToJSON;
@@ -0,0 +1,46 @@
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 type { ProductType } from './ProductType';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface RestrictedProductType
17
+ */
18
+ export interface RestrictedProductType {
19
+ /**
20
+ *
21
+ * @type {Array<string>}
22
+ * @memberof RestrictedProductType
23
+ */
24
+ actions?: Array<RestrictedProductTypeActionsEnum>;
25
+ /**
26
+ *
27
+ * @type {ProductType}
28
+ * @memberof RestrictedProductType
29
+ */
30
+ target?: ProductType;
31
+ }
32
+ /**
33
+ * @export
34
+ */
35
+ export declare const RestrictedProductTypeActionsEnum: {
36
+ readonly BUY: "BUY";
37
+ readonly SELL: "SELL";
38
+ };
39
+ export declare type RestrictedProductTypeActionsEnum = typeof RestrictedProductTypeActionsEnum[keyof typeof RestrictedProductTypeActionsEnum];
40
+ /**
41
+ * Check if a given object implements the RestrictedProductType interface.
42
+ */
43
+ export declare function instanceOfRestrictedProductType(value: object): value is RestrictedProductType;
44
+ export declare function RestrictedProductTypeFromJSON(json: any): RestrictedProductType;
45
+ export declare function RestrictedProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): RestrictedProductType;
46
+ export declare function RestrictedProductTypeToJSON(value?: RestrictedProductType | null): any;