@breign/client 1.0.126 → 1.0.128

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.
Files changed (167) hide show
  1. package/dist/apis/AiGatewayApi.d.ts +100 -0
  2. package/dist/apis/AiGatewayApi.js +248 -0
  3. package/dist/apis/AppApi.d.ts +17 -3
  4. package/dist/apis/AppApi.js +36 -2
  5. package/dist/apis/AuthApi.d.ts +40 -1
  6. package/dist/apis/AuthApi.js +82 -0
  7. package/dist/apis/ConfigurationApi.d.ts +16 -3
  8. package/dist/apis/ConfigurationApi.js +33 -2
  9. package/dist/apis/ConversationsApi.d.ts +73 -3
  10. package/dist/apis/ConversationsApi.js +174 -2
  11. package/dist/apis/EngineApi.d.ts +17 -16
  12. package/dist/apis/EngineApi.js +33 -30
  13. package/dist/apis/EnginesApi.d.ts +3 -3
  14. package/dist/apis/EnginesApi.js +4 -4
  15. package/dist/apis/OrganizationsApi.d.ts +10 -111
  16. package/dist/apis/OrganizationsApi.js +12 -264
  17. package/dist/apis/PromptsApi.d.ts +3 -3
  18. package/dist/apis/PromptsApi.js +1 -1
  19. package/dist/apis/ToolsApi.d.ts +1 -2
  20. package/dist/apis/ToolsApi.js +3 -6
  21. package/dist/apis/UsersApi.d.ts +127 -0
  22. package/dist/apis/UsersApi.js +308 -0
  23. package/dist/apis/index.d.ts +2 -0
  24. package/dist/apis/index.js +2 -0
  25. package/dist/models/AgentPatchUio.d.ts +7 -0
  26. package/dist/models/AgentPatchUio.js +3 -0
  27. package/dist/models/AgentSandboxConfigurationUio.d.ts +58 -0
  28. package/dist/models/AgentSandboxConfigurationUio.js +62 -0
  29. package/dist/models/AgentSandboxNetworkConfigurationUio.d.ts +57 -0
  30. package/dist/models/AgentSandboxNetworkConfigurationUio.js +65 -0
  31. package/dist/models/AgentUio.d.ts +7 -0
  32. package/dist/models/AgentUio.js +3 -0
  33. package/dist/models/AiGatewayChatCompletionRequestUio.d.ts +57 -0
  34. package/dist/models/AiGatewayChatCompletionRequestUio.js +61 -0
  35. package/dist/models/AiGatewayChatCompletionResponseUio.d.ts +47 -0
  36. package/dist/models/AiGatewayChatCompletionResponseUio.js +54 -0
  37. package/dist/models/AiGatewayEmbeddingRequestUio.d.ts +38 -0
  38. package/dist/models/AiGatewayEmbeddingRequestUio.js +54 -0
  39. package/dist/models/AiGatewayEmbeddingResponseUio.d.ts +47 -0
  40. package/dist/models/AiGatewayEmbeddingResponseUio.js +54 -0
  41. package/dist/models/AiGatewayErrorUio.d.ts +33 -0
  42. package/dist/models/AiGatewayErrorUio.js +51 -0
  43. package/dist/models/AiGatewayMessageUio.d.ts +47 -0
  44. package/dist/models/AiGatewayMessageUio.js +63 -0
  45. package/dist/models/AiGatewayModelListDataInnerUio.d.ts +57 -0
  46. package/dist/models/AiGatewayModelListDataInnerUio.js +69 -0
  47. package/dist/models/AiGatewayModelListUio.d.ts +46 -0
  48. package/dist/models/AiGatewayModelListUio.js +62 -0
  49. package/dist/models/AiGatewayModelUio.d.ts +57 -0
  50. package/dist/models/AiGatewayModelUio.js +69 -0
  51. package/dist/models/ApiKeyCreateRequestUio.d.ts +32 -0
  52. package/dist/models/ApiKeyCreateRequestUio.js +50 -0
  53. package/dist/models/ApiKeyCreatedUio.d.ts +44 -0
  54. package/dist/models/{ApiKeyUio.js → ApiKeyCreatedUio.js} +13 -13
  55. package/dist/models/ApiKeyRefUio.d.ts +38 -0
  56. package/dist/models/ApiKeyRefUio.js +54 -0
  57. package/dist/models/AppInstanceEphemeralCreateRequestUio.d.ts +1 -1
  58. package/dist/models/AppInstanceEphemeralCreateRequestUio.js +3 -1
  59. package/dist/models/AppReplaceRequestUio.d.ts +94 -0
  60. package/dist/models/AppReplaceRequestUio.js +82 -0
  61. package/dist/models/AppTextToSpeechResponseUio.d.ts +3 -3
  62. package/dist/models/AppTextToSpeechResponseUio.js +3 -3
  63. package/dist/models/AppUpdateRequestEphemeralInstancesUio.d.ts +38 -0
  64. package/dist/models/AppUpdateRequestEphemeralInstancesUio.js +50 -0
  65. package/dist/models/AppUpdateRequestUio.d.ts +12 -12
  66. package/dist/models/AppUpdateRequestUio.js +3 -3
  67. package/dist/models/AttachmentProcessedRequestUio.d.ts +50 -0
  68. package/dist/models/AttachmentProcessedRequestUio.js +62 -0
  69. package/dist/models/AuthCodeConfirmRequestUio.d.ts +1 -1
  70. package/dist/models/AuthCodeConfirmRequestUio.js +3 -1
  71. package/dist/models/AuthCodeConfirmResponseUio.d.ts +15 -3
  72. package/dist/models/AuthCodeConfirmResponseUio.js +6 -3
  73. package/dist/models/ChatMessageUio.d.ts +6 -0
  74. package/dist/models/ChatMessageUio.js +2 -0
  75. package/dist/models/ConfigurationDefaultFillerPhrasesUio.d.ts +7 -6
  76. package/dist/models/ConfigurationDefaultFillerPhrasesUio.js +7 -8
  77. package/dist/models/ConfigurationDefaultFillerPhrasesUpdateRequestUio.d.ts +39 -0
  78. package/dist/models/ConfigurationDefaultFillerPhrasesUpdateRequestUio.js +55 -0
  79. package/dist/models/ContextLocationRequestUio.d.ts +38 -0
  80. package/dist/models/ContextLocationRequestUio.js +54 -0
  81. package/dist/models/ConversationDetailUio.d.ts +101 -0
  82. package/dist/models/ConversationDetailUio.js +75 -0
  83. package/dist/models/ConversationMessagesInnerUio.d.ts +6 -0
  84. package/dist/models/ConversationMessagesInnerUio.js +2 -0
  85. package/dist/models/DeleteOrganizationUser200ResponseUio.d.ts +32 -0
  86. package/dist/models/DeleteOrganizationUser200ResponseUio.js +50 -0
  87. package/dist/models/DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio.d.ts +50 -0
  88. package/dist/models/DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio.js +54 -0
  89. package/dist/models/DeleteProvider200ResponseUio.d.ts +45 -0
  90. package/dist/models/DeleteProvider200ResponseUio.js +55 -0
  91. package/dist/models/EmbeddingProviderModelsInnerUio.d.ts +44 -0
  92. package/dist/models/EmbeddingProviderModelsInnerUio.js +58 -0
  93. package/dist/models/EmbeddingProviderUio.d.ts +57 -0
  94. package/dist/models/EmbeddingProviderUio.js +65 -0
  95. package/dist/models/FillerPhraseUio.d.ts +38 -0
  96. package/dist/models/FillerPhraseUio.js +54 -0
  97. package/dist/models/GetJwks200ResponseUio.d.ts +34 -0
  98. package/dist/models/GetJwks200ResponseUio.js +50 -0
  99. package/dist/models/MarkAttachmentProcessed400ResponseUio.d.ts +40 -0
  100. package/dist/models/MarkAttachmentProcessed400ResponseUio.js +52 -0
  101. package/dist/models/MessageUio.d.ts +7 -1
  102. package/dist/models/MessageUio.js +2 -0
  103. package/dist/models/OpenAiChatCompletionRequestStreamOptionsUio.d.ts +32 -0
  104. package/dist/models/OpenAiChatCompletionRequestStreamOptionsUio.js +48 -0
  105. package/dist/models/OpenAiChatCompletionRequestUio.d.ts +64 -0
  106. package/dist/models/OpenAiChatCompletionRequestUio.js +64 -0
  107. package/dist/models/OpenAiChatCompletionResponseUio.d.ts +67 -0
  108. package/dist/models/OpenAiChatCompletionResponseUio.js +60 -0
  109. package/dist/models/OrganizationMemberUio.d.ts +3 -3
  110. package/dist/models/OrganizationMemberUio.js +3 -3
  111. package/dist/models/OrganizationMemberUserUio.d.ts +32 -0
  112. package/dist/models/OrganizationMemberUserUio.js +50 -0
  113. package/dist/models/PinRequestUio.d.ts +3 -3
  114. package/dist/models/PinRequestUio.js +3 -3
  115. package/dist/models/ProviderValiationRequestUio.d.ts +1 -1
  116. package/dist/models/ProviderValiationRequestUio.js +1 -3
  117. package/dist/models/SetContextLocation400ResponseUio.d.ts +40 -0
  118. package/dist/models/SetContextLocation400ResponseUio.js +52 -0
  119. package/dist/models/TTSRequestUio.d.ts +1 -1
  120. package/dist/models/TTSRequestUio.js +1 -3
  121. package/dist/models/UserCreateRequestUio.d.ts +45 -0
  122. package/dist/models/UserCreateRequestUio.js +57 -0
  123. package/dist/models/UserDetailUio.d.ts +88 -0
  124. package/dist/models/UserDetailUio.js +80 -0
  125. package/dist/models/UserIdentifierRequestUio.d.ts +32 -0
  126. package/dist/models/UserIdentifierRequestUio.js +50 -0
  127. package/dist/models/UserIdentifierUio.d.ts +38 -0
  128. package/dist/models/UserIdentifierUio.js +52 -0
  129. package/dist/models/UserLockRequestUio.d.ts +32 -0
  130. package/dist/models/UserLockRequestUio.js +50 -0
  131. package/dist/models/UserUpdateRequestUio.d.ts +63 -0
  132. package/dist/models/UserUpdateRequestUio.js +59 -0
  133. package/dist/models/WorkspaceFileContentUio.d.ts +62 -0
  134. package/dist/models/WorkspaceFileContentUio.js +70 -0
  135. package/dist/models/WorkspaceFileEntryUio.d.ts +56 -0
  136. package/dist/models/WorkspaceFileEntryUio.js +66 -0
  137. package/dist/models/index.d.ts +41 -14
  138. package/dist/models/index.js +41 -14
  139. package/dist/openapi.json +3890 -2297
  140. package/package.json +1 -1
  141. package/dist/models/AccessRoleCreateRequestUio.d.ts +0 -45
  142. package/dist/models/AccessRoleCreateRequestUio.js +0 -55
  143. package/dist/models/AccessRolePermissionsRequestUio.d.ts +0 -33
  144. package/dist/models/AccessRolePermissionsRequestUio.js +0 -51
  145. package/dist/models/AccessRoleUio.d.ts +0 -75
  146. package/dist/models/AccessRoleUio.js +0 -75
  147. package/dist/models/AccessRoleUpdateRequestUio.d.ts +0 -38
  148. package/dist/models/AccessRoleUpdateRequestUio.js +0 -52
  149. package/dist/models/ApiKeyUio.d.ts +0 -44
  150. package/dist/models/AudioFile1Uio.d.ts +0 -45
  151. package/dist/models/AudioFile1Uio.js +0 -59
  152. package/dist/models/Conversation1Uio.d.ts +0 -46
  153. package/dist/models/Conversation1Uio.js +0 -60
  154. package/dist/models/OrganizationPermissionKeyUio.d.ts +0 -59
  155. package/dist/models/OrganizationPermissionKeyUio.js +0 -85
  156. package/dist/models/PermissionEntryUio.d.ts +0 -39
  157. package/dist/models/PermissionEntryUio.js +0 -55
  158. package/dist/models/ProviderSimpleUio.d.ts +0 -57
  159. package/dist/models/ProviderSimpleUio.js +0 -65
  160. package/dist/models/UserAccessRolesRequestUio.d.ts +0 -32
  161. package/dist/models/UserAccessRolesRequestUio.js +0 -50
  162. package/dist/models/UserAccessUio.d.ts +0 -39
  163. package/dist/models/UserAccessUio.js +0 -55
  164. package/dist/models/UserDirectPermissionsRequestUio.d.ts +0 -33
  165. package/dist/models/UserDirectPermissionsRequestUio.js +0 -51
  166. package/dist/models/UserUio.d.ts +0 -87
  167. package/dist/models/UserUio.js +0 -67
