@wildix/wim-wilma-client 0.0.4 → 0.0.5
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-cjs/Wilma.js +14 -0
- package/dist-cjs/commands/CreateAgentCommand.js +21 -0
- package/dist-cjs/commands/DeleteAgentCommand.js +21 -0
- package/dist-cjs/commands/ExecuteAgentCommand.js +21 -0
- package/dist-cjs/commands/GetAgentCommand.js +21 -0
- package/dist-cjs/commands/ListAgentsCommand.js +21 -0
- package/dist-cjs/commands/ListAgentsNamesCommand.js +21 -0
- package/dist-cjs/commands/UpdateAgentCommand.js +21 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/models/models_0.js +30 -1
- package/dist-cjs/protocols/Aws_restJson1.js +249 -4
- package/dist-es/Wilma.js +14 -0
- package/dist-es/commands/CreateAgentCommand.js +17 -0
- package/dist-es/commands/DeleteAgentCommand.js +17 -0
- package/dist-es/commands/ExecuteAgentCommand.js +17 -0
- package/dist-es/commands/GetAgentCommand.js +17 -0
- package/dist-es/commands/ListAgentsCommand.js +17 -0
- package/dist-es/commands/ListAgentsNamesCommand.js +17 -0
- package/dist-es/commands/UpdateAgentCommand.js +17 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/models/models_0.js +29 -0
- package/dist-es/protocols/Aws_restJson1.js +234 -3
- package/dist-types/Wilma.d.ts +51 -0
- package/dist-types/WilmaClient.d.ts +9 -2
- package/dist-types/commands/CreateAgentCommand.d.ts +142 -0
- package/dist-types/commands/DeleteAgentCommand.d.ts +73 -0
- package/dist-types/commands/ExecuteAgentCommand.d.ts +84 -0
- package/dist-types/commands/GetAgentCommand.d.ts +113 -0
- package/dist-types/commands/ListAgentsCommand.d.ts +112 -0
- package/dist-types/commands/ListAgentsNamesCommand.d.ts +80 -0
- package/dist-types/commands/UpdateAgentCommand.d.ts +145 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +326 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
- package/dist-types/runtimeConfig.browser.d.ts +6 -1
- package/dist-types/runtimeConfig.d.ts +6 -1
- package/dist-types/runtimeConfig.native.d.ts +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetAgentCommand, se_GetAgentCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class GetAgentCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Wilma", "GetAgent", {})
|
|
12
|
+
.n("WilmaClient", "GetAgentCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetAgentCommand)
|
|
15
|
+
.de(de_GetAgentCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ListAgentsCommand, se_ListAgentsCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class ListAgentsCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Wilma", "ListAgents", {})
|
|
12
|
+
.n("WilmaClient", "ListAgentsCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ListAgentsCommand)
|
|
15
|
+
.de(de_ListAgentsCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ListAgentsNamesCommand, se_ListAgentsNamesCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class ListAgentsNamesCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Wilma", "ListAgentsNames", {})
|
|
12
|
+
.n("WilmaClient", "ListAgentsNamesCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ListAgentsNamesCommand)
|
|
15
|
+
.de(de_ListAgentsNamesCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_UpdateAgentCommand, se_UpdateAgentCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class UpdateAgentCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Wilma", "UpdateAgent", {})
|
|
12
|
+
.n("WilmaClient", "UpdateAgentCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_UpdateAgentCommand)
|
|
15
|
+
.de(de_UpdateAgentCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
export * from "./CreateAgentCommand";
|
|
2
|
+
export * from "./DeleteAgentCommand";
|
|
1
3
|
export * from "./DeleteChatCommand";
|
|
2
4
|
export * from "./DislikeAnswerCommand";
|
|
5
|
+
export * from "./ExecuteAgentCommand";
|
|
6
|
+
export * from "./GetAgentCommand";
|
|
3
7
|
export * from "./GetChatCommand";
|
|
4
8
|
export * from "./LikeAnswerCommand";
|
|
5
9
|
export * from "./ListAgentFeedbacksCommand";
|
|
10
|
+
export * from "./ListAgentsCommand";
|
|
11
|
+
export * from "./ListAgentsNamesCommand";
|
|
6
12
|
export * from "./ListChatsCommand";
|
|
7
13
|
export * from "./ListFeedbacksCommand";
|
|
14
|
+
export * from "./UpdateAgentCommand";
|
|
@@ -35,6 +35,35 @@ export class ValidationException extends __BaseException {
|
|
|
35
35
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
export var AgentToolVariableHandler;
|
|
39
|
+
(function (AgentToolVariableHandler) {
|
|
40
|
+
AgentToolVariableHandler.visit = (value, visitor) => {
|
|
41
|
+
if (value.auto !== undefined)
|
|
42
|
+
return visitor.auto(value.auto);
|
|
43
|
+
if (value.guided !== undefined)
|
|
44
|
+
return visitor.guided(value.guided);
|
|
45
|
+
if (value.predefined !== undefined)
|
|
46
|
+
return visitor.predefined(value.predefined);
|
|
47
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
48
|
+
};
|
|
49
|
+
})(AgentToolVariableHandler || (AgentToolVariableHandler = {}));
|
|
50
|
+
export var AgentCapability;
|
|
51
|
+
(function (AgentCapability) {
|
|
52
|
+
AgentCapability.visit = (value, visitor) => {
|
|
53
|
+
if (value.tool !== undefined)
|
|
54
|
+
return visitor.tool(value.tool);
|
|
55
|
+
if (value.kb !== undefined)
|
|
56
|
+
return visitor.kb(value.kb);
|
|
57
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
58
|
+
};
|
|
59
|
+
})(AgentCapability || (AgentCapability = {}));
|
|
60
|
+
export const AgentVariableType = {
|
|
61
|
+
BOOLEAN: "boolean",
|
|
62
|
+
NUMBER: "number",
|
|
63
|
+
NUMBER_ARRAY: "number_array",
|
|
64
|
+
STRING: "string",
|
|
65
|
+
STRING_ARRAY: "string_array",
|
|
66
|
+
};
|
|
38
67
|
export const ChatFeedbackScore = {
|
|
39
68
|
DISLIKE: "DISLIKE",
|
|
40
69
|
LIKE: "LIKE",
|
|
@@ -3,6 +3,44 @@ import { ForbiddenException, NotFoundException, ValidationException, } from "../
|
|
|
3
3
|
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
5
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
|
+
export const se_CreateAgentCommand = async (input, context) => {
|
|
7
|
+
const b = rb(input, context);
|
|
8
|
+
const headers = {
|
|
9
|
+
'content-type': 'application/json',
|
|
10
|
+
};
|
|
11
|
+
b.bp("/v1/wilma/agents/agents");
|
|
12
|
+
const query = map({
|
|
13
|
+
[_c]: [, input[_c]],
|
|
14
|
+
});
|
|
15
|
+
let body;
|
|
16
|
+
body = JSON.stringify(take(input, {
|
|
17
|
+
'capabilities': _ => _json(_),
|
|
18
|
+
'instructions': [],
|
|
19
|
+
'model': [],
|
|
20
|
+
'name': [],
|
|
21
|
+
'variables': _ => _json(_),
|
|
22
|
+
}));
|
|
23
|
+
b.m("POST")
|
|
24
|
+
.h(headers)
|
|
25
|
+
.q(query)
|
|
26
|
+
.b(body);
|
|
27
|
+
return b.build();
|
|
28
|
+
};
|
|
29
|
+
export const se_DeleteAgentCommand = async (input, context) => {
|
|
30
|
+
const b = rb(input, context);
|
|
31
|
+
const headers = {};
|
|
32
|
+
b.bp("/v1/wilma/agents/{agentId}");
|
|
33
|
+
b.p('agentId', () => input.agentId, '{agentId}', false);
|
|
34
|
+
const query = map({
|
|
35
|
+
[_c]: [, input[_c]],
|
|
36
|
+
});
|
|
37
|
+
let body;
|
|
38
|
+
b.m("DELETE")
|
|
39
|
+
.h(headers)
|
|
40
|
+
.q(query)
|
|
41
|
+
.b(body);
|
|
42
|
+
return b.build();
|
|
43
|
+
};
|
|
6
44
|
export const se_DeleteChatCommand = async (input, context) => {
|
|
7
45
|
const b = rb(input, context);
|
|
8
46
|
const headers = {};
|
|
@@ -41,6 +79,44 @@ export const se_DislikeAnswerCommand = async (input, context) => {
|
|
|
41
79
|
.b(body);
|
|
42
80
|
return b.build();
|
|
43
81
|
};
|
|
82
|
+
export const se_ExecuteAgentCommand = async (input, context) => {
|
|
83
|
+
const b = rb(input, context);
|
|
84
|
+
const headers = {
|
|
85
|
+
'content-type': 'application/json',
|
|
86
|
+
};
|
|
87
|
+
b.bp("/v1/wilma/agents/agents/{agentId}/execute");
|
|
88
|
+
b.p('agentId', () => input.agentId, '{agentId}', false);
|
|
89
|
+
const query = map({
|
|
90
|
+
[_c]: [, input[_c]],
|
|
91
|
+
});
|
|
92
|
+
let body;
|
|
93
|
+
body = JSON.stringify(take(input, {
|
|
94
|
+
'data': [],
|
|
95
|
+
'service': [],
|
|
96
|
+
'user': [],
|
|
97
|
+
'variables': _ => se_Document(_, context),
|
|
98
|
+
}));
|
|
99
|
+
b.m("POST")
|
|
100
|
+
.h(headers)
|
|
101
|
+
.q(query)
|
|
102
|
+
.b(body);
|
|
103
|
+
return b.build();
|
|
104
|
+
};
|
|
105
|
+
export const se_GetAgentCommand = async (input, context) => {
|
|
106
|
+
const b = rb(input, context);
|
|
107
|
+
const headers = {};
|
|
108
|
+
b.bp("/v1/wilma/agents/agents/{agentId}");
|
|
109
|
+
b.p('agentId', () => input.agentId, '{agentId}', false);
|
|
110
|
+
const query = map({
|
|
111
|
+
[_c]: [, input[_c]],
|
|
112
|
+
});
|
|
113
|
+
let body;
|
|
114
|
+
b.m("GET")
|
|
115
|
+
.h(headers)
|
|
116
|
+
.q(query)
|
|
117
|
+
.b(body);
|
|
118
|
+
return b.build();
|
|
119
|
+
};
|
|
44
120
|
export const se_GetChatCommand = async (input, context) => {
|
|
45
121
|
const b = rb(input, context);
|
|
46
122
|
const headers = {};
|
|
@@ -95,6 +171,34 @@ export const se_ListAgentFeedbacksCommand = async (input, context) => {
|
|
|
95
171
|
.b(body);
|
|
96
172
|
return b.build();
|
|
97
173
|
};
|
|
174
|
+
export const se_ListAgentsCommand = async (input, context) => {
|
|
175
|
+
const b = rb(input, context);
|
|
176
|
+
const headers = {};
|
|
177
|
+
b.bp("/v1/wilma/agents");
|
|
178
|
+
const query = map({
|
|
179
|
+
[_c]: [, input[_c]],
|
|
180
|
+
});
|
|
181
|
+
let body;
|
|
182
|
+
b.m("GET")
|
|
183
|
+
.h(headers)
|
|
184
|
+
.q(query)
|
|
185
|
+
.b(body);
|
|
186
|
+
return b.build();
|
|
187
|
+
};
|
|
188
|
+
export const se_ListAgentsNamesCommand = async (input, context) => {
|
|
189
|
+
const b = rb(input, context);
|
|
190
|
+
const headers = {};
|
|
191
|
+
b.bp("/v1/wilma/agents-names");
|
|
192
|
+
const query = map({
|
|
193
|
+
[_c]: [, input[_c]],
|
|
194
|
+
});
|
|
195
|
+
let body;
|
|
196
|
+
b.m("GET")
|
|
197
|
+
.h(headers)
|
|
198
|
+
.q(query)
|
|
199
|
+
.b(body);
|
|
200
|
+
return b.build();
|
|
201
|
+
};
|
|
98
202
|
export const se_ListChatsCommand = async (input, context) => {
|
|
99
203
|
const b = rb(input, context);
|
|
100
204
|
const headers = {};
|
|
@@ -126,6 +230,54 @@ export const se_ListFeedbacksCommand = async (input, context) => {
|
|
|
126
230
|
.b(body);
|
|
127
231
|
return b.build();
|
|
128
232
|
};
|
|
233
|
+
export const se_UpdateAgentCommand = async (input, context) => {
|
|
234
|
+
const b = rb(input, context);
|
|
235
|
+
const headers = {
|
|
236
|
+
'content-type': 'application/json',
|
|
237
|
+
};
|
|
238
|
+
b.bp("/v1/wilma/agents/{agentId}");
|
|
239
|
+
b.p('agentId', () => input.agentId, '{agentId}', false);
|
|
240
|
+
const query = map({
|
|
241
|
+
[_c]: [, input[_c]],
|
|
242
|
+
});
|
|
243
|
+
let body;
|
|
244
|
+
body = JSON.stringify(take(input, {
|
|
245
|
+
'capabilities': _ => _json(_),
|
|
246
|
+
'instructions': [],
|
|
247
|
+
'model': [],
|
|
248
|
+
'name': [],
|
|
249
|
+
'variables': _ => _json(_),
|
|
250
|
+
}));
|
|
251
|
+
b.m("PUT")
|
|
252
|
+
.h(headers)
|
|
253
|
+
.q(query)
|
|
254
|
+
.b(body);
|
|
255
|
+
return b.build();
|
|
256
|
+
};
|
|
257
|
+
export const de_CreateAgentCommand = async (output, context) => {
|
|
258
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
259
|
+
return de_CommandError(output, context);
|
|
260
|
+
}
|
|
261
|
+
const contents = map({
|
|
262
|
+
$metadata: deserializeMetadata(output),
|
|
263
|
+
});
|
|
264
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
265
|
+
const doc = take(data, {
|
|
266
|
+
'agent': _json,
|
|
267
|
+
});
|
|
268
|
+
Object.assign(contents, doc);
|
|
269
|
+
return contents;
|
|
270
|
+
};
|
|
271
|
+
export const de_DeleteAgentCommand = async (output, context) => {
|
|
272
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
273
|
+
return de_CommandError(output, context);
|
|
274
|
+
}
|
|
275
|
+
const contents = map({
|
|
276
|
+
$metadata: deserializeMetadata(output),
|
|
277
|
+
});
|
|
278
|
+
await collectBody(output.body, context);
|
|
279
|
+
return contents;
|
|
280
|
+
};
|
|
129
281
|
export const de_DeleteChatCommand = async (output, context) => {
|
|
130
282
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
131
283
|
return de_CommandError(output, context);
|
|
@@ -146,6 +298,34 @@ export const de_DislikeAnswerCommand = async (output, context) => {
|
|
|
146
298
|
await collectBody(output.body, context);
|
|
147
299
|
return contents;
|
|
148
300
|
};
|
|
301
|
+
export const de_ExecuteAgentCommand = async (output, context) => {
|
|
302
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
303
|
+
return de_CommandError(output, context);
|
|
304
|
+
}
|
|
305
|
+
const contents = map({
|
|
306
|
+
$metadata: deserializeMetadata(output),
|
|
307
|
+
});
|
|
308
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
309
|
+
const doc = take(data, {
|
|
310
|
+
'result': _ => de_AgentExecutionResult(_, context),
|
|
311
|
+
});
|
|
312
|
+
Object.assign(contents, doc);
|
|
313
|
+
return contents;
|
|
314
|
+
};
|
|
315
|
+
export const de_GetAgentCommand = async (output, context) => {
|
|
316
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
317
|
+
return de_CommandError(output, context);
|
|
318
|
+
}
|
|
319
|
+
const contents = map({
|
|
320
|
+
$metadata: deserializeMetadata(output),
|
|
321
|
+
});
|
|
322
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
323
|
+
const doc = take(data, {
|
|
324
|
+
'agent': _json,
|
|
325
|
+
});
|
|
326
|
+
Object.assign(contents, doc);
|
|
327
|
+
return contents;
|
|
328
|
+
};
|
|
149
329
|
export const de_GetChatCommand = async (output, context) => {
|
|
150
330
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
151
331
|
return de_CommandError(output, context);
|
|
@@ -186,6 +366,34 @@ export const de_ListAgentFeedbacksCommand = async (output, context) => {
|
|
|
186
366
|
Object.assign(contents, doc);
|
|
187
367
|
return contents;
|
|
188
368
|
};
|
|
369
|
+
export const de_ListAgentsCommand = async (output, context) => {
|
|
370
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
371
|
+
return de_CommandError(output, context);
|
|
372
|
+
}
|
|
373
|
+
const contents = map({
|
|
374
|
+
$metadata: deserializeMetadata(output),
|
|
375
|
+
});
|
|
376
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
377
|
+
const doc = take(data, {
|
|
378
|
+
'agents': _json,
|
|
379
|
+
});
|
|
380
|
+
Object.assign(contents, doc);
|
|
381
|
+
return contents;
|
|
382
|
+
};
|
|
383
|
+
export const de_ListAgentsNamesCommand = async (output, context) => {
|
|
384
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
385
|
+
return de_CommandError(output, context);
|
|
386
|
+
}
|
|
387
|
+
const contents = map({
|
|
388
|
+
$metadata: deserializeMetadata(output),
|
|
389
|
+
});
|
|
390
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
391
|
+
const doc = take(data, {
|
|
392
|
+
'agents': _json,
|
|
393
|
+
});
|
|
394
|
+
Object.assign(contents, doc);
|
|
395
|
+
return contents;
|
|
396
|
+
};
|
|
189
397
|
export const de_ListChatsCommand = async (output, context) => {
|
|
190
398
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
191
399
|
return de_CommandError(output, context);
|
|
@@ -216,6 +424,20 @@ export const de_ListFeedbacksCommand = async (output, context) => {
|
|
|
216
424
|
Object.assign(contents, doc);
|
|
217
425
|
return contents;
|
|
218
426
|
};
|
|
427
|
+
export const de_UpdateAgentCommand = async (output, context) => {
|
|
428
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
429
|
+
return de_CommandError(output, context);
|
|
430
|
+
}
|
|
431
|
+
const contents = map({
|
|
432
|
+
$metadata: deserializeMetadata(output),
|
|
433
|
+
});
|
|
434
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
435
|
+
const doc = take(data, {
|
|
436
|
+
'agent': _json,
|
|
437
|
+
});
|
|
438
|
+
Object.assign(contents, doc);
|
|
439
|
+
return contents;
|
|
440
|
+
};
|
|
219
441
|
const de_CommandError = async (output, context) => {
|
|
220
442
|
const parsedOutput = {
|
|
221
443
|
...output,
|
|
@@ -223,12 +445,12 @@ const de_CommandError = async (output, context) => {
|
|
|
223
445
|
};
|
|
224
446
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
225
447
|
switch (errorCode) {
|
|
226
|
-
case "ForbiddenException":
|
|
227
|
-
case "smithy.framework#ForbiddenException":
|
|
228
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
229
448
|
case "ValidationException":
|
|
230
449
|
case "smithy.framework#ValidationException":
|
|
231
450
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
451
|
+
case "ForbiddenException":
|
|
452
|
+
case "smithy.framework#ForbiddenException":
|
|
453
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
232
454
|
case "NotFoundException":
|
|
233
455
|
case "smithy.framework#NotFoundException":
|
|
234
456
|
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
@@ -281,9 +503,18 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
281
503
|
});
|
|
282
504
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
283
505
|
};
|
|
506
|
+
const se_Document = (input, context) => {
|
|
507
|
+
return input;
|
|
508
|
+
};
|
|
284
509
|
const de_Document = (output, context) => {
|
|
285
510
|
return output;
|
|
286
511
|
};
|
|
512
|
+
const de_AgentExecutionResult = (output, context) => {
|
|
513
|
+
return take(output, {
|
|
514
|
+
'error': _json,
|
|
515
|
+
'output': (_) => de_Document(_, context),
|
|
516
|
+
});
|
|
517
|
+
};
|
|
287
518
|
const de_Chat = (output, context) => {
|
|
288
519
|
return take(output, {
|
|
289
520
|
'agentId': __expectString,
|
package/dist-types/Wilma.d.ts
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import { WilmaClient } from "./WilmaClient";
|
|
2
|
+
import { CreateAgentCommandInput, CreateAgentCommandOutput } from "./commands/CreateAgentCommand";
|
|
3
|
+
import { DeleteAgentCommandInput, DeleteAgentCommandOutput } from "./commands/DeleteAgentCommand";
|
|
2
4
|
import { DeleteChatCommandInput, DeleteChatCommandOutput } from "./commands/DeleteChatCommand";
|
|
3
5
|
import { DislikeAnswerCommandInput, DislikeAnswerCommandOutput } from "./commands/DislikeAnswerCommand";
|
|
6
|
+
import { ExecuteAgentCommandInput, ExecuteAgentCommandOutput } from "./commands/ExecuteAgentCommand";
|
|
7
|
+
import { GetAgentCommandInput, GetAgentCommandOutput } from "./commands/GetAgentCommand";
|
|
4
8
|
import { GetChatCommandInput, GetChatCommandOutput } from "./commands/GetChatCommand";
|
|
5
9
|
import { LikeAnswerCommandInput, LikeAnswerCommandOutput } from "./commands/LikeAnswerCommand";
|
|
6
10
|
import { ListAgentFeedbacksCommandInput, ListAgentFeedbacksCommandOutput } from "./commands/ListAgentFeedbacksCommand";
|
|
11
|
+
import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
|
|
12
|
+
import { ListAgentsNamesCommandInput, ListAgentsNamesCommandOutput } from "./commands/ListAgentsNamesCommand";
|
|
7
13
|
import { ListChatsCommandInput, ListChatsCommandOutput } from "./commands/ListChatsCommand";
|
|
8
14
|
import { ListFeedbacksCommandInput, ListFeedbacksCommandOutput } from "./commands/ListFeedbacksCommand";
|
|
15
|
+
import { UpdateAgentCommandInput, UpdateAgentCommandOutput } from "./commands/UpdateAgentCommand";
|
|
9
16
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
10
17
|
export interface Wilma {
|
|
18
|
+
/**
|
|
19
|
+
* @see {@link CreateAgentCommand}
|
|
20
|
+
*/
|
|
21
|
+
createAgent(args: CreateAgentCommandInput, options?: __HttpHandlerOptions): Promise<CreateAgentCommandOutput>;
|
|
22
|
+
createAgent(args: CreateAgentCommandInput, cb: (err: any, data?: CreateAgentCommandOutput) => void): void;
|
|
23
|
+
createAgent(args: CreateAgentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateAgentCommandOutput) => void): void;
|
|
24
|
+
/**
|
|
25
|
+
* @see {@link DeleteAgentCommand}
|
|
26
|
+
*/
|
|
27
|
+
deleteAgent(args: DeleteAgentCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAgentCommandOutput>;
|
|
28
|
+
deleteAgent(args: DeleteAgentCommandInput, cb: (err: any, data?: DeleteAgentCommandOutput) => void): void;
|
|
29
|
+
deleteAgent(args: DeleteAgentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteAgentCommandOutput) => void): void;
|
|
11
30
|
/**
|
|
12
31
|
* @see {@link DeleteChatCommand}
|
|
13
32
|
*/
|
|
@@ -20,6 +39,18 @@ export interface Wilma {
|
|
|
20
39
|
dislikeAnswer(args: DislikeAnswerCommandInput, options?: __HttpHandlerOptions): Promise<DislikeAnswerCommandOutput>;
|
|
21
40
|
dislikeAnswer(args: DislikeAnswerCommandInput, cb: (err: any, data?: DislikeAnswerCommandOutput) => void): void;
|
|
22
41
|
dislikeAnswer(args: DislikeAnswerCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DislikeAnswerCommandOutput) => void): void;
|
|
42
|
+
/**
|
|
43
|
+
* @see {@link ExecuteAgentCommand}
|
|
44
|
+
*/
|
|
45
|
+
executeAgent(args: ExecuteAgentCommandInput, options?: __HttpHandlerOptions): Promise<ExecuteAgentCommandOutput>;
|
|
46
|
+
executeAgent(args: ExecuteAgentCommandInput, cb: (err: any, data?: ExecuteAgentCommandOutput) => void): void;
|
|
47
|
+
executeAgent(args: ExecuteAgentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ExecuteAgentCommandOutput) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* @see {@link GetAgentCommand}
|
|
50
|
+
*/
|
|
51
|
+
getAgent(args: GetAgentCommandInput, options?: __HttpHandlerOptions): Promise<GetAgentCommandOutput>;
|
|
52
|
+
getAgent(args: GetAgentCommandInput, cb: (err: any, data?: GetAgentCommandOutput) => void): void;
|
|
53
|
+
getAgent(args: GetAgentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAgentCommandOutput) => void): void;
|
|
23
54
|
/**
|
|
24
55
|
* @see {@link GetChatCommand}
|
|
25
56
|
*/
|
|
@@ -38,6 +69,20 @@ export interface Wilma {
|
|
|
38
69
|
listAgentFeedbacks(args: ListAgentFeedbacksCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentFeedbacksCommandOutput>;
|
|
39
70
|
listAgentFeedbacks(args: ListAgentFeedbacksCommandInput, cb: (err: any, data?: ListAgentFeedbacksCommandOutput) => void): void;
|
|
40
71
|
listAgentFeedbacks(args: ListAgentFeedbacksCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAgentFeedbacksCommandOutput) => void): void;
|
|
72
|
+
/**
|
|
73
|
+
* @see {@link ListAgentsCommand}
|
|
74
|
+
*/
|
|
75
|
+
listAgents(): Promise<ListAgentsCommandOutput>;
|
|
76
|
+
listAgents(args: ListAgentsCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentsCommandOutput>;
|
|
77
|
+
listAgents(args: ListAgentsCommandInput, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
|
|
78
|
+
listAgents(args: ListAgentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
|
|
79
|
+
/**
|
|
80
|
+
* @see {@link ListAgentsNamesCommand}
|
|
81
|
+
*/
|
|
82
|
+
listAgentsNames(): Promise<ListAgentsNamesCommandOutput>;
|
|
83
|
+
listAgentsNames(args: ListAgentsNamesCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentsNamesCommandOutput>;
|
|
84
|
+
listAgentsNames(args: ListAgentsNamesCommandInput, cb: (err: any, data?: ListAgentsNamesCommandOutput) => void): void;
|
|
85
|
+
listAgentsNames(args: ListAgentsNamesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAgentsNamesCommandOutput) => void): void;
|
|
41
86
|
/**
|
|
42
87
|
* @see {@link ListChatsCommand}
|
|
43
88
|
*/
|
|
@@ -52,6 +97,12 @@ export interface Wilma {
|
|
|
52
97
|
listFeedbacks(args: ListFeedbacksCommandInput, options?: __HttpHandlerOptions): Promise<ListFeedbacksCommandOutput>;
|
|
53
98
|
listFeedbacks(args: ListFeedbacksCommandInput, cb: (err: any, data?: ListFeedbacksCommandOutput) => void): void;
|
|
54
99
|
listFeedbacks(args: ListFeedbacksCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListFeedbacksCommandOutput) => void): void;
|
|
100
|
+
/**
|
|
101
|
+
* @see {@link UpdateAgentCommand}
|
|
102
|
+
*/
|
|
103
|
+
updateAgent(args: UpdateAgentCommandInput, options?: __HttpHandlerOptions): Promise<UpdateAgentCommandOutput>;
|
|
104
|
+
updateAgent(args: UpdateAgentCommandInput, cb: (err: any, data?: UpdateAgentCommandOutput) => void): void;
|
|
105
|
+
updateAgent(args: UpdateAgentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateAgentCommandOutput) => void): void;
|
|
55
106
|
}
|
|
56
107
|
/**
|
|
57
108
|
* @public
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { CreateAgentCommandInput, CreateAgentCommandOutput } from "./commands/CreateAgentCommand";
|
|
2
|
+
import { DeleteAgentCommandInput, DeleteAgentCommandOutput } from "./commands/DeleteAgentCommand";
|
|
1
3
|
import { DeleteChatCommandInput, DeleteChatCommandOutput } from "./commands/DeleteChatCommand";
|
|
2
4
|
import { DislikeAnswerCommandInput, DislikeAnswerCommandOutput } from "./commands/DislikeAnswerCommand";
|
|
5
|
+
import { ExecuteAgentCommandInput, ExecuteAgentCommandOutput } from "./commands/ExecuteAgentCommand";
|
|
6
|
+
import { GetAgentCommandInput, GetAgentCommandOutput } from "./commands/GetAgentCommand";
|
|
3
7
|
import { GetChatCommandInput, GetChatCommandOutput } from "./commands/GetChatCommand";
|
|
4
8
|
import { LikeAnswerCommandInput, LikeAnswerCommandOutput } from "./commands/LikeAnswerCommand";
|
|
5
9
|
import { ListAgentFeedbacksCommandInput, ListAgentFeedbacksCommandOutput } from "./commands/ListAgentFeedbacksCommand";
|
|
10
|
+
import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
|
|
11
|
+
import { ListAgentsNamesCommandInput, ListAgentsNamesCommandOutput } from "./commands/ListAgentsNamesCommand";
|
|
6
12
|
import { ListChatsCommandInput, ListChatsCommandOutput } from "./commands/ListChatsCommand";
|
|
7
13
|
import { ListFeedbacksCommandInput, ListFeedbacksCommandOutput } from "./commands/ListFeedbacksCommand";
|
|
14
|
+
import { UpdateAgentCommandInput, UpdateAgentCommandOutput } from "./commands/UpdateAgentCommand";
|
|
8
15
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
9
16
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
10
17
|
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
@@ -16,11 +23,11 @@ export { __Client };
|
|
|
16
23
|
/**
|
|
17
24
|
* @public
|
|
18
25
|
*/
|
|
19
|
-
export type ServiceInputTypes = DeleteChatCommandInput | DislikeAnswerCommandInput | GetChatCommandInput | LikeAnswerCommandInput | ListAgentFeedbacksCommandInput | ListChatsCommandInput | ListFeedbacksCommandInput;
|
|
26
|
+
export type ServiceInputTypes = CreateAgentCommandInput | DeleteAgentCommandInput | DeleteChatCommandInput | DislikeAnswerCommandInput | ExecuteAgentCommandInput | GetAgentCommandInput | GetChatCommandInput | LikeAnswerCommandInput | ListAgentFeedbacksCommandInput | ListAgentsCommandInput | ListAgentsNamesCommandInput | ListChatsCommandInput | ListFeedbacksCommandInput | UpdateAgentCommandInput;
|
|
20
27
|
/**
|
|
21
28
|
* @public
|
|
22
29
|
*/
|
|
23
|
-
export type ServiceOutputTypes = DeleteChatCommandOutput | DislikeAnswerCommandOutput | GetChatCommandOutput | LikeAnswerCommandOutput | ListAgentFeedbacksCommandOutput | ListChatsCommandOutput | ListFeedbacksCommandOutput;
|
|
30
|
+
export type ServiceOutputTypes = CreateAgentCommandOutput | DeleteAgentCommandOutput | DeleteChatCommandOutput | DislikeAnswerCommandOutput | ExecuteAgentCommandOutput | GetAgentCommandOutput | GetChatCommandOutput | LikeAnswerCommandOutput | ListAgentFeedbacksCommandOutput | ListAgentsCommandOutput | ListAgentsNamesCommandOutput | ListChatsCommandOutput | ListFeedbacksCommandOutput | UpdateAgentCommandOutput;
|
|
24
31
|
/**
|
|
25
32
|
* @public
|
|
26
33
|
*/
|