@lcdp/api-react-rest-client 2.13.9-LDS-4699-etape-1-no-more-archive-of-frid.17092299169 → 2.13.9-LDS-4699-etape-1-no-more-archive-of-frid.17125564147
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/catalog/src/models/ProductInsight.d.ts +4 -3
- package/catalog/src/models/ProductInsight.js +3 -2
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.d.ts +4 -3
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.js +3 -2
- package/catalog/src/models/ProductStorageType.d.ts +26 -0
- package/catalog/src/models/ProductStorageType.js +49 -0
- package/catalog/src/models/index.d.ts +1 -0
- package/catalog/src/models/index.js +1 -0
- package/magic-cart/src/models/ProductStorageType.d.ts +8 -19
- package/magic-cart/src/models/ProductStorageType.js +19 -17
- package/order/src/models/ProductStorageType.d.ts +8 -19
- package/order/src/models/ProductStorageType.js +19 -17
- package/package.json +1 -1
- package/product/src/apis/SearchProductMetadataApi.d.ts +0 -11
- package/product/src/apis/SearchProductMetadataApi.js +12 -91
- package/product/src/models/ProductCreationOrUpdateParameters.d.ts +4 -3
- package/product/src/models/ProductCreationOrUpdateParameters.js +3 -2
- package/product/src/models/ProductStorageType.d.ts +8 -19
- package/product/src/models/ProductStorageType.js +19 -17
- package/shopping-cart/src/models/ProductStorageType.d.ts +8 -19
- package/shopping-cart/src/models/ProductStorageType.js +19 -17
- package/user/src/apis/ManageUserRestrictionApi.d.ts +1 -25
- package/user/src/apis/ManageUserRestrictionApi.js +20 -160
- package/user/src/apis/SearchUserRestrictionApi.d.ts +1 -20
- package/user/src/apis/SearchUserRestrictionApi.js +12 -167
- package/user/src/models/ProductStorageType.d.ts +26 -0
- package/user/src/models/ProductStorageType.js +49 -0
- package/user/src/models/User.d.ts +3 -2
- package/user/src/models/User.js +3 -2
- package/user/src/models/UserUpdateParameters.d.ts +7 -0
- package/user/src/models/UserUpdateParameters.js +3 -0
- package/user/src/models/index.d.ts +1 -2
- package/user/src/models/index.js +1 -2
- package/user/src/models/ProductStorageTypeLink.d.ts +0 -43
- package/user/src/models/ProductStorageTypeLink.js +0 -51
- package/user/src/models/UserRestrictedProductStorageTypeCreationParameter.d.ts +0 -31
- package/user/src/models/UserRestrictedProductStorageTypeCreationParameter.js +0 -47
|
@@ -13,12 +13,26 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = void 0;
|
|
16
|
+
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = exports.ProductStorageType = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
19
20
|
*/
|
|
21
|
+
exports.ProductStorageType = {
|
|
22
|
+
FREE: 'FREE',
|
|
23
|
+
FRIDGE: 'FRIDGE',
|
|
24
|
+
FREEZER: 'FREEZER',
|
|
25
|
+
FRESH: 'FRESH'
|
|
26
|
+
};
|
|
20
27
|
function instanceOfProductStorageType(value) {
|
|
21
|
-
|
|
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;
|
|
22
36
|
}
|
|
23
37
|
exports.instanceOfProductStorageType = instanceOfProductStorageType;
|
|
24
38
|
function ProductStorageTypeFromJSON(json) {
|
|
@@ -26,22 +40,10 @@ function ProductStorageTypeFromJSON(json) {
|
|
|
26
40
|
}
|
|
27
41
|
exports.ProductStorageTypeFromJSON = ProductStorageTypeFromJSON;
|
|
28
42
|
function ProductStorageTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
-
|
|
30
|
-
return json;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
'id': json['id'],
|
|
34
|
-
'name': json['name'],
|
|
35
|
-
};
|
|
43
|
+
return json;
|
|
36
44
|
}
|
|
37
45
|
exports.ProductStorageTypeFromJSONTyped = ProductStorageTypeFromJSONTyped;
|
|
38
46
|
function ProductStorageTypeToJSON(value) {
|
|
39
|
-
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'id': value['id'],
|
|
44
|
-
'name': value['name'],
|
|
45
|
-
};
|
|
47
|
+
return value;
|
|
46
48
|
}
|
|
47
49
|
exports.ProductStorageTypeToJSON = ProductStorageTypeToJSON;
|
|
@@ -12,26 +12,15 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface ProductStorageType
|
|
16
15
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Readable name for display
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof ProductStorageType
|
|
28
|
-
*/
|
|
29
|
-
name?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the ProductStorageType interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfProductStorageType(value: object): value is ProductStorageType;
|
|
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;
|
|
35
24
|
export declare function ProductStorageTypeFromJSON(json: any): ProductStorageType;
|
|
36
25
|
export declare function ProductStorageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductStorageType;
|
|
37
26
|
export declare function ProductStorageTypeToJSON(value?: ProductStorageType | null): any;
|
|
@@ -13,12 +13,26 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = void 0;
|
|
16
|
+
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = exports.ProductStorageType = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
19
20
|
*/
|
|
21
|
+
exports.ProductStorageType = {
|
|
22
|
+
FREE: 'FREE',
|
|
23
|
+
FRIDGE: 'FRIDGE',
|
|
24
|
+
FREEZER: 'FREEZER',
|
|
25
|
+
FRESH: 'FRESH'
|
|
26
|
+
};
|
|
20
27
|
function instanceOfProductStorageType(value) {
|
|
21
|
-
|
|
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;
|
|
22
36
|
}
|
|
23
37
|
exports.instanceOfProductStorageType = instanceOfProductStorageType;
|
|
24
38
|
function ProductStorageTypeFromJSON(json) {
|
|
@@ -26,22 +40,10 @@ function ProductStorageTypeFromJSON(json) {
|
|
|
26
40
|
}
|
|
27
41
|
exports.ProductStorageTypeFromJSON = ProductStorageTypeFromJSON;
|
|
28
42
|
function ProductStorageTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
-
|
|
30
|
-
return json;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
'id': json['id'],
|
|
34
|
-
'name': json['name'],
|
|
35
|
-
};
|
|
43
|
+
return json;
|
|
36
44
|
}
|
|
37
45
|
exports.ProductStorageTypeFromJSONTyped = ProductStorageTypeFromJSONTyped;
|
|
38
46
|
function ProductStorageTypeToJSON(value) {
|
|
39
|
-
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'id': value['id'],
|
|
44
|
-
'name': value['name'],
|
|
45
|
-
};
|
|
47
|
+
return value;
|
|
46
48
|
}
|
|
47
49
|
exports.ProductStorageTypeToJSON = ProductStorageTypeToJSON;
|
|
@@ -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,
|
|
13
|
+
import type { NotificationTypeId, UserRestrictedFeatureCreationParameter, UserRestrictedNotificationTypeCreationParameter, UserRestrictedProductTypeCreationParameter } 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 CreateUserRestrictedProductStorageTypeRequest {
|
|
26
|
-
userId: number;
|
|
27
|
-
userRestrictedProductStorageTypeCreationParameter: UserRestrictedProductStorageTypeCreationParameter;
|
|
28
|
-
}
|
|
29
25
|
export interface CreateUserRestrictedProductTypeRequest {
|
|
30
26
|
userId: number;
|
|
31
27
|
userRestrictedProductTypeCreationParameter: UserRestrictedProductTypeCreationParameter;
|
|
@@ -41,10 +37,6 @@ export interface DeleteUserRestrictedNotificationTypeRequest {
|
|
|
41
37
|
userId: number;
|
|
42
38
|
notificationTypeId: NotificationTypeId;
|
|
43
39
|
}
|
|
44
|
-
export interface DeleteUserRestrictedProductStorageTypeRequest {
|
|
45
|
-
userId: number;
|
|
46
|
-
productStorageTypeId: string;
|
|
47
|
-
}
|
|
48
40
|
export interface DeleteUserRestrictedProductTypeRequest {
|
|
49
41
|
userId: number;
|
|
50
42
|
productTypeId: string;
|
|
@@ -77,14 +69,6 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
|
|
|
77
69
|
* Add this notification type in restricted user notification types
|
|
78
70
|
*/
|
|
79
71
|
createUserRestrictedNotificationType(requestParameters: CreateUserRestrictedNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
80
|
-
/**
|
|
81
|
-
* Add this product storage type in restricted user product storage types
|
|
82
|
-
*/
|
|
83
|
-
createUserRestrictedProductStorageTypeRaw(requestParameters: CreateUserRestrictedProductStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
84
|
-
/**
|
|
85
|
-
* Add this product storage type in restricted user product storage types
|
|
86
|
-
*/
|
|
87
|
-
createUserRestrictedProductStorageType(requestParameters: CreateUserRestrictedProductStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
88
72
|
/**
|
|
89
73
|
* Add this product type in restricted user product types
|
|
90
74
|
*/
|
|
@@ -117,14 +101,6 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
|
|
|
117
101
|
* Delete this notification type from restricted user notification types
|
|
118
102
|
*/
|
|
119
103
|
deleteUserRestrictedNotificationType(requestParameters: DeleteUserRestrictedNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
120
|
-
/**
|
|
121
|
-
* Delete this product storage type from restricted user product storage types
|
|
122
|
-
*/
|
|
123
|
-
deleteUserRestrictedProductStorageTypeRaw(requestParameters: DeleteUserRestrictedProductStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
124
|
-
/**
|
|
125
|
-
* Delete this product storage type from restricted user product storage types
|
|
126
|
-
*/
|
|
127
|
-
deleteUserRestrictedProductStorageType(requestParameters: DeleteUserRestrictedProductStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
128
104
|
/**
|
|
129
105
|
* Delete this product type from restricted user product types
|
|
130
106
|
*/
|
|
@@ -285,83 +285,12 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
285
285
|
});
|
|
286
286
|
});
|
|
287
287
|
};
|
|
288
|
-
/**
|
|
289
|
-
* Add this product storage type in restricted user product storage types
|
|
290
|
-
*/
|
|
291
|
-
ManageUserRestrictionApi.prototype.createUserRestrictedProductStorageTypeRaw = 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 createUserRestrictedProductStorageType().');
|
|
299
|
-
}
|
|
300
|
-
if (requestParameters['userRestrictedProductStorageTypeCreationParameter'] == null) {
|
|
301
|
-
throw new runtime.RequiredError('userRestrictedProductStorageTypeCreationParameter', 'Required parameter "userRestrictedProductStorageTypeCreationParameter" was null or undefined when calling createUserRestrictedProductStorageType().');
|
|
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-storage-types".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
|
|
327
|
-
method: 'POST',
|
|
328
|
-
headers: headerParameters,
|
|
329
|
-
query: queryParameters,
|
|
330
|
-
body: (0, index_1.UserRestrictedProductStorageTypeCreationParameterToJSON)(requestParameters['userRestrictedProductStorageTypeCreationParameter']),
|
|
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 storage type in restricted user product storage types
|
|
346
|
-
*/
|
|
347
|
-
ManageUserRestrictionApi.prototype.createUserRestrictedProductStorageType = 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.createUserRestrictedProductStorageTypeRaw(requestParameters, initOverrides)];
|
|
352
|
-
case 1:
|
|
353
|
-
_a.sent();
|
|
354
|
-
return [2 /*return*/];
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
});
|
|
358
|
-
};
|
|
359
288
|
/**
|
|
360
289
|
* Add this product type in restricted user product types
|
|
361
290
|
*/
|
|
362
291
|
ManageUserRestrictionApi.prototype.createUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
|
|
363
292
|
return __awaiter(this, void 0, void 0, function () {
|
|
364
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
293
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_4;
|
|
365
294
|
return __generator(this, function (_c) {
|
|
366
295
|
switch (_c.label) {
|
|
367
296
|
case 0:
|
|
@@ -404,9 +333,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
404
333
|
response = _c.sent();
|
|
405
334
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
406
335
|
case 6:
|
|
407
|
-
|
|
408
|
-
console.debug(
|
|
409
|
-
throw
|
|
336
|
+
response_4 = _c.sent();
|
|
337
|
+
console.debug(response_4);
|
|
338
|
+
throw response_4;
|
|
410
339
|
case 7: return [2 /*return*/];
|
|
411
340
|
}
|
|
412
341
|
});
|
|
@@ -432,7 +361,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
432
361
|
*/
|
|
433
362
|
ManageUserRestrictionApi.prototype.deleteCurrentUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
|
|
434
363
|
return __awaiter(this, void 0, void 0, function () {
|
|
435
|
-
var queryParameters, headerParameters, token, tokenString, response,
|
|
364
|
+
var queryParameters, headerParameters, token, tokenString, response, response_5;
|
|
436
365
|
return __generator(this, function (_a) {
|
|
437
366
|
switch (_a.label) {
|
|
438
367
|
case 0:
|
|
@@ -462,9 +391,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
462
391
|
response = _a.sent();
|
|
463
392
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
464
393
|
case 4:
|
|
465
|
-
|
|
466
|
-
console.debug(
|
|
467
|
-
throw
|
|
394
|
+
response_5 = _a.sent();
|
|
395
|
+
console.debug(response_5);
|
|
396
|
+
throw response_5;
|
|
468
397
|
case 5: return [2 /*return*/];
|
|
469
398
|
}
|
|
470
399
|
});
|
|
@@ -490,7 +419,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
490
419
|
*/
|
|
491
420
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedFeatureRaw = function (requestParameters, initOverrides) {
|
|
492
421
|
return __awaiter(this, void 0, void 0, function () {
|
|
493
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
422
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_6;
|
|
494
423
|
return __generator(this, function (_c) {
|
|
495
424
|
switch (_c.label) {
|
|
496
425
|
case 0:
|
|
@@ -531,9 +460,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
531
460
|
response = _c.sent();
|
|
532
461
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
533
462
|
case 6:
|
|
534
|
-
|
|
535
|
-
console.debug(
|
|
536
|
-
throw
|
|
463
|
+
response_6 = _c.sent();
|
|
464
|
+
console.debug(response_6);
|
|
465
|
+
throw response_6;
|
|
537
466
|
case 7: return [2 /*return*/];
|
|
538
467
|
}
|
|
539
468
|
});
|
|
@@ -559,7 +488,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
559
488
|
*/
|
|
560
489
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
|
|
561
490
|
return __awaiter(this, void 0, void 0, function () {
|
|
562
|
-
var queryParameters, headerParameters, token, tokenString, response,
|
|
491
|
+
var queryParameters, headerParameters, token, tokenString, response, response_7;
|
|
563
492
|
return __generator(this, function (_a) {
|
|
564
493
|
switch (_a.label) {
|
|
565
494
|
case 0:
|
|
@@ -592,9 +521,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
592
521
|
response = _a.sent();
|
|
593
522
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
594
523
|
case 4:
|
|
595
|
-
|
|
596
|
-
console.debug(
|
|
597
|
-
throw
|
|
524
|
+
response_7 = _a.sent();
|
|
525
|
+
console.debug(response_7);
|
|
526
|
+
throw response_7;
|
|
598
527
|
case 5: return [2 /*return*/];
|
|
599
528
|
}
|
|
600
529
|
});
|
|
@@ -615,81 +544,12 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
615
544
|
});
|
|
616
545
|
});
|
|
617
546
|
};
|
|
618
|
-
/**
|
|
619
|
-
* Delete this product storage type from restricted user product storage types
|
|
620
|
-
*/
|
|
621
|
-
ManageUserRestrictionApi.prototype.deleteUserRestrictedProductStorageTypeRaw = function (requestParameters, initOverrides) {
|
|
622
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
623
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_9;
|
|
624
|
-
return __generator(this, function (_c) {
|
|
625
|
-
switch (_c.label) {
|
|
626
|
-
case 0:
|
|
627
|
-
if (requestParameters['userId'] == null) {
|
|
628
|
-
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserRestrictedProductStorageType().');
|
|
629
|
-
}
|
|
630
|
-
if (requestParameters['productStorageTypeId'] == null) {
|
|
631
|
-
throw new runtime.RequiredError('productStorageTypeId', 'Required parameter "productStorageTypeId" was null or undefined when calling deleteUserRestrictedProductStorageType().');
|
|
632
|
-
}
|
|
633
|
-
queryParameters = {};
|
|
634
|
-
headerParameters = {};
|
|
635
|
-
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
636
|
-
_a = headerParameters;
|
|
637
|
-
_b = "x-api-key";
|
|
638
|
-
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
639
|
-
case 1:
|
|
640
|
-
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
641
|
-
_c.label = 2;
|
|
642
|
-
case 2:
|
|
643
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
644
|
-
token = this.configuration.accessToken;
|
|
645
|
-
return [4 /*yield*/, token("bearerAuth", [])];
|
|
646
|
-
case 3:
|
|
647
|
-
tokenString = _c.sent();
|
|
648
|
-
if (tokenString) {
|
|
649
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
650
|
-
}
|
|
651
|
-
_c.label = 4;
|
|
652
|
-
case 4:
|
|
653
|
-
_c.trys.push([4, 6, , 7]);
|
|
654
|
-
return [4 /*yield*/, this.request({
|
|
655
|
-
path: "/users/{userId}/restricted-product-storage-types/{productStorageTypeId}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("productStorageTypeId", "}"), encodeURIComponent(String(requestParameters['productStorageTypeId']))),
|
|
656
|
-
method: 'DELETE',
|
|
657
|
-
headers: headerParameters,
|
|
658
|
-
query: queryParameters,
|
|
659
|
-
}, initOverrides)];
|
|
660
|
-
case 5:
|
|
661
|
-
response = _c.sent();
|
|
662
|
-
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
663
|
-
case 6:
|
|
664
|
-
response_9 = _c.sent();
|
|
665
|
-
console.debug(response_9);
|
|
666
|
-
throw response_9;
|
|
667
|
-
case 7: return [2 /*return*/];
|
|
668
|
-
}
|
|
669
|
-
});
|
|
670
|
-
});
|
|
671
|
-
};
|
|
672
|
-
/**
|
|
673
|
-
* Delete this product storage type from restricted user product storage types
|
|
674
|
-
*/
|
|
675
|
-
ManageUserRestrictionApi.prototype.deleteUserRestrictedProductStorageType = function (requestParameters, initOverrides) {
|
|
676
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
677
|
-
return __generator(this, function (_a) {
|
|
678
|
-
switch (_a.label) {
|
|
679
|
-
case 0: return [4 /*yield*/, this.deleteUserRestrictedProductStorageTypeRaw(requestParameters, initOverrides)];
|
|
680
|
-
case 1:
|
|
681
|
-
_a.sent();
|
|
682
|
-
return [2 /*return*/];
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
|
-
});
|
|
686
|
-
};
|
|
687
547
|
/**
|
|
688
548
|
* Delete this product type from restricted user product types
|
|
689
549
|
*/
|
|
690
550
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
|
|
691
551
|
return __awaiter(this, void 0, void 0, function () {
|
|
692
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
552
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_8;
|
|
693
553
|
return __generator(this, function (_c) {
|
|
694
554
|
switch (_c.label) {
|
|
695
555
|
case 0:
|
|
@@ -730,9 +590,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
730
590
|
response = _c.sent();
|
|
731
591
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
732
592
|
case 6:
|
|
733
|
-
|
|
734
|
-
console.debug(
|
|
735
|
-
throw
|
|
593
|
+
response_8 = _c.sent();
|
|
594
|
+
console.debug(response_8);
|
|
595
|
+
throw response_8;
|
|
736
596
|
case 7: return [2 /*return*/];
|
|
737
597
|
}
|
|
738
598
|
});
|
|
@@ -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,
|
|
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 GetUserRestrictedProductStorageTypesRequest {
|
|
21
|
-
userId: number;
|
|
22
|
-
}
|
|
23
20
|
export interface GetUserRestrictedProductTypesRequest {
|
|
24
21
|
userId: number;
|
|
25
22
|
}
|
|
@@ -35,14 +32,6 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
|
|
|
35
32
|
* Get notifications that will not be pushed outside the system (eg. mail)
|
|
36
33
|
*/
|
|
37
34
|
getCurrentUserRestrictedNotificationTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NotificationTypeLink> | runtime.BlobWithMeta>;
|
|
38
|
-
/**
|
|
39
|
-
* Get user restricted product storage types
|
|
40
|
-
*/
|
|
41
|
-
getCurrentUserRestrictedProductStorageTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProductStorageTypeLink> | runtime.BlobWithMeta>>;
|
|
42
|
-
/**
|
|
43
|
-
* Get user restricted product storage types
|
|
44
|
-
*/
|
|
45
|
-
getCurrentUserRestrictedProductStorageTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductStorageTypeLink> | runtime.BlobWithMeta>;
|
|
46
35
|
/**
|
|
47
36
|
* Get user restricted features
|
|
48
37
|
*/
|
|
@@ -59,14 +48,6 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
|
|
|
59
48
|
* Get that will not be pushed outside the system (eg. mail)
|
|
60
49
|
*/
|
|
61
50
|
getUserRestrictedNotificationTypes(requestParameters: GetUserRestrictedNotificationTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NotificationTypeLink> | runtime.BlobWithMeta>;
|
|
62
|
-
/**
|
|
63
|
-
* Get user restricted product storage types
|
|
64
|
-
*/
|
|
65
|
-
getUserRestrictedProductStorageTypesRaw(requestParameters: GetUserRestrictedProductStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProductStorageTypeLink> | runtime.BlobWithMeta>>;
|
|
66
|
-
/**
|
|
67
|
-
* Get user restricted product storage types
|
|
68
|
-
*/
|
|
69
|
-
getUserRestrictedProductStorageTypes(requestParameters: GetUserRestrictedProductStorageTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductStorageTypeLink> | runtime.BlobWithMeta>;
|
|
70
51
|
/**
|
|
71
52
|
* Get user restricted product types
|
|
72
53
|
*/
|