@lcdp/api-react-rest-client 2.13.9-LDS-4699-etape-1-no-more-archive-of-frid.17041652471 → 2.13.9-LDS-4860-monolith-aucunes-contraintes-su.17069222825
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/ProductStorageType.d.ts +8 -19
- package/catalog/src/models/ProductStorageType.js +19 -17
- 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 +1 -20
- package/product/src/apis/SearchProductMetadataApi.js +8 -163
- 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/index.d.ts +0 -2
- package/user/src/models/index.js +0 -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;
|
|
@@ -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
|
*/
|
|
@@ -151,88 +151,12 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
151
151
|
});
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
|
-
/**
|
|
155
|
-
* Get user restricted product storage types
|
|
156
|
-
*/
|
|
157
|
-
SearchUserRestrictionApi.prototype.getCurrentUserRestrictedProductStorageTypesRaw = function (initOverrides) {
|
|
158
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
|
|
160
|
-
return __generator(this, function (_c) {
|
|
161
|
-
switch (_c.label) {
|
|
162
|
-
case 0:
|
|
163
|
-
queryParameters = {};
|
|
164
|
-
headerParameters = {};
|
|
165
|
-
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
166
|
-
_a = headerParameters;
|
|
167
|
-
_b = "x-api-key";
|
|
168
|
-
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
169
|
-
case 1:
|
|
170
|
-
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
171
|
-
_c.label = 2;
|
|
172
|
-
case 2:
|
|
173
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
174
|
-
token = this.configuration.accessToken;
|
|
175
|
-
return [4 /*yield*/, token("bearerAuth", [])];
|
|
176
|
-
case 3:
|
|
177
|
-
tokenString = _c.sent();
|
|
178
|
-
if (tokenString) {
|
|
179
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
180
|
-
}
|
|
181
|
-
_c.label = 4;
|
|
182
|
-
case 4:
|
|
183
|
-
_c.trys.push([4, 6, , 7]);
|
|
184
|
-
return [4 /*yield*/, this.request({
|
|
185
|
-
path: "/users/me/restricted-product-storage-types",
|
|
186
|
-
method: 'GET',
|
|
187
|
-
headers: headerParameters,
|
|
188
|
-
query: queryParameters,
|
|
189
|
-
}, initOverrides)];
|
|
190
|
-
case 5:
|
|
191
|
-
response = _c.sent();
|
|
192
|
-
contentType = response.headers.get("content-type");
|
|
193
|
-
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
194
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ProductStorageTypeLinkFromJSON); })];
|
|
195
|
-
}
|
|
196
|
-
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
197
|
-
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
// TODO : Better handling of others application types
|
|
201
|
-
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
202
|
-
}
|
|
203
|
-
return [3 /*break*/, 7];
|
|
204
|
-
case 6:
|
|
205
|
-
response_2 = _c.sent();
|
|
206
|
-
console.debug(response_2);
|
|
207
|
-
throw response_2;
|
|
208
|
-
case 7: return [2 /*return*/];
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* Get user restricted product storage types
|
|
215
|
-
*/
|
|
216
|
-
SearchUserRestrictionApi.prototype.getCurrentUserRestrictedProductStorageTypes = function (initOverrides) {
|
|
217
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
218
|
-
var response;
|
|
219
|
-
return __generator(this, function (_a) {
|
|
220
|
-
switch (_a.label) {
|
|
221
|
-
case 0: return [4 /*yield*/, this.getCurrentUserRestrictedProductStorageTypesRaw(initOverrides)];
|
|
222
|
-
case 1:
|
|
223
|
-
response = _a.sent();
|
|
224
|
-
return [4 /*yield*/, response.value()];
|
|
225
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
};
|
|
230
154
|
/**
|
|
231
155
|
* Get user restricted features
|
|
232
156
|
*/
|
|
233
157
|
SearchUserRestrictionApi.prototype.getUserRestrictedFeaturesRaw = function (requestParameters, initOverrides) {
|
|
234
158
|
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
159
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
|
|
236
160
|
return __generator(this, function (_c) {
|
|
237
161
|
switch (_c.label) {
|
|
238
162
|
case 0:
|
|
@@ -281,9 +205,9 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
281
205
|
}
|
|
282
206
|
return [3 /*break*/, 7];
|
|
283
207
|
case 6:
|
|
284
|
-
|
|
285
|
-
console.debug(
|
|
286
|
-
throw
|
|
208
|
+
response_2 = _c.sent();
|
|
209
|
+
console.debug(response_2);
|
|
210
|
+
throw response_2;
|
|
287
211
|
case 7: return [2 /*return*/];
|
|
288
212
|
}
|
|
289
213
|
});
|
|
@@ -311,7 +235,7 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
311
235
|
*/
|
|
312
236
|
SearchUserRestrictionApi.prototype.getUserRestrictedNotificationTypesRaw = function (requestParameters, initOverrides) {
|
|
313
237
|
return __awaiter(this, void 0, void 0, function () {
|
|
314
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
238
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_3;
|
|
315
239
|
return __generator(this, function (_c) {
|
|
316
240
|
switch (_c.label) {
|
|
317
241
|
case 0:
|
|
@@ -360,9 +284,9 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
360
284
|
}
|
|
361
285
|
return [3 /*break*/, 7];
|
|
362
286
|
case 6:
|
|
363
|
-
|
|
364
|
-
console.debug(
|
|
365
|
-
throw
|
|
287
|
+
response_3 = _c.sent();
|
|
288
|
+
console.debug(response_3);
|
|
289
|
+
throw response_3;
|
|
366
290
|
case 7: return [2 /*return*/];
|
|
367
291
|
}
|
|
368
292
|
});
|
|
@@ -385,91 +309,12 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
385
309
|
});
|
|
386
310
|
});
|
|
387
311
|
};
|
|
388
|
-
/**
|
|
389
|
-
* Get user restricted product storage types
|
|
390
|
-
*/
|
|
391
|
-
SearchUserRestrictionApi.prototype.getUserRestrictedProductStorageTypesRaw = function (requestParameters, initOverrides) {
|
|
392
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
393
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_5;
|
|
394
|
-
return __generator(this, function (_c) {
|
|
395
|
-
switch (_c.label) {
|
|
396
|
-
case 0:
|
|
397
|
-
if (requestParameters['userId'] == null) {
|
|
398
|
-
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserRestrictedProductStorageTypes().');
|
|
399
|
-
}
|
|
400
|
-
queryParameters = {};
|
|
401
|
-
headerParameters = {};
|
|
402
|
-
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
403
|
-
_a = headerParameters;
|
|
404
|
-
_b = "x-api-key";
|
|
405
|
-
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
406
|
-
case 1:
|
|
407
|
-
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
408
|
-
_c.label = 2;
|
|
409
|
-
case 2:
|
|
410
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
411
|
-
token = this.configuration.accessToken;
|
|
412
|
-
return [4 /*yield*/, token("bearerAuth", [])];
|
|
413
|
-
case 3:
|
|
414
|
-
tokenString = _c.sent();
|
|
415
|
-
if (tokenString) {
|
|
416
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
417
|
-
}
|
|
418
|
-
_c.label = 4;
|
|
419
|
-
case 4:
|
|
420
|
-
_c.trys.push([4, 6, , 7]);
|
|
421
|
-
return [4 /*yield*/, this.request({
|
|
422
|
-
path: "/users/{userId}/restricted-product-storage-types".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
|
|
423
|
-
method: 'GET',
|
|
424
|
-
headers: headerParameters,
|
|
425
|
-
query: queryParameters,
|
|
426
|
-
}, initOverrides)];
|
|
427
|
-
case 5:
|
|
428
|
-
response = _c.sent();
|
|
429
|
-
contentType = response.headers.get("content-type");
|
|
430
|
-
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
431
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ProductStorageTypeLinkFromJSON); })];
|
|
432
|
-
}
|
|
433
|
-
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
434
|
-
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
435
|
-
}
|
|
436
|
-
else {
|
|
437
|
-
// TODO : Better handling of others application types
|
|
438
|
-
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
439
|
-
}
|
|
440
|
-
return [3 /*break*/, 7];
|
|
441
|
-
case 6:
|
|
442
|
-
response_5 = _c.sent();
|
|
443
|
-
console.debug(response_5);
|
|
444
|
-
throw response_5;
|
|
445
|
-
case 7: return [2 /*return*/];
|
|
446
|
-
}
|
|
447
|
-
});
|
|
448
|
-
});
|
|
449
|
-
};
|
|
450
|
-
/**
|
|
451
|
-
* Get user restricted product storage types
|
|
452
|
-
*/
|
|
453
|
-
SearchUserRestrictionApi.prototype.getUserRestrictedProductStorageTypes = function (requestParameters, initOverrides) {
|
|
454
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
455
|
-
var response;
|
|
456
|
-
return __generator(this, function (_a) {
|
|
457
|
-
switch (_a.label) {
|
|
458
|
-
case 0: return [4 /*yield*/, this.getUserRestrictedProductStorageTypesRaw(requestParameters, initOverrides)];
|
|
459
|
-
case 1:
|
|
460
|
-
response = _a.sent();
|
|
461
|
-
return [4 /*yield*/, response.value()];
|
|
462
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
});
|
|
466
|
-
};
|
|
467
312
|
/**
|
|
468
313
|
* Get user restricted product types
|
|
469
314
|
*/
|
|
470
315
|
SearchUserRestrictionApi.prototype.getUserRestrictedProductTypesRaw = function (requestParameters, initOverrides) {
|
|
471
316
|
return __awaiter(this, void 0, void 0, function () {
|
|
472
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
317
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_4;
|
|
473
318
|
return __generator(this, function (_c) {
|
|
474
319
|
switch (_c.label) {
|
|
475
320
|
case 0:
|
|
@@ -518,9 +363,9 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
518
363
|
}
|
|
519
364
|
return [3 /*break*/, 7];
|
|
520
365
|
case 6:
|
|
521
|
-
|
|
522
|
-
console.debug(
|
|
523
|
-
throw
|
|
366
|
+
response_4 = _c.sent();
|
|
367
|
+
console.debug(response_4);
|
|
368
|
+
throw response_4;
|
|
524
369
|
case 7: return [2 /*return*/];
|
|
525
370
|
}
|
|
526
371
|
});
|