@breign/client 1.0.131 → 1.0.133
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 +108 -1
- package/dist/apis/AiGatewayApi.js +218 -1
- package/dist/apis/ConversationsApi.d.ts +28 -1
- package/dist/apis/ConversationsApi.js +59 -0
- package/dist/models/AgentChatOverviewEntryUio.d.ts +56 -0
- package/dist/models/AgentChatOverviewEntryUio.js +64 -0
- package/dist/models/AiGatewayV1CreditsUio.d.ts +38 -0
- package/dist/models/AiGatewayV1CreditsUio.js +52 -0
- package/dist/models/AiGatewayV1EndpointPricingUio.d.ts +50 -0
- package/dist/models/AiGatewayV1EndpointPricingUio.js +54 -0
- package/dist/models/AiGatewayV1EndpointUio.d.ts +111 -0
- package/dist/models/AiGatewayV1EndpointUio.js +85 -0
- package/dist/models/AiGatewayV1GenerationDataUio.d.ts +146 -0
- package/dist/models/AiGatewayV1GenerationDataUio.js +96 -0
- package/dist/models/AiGatewayV1GenerationUio.d.ts +33 -0
- package/dist/models/AiGatewayV1GenerationUio.js +51 -0
- package/dist/models/AiGatewayV1ModelEndpointsDataArchitectureUio.d.ts +56 -0
- package/dist/models/AiGatewayV1ModelEndpointsDataArchitectureUio.js +56 -0
- package/dist/models/AiGatewayV1ModelEndpointsDataUio.d.ts +70 -0
- package/dist/models/AiGatewayV1ModelEndpointsDataUio.js +72 -0
- package/dist/models/AiGatewayV1ModelEndpointsUio.d.ts +33 -0
- package/dist/models/AiGatewayV1ModelEndpointsUio.js +51 -0
- package/dist/models/AiGatewayV1ModelListUio.d.ts +46 -0
- package/dist/models/AiGatewayV1ModelListUio.js +62 -0
- package/dist/models/AiGatewayV1ModelPricingUio.d.ts +50 -0
- package/dist/models/AiGatewayV1ModelPricingUio.js +54 -0
- package/dist/models/AiGatewayV1ModelUio.d.ts +114 -0
- package/dist/models/AiGatewayV1ModelUio.js +99 -0
- package/dist/models/AiGatewayV1ReportRowUio.d.ts +140 -0
- package/dist/models/AiGatewayV1ReportRowUio.js +104 -0
- package/dist/models/AiGatewayV1ReportUio.d.ts +33 -0
- package/dist/models/AiGatewayV1ReportUio.js +51 -0
- package/dist/models/MarkConversationReadRequestUio.d.ts +32 -0
- package/dist/models/MarkConversationReadRequestUio.js +48 -0
- package/dist/models/index.d.ts +15 -0
- package/dist/models/index.js +15 -0
- package/dist/openapi.json +1242 -313
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AiGatewayChatCompletionRequestUio, AiGatewayChatCompletionResponseUio, AiGatewayEmbeddingRequestUio, AiGatewayEmbeddingResponseUio, AiGatewayModelListUio, AiGatewayModelUio, AiGatewayUsageUio, OpenAiChatCompletionRequestUio, OpenAiChatCompletionResponseUio } from '../models/index';
|
|
13
|
+
import type { AiGatewayChatCompletionRequestUio, AiGatewayChatCompletionResponseUio, AiGatewayEmbeddingRequestUio, AiGatewayEmbeddingResponseUio, AiGatewayModelListUio, AiGatewayModelUio, AiGatewayUsageUio, AiGatewayV1CreditsUio, AiGatewayV1GenerationUio, AiGatewayV1ModelEndpointsUio, AiGatewayV1ModelListUio, AiGatewayV1ReportUio, OpenAiChatCompletionRequestUio, OpenAiChatCompletionResponseUio } from '../models/index';
|
|
14
14
|
export interface CreateAiGatewayChatCompletionRequest {
|
|
15
15
|
organizationId: string;
|
|
16
16
|
aiGatewayChatCompletionRequestUio: AiGatewayChatCompletionRequestUio;
|
|
@@ -36,9 +36,36 @@ export interface GetAiGatewayModelRequest {
|
|
|
36
36
|
organizationId: string;
|
|
37
37
|
model: string;
|
|
38
38
|
}
|
|
39
|
+
export interface GetAiGatewayV1CreditsRequest {
|
|
40
|
+
organizationId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface GetAiGatewayV1GenerationRequest {
|
|
43
|
+
organizationId: string;
|
|
44
|
+
id: string;
|
|
45
|
+
}
|
|
46
|
+
export interface GetAiGatewayV1ModelEndpointsRequest {
|
|
47
|
+
organizationId: string;
|
|
48
|
+
creator: string;
|
|
49
|
+
model: string;
|
|
50
|
+
}
|
|
51
|
+
export interface GetAiGatewayV1ReportRequest {
|
|
52
|
+
organizationId: string;
|
|
53
|
+
startDate: string;
|
|
54
|
+
endDate: string;
|
|
55
|
+
groupBy?: GetAiGatewayV1ReportGroupByEnum;
|
|
56
|
+
datePart?: GetAiGatewayV1ReportDatePartEnum;
|
|
57
|
+
userId?: string;
|
|
58
|
+
model?: string;
|
|
59
|
+
provider?: string;
|
|
60
|
+
tags?: string;
|
|
61
|
+
tagsMatch?: GetAiGatewayV1ReportTagsMatchEnum;
|
|
62
|
+
}
|
|
39
63
|
export interface ListAiGatewayModelsRequest {
|
|
40
64
|
organizationId: string;
|
|
41
65
|
}
|
|
66
|
+
export interface ListAiGatewayV1ModelsRequest {
|
|
67
|
+
organizationId: string;
|
|
68
|
+
}
|
|
42
69
|
/**
|
|
43
70
|
*
|
|
44
71
|
*/
|
|
@@ -103,6 +130,46 @@ export declare class AiGatewayApi extends runtime.BaseAPI {
|
|
|
103
130
|
* Get a model available through the AI gateway
|
|
104
131
|
*/
|
|
105
132
|
getAiGatewayModel(organizationId: string, model: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayModelUio>;
|
|
133
|
+
/**
|
|
134
|
+
* Équivalent de `GET /v1/credits`. `total_used` est la dépense cumulée de l\'organisation, calculée depuis la configuration de prix. `balance` est toujours null : Breign n\'a pas de notion de crédits prépayés.
|
|
135
|
+
* Check credit balance (AI Gateway REST API)
|
|
136
|
+
*/
|
|
137
|
+
getAiGatewayV1CreditsRaw(requestParameters: GetAiGatewayV1CreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayV1CreditsUio>>;
|
|
138
|
+
/**
|
|
139
|
+
* Équivalent de `GET /v1/credits`. `total_used` est la dépense cumulée de l\'organisation, calculée depuis la configuration de prix. `balance` est toujours null : Breign n\'a pas de notion de crédits prépayés.
|
|
140
|
+
* Check credit balance (AI Gateway REST API)
|
|
141
|
+
*/
|
|
142
|
+
getAiGatewayV1Credits(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayV1CreditsUio>;
|
|
143
|
+
/**
|
|
144
|
+
* Équivalent de `GET /v1/generation`. L\'identifiant est renvoyé comme `id` des complétions compatibles OpenAI, injecté dans le premier chunk en streaming, et exposé dans `providerMetadata.gateway.generationId` sur les routes AI SDK.
|
|
145
|
+
* Look up a generation (AI Gateway REST API)
|
|
146
|
+
*/
|
|
147
|
+
getAiGatewayV1GenerationRaw(requestParameters: GetAiGatewayV1GenerationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayV1GenerationUio>>;
|
|
148
|
+
/**
|
|
149
|
+
* Équivalent de `GET /v1/generation`. L\'identifiant est renvoyé comme `id` des complétions compatibles OpenAI, injecté dans le premier chunk en streaming, et exposé dans `providerMetadata.gateway.generationId` sur les routes AI SDK.
|
|
150
|
+
* Look up a generation (AI Gateway REST API)
|
|
151
|
+
*/
|
|
152
|
+
getAiGatewayV1Generation(organizationId: string, id: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayV1GenerationUio>;
|
|
153
|
+
/**
|
|
154
|
+
* Équivalent de `GET /v1/models/{creator}/{model}/endpoints`. Un modèle n\'étant servi que par le provider qui le déclare dans l\'organisation, la liste contient toujours un seul endpoint. Les identifiants Breign n\'ayant pas toujours de créateur, `{creator}/{model}` est résolu d\'abord tel quel, puis sur le seul segment `{model}`.
|
|
155
|
+
* Get model endpoints (AI Gateway REST API)
|
|
156
|
+
*/
|
|
157
|
+
getAiGatewayV1ModelEndpointsRaw(requestParameters: GetAiGatewayV1ModelEndpointsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayV1ModelEndpointsUio>>;
|
|
158
|
+
/**
|
|
159
|
+
* Équivalent de `GET /v1/models/{creator}/{model}/endpoints`. Un modèle n\'étant servi que par le provider qui le déclare dans l\'organisation, la liste contient toujours un seul endpoint. Les identifiants Breign n\'ayant pas toujours de créateur, `{creator}/{model}` est résolu d\'abord tel quel, puis sur le seul segment `{model}`.
|
|
160
|
+
* Get model endpoints (AI Gateway REST API)
|
|
161
|
+
*/
|
|
162
|
+
getAiGatewayV1ModelEndpoints(organizationId: string, creator: string, model: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayV1ModelEndpointsUio>;
|
|
163
|
+
/**
|
|
164
|
+
* Équivalent de `GET /v1/report`. L\'attribution applicative provient des en-têtes `ai-reporting-user` et `ai-reporting-tags` posés sur les appels d\'inférence. Réservé aux administrateurs de l\'organisation.
|
|
165
|
+
* Query spend report (AI Gateway REST API)
|
|
166
|
+
*/
|
|
167
|
+
getAiGatewayV1ReportRaw(requestParameters: GetAiGatewayV1ReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayV1ReportUio>>;
|
|
168
|
+
/**
|
|
169
|
+
* Équivalent de `GET /v1/report`. L\'attribution applicative provient des en-têtes `ai-reporting-user` et `ai-reporting-tags` posés sur les appels d\'inférence. Réservé aux administrateurs de l\'organisation.
|
|
170
|
+
* Query spend report (AI Gateway REST API)
|
|
171
|
+
*/
|
|
172
|
+
getAiGatewayV1Report(organizationId: string, startDate: string, endDate: string, groupBy?: GetAiGatewayV1ReportGroupByEnum, datePart?: GetAiGatewayV1ReportDatePartEnum, userId?: string, model?: string, provider?: string, tags?: string, tagsMatch?: GetAiGatewayV1ReportTagsMatchEnum, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayV1ReportUio>;
|
|
106
173
|
/**
|
|
107
174
|
* Lists every model exposed by the organization\'s engine providers, in an OpenAI-compatible envelope. Accessible à tout membre de l\'organisation. Chaque `id` est l\'identifiant côté provider : c\'est la valeur à renvoyer dans `model` sur les endpoints de complétion et d\'embedding.
|
|
108
175
|
* List models available through the AI gateway
|
|
@@ -113,6 +180,16 @@ export declare class AiGatewayApi extends runtime.BaseAPI {
|
|
|
113
180
|
* List models available through the AI gateway
|
|
114
181
|
*/
|
|
115
182
|
listAiGatewayModels(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayModelListUio>;
|
|
183
|
+
/**
|
|
184
|
+
* Équivalent de `GET /v1/models` de l\'AI Gateway Vercel, monté sous le préfixe organisation. Liste les modèles des providers configurés pour l\'organisation.
|
|
185
|
+
* List models (AI Gateway REST API)
|
|
186
|
+
*/
|
|
187
|
+
listAiGatewayV1ModelsRaw(requestParameters: ListAiGatewayV1ModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AiGatewayV1ModelListUio>>;
|
|
188
|
+
/**
|
|
189
|
+
* Équivalent de `GET /v1/models` de l\'AI Gateway Vercel, monté sous le préfixe organisation. Liste les modèles des providers configurés pour l\'organisation.
|
|
190
|
+
* List models (AI Gateway REST API)
|
|
191
|
+
*/
|
|
192
|
+
listAiGatewayV1Models(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AiGatewayV1ModelListUio>;
|
|
116
193
|
}
|
|
117
194
|
/**
|
|
118
195
|
* @export
|
|
@@ -123,3 +200,33 @@ export declare const GetAiGatewayMetricsGranularityEnum: {
|
|
|
123
200
|
readonly Week: "week";
|
|
124
201
|
};
|
|
125
202
|
export type GetAiGatewayMetricsGranularityEnum = typeof GetAiGatewayMetricsGranularityEnum[keyof typeof GetAiGatewayMetricsGranularityEnum];
|
|
203
|
+
/**
|
|
204
|
+
* @export
|
|
205
|
+
*/
|
|
206
|
+
export declare const GetAiGatewayV1ReportGroupByEnum: {
|
|
207
|
+
readonly Day: "day";
|
|
208
|
+
readonly User: "user";
|
|
209
|
+
readonly Model: "model";
|
|
210
|
+
readonly Tag: "tag";
|
|
211
|
+
readonly Provider: "provider";
|
|
212
|
+
readonly CredentialType: "credential_type";
|
|
213
|
+
readonly ZeroDataRetention: "zero_data_retention";
|
|
214
|
+
readonly ApiKeyName: "api_key_name";
|
|
215
|
+
};
|
|
216
|
+
export type GetAiGatewayV1ReportGroupByEnum = typeof GetAiGatewayV1ReportGroupByEnum[keyof typeof GetAiGatewayV1ReportGroupByEnum];
|
|
217
|
+
/**
|
|
218
|
+
* @export
|
|
219
|
+
*/
|
|
220
|
+
export declare const GetAiGatewayV1ReportDatePartEnum: {
|
|
221
|
+
readonly Day: "day";
|
|
222
|
+
readonly Hour: "hour";
|
|
223
|
+
};
|
|
224
|
+
export type GetAiGatewayV1ReportDatePartEnum = typeof GetAiGatewayV1ReportDatePartEnum[keyof typeof GetAiGatewayV1ReportDatePartEnum];
|
|
225
|
+
/**
|
|
226
|
+
* @export
|
|
227
|
+
*/
|
|
228
|
+
export declare const GetAiGatewayV1ReportTagsMatchEnum: {
|
|
229
|
+
readonly Any: "any";
|
|
230
|
+
readonly All: "all";
|
|
231
|
+
};
|
|
232
|
+
export type GetAiGatewayV1ReportTagsMatchEnum = typeof GetAiGatewayV1ReportTagsMatchEnum[keyof typeof GetAiGatewayV1ReportTagsMatchEnum];
|
|
@@ -46,7 +46,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
};
|
|
47
47
|
})();
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.GetAiGatewayMetricsGranularityEnum = exports.AiGatewayApi = void 0;
|
|
49
|
+
exports.GetAiGatewayV1ReportTagsMatchEnum = exports.GetAiGatewayV1ReportDatePartEnum = exports.GetAiGatewayV1ReportGroupByEnum = exports.GetAiGatewayMetricsGranularityEnum = exports.AiGatewayApi = void 0;
|
|
50
50
|
const runtime = __importStar(require("../runtime"));
|
|
51
51
|
const index_1 = require("../models/index");
|
|
52
52
|
/**
|
|
@@ -253,6 +253,167 @@ class AiGatewayApi extends runtime.BaseAPI {
|
|
|
253
253
|
const response = await this.getAiGatewayModelRaw({ organizationId: organizationId, model: model }, initOverrides);
|
|
254
254
|
return await response.value();
|
|
255
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* Équivalent de `GET /v1/credits`. `total_used` est la dépense cumulée de l\'organisation, calculée depuis la configuration de prix. `balance` est toujours null : Breign n\'a pas de notion de crédits prépayés.
|
|
258
|
+
* Check credit balance (AI Gateway REST API)
|
|
259
|
+
*/
|
|
260
|
+
async getAiGatewayV1CreditsRaw(requestParameters, initOverrides) {
|
|
261
|
+
if (requestParameters['organizationId'] == null) {
|
|
262
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAiGatewayV1Credits().');
|
|
263
|
+
}
|
|
264
|
+
const queryParameters = {};
|
|
265
|
+
const headerParameters = {};
|
|
266
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
267
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
268
|
+
}
|
|
269
|
+
const response = await this.request({
|
|
270
|
+
path: `/organizations/{organizationId}/ai-gateway/v1/credits`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
271
|
+
method: 'GET',
|
|
272
|
+
headers: headerParameters,
|
|
273
|
+
query: queryParameters,
|
|
274
|
+
}, initOverrides);
|
|
275
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayV1CreditsUioFromJSON)(jsonValue));
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Équivalent de `GET /v1/credits`. `total_used` est la dépense cumulée de l\'organisation, calculée depuis la configuration de prix. `balance` est toujours null : Breign n\'a pas de notion de crédits prépayés.
|
|
279
|
+
* Check credit balance (AI Gateway REST API)
|
|
280
|
+
*/
|
|
281
|
+
async getAiGatewayV1Credits(organizationId, initOverrides) {
|
|
282
|
+
const response = await this.getAiGatewayV1CreditsRaw({ organizationId: organizationId }, initOverrides);
|
|
283
|
+
return await response.value();
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Équivalent de `GET /v1/generation`. L\'identifiant est renvoyé comme `id` des complétions compatibles OpenAI, injecté dans le premier chunk en streaming, et exposé dans `providerMetadata.gateway.generationId` sur les routes AI SDK.
|
|
287
|
+
* Look up a generation (AI Gateway REST API)
|
|
288
|
+
*/
|
|
289
|
+
async getAiGatewayV1GenerationRaw(requestParameters, initOverrides) {
|
|
290
|
+
if (requestParameters['organizationId'] == null) {
|
|
291
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAiGatewayV1Generation().');
|
|
292
|
+
}
|
|
293
|
+
if (requestParameters['id'] == null) {
|
|
294
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getAiGatewayV1Generation().');
|
|
295
|
+
}
|
|
296
|
+
const queryParameters = {};
|
|
297
|
+
if (requestParameters['id'] != null) {
|
|
298
|
+
queryParameters['id'] = requestParameters['id'];
|
|
299
|
+
}
|
|
300
|
+
const headerParameters = {};
|
|
301
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
302
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
303
|
+
}
|
|
304
|
+
const response = await this.request({
|
|
305
|
+
path: `/organizations/{organizationId}/ai-gateway/v1/generation`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
306
|
+
method: 'GET',
|
|
307
|
+
headers: headerParameters,
|
|
308
|
+
query: queryParameters,
|
|
309
|
+
}, initOverrides);
|
|
310
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayV1GenerationUioFromJSON)(jsonValue));
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Équivalent de `GET /v1/generation`. L\'identifiant est renvoyé comme `id` des complétions compatibles OpenAI, injecté dans le premier chunk en streaming, et exposé dans `providerMetadata.gateway.generationId` sur les routes AI SDK.
|
|
314
|
+
* Look up a generation (AI Gateway REST API)
|
|
315
|
+
*/
|
|
316
|
+
async getAiGatewayV1Generation(organizationId, id, initOverrides) {
|
|
317
|
+
const response = await this.getAiGatewayV1GenerationRaw({ organizationId: organizationId, id: id }, initOverrides);
|
|
318
|
+
return await response.value();
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Équivalent de `GET /v1/models/{creator}/{model}/endpoints`. Un modèle n\'étant servi que par le provider qui le déclare dans l\'organisation, la liste contient toujours un seul endpoint. Les identifiants Breign n\'ayant pas toujours de créateur, `{creator}/{model}` est résolu d\'abord tel quel, puis sur le seul segment `{model}`.
|
|
322
|
+
* Get model endpoints (AI Gateway REST API)
|
|
323
|
+
*/
|
|
324
|
+
async getAiGatewayV1ModelEndpointsRaw(requestParameters, initOverrides) {
|
|
325
|
+
if (requestParameters['organizationId'] == null) {
|
|
326
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAiGatewayV1ModelEndpoints().');
|
|
327
|
+
}
|
|
328
|
+
if (requestParameters['creator'] == null) {
|
|
329
|
+
throw new runtime.RequiredError('creator', 'Required parameter "creator" was null or undefined when calling getAiGatewayV1ModelEndpoints().');
|
|
330
|
+
}
|
|
331
|
+
if (requestParameters['model'] == null) {
|
|
332
|
+
throw new runtime.RequiredError('model', 'Required parameter "model" was null or undefined when calling getAiGatewayV1ModelEndpoints().');
|
|
333
|
+
}
|
|
334
|
+
const queryParameters = {};
|
|
335
|
+
const headerParameters = {};
|
|
336
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
337
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
338
|
+
}
|
|
339
|
+
const response = await this.request({
|
|
340
|
+
path: `/organizations/{organizationId}/ai-gateway/v1/models/{creator}/{model}/endpoints`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))).replace(`{${"creator"}}`, encodeURIComponent(String(requestParameters['creator']))).replace(`{${"model"}}`, encodeURIComponent(String(requestParameters['model']))),
|
|
341
|
+
method: 'GET',
|
|
342
|
+
headers: headerParameters,
|
|
343
|
+
query: queryParameters,
|
|
344
|
+
}, initOverrides);
|
|
345
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayV1ModelEndpointsUioFromJSON)(jsonValue));
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Équivalent de `GET /v1/models/{creator}/{model}/endpoints`. Un modèle n\'étant servi que par le provider qui le déclare dans l\'organisation, la liste contient toujours un seul endpoint. Les identifiants Breign n\'ayant pas toujours de créateur, `{creator}/{model}` est résolu d\'abord tel quel, puis sur le seul segment `{model}`.
|
|
349
|
+
* Get model endpoints (AI Gateway REST API)
|
|
350
|
+
*/
|
|
351
|
+
async getAiGatewayV1ModelEndpoints(organizationId, creator, model, initOverrides) {
|
|
352
|
+
const response = await this.getAiGatewayV1ModelEndpointsRaw({ organizationId: organizationId, creator: creator, model: model }, initOverrides);
|
|
353
|
+
return await response.value();
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Équivalent de `GET /v1/report`. L\'attribution applicative provient des en-têtes `ai-reporting-user` et `ai-reporting-tags` posés sur les appels d\'inférence. Réservé aux administrateurs de l\'organisation.
|
|
357
|
+
* Query spend report (AI Gateway REST API)
|
|
358
|
+
*/
|
|
359
|
+
async getAiGatewayV1ReportRaw(requestParameters, initOverrides) {
|
|
360
|
+
if (requestParameters['organizationId'] == null) {
|
|
361
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAiGatewayV1Report().');
|
|
362
|
+
}
|
|
363
|
+
if (requestParameters['startDate'] == null) {
|
|
364
|
+
throw new runtime.RequiredError('startDate', 'Required parameter "startDate" was null or undefined when calling getAiGatewayV1Report().');
|
|
365
|
+
}
|
|
366
|
+
if (requestParameters['endDate'] == null) {
|
|
367
|
+
throw new runtime.RequiredError('endDate', 'Required parameter "endDate" was null or undefined when calling getAiGatewayV1Report().');
|
|
368
|
+
}
|
|
369
|
+
const queryParameters = {};
|
|
370
|
+
if (requestParameters['startDate'] != null) {
|
|
371
|
+
queryParameters['start_date'] = requestParameters['startDate'];
|
|
372
|
+
}
|
|
373
|
+
if (requestParameters['endDate'] != null) {
|
|
374
|
+
queryParameters['end_date'] = requestParameters['endDate'];
|
|
375
|
+
}
|
|
376
|
+
if (requestParameters['groupBy'] != null) {
|
|
377
|
+
queryParameters['group_by'] = requestParameters['groupBy'];
|
|
378
|
+
}
|
|
379
|
+
if (requestParameters['datePart'] != null) {
|
|
380
|
+
queryParameters['date_part'] = requestParameters['datePart'];
|
|
381
|
+
}
|
|
382
|
+
if (requestParameters['userId'] != null) {
|
|
383
|
+
queryParameters['user_id'] = requestParameters['userId'];
|
|
384
|
+
}
|
|
385
|
+
if (requestParameters['model'] != null) {
|
|
386
|
+
queryParameters['model'] = requestParameters['model'];
|
|
387
|
+
}
|
|
388
|
+
if (requestParameters['provider'] != null) {
|
|
389
|
+
queryParameters['provider'] = requestParameters['provider'];
|
|
390
|
+
}
|
|
391
|
+
if (requestParameters['tags'] != null) {
|
|
392
|
+
queryParameters['tags'] = requestParameters['tags'];
|
|
393
|
+
}
|
|
394
|
+
if (requestParameters['tagsMatch'] != null) {
|
|
395
|
+
queryParameters['tags_match'] = requestParameters['tagsMatch'];
|
|
396
|
+
}
|
|
397
|
+
const headerParameters = {};
|
|
398
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
399
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
400
|
+
}
|
|
401
|
+
const response = await this.request({
|
|
402
|
+
path: `/organizations/{organizationId}/ai-gateway/v1/report`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
403
|
+
method: 'GET',
|
|
404
|
+
headers: headerParameters,
|
|
405
|
+
query: queryParameters,
|
|
406
|
+
}, initOverrides);
|
|
407
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayV1ReportUioFromJSON)(jsonValue));
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Équivalent de `GET /v1/report`. L\'attribution applicative provient des en-têtes `ai-reporting-user` et `ai-reporting-tags` posés sur les appels d\'inférence. Réservé aux administrateurs de l\'organisation.
|
|
411
|
+
* Query spend report (AI Gateway REST API)
|
|
412
|
+
*/
|
|
413
|
+
async getAiGatewayV1Report(organizationId, startDate, endDate, groupBy, datePart, userId, model, provider, tags, tagsMatch, initOverrides) {
|
|
414
|
+
const response = await this.getAiGatewayV1ReportRaw({ organizationId: organizationId, startDate: startDate, endDate: endDate, groupBy: groupBy, datePart: datePart, userId: userId, model: model, provider: provider, tags: tags, tagsMatch: tagsMatch }, initOverrides);
|
|
415
|
+
return await response.value();
|
|
416
|
+
}
|
|
256
417
|
/**
|
|
257
418
|
* Lists every model exposed by the organization\'s engine providers, in an OpenAI-compatible envelope. Accessible à tout membre de l\'organisation. Chaque `id` est l\'identifiant côté provider : c\'est la valeur à renvoyer dans `model` sur les endpoints de complétion et d\'embedding.
|
|
258
419
|
* List models available through the AI gateway
|
|
@@ -282,6 +443,35 @@ class AiGatewayApi extends runtime.BaseAPI {
|
|
|
282
443
|
const response = await this.listAiGatewayModelsRaw({ organizationId: organizationId }, initOverrides);
|
|
283
444
|
return await response.value();
|
|
284
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* Équivalent de `GET /v1/models` de l\'AI Gateway Vercel, monté sous le préfixe organisation. Liste les modèles des providers configurés pour l\'organisation.
|
|
448
|
+
* List models (AI Gateway REST API)
|
|
449
|
+
*/
|
|
450
|
+
async listAiGatewayV1ModelsRaw(requestParameters, initOverrides) {
|
|
451
|
+
if (requestParameters['organizationId'] == null) {
|
|
452
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listAiGatewayV1Models().');
|
|
453
|
+
}
|
|
454
|
+
const queryParameters = {};
|
|
455
|
+
const headerParameters = {};
|
|
456
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
457
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
458
|
+
}
|
|
459
|
+
const response = await this.request({
|
|
460
|
+
path: `/organizations/{organizationId}/ai-gateway/v1/models`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
461
|
+
method: 'GET',
|
|
462
|
+
headers: headerParameters,
|
|
463
|
+
query: queryParameters,
|
|
464
|
+
}, initOverrides);
|
|
465
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AiGatewayV1ModelListUioFromJSON)(jsonValue));
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Équivalent de `GET /v1/models` de l\'AI Gateway Vercel, monté sous le préfixe organisation. Liste les modèles des providers configurés pour l\'organisation.
|
|
469
|
+
* List models (AI Gateway REST API)
|
|
470
|
+
*/
|
|
471
|
+
async listAiGatewayV1Models(organizationId, initOverrides) {
|
|
472
|
+
const response = await this.listAiGatewayV1ModelsRaw({ organizationId: organizationId }, initOverrides);
|
|
473
|
+
return await response.value();
|
|
474
|
+
}
|
|
285
475
|
}
|
|
286
476
|
exports.AiGatewayApi = AiGatewayApi;
|
|
287
477
|
/**
|
|
@@ -292,3 +482,30 @@ exports.GetAiGatewayMetricsGranularityEnum = {
|
|
|
292
482
|
Day: 'day',
|
|
293
483
|
Week: 'week'
|
|
294
484
|
};
|
|
485
|
+
/**
|
|
486
|
+
* @export
|
|
487
|
+
*/
|
|
488
|
+
exports.GetAiGatewayV1ReportGroupByEnum = {
|
|
489
|
+
Day: 'day',
|
|
490
|
+
User: 'user',
|
|
491
|
+
Model: 'model',
|
|
492
|
+
Tag: 'tag',
|
|
493
|
+
Provider: 'provider',
|
|
494
|
+
CredentialType: 'credential_type',
|
|
495
|
+
ZeroDataRetention: 'zero_data_retention',
|
|
496
|
+
ApiKeyName: 'api_key_name'
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* @export
|
|
500
|
+
*/
|
|
501
|
+
exports.GetAiGatewayV1ReportDatePartEnum = {
|
|
502
|
+
Day: 'day',
|
|
503
|
+
Hour: 'hour'
|
|
504
|
+
};
|
|
505
|
+
/**
|
|
506
|
+
* @export
|
|
507
|
+
*/
|
|
508
|
+
exports.GetAiGatewayV1ReportTagsMatchEnum = {
|
|
509
|
+
Any: 'any',
|
|
510
|
+
All: 'all'
|
|
511
|
+
};
|
|
@@ -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, MessageAnonymizationUio, UpdateConversationTitleRequestUio, WorkspaceFileContentUio, WorkspaceFileEntryUio } from '../models/index';
|
|
13
|
+
import type { AgentChatOverviewEntryUio, AttachmentCreateRequestUio, AttachmentCreateResponseUio, AttachmentDetailsResponseUio, AttachmentProcessedRequestUio, BodyWithMessageUio, ContextLocationRequestUio, ContextUio, ConversationSummaryUio, CreateCustomVariable200ResponseUio, MarkConversationReadRequestUio, 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 GetAgentChatOverviewRequest {
|
|
43
|
+
organizationId: string;
|
|
44
|
+
}
|
|
42
45
|
export interface GetAnonymizedMessagesRequest {
|
|
43
46
|
conversationId: string;
|
|
44
47
|
}
|
|
@@ -72,6 +75,10 @@ export interface MarkAttachmentProcessedRequest {
|
|
|
72
75
|
attachmentId: string;
|
|
73
76
|
attachmentProcessedRequestUio: AttachmentProcessedRequestUio;
|
|
74
77
|
}
|
|
78
|
+
export interface MarkConversationAsReadRequest {
|
|
79
|
+
conversationId: string;
|
|
80
|
+
markConversationReadRequestUio?: MarkConversationReadRequestUio;
|
|
81
|
+
}
|
|
75
82
|
export interface SetContextLocationRequest {
|
|
76
83
|
conversationId: string;
|
|
77
84
|
contextLocationRequestUio: ContextLocationRequestUio;
|
|
@@ -164,6 +171,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
|
|
|
164
171
|
* Delete a file from a conversation workspace
|
|
165
172
|
*/
|
|
166
173
|
deleteConversationWorkspaceFile(conversationId: string, path: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
|
|
176
|
+
* Get the multi-agent chat overview
|
|
177
|
+
*/
|
|
178
|
+
getAgentChatOverviewRaw(requestParameters: GetAgentChatOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AgentChatOverviewEntryUio>>>;
|
|
179
|
+
/**
|
|
180
|
+
* Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
|
|
181
|
+
* Get the multi-agent chat overview
|
|
182
|
+
*/
|
|
183
|
+
getAgentChatOverview(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AgentChatOverviewEntryUio>>;
|
|
167
184
|
/**
|
|
168
185
|
* Retrieve the list of anonymized messages for a given conversation.
|
|
169
186
|
* Get the anonymized messages of a conversation
|
|
@@ -248,6 +265,16 @@ export declare class ConversationsApi extends runtime.BaseAPI {
|
|
|
248
265
|
* Mark a conversation attachment as processed
|
|
249
266
|
*/
|
|
250
267
|
markAttachmentProcessed(conversationId: string, attachmentId: string, attachmentProcessedRequestUio: AttachmentProcessedRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithMessageUio>;
|
|
268
|
+
/**
|
|
269
|
+
* Positionne la marque de lecture de l\'utilisateur sur la conversation.
|
|
270
|
+
* Mark a conversation as read
|
|
271
|
+
*/
|
|
272
|
+
markConversationAsReadRaw(requestParameters: MarkConversationAsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
273
|
+
/**
|
|
274
|
+
* Positionne la marque de lecture de l\'utilisateur sur la conversation.
|
|
275
|
+
* Mark a conversation as read
|
|
276
|
+
*/
|
|
277
|
+
markConversationAsRead(conversationId: string, markConversationReadRequestUio?: MarkConversationReadRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
251
278
|
/**
|
|
252
279
|
* Stores the caller\'s geographic coordinates on the conversation context. Latitude et longitude sont transmises en chaînes numériques.
|
|
253
280
|
* Set the conversation location 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
|
+
* Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
|
|
278
|
+
* Get the multi-agent chat overview
|
|
279
|
+
*/
|
|
280
|
+
async getAgentChatOverviewRaw(requestParameters, initOverrides) {
|
|
281
|
+
if (requestParameters['organizationId'] == null) {
|
|
282
|
+
throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getAgentChatOverview().');
|
|
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: `/organizations/{organizationId}/chat/overview`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
|
|
291
|
+
method: 'GET',
|
|
292
|
+
headers: headerParameters,
|
|
293
|
+
query: queryParameters,
|
|
294
|
+
}, initOverrides);
|
|
295
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AgentChatOverviewEntryUioFromJSON));
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Pour chaque agent de l\'organisation avec lequel l\'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l\'indication d\'une réponse en cours de génération.
|
|
299
|
+
* Get the multi-agent chat overview
|
|
300
|
+
*/
|
|
301
|
+
async getAgentChatOverview(organizationId, initOverrides) {
|
|
302
|
+
const response = await this.getAgentChatOverviewRaw({ organizationId: organizationId }, initOverrides);
|
|
303
|
+
return await response.value();
|
|
304
|
+
}
|
|
276
305
|
/**
|
|
277
306
|
* Retrieve the list of anonymized messages for a given conversation.
|
|
278
307
|
* Get the anonymized messages of a conversation
|
|
@@ -540,6 +569,36 @@ class ConversationsApi extends runtime.BaseAPI {
|
|
|
540
569
|
const response = await this.markAttachmentProcessedRaw({ conversationId: conversationId, attachmentId: attachmentId, attachmentProcessedRequestUio: attachmentProcessedRequestUio }, initOverrides);
|
|
541
570
|
return await response.value();
|
|
542
571
|
}
|
|
572
|
+
/**
|
|
573
|
+
* Positionne la marque de lecture de l\'utilisateur sur la conversation.
|
|
574
|
+
* Mark a conversation as read
|
|
575
|
+
*/
|
|
576
|
+
async markConversationAsReadRaw(requestParameters, initOverrides) {
|
|
577
|
+
if (requestParameters['conversationId'] == null) {
|
|
578
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling markConversationAsRead().');
|
|
579
|
+
}
|
|
580
|
+
const queryParameters = {};
|
|
581
|
+
const headerParameters = {};
|
|
582
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
583
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
584
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
585
|
+
}
|
|
586
|
+
const response = await this.request({
|
|
587
|
+
path: `/conversations/{conversationId}/read`.replace(`{${"conversationId"}}`, encodeURIComponent(String(requestParameters['conversationId']))),
|
|
588
|
+
method: 'POST',
|
|
589
|
+
headers: headerParameters,
|
|
590
|
+
query: queryParameters,
|
|
591
|
+
body: (0, index_1.MarkConversationReadRequestUioToJSON)(requestParameters['markConversationReadRequestUio']),
|
|
592
|
+
}, initOverrides);
|
|
593
|
+
return new runtime.VoidApiResponse(response);
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Positionne la marque de lecture de l\'utilisateur sur la conversation.
|
|
597
|
+
* Mark a conversation as read
|
|
598
|
+
*/
|
|
599
|
+
async markConversationAsRead(conversationId, markConversationReadRequestUio, initOverrides) {
|
|
600
|
+
await this.markConversationAsReadRaw({ conversationId: conversationId, markConversationReadRequestUio: markConversationReadRequestUio }, initOverrides);
|
|
601
|
+
}
|
|
543
602
|
/**
|
|
544
603
|
* Stores the caller\'s geographic coordinates on the conversation context. Latitude et longitude sont transmises en chaînes numériques.
|
|
545
604
|
* Set the conversation location context
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
* État de la conversation d'un agent pour l'utilisateur courant. Le nombre de non-lus est dérivé des messages postérieurs à sa marque de lecture.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AgentChatOverviewEntryUio
|
|
16
|
+
*/
|
|
17
|
+
export interface AgentChatOverviewEntryUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AgentChatOverviewEntryUio
|
|
22
|
+
*/
|
|
23
|
+
agentId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AgentChatOverviewEntryUio
|
|
28
|
+
*/
|
|
29
|
+
conversationId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Horodatage du dernier message, null si la conversation est vide
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AgentChatOverviewEntryUio
|
|
34
|
+
*/
|
|
35
|
+
lastMessageAt?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Messages non lus, hors messages de l'utilisateur lui-même
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof AgentChatOverviewEntryUio
|
|
40
|
+
*/
|
|
41
|
+
unreadCount: number;
|
|
42
|
+
/**
|
|
43
|
+
* Vrai tant qu'une réponse est en cours de génération
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof AgentChatOverviewEntryUio
|
|
46
|
+
*/
|
|
47
|
+
isGenerating: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the AgentChatOverviewEntryUio interface.
|
|
51
|
+
*/
|
|
52
|
+
export declare function instanceOfAgentChatOverviewEntryUio(value: object): value is AgentChatOverviewEntryUio;
|
|
53
|
+
export declare function AgentChatOverviewEntryUioFromJSON(json: any): AgentChatOverviewEntryUio;
|
|
54
|
+
export declare function AgentChatOverviewEntryUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentChatOverviewEntryUio;
|
|
55
|
+
export declare function AgentChatOverviewEntryUioToJSON(json: any): AgentChatOverviewEntryUio;
|
|
56
|
+
export declare function AgentChatOverviewEntryUioToJSONTyped(value?: AgentChatOverviewEntryUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
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.instanceOfAgentChatOverviewEntryUio = instanceOfAgentChatOverviewEntryUio;
|
|
17
|
+
exports.AgentChatOverviewEntryUioFromJSON = AgentChatOverviewEntryUioFromJSON;
|
|
18
|
+
exports.AgentChatOverviewEntryUioFromJSONTyped = AgentChatOverviewEntryUioFromJSONTyped;
|
|
19
|
+
exports.AgentChatOverviewEntryUioToJSON = AgentChatOverviewEntryUioToJSON;
|
|
20
|
+
exports.AgentChatOverviewEntryUioToJSONTyped = AgentChatOverviewEntryUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AgentChatOverviewEntryUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAgentChatOverviewEntryUio(value) {
|
|
25
|
+
if (!('agentId' in value) || value['agentId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('conversationId' in value) || value['conversationId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('unreadCount' in value) || value['unreadCount'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('isGenerating' in value) || value['isGenerating'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function AgentChatOverviewEntryUioFromJSON(json) {
|
|
36
|
+
return AgentChatOverviewEntryUioFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function AgentChatOverviewEntryUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'agentId': json['agentId'],
|
|
44
|
+
'conversationId': json['conversationId'],
|
|
45
|
+
'lastMessageAt': json['lastMessageAt'] == null ? undefined : json['lastMessageAt'],
|
|
46
|
+
'unreadCount': json['unreadCount'],
|
|
47
|
+
'isGenerating': json['isGenerating'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function AgentChatOverviewEntryUioToJSON(json) {
|
|
51
|
+
return AgentChatOverviewEntryUioToJSONTyped(json, false);
|
|
52
|
+
}
|
|
53
|
+
function AgentChatOverviewEntryUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
54
|
+
if (value == null) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'agentId': value['agentId'],
|
|
59
|
+
'conversationId': value['conversationId'],
|
|
60
|
+
'lastMessageAt': value['lastMessageAt'],
|
|
61
|
+
'unreadCount': value['unreadCount'],
|
|
62
|
+
'isGenerating': value['isGenerating'],
|
|
63
|
+
};
|
|
64
|
+
}
|