@breign/client 1.0.128 → 1.0.130
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/AdminApi.d.ts +103 -0
- package/dist/apis/AdminApi.js +267 -0
- package/dist/apis/ConversationsApi.d.ts +14 -1
- package/dist/apis/ConversationsApi.js +29 -0
- package/dist/apis/GuardiansApi.d.ts +15 -1
- package/dist/apis/GuardiansApi.js +34 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AnonymizationStatusUio.d.ts +27 -0
- package/dist/models/AnonymizationStatusUio.js +53 -0
- package/dist/models/AnonymizeRequestUio.d.ts +32 -0
- package/dist/models/AnonymizeRequestUio.js +50 -0
- package/dist/models/AnonymizeResponseUio.d.ts +32 -0
- package/dist/models/AnonymizeResponseUio.js +48 -0
- package/dist/models/ChatMessageUio.d.ts +6 -0
- package/dist/models/ChatMessageUio.js +2 -0
- package/dist/models/GuardianPutRequestUio.d.ts +13 -0
- package/dist/models/GuardianPutRequestUio.js +5 -0
- package/dist/models/GuardianRoleUio.d.ts +1 -1
- package/dist/models/GuardianRoleUio.js +1 -1
- package/dist/models/GuardianUio.d.ts +13 -0
- package/dist/models/GuardianUio.js +5 -0
- package/dist/models/MessageAnonymizationUio.d.ts +93 -0
- package/dist/models/MessageAnonymizationUio.js +85 -0
- package/dist/models/RegexPatternUio.d.ts +56 -0
- package/dist/models/RegexPatternUio.js +66 -0
- package/dist/models/ToolPresetCreateRequestUio.d.ts +118 -0
- package/dist/models/ToolPresetCreateRequestUio.js +86 -0
- package/dist/models/ToolPresetDeleteAllResponseUio.d.ts +32 -0
- package/dist/models/ToolPresetDeleteAllResponseUio.js +50 -0
- package/dist/models/ToolPresetImportItemUio.d.ts +136 -0
- package/dist/models/ToolPresetImportItemUio.js +92 -0
- package/dist/models/ToolPresetImportRequestUio.d.ts +33 -0
- package/dist/models/ToolPresetImportRequestUio.js +51 -0
- package/dist/models/ToolPresetImportResponseUio.d.ts +38 -0
- package/dist/models/ToolPresetImportResponseUio.js +54 -0
- package/dist/models/ToolPresetOAuthRegistrationUio.d.ts +26 -0
- package/dist/models/ToolPresetOAuthRegistrationUio.js +52 -0
- package/dist/models/ToolPresetPageUio.d.ts +63 -0
- package/dist/models/ToolPresetPageUio.js +71 -0
- package/dist/models/ToolPresetTransportUio.d.ts +25 -0
- package/dist/models/ToolPresetTransportUio.js +51 -0
- package/dist/models/ToolPresetUio.d.ts +136 -0
- package/dist/models/ToolPresetUio.js +112 -0
- package/dist/models/ToolPresetUpdateRequestUio.d.ts +118 -0
- package/dist/models/ToolPresetUpdateRequestUio.js +78 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/models/index.js +15 -0
- package/dist/openapi.json +938 -109
- package/package.json +1 -1
|
@@ -0,0 +1,103 @@
|
|
|
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 { ToolPresetCreateRequestUio, ToolPresetDeleteAllResponseUio, ToolPresetImportRequestUio, ToolPresetImportResponseUio, ToolPresetPageUio, ToolPresetUio, ToolPresetUpdateRequestUio } from '../models/index';
|
|
14
|
+
export interface CreateAdminToolPresetRequest {
|
|
15
|
+
toolPresetCreateRequestUio: ToolPresetCreateRequestUio;
|
|
16
|
+
}
|
|
17
|
+
export interface DeleteAdminToolPresetRequest {
|
|
18
|
+
toolPresetId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetAdminToolPresetsRequest {
|
|
21
|
+
page?: number;
|
|
22
|
+
limit?: number;
|
|
23
|
+
search?: string;
|
|
24
|
+
category?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ImportAdminToolPresetsRequest {
|
|
27
|
+
toolPresetImportRequestUio: ToolPresetImportRequestUio;
|
|
28
|
+
}
|
|
29
|
+
export interface UpdateAdminToolPresetRequest {
|
|
30
|
+
toolPresetId: string;
|
|
31
|
+
toolPresetUpdateRequestUio: ToolPresetUpdateRequestUio;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export declare class AdminApi extends runtime.BaseAPI {
|
|
37
|
+
/**
|
|
38
|
+
* Create a tool preset
|
|
39
|
+
*/
|
|
40
|
+
createAdminToolPresetRaw(requestParameters: CreateAdminToolPresetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolPresetUio>>;
|
|
41
|
+
/**
|
|
42
|
+
* Create a tool preset
|
|
43
|
+
*/
|
|
44
|
+
createAdminToolPreset(toolPresetCreateRequestUio: ToolPresetCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolPresetUio>;
|
|
45
|
+
/**
|
|
46
|
+
* Delete a tool preset
|
|
47
|
+
*/
|
|
48
|
+
deleteAdminToolPresetRaw(requestParameters: DeleteAdminToolPresetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
49
|
+
/**
|
|
50
|
+
* Delete a tool preset
|
|
51
|
+
*/
|
|
52
|
+
deleteAdminToolPreset(toolPresetId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Clears the shared tool library
|
|
55
|
+
* Delete every tool preset
|
|
56
|
+
*/
|
|
57
|
+
deleteAllAdminToolPresetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolPresetDeleteAllResponseUio>>;
|
|
58
|
+
/**
|
|
59
|
+
* Clears the shared tool library
|
|
60
|
+
* Delete every tool preset
|
|
61
|
+
*/
|
|
62
|
+
deleteAllAdminToolPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolPresetDeleteAllResponseUio>;
|
|
63
|
+
/**
|
|
64
|
+
* Returns the whole shared tool library at once, without pagination. The payload can be fed back as-is to /admin/tool-presets/import.
|
|
65
|
+
* Export every tool preset
|
|
66
|
+
*/
|
|
67
|
+
exportAdminToolPresetsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ToolPresetUio>>>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the whole shared tool library at once, without pagination. The payload can be fed back as-is to /admin/tool-presets/import.
|
|
70
|
+
* Export every tool preset
|
|
71
|
+
*/
|
|
72
|
+
exportAdminToolPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ToolPresetUio>>;
|
|
73
|
+
/**
|
|
74
|
+
* Returns a page of the shared tool library, including inactive presets. Use /admin/tool-presets/export to retrieve the whole library at once.
|
|
75
|
+
* List tool presets
|
|
76
|
+
*/
|
|
77
|
+
getAdminToolPresetsRaw(requestParameters: GetAdminToolPresetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolPresetPageUio>>;
|
|
78
|
+
/**
|
|
79
|
+
* Returns a page of the shared tool library, including inactive presets. Use /admin/tool-presets/export to retrieve the whole library at once.
|
|
80
|
+
* List tool presets
|
|
81
|
+
*/
|
|
82
|
+
getAdminToolPresets(page?: number, limit?: number, search?: string, category?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolPresetPageUio>;
|
|
83
|
+
/**
|
|
84
|
+
* Replaces the presets that already exist (matched on their slug) and adds the new ones. Presets absent from the payload are left untouched.
|
|
85
|
+
* Import tool presets
|
|
86
|
+
*/
|
|
87
|
+
importAdminToolPresetsRaw(requestParameters: ImportAdminToolPresetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolPresetImportResponseUio>>;
|
|
88
|
+
/**
|
|
89
|
+
* Replaces the presets that already exist (matched on their slug) and adds the new ones. Presets absent from the payload are left untouched.
|
|
90
|
+
* Import tool presets
|
|
91
|
+
*/
|
|
92
|
+
importAdminToolPresets(toolPresetImportRequestUio: ToolPresetImportRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolPresetImportResponseUio>;
|
|
93
|
+
/**
|
|
94
|
+
* Partial update — only the provided properties are modified
|
|
95
|
+
* Update a tool preset
|
|
96
|
+
*/
|
|
97
|
+
updateAdminToolPresetRaw(requestParameters: UpdateAdminToolPresetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ToolPresetUio>>;
|
|
98
|
+
/**
|
|
99
|
+
* Partial update — only the provided properties are modified
|
|
100
|
+
* Update a tool preset
|
|
101
|
+
*/
|
|
102
|
+
updateAdminToolPreset(toolPresetId: string, toolPresetUpdateRequestUio: ToolPresetUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ToolPresetUio>;
|
|
103
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
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.AdminApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class AdminApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Create a tool preset
|
|
58
|
+
*/
|
|
59
|
+
async createAdminToolPresetRaw(requestParameters, initOverrides) {
|
|
60
|
+
if (requestParameters['toolPresetCreateRequestUio'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('toolPresetCreateRequestUio', 'Required parameter "toolPresetCreateRequestUio" was null or undefined when calling createAdminToolPreset().');
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
66
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
67
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
68
|
+
}
|
|
69
|
+
const response = await this.request({
|
|
70
|
+
path: `/admin/tool-presets`,
|
|
71
|
+
method: 'POST',
|
|
72
|
+
headers: headerParameters,
|
|
73
|
+
query: queryParameters,
|
|
74
|
+
body: (0, index_1.ToolPresetCreateRequestUioToJSON)(requestParameters['toolPresetCreateRequestUio']),
|
|
75
|
+
}, initOverrides);
|
|
76
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolPresetUioFromJSON)(jsonValue));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Create a tool preset
|
|
80
|
+
*/
|
|
81
|
+
async createAdminToolPreset(toolPresetCreateRequestUio, initOverrides) {
|
|
82
|
+
const response = await this.createAdminToolPresetRaw({ toolPresetCreateRequestUio: toolPresetCreateRequestUio }, initOverrides);
|
|
83
|
+
return await response.value();
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Delete a tool preset
|
|
87
|
+
*/
|
|
88
|
+
async deleteAdminToolPresetRaw(requestParameters, initOverrides) {
|
|
89
|
+
if (requestParameters['toolPresetId'] == null) {
|
|
90
|
+
throw new runtime.RequiredError('toolPresetId', 'Required parameter "toolPresetId" was null or undefined when calling deleteAdminToolPreset().');
|
|
91
|
+
}
|
|
92
|
+
const queryParameters = {};
|
|
93
|
+
const headerParameters = {};
|
|
94
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
95
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
96
|
+
}
|
|
97
|
+
const response = await this.request({
|
|
98
|
+
path: `/admin/tool-presets/{toolPresetId}`.replace(`{${"toolPresetId"}}`, encodeURIComponent(String(requestParameters['toolPresetId']))),
|
|
99
|
+
method: 'DELETE',
|
|
100
|
+
headers: headerParameters,
|
|
101
|
+
query: queryParameters,
|
|
102
|
+
}, initOverrides);
|
|
103
|
+
return new runtime.VoidApiResponse(response);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Delete a tool preset
|
|
107
|
+
*/
|
|
108
|
+
async deleteAdminToolPreset(toolPresetId, initOverrides) {
|
|
109
|
+
await this.deleteAdminToolPresetRaw({ toolPresetId: toolPresetId }, initOverrides);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Clears the shared tool library
|
|
113
|
+
* Delete every tool preset
|
|
114
|
+
*/
|
|
115
|
+
async deleteAllAdminToolPresetsRaw(initOverrides) {
|
|
116
|
+
const queryParameters = {};
|
|
117
|
+
const headerParameters = {};
|
|
118
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
119
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
120
|
+
}
|
|
121
|
+
const response = await this.request({
|
|
122
|
+
path: `/admin/tool-presets`,
|
|
123
|
+
method: 'DELETE',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
}, initOverrides);
|
|
127
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolPresetDeleteAllResponseUioFromJSON)(jsonValue));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Clears the shared tool library
|
|
131
|
+
* Delete every tool preset
|
|
132
|
+
*/
|
|
133
|
+
async deleteAllAdminToolPresets(initOverrides) {
|
|
134
|
+
const response = await this.deleteAllAdminToolPresetsRaw(initOverrides);
|
|
135
|
+
return await response.value();
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Returns the whole shared tool library at once, without pagination. The payload can be fed back as-is to /admin/tool-presets/import.
|
|
139
|
+
* Export every tool preset
|
|
140
|
+
*/
|
|
141
|
+
async exportAdminToolPresetsRaw(initOverrides) {
|
|
142
|
+
const queryParameters = {};
|
|
143
|
+
const headerParameters = {};
|
|
144
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
145
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
146
|
+
}
|
|
147
|
+
const response = await this.request({
|
|
148
|
+
path: `/admin/tool-presets/export`,
|
|
149
|
+
method: 'GET',
|
|
150
|
+
headers: headerParameters,
|
|
151
|
+
query: queryParameters,
|
|
152
|
+
}, initOverrides);
|
|
153
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.ToolPresetUioFromJSON));
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Returns the whole shared tool library at once, without pagination. The payload can be fed back as-is to /admin/tool-presets/import.
|
|
157
|
+
* Export every tool preset
|
|
158
|
+
*/
|
|
159
|
+
async exportAdminToolPresets(initOverrides) {
|
|
160
|
+
const response = await this.exportAdminToolPresetsRaw(initOverrides);
|
|
161
|
+
return await response.value();
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns a page of the shared tool library, including inactive presets. Use /admin/tool-presets/export to retrieve the whole library at once.
|
|
165
|
+
* List tool presets
|
|
166
|
+
*/
|
|
167
|
+
async getAdminToolPresetsRaw(requestParameters, initOverrides) {
|
|
168
|
+
const queryParameters = {};
|
|
169
|
+
if (requestParameters['page'] != null) {
|
|
170
|
+
queryParameters['page'] = requestParameters['page'];
|
|
171
|
+
}
|
|
172
|
+
if (requestParameters['limit'] != null) {
|
|
173
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
174
|
+
}
|
|
175
|
+
if (requestParameters['search'] != null) {
|
|
176
|
+
queryParameters['search'] = requestParameters['search'];
|
|
177
|
+
}
|
|
178
|
+
if (requestParameters['category'] != null) {
|
|
179
|
+
queryParameters['category'] = requestParameters['category'];
|
|
180
|
+
}
|
|
181
|
+
const headerParameters = {};
|
|
182
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
183
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
184
|
+
}
|
|
185
|
+
const response = await this.request({
|
|
186
|
+
path: `/admin/tool-presets`,
|
|
187
|
+
method: 'GET',
|
|
188
|
+
headers: headerParameters,
|
|
189
|
+
query: queryParameters,
|
|
190
|
+
}, initOverrides);
|
|
191
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolPresetPageUioFromJSON)(jsonValue));
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Returns a page of the shared tool library, including inactive presets. Use /admin/tool-presets/export to retrieve the whole library at once.
|
|
195
|
+
* List tool presets
|
|
196
|
+
*/
|
|
197
|
+
async getAdminToolPresets(page, limit, search, category, initOverrides) {
|
|
198
|
+
const response = await this.getAdminToolPresetsRaw({ page: page, limit: limit, search: search, category: category }, initOverrides);
|
|
199
|
+
return await response.value();
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Replaces the presets that already exist (matched on their slug) and adds the new ones. Presets absent from the payload are left untouched.
|
|
203
|
+
* Import tool presets
|
|
204
|
+
*/
|
|
205
|
+
async importAdminToolPresetsRaw(requestParameters, initOverrides) {
|
|
206
|
+
if (requestParameters['toolPresetImportRequestUio'] == null) {
|
|
207
|
+
throw new runtime.RequiredError('toolPresetImportRequestUio', 'Required parameter "toolPresetImportRequestUio" was null or undefined when calling importAdminToolPresets().');
|
|
208
|
+
}
|
|
209
|
+
const queryParameters = {};
|
|
210
|
+
const headerParameters = {};
|
|
211
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
212
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
213
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
214
|
+
}
|
|
215
|
+
const response = await this.request({
|
|
216
|
+
path: `/admin/tool-presets/import`,
|
|
217
|
+
method: 'POST',
|
|
218
|
+
headers: headerParameters,
|
|
219
|
+
query: queryParameters,
|
|
220
|
+
body: (0, index_1.ToolPresetImportRequestUioToJSON)(requestParameters['toolPresetImportRequestUio']),
|
|
221
|
+
}, initOverrides);
|
|
222
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolPresetImportResponseUioFromJSON)(jsonValue));
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Replaces the presets that already exist (matched on their slug) and adds the new ones. Presets absent from the payload are left untouched.
|
|
226
|
+
* Import tool presets
|
|
227
|
+
*/
|
|
228
|
+
async importAdminToolPresets(toolPresetImportRequestUio, initOverrides) {
|
|
229
|
+
const response = await this.importAdminToolPresetsRaw({ toolPresetImportRequestUio: toolPresetImportRequestUio }, initOverrides);
|
|
230
|
+
return await response.value();
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Partial update — only the provided properties are modified
|
|
234
|
+
* Update a tool preset
|
|
235
|
+
*/
|
|
236
|
+
async updateAdminToolPresetRaw(requestParameters, initOverrides) {
|
|
237
|
+
if (requestParameters['toolPresetId'] == null) {
|
|
238
|
+
throw new runtime.RequiredError('toolPresetId', 'Required parameter "toolPresetId" was null or undefined when calling updateAdminToolPreset().');
|
|
239
|
+
}
|
|
240
|
+
if (requestParameters['toolPresetUpdateRequestUio'] == null) {
|
|
241
|
+
throw new runtime.RequiredError('toolPresetUpdateRequestUio', 'Required parameter "toolPresetUpdateRequestUio" was null or undefined when calling updateAdminToolPreset().');
|
|
242
|
+
}
|
|
243
|
+
const queryParameters = {};
|
|
244
|
+
const headerParameters = {};
|
|
245
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
246
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
247
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
248
|
+
}
|
|
249
|
+
const response = await this.request({
|
|
250
|
+
path: `/admin/tool-presets/{toolPresetId}`.replace(`{${"toolPresetId"}}`, encodeURIComponent(String(requestParameters['toolPresetId']))),
|
|
251
|
+
method: 'PUT',
|
|
252
|
+
headers: headerParameters,
|
|
253
|
+
query: queryParameters,
|
|
254
|
+
body: (0, index_1.ToolPresetUpdateRequestUioToJSON)(requestParameters['toolPresetUpdateRequestUio']),
|
|
255
|
+
}, initOverrides);
|
|
256
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ToolPresetUioFromJSON)(jsonValue));
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Partial update — only the provided properties are modified
|
|
260
|
+
* Update a tool preset
|
|
261
|
+
*/
|
|
262
|
+
async updateAdminToolPreset(toolPresetId, toolPresetUpdateRequestUio, initOverrides) {
|
|
263
|
+
const response = await this.updateAdminToolPresetRaw({ toolPresetId: toolPresetId, toolPresetUpdateRequestUio: toolPresetUpdateRequestUio }, initOverrides);
|
|
264
|
+
return await response.value();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
exports.AdminApi = AdminApi;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, UpdateConversationTitleRequestUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
|
|
13
|
+
import type { AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MessageAnonymizationUio, UpdateConversationTitleRequestUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
|
|
14
14
|
export interface ArchiveConversationByIdRequest {
|
|
15
15
|
conversationId: string;
|
|
16
16
|
}
|
|
@@ -39,6 +39,9 @@ export interface DeleteConversationWorkspaceFileRequest {
|
|
|
39
39
|
conversationId: string;
|
|
40
40
|
path: string;
|
|
41
41
|
}
|
|
42
|
+
export interface GetAnonymizedMessagesRequest {
|
|
43
|
+
conversationId: string;
|
|
44
|
+
}
|
|
42
45
|
export interface GetAttachmentRequest {
|
|
43
46
|
conversationId: string;
|
|
44
47
|
attachmentId: string;
|
|
@@ -161,6 +164,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
|
|
|
161
164
|
* Delete a file from a conversation workspace
|
|
162
165
|
*/
|
|
163
166
|
deleteConversationWorkspaceFile(conversationId: string, path: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Retrieve the list of anonymized messages for a given conversation.
|
|
169
|
+
* Get the anonymized messages of a conversation
|
|
170
|
+
*/
|
|
171
|
+
getAnonymizedMessagesRaw(requestParameters: GetAnonymizedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MessageAnonymizationUio>>>;
|
|
172
|
+
/**
|
|
173
|
+
* Retrieve the list of anonymized messages for a given conversation.
|
|
174
|
+
* Get the anonymized messages of a conversation
|
|
175
|
+
*/
|
|
176
|
+
getAnonymizedMessages(conversationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MessageAnonymizationUio>>;
|
|
164
177
|
/**
|
|
165
178
|
* Get a specific attachment by its ID from the context of a conversation.
|
|
166
179
|
* Retrieve an attachment from a conversation context
|
|
@@ -273,6 +273,35 @@ class ConversationsApi extends runtime.BaseAPI {
|
|
|
273
273
|
async deleteConversationWorkspaceFile(conversationId, path, initOverrides) {
|
|
274
274
|
await this.deleteConversationWorkspaceFileRaw({ conversationId: conversationId, path: path }, initOverrides);
|
|
275
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Retrieve the list of anonymized messages for a given conversation.
|
|
278
|
+
* Get the anonymized messages of a conversation
|
|
279
|
+
*/
|
|
280
|
+
async getAnonymizedMessagesRaw(requestParameters, initOverrides) {
|
|
281
|
+
if (requestParameters['conversationId'] == null) {
|
|
282
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling getAnonymizedMessages().');
|
|
283
|
+
}
|
|
284
|
+
const queryParameters = {};
|
|
285
|
+
const headerParameters = {};
|
|
286
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
287
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
288
|
+
}
|
|
289
|
+
const response = await this.request({
|
|
290
|
+
path: `/conversations/{conversationId}/anonymization`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
|
|
291
|
+
method: 'GET',
|
|
292
|
+
headers: headerParameters,
|
|
293
|
+
query: queryParameters,
|
|
294
|
+
}, initOverrides);
|
|
295
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.MessageAnonymizationUioFromJSON));
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Retrieve the list of anonymized messages for a given conversation.
|
|
299
|
+
* Get the anonymized messages of a conversation
|
|
300
|
+
*/
|
|
301
|
+
async getAnonymizedMessages(conversationId, initOverrides) {
|
|
302
|
+
const response = await this.getAnonymizedMessagesRaw({ conversationId: conversationId }, initOverrides);
|
|
303
|
+
return await response.value();
|
|
304
|
+
}
|
|
276
305
|
/**
|
|
277
306
|
* Get a specific attachment by its ID from the context of a conversation.
|
|
278
307
|
* Retrieve an attachment from a conversation context
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BodyWithMessageUio, GuardianCreateRequestUio, GuardianPutRequestUio, GuardianUio } from '../models/index';
|
|
13
|
+
import type { AnonymizeRequestUio, AnonymizeResponseUio, BodyWithMessageUio, GuardianCreateRequestUio, GuardianPutRequestUio, GuardianUio } from '../models/index';
|
|
14
14
|
export interface CreateGuardianForAgentRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
guardianCreateRequestUio: GuardianCreateRequestUio;
|
|
@@ -31,6 +31,10 @@ export interface GetGuardiansForAgentRequest {
|
|
|
31
31
|
export interface GetGuardiansForOrganizationRequest {
|
|
32
32
|
organizationId: string;
|
|
33
33
|
}
|
|
34
|
+
export interface TestAnonymizeRequest {
|
|
35
|
+
guardianId: string;
|
|
36
|
+
anonymizeRequestUio: AnonymizeRequestUio;
|
|
37
|
+
}
|
|
34
38
|
export interface UpdateExcludedAgentsRequest {
|
|
35
39
|
guardianId: string;
|
|
36
40
|
requestBody: Array<string>;
|
|
@@ -99,6 +103,16 @@ export declare class GuardiansApi extends runtime.BaseAPI {
|
|
|
99
103
|
* Get all guardians for an organization
|
|
100
104
|
*/
|
|
101
105
|
getGuardiansForOrganization(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GuardianUio>>;
|
|
106
|
+
/**
|
|
107
|
+
* Test the Anonymization of a guardian
|
|
108
|
+
* Test the Anonymization of a guardian
|
|
109
|
+
*/
|
|
110
|
+
testAnonymizeRaw(requestParameters: TestAnonymizeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AnonymizeResponseUio>>;
|
|
111
|
+
/**
|
|
112
|
+
* Test the Anonymization of a guardian
|
|
113
|
+
* Test the Anonymization of a guardian
|
|
114
|
+
*/
|
|
115
|
+
testAnonymize(guardianId: string, anonymizeRequestUio: AnonymizeRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AnonymizeResponseUio>;
|
|
102
116
|
/**
|
|
103
117
|
* Updates the excluded agents for a guardian
|
|
104
118
|
* Update excluded agents for a guardian
|
|
@@ -232,6 +232,40 @@ class GuardiansApi extends runtime.BaseAPI {
|
|
|
232
232
|
const response = await this.getGuardiansForOrganizationRaw({ organizationId: organizationId }, initOverrides);
|
|
233
233
|
return await response.value();
|
|
234
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Test the Anonymization of a guardian
|
|
237
|
+
* Test the Anonymization of a guardian
|
|
238
|
+
*/
|
|
239
|
+
async testAnonymizeRaw(requestParameters, initOverrides) {
|
|
240
|
+
if (requestParameters['guardianId'] == null) {
|
|
241
|
+
throw new runtime.RequiredError('guardianId', 'Required parameter "guardianId" was null or undefined when calling testAnonymize().');
|
|
242
|
+
}
|
|
243
|
+
if (requestParameters['anonymizeRequestUio'] == null) {
|
|
244
|
+
throw new runtime.RequiredError('anonymizeRequestUio', 'Required parameter "anonymizeRequestUio" was null or undefined when calling testAnonymize().');
|
|
245
|
+
}
|
|
246
|
+
const queryParameters = {};
|
|
247
|
+
const headerParameters = {};
|
|
248
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
249
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
250
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
251
|
+
}
|
|
252
|
+
const response = await this.request({
|
|
253
|
+
path: `/guardians/{guardianId}/anonymize`.replace(`{${"guardianId"}}`, encodeURIComponent(String(requestParameters['guardianId']))),
|
|
254
|
+
method: 'POST',
|
|
255
|
+
headers: headerParameters,
|
|
256
|
+
query: queryParameters,
|
|
257
|
+
body: (0, index_1.AnonymizeRequestUioToJSON)(requestParameters['anonymizeRequestUio']),
|
|
258
|
+
}, initOverrides);
|
|
259
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AnonymizeResponseUioFromJSON)(jsonValue));
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Test the Anonymization of a guardian
|
|
263
|
+
* Test the Anonymization of a guardian
|
|
264
|
+
*/
|
|
265
|
+
async testAnonymize(guardianId, anonymizeRequestUio, initOverrides) {
|
|
266
|
+
const response = await this.testAnonymizeRaw({ guardianId: guardianId, anonymizeRequestUio: anonymizeRequestUio }, initOverrides);
|
|
267
|
+
return await response.value();
|
|
268
|
+
}
|
|
235
269
|
/**
|
|
236
270
|
* Updates the excluded agents for a guardian
|
|
237
271
|
* Update excluded agents for a guardian
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AdminApi"), exports);
|
|
19
20
|
__exportStar(require("./AgentApi"), exports);
|
|
20
21
|
__exportStar(require("./AiGatewayApi"), exports);
|
|
21
22
|
__exportStar(require("./AppApi"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
*/
|
|
16
|
+
export declare const AnonymizationStatusUio: {
|
|
17
|
+
readonly Pending: "pending";
|
|
18
|
+
readonly Anonymized: "anonymized";
|
|
19
|
+
readonly Deanonymized: "deanonymized";
|
|
20
|
+
readonly Error: "error";
|
|
21
|
+
};
|
|
22
|
+
export type AnonymizationStatusUio = typeof AnonymizationStatusUio[keyof typeof AnonymizationStatusUio];
|
|
23
|
+
export declare function instanceOfAnonymizationStatusUio(value: any): boolean;
|
|
24
|
+
export declare function AnonymizationStatusUioFromJSON(json: any): AnonymizationStatusUio;
|
|
25
|
+
export declare function AnonymizationStatusUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnonymizationStatusUio;
|
|
26
|
+
export declare function AnonymizationStatusUioToJSON(value?: AnonymizationStatusUio | null): any;
|
|
27
|
+
export declare function AnonymizationStatusUioToJSONTyped(value: any, ignoreDiscriminator: boolean): AnonymizationStatusUio;
|
|
@@ -0,0 +1,53 @@
|
|
|
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.AnonymizationStatusUio = void 0;
|
|
17
|
+
exports.instanceOfAnonymizationStatusUio = instanceOfAnonymizationStatusUio;
|
|
18
|
+
exports.AnonymizationStatusUioFromJSON = AnonymizationStatusUioFromJSON;
|
|
19
|
+
exports.AnonymizationStatusUioFromJSONTyped = AnonymizationStatusUioFromJSONTyped;
|
|
20
|
+
exports.AnonymizationStatusUioToJSON = AnonymizationStatusUioToJSON;
|
|
21
|
+
exports.AnonymizationStatusUioToJSONTyped = AnonymizationStatusUioToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.AnonymizationStatusUio = {
|
|
27
|
+
Pending: 'pending',
|
|
28
|
+
Anonymized: 'anonymized',
|
|
29
|
+
Deanonymized: 'deanonymized',
|
|
30
|
+
Error: 'error'
|
|
31
|
+
};
|
|
32
|
+
function instanceOfAnonymizationStatusUio(value) {
|
|
33
|
+
for (const key in exports.AnonymizationStatusUio) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(exports.AnonymizationStatusUio, key)) {
|
|
35
|
+
if (exports.AnonymizationStatusUio[key] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
function AnonymizationStatusUioFromJSON(json) {
|
|
43
|
+
return AnonymizationStatusUioFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function AnonymizationStatusUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
function AnonymizationStatusUioToJSON(value) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
function AnonymizationStatusUioToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 AnonymizeRequestUio
|
|
16
|
+
*/
|
|
17
|
+
export interface AnonymizeRequestUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AnonymizeRequestUio
|
|
22
|
+
*/
|
|
23
|
+
prompt: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the AnonymizeRequestUio interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfAnonymizeRequestUio(value: object): value is AnonymizeRequestUio;
|
|
29
|
+
export declare function AnonymizeRequestUioFromJSON(json: any): AnonymizeRequestUio;
|
|
30
|
+
export declare function AnonymizeRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnonymizeRequestUio;
|
|
31
|
+
export declare function AnonymizeRequestUioToJSON(json: any): AnonymizeRequestUio;
|
|
32
|
+
export declare function AnonymizeRequestUioToJSONTyped(value?: AnonymizeRequestUio | null, ignoreDiscriminator?: boolean): any;
|