@breign/client 1.0.90 → 1.0.92
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/AgentApi.d.ts +6 -1
- package/dist/apis/AgentApi.js +17 -2
- package/dist/apis/AppApi.d.ts +14 -1
- package/dist/apis/AppApi.js +29 -0
- package/dist/apis/SkillsApi.d.ts +63 -1
- package/dist/apis/SkillsApi.js +155 -0
- package/dist/models/AppInstanceListItemUio.d.ts +38 -0
- package/dist/models/AppInstanceListItemUio.js +54 -0
- package/dist/models/SkillFileCreateRequestUio.d.ts +44 -0
- package/dist/models/SkillFileCreateRequestUio.js +56 -0
- package/dist/models/SkillFileSummaryUio.d.ts +62 -0
- package/dist/models/SkillFileSummaryUio.js +70 -0
- package/dist/models/SkillFileUio.d.ts +68 -0
- package/dist/models/SkillFileUio.js +74 -0
- package/dist/models/SkillFileUpdateRequestUio.d.ts +38 -0
- package/dist/models/SkillFileUpdateRequestUio.js +50 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/openapi.json +461 -8
- package/package.json +1 -1
package/dist/apis/AgentApi.d.ts
CHANGED
|
@@ -70,6 +70,11 @@ export interface GetAgentsRequest {
|
|
|
70
70
|
export interface GetConversationsForAgentRequest {
|
|
71
71
|
agentId: string;
|
|
72
72
|
page?: number;
|
|
73
|
+
search?: string;
|
|
74
|
+
appId?: string;
|
|
75
|
+
instanceId?: string;
|
|
76
|
+
lastMessageFrom?: Date;
|
|
77
|
+
lastMessageTo?: Date;
|
|
73
78
|
}
|
|
74
79
|
export interface GetFlowRequest {
|
|
75
80
|
agentId: string;
|
|
@@ -291,7 +296,7 @@ export declare class AgentApi extends runtime.BaseAPI {
|
|
|
291
296
|
* Get conversations for an agent
|
|
292
297
|
* Get conversations for an agent
|
|
293
298
|
*/
|
|
294
|
-
getConversationsForAgent(agentId: string, page?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChatUio>>;
|
|
299
|
+
getConversationsForAgent(agentId: string, page?: number, search?: string, appId?: string, instanceId?: string, lastMessageFrom?: Date, lastMessageTo?: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ChatUio>>;
|
|
295
300
|
/**
|
|
296
301
|
* Retrieves a specific conversation flow by ID
|
|
297
302
|
* Get a specific flow
|
package/dist/apis/AgentApi.js
CHANGED
|
@@ -516,6 +516,21 @@ class AgentApi extends runtime.BaseAPI {
|
|
|
516
516
|
if (requestParameters['page'] != null) {
|
|
517
517
|
queryParameters['page'] = requestParameters['page'];
|
|
518
518
|
}
|
|
519
|
+
if (requestParameters['search'] != null) {
|
|
520
|
+
queryParameters['search'] = requestParameters['search'];
|
|
521
|
+
}
|
|
522
|
+
if (requestParameters['appId'] != null) {
|
|
523
|
+
queryParameters['appId'] = requestParameters['appId'];
|
|
524
|
+
}
|
|
525
|
+
if (requestParameters['instanceId'] != null) {
|
|
526
|
+
queryParameters['instanceId'] = requestParameters['instanceId'];
|
|
527
|
+
}
|
|
528
|
+
if (requestParameters['lastMessageFrom'] != null) {
|
|
529
|
+
queryParameters['lastMessageFrom'] = requestParameters['lastMessageFrom'].toISOString();
|
|
530
|
+
}
|
|
531
|
+
if (requestParameters['lastMessageTo'] != null) {
|
|
532
|
+
queryParameters['lastMessageTo'] = requestParameters['lastMessageTo'].toISOString();
|
|
533
|
+
}
|
|
519
534
|
const headerParameters = {};
|
|
520
535
|
if (this.configuration && this.configuration.apiKey) {
|
|
521
536
|
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
@@ -532,8 +547,8 @@ class AgentApi extends runtime.BaseAPI {
|
|
|
532
547
|
* Get conversations for an agent
|
|
533
548
|
* Get conversations for an agent
|
|
534
549
|
*/
|
|
535
|
-
async getConversationsForAgent(agentId, page, initOverrides) {
|
|
536
|
-
const response = await this.getConversationsForAgentRaw({ agentId: agentId, page: page }, initOverrides);
|
|
550
|
+
async getConversationsForAgent(agentId, page, search, appId, instanceId, lastMessageFrom, lastMessageTo, initOverrides) {
|
|
551
|
+
const response = await this.getConversationsForAgentRaw({ agentId: agentId, page: page, search: search, appId: appId, instanceId: instanceId, lastMessageFrom: lastMessageFrom, lastMessageTo: lastMessageTo }, initOverrides);
|
|
537
552
|
return await response.value();
|
|
538
553
|
}
|
|
539
554
|
/**
|
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 { AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, AudioFillerExistsResponseUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, SequenceCreateRequestUio } from '../models/index';
|
|
13
|
+
import type { AnimationCreateRequestUio, AppChatCreateRequestUio, AppChatCreateResponseUio, AppChatSayRequestUio, AppChatSayResponseUio, AppChatSubmitMessageRequestUio, AppConfigurationUio, AppCreateRequestUio, AppFlowCreateRequestUio, AppInstanceCreateRequestUio, AppInstanceListItemUio, AppLightUio, AppProbeRequestUio, AppProbeResponseUio, AppStatusRequestUio, AppStatusResponseUio, AppSubmitMessageRequestUio, AppTextToSpeechRequestUio, AppTextToSpeechResponseUio, AppUio, AppUpdateRequestUio, AudioFileUio, AudioFillerExistsResponseUio, BodyWithIdUio, BodyWithMessageUio, ConversationUio, DeleteMessageAudio200ResponseUio, FileCreationRequestUio, FileCreationResponseUio, FillersArrayInnerUio, FlowUio, S3UploadBodyUio, SequenceCreateRequestUio } from '../models/index';
|
|
14
14
|
export interface AddAnimationRequest {
|
|
15
15
|
appId: string;
|
|
16
16
|
animationCreateRequestUio: AnimationCreateRequestUio;
|
|
@@ -94,6 +94,9 @@ export interface GetAudioFillerByIdRequest {
|
|
|
94
94
|
language: string;
|
|
95
95
|
fillerId: string;
|
|
96
96
|
}
|
|
97
|
+
export interface GetInstancesForAppIdRequest {
|
|
98
|
+
appId: string;
|
|
99
|
+
}
|
|
97
100
|
export interface InterruptAppRequest {
|
|
98
101
|
appId: string;
|
|
99
102
|
instanceId?: string;
|
|
@@ -347,6 +350,16 @@ export declare class AppApi extends runtime.BaseAPI {
|
|
|
347
350
|
* Get audio filler by ID
|
|
348
351
|
*/
|
|
349
352
|
getAudioFillerById(appId: string, voiceId: string, language: string, fillerId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AudioFileUio>;
|
|
353
|
+
/**
|
|
354
|
+
* List persisted instances for an app (excludes ephemeral instances)
|
|
355
|
+
* List app instances
|
|
356
|
+
*/
|
|
357
|
+
getInstancesForAppIdRaw(requestParameters: GetInstancesForAppIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AppInstanceListItemUio>>>;
|
|
358
|
+
/**
|
|
359
|
+
* List persisted instances for an app (excludes ephemeral instances)
|
|
360
|
+
* List app instances
|
|
361
|
+
*/
|
|
362
|
+
getInstancesForAppId(appId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AppInstanceListItemUio>>;
|
|
350
363
|
/**
|
|
351
364
|
* Interrupt app
|
|
352
365
|
* Interrupt app
|
package/dist/apis/AppApi.js
CHANGED
|
@@ -699,6 +699,35 @@ class AppApi extends runtime.BaseAPI {
|
|
|
699
699
|
const response = await this.getAudioFillerByIdRaw({ appId: appId, voiceId: voiceId, language: language, fillerId: fillerId }, initOverrides);
|
|
700
700
|
return await response.value();
|
|
701
701
|
}
|
|
702
|
+
/**
|
|
703
|
+
* List persisted instances for an app (excludes ephemeral instances)
|
|
704
|
+
* List app instances
|
|
705
|
+
*/
|
|
706
|
+
async getInstancesForAppIdRaw(requestParameters, initOverrides) {
|
|
707
|
+
if (requestParameters['appId'] == null) {
|
|
708
|
+
throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling getInstancesForAppId().');
|
|
709
|
+
}
|
|
710
|
+
const queryParameters = {};
|
|
711
|
+
const headerParameters = {};
|
|
712
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
713
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
714
|
+
}
|
|
715
|
+
const response = await this.request({
|
|
716
|
+
path: `/apps/{appId}/instances`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))),
|
|
717
|
+
method: 'GET',
|
|
718
|
+
headers: headerParameters,
|
|
719
|
+
query: queryParameters,
|
|
720
|
+
}, initOverrides);
|
|
721
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AppInstanceListItemUioFromJSON));
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* List persisted instances for an app (excludes ephemeral instances)
|
|
725
|
+
* List app instances
|
|
726
|
+
*/
|
|
727
|
+
async getInstancesForAppId(appId, initOverrides) {
|
|
728
|
+
const response = await this.getInstancesForAppIdRaw({ appId: appId }, initOverrides);
|
|
729
|
+
return await response.value();
|
|
730
|
+
}
|
|
702
731
|
/**
|
|
703
732
|
* Interrupt app
|
|
704
733
|
* Interrupt app
|
package/dist/apis/SkillsApi.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 { SkillAssignRequestUio, SkillCreateRequestUio, SkillUio, SkillUpdateRequestUio } from '../models/index';
|
|
13
|
+
import type { SkillAssignRequestUio, SkillCreateRequestUio, SkillFileCreateRequestUio, SkillFileSummaryUio, SkillFileUio, SkillFileUpdateRequestUio, SkillUio, SkillUpdateRequestUio } from '../models/index';
|
|
14
14
|
export interface AssignSkillToAgentRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
skillAssignRequestUio: SkillAssignRequestUio;
|
|
@@ -18,15 +18,30 @@ export interface AssignSkillToAgentRequest {
|
|
|
18
18
|
export interface CreateSkillRequest {
|
|
19
19
|
skillCreateRequestUio: SkillCreateRequestUio;
|
|
20
20
|
}
|
|
21
|
+
export interface CreateSkillFileRequest {
|
|
22
|
+
skillId: string;
|
|
23
|
+
skillFileCreateRequestUio: SkillFileCreateRequestUio;
|
|
24
|
+
}
|
|
21
25
|
export interface DeleteSkillRequest {
|
|
22
26
|
skillId: string;
|
|
23
27
|
}
|
|
28
|
+
export interface DeleteSkillFileRequest {
|
|
29
|
+
skillId: string;
|
|
30
|
+
fileId: string;
|
|
31
|
+
}
|
|
24
32
|
export interface GetAgentSkillsRequest {
|
|
25
33
|
agentId: string;
|
|
26
34
|
}
|
|
27
35
|
export interface GetSkillRequest {
|
|
28
36
|
skillId: string;
|
|
29
37
|
}
|
|
38
|
+
export interface GetSkillFileRequest {
|
|
39
|
+
skillId: string;
|
|
40
|
+
fileId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ListSkillFilesRequest {
|
|
43
|
+
skillId: string;
|
|
44
|
+
}
|
|
30
45
|
export interface ListSkillsRequest {
|
|
31
46
|
organizationId: string;
|
|
32
47
|
page?: number;
|
|
@@ -40,6 +55,11 @@ export interface UpdateSkillRequest {
|
|
|
40
55
|
skillId: string;
|
|
41
56
|
skillUpdateRequestUio: SkillUpdateRequestUio;
|
|
42
57
|
}
|
|
58
|
+
export interface UpdateSkillFileRequest {
|
|
59
|
+
skillId: string;
|
|
60
|
+
fileId: string;
|
|
61
|
+
skillFileUpdateRequestUio: SkillFileUpdateRequestUio;
|
|
62
|
+
}
|
|
43
63
|
/**
|
|
44
64
|
*
|
|
45
65
|
*/
|
|
@@ -62,6 +82,14 @@ export declare class SkillsApi extends runtime.BaseAPI {
|
|
|
62
82
|
* Create a skill
|
|
63
83
|
*/
|
|
64
84
|
createSkill(skillCreateRequestUio: SkillCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillUio>;
|
|
85
|
+
/**
|
|
86
|
+
* Create a skill file
|
|
87
|
+
*/
|
|
88
|
+
createSkillFileRaw(requestParameters: CreateSkillFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillFileUio>>;
|
|
89
|
+
/**
|
|
90
|
+
* Create a skill file
|
|
91
|
+
*/
|
|
92
|
+
createSkillFile(skillId: string, skillFileCreateRequestUio: SkillFileCreateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillFileUio>;
|
|
65
93
|
/**
|
|
66
94
|
* Delete a skill
|
|
67
95
|
*/
|
|
@@ -70,6 +98,14 @@ export declare class SkillsApi extends runtime.BaseAPI {
|
|
|
70
98
|
* Delete a skill
|
|
71
99
|
*/
|
|
72
100
|
deleteSkill(skillId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Delete a skill file
|
|
103
|
+
*/
|
|
104
|
+
deleteSkillFileRaw(requestParameters: DeleteSkillFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
105
|
+
/**
|
|
106
|
+
* Delete a skill file
|
|
107
|
+
*/
|
|
108
|
+
deleteSkillFile(skillId: string, fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
73
109
|
/**
|
|
74
110
|
* Get skills assigned to an agent
|
|
75
111
|
*/
|
|
@@ -86,6 +122,24 @@ export declare class SkillsApi extends runtime.BaseAPI {
|
|
|
86
122
|
* Get a skill by ID
|
|
87
123
|
*/
|
|
88
124
|
getSkill(skillId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillUio>;
|
|
125
|
+
/**
|
|
126
|
+
* Get a skill file with content
|
|
127
|
+
*/
|
|
128
|
+
getSkillFileRaw(requestParameters: GetSkillFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillFileUio>>;
|
|
129
|
+
/**
|
|
130
|
+
* Get a skill file with content
|
|
131
|
+
*/
|
|
132
|
+
getSkillFile(skillId: string, fileId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillFileUio>;
|
|
133
|
+
/**
|
|
134
|
+
* Returns all files attached to the skill — all metadata fields, no content
|
|
135
|
+
* List skill files
|
|
136
|
+
*/
|
|
137
|
+
listSkillFilesRaw(requestParameters: ListSkillFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SkillFileSummaryUio>>>;
|
|
138
|
+
/**
|
|
139
|
+
* Returns all files attached to the skill — all metadata fields, no content
|
|
140
|
+
* List skill files
|
|
141
|
+
*/
|
|
142
|
+
listSkillFiles(skillId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SkillFileSummaryUio>>;
|
|
89
143
|
/**
|
|
90
144
|
* Returns a paginated list of skills scoped to an organization
|
|
91
145
|
* List skills in an organization
|
|
@@ -112,4 +166,12 @@ export declare class SkillsApi extends runtime.BaseAPI {
|
|
|
112
166
|
* Update a skill
|
|
113
167
|
*/
|
|
114
168
|
updateSkill(skillId: string, skillUpdateRequestUio: SkillUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillUio>;
|
|
169
|
+
/**
|
|
170
|
+
* Update a skill file
|
|
171
|
+
*/
|
|
172
|
+
updateSkillFileRaw(requestParameters: UpdateSkillFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillFileUio>>;
|
|
173
|
+
/**
|
|
174
|
+
* Update a skill file
|
|
175
|
+
*/
|
|
176
|
+
updateSkillFile(skillId: string, fileId: string, skillFileUpdateRequestUio: SkillFileUpdateRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillFileUio>;
|
|
115
177
|
}
|
package/dist/apis/SkillsApi.js
CHANGED
|
@@ -115,6 +115,38 @@ class SkillsApi extends runtime.BaseAPI {
|
|
|
115
115
|
const response = await this.createSkillRaw({ skillCreateRequestUio: skillCreateRequestUio }, initOverrides);
|
|
116
116
|
return await response.value();
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Create a skill file
|
|
120
|
+
*/
|
|
121
|
+
async createSkillFileRaw(requestParameters, initOverrides) {
|
|
122
|
+
if (requestParameters['skillId'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('skillId', 'Required parameter "skillId" was null or undefined when calling createSkillFile().');
|
|
124
|
+
}
|
|
125
|
+
if (requestParameters['skillFileCreateRequestUio'] == null) {
|
|
126
|
+
throw new runtime.RequiredError('skillFileCreateRequestUio', 'Required parameter "skillFileCreateRequestUio" was null or undefined when calling createSkillFile().');
|
|
127
|
+
}
|
|
128
|
+
const queryParameters = {};
|
|
129
|
+
const headerParameters = {};
|
|
130
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
131
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
132
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
133
|
+
}
|
|
134
|
+
const response = await this.request({
|
|
135
|
+
path: `/skills/{skillId}/files`.replace(`{${"skillId"}}`, encodeURIComponent(String(requestParameters['skillId']))),
|
|
136
|
+
method: 'POST',
|
|
137
|
+
headers: headerParameters,
|
|
138
|
+
query: queryParameters,
|
|
139
|
+
body: (0, index_1.SkillFileCreateRequestUioToJSON)(requestParameters['skillFileCreateRequestUio']),
|
|
140
|
+
}, initOverrides);
|
|
141
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SkillFileUioFromJSON)(jsonValue));
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Create a skill file
|
|
145
|
+
*/
|
|
146
|
+
async createSkillFile(skillId, skillFileCreateRequestUio, initOverrides) {
|
|
147
|
+
const response = await this.createSkillFileRaw({ skillId: skillId, skillFileCreateRequestUio: skillFileCreateRequestUio }, initOverrides);
|
|
148
|
+
return await response.value();
|
|
149
|
+
}
|
|
118
150
|
/**
|
|
119
151
|
* Delete a skill
|
|
120
152
|
*/
|
|
@@ -141,6 +173,35 @@ class SkillsApi extends runtime.BaseAPI {
|
|
|
141
173
|
async deleteSkill(skillId, initOverrides) {
|
|
142
174
|
await this.deleteSkillRaw({ skillId: skillId }, initOverrides);
|
|
143
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Delete a skill file
|
|
178
|
+
*/
|
|
179
|
+
async deleteSkillFileRaw(requestParameters, initOverrides) {
|
|
180
|
+
if (requestParameters['skillId'] == null) {
|
|
181
|
+
throw new runtime.RequiredError('skillId', 'Required parameter "skillId" was null or undefined when calling deleteSkillFile().');
|
|
182
|
+
}
|
|
183
|
+
if (requestParameters['fileId'] == null) {
|
|
184
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling deleteSkillFile().');
|
|
185
|
+
}
|
|
186
|
+
const queryParameters = {};
|
|
187
|
+
const headerParameters = {};
|
|
188
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
189
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
190
|
+
}
|
|
191
|
+
const response = await this.request({
|
|
192
|
+
path: `/skills/{skillId}/files/{fileId}`.replace(`{${"skillId"}}`, encodeURIComponent(String(requestParameters['skillId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
193
|
+
method: 'DELETE',
|
|
194
|
+
headers: headerParameters,
|
|
195
|
+
query: queryParameters,
|
|
196
|
+
}, initOverrides);
|
|
197
|
+
return new runtime.VoidApiResponse(response);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Delete a skill file
|
|
201
|
+
*/
|
|
202
|
+
async deleteSkillFile(skillId, fileId, initOverrides) {
|
|
203
|
+
await this.deleteSkillFileRaw({ skillId: skillId, fileId: fileId }, initOverrides);
|
|
204
|
+
}
|
|
144
205
|
/**
|
|
145
206
|
* Get skills assigned to an agent
|
|
146
207
|
*/
|
|
@@ -195,6 +256,65 @@ class SkillsApi extends runtime.BaseAPI {
|
|
|
195
256
|
const response = await this.getSkillRaw({ skillId: skillId }, initOverrides);
|
|
196
257
|
return await response.value();
|
|
197
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Get a skill file with content
|
|
261
|
+
*/
|
|
262
|
+
async getSkillFileRaw(requestParameters, initOverrides) {
|
|
263
|
+
if (requestParameters['skillId'] == null) {
|
|
264
|
+
throw new runtime.RequiredError('skillId', 'Required parameter "skillId" was null or undefined when calling getSkillFile().');
|
|
265
|
+
}
|
|
266
|
+
if (requestParameters['fileId'] == null) {
|
|
267
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling getSkillFile().');
|
|
268
|
+
}
|
|
269
|
+
const queryParameters = {};
|
|
270
|
+
const headerParameters = {};
|
|
271
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
272
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
273
|
+
}
|
|
274
|
+
const response = await this.request({
|
|
275
|
+
path: `/skills/{skillId}/files/{fileId}`.replace(`{${"skillId"}}`, encodeURIComponent(String(requestParameters['skillId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
276
|
+
method: 'GET',
|
|
277
|
+
headers: headerParameters,
|
|
278
|
+
query: queryParameters,
|
|
279
|
+
}, initOverrides);
|
|
280
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SkillFileUioFromJSON)(jsonValue));
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Get a skill file with content
|
|
284
|
+
*/
|
|
285
|
+
async getSkillFile(skillId, fileId, initOverrides) {
|
|
286
|
+
const response = await this.getSkillFileRaw({ skillId: skillId, fileId: fileId }, initOverrides);
|
|
287
|
+
return await response.value();
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Returns all files attached to the skill — all metadata fields, no content
|
|
291
|
+
* List skill files
|
|
292
|
+
*/
|
|
293
|
+
async listSkillFilesRaw(requestParameters, initOverrides) {
|
|
294
|
+
if (requestParameters['skillId'] == null) {
|
|
295
|
+
throw new runtime.RequiredError('skillId', 'Required parameter "skillId" was null or undefined when calling listSkillFiles().');
|
|
296
|
+
}
|
|
297
|
+
const queryParameters = {};
|
|
298
|
+
const headerParameters = {};
|
|
299
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
300
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
301
|
+
}
|
|
302
|
+
const response = await this.request({
|
|
303
|
+
path: `/skills/{skillId}/files`.replace(`{${"skillId"}}`, encodeURIComponent(String(requestParameters['skillId']))),
|
|
304
|
+
method: 'GET',
|
|
305
|
+
headers: headerParameters,
|
|
306
|
+
query: queryParameters,
|
|
307
|
+
}, initOverrides);
|
|
308
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.SkillFileSummaryUioFromJSON));
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Returns all files attached to the skill — all metadata fields, no content
|
|
312
|
+
* List skill files
|
|
313
|
+
*/
|
|
314
|
+
async listSkillFiles(skillId, initOverrides) {
|
|
315
|
+
const response = await this.listSkillFilesRaw({ skillId: skillId }, initOverrides);
|
|
316
|
+
return await response.value();
|
|
317
|
+
}
|
|
198
318
|
/**
|
|
199
319
|
* Returns a paginated list of skills scoped to an organization
|
|
200
320
|
* List skills in an organization
|
|
@@ -294,5 +414,40 @@ class SkillsApi extends runtime.BaseAPI {
|
|
|
294
414
|
const response = await this.updateSkillRaw({ skillId: skillId, skillUpdateRequestUio: skillUpdateRequestUio }, initOverrides);
|
|
295
415
|
return await response.value();
|
|
296
416
|
}
|
|
417
|
+
/**
|
|
418
|
+
* Update a skill file
|
|
419
|
+
*/
|
|
420
|
+
async updateSkillFileRaw(requestParameters, initOverrides) {
|
|
421
|
+
if (requestParameters['skillId'] == null) {
|
|
422
|
+
throw new runtime.RequiredError('skillId', 'Required parameter "skillId" was null or undefined when calling updateSkillFile().');
|
|
423
|
+
}
|
|
424
|
+
if (requestParameters['fileId'] == null) {
|
|
425
|
+
throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling updateSkillFile().');
|
|
426
|
+
}
|
|
427
|
+
if (requestParameters['skillFileUpdateRequestUio'] == null) {
|
|
428
|
+
throw new runtime.RequiredError('skillFileUpdateRequestUio', 'Required parameter "skillFileUpdateRequestUio" was null or undefined when calling updateSkillFile().');
|
|
429
|
+
}
|
|
430
|
+
const queryParameters = {};
|
|
431
|
+
const headerParameters = {};
|
|
432
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
433
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
434
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
|
|
435
|
+
}
|
|
436
|
+
const response = await this.request({
|
|
437
|
+
path: `/skills/{skillId}/files/{fileId}`.replace(`{${"skillId"}}`, encodeURIComponent(String(requestParameters['skillId']))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
|
|
438
|
+
method: 'PATCH',
|
|
439
|
+
headers: headerParameters,
|
|
440
|
+
query: queryParameters,
|
|
441
|
+
body: (0, index_1.SkillFileUpdateRequestUioToJSON)(requestParameters['skillFileUpdateRequestUio']),
|
|
442
|
+
}, initOverrides);
|
|
443
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SkillFileUioFromJSON)(jsonValue));
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Update a skill file
|
|
447
|
+
*/
|
|
448
|
+
async updateSkillFile(skillId, fileId, skillFileUpdateRequestUio, initOverrides) {
|
|
449
|
+
const response = await this.updateSkillFileRaw({ skillId: skillId, fileId: fileId, skillFileUpdateRequestUio: skillFileUpdateRequestUio }, initOverrides);
|
|
450
|
+
return await response.value();
|
|
451
|
+
}
|
|
297
452
|
}
|
|
298
453
|
exports.SkillsApi = SkillsApi;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 AppInstanceListItemUio
|
|
16
|
+
*/
|
|
17
|
+
export interface AppInstanceListItemUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AppInstanceListItemUio
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AppInstanceListItemUio
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the AppInstanceListItemUio interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfAppInstanceListItemUio(value: object): value is AppInstanceListItemUio;
|
|
35
|
+
export declare function AppInstanceListItemUioFromJSON(json: any): AppInstanceListItemUio;
|
|
36
|
+
export declare function AppInstanceListItemUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppInstanceListItemUio;
|
|
37
|
+
export declare function AppInstanceListItemUioToJSON(json: any): AppInstanceListItemUio;
|
|
38
|
+
export declare function AppInstanceListItemUioToJSONTyped(value?: AppInstanceListItemUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.instanceOfAppInstanceListItemUio = instanceOfAppInstanceListItemUio;
|
|
17
|
+
exports.AppInstanceListItemUioFromJSON = AppInstanceListItemUioFromJSON;
|
|
18
|
+
exports.AppInstanceListItemUioFromJSONTyped = AppInstanceListItemUioFromJSONTyped;
|
|
19
|
+
exports.AppInstanceListItemUioToJSON = AppInstanceListItemUioToJSON;
|
|
20
|
+
exports.AppInstanceListItemUioToJSONTyped = AppInstanceListItemUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AppInstanceListItemUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAppInstanceListItemUio(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function AppInstanceListItemUioFromJSON(json) {
|
|
32
|
+
return AppInstanceListItemUioFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function AppInstanceListItemUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'id': json['id'],
|
|
40
|
+
'name': json['name'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function AppInstanceListItemUioToJSON(json) {
|
|
44
|
+
return AppInstanceListItemUioToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function AppInstanceListItemUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'id': value['id'],
|
|
52
|
+
'name': value['name'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 SkillFileCreateRequestUio
|
|
16
|
+
*/
|
|
17
|
+
export interface SkillFileCreateRequestUio {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SkillFileCreateRequestUio
|
|
22
|
+
*/
|
|
23
|
+
filename: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SkillFileCreateRequestUio
|
|
28
|
+
*/
|
|
29
|
+
content: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof SkillFileCreateRequestUio
|
|
34
|
+
*/
|
|
35
|
+
mimeType?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the SkillFileCreateRequestUio interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfSkillFileCreateRequestUio(value: object): value is SkillFileCreateRequestUio;
|
|
41
|
+
export declare function SkillFileCreateRequestUioFromJSON(json: any): SkillFileCreateRequestUio;
|
|
42
|
+
export declare function SkillFileCreateRequestUioFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFileCreateRequestUio;
|
|
43
|
+
export declare function SkillFileCreateRequestUioToJSON(json: any): SkillFileCreateRequestUio;
|
|
44
|
+
export declare function SkillFileCreateRequestUioToJSONTyped(value?: SkillFileCreateRequestUio | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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.instanceOfSkillFileCreateRequestUio = instanceOfSkillFileCreateRequestUio;
|
|
17
|
+
exports.SkillFileCreateRequestUioFromJSON = SkillFileCreateRequestUioFromJSON;
|
|
18
|
+
exports.SkillFileCreateRequestUioFromJSONTyped = SkillFileCreateRequestUioFromJSONTyped;
|
|
19
|
+
exports.SkillFileCreateRequestUioToJSON = SkillFileCreateRequestUioToJSON;
|
|
20
|
+
exports.SkillFileCreateRequestUioToJSONTyped = SkillFileCreateRequestUioToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the SkillFileCreateRequestUio interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfSkillFileCreateRequestUio(value) {
|
|
25
|
+
if (!('filename' in value) || value['filename'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('content' in value) || value['content'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function SkillFileCreateRequestUioFromJSON(json) {
|
|
32
|
+
return SkillFileCreateRequestUioFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function SkillFileCreateRequestUioFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'filename': json['filename'],
|
|
40
|
+
'content': json['content'],
|
|
41
|
+
'mimeType': json['mimeType'] == null ? undefined : json['mimeType'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function SkillFileCreateRequestUioToJSON(json) {
|
|
45
|
+
return SkillFileCreateRequestUioToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function SkillFileCreateRequestUioToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'filename': value['filename'],
|
|
53
|
+
'content': value['content'],
|
|
54
|
+
'mimeType': value['mimeType'],
|
|
55
|
+
};
|
|
56
|
+
}
|