@lcdp/api-react-rest-client 2.13.6-LDS-4612-gestion-froid-par-labo.16499023803 → 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
|
@@ -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;
|