@lcdp/api-react-rest-client 2.13.6-LDS-4612-gestion-froid-par-labo.16499023803 → 2.13.6-LDS-4612-gestion-froid-par-labo.16500381220

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.13.6-LDS-4612-gestion-froid-par-labo.16499023803",
3
+ "version": "2.13.6-LDS-4612-gestion-froid-par-labo.16500381220",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -45,6 +45,10 @@ export interface DeleteUserRestrictedProductTypeRequest {
45
45
  userId: number;
46
46
  productTypeId: string;
47
47
  }
48
+ export interface DeleteUserRestrictedStorageTypeRequest {
49
+ userId: number;
50
+ storageTypeId: string;
51
+ }
48
52
  /**
49
53
  *
50
54
  */
@@ -121,4 +125,12 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
121
125
  * Delete this product type from restricted user product types
122
126
  */
123
127
  deleteUserRestrictedProductType(requestParameters: DeleteUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
128
+ /**
129
+ * Delete this storage type from restricted user storage types
130
+ */
131
+ deleteUserRestrictedStorageTypeRaw(requestParameters: DeleteUserRestrictedStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
132
+ /**
133
+ * Delete this storage type from restricted user storage types
134
+ */
135
+ deleteUserRestrictedStorageType(requestParameters: DeleteUserRestrictedStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
124
136
  }
@@ -684,6 +684,75 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
684
684
  });
685
685
  });
686
686
  };
687
+ /**
688
+ * Delete this storage type from restricted user storage types
689
+ */
690
+ ManageUserRestrictionApi.prototype.deleteUserRestrictedStorageTypeRaw = function (requestParameters, initOverrides) {
691
+ return __awaiter(this, void 0, void 0, function () {
692
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_10;
693
+ return __generator(this, function (_c) {
694
+ switch (_c.label) {
695
+ case 0:
696
+ if (requestParameters['userId'] == null) {
697
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserRestrictedStorageType().');
698
+ }
699
+ if (requestParameters['storageTypeId'] == null) {
700
+ throw new runtime.RequiredError('storageTypeId', 'Required parameter "storageTypeId" was null or undefined when calling deleteUserRestrictedStorageType().');
701
+ }
702
+ queryParameters = {};
703
+ headerParameters = {};
704
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
705
+ _a = headerParameters;
706
+ _b = "x-api-key";
707
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
708
+ case 1:
709
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
710
+ _c.label = 2;
711
+ case 2:
712
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
713
+ token = this.configuration.accessToken;
714
+ return [4 /*yield*/, token("bearerAuth", [])];
715
+ case 3:
716
+ tokenString = _c.sent();
717
+ if (tokenString) {
718
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
719
+ }
720
+ _c.label = 4;
721
+ case 4:
722
+ _c.trys.push([4, 6, , 7]);
723
+ return [4 /*yield*/, this.request({
724
+ path: "/users/{userId}/restricted-storage-types/{storageTypeId}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("storageTypeId", "}"), encodeURIComponent(String(requestParameters['storageTypeId']))),
725
+ method: 'DELETE',
726
+ headers: headerParameters,
727
+ query: queryParameters,
728
+ }, initOverrides)];
729
+ case 5:
730
+ response = _c.sent();
731
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
732
+ case 6:
733
+ response_10 = _c.sent();
734
+ console.debug(response_10);
735
+ throw response_10;
736
+ case 7: return [2 /*return*/];
737
+ }
738
+ });
739
+ });
740
+ };
741
+ /**
742
+ * Delete this storage type from restricted user storage types
743
+ */
744
+ ManageUserRestrictionApi.prototype.deleteUserRestrictedStorageType = function (requestParameters, initOverrides) {
745
+ return __awaiter(this, void 0, void 0, function () {
746
+ return __generator(this, function (_a) {
747
+ switch (_a.label) {
748
+ case 0: return [4 /*yield*/, this.deleteUserRestrictedStorageTypeRaw(requestParameters, initOverrides)];
749
+ case 1:
750
+ _a.sent();
751
+ return [2 /*return*/];
752
+ }
753
+ });
754
+ });
755
+ };
687
756
  return ManageUserRestrictionApi;
688
757
  }(runtime.BaseAPI));
689
758
  exports.ManageUserRestrictionApi = ManageUserRestrictionApi;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { NotificationTypeLink, ProductStorageType, ProductTypeLink, UserFeature } from '../models/index';
13
+ import type { NotificationTypeLink, ProductTypeLink, StorageTypeLink, UserFeature } from '../models/index';
14
14
  export interface GetUserRestrictedFeaturesRequest {
15
15
  userId: number;
16
16
  }
@@ -62,9 +62,9 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
62
62
  /**
63
63
  * Get user restricted storage product types
64
64
  */
