@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
@@ -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 } from '../models/index';
13
+ import type { NotificationTypeId, UserRestrictedFeatureCreationParameter, UserRestrictedNotificationTypeCreationParameter, UserRestrictedProductTypeCreationParameter } from '../models/index';
14
14
  export interface CreateCurrentUserRestrictedNotificationTypeRequest {
15
15
  userRestrictedNotificationTypeCreationParameter: UserRestrictedNotificationTypeCreationParameter;
16
16
  }
@@ -22,6 +22,10 @@ export interface CreateUserRestrictedNotificationTypeRequest {
22
22
  userId: number;
23
23
  userRestrictedNotificationTypeCreationParameter: UserRestrictedNotificationTypeCreationParameter;
24
24
  }
25
+ export interface CreateUserRestrictedProductTypeRequest {
26
+ userId: number;
27
+ userRestrictedProductTypeCreationParameter: UserRestrictedProductTypeCreationParameter;
28
+ }
25
29
  export interface DeleteCurrentUserRestrictedNotificationTypeRequest {
26
30
  notificationTypeId: NotificationTypeId;
27
31
  }
@@ -33,6 +37,10 @@ export interface DeleteUserRestrictedNotificationTypeRequest {
33
37
  userId: number;
34
38
  notificationTypeId: NotificationTypeId;
35
39
  }
40
+ export interface DeleteUserRestrictedProductTypeRequest {
41
+ userId: number;
42
+ productTypeId: string;
43
+ }
36
44
  /**
37
45
  *
38
46
  */
@@ -61,6 +69,14 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
61
69
  * Add this notification type in restricted user notification types
62
70
  */
63
71
  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>;
64
80
  /**
65
81
  * Delete this notification type from restricted user notification types
66
82
  */
@@ -85,4 +101,12 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
85
101
  * Delete this notification type from restricted user notification types
86
102
  */
87
103
  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>;
88
112
  }
@@ -285,12 +285,83 @@ 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
+ };
288
359
  /**
289
360
  * Delete this notification type from restricted user notification types
290
361
  */
291
362
  ManageUserRestrictionApi.prototype.deleteCurrentUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
292
363
  return __awaiter(this, void 0, void 0, function () {
293
- var queryParameters, headerParameters, token, tokenString, response, response_4;
364
+ var queryParameters, headerParameters, token, tokenString, response, response_5;
294
365
  return __generator(this, function (_a) {
295
366
  switch (_a.label) {
296
367
  case 0:
@@ -320,9 +391,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
320
391
  response = _a.sent();
321
392
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
322
393
  case 4:
323
- response_4 = _a.sent();
324
- console.debug(response_4);
325
- throw response_4;
394
+ response_5 = _a.sent();
395
+ console.debug(response_5);
396
+ throw response_5;
326
397
  case 5: return [2 /*return*/];
327
398
  }
328
399
  });
@@ -348,7 +419,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
348
419
  */
349
420
  ManageUserRestrictionApi.prototype.deleteUserRestrictedFeatureRaw = function (requestParameters, initOverrides) {
350
421
  return __awaiter(this, void 0, void 0, function () {
351
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_5;
422
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_6;
352
423
  return __generator(this, function (_c) {
353
424
  switch (_c.label) {
354
425
  case 0:
@@ -389,9 +460,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
389
460
  response = _c.sent();
390
461
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
391
462
  case 6:
392
- response_5 = _c.sent();
393
- console.debug(response_5);
394
- throw response_5;
463
+ response_6 = _c.sent();
464
+ console.debug(response_6);
465
+ throw response_6;
395
466
  case 7: return [2 /*return*/];
396
467
  }
397
468
  });
@@ -417,7 +488,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
417
488
  */
418
489
  ManageUserRestrictionApi.prototype.deleteUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
419
490
  return __awaiter(this, void 0, void 0, function () {
420
- var queryParameters, headerParameters, token, tokenString, response, response_6;
491
+ var queryParameters, headerParameters, token, tokenString, response, response_7;
421
492
  return __generator(this, function (_a) {
422
493
  switch (_a.label) {
423
494
  case 0:
@@ -450,9 +521,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
450
521
  response = _a.sent();
451
522
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
452
523
  case 4:
453
- response_6 = _a.sent();
454
- console.debug(response_6);
455
- throw response_6;
524
+ response_7 = _a.sent();
525
+ console.debug(response_7);
526
+ throw response_7;
456
527
  case 5: return [2 /*return*/];
457
528
  }
458
529
  });
@@ -473,6 +544,75 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
473
544
  });
474
545
  });
475
546
  };
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
+ };
476
616
  return ManageUserRestrictionApi;
477
617
  }(runtime.BaseAPI));