@@ -0,0 +1,127 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { ApiKeyCreateRequestUio, ApiKeyCreatedUio, UserCreateRequestUio, UserDetailUio, UserLockRequestUio, UserUpdateRequestUio } from '../models/index';
14
+ export interface CreateUserRequest {
15
+ userCreateRequestUio: UserCreateRequestUio;
16
+ }
17
+ export interface CreateUserApiKeyRequest {
18
+ userId: string;
19
+ apiKeyCreateRequestUio: ApiKeyCreateRequestUio;
20
+ }
21
+ export interface DeleteUserRequest {
22
+ userId: string;
23
+ }
24
+ export interface DeleteUserApiKeyRequest {
25
+ userId: string;
26
+ apiKeyId: string;
27
+ }
28
+ export interface GetUserRequest {
29
+ userId: string;
30
+ }
31
+ export interface GetUsersRequest {
32
+ offset?: number;
33
+ limit?: number;
34
+ }
35
+ export interface LockUserRequest {
36
+ userId: string;
37
+ userLockRequestUio: UserLockRequestUio;
38
+ }
39
+ export interface UpdateUserRequest {
40
+ userId: string;
41
+ userUpdateRequestUio: UserUpdateRequestUio;
42
+ }
43
+ /**
44
+ *
45
+ */
46
+ export declare class UsersApi extends runtime.BaseAPI {
47
+ /**
48
+ * Creates a user account. Restricted to super administrators. The created user is never an administrator and starts with no agent and no API key.
49
+ * Create a user
50
+ */
51
+ createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserDetailUio>>;
52
+ /**
53
+ * Creates a user account. Restricted to super administrators. The created user is never an administrator and starts with no agent and no API key.
54
+ * Create a user
55
+ */
56
+ createUser(userCreateRequestUio: UserCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserDetailUio>;
57
+ /**
58
+ * 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.
59
+ * Create an API key
60
+ */
61
+ createUserApiKeyRaw(requestParameters: CreateUserApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeyCreatedUio>>;
62
+ /**
63
+ * 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.
64
+ * Create an API key
65
+ */
66
+ createUserApiKey(userId: string, apiKeyCreateRequestUio: ApiKeyCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyCreatedUio>;
67
+ /**
68
+ * Permanently deletes a user, then purges their tool credentials and their agent memories. Restricted to super administrators and only available when the server runs with the `features.testMode` flag enabled.
69
+ * Delete a user
70
+ */
71
+ deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
72
+ /**
73
+ * Permanently deletes a user, then purges their tool credentials and their agent memories. Restricted to super administrators and only available when the server runs with the `features.testMode` flag enabled.
74
+ * Delete a user
75
+ */
76
+ deleteUser(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
77
+ /**
78
+ * Deletes one of a user\'s API keys. Allowed for super administrators and for the user themselves.
79
+ * Delete an API key
80
+ */
81
+ deleteUserApiKeyRaw(requestParameters: DeleteUserApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
82
+ /**
83
+ * Deletes one of a user\'s API keys. Allowed for super administrators and for the user themselves.
84
+ * Delete an API key
85
+ */
86
+ deleteUserApiKey(userId: string, apiKeyId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
87
+ /**
88
+ * Returns a single user. Restricted to super administrators.
89
+ * Get a user
90
+ */
91
+ getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserDetailUio>>;
92
+ /**
93
+ * Returns a single user. Restricted to super administrators.
94
+ * Get a user
95
+ */
96
+ getUser(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserDetailUio>;
97
+ /**
98
+ * Returns a paginated list of users. Restricted to super administrators. Each entry exposes the API keys of the user without their secret.
99
+ * List users
100
+ */
101
+ getUsersRaw(requestParameters: GetUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<UserDetailUio>>>;
102
+ /**
103
+ * Returns a paginated list of users. Restricted to super administrators. Each entry exposes the API keys of the user without their secret.
104
+ * List users
105
+ */
106
+ getUsers(offset?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<UserDetailUio>>;
107
+ /**
108
+ * Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
109
+ * Lock or unlock a user
110
+ */
111
+ lockUserRaw(requestParameters: LockUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
112
+ /**
113
+ * Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
114
+ * Lock or unlock a user
115
+ */
116
+ lockUser(userId: string, userLockRequestUio: UserLockRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
117
+ /**
118
+ * Updates a user. Restricted to super administrators. Every property is optional; only the ones provided are applied. Returns no content.
119
+ * Update a user
120
+ */
121
+ updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
122
+ /**
123
+ * Updates a user. Restricted to super administrators. Every property is optional; only the ones provided are applied. Returns no content.
124
+ * Update a user
125
+ */
126
+ updateUser(userId: string, userUpdateRequestUio: UserUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
127
+ }
@@ -0,0 +1,308 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.UsersApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class UsersApi extends runtime.BaseAPI {
56
+ /**
57
+ * Creates a user account. Restricted to super administrators. The created user is never an administrator and starts with no agent and no API key.
58
+ * Create a user
59
+ */
60
+ async createUserRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['userCreateRequestUio'] == null) {
62
+ throw new runtime.RequiredError('userCreateRequestUio', 'Required parameter "userCreateRequestUio" was null or undefined when calling createUser().');
63
+ }
64
+ const queryParameters = {};
65
+ const headerParameters = {};
66
+ headerParameters['Content-Type'] = 'application/json';
67
+ if (this.configuration && this.configuration.apiKey) {
68
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
69
+ }
70
+ const response = await this.request({
71
+ path: `/users`,
72
+ method: 'POST',
73
+ headers: headerParameters,
74
+ query: queryParameters,
75
+ body: (0, index_1.UserCreateRequestUioToJSON)(requestParameters['userCreateRequestUio']),
76
+ }, initOverrides);
77
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserDetailUioFromJSON)(jsonValue));
78
+ }
79
+ /**
80
+ * Creates a user account. Restricted to super administrators. The created user is never an administrator and starts with no agent and no API key.
81
+ * Create a user
82
+ */
83
+ async createUser(userCreateRequestUio, initOverrides) {
84
+ const response = await this.createUserRaw({ userCreateRequestUio: userCreateRequestUio }, initOverrides);
85
+ return await response.value();
86
+ }
87
+ /**
88
+ * 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.
89
+ * Create an API key
90
+ */
91
+ async createUserApiKeyRaw(requestParameters, initOverrides) {
92
+ if (requestParameters['userId'] == null) {
93
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createUserApiKey().');
94
+ }
95
+ if (requestParameters['apiKeyCreateRequestUio'] == null) {
96
+ throw new runtime.RequiredError('apiKeyCreateRequestUio', 'Required parameter "apiKeyCreateRequestUio" was null or undefined when calling createUserApiKey().');
97
+ }
98
+ const queryParameters = {};
99
+ const headerParameters = {};
100
+ headerParameters['Content-Type'] = 'application/json';
101
+ if (this.configuration && this.configuration.apiKey) {
102
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
103
+ }
104
+ const response = await this.request({
105
+ path: `/users/{userId}/api-keys`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
106
+ method: 'POST',
107
+ headers: headerParameters,
108
+ query: queryParameters,
109
+ body: (0, index_1.ApiKeyCreateRequestUioToJSON)(requestParameters['apiKeyCreateRequestUio']),
110
+ }, initOverrides);
111
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApiKeyCreatedUioFromJSON)(jsonValue));
112
+ }
113
+ /**
114
+ * 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.
115
+ * Create an API key
116
+ */
117
+ async createUserApiKey(userId, apiKeyCreateRequestUio, initOverrides) {
118
+ const response = await this.createUserApiKeyRaw({ userId: userId, apiKeyCreateRequestUio: apiKeyCreateRequestUio }, initOverrides);
119
+ return await response.value();
120
+ }
121
+ /**
122
+ * Permanently deletes a user, then purges their tool credentials and their agent memories. Restricted to super administrators and only available when the server runs with the `features.testMode` flag enabled.
123
+ * Delete a user
124
+ */
125
+ async deleteUserRaw(requestParameters, initOverrides) {
126
+ if (requestParameters['userId'] == null) {
127
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUser().');
128
+ }
129
+ const queryParameters = {};
130
+ const headerParameters = {};
131
+ if (this.configuration && this.configuration.apiKey) {
132
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
133
+ }
134
+ const response = await this.request({
135
+ path: `/users/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
136
+ method: 'DELETE',
137
+ headers: headerParameters,
138
+ query: queryParameters,
139
+ }, initOverrides);
140
+ return new runtime.VoidApiResponse(response);
141
+ }
142
+ /**
143
+ * Permanently deletes a user, then purges their tool credentials and their agent memories. Restricted to super administrators and only available when the server runs with the `features.testMode` flag enabled.
144
+ * Delete a user
145
+ */
146
+ async deleteUser(userId, initOverrides) {
147
+ await this.deleteUserRaw({ userId: userId }, initOverrides);
148
+ }
149
+ /**
150
+ * Deletes one of a user\'s API keys. Allowed for super administrators and for the user themselves.
151
+ * Delete an API key
152
+ */
153
+ async deleteUserApiKeyRaw(requestParameters, initOverrides) {
154
+ if (requestParameters['userId'] == null) {
155
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserApiKey().');
156
+ }
157
+ if (requestParameters['apiKeyId'] == null) {
158
+ throw new runtime.RequiredError('apiKeyId', 'Required parameter "apiKeyId" was null or undefined when calling deleteUserApiKey().');
159
+ }
160
+ const queryParameters = {};
161
+ const headerParameters = {};
162
+ if (this.configuration && this.configuration.apiKey) {
163
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
164
+ }
165
+ const response = await this.request({
166
+ path: `/users/{userId}/api-keys/{apiKeyId}`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))).replace(`{${"apiKeyId"}}`, encodeURIComponent(String(requestParameters['apiKeyId']))),
167
+ method: 'DELETE',
168
+ headers: headerParameters,
169
+ query: queryParameters,
170
+ }, initOverrides);
171
+ return new runtime.VoidApiResponse(response);
172
+ }
173
+ /**
174
+ * Deletes one of a user\'s API keys. Allowed for super administrators and for the user themselves.
175
+ * Delete an API key
176
+ */
177
+ async deleteUserApiKey(userId, apiKeyId, initOverrides) {
178
+ await this.deleteUserApiKeyRaw({ userId: userId, apiKeyId: apiKeyId }, initOverrides);
179
+ }
180
+ /**
181
+ * Returns a single user. Restricted to super administrators.
182
+ * Get a user
183
+ */
184
+ async getUserRaw(requestParameters, initOverrides) {
185
+ if (requestParameters['userId'] == null) {
186
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUser().');
187
+ }
188
+ const queryParameters = {};
189
+ const headerParameters = {};
190
+ if (this.configuration && this.configuration.apiKey) {
191
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
192
+ }
193
+ const response = await this.request({
194
+ path: `/users/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
195
+ method: 'GET',
196
+ headers: headerParameters,
197
+ query: queryParameters,
198
+ }, initOverrides);
199
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserDetailUioFromJSON)(jsonValue));
200
+ }
201
+ /**
202
+ * Returns a single user. Restricted to super administrators.
203
+ * Get a user
204
+ */
205
+ async getUser(userId, initOverrides) {
206
+ const response = await this.getUserRaw({ userId: userId }, initOverrides);
207
+ return await response.value();
208
+ }
209
+ /**
210
+ * Returns a paginated list of users. Restricted to super administrators. Each entry exposes the API keys of the user without their secret.
211
+ * List users
212
+ */
213
+ async getUsersRaw(requestParameters, initOverrides) {
214
+ const queryParameters = {};
215
+ if (requestParameters['offset'] != null) {
216
+ queryParameters['offset'] = requestParameters['offset'];
217
+ }
218
+ if (requestParameters['limit'] != null) {
219
+ queryParameters['limit'] = requestParameters['limit'];
220
+ }
221
+ const headerParameters = {};
222
+ if (this.configuration && this.configuration.apiKey) {
223
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
224
+ }
225
+ const response = await this.request({
226
+ path: `/users`,
227
+ method: 'GET',
228
+ headers: headerParameters,
229
+ query: queryParameters,
230
+ }, initOverrides);
231
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.UserDetailUioFromJSON));
232
+ }
233
+ /**
234
+ * Returns a paginated list of users. Restricted to super administrators. Each entry exposes the API keys of the user without their secret.
235
+ * List users
236
+ */
237
+ async getUsers(offset, limit, initOverrides) {
238
+ const response = await this.getUsersRaw({ offset: offset, limit: limit }, initOverrides);
239
+ return await response.value();
240
+ }
241
+ /**
242
+ * Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
243
+ * Lock or unlock a user
244
+ */
245
+ async lockUserRaw(requestParameters, initOverrides) {
246
+ if (requestParameters['userId'] == null) {
247
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling lockUser().');
248
+ }
249
+ if (requestParameters['userLockRequestUio'] == null) {
250
+ throw new runtime.RequiredError('userLockRequestUio', 'Required parameter "userLockRequestUio" was null or undefined when calling lockUser().');
251
+ }
252
+ const queryParameters = {};
253
+ const headerParameters = {};
254
+ headerParameters['Content-Type'] = 'application/json';
255
+ if (this.configuration && this.configuration.apiKey) {
256
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
257
+ }
258
+ const response = await this.request({
259
+ path: `/users/{userId}/lock`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
260
+ method: 'PUT',
261
+ headers: headerParameters,
262
+ query: queryParameters,
263
+ body: (0, index_1.UserLockRequestUioToJSON)(requestParameters['userLockRequestUio']),
264
+ }, initOverrides);
265
+ return new runtime.VoidApiResponse(response);
266
+ }
267
+ /**
268
+ * Locks or unlocks a user account. Restricted to super administrators. Locking stamps the current date on the account; unlocking clears it.
269
+ * Lock or unlock a user
270
+ */
271
+ async lockUser(userId, userLockRequestUio, initOverrides) {
272
+ await this.lockUserRaw({ userId: userId, userLockRequestUio: userLockRequestUio }, initOverrides);
273
+ }
274
+ /**
275
+ * Updates a user. Restricted to super administrators. Every property is optional; only the ones provided are applied. Returns no content.
276
+ * Update a user
277
+ */
278
+ async updateUserRaw(requestParameters, initOverrides) {
279
+ if (requestParameters['userId'] == null) {
280
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling updateUser().');
281
+ }
282
+ if (requestParameters['userUpdateRequestUio'] == null) {
283
+ throw new runtime.RequiredError('userUpdateRequestUio', 'Required parameter "userUpdateRequestUio" was null or undefined when calling updateUser().');
284
+ }
285
+ const queryParameters = {};
286
+ const headerParameters = {};
287
+ headerParameters['Content-Type'] = 'application/json';
288
+ if (this.configuration && this.configuration.apiKey) {
289
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
290
+ }
291
+ const response = await this.request({
292
+ path: `/users/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
293
+ method: 'PATCH',
294
+ headers: headerParameters,
295
+ query: queryParameters,
296
+ body: (0, index_1.UserUpdateRequestUioToJSON)(requestParameters['userUpdateRequestUio']),
297
+ }, initOverrides);
298
+ return new runtime.VoidApiResponse(response);
299
+ }
300
+ /**
301
+ * Updates a user. Restricted to super administrators. Every property is optional; only the ones provided are applied. Returns no content.
302
+ * Update a user
303
+ */
304
+ async updateUser(userId, userUpdateRequestUio, initOverrides) {
305
+ await this.updateUserRaw({ userId: userId, userUpdateRequestUio: userUpdateRequestUio }, initOverrides);
306
+ }
307
+ }
308
+ exports.UsersApi = UsersApi;
@@ -1,4 +1,5 @@
1
1
  export * from './AgentApi';
2
+ export * from './AiGatewayApi';
2
3
  export * from './AppApi';
3
4
  export * from './AuthApi';
4
5
  export * from './ChunksApi';
@@ -20,3 +21,4 @@ export * from './RemotesApi';
20
21
  export * from './ScheduledTasksApi';
21
22
  export * from './SkillsApi';
22
23
  export * from './ToolsApi';
24
+ export * from './UsersApi';
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./AgentApi"), exports);
20
+ __exportStar(require("./AiGatewayApi"), exports);
20
21
  __exportStar(require("./AppApi"), exports);
21
22
  __exportStar(require("./AuthApi"), exports);
22
23
  __exportStar(require("./ChunksApi"), exports);
@@ -38,3 +39,4 @@ __exportStar(require("./RemotesApi"), exports);
38
39
  __exportStar(require("./ScheduledTasksApi"), exports);
39
40
  __exportStar(require("./SkillsApi"), exports);
40
41
  __exportStar(require("./ToolsApi"), exports);
42
+ __exportStar(require("./UsersApi"), exports);
@@ -16,6 +16,7 @@ import type { PromptInitUio } from './PromptInitUio';
16
16
  import type { SpeechToTextConfigUio } from './SpeechToTextConfigUio';
17
17
  import type { AgentMemoryConfigurationUio } from './AgentMemoryConfigurationUio';
18
18
  import type { AgentPatchEngineUio } from './AgentPatchEngineUio';
19
+ import type { AgentSandboxConfigurationUio } from './AgentSandboxConfigurationUio';
19
20
  import type { AgentTypeUio } from './AgentTypeUio';
20
21
  /**
21
22
  *
@@ -171,6 +172,12 @@ export interface AgentPatchUio {
171
172
  * @memberof AgentPatchUio
172
173
  */
173
174
  speechToText?: SpeechToTextConfigUio;
175
+ /**
176
+ *
177
+ * @type {AgentSandboxConfigurationUio}
178
+ * @memberof AgentPatchUio
179
+ */
180
+ sandboxConfiguration?: AgentSandboxConfigurationUio | null;
174
181
  }
175
182
  /**
176
183
  * Check if a given object implements the AgentPatchUio interface.
@@ -25,6 +25,7 @@ const PromptInitUio_1 = require("./PromptInitUio");
25
25
  const SpeechToTextConfigUio_1 = require("./SpeechToTextConfigUio");
26
26
  const AgentMemoryConfigurationUio_1 = require("./AgentMemoryConfigurationUio");
27
27
  const AgentPatchEngineUio_1 = require("./AgentPatchEngineUio");
28
+ const AgentSandboxConfigurationUio_1 = require("./AgentSandboxConfigurationUio");
28
29
  const AgentTypeUio_1 = require("./AgentTypeUio");
29
30
  /**
30
31
  * Check if a given object implements the AgentPatchUio interface.
@@ -64,6 +65,7 @@ function AgentPatchUioFromJSONTyped(json, ignoreDiscriminator) {
64
65
  'memoryConfiguration': json['memoryConfiguration'] == null ? undefined : (0, AgentMemoryConfigurationUio_1.AgentMemoryConfigurationUioFromJSON)(json['memoryConfiguration']),
65
66
  'contextualKnowledgeConversation': json['contextualKnowledgeConversation'] == null ? undefined : (0, ContextualKnowledgeConversationUio_1.ContextualKnowledgeConversationUioFromJSON)(json['contextualKnowledgeConversation']),
66
67
  'speechToText': json['speechToText'] == null ? undefined : (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioFromJSON)(json['speechToText']),
68
+ 'sandboxConfiguration': json['sandboxConfiguration'] == null ? undefined : (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioFromJSON)(json['sandboxConfiguration']),
67
69
  };
68
70
  }
69
71
  function AgentPatchUioToJSON(json) {
@@ -98,5 +100,6 @@ function AgentPatchUioToJSONTyped(value, ignoreDiscriminator = false) {
98
100
  'memoryConfiguration': (0, AgentMemoryConfigurationUio_1.AgentMemoryConfigurationUioToJSON)(value['memoryConfiguration']),
99
101
  'contextualKnowledgeConversation': (0, ContextualKnowledgeConversationUio_1.ContextualKnowledgeConversationUioToJSON)(value['contextualKnowledgeConversation']),
100
102
  'speechToText': (0, SpeechToTextConfigUio_1.SpeechToTextConfigUioToJSON)(value['speechToText']),
103
+ 'sandboxConfiguration': (0, AgentSandboxConfigurationUio_1.AgentSandboxConfigurationUioToJSON)(value['sandboxConfiguration']),
101
104
  };
102
105
  }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { AgentSandboxNetworkConfigurationUio } from './AgentSandboxNetworkConfigurationUio';
13
+ /**
14
+ * Per-agent activation of the bash sandbox and of its two risky capabilities. Three separate switches because the three risk surfaces are unrelated. The server configuration can only narrow this: an agent may enable, never widen.
15
+ * @export
16
+ * @interface AgentSandboxConfigurationUio
17
+ */
18
+ export interface AgentSandboxConfigurationUio {
19
+ /**
20
+ * Enables the Bash_exec tool for this agent.
21
+ * @type {boolean}
22
+ * @memberof AgentSandboxConfigurationUio
23
+ */
24
+ enabled?: boolean;
25
+ /**
26
+ * Enables python3 inside the sandbox. Also requires the server-side lock; the cost is arbitrary code execution.
27
+ * @type {boolean}
28
+ * @memberof AgentSandboxConfigurationUio
29
+ */
30
+ pythonEnabled?: boolean;
31
+ /**
32
+ *
33
+ * @type {AgentSandboxNetworkConfigurationUio}
34
+ * @memberof AgentSandboxConfigurationUio
35
+ */
36
+ network?: AgentSandboxNetworkConfigurationUio;
37
+ /**
38
+ * Scope of the persisted workspace. Defaults to conversation, which is the only value accepted today: storage supports an agent-and-user scope so enabling it later needs no migration, but the API keeps it closed until that path has run against real traffic.
39
+ * @type {string}
40
+ * @memberof AgentSandboxConfigurationUio
41
+ */
42
+ workspaceScope?: AgentSandboxConfigurationUioWorkspaceScopeEnum;
43
+ }
44
+ /**
45
+ * @export
46
+ */
47
+ export declare const AgentSandboxConfigurationUioWorkspaceScopeEnum: {
48
+ readonly Conversation: "conversation";
49
+ };
50
+ export type AgentSandboxConfigurationUioWorkspaceScopeEnum = typeof AgentSandboxConfigurationUioWorkspaceScopeEnum[keyof typeof AgentSandboxConfigurationUioWorkspaceScopeEnum];
51
+ /**
52
+ * Check if a given object implements the AgentSandboxConfigurationUio interface.
53
+ */
54
+ export declare function instanceOfAgentSandboxConfigurationUio(value: object): value is AgentSandboxConfigurationUio;
55
+ export declare function AgentSandboxConfigurationUioFromJSON(json: any): AgentSandboxConfigurationUio;
56
+ export declare function AgentSandboxConfigurationUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentSandboxConfigurationUio;
57
+ export declare function AgentSandboxConfigurationUioToJSON(json: any): AgentSandboxConfigurationUio;
58
+ export declare function AgentSandboxConfigurationUioToJSONTyped(value?: AgentSandboxConfigurationUio | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AgentSandboxConfigurationUioWorkspaceScopeEnum = void 0;
17
+ exports.instanceOfAgentSandboxConfigurationUio = instanceOfAgentSandboxConfigurationUio;
18
+ exports.AgentSandboxConfigurationUioFromJSON = AgentSandboxConfigurationUioFromJSON;
19
+ exports.AgentSandboxConfigurationUioFromJSONTyped = AgentSandboxConfigurationUioFromJSONTyped;
20
+ exports.AgentSandboxConfigurationUioToJSON = AgentSandboxConfigurationUioToJSON;
21
+ exports.AgentSandboxConfigurationUioToJSONTyped = AgentSandboxConfigurationUioToJSONTyped;
22
+ const AgentSandboxNetworkConfigurationUio_1 = require("./AgentSandboxNetworkConfigurationUio");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.AgentSandboxConfigurationUioWorkspaceScopeEnum = {
27
+ Conversation: 'conversation'
28
+ };
29
+ /**
30
+ * Check if a given object implements the AgentSandboxConfigurationUio interface.
31
+ */
32
+ function instanceOfAgentSandboxConfigurationUio(value) {
33
+ return true;
34
+ }
35
+ function AgentSandboxConfigurationUioFromJSON(json) {
36
+ return AgentSandboxConfigurationUioFromJSONTyped(json, false);
37
+ }
38
+ function AgentSandboxConfigurationUioFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
44
+ 'pythonEnabled': json['pythonEnabled'] == null ? undefined : json['pythonEnabled'],
45
+ 'network': json['network'] == null ? undefined : (0, AgentSandboxNetworkConfigurationUio_1.AgentSandboxNetworkConfigurationUioFromJSON)(json['network']),
46
+ 'workspaceScope': json['workspaceScope'] == null ? undefined : json['workspaceScope'],
47
+ };
48
+ }
49
+ function AgentSandboxConfigurationUioToJSON(json) {
50
+ return AgentSandboxConfigurationUioToJSONTyped(json, false);
51
+ }
52
+ function AgentSandboxConfigurationUioToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'enabled': value['enabled'],
58
+ 'pythonEnabled': value['pythonEnabled'],
59
+ 'network': (0, AgentSandboxNetworkConfigurationUio_1.AgentSandboxNetworkConfigurationUioToJSON)(value['network']),
60
+ 'workspaceScope': value['workspaceScope'],
61
+ };
62
+ }