@breign/client 1.0.142 → 1.0.143
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/apis/UsersApi.d.ts +14 -1
- package/dist/apis/UsersApi.js +29 -0
- package/dist/openapi.json +39 -0
- package/package.json +1 -1
package/dist/apis/UsersApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ApiKeyCreateRequestUio, ApiKeyCreatedUio, UserCreateRequestUio, UserDetailUio, UserLockRequestUio, UserUpdateRequestUio } from '../models/index';
|
|
13
|
+
import type { ApiKeyCreateRequestUio, ApiKeyCreatedUio, ApiKeyRefUio, UserCreateRequestUio, UserDetailUio, UserLockRequestUio, UserUpdateRequestUio } from '../models/index';
|
|
14
14
|
export interface CreateUserRequest {
|
|
15
15
|
userCreateRequestUio: UserCreateRequestUio;
|
|
16
16
|
}
|
|
@@ -32,6 +32,9 @@ export interface GetUsersRequest {
|
|
|
32
32
|
offset?: number;
|
|
33
33
|
limit?: number;
|
|
34
34
|
}
|
|
35
|
+
export interface ListUserApiKeysRequest {
|
|
36
|
+
userId: string;
|
|
37
|
+
}
|
|
35
38
|
export interface LockUserRequest {
|
|
36
39
|
userId: string;
|
|
37
40
|
userLockRequestUio: UserLockRequestUio;
|
|
@@ -104,6 +107,16 @@ export declare class UsersApi extends runtime.BaseAPI {
|
|
|
104
107
|
* List users
|
|
105
108
|
*/
|
|
106
109
|
getUsers(offset?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserDetailUio>>;
|
|
110
|
+
/**
|
|
111
|
+
* Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
|
|
112
|
+
* List API keys
|
|
113
|
+
*/
|
|
114
|
+
listUserApiKeysRaw(requestParameters: ListUserApiKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyRefUio>>>;
|
|
115
|
+
/**
|
|
116
|
+
* Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
|
|
117
|
+
* List API keys
|
|
118
|
+
*/
|
|
119
|
+
listUserApiKeys(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyRefUio>>;
|
|
107
120
|
/**
|
|
108
121
|
* Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
|
|
109
122
|
* Lock or unlock a user
|
package/dist/apis/UsersApi.js
CHANGED
|
@@ -238,6 +238,35 @@ class UsersApi extends runtime.BaseAPI {
|
|
|
238
238
|
const response = await this.getUsersRaw({ offset: offset, limit: limit }, initOverrides);
|
|
239
239
|
return await response.value();
|
|
240
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
|
|
243
|
+
* List API keys
|
|
244
|
+
*/
|
|
245
|
+
async listUserApiKeysRaw(requestParameters, initOverrides) {
|
|
246
|
+
if (requestParameters['userId'] == null) {
|
|
247
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling listUserApiKeys().');
|
|
248
|
+
}
|
|
249
|
+
const queryParameters = {};
|
|
250
|
+
const headerParameters = {};
|
|
251
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
252
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
253
|
+
}
|
|
254
|
+
const response = await this.request({
|
|
255
|
+
path: `/users/{userId}/api-keys`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
|
|
256
|
+
method: 'GET',
|
|
257
|
+
headers: headerParameters,
|
|
258
|
+
query: queryParameters,
|
|
259
|
+
}, initOverrides);
|
|
260
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ApiKeyRefUioFromJSON));
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Lists a user\'s API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.
|
|
264
|
+
* List API keys
|
|
265
|
+
*/
|
|
266
|
+
async listUserApiKeys(userId, initOverrides) {
|
|
267
|
+
const response = await this.listUserApiKeysRaw({ userId: userId }, initOverrides);
|
|
268
|
+
return await response.value();
|
|
269
|
+
}
|
|
241
270
|
/**
|
|
242
271
|
* Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
|
|
243
272
|
* Lock or unlock a user
|
package/dist/openapi.json
CHANGED
|
@@ -13532,6 +13532,45 @@
|
|
|
13532
13532
|
}
|
|
13533
13533
|
},
|
|
13534
13534
|
"/users/{userId}/api-keys" : {
|
|
13535
|
+
"get" : {
|
|
13536
|
+
"description" : "Lists a user's API keys. Allowed for super administrators and for the user themselves. Only the id and the name of each key are returned — the secret is never re-exposed after its creation.\n",
|
|
13537
|
+
"operationId" : "listUserApiKeys",
|
|
13538
|
+
"parameters" : [ {
|
|
13539
|
+
"description" : "ID of the user",
|
|
13540
|
+
"in" : "path",
|
|
13541
|
+
"name" : "userId",
|
|
13542
|
+
"required" : true,
|
|
13543
|
+
"schema" : {
|
|
13544
|
+
"type" : "string"
|
|
13545
|
+
}
|
|
13546
|
+
} ],
|
|
13547
|
+
"responses" : {
|
|
13548
|
+
"200" : {
|
|
13549
|
+
"content" : {
|
|
13550
|
+
"application/json" : {
|
|
13551
|
+
"schema" : {
|
|
13552
|
+
"items" : {
|
|
13553
|
+
"$ref" : "#/components/schemas/ApiKeyRef"
|
|
13554
|
+
},
|
|
13555
|
+
"type" : "array"
|
|
13556
|
+
}
|
|
13557
|
+
}
|
|
13558
|
+
},
|
|
13559
|
+
"description" : "API keys retrieved"
|
|
13560
|
+
},
|
|
13561
|
+
"401" : {
|
|
13562
|
+
"description" : "Unauthenticated — no caller identity could be established"
|
|
13563
|
+
},
|
|
13564
|
+
"403" : {
|
|
13565
|
+
"description" : "Forbidden — the caller is neither an administrator nor this user"
|
|
13566
|
+
},
|
|
13567
|
+
"404" : {
|
|
13568
|
+
"description" : "User not found"
|
|
13569
|
+
}
|
|
13570
|
+
},
|
|
13571
|
+
"summary" : "List API keys",
|
|
13572
|
+
"tags" : [ "users" ]
|
|
13573
|
+
},
|
|
13535
13574
|
"post" : {
|
|
13536
13575
|
"description" : "Creates an API key for a user. Allowed for super administrators and for the user themselves. The returned `keySecret` is the only time the secret is exposed — it is not retrievable afterwards.\n",
|
|
13537
13576
|
"operationId" : "createUserApiKey",
|