@breign/client 1.0.125 → 1.0.127
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/AiGatewayApi.d.ts +100 -0
- package/dist/apis/AiGatewayApi.js +248 -0
- package/dist/apis/AppApi.d.ts +17 -3
- package/dist/apis/AppApi.js +36 -2
- package/dist/apis/AuthApi.d.ts +40 -1
- package/dist/apis/AuthApi.js +82 -0
- package/dist/apis/ConfigurationApi.d.ts +16 -3
- package/dist/apis/ConfigurationApi.js +33 -2
- package/dist/apis/ConversationsApi.d.ts +32 -3
- package/dist/apis/ConversationsApi.js +76 -2
- package/dist/apis/EngineApi.d.ts +17 -16
- package/dist/apis/EngineApi.js +33 -30
- package/dist/apis/EnginesApi.d.ts +3 -3
- package/dist/apis/EnginesApi.js +4 -4
- package/dist/apis/KnowledgeApi.d.ts +127 -61
- package/dist/apis/KnowledgeApi.js +257 -108
- package/dist/apis/OrganizationsApi.d.ts +10 -111
- package/dist/apis/OrganizationsApi.js +12 -264
- package/dist/apis/PromptsApi.d.ts +3 -3
- package/dist/apis/PromptsApi.js +1 -1
- package/dist/apis/ToolsApi.d.ts +1 -2
- package/dist/apis/ToolsApi.js +3 -6
- package/dist/apis/UsersApi.d.ts +127 -0
- package/dist/apis/UsersApi.js +308 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/models/AiGatewayChatCompletionRequestUio.d.ts +57 -0
- package/dist/models/AiGatewayChatCompletionRequestUio.js +61 -0
- package/dist/models/AiGatewayChatCompletionResponseUio.d.ts +47 -0
- package/dist/models/AiGatewayChatCompletionResponseUio.js +54 -0
- package/dist/models/AiGatewayEmbeddingRequestUio.d.ts +38 -0
- package/dist/models/AiGatewayEmbeddingRequestUio.js +54 -0
- package/dist/models/AiGatewayEmbeddingResponseUio.d.ts +47 -0
- package/dist/models/AiGatewayEmbeddingResponseUio.js +54 -0
- package/dist/models/AiGatewayErrorUio.d.ts +33 -0
- package/dist/models/AiGatewayErrorUio.js +51 -0
- package/dist/models/AiGatewayMessageUio.d.ts +47 -0
- package/dist/models/AiGatewayMessageUio.js +63 -0
- package/dist/models/AiGatewayModelListDataInnerUio.d.ts +57 -0
- package/dist/models/AiGatewayModelListDataInnerUio.js +69 -0
- package/dist/models/AiGatewayModelListUio.d.ts +46 -0
- package/dist/models/AiGatewayModelListUio.js +62 -0
- package/dist/models/AiGatewayModelUio.d.ts +57 -0
- package/dist/models/AiGatewayModelUio.js +69 -0
- package/dist/models/ApiKeyCreateRequestUio.d.ts +32 -0
- package/dist/models/ApiKeyCreateRequestUio.js +50 -0
- package/dist/models/ApiKeyCreatedUio.d.ts +44 -0
- package/dist/models/{ApiKeyUio.js → ApiKeyCreatedUio.js} +13 -13
- package/dist/models/ApiKeyRefUio.d.ts +38 -0
- package/dist/models/ApiKeyRefUio.js +54 -0
- package/dist/models/AppInstanceEphemeralCreateRequestUio.d.ts +1 -1
- package/dist/models/AppInstanceEphemeralCreateRequestUio.js +3 -1
- package/dist/models/AppReplaceRequestUio.d.ts +94 -0
- package/dist/models/AppReplaceRequestUio.js +82 -0
- package/dist/models/AppTextToSpeechResponseUio.d.ts +3 -3
- package/dist/models/AppTextToSpeechResponseUio.js +3 -3
- package/dist/models/AppUpdateRequestEphemeralInstancesUio.d.ts +38 -0
- package/dist/models/AppUpdateRequestEphemeralInstancesUio.js +50 -0
- package/dist/models/AppUpdateRequestUio.d.ts +12 -12
- package/dist/models/AppUpdateRequestUio.js +3 -3
- package/dist/models/AttachmentProcessedRequestUio.d.ts +50 -0
- package/dist/models/AttachmentProcessedRequestUio.js +62 -0
- package/dist/models/AuthCodeConfirmRequestUio.d.ts +1 -1
- package/dist/models/AuthCodeConfirmRequestUio.js +3 -1
- package/dist/models/AuthCodeConfirmResponseUio.d.ts +15 -3
- package/dist/models/AuthCodeConfirmResponseUio.js +6 -3
- package/dist/models/ChunkCreateRequestContentInnerUio.d.ts +1 -1
- package/dist/models/ChunkCreateRequestContentInnerUio.js +1 -3
- package/dist/models/ChunkCreateRequestUio.d.ts +3 -3
- package/dist/models/ChunkCreateRequestUio.js +10 -4
- package/dist/models/ConfigurationDefaultFillerPhrasesUio.d.ts +7 -6
- package/dist/models/ConfigurationDefaultFillerPhrasesUio.js +7 -8
- package/dist/models/ConfigurationDefaultFillerPhrasesUpdateRequestUio.d.ts +39 -0
- package/dist/models/ConfigurationDefaultFillerPhrasesUpdateRequestUio.js +55 -0
- package/dist/models/ContextLocationRequestUio.d.ts +38 -0
- package/dist/models/ContextLocationRequestUio.js +54 -0
- package/dist/models/ConversationDetailUio.d.ts +101 -0
- package/dist/models/ConversationDetailUio.js +75 -0
- package/dist/models/CreateKnowledgeBaseRequestEmbeddingConfigUio.d.ts +44 -0
- package/dist/models/CreateKnowledgeBaseRequestEmbeddingConfigUio.js +58 -0
- package/dist/models/CreateKnowledgeBaseRequestUio.d.ts +59 -0
- package/dist/models/CreateKnowledgeBaseRequestUio.js +65 -0
- package/dist/models/CreateKnowledgeBaseResponseUio.d.ts +46 -0
- package/dist/models/CreateKnowledgeBaseResponseUio.js +62 -0
- package/dist/models/DeleteKnowledgeSitePage200ResponseUio.d.ts +38 -0
- package/dist/models/DeleteKnowledgeSitePage200ResponseUio.js +52 -0
- package/dist/models/DeleteOrganizationUser200ResponseUio.d.ts +32 -0
- package/dist/models/DeleteOrganizationUser200ResponseUio.js +50 -0
- package/dist/models/DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio.d.ts +50 -0
- package/dist/models/DeleteProvider200ResponseKnowledgeBasesAffectedInnerUio.js +54 -0
- package/dist/models/DeleteProvider200ResponseUio.d.ts +45 -0
- package/dist/models/DeleteProvider200ResponseUio.js +55 -0
- package/dist/models/EmbeddingProviderModelsInnerUio.d.ts +44 -0
- package/dist/models/EmbeddingProviderModelsInnerUio.js +58 -0
- package/dist/models/EmbeddingProviderUio.d.ts +57 -0
- package/dist/models/EmbeddingProviderUio.js +65 -0
- package/dist/models/FileCreationResponseUio.d.ts +1 -0
- package/dist/models/FileCreationResponseUio.js +2 -1
- package/dist/models/FileUio.d.ts +5 -3
- package/dist/models/FileUio.js +4 -4
- package/dist/models/FileWithDownloadUrlUio.d.ts +5 -3
- package/dist/models/FileWithDownloadUrlUio.js +4 -4
- package/dist/models/FillerPhraseUio.d.ts +38 -0
- package/dist/models/FillerPhraseUio.js +54 -0
- package/dist/models/GetJwks200ResponseUio.d.ts +34 -0
- package/dist/models/GetJwks200ResponseUio.js +50 -0
- package/dist/models/ImageKnowledgeUio.d.ts +13 -6
- package/dist/models/ImageKnowledgeUio.js +23 -6
- package/dist/models/KnowledgeBaseConfigurationUio.d.ts +14 -0
- package/dist/models/KnowledgeBaseConfigurationUio.js +10 -1
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationOneOfUio.d.ts +45 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationOneOfUio.js +57 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationUio.d.ts +22 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestAuthenticationUio.js +50 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestUio.d.ts +157 -0
- package/dist/models/KnowledgeBaseConfigurationUpdateRequestUio.js +102 -0
- package/dist/models/KnowledgeBaseUio.d.ts +6 -62
- package/dist/models/KnowledgeBaseUio.js +2 -22
- package/dist/models/KnowledgeFileCreationRequestUio.d.ts +68 -0
- package/dist/models/KnowledgeFileCreationRequestUio.js +64 -0
- package/dist/models/KnowledgeFileParsingCallbackRequestUio.d.ts +51 -0
- package/dist/models/KnowledgeFileParsingCallbackRequestUio.js +58 -0
- package/dist/models/KnowledgeFileSummaryUio.d.ts +2 -3
- package/dist/models/KnowledgeFileSummaryUio.js +2 -3
- package/dist/models/KnowledgeFileUio.d.ts +140 -0
- package/dist/models/KnowledgeFileUio.js +92 -0
- package/dist/models/MarkAttachmentProcessed400ResponseUio.d.ts +40 -0
- package/dist/models/MarkAttachmentProcessed400ResponseUio.js +52 -0
- package/dist/models/MessageUio.d.ts +7 -1
- package/dist/models/MessageUio.js +2 -0
- package/dist/models/OpenAiChatCompletionRequestStreamOptionsUio.d.ts +32 -0
- package/dist/models/OpenAiChatCompletionRequestStreamOptionsUio.js +48 -0
- package/dist/models/OpenAiChatCompletionRequestUio.d.ts +64 -0
- package/dist/models/OpenAiChatCompletionRequestUio.js +64 -0
- package/dist/models/OpenAiChatCompletionResponseUio.d.ts +67 -0
- package/dist/models/OpenAiChatCompletionResponseUio.js +60 -0
- package/dist/models/OrganizationMemberUio.d.ts +3 -3
- package/dist/models/OrganizationMemberUio.js +3 -3
- package/dist/models/OrganizationMemberUserUio.d.ts +32 -0
- package/dist/models/OrganizationMemberUserUio.js +50 -0
- package/dist/models/PinRequestUio.d.ts +3 -3
- package/dist/models/PinRequestUio.js +3 -3
- package/dist/models/ProviderValiationRequestUio.d.ts +1 -1
- package/dist/models/ProviderValiationRequestUio.js +1 -3
- package/dist/models/SetContextLocation400ResponseUio.d.ts +40 -0
- package/dist/models/SetContextLocation400ResponseUio.js +52 -0
- package/dist/models/TTSRequestUio.d.ts +1 -1
- package/dist/models/TTSRequestUio.js +1 -3
- package/dist/models/UploadedStatusUpdateRequestUio.d.ts +39 -0
- package/dist/models/UploadedStatusUpdateRequestUio.js +57 -0
- package/dist/models/UserCreateRequestUio.d.ts +45 -0
- package/dist/models/UserCreateRequestUio.js +57 -0
- package/dist/models/UserDetailUio.d.ts +88 -0
- package/dist/models/UserDetailUio.js +80 -0
- package/dist/models/UserIdentifierRequestUio.d.ts +32 -0
- package/dist/models/UserIdentifierRequestUio.js +50 -0
- package/dist/models/UserIdentifierUio.d.ts +38 -0
- package/dist/models/UserIdentifierUio.js +52 -0
- package/dist/models/UserLockRequestUio.d.ts +32 -0
- package/dist/models/UserLockRequestUio.js +50 -0
- package/dist/models/UserUpdateRequestUio.d.ts +63 -0
- package/dist/models/UserUpdateRequestUio.js +59 -0
- package/dist/models/index.d.ts +48 -20
- package/dist/models/index.js +48 -20
- package/dist/openapi.json +3768 -2025
- package/package.json +1 -1
- package/dist/models/AccessRoleCreateRequestUio.d.ts +0 -45
- package/dist/models/AccessRoleCreateRequestUio.js +0 -55
- package/dist/models/AccessRolePermissionsRequestUio.d.ts +0 -33
- package/dist/models/AccessRolePermissionsRequestUio.js +0 -51
- package/dist/models/AccessRoleUio.d.ts +0 -75
- package/dist/models/AccessRoleUio.js +0 -75
- package/dist/models/AccessRoleUpdateRequestUio.d.ts +0 -38
- package/dist/models/AccessRoleUpdateRequestUio.js +0 -52
- package/dist/models/ApiKeyUio.d.ts +0 -44
- package/dist/models/AudioFile1Uio.d.ts +0 -45
- package/dist/models/AudioFile1Uio.js +0 -59
- package/dist/models/Conversation1Uio.d.ts +0 -46
- package/dist/models/Conversation1Uio.js +0 -60
- package/dist/models/FileFormDataUio.d.ts +0 -38
- package/dist/models/FileFormDataUio.js +0 -50
- package/dist/models/FileStatusUpdateRequestUio.d.ts +0 -33
- package/dist/models/FileStatusUpdateRequestUio.js +0 -51
- package/dist/models/KnowledgeBaseFilesInnerUio.d.ts +0 -44
- package/dist/models/KnowledgeBaseFilesInnerUio.js +0 -58
- package/dist/models/KnowledgeBasePrivacyUio.d.ts +0 -25
- package/dist/models/KnowledgeBasePrivacyUio.js +0 -51
- package/dist/models/KnowledgeFilePagePreviewUio.d.ts +0 -44
- package/dist/models/KnowledgeFilePagePreviewUio.js +0 -56
- package/dist/models/KnowledgeFileSummaryKnowledgeBaseIdUio.d.ts +0 -21
- package/dist/models/KnowledgeFileSummaryKnowledgeBaseIdUio.js +0 -37
- package/dist/models/OrganizationPermissionKeyUio.d.ts +0 -59
- package/dist/models/OrganizationPermissionKeyUio.js +0 -85
- package/dist/models/PermissionEntryUio.d.ts +0 -39
- package/dist/models/PermissionEntryUio.js +0 -55
- package/dist/models/ProviderSimpleUio.d.ts +0 -57
- package/dist/models/ProviderSimpleUio.js +0 -65
- package/dist/models/UserAccessRolesRequestUio.d.ts +0 -32
- package/dist/models/UserAccessRolesRequestUio.js +0 -50
- package/dist/models/UserAccessUio.d.ts +0 -39
- package/dist/models/UserAccessUio.js +0 -55
- package/dist/models/UserDirectPermissionsRequestUio.d.ts +0 -33
- package/dist/models/UserDirectPermissionsRequestUio.js +0 -51
- package/dist/models/UserUio.d.ts +0 -87
- 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;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/apis/index.js
CHANGED
|
@@ -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);
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { AiGatewayMessageUio } from './AiGatewayMessageUio';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AiGatewayChatCompletionRequestUio
|
|
17
|
+
*/
|
|
18
|
+
export interface AiGatewayChatCompletionRequestUio {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AiGatewayChatCompletionRequestUio
|
|
23
|
+
*/
|
|
24
|
+
model: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<AiGatewayMessageUio>}
|
|
28
|
+
* @memberof AiGatewayChatCompletionRequestUio
|
|
29
|
+
*/
|
|
30
|
+
messages: Array<AiGatewayMessageUio>;
|
|
31
|
+
/**
|
|
32
|
+
* Nombre maximum de tokens générés.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof AiGatewayChatCompletionRequestUio
|
|
35
|
+
*/
|
|
36
|
+
maxTokens?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Température d'échantillonnage.
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof AiGatewayChatCompletionRequestUio
|
|
41
|
+
*/
|
|
42
|
+
temperature?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Si true, la réponse est un flux de texte brut au lieu d'un objet JSON.
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
* @memberof AiGatewayChatCompletionRequestUio
|
|
47
|
+
*/
|
|
48
|
+
stream?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the AiGatewayChatCompletionRequestUio interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfAiGatewayChatCompletionRequestUio(value: object): value is AiGatewayChatCompletionRequestUio;
|
|
54
|
+
export declare function AiGatewayChatCompletionRequestUioFromJSON(json: any): AiGatewayChatCompletionRequestUio;
|
|
55
|
+
export declare function AiGatewayChatCompletionRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AiGatewayChatCompletionRequestUio;
|
|
56
|
+
export declare function AiGatewayChatCompletionRequestUioToJSON(json: any): AiGatewayChatCompletionRequestUio;
|
|
57
|
+
export declare function AiGatewayChatCompletionRequestUioToJSONTyped(value?: AiGatewayChatCompletionRequestUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,61 @@
|
|
|
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.instanceOfAiGatewayChatCompletionRequestUio = instanceOfAiGatewayChatCompletionRequestUio;
|
|
17
|
+
exports.AiGatewayChatCompletionRequestUioFromJSON = AiGatewayChatCompletionRequestUioFromJSON;
|
|
18
|
+
exports.AiGatewayChatCompletionRequestUioFromJSONTyped = AiGatewayChatCompletionRequestUioFromJSONTyped;
|
|
19
|
+
exports.AiGatewayChatCompletionRequestUioToJSON = AiGatewayChatCompletionRequestUioToJSON;
|
|
20
|
+
exports.AiGatewayChatCompletionRequestUioToJSONTyped = AiGatewayChatCompletionRequestUioToJSONTyped;
|
|
21
|
+
const AiGatewayMessageUio_1 = require("./AiGatewayMessageUio");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the AiGatewayChatCompletionRequestUio interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfAiGatewayChatCompletionRequestUio(value) {
|
|
26
|
+
if (!('model' in value) || value['model'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('messages' in value) || value['messages'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function AiGatewayChatCompletionRequestUioFromJSON(json) {
|
|
33
|
+
return AiGatewayChatCompletionRequestUioFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function AiGatewayChatCompletionRequestUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'model': json['model'],
|
|
41
|
+
'messages': (json['messages'].map(AiGatewayMessageUio_1.AiGatewayMessageUioFromJSON)),
|
|
42
|
+
'maxTokens': json['maxTokens'] == null ? undefined : json['maxTokens'],
|
|
43
|
+
'temperature': json['temperature'] == null ? undefined : json['temperature'],
|
|
44
|
+
'stream': json['stream'] == null ? undefined : json['stream'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function AiGatewayChatCompletionRequestUioToJSON(json) {
|
|
48
|
+
return AiGatewayChatCompletionRequestUioToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function AiGatewayChatCompletionRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'model': value['model'],
|
|
56
|
+
'messages': (value['messages'].map(AiGatewayMessageUio_1.AiGatewayMessageUioToJSON)),
|
|
57
|
+
'maxTokens': value['maxTokens'],
|
|
58
|
+
'temperature': value['temperature'],
|
|
59
|
+
'stream': value['stream'],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AiGatewayChatCompletionResponseUio
|
|
16
|
+
*/
|
|
17
|
+
export interface AiGatewayChatCompletionResponseUio {
|
|
18
|
+
[key: string]: any | any;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof AiGatewayChatCompletionResponseUio
|
|
23
|
+
*/
|
|
24
|
+
text?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AiGatewayChatCompletionResponseUio
|
|
29
|
+
*/
|
|
30
|
+
finishReason?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {{ [key: string]: any; }}
|
|
34
|
+
* @memberof AiGatewayChatCompletionResponseUio
|
|
35
|
+
*/
|
|
36
|
+
usage?: {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the AiGatewayChatCompletionResponseUio interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfAiGatewayChatCompletionResponseUio(value: object): value is AiGatewayChatCompletionResponseUio;
|
|
44
|
+
export declare function AiGatewayChatCompletionResponseUioFromJSON(json: any): AiGatewayChatCompletionResponseUio;
|
|
45
|
+
export declare function AiGatewayChatCompletionResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AiGatewayChatCompletionResponseUio;
|
|
46
|
+
export declare function AiGatewayChatCompletionResponseUioToJSON(json: any): AiGatewayChatCompletionResponseUio;
|
|
47
|
+
export declare function AiGatewayChatCompletionResponseUioToJSONTyped(value?: AiGatewayChatCompletionResponseUio | null, ignoreDiscriminator?: boolean): any;
|