@lcdp/api-react-rest-client 3.1.10 → 3.1.11-develop.24569946879
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 +6 -6
- package/catalog/src/models/ProductInsight.js +6 -6
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.d.ts +8 -6
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.js +6 -4
- package/catalog/src/models/ProductSecondaryType.d.ts +25 -0
- package/catalog/src/models/ProductSecondaryType.js +48 -0
- package/catalog/src/models/ProductType.d.ts +28 -0
- package/catalog/src/models/ProductType.js +51 -0
- package/catalog/src/models/index.d.ts +2 -2
- package/catalog/src/models/index.js +2 -2
- package/factory/src/models/Product.d.ts +4 -3
- package/factory/src/models/Product.js +3 -2
- package/factory/src/models/ProductType.d.ts +28 -0
- package/factory/src/models/ProductType.js +51 -0
- package/factory/src/models/index.d.ts +1 -0
- package/factory/src/models/index.js +1 -0
- package/package.json +1 -1
- package/product/src/apis/ManageProductApi.d.ts +2 -2
- package/product/src/apis/ManageProductApi.js +2 -2
- package/product/src/apis/index.d.ts +0 -1
- package/product/src/apis/index.js +0 -1
- package/product/src/models/ProductCreationOrUpdateParameters.d.ts +8 -6
- package/product/src/models/ProductCreationOrUpdateParameters.js +6 -4
- package/product/src/models/ProductSecondaryType.d.ts +7 -19
- package/product/src/models/ProductSecondaryType.js +18 -17
- package/product/src/models/ProductType.d.ts +10 -19
- package/product/src/models/ProductType.js +21 -17
- package/shopping-cart/src/apis/ManageCartApi.d.ts +16 -0
- package/shopping-cart/src/apis/ManageCartApi.js +82 -4
- package/shopping-cart/src/apis/SearchCartApi.d.ts +1 -0
- package/shopping-cart/src/apis/SearchCartApi.js +3 -0
- package/user/src/apis/ManageUserRestrictionApi.d.ts +1 -25
- package/user/src/apis/ManageUserRestrictionApi.js +12 -152
- package/user/src/apis/SearchUserRestrictionApi.d.ts +1 -12
- package/user/src/apis/SearchUserRestrictionApi.js +0 -79
- package/user/src/models/ProductType.d.ts +28 -0
- package/user/src/models/ProductType.js +51 -0
- package/user/src/models/RestrictedProductType.d.ts +45 -0
- package/user/src/models/RestrictedProductType.js +54 -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 +2 -2
- package/user/src/models/index.js +2 -2
- package/catalog/src/models/ProductSecondaryTypeLink.d.ts +0 -43
- package/catalog/src/models/ProductSecondaryTypeLink.js +0 -51
- package/catalog/src/models/ProductTypeLink.d.ts +0 -43
- package/catalog/src/models/ProductTypeLink.js +0 -51
- package/product/src/apis/SearchProductMetadataApi.d.ts +0 -56
- package/product/src/apis/SearchProductMetadataApi.js +0 -390
- package/user/src/models/ProductTypeLink.d.ts +0 -43
- package/user/src/models/ProductTypeLink.js +0 -51
- package/user/src/models/UserRestrictedProductTypeCreationParameter.d.ts +0 -31
- package/user/src/models/UserRestrictedProductTypeCreationParameter.js +0 -47
|
@@ -13,12 +13,25 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductSecondaryTypeToJSON = exports.ProductSecondaryTypeFromJSONTyped = exports.ProductSecondaryTypeFromJSON = exports.instanceOfProductSecondaryType = void 0;
|
|
16
|
+
exports.ProductSecondaryTypeToJSON = exports.ProductSecondaryTypeFromJSONTyped = exports.ProductSecondaryTypeFromJSON = exports.instanceOfProductSecondaryType = exports.ProductSecondaryType = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
19
20
|
*/
|
|
21
|
+
exports.ProductSecondaryType = {
|
|
22
|
+
OTC: 'OTC',
|
|
23
|
+
VIGNETTE: 'VIGNETTE',
|
|
24
|
+
NR: 'NR'
|
|
25
|
+
};
|
|
20
26
|
function instanceOfProductSecondaryType(value) {
|
|
21
|
-
|
|
27
|
+
for (var key in exports.ProductSecondaryType) {
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(exports.ProductSecondaryType, key)) {
|
|
29
|
+
if (exports.ProductSecondaryType[key] === value) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
22
35
|
}
|
|
23
36
|
exports.instanceOfProductSecondaryType = instanceOfProductSecondaryType;
|
|
24
37
|
function ProductSecondaryTypeFromJSON(json) {
|
|
@@ -26,22 +39,10 @@ function ProductSecondaryTypeFromJSON(json) {
|
|
|
26
39
|
}
|
|
27
40
|
exports.ProductSecondaryTypeFromJSON = ProductSecondaryTypeFromJSON;
|
|
28
41
|
function ProductSecondaryTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
-
|
|
30
|
-
return json;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
'id': json['id'],
|
|
34
|
-
'name': json['name'],
|
|
35
|
-
};
|
|
42
|
+
return json;
|
|
36
43
|
}
|
|
37
44
|
exports.ProductSecondaryTypeFromJSONTyped = ProductSecondaryTypeFromJSONTyped;
|
|
38
45
|
function ProductSecondaryTypeToJSON(value) {
|
|
39
|
-
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'id': value['id'],
|
|
44
|
-
'name': value['name'],
|
|
45
|
-
};
|
|
46
|
+
return value;
|
|
46
47
|
}
|
|
47
48
|
exports.ProductSecondaryTypeToJSON = ProductSecondaryTypeToJSON;
|
|
@@ -12,26 +12,17 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface ProductType
|
|
16
15
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* @memberof ProductType
|
|
28
|
-
*/
|
|
29
|
-
name?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the ProductType interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfProductType(value: object): value is ProductType;
|
|
16
|
+
export declare const ProductType: {
|
|
17
|
+
readonly PARAPHARMACIE: "PARAPHARMACIE";
|
|
18
|
+
readonly DM: "DM";
|
|
19
|
+
readonly MEDICAMENT: "MEDICAMENT";
|
|
20
|
+
readonly HOMEOPATHIE: "HOMEOPATHIE";
|
|
21
|
+
readonly VETERINAIRE: "VETERINAIRE";
|
|
22
|
+
readonly COMPLEMENT: "COMPLEMENT";
|
|
23
|
+
};
|
|
24
|
+
export declare type ProductType = typeof ProductType[keyof typeof ProductType];
|
|
25
|
+
export declare function instanceOfProductType(value: any): boolean;
|
|
35
26
|
export declare function ProductTypeFromJSON(json: any): ProductType;
|
|
36
27
|
export declare function ProductTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductType;
|
|
37
28
|
export declare function ProductTypeToJSON(value?: ProductType | null): any;
|
|
@@ -13,12 +13,28 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = void 0;
|
|
16
|
+
exports.ProductTypeToJSON = exports.ProductTypeFromJSONTyped = exports.ProductTypeFromJSON = exports.instanceOfProductType = exports.ProductType = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
19
20
|
*/
|
|
21
|
+
exports.ProductType = {
|
|
22
|
+
PARAPHARMACIE: 'PARAPHARMACIE',
|
|
23
|
+
DM: 'DM',
|
|
24
|
+
MEDICAMENT: 'MEDICAMENT',
|
|
25
|
+
HOMEOPATHIE: 'HOMEOPATHIE',
|
|
26
|
+
VETERINAIRE: 'VETERINAIRE',
|
|
27
|
+
COMPLEMENT: 'COMPLEMENT'
|
|
28
|
+
};
|
|
20
29
|
function instanceOfProductType(value) {
|
|
21
|
-
|
|
30
|
+
for (var key in exports.ProductType) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(exports.ProductType, key)) {
|
|
32
|
+
if (exports.ProductType[key] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
22
38
|
}
|
|
23
39
|
exports.instanceOfProductType = instanceOfProductType;
|
|
24
40
|
function ProductTypeFromJSON(json) {
|
|
@@ -26,22 +42,10 @@ function ProductTypeFromJSON(json) {
|
|
|
26
42
|
}
|
|
27
43
|
exports.ProductTypeFromJSON = ProductTypeFromJSON;
|
|
28
44
|
function ProductTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
-
|
|
30
|
-
return json;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
'id': json['id'],
|
|
34
|
-
'name': json['name'],
|
|
35
|
-
};
|
|
45
|
+
return json;
|
|
36
46
|
}
|
|
37
47
|
exports.ProductTypeFromJSONTyped = ProductTypeFromJSONTyped;
|
|
38
48
|
function ProductTypeToJSON(value) {
|
|
39
|
-
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'id': value['id'],
|
|
44
|
-
'name': value['name'],
|
|
45
|
-
};
|
|
49
|
+
return value;
|
|
46
50
|
}
|
|
47
51
|
exports.ProductTypeToJSON = ProductTypeToJSON;
|
|
@@ -17,6 +17,12 @@ export interface CreateOrUpdateCartsRequest {
|
|
|
17
17
|
export interface DeleteCartRequest {
|
|
18
18
|
cartId: number;
|
|
19
19
|
}
|
|
20
|
+
export interface DeleteCartsRequest {
|
|
21
|
+
idEq?: Array<number>;
|
|
22
|
+
oEq?: Array<number>;
|
|
23
|
+
sEq?: Array<number>;
|
|
24
|
+
channelEq?: Array<string>;
|
|
25
|
+
}
|
|
20
26
|
export interface UpdateCartsRequest {
|
|
21
27
|
idEq: Array<number>;
|
|
22
28
|
xChannelConflictResolution?: UpdateCartsXChannelConflictResolutionEnum;
|
|
@@ -46,6 +52,16 @@ export declare class ManageCartApi extends runtime.BaseAPI {
|
|
|
46
52
|
* Delete a cart
|
|
47
53
|
*/
|
|
48
54
|
deleteCart(requestParameters: DeleteCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Delete multiple carts
|
|
57
|
+
* Delete carts
|
|
58
|
+
*/
|
|
59
|
+
deleteCartsRaw(requestParameters: DeleteCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
60
|
+
/**
|
|
61
|
+
* Delete multiple carts
|
|
62
|
+
* Delete carts
|
|
63
|
+
*/
|
|
64
|
+
deleteCarts(requestParameters?: DeleteCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
49
65
|
/**
|
|
50
66
|
* Update multiple carts identified by their IDs. Currently supports channel updates with optional conflict resolution (merge or replace strategy). If no update parameters are provided, returns the carts unchanged.
|
|
51
67
|
* Update carts
|
|
@@ -226,13 +226,91 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
226
226
|
});
|
|
227
227
|
});
|
|
228
228
|
};
|
|
229
|
+
/**
|
|
230
|
+
* Delete multiple carts
|
|
231
|
+
* Delete carts
|
|
232
|
+
*/
|
|
233
|
+
ManageCartApi.prototype.deleteCartsRaw = function (requestParameters, initOverrides) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_3;
|
|
236
|
+
return __generator(this, function (_c) {
|
|
237
|
+
switch (_c.label) {
|
|
238
|
+
case 0:
|
|
239
|
+
queryParameters = {};
|
|
240
|
+
if (requestParameters['idEq'] != null) {
|
|
241
|
+
queryParameters['id[eq]'] = requestParameters['idEq'];
|
|
242
|
+
}
|
|
243
|
+
if (requestParameters['oEq'] != null) {
|
|
244
|
+
queryParameters['o[eq]'] = requestParameters['oEq'];
|
|
245
|
+
}
|
|
246
|
+
if (requestParameters['sEq'] != null) {
|
|
247
|
+
queryParameters['s[eq]'] = requestParameters['sEq'];
|
|
248
|
+
}
|
|
249
|
+
if (requestParameters['channelEq'] != null) {
|
|
250
|
+
queryParameters['channel[eq]'] = requestParameters['channelEq'];
|
|
251
|
+
}
|
|
252
|
+
headerParameters = {};
|
|
253
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
254
|
+
_a = headerParameters;
|
|
255
|
+
_b = "x-api-key";
|
|
256
|
+
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
257
|
+
case 1:
|
|
258
|
+
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
259
|
+
_c.label = 2;
|
|
260
|
+
case 2:
|
|
261
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
262
|
+
token = this.configuration.accessToken;
|
|
263
|
+
return [4 /*yield*/, token("bearerAuth", [])];
|
|
264
|
+
case 3:
|
|
265
|
+
tokenString = _c.sent();
|
|
266
|
+
if (tokenString) {
|
|
267
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
268
|
+
}
|
|
269
|
+
_c.label = 4;
|
|
270
|
+
case 4:
|
|
271
|
+
_c.trys.push([4, 6, , 7]);
|
|
272
|
+
return [4 /*yield*/, this.request({
|
|
273
|
+
path: "/carts",
|
|
274
|
+
method: 'DELETE',
|
|
275
|
+
headers: headerParameters,
|
|
276
|
+
query: queryParameters,
|
|
277
|
+
}, initOverrides)];
|
|
278
|
+
case 5:
|
|
279
|
+
response = _c.sent();
|
|
280
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
281
|
+
case 6:
|
|
282
|
+
response_3 = _c.sent();
|
|
283
|
+
console.debug(response_3);
|
|
284
|
+
throw response_3;
|
|
285
|
+
case 7: return [2 /*return*/];
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Delete multiple carts
|
|
292
|
+
* Delete carts
|
|
293
|
+
*/
|
|
294
|
+
ManageCartApi.prototype.deleteCarts = function (requestParameters, initOverrides) {
|
|
295
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
296
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
297
|
+
return __generator(this, function (_a) {
|
|
298
|
+
switch (_a.label) {
|
|
299
|
+
case 0: return [4 /*yield*/, this.deleteCartsRaw(requestParameters, initOverrides)];
|
|
300
|
+
case 1:
|
|
301
|
+
_a.sent();
|
|
302
|
+
return [2 /*return*/];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
};
|
|
229
307
|
/**
|
|
230
308
|
* Update multiple carts identified by their IDs. Currently supports channel updates with optional conflict resolution (merge or replace strategy). If no update parameters are provided, returns the carts unchanged.
|
|
231
309
|
* Update carts
|
|
232
310
|
*/
|
|
233
311
|
ManageCartApi.prototype.updateCartsRaw = function (requestParameters, initOverrides) {
|
|
234
312
|
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
313
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_4;
|
|
236
314
|
return __generator(this, function (_c) {
|
|
237
315
|
switch (_c.label) {
|
|
238
316
|
case 0:
|
|
@@ -289,9 +367,9 @@ var ManageCartApi = /** @class */ (function (_super) {
|
|
|
289
367
|
}
|
|
290
368
|
return [3 /*break*/, 7];
|
|
291
369
|
case 6:
|
|
292
|
-
|
|
293
|
-
console.debug(
|
|
294
|
-
throw
|
|
370
|
+
response_4 = _c.sent();
|
|
371
|
+
console.debug(response_4);
|
|
372
|
+
throw response_4;
|
|
295
373
|
case 7: return [2 /*return*/];
|
|
296
374
|
}
|
|
297
375
|
});
|
|
@@ -167,6 +167,9 @@ var SearchCartApi = /** @class */ (function (_super) {
|
|
|
167
167
|
switch (_c.label) {
|
|
168
168
|
case 0:
|
|
169
169
|
queryParameters = {};
|
|
170
|
+
if (requestParameters['idEq'] != null) {
|
|
171
|
+
queryParameters['id[eq]'] = requestParameters['idEq'];
|
|
172
|
+
}
|
|
170
173
|
if (requestParameters['oEq'] != null) {
|
|
171
174
|
queryParameters['o[eq]'] = requestParameters['oEq'];
|
|
172
175
|
}
|
|
@@ -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 } 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 CreateUserRestrictedProductTypeRequest {
|
|
26
|
-
userId: number;
|
|
27
|
-
userRestrictedProductTypeCreationParameter: UserRestrictedProductTypeCreationParameter;
|
|
28
|
-
}
|
|
29
25
|
export interface DeleteCurrentUserRestrictedNotificationTypeRequest {
|
|
30
26
|
notificationTypeId: NotificationTypeId;
|
|
31
27
|
}
|
|
@@ -37,10 +33,6 @@ export interface DeleteUserRestrictedNotificationTypeRequest {
|
|
|
37
33
|
userId: number;
|
|
38
34
|
notificationTypeId: NotificationTypeId;
|
|
39
35
|
}
|
|
40
|
-
export interface DeleteUserRestrictedProductTypeRequest {
|
|
41
|
-
userId: number;
|
|
42
|
-
productTypeId: string;
|
|
43
|
-
}
|
|
44
36
|
/**
|
|
45
37
|
*
|
|
46
38
|
*/
|
|
@@ -69,14 +61,6 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
|
|
|
69
61
|
* Add this notification type in restricted user notification types
|
|
70
62
|
*/
|
|
71
63
|
createUserRestrictedNotificationType(requestParameters: CreateUserRestrictedNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Add this product type in restricted user product types
|
|
74
|
-
*/
|
|
75
|
-
createUserRestrictedProductTypeRaw(requestParameters: CreateUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
76
|
-
/**
|
|
77
|
-
* Add this product type in restricted user product types
|
|
78
|
-
*/
|
|
79
|
-
createUserRestrictedProductType(requestParameters: CreateUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
80
64
|
/**
|
|
81
65
|
* Delete this notification type from restricted user notification types
|
|
82
66
|
*/
|
|
@@ -101,12 +85,4 @@ export declare class ManageUserRestrictionApi extends runtime.BaseAPI {
|
|
|
101
85
|
* Delete this notification type from restricted user notification types
|
|
102
86
|
*/
|
|
103
87
|
deleteUserRestrictedNotificationType(requestParameters: DeleteUserRestrictedNotificationTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Delete this product type from restricted user product types
|
|
106
|
-
*/
|
|
107
|
-
deleteUserRestrictedProductTypeRaw(requestParameters: DeleteUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
108
|
-
/**
|
|
109
|
-
* Delete this product type from restricted user product types
|
|
110
|
-
*/
|
|
111
|
-
deleteUserRestrictedProductType(requestParameters: DeleteUserRestrictedProductTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
112
88
|
}
|
|
@@ -285,83 +285,12 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
285
285
|
});
|
|
286
286
|
});
|
|
287
287
|
};
|
|
288
|
-
/**
|
|
289
|
-
* Add this product type in restricted user product types
|
|
290
|
-
*/
|
|
291
|
-
ManageUserRestrictionApi.prototype.createUserRestrictedProductTypeRaw = 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 createUserRestrictedProductType().');
|
|
299
|
-
}
|
|
300
|
-
if (requestParameters['userRestrictedProductTypeCreationParameter'] == null) {
|
|
301
|
-
throw new runtime.RequiredError('userRestrictedProductTypeCreationParameter', 'Required parameter "userRestrictedProductTypeCreationParameter" was null or undefined when calling createUserRestrictedProductType().');
|
|
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-types".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
|
|
327
|
-
method: 'POST',
|
|
328
|
-
headers: headerParameters,
|
|
329
|
-
query: queryParameters,
|
|
330
|
-
body: (0, index_1.UserRestrictedProductTypeCreationParameterToJSON)(requestParameters['userRestrictedProductTypeCreationParameter']),
|
|
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 type in restricted user product types
|
|
346
|
-
*/
|
|
347
|
-
ManageUserRestrictionApi.prototype.createUserRestrictedProductType = 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.createUserRestrictedProductTypeRaw(requestParameters, initOverrides)];
|
|
352
|
-
case 1:
|
|
353
|
-
_a.sent();
|
|
354
|
-
return [2 /*return*/];
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
});
|
|
358
|
-
};
|
|
359
288
|
/**
|
|
360
289
|
* Delete this notification type from restricted user notification types
|
|
361
290
|
*/
|
|
362
291
|
ManageUserRestrictionApi.prototype.deleteCurrentUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
|
|
363
292
|
return __awaiter(this, void 0, void 0, function () {
|
|
364
|
-
var queryParameters, headerParameters, token, tokenString, response,
|
|
293
|
+
var queryParameters, headerParameters, token, tokenString, response, response_4;
|
|
365
294
|
return __generator(this, function (_a) {
|
|
366
295
|
switch (_a.label) {
|
|
367
296
|
case 0:
|
|
@@ -391,9 +320,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
391
320
|
response = _a.sent();
|
|
392
321
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
393
322
|
case 4:
|
|
394
|
-
|
|
395
|
-
console.debug(
|
|
396
|
-
throw
|
|
323
|
+
response_4 = _a.sent();
|
|
324
|
+
console.debug(response_4);
|
|
325
|
+
throw response_4;
|
|
397
326
|
case 5: return [2 /*return*/];
|
|
398
327
|
}
|
|
399
328
|
});
|
|
@@ -419,7 +348,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
419
348
|
*/
|
|
420
349
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedFeatureRaw = function (requestParameters, initOverrides) {
|
|
421
350
|
return __awaiter(this, void 0, void 0, function () {
|
|
422
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response,
|
|
351
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_5;
|
|
423
352
|
return __generator(this, function (_c) {
|
|
424
353
|
switch (_c.label) {
|
|
425
354
|
case 0:
|
|
@@ -460,9 +389,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
460
389
|
response = _c.sent();
|
|
461
390
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
462
391
|
case 6:
|
|
463
|
-
|
|
464
|
-
console.debug(
|
|
465
|
-
throw
|
|
392
|
+
response_5 = _c.sent();
|
|
393
|
+
console.debug(response_5);
|
|
394
|
+
throw response_5;
|
|
466
395
|
case 7: return [2 /*return*/];
|
|
467
396
|
}
|
|
468
397
|
});
|
|
@@ -488,7 +417,7 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
488
417
|
*/
|
|
489
418
|
ManageUserRestrictionApi.prototype.deleteUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
|
|
490
419
|
return __awaiter(this, void 0, void 0, function () {
|
|
491
|
-
var queryParameters, headerParameters, token, tokenString, response,
|
|
420
|
+
var queryParameters, headerParameters, token, tokenString, response, response_6;
|
|
492
421
|
return __generator(this, function (_a) {
|
|
493
422
|
switch (_a.label) {
|
|
494
423
|
case 0:
|
|
@@ -521,9 +450,9 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
521
450
|
response = _a.sent();
|
|
522
451
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
523
452
|
case 4:
|
|
524
|
-
|
|
525
|
-
console.debug(
|
|
526
|
-
throw
|
|
453
|
+
response_6 = _a.sent();
|
|
454
|
+
console.debug(response_6);
|
|
455
|
+
throw response_6;
|
|
527
456
|
case 5: return [2 /*return*/];
|
|
528
457
|
}
|
|
529
458
|
});
|
|
@@ -544,75 +473,6 @@ var ManageUserRestrictionApi = /** @class */ (function (_super) {
|
|
|
544
473
|
});
|
|
545
474
|
});
|
|
546
475
|
};
|
|
547
|
-
/**
|
|
548
|
-
* Delete this product type from restricted user product types
|
|
549
|
-
*/
|
|
550
|
-
ManageUserRestrictionApi.prototype.deleteUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
|
|
551
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
552
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_8;
|
|
553
|
-
return __generator(this, function (_c) {
|
|
554
|
-
switch (_c.label) {
|
|
555
|
-
case 0:
|
|
556
|
-
if (requestParameters['userId'] == null) {
|
|
557
|
-
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserRestrictedProductType().');
|
|
558
|
-
}
|
|
559
|
-
if (requestParameters['productTypeId'] == null) {
|
|
560
|
-
throw new runtime.RequiredError('productTypeId', 'Required parameter "productTypeId" was null or undefined when calling deleteUserRestrictedProductType().');
|
|
561
|
-
}
|
|
562
|
-
queryParameters = {};
|
|
563
|
-
headerParameters = {};
|
|
564
|
-
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
565
|
-
_a = headerParameters;
|
|
566
|
-
_b = "x-api-key";
|
|
567
|
-
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
568
|
-
case 1:
|
|
569
|
-
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
570
|
-
_c.label = 2;
|
|
571
|
-
case 2:
|
|
572
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
573
|
-
token = this.configuration.accessToken;
|
|
574
|
-
return [4 /*yield*/, token("bearerAuth", [])];
|
|
575
|
-
case 3:
|
|
576
|
-
tokenString = _c.sent();
|
|
577
|
-
if (tokenString) {
|
|
578
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
579
|
-
}
|
|
580
|
-
_c.label = 4;
|
|
581
|
-
case 4:
|
|
582
|
-
_c.trys.push([4, 6, , 7]);
|
|
583
|
-
return [4 /*yield*/, this.request({
|
|
584
|
-
path: "/users/{userId}/restricted-product-types/{productTypeId}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("productTypeId", "}"), encodeURIComponent(String(requestParameters['productTypeId']))),
|
|
585
|
-
method: 'DELETE',
|
|
586
|
-
headers: headerParameters,
|
|
587
|
-
query: queryParameters,
|
|
588
|
-
}, initOverrides)];
|
|
589
|
-
case 5:
|
|
590
|
-
response = _c.sent();
|
|
591
|
-
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
592
|
-
case 6:
|
|
593
|
-
response_8 = _c.sent();
|
|
594
|
-
console.debug(response_8);
|
|
595
|
-
throw response_8;
|
|
596
|
-
case 7: return [2 /*return*/];
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
});
|
|
600
|
-
};
|
|
601
|
-
/**
|
|
602
|
-
* Delete this product type from restricted user product types
|
|
603
|
-
*/
|
|
604
|
-
ManageUserRestrictionApi.prototype.deleteUserRestrictedProductType = function (requestParameters, initOverrides) {
|
|
605
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
606
|
-
return __generator(this, function (_a) {
|
|
607
|
-
switch (_a.label) {
|
|
608
|
-
case 0: return [4 /*yield*/, this.deleteUserRestrictedProductTypeRaw(requestParameters, initOverrides)];
|
|
609
|
-
case 1:
|
|
610
|
-
_a.sent();
|
|
611
|
-
return [2 /*return*/];
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
});
|
|
615
|
-
};
|
|
616
476
|
return ManageUserRestrictionApi;
|
|
617
477
|
}(runtime.BaseAPI));
|
|
618
478
|
exports.ManageUserRestrictionApi = ManageUserRestrictionApi;
|
|
@@ -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, 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 GetUserRestrictedProductTypesRequest {
|
|
21
|
-
userId: number;
|
|
22
|
-
}
|
|
23
20
|
/**
|
|
24
21
|
*
|
|
25
22
|
*/
|
|
@@ -48,12 +45,4 @@ export declare class SearchUserRestrictionApi extends runtime.BaseAPI {
|
|
|
48
45
|
* Get that will not be pushed outside the system (eg. mail)
|
|
49
46
|
*/
|
|
50
47
|
getUserRestrictedNotificationTypes(requestParameters: GetUserRestrictedNotificationTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<NotificationTypeLink> | runtime.BlobWithMeta>;
|
|
51
|
-
/**
|
|
52
|
-
* Get user restricted product types
|
|
53
|
-
*/
|
|
54
|
-
getUserRestrictedProductTypesRaw(requestParameters: GetUserRestrictedProductTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProductTypeLink> | runtime.BlobWithMeta>>;
|
|
55
|
-
/**
|
|
56
|
-
* Get user restricted product types
|
|
57
|
-
*/
|
|
58
|
-
getUserRestrictedProductTypes(requestParameters: GetUserRestrictedProductTypesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductTypeLink> | runtime.BlobWithMeta>;
|
|
59
48
|
}
|