478
618
  exports.ManageUserRestrictionApi = ManageUserRestrictionApi;
@@ -10,13 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { NotificationTypeLink, UserFeature } from '../models/index';
13
+ import type { NotificationTypeLink, ProductTypeLink, 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
+ }
20
23
  /**
21
24
  *
22
25
  */
@@ -45,4 +48,12 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
45
48
  * Get that will not be pushed outside the system (eg. mail)
46
49
  */
47
50
  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>;
48
59
  }
@@ -309,6 +309,85 @@ 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
+ };
312
391
  return SearchUserRestrictionApi;
313
392
  }(runtime.BaseAPI));
314
393
  exports.SearchUserRestrictionApi = SearchUserRestrictionApi;
@@ -0,0 +1,43 @@
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
+ * @interface ProductTypeLink
16
+ */
17
+ export interface ProductTypeLink {
18
+ /**
19
+ * Any URL that is using http or https protocol
20
+ * @type {string}
21
+ * @memberof ProductTypeLink
22
+ */
23
+ href: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ProductTypeLink
28
+ */
29
+ id?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ProductTypeLink
34
+ */
35
+ name?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the ProductTypeLink interface.
39
+ */
40
+ export declare function instanceOfProductTypeLink(value: object): value is ProductTypeLink;
41
+ export declare function ProductTypeLinkFromJSON(json: any): ProductTypeLink;
42
+ export declare function ProductTypeLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductTypeLink;
43
+ export declare function ProductTypeLinkToJSON(value?: ProductTypeLink | 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.ProductTypeLinkToJSON = exports.ProductTypeLinkFromJSONTyped = exports.ProductTypeLinkFromJSON = exports.instanceOfProductTypeLink = void 0;
17
+ /**
18
+ * Check if a given object implements the ProductTypeLink interface.
19
+ */
20
+ function instanceOfProductTypeLink(value) {
21
+ if (!('href' in value) || value['href'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ exports.instanceOfProductTypeLink = instanceOfProductTypeLink;
26
+ function ProductTypeLinkFromJSON(json) {
27
+ return ProductTypeLinkFromJSONTyped(json, false);
28
+ }
29
+ exports.ProductTypeLinkFromJSON = ProductTypeLinkFromJSON;
30
+ function ProductTypeLinkFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'href': json['href'],
36
+ 'id': json['id'],
37
+ 'name': json['name'],
38
+ };
39
+ }
40
+ exports.ProductTypeLinkFromJSONTyped = ProductTypeLinkFromJSONTyped;
41
+ function ProductTypeLinkToJSON(value) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'href': value['href'],
47
+ 'id': value['id'],
48
+ 'name': value['name'],
49
+ };
50
+ }
51
+ exports.ProductTypeLinkToJSON = ProductTypeLinkToJSON;
@@ -15,7 +15,6 @@ import type { Address } from './Address';
15
15
  import type { UserStatisticLink } from './UserStatisticLink';
16
16
  import type { UserMangopayTarget } from './UserMangopayTarget';
17
17
  import type { UserDelegatedServices } from './UserDelegatedServices';
18
- import type { RestrictedProductType } from './RestrictedProductType';
19
18
  import type { HttpLink } from './HttpLink';
20
19
  import type { Gender } from './Gender';
21
20
  import type { ScaEnrollmentStatus } from './ScaEnrollmentStatus';
@@ -268,10 +267,10 @@ export interface User {
268
267
  restrictedFeatures?: HttpLink;
269
268
  /**
270
269
  *
271
- * @type {Array<RestrictedProductType>}
270
+ * @type {HttpLink}
272
271
  * @memberof User
273
272
  */
274
- restrictedProductTypes?: Array<RestrictedProductType>;
273
+ restrictedProductTypes?: HttpLink;
275
274
  /**
276
275
  *
277
276
  * @type {Array<RestrictedProductStorageType>}
@@ -21,7 +21,6 @@ var Address_1 = require("./Address");
21
21
  var UserStatisticLink_1 = require("./UserStatisticLink");
22
22
  var UserMangopayTarget_1 = require("./UserMangopayTarget");
23
23
  var UserDelegatedServices_1 = require("./UserDelegatedServices");
24
- var RestrictedProductType_1 = require("./RestrictedProductType");
25
24
  var HttpLink_1 = require("./HttpLink");
26
25
  var Gender_1 = require("./Gender");
27
26
  var ScaEnrollmentStatus_1 = require("./ScaEnrollmentStatus");
@@ -106,7 +105,7 @@ function UserFromJSONTyped(json, ignoreDiscriminator) {
106
105
  'threads': (json['threads'] === null || json['threads'] === undefined) ? json['threads'] : (0, UserThreads_1.UserThreadsFromJSON)(json['threads']),
107
106
  'rules': (json['rules'] === null || json['rules'] === undefined) ? json['rules'] : (0, HttpLink_1.HttpLinkFromJSON)(json['rules']),
108
107
  'restrictedFeatures': (json['restrictedFeatures'] === null || json['restrictedFeatures'] === undefined) ? json['restrictedFeatures'] : (0, HttpLink_1.HttpLinkFromJSON)(json['restrictedFeatures']),
109
- 'restrictedProductTypes': (json['restrictedProductTypes'] === null || json['restrictedProductTypes'] === undefined) ? json['restrictedProductTypes'] : json['restrictedProductTypes'].map(RestrictedProductType_1.RestrictedProductTypeFromJSON),
108
+ 'restrictedProductTypes': (json['restrictedProductTypes'] === null || json['restrictedProductTypes'] === undefined) ? json['restrictedProductTypes'] : (0, HttpLink_1.HttpLinkFromJSON)(json['restrictedProductTypes']),
110
109
  'restrictedProductStorageTypes': (json['restrictedProductStorageTypes'] === null || json['restrictedProductStorageTypes'] === undefined) ? json['restrictedProductStorageTypes'] : json['restrictedProductStorageTypes'].map(RestrictedProductStorageType_1.RestrictedProductStorageTypeFromJSON),
111
110
  'restrictedNotificationTypes': (json['restrictedNotificationTypes'] === null || json['restrictedNotificationTypes'] === undefined) ? json['restrictedNotificationTypes'] : (0, HttpLink_1.HttpLinkFromJSON)(json['restrictedNotificationTypes']),
112
111
  'customCommissions': (json['customCommissions'] === null || json['customCommissions'] === undefined) ? json['customCommissions'] : (0, HttpLink_1.HttpLinkFromJSON)(json['customCommissions']),
@@ -167,7 +166,7 @@ function UserToJSON(value) {
167
166
  'threads': (0, UserThreads_1.UserThreadsToJSON)(value['threads']),
168
167
  'rules': (0, HttpLink_1.HttpLinkToJSON)(value['rules']),
169
168
  'restrictedFeatures': (0, HttpLink_1.HttpLinkToJSON)(value['restrictedFeatures']),
170
- 'restrictedProductTypes': (value['restrictedProductTypes'] === null || value['restrictedProductTypes'] === undefined) ? value['restrictedProductTypes'] : value['restrictedProductTypes'].map(RestrictedProductType_1.RestrictedProductTypeToJSON),
169
+ 'restrictedProductTypes': (0, HttpLink_1.HttpLinkToJSON)(value['restrictedProductTypes']),
171
170
  'restrictedProductStorageTypes': (value['restrictedProductStorageTypes'] === null || value['restrictedProductStorageTypes'] === undefined) ? value['restrictedProductStorageTypes'] : value['restrictedProductStorageTypes'].map(RestrictedProductStorageType_1.RestrictedProductStorageTypeToJSON),
172
171
  'restrictedNotificationTypes': (0, HttpLink_1.HttpLinkToJSON)(value['restrictedNotificationTypes']),
173
172
  'customCommissions': (0, HttpLink_1.HttpLinkToJSON)(value['customCommissions']),
@@ -0,0 +1,31 @@
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
+ * @interface UserRestrictedProductTypeCreationParameter
16
+ */
17
+ export interface UserRestrictedProductTypeCreationParameter {
18
+ /**
19
+ * Product type id
20
+ * @type {string}
21
+ * @memberof UserRestrictedProductTypeCreationParameter
22
+ */
23
+ productTypeId: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the UserRestrictedProductTypeCreationParameter interface.
27
+ */
28
+ export declare function instanceOfUserRestrictedProductTypeCreationParameter(value: object): value is UserRestrictedProductTypeCreationParameter;
29
+ export declare function UserRestrictedProductTypeCreationParameterFromJSON(json: any): UserRestrictedProductTypeCreationParameter;
30
+ export declare function UserRestrictedProductTypeCreationParameterFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserRestrictedProductTypeCreationParameter;
31
+ export declare function UserRestrictedProductTypeCreationParameterToJSON(value?: UserRestrictedProductTypeCreationParameter | null): any;
@@ -0,0 +1,47 @@
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.UserRestrictedProductTypeCreationParameterToJSON = exports.UserRestrictedProductTypeCreationParameterFromJSONTyped = exports.UserRestrictedProductTypeCreationParameterFromJSON = exports.instanceOfUserRestrictedProductTypeCreationParameter = void 0;
17
+ /**
18
+ * Check if a given object implements the UserRestrictedProductTypeCreationParameter interface.
19
+ */
20
+ function instanceOfUserRestrictedProductTypeCreationParameter(value) {
21
+ if (!('productTypeId' in value) || value['productTypeId'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ exports.instanceOfUserRestrictedProductTypeCreationParameter = instanceOfUserRestrictedProductTypeCreationParameter;
26
+ function UserRestrictedProductTypeCreationParameterFromJSON(json) {
27
+ return UserRestrictedProductTypeCreationParameterFromJSONTyped(json, false);
28
+ }
29
+ exports.UserRestrictedProductTypeCreationParameterFromJSON = UserRestrictedProductTypeCreationParameterFromJSON;
30
+ function UserRestrictedProductTypeCreationParameterFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'productTypeId': json['productTypeId'],
36
+ };
37
+ }
38
+ exports.UserRestrictedProductTypeCreationParameterFromJSONTyped = UserRestrictedProductTypeCreationParameterFromJSONTyped;
39
+ function UserRestrictedProductTypeCreationParameterToJSON(value) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'productTypeId': value['productTypeId'],
45
+ };
46
+ }
47
+ exports.UserRestrictedProductTypeCreationParameterToJSON = UserRestrictedProductTypeCreationParameterToJSON;
@@ -13,7 +13,6 @@ import type { UserCompany } from './UserCompany';
13
13
  import type { Address } from './Address';
14
14
  import type { UserRole } from './UserRole';
15
15
  import type { UserDelegatedServices } from './UserDelegatedServices';
16
- import type { RestrictedProductType } from './RestrictedProductType';
17
16
  import type { RestrictedProductStorageType } from './RestrictedProductStorageType';
18
17
  import type { UserJournalUpdateParameters } from './UserJournalUpdateParameters';
19
18
  import type { Gender } from './Gender';
@@ -137,12 +136,6 @@ export interface UserUpdateParameters {
137
136
  * @memberof UserUpdateParameters
138
137
  */
139
138
  delegatedServices?: UserDelegatedServices;
140
- /**
141
- *
142
- * @type {Array<RestrictedProductType>}
143
- * @memberof UserUpdateParameters
144
- */
145
- restrictedProductTypes?: Array<RestrictedProductType>;
146
139
  /**
147
140
  *
148
141
  * @type {Array<RestrictedProductStorageType>}