65
- getUserRestrictedStorageTypesRaw(requestParameters: GetUserRestrictedStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProductStorageType> | runtime.BlobWithMeta>>;
65
+ getUserRestrictedStorageTypesRaw(requestParameters: GetUserRestrictedStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StorageTypeLink> | runtime.BlobWithMeta>>;
66
66
  /**
67
67
  * Get user restricted storage product types
68
68
  */
69
- getUserRestrictedStorageTypes(requestParameters: GetUserRestrictedStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductStorageType> | runtime.BlobWithMeta>;
69
+ getUserRestrictedStorageTypes(requestParameters: GetUserRestrictedStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StorageTypeLink> | runtime.BlobWithMeta>;
70
70
  }
@@ -431,7 +431,7 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
431
431
  response = _c.sent();
432
432
  contentType = response.headers.get("content-type");
433
433
  if (contentType && contentType.indexOf("application/json") !== -1) {
434
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ProductStorageTypeFromJSON); })];
434
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.StorageTypeLinkFromJSON); })];
435
435
  }
436
436
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
437
437
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -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 StorageTypeLink
16
+ */
17
+ export interface StorageTypeLink {
18
+ /**
19
+ * Any URL that is using http or https protocol
20
+ * @type {string}
21
+ * @memberof StorageTypeLink
22
+ */
23
+ href: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof StorageTypeLink
28
+ */
29
+ id?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof StorageTypeLink
34
+ */
35
+ name?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the StorageTypeLink interface.
39
+ */
40
+ export declare function instanceOfStorageTypeLink(value: object): value is StorageTypeLink;
41
+ export declare function StorageTypeLinkFromJSON(json: any): StorageTypeLink;
42
+ export declare function StorageTypeLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): StorageTypeLink;
43
+ export declare function StorageTypeLinkToJSON(value?: StorageTypeLink | 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.StorageTypeLinkToJSON = exports.StorageTypeLinkFromJSONTyped = exports.StorageTypeLinkFromJSON = exports.instanceOfStorageTypeLink = void 0;
17
+ /**
18
+ * Check if a given object implements the StorageTypeLink interface.
19
+ */
20
+ function instanceOfStorageTypeLink(value) {
21
+ if (!('href' in value) || value['href'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ exports.instanceOfStorageTypeLink = instanceOfStorageTypeLink;
26
+ function StorageTypeLinkFromJSON(json) {
27
+ return StorageTypeLinkFromJSONTyped(json, false);
28
+ }
29
+ exports.StorageTypeLinkFromJSON = StorageTypeLinkFromJSON;
30
+ function StorageTypeLinkFromJSONTyped(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.StorageTypeLinkFromJSONTyped = StorageTypeLinkFromJSONTyped;
41
+ function StorageTypeLinkToJSON(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.StorageTypeLinkToJSON = StorageTypeLinkToJSON;
@@ -9,7 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { ProductStorageType } from './ProductStorageType';
13
12
  /**
14
13
  *
15
14
  * @export
@@ -17,11 +16,11 @@ import type { ProductStorageType } from './ProductStorageType';
17
16
  */
18
17
  export interface UserRestrictedStorageTypeCreationParameter {
19
18
  /**
20
- *
21
- * @type {ProductStorageType}
19
+ * Storage type id
20
+ * @type {string}
22
21
  * @memberof UserRestrictedStorageTypeCreationParameter
23
22
  */
24
- storageType: ProductStorageType;
23
+ storageTypeId?: string;
25
24
  }
26
25
  /**
27
26
  * Check if a given object implements the UserRestrictedStorageTypeCreationParameter interface.
@@ -14,13 +14,10 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.UserRestrictedStorageTypeCreationParameterToJSON = exports.UserRestrictedStorageTypeCreationParameterFromJSONTyped = exports.UserRestrictedStorageTypeCreationParameterFromJSON = exports.instanceOfUserRestrictedStorageTypeCreationParameter = void 0;
17
- var ProductStorageType_1 = require("./ProductStorageType");
18
17
  /**
19
18
  * Check if a given object implements the UserRestrictedStorageTypeCreationParameter interface.
20
19
  */
21
20
  function instanceOfUserRestrictedStorageTypeCreationParameter(value) {
22
- if (!('storageType' in value) || value['storageType'] === undefined)
23
- return false;
24
21
  return true;
25
22
  }
26
23
  exports.instanceOfUserRestrictedStorageTypeCreationParameter = instanceOfUserRestrictedStorageTypeCreationParameter;
@@ -33,7 +30,7 @@ function UserRestrictedStorageTypeCreationParameterFromJSONTyped(json, ignoreDis
33
30
  return json;
34
31
  }
35
32
  return {
36
- 'storageType': (json['storageType'] === null || json['storageType'] === undefined) ? json['storageType'] : (0, ProductStorageType_1.ProductStorageTypeFromJSON)(json['storageType']),
33
+ 'storageTypeId': json['storageTypeId'],
37
34
  };
38
35
  }
39
36
  exports.UserRestrictedStorageTypeCreationParameterFromJSONTyped = UserRestrictedStorageTypeCreationParameterFromJSONTyped;
@@ -42,7 +39,7 @@ function UserRestrictedStorageTypeCreationParameterToJSON(value) {
42
39
  return value;
43
40
  }
44
41
  return {
45
- 'storageType': (0, ProductStorageType_1.ProductStorageTypeToJSON)(value['storageType']),
42
+ 'storageTypeId': value['storageTypeId'],
46
43
  };
47
44
  }
48
45
  exports.UserRestrictedStorageTypeCreationParameterToJSON = UserRestrictedStorageTypeCreationParameterToJSON;
@@ -11,11 +11,11 @@ export * from './PaginatedUsers';
11
11
  export * from './PagingMetadata';
12
12
  export * from './PasswordResetCompletionParameters';
13
13
  export * from './PasswordResetCreationParameters';
14
- export * from './ProductStorageType';
15
14
  export * from './ProductTypeLink';
16
15
  export * from './RestError';
17
16
  export * from './ScaEnrollmentStatus';
18
17
  export * from './SomeonePasswordUpdateParameters';
18
+ export * from './StorageTypeLink';
19
19
  export * from './ThreadLink';
20
20
  export * from './Transport';
21
21
  export * from './User';
@@ -29,11 +29,11 @@ __exportStar(require("./PaginatedUsers"), exports);
29
29
  __exportStar(require("./PagingMetadata"), exports);
30
30
  __exportStar(require("./PasswordResetCompletionParameters"), exports);
31
31
  __exportStar(require("./PasswordResetCreationParameters"), exports);
32
- __exportStar(require("./ProductStorageType"), exports);
33
32
  __exportStar(require("./ProductTypeLink"), exports);
34
33
  __exportStar(require("./RestError"), exports);
35
34
  __exportStar(require("./ScaEnrollmentStatus"), exports);
36
35
  __exportStar(require("./SomeonePasswordUpdateParameters"), exports);
36
+ __exportStar(require("./StorageTypeLink"), exports);
37
37
  __exportStar(require("./ThreadLink"), exports);
38
38
  __exportStar(require("./Transport"), exports);
39
39
  __exportStar(require("./User"), exports);
@@ -1,26 +0,0 @@
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 ProductStorageType: {
17
- readonly FREE: "FREE";
18
- readonly FRIDGE: "FRIDGE";
19
- readonly FREEZER: "FREEZER";
20
- readonly FRESH: "FRESH";
21
- };
22
- export declare type ProductStorageType = typeof ProductStorageType[keyof typeof ProductStorageType];
23
- export declare function instanceOfProductStorageType(value: any): boolean;
24
- export declare function ProductStorageTypeFromJSON(json: any): ProductStorageType;
25
- export declare function ProductStorageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductStorageType;
26
- export declare function ProductStorageTypeToJSON(value?: ProductStorageType | null): any;
@@ -1,49 +0,0 @@
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.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = exports.ProductStorageType = void 0;
17
- /**
18
- *
19
- * @export
20
- */
21
- exports.ProductStorageType = {
22
- FREE: 'FREE',
23
- FRIDGE: 'FRIDGE',
24
- FREEZER: 'FREEZER',
25
- FRESH: 'FRESH'
26
- };
27
- function instanceOfProductStorageType(value) {
28
- for (var key in exports.ProductStorageType) {
29
- if (Object.prototype.hasOwnProperty.call(exports.ProductStorageType, key)) {
30
- if (exports.ProductStorageType[key] === value) {
31
- return true;
32
- }
33
- }
34
- }
35
- return false;
36
- }
37
- exports.instanceOfProductStorageType = instanceOfProductStorageType;
38
- function ProductStorageTypeFromJSON(json) {
39
- return ProductStorageTypeFromJSONTyped(json, false);
40
- }
41
- exports.ProductStorageTypeFromJSON = ProductStorageTypeFromJSON;
42
- function ProductStorageTypeFromJSONTyped(json, ignoreDiscriminator) {
43
- return json;
44
- }
45
- exports.ProductStorageTypeFromJSONTyped = ProductStorageTypeFromJSONTyped;
46
- function ProductStorageTypeToJSON(value) {
47
- return value;
48
- }
49
- exports.ProductStorageTypeToJSON = ProductStorageTypeToJSON;