@lcdp/api-react-rest-client 2.13.8 → 2.13.9-LDS-4699-etape-1-no-more-archive-of-frid.17041330416
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 +19 -8
- package/catalog/src/models/ProductStorageType.js +17 -19
- package/magic-cart/src/models/ProductStorageType.d.ts +19 -8
- package/magic-cart/src/models/ProductStorageType.js +17 -19
- package/order/src/models/OrderStatus.d.ts +0 -1
- package/order/src/models/OrderStatus.js +0 -1
- package/order/src/models/ProductStorageType.d.ts +19 -8
- package/order/src/models/ProductStorageType.js +17 -19
- package/package.json +1 -1
- package/product/src/apis/SearchProductMetadataApi.d.ts +20 -1
- package/product/src/apis/SearchProductMetadataApi.js +163 -8
- package/product/src/models/ProductStorageType.d.ts +19 -8
- package/product/src/models/ProductStorageType.js +17 -19
- package/shopping-cart/src/models/ProductStorageType.d.ts +19 -8
- package/shopping-cart/src/models/ProductStorageType.js +17 -19
- package/user/src/apis/ManageUserRestrictionApi.d.ts +25 -1
- package/user/src/apis/ManageUserRestrictionApi.js +160 -20
- package/user/src/apis/SearchUserRestrictionApi.d.ts +20 -1
- package/user/src/apis/SearchUserRestrictionApi.js +167 -12
- package/user/src/models/ProductStorageTypeLink.d.ts +43 -0
- package/user/src/models/ProductStorageTypeLink.js +51 -0
- package/user/src/models/UserRestrictedProductStorageTypeCreationParameter.d.ts +31 -0
- package/user/src/models/UserRestrictedProductStorageTypeCreationParameter.js +47 -0
- package/user/src/models/index.d.ts +2 -0
- package/user/src/models/index.js +2 -0
|
@@ -13,26 +13,12 @@
|
|
|
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 =
|
|
16
|
+
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @export
|
|
18
|
+
* Check if a given object implements the ProductStorageType interface.
|
|
20
19
|
*/
|
|
21
|
-
exports.ProductStorageType = {
|
|
22
|
-
FREE: 'FREE',
|
|
23
|
-
FRIDGE: 'FRIDGE',
|
|
24
|
-
FREEZER: 'FREEZER',
|
|
25
|
-
FRESH: 'FRESH'
|
|
26
|
-
};
|
|
27
20
|
function instanceOfProductStorageType(value) {
|
|
28
|
-
|
|
29
|
-
if (Object.prototype.hasOwnProperty.call(exports.ProductStorageType, key)) {
|
|
30
|
-
if (exports.ProductStorageType[key] === value) {
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return false;
|
|
21
|
+
return true;
|
|
36
22
|
}
|
|
37
23
|
exports.instanceOfProductStorageType = instanceOfProductStorageType;
|
|
38
24
|
function ProductStorageTypeFromJSON(json) {
|
|
@@ -40,10 +26,22 @@ function ProductStorageTypeFromJSON(json) {
|
|
|
40
26
|
}
|
|
41
27
|
exports.ProductStorageTypeFromJSON = ProductStorageTypeFromJSON;
|
|
42
28
|
function ProductStorageTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
-
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'id': json['id'],
|
|
34
|
+
'name': json['name'],
|
|
35
|
+
};
|
|
44
36
|
}
|
|
45
37
|
exports.ProductStorageTypeFromJSONTyped = ProductStorageTypeFromJSONTyped;
|
|
46
38
|
function ProductStorageTypeToJSON(value) {
|
|
47
|
-
|
|
39
|
+
if (value == null) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': value['id'],
|
|
44
|
+
'name': value['name'],
|
|
45
|
+
};
|
|
48
46
|
}
|
|
49
47
|
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, UserRestrictedProductTypeCreationParameter } from '../models/index';
|
|
13
|
+
import type { NotificationTypeId, UserRestrictedFeatureCreationParameter, UserRestrictedNotificationTypeCreationParameter, UserRestrictedProductStorageTypeCreationParameter, UserRestrictedProductTypeCreationParameter } from '../models/index';
|
|
14
14
|
export interface CreateCurrentUserRestrictedNotificationTypeRequest {
|
|
15
15
|
userRestrictedNotificationTypeCreationParameter: UserRestrictedNotificationTypeCreationParameter;
|
|
16
16
|
}
|
|
@@ -22,6 +22,10 @@ export interface CreateUserRestrictedNotificationTypeRequest {
|
|
|
22
22
|
userId: number;
|
|
23
23
|
userRestrictedNotificationTypeCreationParameter: UserRestrictedNotificationTypeCreationParameter;
|
|
24
24
|
}
|
|
25
|
+
export interface CreateUserRestrictedProductStorageTypeRequest {
|
|
26
|
+
userId: number;
|
|
27
|
+
userRestrictedProductStorageTypeCreationParameter: UserRestrictedProductStorageTypeCreationParameter;
|
|
28
|
+
}
|
|
25
29
|
export interface CreateUserRestrictedProductTypeRequest {
|
|
26
30
|
userId: number;
|
|
27
31
|
userRestrictedProductTypeCreationParameter: UserRestrictedProductTypeCreationParameter;
|
|
@@ -37,6 +41,10 @@ export interface DeleteUserRestrictedNotificationTypeRequest {
|
|
|
37
41
|
userId: number;
|
|
38
42
|
notificationTypeId: NotificationTypeId;
|
|
39
43
|
}
|
|
44
|
+
export interface DeleteUserRestrictedProductStorageTypeRequest {
|
|
45
|
+
userId: number;
|
|
46
|
+
productStorageTypeId: string;
|
|
47
|
+
}
|
|
40
48
|
export interface DeleteUserRestrictedProductTypeRequest {
|
|
41
49
|
userId: number;
|
|
42
50
|
productTypeId: string;
|
|
@@ -69,6 +77,14 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
|
|
|
69
77
|
* Add this notification type in restricted user notification types
|
|
70
78
|
*/
|
|
71
79
|
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>;
|
|
72
88
|
/**
|
|
73
89
|
* Add this product type in restricted user product types
|
|
74
90
|
*/
|
|
@@ -101,6 +117,14 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
|
|
|
101
117
|
* Delete this notification type from restricted user notification types
|
|
102
118
|
*/
|
|
103
119
|
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>;
|
|
104
128
|
/**
|
|
105
129
|
* Delete this product type from restricted user product types
|
|
106
130
|
*/
|
|
@@ -285,12 +285,83 @@ 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
|
+
};
|
|
288
359
|
/**
|
|
289
360
|
* Add this product type in restricted user product types
|
|
290
361
|
*/
|
|
291
362
|
ManageUserRestrictionApi.prototype.createUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
|
|
292
363
|
return __awaiter(this, void 0, void 0, function () {
|
|
293
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
364
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_5;
|
|
294
365
|
return __generator(this, function (_c) {
|
|
295
366
|
switch (_c.label) {
|
|
296
367
|
case 0:
|
|
@@ -333,9 +404,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
333
404
|
response = _c.sent();
|
|
334
405
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
335
406
|
case 6:
|
|
336
|
-
|
|
337
|
-
console.debug(
|
|
338
|
-
throw
|
|
407
|
+
response_5 = _c.sent();
|
|
408
|
+
console.debug(response_5);
|
|
409
|
+
throw response_5;
|
|
339
410
|
case 7: return [2 /*return*/];
|
|
340
411
|
}
|
|
341
412
|
});
|
|
@@ -361,7 +432,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
361
432
|
*/
|
|
362
433
|
ManageUserRestrictionApi.prototype.deleteCurrentUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
|
|
363
434
|
return __awaiter(this, void 0, void 0, function () {
|
|
364
|
-
var queryParameters, headerParameters, token, tokenString, response,
|
|
435
|
+
var queryParameters, headerParameters, token, tokenString, response, response_6;
|
|
365
436
|
return __generator(this, function (_a) {
|
|
366
437
|
switch (_a.label) {
|
|
367
438
|
case 0:
|
|
@@ -391,9 +462,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
391
462
|
response = _a.sent();
|
|
392
463
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
393
464
|
case 4:
|
|
394
|
-
|
|
395
|
-
console.debug(
|
|
396
|
-
throw
|
|
465
|
+
response_6 = _a.sent();
|
|
466
|
+
console.debug(response_6);
|
|
467
|
+
throw response_6;
|
|
397
468
|
case 5: return [2 /*return*/];
|
|
398
469
|
}
|
|
399
470
|
});
|
|
@@ -419,7 +490,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
419
490
|
*/
|
|
420
491
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedFeatureRaw = function (requestParameters, initOverrides) {
|
|
421
492
|
return __awaiter(this, void 0, void 0, function () {
|
|
422
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
493
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_7;
|
|
423
494
|
return __generator(this, function (_c) {
|
|
424
495
|
switch (_c.label) {
|
|
425
496
|
case 0:
|
|
@@ -460,9 +531,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
460
531
|
response = _c.sent();
|
|
461
532
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
462
533
|
case 6:
|
|
463
|
-
|
|
464
|
-
console.debug(
|
|
465
|
-
throw
|
|
534
|
+
response_7 = _c.sent();
|
|
535
|
+
console.debug(response_7);
|
|
536
|
+
throw response_7;
|
|
466
537
|
case 7: return [2 /*return*/];
|
|
467
538
|
}
|
|
468
539
|
});
|
|
@@ -488,7 +559,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
488
559
|
*/
|
|
489
560
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
|
|
490
561
|
return __awaiter(this, void 0, void 0, function () {
|
|
491
|
-
var queryParameters, headerParameters, token, tokenString, response,
|
|
562
|
+
var queryParameters, headerParameters, token, tokenString, response, response_8;
|
|
492
563
|
return __generator(this, function (_a) {
|
|
493
564
|
switch (_a.label) {
|
|
494
565
|
case 0:
|
|
@@ -521,9 +592,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
521
592
|
response = _a.sent();
|
|
522
593
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
523
594
|
case 4:
|
|
524
|
-
|
|
525
|
-
console.debug(
|
|
526
|
-
throw
|
|
595
|
+
response_8 = _a.sent();
|
|
596
|
+
console.debug(response_8);
|
|
597
|
+
throw response_8;
|
|
527
598
|
case 5: return [2 /*return*/];
|
|
528
599
|
}
|
|
529
600
|
});
|
|
@@ -544,12 +615,81 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
544
615
|
});
|
|
545
616
|
});
|
|
546
617
|
};
|
|
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
|
+
};
|
|
547
687
|
/**
|
|
548
688
|
* Delete this product type from restricted user product types
|
|
549
689
|
*/
|
|
550
690
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
|
|
551
691
|
return __awaiter(this, void 0, void 0, function () {
|
|
552
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
692
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_10;
|
|
553
693
|
return __generator(this, function (_c) {
|
|
554
694
|
switch (_c.label) {
|
|
555
695
|
case 0:
|
|
@@ -590,9 +730,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
590
730
|
response = _c.sent();
|
|
591
731
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
592
732
|
case 6:
|
|
593
|
-
|
|
594
|
-
console.debug(
|
|
595
|
-
throw
|
|
733
|
+
response_10 = _c.sent();
|
|
734
|
+
console.debug(response_10);
|
|
735
|
+
throw response_10;
|
|
596
736
|
case 7: return [2 /*return*/];
|
|
597
737
|
}
|
|
598
738
|
});
|
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { NotificationTypeLink, ProductTypeLink, UserFeature } from '../models/index';
|
|
13
|
+
import type { NotificationTypeLink, ProductStorageTypeLink, 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
|
+
}
|
|
20
23
|
export interface GetUserRestrictedProductTypesRequest {
|
|
21
24
|
userId: number;
|
|
22
25
|
}
|
|
@@ -32,6 +35,14 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
|
|
|
32
35
|
* Get notifications that will not be pushed outside the system (eg. mail)
|
|
33
36
|
*/
|
|
34
37
|
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>;
|
|
35
46
|
/**
|
|
36
47
|
* Get user restricted features
|
|
37
48
|
*/
|
|
@@ -48,6 +59,14 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
|
|
|
48
59
|
* Get that will not be pushed outside the system (eg. mail)
|
|
49
60
|
*/
|
|
50
61
|
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>;
|
|
51
70
|
/**
|
|
52
71
|
* Get user restricted product types
|
|
53
72
|
*/
|
|
@@ -151,12 +151,88 @@ 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
|
+
};
|
|
154
230
|
/**
|
|
155
231
|
* Get user restricted features
|
|
156
232
|
*/
|
|
157
233
|
SearchUserRestrictionApi.prototype.getUserRestrictedFeaturesRaw = function (requestParameters, initOverrides) {
|
|
158
234
|
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
235
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_3;
|
|
160
236
|
return __generator(this, function (_c) {
|
|
161
237
|
switch (_c.label) {
|
|
162
238
|
case 0:
|
|
@@ -205,9 +281,9 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
205
281
|
}
|
|
206
282
|
return [3 /*break*/, 7];
|
|
207
283
|
case 6:
|
|
208
|
-
|
|
209
|
-
console.debug(
|
|
210
|
-
throw
|
|
284
|
+
response_3 = _c.sent();
|
|
285
|
+
console.debug(response_3);
|
|
286
|
+
throw response_3;
|
|
211
287
|
case 7: return [2 /*return*/];
|
|
212
288
|
}
|
|
213
289
|
});
|
|
@@ -235,7 +311,7 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
235
311
|
*/
|
|
236
312
|
SearchUserRestrictionApi.prototype.getUserRestrictedNotificationTypesRaw = function (requestParameters, initOverrides) {
|
|
237
313
|
return __awaiter(this, void 0, void 0, function () {
|
|
238
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
314
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_4;
|
|
239
315
|
return __generator(this, function (_c) {
|
|
240
316
|
switch (_c.label) {
|
|
241
317
|
case 0:
|
|
@@ -284,9 +360,9 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
284
360
|
}
|
|
285
361
|
return [3 /*break*/, 7];
|
|
286
362
|
case 6:
|
|
287
|
-
|
|
288
|
-
console.debug(
|
|
289
|
-
throw
|
|
363
|
+
response_4 = _c.sent();
|
|
364
|
+
console.debug(response_4);
|
|
365
|
+
throw response_4;
|
|
290
366
|
case 7: return [2 /*return*/];
|
|
291
367
|
}
|
|
292
368
|
});
|
|
@@ -309,12 +385,91 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
309
385
|
});
|
|
310
386
|
});
|
|
311
387
|
};
|
|
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
|
+
};
|
|
312
467
|
/**
|
|
313
468
|
* Get user restricted product types
|
|
314
469
|
*/
|
|
315
470
|
SearchUserRestrictionApi.prototype.getUserRestrictedProductTypesRaw = function (requestParameters, initOverrides) {
|
|
316
471
|
return __awaiter(this, void 0, void 0, function () {
|
|
317
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
472
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_6;
|
|
318
473
|
return __generator(this, function (_c) {
|
|
319
474
|
switch (_c.label) {
|
|
320
475
|
case 0:
|
|
@@ -363,9 +518,9 @@ var SearchUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
363
518
|
}
|
|
364
519
|
return [3 /*break*/, 7];
|
|
365
520
|
case 6:
|
|
366
|
-
|
|
367
|
-
console.debug(
|
|
368
|
-
throw
|
|
521
|
+
response_6 = _c.sent();
|
|
522
|
+
console.debug(response_6);
|
|
523
|
+
throw response_6;
|
|
369
524
|
case 7: return [2 /*return*/];
|
|
370
525
|
}
|
|
371
526
|
});
|