@thelllabs/winehaus-sdk 0.0.3 → 0.0.4
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/dist/cjs/api/api.js +94 -6
- package/dist/esm/api/api.js +93 -5
- package/dist/types/api/api.d.ts +248 -11
- package/dist/umd/index.ts +94 -6
- package/package.json +1 -1
package/dist/cjs/api/api.js
CHANGED
|
@@ -85,13 +85,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
85
85
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
86
86
|
};
|
|
87
87
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
88
|
-
exports.Api = exports.HttpClient = exports.ContentType = exports.TenantUserEntityDtoStatusEnum = exports.TenantUserEntityDtoRolesEnum = exports.CreateTenantUserDtoRolesEnum = void 0;
|
|
88
|
+
exports.Api = exports.HttpClient = exports.ContentType = exports.TenantUserEntityDtoStatusEnum = exports.TenantUserEntityDtoRolesEnum = exports.OrderByEnum = exports.ListTenantUsersParamsStatusEnum = exports.ListTenantUsersParamsRolesEnum = exports.CreateTenantUserDtoRolesEnum = void 0;
|
|
89
89
|
var CreateTenantUserDtoRolesEnum;
|
|
90
90
|
(function (CreateTenantUserDtoRolesEnum) {
|
|
91
91
|
CreateTenantUserDtoRolesEnum["Operator"] = "operator";
|
|
92
92
|
CreateTenantUserDtoRolesEnum["Admin"] = "admin";
|
|
93
93
|
CreateTenantUserDtoRolesEnum["Owner"] = "owner";
|
|
94
94
|
})(CreateTenantUserDtoRolesEnum = exports.CreateTenantUserDtoRolesEnum || (exports.CreateTenantUserDtoRolesEnum = {}));
|
|
95
|
+
var ListTenantUsersParamsRolesEnum;
|
|
96
|
+
(function (ListTenantUsersParamsRolesEnum) {
|
|
97
|
+
ListTenantUsersParamsRolesEnum["Operator"] = "operator";
|
|
98
|
+
ListTenantUsersParamsRolesEnum["Admin"] = "admin";
|
|
99
|
+
ListTenantUsersParamsRolesEnum["Owner"] = "owner";
|
|
100
|
+
})(ListTenantUsersParamsRolesEnum = exports.ListTenantUsersParamsRolesEnum || (exports.ListTenantUsersParamsRolesEnum = {}));
|
|
101
|
+
var ListTenantUsersParamsStatusEnum;
|
|
102
|
+
(function (ListTenantUsersParamsStatusEnum) {
|
|
103
|
+
ListTenantUsersParamsStatusEnum["Enabled"] = "enabled";
|
|
104
|
+
ListTenantUsersParamsStatusEnum["Blocked"] = "blocked";
|
|
105
|
+
})(ListTenantUsersParamsStatusEnum = exports.ListTenantUsersParamsStatusEnum || (exports.ListTenantUsersParamsStatusEnum = {}));
|
|
106
|
+
var OrderByEnum;
|
|
107
|
+
(function (OrderByEnum) {
|
|
108
|
+
OrderByEnum["ASC"] = "ASC";
|
|
109
|
+
OrderByEnum["DESC"] = "DESC";
|
|
110
|
+
})(OrderByEnum = exports.OrderByEnum || (exports.OrderByEnum = {}));
|
|
95
111
|
var TenantUserEntityDtoRolesEnum;
|
|
96
112
|
(function (TenantUserEntityDtoRolesEnum) {
|
|
97
113
|
TenantUserEntityDtoRolesEnum["Operator"] = "operator";
|
|
@@ -272,21 +288,93 @@ var Api = /** @class */ (function (_super) {
|
|
|
272
288
|
return _this.request(__assign({ path: "/auth/signin", method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
273
289
|
},
|
|
274
290
|
};
|
|
291
|
+
_this.users = {
|
|
292
|
+
/**
|
|
293
|
+
* No description
|
|
294
|
+
*
|
|
295
|
+
* @tags Users
|
|
296
|
+
* @name UpdateUserPassword
|
|
297
|
+
* @request PATCH:/users/{userId}/password
|
|
298
|
+
* @secure
|
|
299
|
+
* @response `200` `UserEntityDto`
|
|
300
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
301
|
+
*/
|
|
302
|
+
updateUserPassword: function (userId, data, params) {
|
|
303
|
+
if (params === void 0) { params = {}; }
|
|
304
|
+
return _this.request(__assign({ path: "/users/".concat(userId, "/password"), method: "PATCH", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
305
|
+
},
|
|
306
|
+
/**
|
|
307
|
+
* No description
|
|
308
|
+
*
|
|
309
|
+
* @tags Users
|
|
310
|
+
* @name UpdateUserProfile
|
|
311
|
+
* @request PATCH:/users/{userId}
|
|
312
|
+
* @secure
|
|
313
|
+
* @response `200` `UserEntityDto`
|
|
314
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
315
|
+
*/
|
|
316
|
+
updateUserProfile: function (userId, data, params) {
|
|
317
|
+
if (params === void 0) { params = {}; }
|
|
318
|
+
return _this.request(__assign({ path: "/users/".concat(userId), method: "PATCH", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
319
|
+
},
|
|
320
|
+
};
|
|
275
321
|
_this.admin = {
|
|
276
322
|
/**
|
|
277
|
-
* @description Gives some user access to the tenant. If there's no account attached to this users, it creates a new one
|
|
323
|
+
* @description Gives some user access to the tenant. If there's no user account attached to this users, it creates a new one
|
|
278
324
|
*
|
|
279
|
-
* @tags Admin Users
|
|
280
|
-
* @name
|
|
325
|
+
* @tags Admin Tenant Users
|
|
326
|
+
* @name CreateOrUpdateTenantUserAndPermissionsByUserEmail
|
|
281
327
|
* @request POST:/admin/tenants/{tenantId}/users
|
|
282
328
|
* @secure
|
|
283
|
-
* @response `
|
|
329
|
+
* @response `200` `TenantUserEntityDto`
|
|
284
330
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
285
331
|
*/
|
|
286
|
-
|
|
332
|
+
createOrUpdateTenantUserAndPermissionsByUserEmail: function (tenantId, data, params) {
|
|
287
333
|
if (params === void 0) { params = {}; }
|
|
288
334
|
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users"), method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
289
335
|
},
|
|
336
|
+
/**
|
|
337
|
+
* No description
|
|
338
|
+
*
|
|
339
|
+
* @tags Admin Tenant Users
|
|
340
|
+
* @name DisableTenantUser
|
|
341
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/disable
|
|
342
|
+
* @secure
|
|
343
|
+
* @response `204` `void`
|
|
344
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
345
|
+
*/
|
|
346
|
+
disableTenantUser: function (tenantId, userId, params) {
|
|
347
|
+
if (params === void 0) { params = {}; }
|
|
348
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users/").concat(userId, "/disable"), method: "PATCH", secure: true }, params));
|
|
349
|
+
},
|
|
350
|
+
/**
|
|
351
|
+
* No description
|
|
352
|
+
*
|
|
353
|
+
* @tags Admin Tenant Users
|
|
354
|
+
* @name EnableTenantUser
|
|
355
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/enable
|
|
356
|
+
* @secure
|
|
357
|
+
* @response `204` `void`
|
|
358
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
359
|
+
*/
|
|
360
|
+
enableTenantUser: function (tenantId, userId, params) {
|
|
361
|
+
if (params === void 0) { params = {}; }
|
|
362
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users/").concat(userId, "/enable"), method: "PATCH", secure: true }, params));
|
|
363
|
+
},
|
|
364
|
+
/**
|
|
365
|
+
* No description
|
|
366
|
+
*
|
|
367
|
+
* @tags Admin Tenant Users
|
|
368
|
+
* @name ListTenantUsers
|
|
369
|
+
* @request GET:/admin/tenants/{tenantId}/users
|
|
370
|
+
* @secure
|
|
371
|
+
* @response `200` `TenantUserEntityPaginationDto`
|
|
372
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
373
|
+
*/
|
|
374
|
+
listTenantUsers: function (tenantId, query, params) {
|
|
375
|
+
if (params === void 0) { params = {}; }
|
|
376
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users"), method: "GET", query: query, secure: true, format: "json" }, params));
|
|
377
|
+
},
|
|
290
378
|
};
|
|
291
379
|
return _this;
|
|
292
380
|
}
|
package/dist/esm/api/api.js
CHANGED
|
@@ -86,6 +86,22 @@ export var CreateTenantUserDtoRolesEnum;
|
|
|
86
86
|
CreateTenantUserDtoRolesEnum["Admin"] = "admin";
|
|
87
87
|
CreateTenantUserDtoRolesEnum["Owner"] = "owner";
|
|
88
88
|
})(CreateTenantUserDtoRolesEnum || (CreateTenantUserDtoRolesEnum = {}));
|
|
89
|
+
export var ListTenantUsersParamsRolesEnum;
|
|
90
|
+
(function (ListTenantUsersParamsRolesEnum) {
|
|
91
|
+
ListTenantUsersParamsRolesEnum["Operator"] = "operator";
|
|
92
|
+
ListTenantUsersParamsRolesEnum["Admin"] = "admin";
|
|
93
|
+
ListTenantUsersParamsRolesEnum["Owner"] = "owner";
|
|
94
|
+
})(ListTenantUsersParamsRolesEnum || (ListTenantUsersParamsRolesEnum = {}));
|
|
95
|
+
export var ListTenantUsersParamsStatusEnum;
|
|
96
|
+
(function (ListTenantUsersParamsStatusEnum) {
|
|
97
|
+
ListTenantUsersParamsStatusEnum["Enabled"] = "enabled";
|
|
98
|
+
ListTenantUsersParamsStatusEnum["Blocked"] = "blocked";
|
|
99
|
+
})(ListTenantUsersParamsStatusEnum || (ListTenantUsersParamsStatusEnum = {}));
|
|
100
|
+
export var OrderByEnum;
|
|
101
|
+
(function (OrderByEnum) {
|
|
102
|
+
OrderByEnum["ASC"] = "ASC";
|
|
103
|
+
OrderByEnum["DESC"] = "DESC";
|
|
104
|
+
})(OrderByEnum || (OrderByEnum = {}));
|
|
89
105
|
export var TenantUserEntityDtoRolesEnum;
|
|
90
106
|
(function (TenantUserEntityDtoRolesEnum) {
|
|
91
107
|
TenantUserEntityDtoRolesEnum["Operator"] = "operator";
|
|
@@ -266,21 +282,93 @@ var Api = /** @class */ (function (_super) {
|
|
|
266
282
|
return _this.request(__assign({ path: "/auth/signin", method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
267
283
|
},
|
|
268
284
|
};
|
|
285
|
+
_this.users = {
|
|
286
|
+
/**
|
|
287
|
+
* No description
|
|
288
|
+
*
|
|
289
|
+
* @tags Users
|
|
290
|
+
* @name UpdateUserPassword
|
|
291
|
+
* @request PATCH:/users/{userId}/password
|
|
292
|
+
* @secure
|
|
293
|
+
* @response `200` `UserEntityDto`
|
|
294
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
295
|
+
*/
|
|
296
|
+
updateUserPassword: function (userId, data, params) {
|
|
297
|
+
if (params === void 0) { params = {}; }
|
|
298
|
+
return _this.request(__assign({ path: "/users/".concat(userId, "/password"), method: "PATCH", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
299
|
+
},
|
|
300
|
+
/**
|
|
301
|
+
* No description
|
|
302
|
+
*
|
|
303
|
+
* @tags Users
|
|
304
|
+
* @name UpdateUserProfile
|
|
305
|
+
* @request PATCH:/users/{userId}
|
|
306
|
+
* @secure
|
|
307
|
+
* @response `200` `UserEntityDto`
|
|
308
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
309
|
+
*/
|
|
310
|
+
updateUserProfile: function (userId, data, params) {
|
|
311
|
+
if (params === void 0) { params = {}; }
|
|
312
|
+
return _this.request(__assign({ path: "/users/".concat(userId), method: "PATCH", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
313
|
+
},
|
|
314
|
+
};
|
|
269
315
|
_this.admin = {
|
|
270
316
|
/**
|
|
271
|
-
* @description Gives some user access to the tenant. If there's no account attached to this users, it creates a new one
|
|
317
|
+
* @description Gives some user access to the tenant. If there's no user account attached to this users, it creates a new one
|
|
272
318
|
*
|
|
273
|
-
* @tags Admin Users
|
|
274
|
-
* @name
|
|
319
|
+
* @tags Admin Tenant Users
|
|
320
|
+
* @name CreateOrUpdateTenantUserAndPermissionsByUserEmail
|
|
275
321
|
* @request POST:/admin/tenants/{tenantId}/users
|
|
276
322
|
* @secure
|
|
277
|
-
* @response `
|
|
323
|
+
* @response `200` `TenantUserEntityDto`
|
|
278
324
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
279
325
|
*/
|
|
280
|
-
|
|
326
|
+
createOrUpdateTenantUserAndPermissionsByUserEmail: function (tenantId, data, params) {
|
|
281
327
|
if (params === void 0) { params = {}; }
|
|
282
328
|
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users"), method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
283
329
|
},
|
|
330
|
+
/**
|
|
331
|
+
* No description
|
|
332
|
+
*
|
|
333
|
+
* @tags Admin Tenant Users
|
|
334
|
+
* @name DisableTenantUser
|
|
335
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/disable
|
|
336
|
+
* @secure
|
|
337
|
+
* @response `204` `void`
|
|
338
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
339
|
+
*/
|
|
340
|
+
disableTenantUser: function (tenantId, userId, params) {
|
|
341
|
+
if (params === void 0) { params = {}; }
|
|
342
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users/").concat(userId, "/disable"), method: "PATCH", secure: true }, params));
|
|
343
|
+
},
|
|
344
|
+
/**
|
|
345
|
+
* No description
|
|
346
|
+
*
|
|
347
|
+
* @tags Admin Tenant Users
|
|
348
|
+
* @name EnableTenantUser
|
|
349
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/enable
|
|
350
|
+
* @secure
|
|
351
|
+
* @response `204` `void`
|
|
352
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
353
|
+
*/
|
|
354
|
+
enableTenantUser: function (tenantId, userId, params) {
|
|
355
|
+
if (params === void 0) { params = {}; }
|
|
356
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users/").concat(userId, "/enable"), method: "PATCH", secure: true }, params));
|
|
357
|
+
},
|
|
358
|
+
/**
|
|
359
|
+
* No description
|
|
360
|
+
*
|
|
361
|
+
* @tags Admin Tenant Users
|
|
362
|
+
* @name ListTenantUsers
|
|
363
|
+
* @request GET:/admin/tenants/{tenantId}/users
|
|
364
|
+
* @secure
|
|
365
|
+
* @response `200` `TenantUserEntityPaginationDto`
|
|
366
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
367
|
+
*/
|
|
368
|
+
listTenantUsers: function (tenantId, query, params) {
|
|
369
|
+
if (params === void 0) { params = {}; }
|
|
370
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users"), method: "GET", query: query, secure: true, format: "json" }, params));
|
|
371
|
+
},
|
|
284
372
|
};
|
|
285
373
|
return _this;
|
|
286
374
|
}
|
package/dist/types/api/api.d.ts
CHANGED
|
@@ -27,6 +27,41 @@ export interface HttpExceptionDto {
|
|
|
27
27
|
/** @example "2022-07-25T17:24:07.042Z" */
|
|
28
28
|
timestamp: string;
|
|
29
29
|
}
|
|
30
|
+
export declare enum ListTenantUsersParamsRolesEnum {
|
|
31
|
+
Operator = "operator",
|
|
32
|
+
Admin = "admin",
|
|
33
|
+
Owner = "owner"
|
|
34
|
+
}
|
|
35
|
+
export declare enum ListTenantUsersParamsStatusEnum {
|
|
36
|
+
Enabled = "enabled",
|
|
37
|
+
Blocked = "blocked"
|
|
38
|
+
}
|
|
39
|
+
export declare enum OrderByEnum {
|
|
40
|
+
ASC = "ASC",
|
|
41
|
+
DESC = "DESC"
|
|
42
|
+
}
|
|
43
|
+
export interface PaginationLinksDto {
|
|
44
|
+
/** @example "http://example.com?page=1" */
|
|
45
|
+
first?: string;
|
|
46
|
+
/** @example "http://example.com?page=3" */
|
|
47
|
+
last?: string;
|
|
48
|
+
/** @example "http://example.com?page=2" */
|
|
49
|
+
next?: string;
|
|
50
|
+
/** @example "http://example.com?page=1" */
|
|
51
|
+
prev?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface PaginationMetaDto {
|
|
54
|
+
/** @example 1 */
|
|
55
|
+
currentPage: number;
|
|
56
|
+
/** @example 1 */
|
|
57
|
+
itemCount: number;
|
|
58
|
+
/** @example 1 */
|
|
59
|
+
itemsPerPage: number;
|
|
60
|
+
/** @example 1 */
|
|
61
|
+
totalItems?: number;
|
|
62
|
+
/** @example 1 */
|
|
63
|
+
totalPages?: number;
|
|
64
|
+
}
|
|
30
65
|
export interface RequestPasswordResetDto {
|
|
31
66
|
email: string;
|
|
32
67
|
}
|
|
@@ -72,6 +107,25 @@ export declare enum TenantUserEntityDtoStatusEnum {
|
|
|
72
107
|
Enabled = "enabled",
|
|
73
108
|
Blocked = "blocked"
|
|
74
109
|
}
|
|
110
|
+
export interface TenantUserEntityPaginationDto {
|
|
111
|
+
items: TenantUserEntityDto[];
|
|
112
|
+
links?: PaginationLinksDto;
|
|
113
|
+
meta: PaginationMetaDto;
|
|
114
|
+
}
|
|
115
|
+
export interface UpdateUserPasswordDto {
|
|
116
|
+
/** @example "P@ssw0rd" */
|
|
117
|
+
currentPassword: string;
|
|
118
|
+
/**
|
|
119
|
+
* Password should include lowercase, uppercase and digits and have between 8 and 32 digits
|
|
120
|
+
* @example "P@ssw0rd"
|
|
121
|
+
*/
|
|
122
|
+
password: string;
|
|
123
|
+
/** @example "P@ssw0rd" */
|
|
124
|
+
passwordConfirmation: string;
|
|
125
|
+
}
|
|
126
|
+
export interface UpdateUserProfileDto {
|
|
127
|
+
name: string;
|
|
128
|
+
}
|
|
75
129
|
export interface UserEntityDto {
|
|
76
130
|
/** @format date-time */
|
|
77
131
|
createdAt?: string;
|
|
@@ -80,7 +134,7 @@ export interface UserEntityDto {
|
|
|
80
134
|
email: string;
|
|
81
135
|
/** @format uuid */
|
|
82
136
|
id: string;
|
|
83
|
-
name
|
|
137
|
+
name?: string | null;
|
|
84
138
|
/** @format date-time */
|
|
85
139
|
updatedAt: string;
|
|
86
140
|
}
|
|
@@ -146,17 +200,55 @@ export declare namespace Auth {
|
|
|
146
200
|
type ResponseBody = SigninResponseDto;
|
|
147
201
|
}
|
|
148
202
|
}
|
|
203
|
+
export declare namespace Users {
|
|
204
|
+
/**
|
|
205
|
+
* No description
|
|
206
|
+
* @tags Users
|
|
207
|
+
* @name UpdateUserPassword
|
|
208
|
+
* @request PATCH:/users/{userId}/password
|
|
209
|
+
* @secure
|
|
210
|
+
* @response `200` `UserEntityDto`
|
|
211
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
212
|
+
*/
|
|
213
|
+
namespace UpdateUserPassword {
|
|
214
|
+
type RequestParams = {
|
|
215
|
+
userId: string;
|
|
216
|
+
};
|
|
217
|
+
type RequestQuery = {};
|
|
218
|
+
type RequestBody = UpdateUserPasswordDto;
|
|
219
|
+
type RequestHeaders = {};
|
|
220
|
+
type ResponseBody = UserEntityDto;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* No description
|
|
224
|
+
* @tags Users
|
|
225
|
+
* @name UpdateUserProfile
|
|
226
|
+
* @request PATCH:/users/{userId}
|
|
227
|
+
* @secure
|
|
228
|
+
* @response `200` `UserEntityDto`
|
|
229
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
230
|
+
*/
|
|
231
|
+
namespace UpdateUserProfile {
|
|
232
|
+
type RequestParams = {
|
|
233
|
+
userId: string;
|
|
234
|
+
};
|
|
235
|
+
type RequestQuery = {};
|
|
236
|
+
type RequestBody = UpdateUserProfileDto;
|
|
237
|
+
type RequestHeaders = {};
|
|
238
|
+
type ResponseBody = UserEntityDto;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
149
241
|
export declare namespace Admin {
|
|
150
242
|
/**
|
|
151
|
-
* @description Gives some user access to the tenant. If there's no account attached to this users, it creates a new one
|
|
152
|
-
* @tags Admin Users
|
|
153
|
-
* @name
|
|
243
|
+
* @description Gives some user access to the tenant. If there's no user account attached to this users, it creates a new one
|
|
244
|
+
* @tags Admin Tenant Users
|
|
245
|
+
* @name CreateOrUpdateTenantUserAndPermissionsByUserEmail
|
|
154
246
|
* @request POST:/admin/tenants/{tenantId}/users
|
|
155
247
|
* @secure
|
|
156
|
-
* @response `
|
|
248
|
+
* @response `200` `TenantUserEntityDto`
|
|
157
249
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
158
250
|
*/
|
|
159
|
-
namespace
|
|
251
|
+
namespace CreateOrUpdateTenantUserAndPermissionsByUserEmail {
|
|
160
252
|
type RequestParams = {
|
|
161
253
|
tenantId: string;
|
|
162
254
|
};
|
|
@@ -165,6 +257,78 @@ export declare namespace Admin {
|
|
|
165
257
|
type RequestHeaders = {};
|
|
166
258
|
type ResponseBody = TenantUserEntityDto;
|
|
167
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* No description
|
|
262
|
+
* @tags Admin Tenant Users
|
|
263
|
+
* @name DisableTenantUser
|
|
264
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/disable
|
|
265
|
+
* @secure
|
|
266
|
+
* @response `204` `void`
|
|
267
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
268
|
+
*/
|
|
269
|
+
namespace DisableTenantUser {
|
|
270
|
+
type RequestParams = {
|
|
271
|
+
tenantId: string;
|
|
272
|
+
userId: string;
|
|
273
|
+
};
|
|
274
|
+
type RequestQuery = {};
|
|
275
|
+
type RequestBody = never;
|
|
276
|
+
type RequestHeaders = {};
|
|
277
|
+
type ResponseBody = void;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* No description
|
|
281
|
+
* @tags Admin Tenant Users
|
|
282
|
+
* @name EnableTenantUser
|
|
283
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/enable
|
|
284
|
+
* @secure
|
|
285
|
+
* @response `204` `void`
|
|
286
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
287
|
+
*/
|
|
288
|
+
namespace EnableTenantUser {
|
|
289
|
+
type RequestParams = {
|
|
290
|
+
tenantId: string;
|
|
291
|
+
userId: string;
|
|
292
|
+
};
|
|
293
|
+
type RequestQuery = {};
|
|
294
|
+
type RequestBody = never;
|
|
295
|
+
type RequestHeaders = {};
|
|
296
|
+
type ResponseBody = void;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* No description
|
|
300
|
+
* @tags Admin Tenant Users
|
|
301
|
+
* @name ListTenantUsers
|
|
302
|
+
* @request GET:/admin/tenants/{tenantId}/users
|
|
303
|
+
* @secure
|
|
304
|
+
* @response `200` `TenantUserEntityPaginationDto`
|
|
305
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
306
|
+
*/
|
|
307
|
+
namespace ListTenantUsers {
|
|
308
|
+
type RequestParams = {
|
|
309
|
+
tenantId: string;
|
|
310
|
+
};
|
|
311
|
+
type RequestQuery = {
|
|
312
|
+
/**
|
|
313
|
+
* @default 10
|
|
314
|
+
* @example 10
|
|
315
|
+
*/
|
|
316
|
+
limit?: number;
|
|
317
|
+
orderBy?: OrderByEnum;
|
|
318
|
+
/**
|
|
319
|
+
* @default 1
|
|
320
|
+
* @example 1
|
|
321
|
+
*/
|
|
322
|
+
page?: number;
|
|
323
|
+
roles?: ListTenantUsersParamsRolesEnum[];
|
|
324
|
+
search?: string;
|
|
325
|
+
sortBy?: string[];
|
|
326
|
+
status?: ListTenantUsersParamsStatusEnum[];
|
|
327
|
+
};
|
|
328
|
+
type RequestBody = never;
|
|
329
|
+
type RequestHeaders = {};
|
|
330
|
+
type ResponseBody = TenantUserEntityPaginationDto;
|
|
331
|
+
}
|
|
168
332
|
}
|
|
169
333
|
import type { AxiosInstance, AxiosRequestConfig, ResponseType } from "axios";
|
|
170
334
|
export type QueryParamsType = Record<string | number, any>;
|
|
@@ -266,17 +430,90 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
266
430
|
*/
|
|
267
431
|
signIn: (data: SigninDto, params?: RequestParams) => Promise<SigninResponseDto>;
|
|
268
432
|
};
|
|
433
|
+
users: {
|
|
434
|
+
/**
|
|
435
|
+
* No description
|
|
436
|
+
*
|
|
437
|
+
* @tags Users
|
|
438
|
+
* @name UpdateUserPassword
|
|
439
|
+
* @request PATCH:/users/{userId}/password
|
|
440
|
+
* @secure
|
|
441
|
+
* @response `200` `UserEntityDto`
|
|
442
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
443
|
+
*/
|
|
444
|
+
updateUserPassword: (userId: string, data: UpdateUserPasswordDto, params?: RequestParams) => Promise<UserEntityDto>;
|
|
445
|
+
/**
|
|
446
|
+
* No description
|
|
447
|
+
*
|
|
448
|
+
* @tags Users
|
|
449
|
+
* @name UpdateUserProfile
|
|
450
|
+
* @request PATCH:/users/{userId}
|
|
451
|
+
* @secure
|
|
452
|
+
* @response `200` `UserEntityDto`
|
|
453
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
454
|
+
*/
|
|
455
|
+
updateUserProfile: (userId: string, data: UpdateUserProfileDto, params?: RequestParams) => Promise<UserEntityDto>;
|
|
456
|
+
};
|
|
269
457
|
admin: {
|
|
270
458
|
/**
|
|
271
|
-
* @description Gives some user access to the tenant. If there's no account attached to this users, it creates a new one
|
|
459
|
+
* @description Gives some user access to the tenant. If there's no user account attached to this users, it creates a new one
|
|
272
460
|
*
|
|
273
|
-
* @tags Admin Users
|
|
274
|
-
* @name
|
|
461
|
+
* @tags Admin Tenant Users
|
|
462
|
+
* @name CreateOrUpdateTenantUserAndPermissionsByUserEmail
|
|
275
463
|
* @request POST:/admin/tenants/{tenantId}/users
|
|
276
464
|
* @secure
|
|
277
|
-
* @response `
|
|
465
|
+
* @response `200` `TenantUserEntityDto`
|
|
466
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
467
|
+
*/
|
|
468
|
+
createOrUpdateTenantUserAndPermissionsByUserEmail: (tenantId: string, data: CreateTenantUserDto, params?: RequestParams) => Promise<TenantUserEntityDto>;
|
|
469
|
+
/**
|
|
470
|
+
* No description
|
|
471
|
+
*
|
|
472
|
+
* @tags Admin Tenant Users
|
|
473
|
+
* @name DisableTenantUser
|
|
474
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/disable
|
|
475
|
+
* @secure
|
|
476
|
+
* @response `204` `void`
|
|
477
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
478
|
+
*/
|
|
479
|
+
disableTenantUser: (tenantId: string, userId: string, params?: RequestParams) => Promise<void>;
|
|
480
|
+
/**
|
|
481
|
+
* No description
|
|
482
|
+
*
|
|
483
|
+
* @tags Admin Tenant Users
|
|
484
|
+
* @name EnableTenantUser
|
|
485
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/enable
|
|
486
|
+
* @secure
|
|
487
|
+
* @response `204` `void`
|
|
488
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
489
|
+
*/
|
|
490
|
+
enableTenantUser: (tenantId: string, userId: string, params?: RequestParams) => Promise<void>;
|
|
491
|
+
/**
|
|
492
|
+
* No description
|
|
493
|
+
*
|
|
494
|
+
* @tags Admin Tenant Users
|
|
495
|
+
* @name ListTenantUsers
|
|
496
|
+
* @request GET:/admin/tenants/{tenantId}/users
|
|
497
|
+
* @secure
|
|
498
|
+
* @response `200` `TenantUserEntityPaginationDto`
|
|
278
499
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
279
500
|
*/
|
|
280
|
-
|
|
501
|
+
listTenantUsers: (tenantId: string, query?: {
|
|
502
|
+
/**
|
|
503
|
+
* @default 10
|
|
504
|
+
* @example 10
|
|
505
|
+
*/
|
|
506
|
+
limit?: number;
|
|
507
|
+
orderBy?: OrderByEnum;
|
|
508
|
+
/**
|
|
509
|
+
* @default 1
|
|
510
|
+
* @example 1
|
|
511
|
+
*/
|
|
512
|
+
page?: number;
|
|
513
|
+
roles?: ListTenantUsersParamsRolesEnum[];
|
|
514
|
+
search?: string;
|
|
515
|
+
sortBy?: string[];
|
|
516
|
+
status?: ListTenantUsersParamsStatusEnum[];
|
|
517
|
+
}, params?: RequestParams) => Promise<TenantUserEntityPaginationDto>;
|
|
281
518
|
};
|
|
282
519
|
}
|
package/dist/umd/index.ts
CHANGED
|
@@ -18386,13 +18386,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18386
18386
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18387
18387
|
};
|
|
18388
18388
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
18389
|
-
exports.Api = exports.HttpClient = exports.ContentType = exports.TenantUserEntityDtoStatusEnum = exports.TenantUserEntityDtoRolesEnum = exports.CreateTenantUserDtoRolesEnum = void 0;
|
|
18389
|
+
exports.Api = exports.HttpClient = exports.ContentType = exports.TenantUserEntityDtoStatusEnum = exports.TenantUserEntityDtoRolesEnum = exports.OrderByEnum = exports.ListTenantUsersParamsStatusEnum = exports.ListTenantUsersParamsRolesEnum = exports.CreateTenantUserDtoRolesEnum = void 0;
|
|
18390
18390
|
var CreateTenantUserDtoRolesEnum;
|
|
18391
18391
|
(function (CreateTenantUserDtoRolesEnum) {
|
|
18392
18392
|
CreateTenantUserDtoRolesEnum["Operator"] = "operator";
|
|
18393
18393
|
CreateTenantUserDtoRolesEnum["Admin"] = "admin";
|
|
18394
18394
|
CreateTenantUserDtoRolesEnum["Owner"] = "owner";
|
|
18395
18395
|
})(CreateTenantUserDtoRolesEnum = exports.CreateTenantUserDtoRolesEnum || (exports.CreateTenantUserDtoRolesEnum = {}));
|
|
18396
|
+
var ListTenantUsersParamsRolesEnum;
|
|
18397
|
+
(function (ListTenantUsersParamsRolesEnum) {
|
|
18398
|
+
ListTenantUsersParamsRolesEnum["Operator"] = "operator";
|
|
18399
|
+
ListTenantUsersParamsRolesEnum["Admin"] = "admin";
|
|
18400
|
+
ListTenantUsersParamsRolesEnum["Owner"] = "owner";
|
|
18401
|
+
})(ListTenantUsersParamsRolesEnum = exports.ListTenantUsersParamsRolesEnum || (exports.ListTenantUsersParamsRolesEnum = {}));
|
|
18402
|
+
var ListTenantUsersParamsStatusEnum;
|
|
18403
|
+
(function (ListTenantUsersParamsStatusEnum) {
|
|
18404
|
+
ListTenantUsersParamsStatusEnum["Enabled"] = "enabled";
|
|
18405
|
+
ListTenantUsersParamsStatusEnum["Blocked"] = "blocked";
|
|
18406
|
+
})(ListTenantUsersParamsStatusEnum = exports.ListTenantUsersParamsStatusEnum || (exports.ListTenantUsersParamsStatusEnum = {}));
|
|
18407
|
+
var OrderByEnum;
|
|
18408
|
+
(function (OrderByEnum) {
|
|
18409
|
+
OrderByEnum["ASC"] = "ASC";
|
|
18410
|
+
OrderByEnum["DESC"] = "DESC";
|
|
18411
|
+
})(OrderByEnum = exports.OrderByEnum || (exports.OrderByEnum = {}));
|
|
18396
18412
|
var TenantUserEntityDtoRolesEnum;
|
|
18397
18413
|
(function (TenantUserEntityDtoRolesEnum) {
|
|
18398
18414
|
TenantUserEntityDtoRolesEnum["Operator"] = "operator";
|
|
@@ -18573,21 +18589,93 @@ var Api = /** @class */ (function (_super) {
|
|
|
18573
18589
|
return _this.request(__assign({ path: "/auth/signin", method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
18574
18590
|
},
|
|
18575
18591
|
};
|
|
18592
|
+
_this.users = {
|
|
18593
|
+
/**
|
|
18594
|
+
* No description
|
|
18595
|
+
*
|
|
18596
|
+
* @tags Users
|
|
18597
|
+
* @name UpdateUserPassword
|
|
18598
|
+
* @request PATCH:/users/{userId}/password
|
|
18599
|
+
* @secure
|
|
18600
|
+
* @response `200` `UserEntityDto`
|
|
18601
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
18602
|
+
*/
|
|
18603
|
+
updateUserPassword: function (userId, data, params) {
|
|
18604
|
+
if (params === void 0) { params = {}; }
|
|
18605
|
+
return _this.request(__assign({ path: "/users/".concat(userId, "/password"), method: "PATCH", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
18606
|
+
},
|
|
18607
|
+
/**
|
|
18608
|
+
* No description
|
|
18609
|
+
*
|
|
18610
|
+
* @tags Users
|
|
18611
|
+
* @name UpdateUserProfile
|
|
18612
|
+
* @request PATCH:/users/{userId}
|
|
18613
|
+
* @secure
|
|
18614
|
+
* @response `200` `UserEntityDto`
|
|
18615
|
+
* @response `403` `HttpExceptionDto` You're not enabled to make this operation.
|
|
18616
|
+
*/
|
|
18617
|
+
updateUserProfile: function (userId, data, params) {
|
|
18618
|
+
if (params === void 0) { params = {}; }
|
|
18619
|
+
return _this.request(__assign({ path: "/users/".concat(userId), method: "PATCH", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
18620
|
+
},
|
|
18621
|
+
};
|
|
18576
18622
|
_this.admin = {
|
|
18577
18623
|
/**
|
|
18578
|
-
* @description Gives some user access to the tenant. If there's no account attached to this users, it creates a new one
|
|
18624
|
+
* @description Gives some user access to the tenant. If there's no user account attached to this users, it creates a new one
|
|
18579
18625
|
*
|
|
18580
|
-
* @tags Admin Users
|
|
18581
|
-
* @name
|
|
18626
|
+
* @tags Admin Tenant Users
|
|
18627
|
+
* @name CreateOrUpdateTenantUserAndPermissionsByUserEmail
|
|
18582
18628
|
* @request POST:/admin/tenants/{tenantId}/users
|
|
18583
18629
|
* @secure
|
|
18584
|
-
* @response `
|
|
18630
|
+
* @response `200` `TenantUserEntityDto`
|
|
18585
18631
|
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
18586
18632
|
*/
|
|
18587
|
-
|
|
18633
|
+
createOrUpdateTenantUserAndPermissionsByUserEmail: function (tenantId, data, params) {
|
|
18588
18634
|
if (params === void 0) { params = {}; }
|
|
18589
18635
|
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users"), method: "POST", body: data, secure: true, type: ContentType.Json, format: "json" }, params));
|
|
18590
18636
|
},
|
|
18637
|
+
/**
|
|
18638
|
+
* No description
|
|
18639
|
+
*
|
|
18640
|
+
* @tags Admin Tenant Users
|
|
18641
|
+
* @name DisableTenantUser
|
|
18642
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/disable
|
|
18643
|
+
* @secure
|
|
18644
|
+
* @response `204` `void`
|
|
18645
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
18646
|
+
*/
|
|
18647
|
+
disableTenantUser: function (tenantId, userId, params) {
|
|
18648
|
+
if (params === void 0) { params = {}; }
|
|
18649
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users/").concat(userId, "/disable"), method: "PATCH", secure: true }, params));
|
|
18650
|
+
},
|
|
18651
|
+
/**
|
|
18652
|
+
* No description
|
|
18653
|
+
*
|
|
18654
|
+
* @tags Admin Tenant Users
|
|
18655
|
+
* @name EnableTenantUser
|
|
18656
|
+
* @request PATCH:/admin/tenants/{tenantId}/users/{userId}/enable
|
|
18657
|
+
* @secure
|
|
18658
|
+
* @response `204` `void`
|
|
18659
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
18660
|
+
*/
|
|
18661
|
+
enableTenantUser: function (tenantId, userId, params) {
|
|
18662
|
+
if (params === void 0) { params = {}; }
|
|
18663
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users/").concat(userId, "/enable"), method: "PATCH", secure: true }, params));
|
|
18664
|
+
},
|
|
18665
|
+
/**
|
|
18666
|
+
* No description
|
|
18667
|
+
*
|
|
18668
|
+
* @tags Admin Tenant Users
|
|
18669
|
+
* @name ListTenantUsers
|
|
18670
|
+
* @request GET:/admin/tenants/{tenantId}/users
|
|
18671
|
+
* @secure
|
|
18672
|
+
* @response `200` `TenantUserEntityPaginationDto`
|
|
18673
|
+
* @response `403` `HttpExceptionDto` Need user with one of these roles: owner, admin
|
|
18674
|
+
*/
|
|
18675
|
+
listTenantUsers: function (tenantId, query, params) {
|
|
18676
|
+
if (params === void 0) { params = {}; }
|
|
18677
|
+
return _this.request(__assign({ path: "/admin/tenants/".concat(tenantId, "/users"), method: "GET", query: query, secure: true, format: "json" }, params));
|
|
18678
|
+
},
|
|
18591
18679
|
};
|
|
18592
18680
|
return _this;
|
|
18593
18681
|
}
|