@breign/client 1.0.174 → 1.0.175
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/AppApi.d.ts +15 -1
- package/dist/apis/AppApi.js +32 -0
- package/dist/models/EphemeralInstanceTokenUio.d.ts +80 -0
- package/dist/models/EphemeralInstanceTokenUio.js +80 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/openapi.json +65 -0
- package/package.json +1 -1
package/dist/apis/AppApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AddCustomFiller201ResponseUio, AddCustomFillerRequestUio, AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppReplaceRequestUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, STTResponseUio, SequenceCreateRequestUio, UpdateSelectedFillers200ResponseUio, UpdateSelectedFillersRequestUio } from '../models/index';
|
|
13
|
+
import type { AddCustomFiller201ResponseUio, AddCustomFillerRequestUio, AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppReplaceRequestUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, EphemeralInstanceTokenUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, STTResponseUio, SequenceCreateRequestUio, UpdateSelectedFillers200ResponseUio, UpdateSelectedFillersRequestUio } from '../models/index';
|
|
14
14
|
export interface AddAnimationRequest {
|
|
15
15
|
appId: string;
|
|
16
16
|
animationCreateRequestUio: AnimationCreateRequestUio;
|
|
@@ -134,6 +134,10 @@ export interface RefreshAppProbeRequest {
|
|
|
134
134
|
appId: string;
|
|
135
135
|
instanceId?: string;
|
|
136
136
|
}
|
|
137
|
+
export interface RefreshInstanceTokenRequest {
|
|
138
|
+
appId: string;
|
|
139
|
+
instanceId: string;
|
|
140
|
+
}
|
|
137
141
|
export interface RemoveAnimationRequest {
|
|
138
142
|
appId: string;
|
|
139
143
|
animationId: string;
|
|
@@ -476,6 +480,16 @@ export declare class AppApi extends runtime.BaseAPI {
|
|
|
476
480
|
* Refresh the app probe
|
|
477
481
|
*/
|
|
478
482
|
refreshAppProbe(appId: string, instanceId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
483
|
+
/**
|
|
484
|
+
* Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
|
|
485
|
+
* Refresh ephemeral instance token
|
|
486
|
+
*/
|
|
487
|
+
refreshInstanceTokenRaw(requestParameters: RefreshInstanceTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EphemeralInstanceTokenUio>>;
|
|
488
|
+
/**
|
|
489
|
+
* Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
|
|
490
|
+
* Refresh ephemeral instance token
|
|
491
|
+
*/
|
|
492
|
+
refreshInstanceToken(appId: string, instanceId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EphemeralInstanceTokenUio>;
|
|
479
493
|
/**
|
|
480
494
|
* Remove an animation from an app
|
|
481
495
|
* Remove an animation from an app
|
package/dist/apis/AppApi.js
CHANGED
|
@@ -1009,6 +1009,38 @@ class AppApi extends runtime.BaseAPI {
|
|
|
1009
1009
|
async refreshAppProbe(appId, instanceId, initOverrides) {
|
|
1010
1010
|
await this.refreshAppProbeRaw({ appId: appId, instanceId: instanceId }, initOverrides);
|
|
1011
1011
|
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
|
|
1014
|
+
* Refresh ephemeral instance token
|
|
1015
|
+
*/
|
|
1016
|
+
async refreshInstanceTokenRaw(requestParameters, initOverrides) {
|
|
1017
|
+
if (requestParameters['appId'] == null) {
|
|
1018
|
+
throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling refreshInstanceToken().');
|
|
1019
|
+
}
|
|
1020
|
+
if (requestParameters['instanceId'] == null) {
|
|
1021
|
+
throw new runtime.RequiredError('instanceId', 'Required parameter "instanceId" was null or undefined when calling refreshInstanceToken().');
|
|
1022
|
+
}
|
|
1023
|
+
const queryParameters = {};
|
|
1024
|
+
const headerParameters = {};
|
|
1025
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1026
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
1027
|
+
}
|
|
1028
|
+
const response = await this.request({
|
|
1029
|
+
path: `/apps/{appId}/instances/{instanceId}/token`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))).replace(`{${"instanceId"}}`, encodeURIComponent(String(requestParameters['instanceId']))),
|
|
1030
|
+
method: 'POST',
|
|
1031
|
+
headers: headerParameters,
|
|
1032
|
+
query: queryParameters,
|
|
1033
|
+
}, initOverrides);
|
|
1034
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EphemeralInstanceTokenUioFromJSON)(jsonValue));
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Issue a new token for an ephemeral instance, authenticated either by the instance\'s own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app\'s maximum number of active instances is not reached.
|
|
1038
|
+
* Refresh ephemeral instance token
|
|
1039
|
+
*/
|
|
1040
|
+
async refreshInstanceToken(appId, instanceId, initOverrides) {
|
|
1041
|
+
const response = await this.refreshInstanceTokenRaw({ appId: appId, instanceId: instanceId }, initOverrides);
|
|
1042
|
+
return await response.value();
|
|
1043
|
+
}
|
|
1012
1044
|
/**
|
|
1013
1045
|
* Remove an animation from an app
|
|
1014
1046
|
* Remove an animation from an app
|
|
@@ -0,0 +1,80 @@
|
|
|
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 EphemeralInstanceTokenUio
|
|
16
|
+
*/
|
|
17
|
+
export interface EphemeralInstanceTokenUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EphemeralInstanceTokenUio
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EphemeralInstanceTokenUio
|
|
28
|
+
*/
|
|
29
|
+
appId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof EphemeralInstanceTokenUio
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof EphemeralInstanceTokenUio
|
|
40
|
+
*/
|
|
41
|
+
urlWebsite?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof EphemeralInstanceTokenUio
|
|
46
|
+
*/
|
|
47
|
+
token: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof EphemeralInstanceTokenUio
|
|
52
|
+
*/
|
|
53
|
+
active: boolean;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof EphemeralInstanceTokenUio
|
|
58
|
+
*/
|
|
59
|
+
createdAt: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof EphemeralInstanceTokenUio
|
|
64
|
+
*/
|
|
65
|
+
lastActivity: string;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof EphemeralInstanceTokenUio
|
|
70
|
+
*/
|
|
71
|
+
expiresAt: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check if a given object implements the EphemeralInstanceTokenUio interface.
|
|
75
|
+
*/
|
|
76
|
+
export declare function instanceOfEphemeralInstanceTokenUio(value: object): value is EphemeralInstanceTokenUio;
|
|
77
|
+
export declare function EphemeralInstanceTokenUioFromJSON(json: any): EphemeralInstanceTokenUio;
|
|
78
|
+
export declare function EphemeralInstanceTokenUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): EphemeralInstanceTokenUio;
|
|
79
|
+
export declare function EphemeralInstanceTokenUioToJSON(json: any): EphemeralInstanceTokenUio;
|
|
80
|
+
export declare function EphemeralInstanceTokenUioToJSONTyped(value?: EphemeralInstanceTokenUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,80 @@
|
|
|
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.instanceOfEphemeralInstanceTokenUio = instanceOfEphemeralInstanceTokenUio;
|
|
17
|
+
exports.EphemeralInstanceTokenUioFromJSON = EphemeralInstanceTokenUioFromJSON;
|
|
18
|
+
exports.EphemeralInstanceTokenUioFromJSONTyped = EphemeralInstanceTokenUioFromJSONTyped;
|
|
19
|
+
exports.EphemeralInstanceTokenUioToJSON = EphemeralInstanceTokenUioToJSON;
|
|
20
|
+
exports.EphemeralInstanceTokenUioToJSONTyped = EphemeralInstanceTokenUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the EphemeralInstanceTokenUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfEphemeralInstanceTokenUio(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('appId' in value) || value['appId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('token' in value) || value['token'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('active' in value) || value['active'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('lastActivity' in value) || value['lastActivity'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('expiresAt' in value) || value['expiresAt'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
function EphemeralInstanceTokenUioFromJSON(json) {
|
|
44
|
+
return EphemeralInstanceTokenUioFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function EphemeralInstanceTokenUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
47
|
+
if (json == null) {
|
|
48
|
+
return json;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'id': json['id'],
|
|
52
|
+
'appId': json['appId'],
|
|
53
|
+
'name': json['name'],
|
|
54
|
+
'urlWebsite': json['urlWebsite'] == null ? undefined : json['urlWebsite'],
|
|
55
|
+
'token': json['token'],
|
|
56
|
+
'active': json['active'],
|
|
57
|
+
'createdAt': json['createdAt'],
|
|
58
|
+
'lastActivity': json['lastActivity'],
|
|
59
|
+
'expiresAt': json['expiresAt'],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function EphemeralInstanceTokenUioToJSON(json) {
|
|
63
|
+
return EphemeralInstanceTokenUioToJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
function EphemeralInstanceTokenUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
'id': value['id'],
|
|
71
|
+
'appId': value['appId'],
|
|
72
|
+
'name': value['name'],
|
|
73
|
+
'urlWebsite': value['urlWebsite'],
|
|
74
|
+
'token': value['token'],
|
|
75
|
+
'active': value['active'],
|
|
76
|
+
'createdAt': value['createdAt'],
|
|
77
|
+
'lastActivity': value['lastActivity'],
|
|
78
|
+
'expiresAt': value['expiresAt'],
|
|
79
|
+
};
|
|
80
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -251,6 +251,7 @@ export * from './EngineOptionsUio';
|
|
|
251
251
|
export * from './EngineUio';
|
|
252
252
|
export * from './EntityModeUio';
|
|
253
253
|
export * from './EntityTypeRuleUio';
|
|
254
|
+
export * from './EphemeralInstanceTokenUio';
|
|
254
255
|
export * from './EphemeralInstanceUio';
|
|
255
256
|
export * from './EphemeralInstancesMetricsResponseUio';
|
|
256
257
|
export * from './EphemeralInstancesTimeSeriesPointUio';
|
package/dist/models/index.js
CHANGED
|
@@ -269,6 +269,7 @@ __exportStar(require("./EngineOptionsUio"), exports);
|
|
|
269
269
|
__exportStar(require("./EngineUio"), exports);
|
|
270
270
|
__exportStar(require("./EntityModeUio"), exports);
|
|
271
271
|
__exportStar(require("./EntityTypeRuleUio"), exports);
|
|
272
|
+
__exportStar(require("./EphemeralInstanceTokenUio"), exports);
|
|
272
273
|
__exportStar(require("./EphemeralInstanceUio"), exports);
|
|
273
274
|
__exportStar(require("./EphemeralInstancesMetricsResponseUio"), exports);
|
|
274
275
|
__exportStar(require("./EphemeralInstancesTimeSeriesPointUio"), exports);
|
package/dist/openapi.json
CHANGED
|
@@ -4157,6 +4157,58 @@
|
|
|
4157
4157
|
"tags" : [ "app" ]
|
|
4158
4158
|
}
|
|
4159
4159
|
},
|
|
4160
|
+
"/apps/{appId}/instances/{instanceId}/token" : {
|
|
4161
|
+
"post" : {
|
|
4162
|
+
"description" : "Issue a new token for an ephemeral instance, authenticated either by the instance's own still-valid token or by a user with access to the app. The previous token is revoked. An active instance is simply extended; an inactive one is reactivated (status back to IDLE) only if the app's maximum number of active instances is not reached.\n",
|
|
4163
|
+
"operationId" : "refreshInstanceToken",
|
|
4164
|
+
"parameters" : [ {
|
|
4165
|
+
"description" : "ID of the app",
|
|
4166
|
+
"in" : "path",
|
|
4167
|
+
"name" : "appId",
|
|
4168
|
+
"required" : true,
|
|
4169
|
+
"schema" : {
|
|
4170
|
+
"type" : "string"
|
|
4171
|
+
}
|
|
4172
|
+
}, {
|
|
4173
|
+
"description" : "Instance identifier",
|
|
4174
|
+
"in" : "path",
|
|
4175
|
+
"name" : "instanceId",
|
|
4176
|
+
"required" : true,
|
|
4177
|
+
"schema" : {
|
|
4178
|
+
"type" : "string"
|
|
4179
|
+
}
|
|
4180
|
+
} ],
|
|
4181
|
+
"responses" : {
|
|
4182
|
+
"200" : {
|
|
4183
|
+
"content" : {
|
|
4184
|
+
"application/json" : {
|
|
4185
|
+
"schema" : {
|
|
4186
|
+
"$ref" : "#/components/schemas/EphemeralInstanceToken"
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
},
|
|
4190
|
+
"description" : "Token refreshed"
|
|
4191
|
+
},
|
|
4192
|
+
"400" : {
|
|
4193
|
+
"description" : "Maximum number of active instances reached (MAX_INSTANCES_REACHED)"
|
|
4194
|
+
},
|
|
4195
|
+
"401" : {
|
|
4196
|
+
"description" : "Unauthorized"
|
|
4197
|
+
},
|
|
4198
|
+
"403" : {
|
|
4199
|
+
"description" : "Forbidden - no access to this instance, or ephemeral instances not allowed for this app"
|
|
4200
|
+
},
|
|
4201
|
+
"404" : {
|
|
4202
|
+
"description" : "App or ephemeral instance not found"
|
|
4203
|
+
},
|
|
4204
|
+
"409" : {
|
|
4205
|
+
"description" : "Instance changed during the refresh (e.g. deactivated concurrently), retry (INSTANCE_CHANGED)"
|
|
4206
|
+
}
|
|
4207
|
+
},
|
|
4208
|
+
"summary" : "Refresh ephemeral instance token",
|
|
4209
|
+
"tags" : [ "app" ]
|
|
4210
|
+
}
|
|
4211
|
+
},
|
|
4160
4212
|
"/instances/{instanceId}/context" : {
|
|
4161
4213
|
"get" : {
|
|
4162
4214
|
"description" : "Returns the custom context variables for an app instance.",
|
|
@@ -23462,6 +23514,19 @@
|
|
|
23462
23514
|
"required" : [ "message" ],
|
|
23463
23515
|
"type" : "object"
|
|
23464
23516
|
},
|
|
23517
|
+
"EphemeralInstanceToken" : {
|
|
23518
|
+
"allOf" : [ {
|
|
23519
|
+
"$ref" : "#/components/schemas/EphemeralInstance"
|
|
23520
|
+
}, {
|
|
23521
|
+
"properties" : {
|
|
23522
|
+
"expiresAt" : {
|
|
23523
|
+
"type" : "string"
|
|
23524
|
+
}
|
|
23525
|
+
},
|
|
23526
|
+
"required" : [ "expiresAt" ],
|
|
23527
|
+
"type" : "object"
|
|
23528
|
+
} ]
|
|
23529
|
+
},
|
|
23465
23530
|
"InstanceContext" : {
|
|
23466
23531
|
"additionalProperties" : false,
|
|
23467
23532
|
"properties" : {
|