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

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.16498787815",
3
+ "version": "2.13.6-LDS-4612-gestion-froid-par-labo.16499332516",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -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, UserRestrictedStorageTypeCreationParameter } from '../models/index';
13
+ import type { NotificationTypeId, ProductStorageType, UserRestrictedFeatureCreationParameter, UserRestrictedNotificationTypeCreationParameter, UserRestrictedProductTypeCreationParameter, UserRestrictedStorageTypeCreationParameter } from '../models/index';
14
14
  export interface CreateCurrentUserRestrictedNotificationTypeRequest {
15
15
  userRestrictedNotificationTypeCreationParameter: UserRestrictedNotificationTypeCreationParameter;
16
16
  }
@@ -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
+ storageType: ProductStorageType;
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['storageType'] == null) {
700
+ throw new runtime.RequiredError('storageType', 'Required parameter "storageType" 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/{storageType}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("storageType", "}"), encodeURIComponent(String(requestParameters['storageType']))),
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;
@@ -20,7 +20,7 @@ export interface GetUserRestrictedNotificationTypesRequest {
20
20
  export interface GetUserRestrictedProductTypesRequest {
21
21
  userId: number;
22
22
  }
23
- export interface GetUserRestrictedStorageProductTypesRequest {
23
+ export interface GetUserRestrictedStorageTypesRequest {
24
24
  userId: number;
25
25
  }
26
26
  /**
@@ -62,9 +62,9 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
62
62
  /**
63
63
  * Get user restricted storage product types
64
64
  */
65
- getUserRestrictedStorageProductTypesRaw(requestParameters: GetUserRestrictedStorageProductTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProductStorageType> | runtime.BlobWithMeta>>;
65
+ getUserRestrictedStorageTypesRaw(requestParameters: GetUserRestrictedStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProductStorageType> | runtime.BlobWithMeta>>;
66
66
  /**
67
67
  * Get user restricted storage product types
68
68
  */
69
- getUserRestrictedStorageProductTypes(requestParameters: GetUserRestrictedStorageProductTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductStorageType> | runtime.BlobWithMeta>;
69
+ getUserRestrictedStorageTypes(requestParameters: GetUserRestrictedStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductStorageType> | runtime.BlobWithMeta>;
70
70
  }
@@ -391,14 +391,14 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
391
391
  /**
392
392
  * Get user restricted storage product types
393
393
  */
394
- SearchUserRestrictionApi.prototype.getUserRestrictedStorageProductTypesRaw = function (requestParameters, initOverrides) {
394
+ SearchUserRestrictionApi.prototype.getUserRestrictedStorageTypesRaw = function (requestParameters, initOverrides) {
395
395
  return __awaiter(this, void 0, void 0, function () {
396
396
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_5;
397
397
  return __generator(this, function (_c) {
398
398
  switch (_c.label) {
399
399
  case 0:
400
400
  if (requestParameters['userId'] == null) {
401
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserRestrictedStorageProductTypes().');
401
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserRestrictedStorageTypes().');
402
402
  }
403
403
  queryParameters = {};
404
404
  headerParameters = {};
@@ -453,12 +453,12 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
453
453
  /**
454
454
  * Get user restricted storage product types
455
455
  */
456
- SearchUserRestrictionApi.prototype.getUserRestrictedStorageProductTypes = function (requestParameters, initOverrides) {
456
+ SearchUserRestrictionApi.prototype.getUserRestrictedStorageTypes = function (requestParameters, initOverrides) {
457
457
  return __awaiter(this, void 0, void 0, function () {
458
458
  var response;
459
459
  return __generator(this, function (_a) {
460
460
  switch (_a.label) {
461
- case 0: return [4 /*yield*/, this.getUserRestrictedStorageProductTypesRaw(requestParameters, initOverrides)];
461
+ case 0: return [4 /*yield*/, this.getUserRestrictedStorageTypesRaw(requestParameters, initOverrides)];
462
462
  case 1:
463
463
  response = _a.sent();
464
464
  return [4 /*yield*/, response.value()];