@breign/client 1.0.129 → 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/index.d.ts +1 -0
- package/dist/apis/index.js +1 -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 +10 -0
- package/dist/models/index.js +10 -0
- package/dist/openapi.json +626 -0
- 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;
|
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,118 @@
|
|
|
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 { ToolPresetTransportUio } from './ToolPresetTransportUio';
|
|
13
|
+
import type { ToolPresetOAuthRegistrationUio } from './ToolPresetOAuthRegistrationUio';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ToolPresetCreateRequestUio
|
|
18
|
+
*/
|
|
19
|
+
export interface ToolPresetCreateRequestUio {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof ToolPresetCreateRequestUio
|
|
24
|
+
*/
|
|
25
|
+
slug: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof ToolPresetCreateRequestUio
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof ToolPresetCreateRequestUio
|
|
36
|
+
*/
|
|
37
|
+
descriptionEn?: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof ToolPresetCreateRequestUio
|
|
42
|
+
*/
|
|
43
|
+
descriptionFr?: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof ToolPresetCreateRequestUio
|
|
48
|
+
*/
|
|
49
|
+
url: string;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof ToolPresetCreateRequestUio
|
|
54
|
+
*/
|
|
55
|
+
logoUrl?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {ToolPresetTransportUio}
|
|
59
|
+
* @memberof ToolPresetCreateRequestUio
|
|
60
|
+
*/
|
|
61
|
+
transport?: ToolPresetTransportUio;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {Array<string>}
|
|
65
|
+
* @memberof ToolPresetCreateRequestUio
|
|
66
|
+
*/
|
|
67
|
+
authMethods?: Array<string>;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {ToolPresetOAuthRegistrationUio}
|
|
71
|
+
* @memberof ToolPresetCreateRequestUio
|
|
72
|
+
*/
|
|
73
|
+
oauthRegistration?: ToolPresetOAuthRegistrationUio | null;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof ToolPresetCreateRequestUio
|
|
78
|
+
*/
|
|
79
|
+
category: string;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof ToolPresetCreateRequestUio
|
|
84
|
+
*/
|
|
85
|
+
categoryLabelEn?: string;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @memberof ToolPresetCreateRequestUio
|
|
90
|
+
*/
|
|
91
|
+
categoryLabelFr?: string;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {string}
|
|
95
|
+
* @memberof ToolPresetCreateRequestUio
|
|
96
|
+
*/
|
|
97
|
+
categoryDescriptionEn?: string;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof ToolPresetCreateRequestUio
|
|
102
|
+
*/
|
|
103
|
+
categoryDescriptionFr?: string;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
* @memberof ToolPresetCreateRequestUio
|
|
108
|
+
*/
|
|
109
|
+
isActive?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Check if a given object implements the ToolPresetCreateRequestUio interface.
|
|
113
|
+
*/
|
|
114
|
+
export declare function instanceOfToolPresetCreateRequestUio(value: object): value is ToolPresetCreateRequestUio;
|
|
115
|
+
export declare function ToolPresetCreateRequestUioFromJSON(json: any): ToolPresetCreateRequestUio;
|
|
116
|
+
export declare function ToolPresetCreateRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolPresetCreateRequestUio;
|
|
117
|
+
export declare function ToolPresetCreateRequestUioToJSON(json: any): ToolPresetCreateRequestUio;
|
|
118
|
+
export declare function ToolPresetCreateRequestUioToJSONTyped(value?: ToolPresetCreateRequestUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,86 @@
|
|
|
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.instanceOfToolPresetCreateRequestUio = instanceOfToolPresetCreateRequestUio;
|
|
17
|
+
exports.ToolPresetCreateRequestUioFromJSON = ToolPresetCreateRequestUioFromJSON;
|
|
18
|
+
exports.ToolPresetCreateRequestUioFromJSONTyped = ToolPresetCreateRequestUioFromJSONTyped;
|
|
19
|
+
exports.ToolPresetCreateRequestUioToJSON = ToolPresetCreateRequestUioToJSON;
|
|
20
|
+
exports.ToolPresetCreateRequestUioToJSONTyped = ToolPresetCreateRequestUioToJSONTyped;
|
|
21
|
+
const ToolPresetTransportUio_1 = require("./ToolPresetTransportUio");
|
|
22
|
+
const ToolPresetOAuthRegistrationUio_1 = require("./ToolPresetOAuthRegistrationUio");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the ToolPresetCreateRequestUio interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfToolPresetCreateRequestUio(value) {
|
|
27
|
+
if (!('slug' in value) || value['slug'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('category' in value) || value['category'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function ToolPresetCreateRequestUioFromJSON(json) {
|
|
38
|
+
return ToolPresetCreateRequestUioFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function ToolPresetCreateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'slug': json['slug'],
|
|
46
|
+
'name': json['name'],
|
|
47
|
+
'descriptionEn': json['descriptionEn'] == null ? undefined : json['descriptionEn'],
|
|
48
|
+
'descriptionFr': json['descriptionFr'] == null ? undefined : json['descriptionFr'],
|
|
49
|
+
'url': json['url'],
|
|
50
|
+
'logoUrl': json['logoUrl'] == null ? undefined : json['logoUrl'],
|
|
51
|
+
'transport': json['transport'] == null ? undefined : (0, ToolPresetTransportUio_1.ToolPresetTransportUioFromJSON)(json['transport']),
|
|
52
|
+
'authMethods': json['authMethods'] == null ? undefined : json['authMethods'],
|
|
53
|
+
'oauthRegistration': json['oauthRegistration'] == null ? undefined : (0, ToolPresetOAuthRegistrationUio_1.ToolPresetOAuthRegistrationUioFromJSON)(json['oauthRegistration']),
|
|
54
|
+
'category': json['category'],
|
|
55
|
+
'categoryLabelEn': json['categoryLabelEn'] == null ? undefined : json['categoryLabelEn'],
|
|
56
|
+
'categoryLabelFr': json['categoryLabelFr'] == null ? undefined : json['categoryLabelFr'],
|
|
57
|
+
'categoryDescriptionEn': json['categoryDescriptionEn'] == null ? undefined : json['categoryDescriptionEn'],
|
|
58
|
+
'categoryDescriptionFr': json['categoryDescriptionFr'] == null ? undefined : json['categoryDescriptionFr'],
|
|
59
|
+
'isActive': json['isActive'] == null ? undefined : json['isActive'],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function ToolPresetCreateRequestUioToJSON(json) {
|
|
63
|
+
return ToolPresetCreateRequestUioToJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
function ToolPresetCreateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
'slug': value['slug'],
|
|
71
|
+
'name': value['name'],
|
|
72
|
+
'descriptionEn': value['descriptionEn'],
|
|
73
|
+
'descriptionFr': value['descriptionFr'],
|
|
74
|
+
'url': value['url'],
|
|
75
|
+
'logoUrl': value['logoUrl'],
|
|
76
|
+
'transport': (0, ToolPresetTransportUio_1.ToolPresetTransportUioToJSON)(value['transport']),
|
|
77
|
+
'authMethods': value['authMethods'],
|
|
78
|
+
'oauthRegistration': (0, ToolPresetOAuthRegistrationUio_1.ToolPresetOAuthRegistrationUioToJSON)(value['oauthRegistration']),
|
|
79
|
+
'category': value['category'],
|
|
80
|
+
'categoryLabelEn': value['categoryLabelEn'],
|
|
81
|
+
'categoryLabelFr': value['categoryLabelFr'],
|
|
82
|
+
'categoryDescriptionEn': value['categoryDescriptionEn'],
|
|
83
|
+
'categoryDescriptionFr': value['categoryDescriptionFr'],
|
|
84
|
+
'isActive': value['isActive'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -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 ToolPresetDeleteAllResponseUio
|
|
16
|
+
*/
|
|
17
|
+
export interface ToolPresetDeleteAllResponseUio {
|
|
18
|
+
/**
|
|
19
|
+
* Number of presets removed from the library
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ToolPresetDeleteAllResponseUio
|
|
22
|
+
*/
|
|
23
|
+
deleted: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the ToolPresetDeleteAllResponseUio interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfToolPresetDeleteAllResponseUio(value: object): value is ToolPresetDeleteAllResponseUio;
|
|
29
|
+
export declare function ToolPresetDeleteAllResponseUioFromJSON(json: any): ToolPresetDeleteAllResponseUio;
|
|
30
|
+
export declare function ToolPresetDeleteAllResponseUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolPresetDeleteAllResponseUio;
|
|
31
|
+
export declare function ToolPresetDeleteAllResponseUioToJSON(json: any): ToolPresetDeleteAllResponseUio;
|
|
32
|
+
export declare function ToolPresetDeleteAllResponseUioToJSONTyped(value?: ToolPresetDeleteAllResponseUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.instanceOfToolPresetDeleteAllResponseUio = instanceOfToolPresetDeleteAllResponseUio;
|
|
17
|
+
exports.ToolPresetDeleteAllResponseUioFromJSON = ToolPresetDeleteAllResponseUioFromJSON;
|
|
18
|
+
exports.ToolPresetDeleteAllResponseUioFromJSONTyped = ToolPresetDeleteAllResponseUioFromJSONTyped;
|
|
19
|
+
exports.ToolPresetDeleteAllResponseUioToJSON = ToolPresetDeleteAllResponseUioToJSON;
|
|
20
|
+
exports.ToolPresetDeleteAllResponseUioToJSONTyped = ToolPresetDeleteAllResponseUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ToolPresetDeleteAllResponseUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfToolPresetDeleteAllResponseUio(value) {
|
|
25
|
+
if (!('deleted' in value) || value['deleted'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function ToolPresetDeleteAllResponseUioFromJSON(json) {
|
|
30
|
+
return ToolPresetDeleteAllResponseUioFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function ToolPresetDeleteAllResponseUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'deleted': json['deleted'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function ToolPresetDeleteAllResponseUioToJSON(json) {
|
|
41
|
+
return ToolPresetDeleteAllResponseUioToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function ToolPresetDeleteAllResponseUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'deleted': value['deleted'],
|
|
49
|
+
};
|
|
50
|
+
}
|