@wildix/wim-wilma-client 0.0.3 → 0.0.4
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/models/models_0.js +14 -14
- package/dist-cjs/protocols/Aws_restJson1.js +20 -2
- package/dist-es/models/models_0.js +12 -12
- package/dist-es/protocols/Aws_restJson1.js +20 -2
- package/dist-types/commands/GetChatCommand.d.ts +2 -0
- package/dist-types/commands/ListChatsCommand.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +11 -9
- package/package.json +1 -1
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatFeedbackScore = exports.
|
|
3
|
+
exports.ChatFeedbackScore = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = void 0;
|
|
4
4
|
const WilmaServiceException_1 = require("./WilmaServiceException");
|
|
5
|
+
class ForbiddenException extends WilmaServiceException_1.WilmaServiceException {
|
|
6
|
+
name = "ForbiddenException";
|
|
7
|
+
$fault = "client";
|
|
8
|
+
constructor(opts) {
|
|
9
|
+
super({
|
|
10
|
+
name: "ForbiddenException",
|
|
11
|
+
$fault: "client",
|
|
12
|
+
...opts
|
|
13
|
+
});
|
|
14
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ForbiddenException = ForbiddenException;
|
|
5
18
|
class NotFoundException extends WilmaServiceException_1.WilmaServiceException {
|
|
6
19
|
name = "NotFoundException";
|
|
7
20
|
$fault = "client";
|
|
@@ -28,19 +41,6 @@ class ValidationException extends WilmaServiceException_1.WilmaServiceException
|
|
|
28
41
|
}
|
|
29
42
|
}
|
|
30
43
|
exports.ValidationException = ValidationException;
|
|
31
|
-
class ForbiddenException extends WilmaServiceException_1.WilmaServiceException {
|
|
32
|
-
name = "ForbiddenException";
|
|
33
|
-
$fault = "client";
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super({
|
|
36
|
-
name: "ForbiddenException",
|
|
37
|
-
$fault: "client",
|
|
38
|
-
...opts
|
|
39
|
-
});
|
|
40
|
-
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.ForbiddenException = ForbiddenException;
|
|
44
44
|
exports.ChatFeedbackScore = {
|
|
45
45
|
DISLIKE: "DISLIKE",
|
|
46
46
|
LIKE: "LIKE",
|
|
@@ -167,7 +167,7 @@ const de_GetChatCommand = async (output, context) => {
|
|
|
167
167
|
});
|
|
168
168
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
169
169
|
const doc = (0, smithy_client_1.take)(data, {
|
|
170
|
-
'chat':
|
|
170
|
+
'chat': _ => de_Chat(_, context),
|
|
171
171
|
'history': _ => de_ChatHistory(_, context),
|
|
172
172
|
});
|
|
173
173
|
Object.assign(contents, doc);
|
|
@@ -210,7 +210,7 @@ const de_ListChatsCommand = async (output, context) => {
|
|
|
210
210
|
});
|
|
211
211
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
212
212
|
const doc = (0, smithy_client_1.take)(data, {
|
|
213
|
-
'chats':
|
|
213
|
+
'chats': _ => de_ChatsList(_, context),
|
|
214
214
|
'lastEvaluatedKey': smithy_client_1.expectString,
|
|
215
215
|
});
|
|
216
216
|
Object.assign(contents, doc);
|
|
@@ -301,6 +301,18 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
301
301
|
const de_Document = (output, context) => {
|
|
302
302
|
return output;
|
|
303
303
|
};
|
|
304
|
+
const de_Chat = (output, context) => {
|
|
305
|
+
return (0, smithy_client_1.take)(output, {
|
|
306
|
+
'agentId': smithy_client_1.expectString,
|
|
307
|
+
'createdAt': smithy_client_1.expectString,
|
|
308
|
+
'id': smithy_client_1.expectString,
|
|
309
|
+
'mentions': (_) => de_Document(_, context),
|
|
310
|
+
'options': (_) => de_Document(_, context),
|
|
311
|
+
'target': smithy_client_1.expectString,
|
|
312
|
+
'title': smithy_client_1.expectString,
|
|
313
|
+
'updatedAt': smithy_client_1.expectString,
|
|
314
|
+
});
|
|
315
|
+
};
|
|
304
316
|
const de_ChatHistory = (output, context) => {
|
|
305
317
|
return (0, smithy_client_1.take)(output, {
|
|
306
318
|
'mentions': (_) => de_ChatMentionsList(_, context),
|
|
@@ -320,6 +332,12 @@ const de_ChatMessagesList = (output, context) => {
|
|
|
320
332
|
});
|
|
321
333
|
return retVal;
|
|
322
334
|
};
|
|
335
|
+
const de_ChatsList = (output, context) => {
|
|
336
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
337
|
+
return de_Chat(entry, context);
|
|
338
|
+
});
|
|
339
|
+
return retVal;
|
|
340
|
+
};
|
|
323
341
|
const deserializeMetadata = (output) => ({
|
|
324
342
|
httpStatusCode: output.statusCode,
|
|
325
343
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { WilmaServiceException as __BaseException } from "./WilmaServiceException";
|
|
2
|
-
export class
|
|
3
|
-
name = "
|
|
2
|
+
export class ForbiddenException extends __BaseException {
|
|
3
|
+
name = "ForbiddenException";
|
|
4
4
|
$fault = "client";
|
|
5
5
|
constructor(opts) {
|
|
6
6
|
super({
|
|
7
|
-
name: "
|
|
7
|
+
name: "ForbiddenException",
|
|
8
8
|
$fault: "client",
|
|
9
9
|
...opts
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
export class
|
|
15
|
-
name = "
|
|
14
|
+
export class NotFoundException extends __BaseException {
|
|
15
|
+
name = "NotFoundException";
|
|
16
16
|
$fault = "client";
|
|
17
17
|
constructor(opts) {
|
|
18
18
|
super({
|
|
19
|
-
name: "
|
|
19
|
+
name: "NotFoundException",
|
|
20
20
|
$fault: "client",
|
|
21
21
|
...opts
|
|
22
22
|
});
|
|
23
|
-
Object.setPrototypeOf(this,
|
|
23
|
+
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
export class
|
|
27
|
-
name = "
|
|
26
|
+
export class ValidationException extends __BaseException {
|
|
27
|
+
name = "ValidationException";
|
|
28
28
|
$fault = "client";
|
|
29
29
|
constructor(opts) {
|
|
30
30
|
super({
|
|
31
|
-
name: "
|
|
31
|
+
name: "ValidationException",
|
|
32
32
|
$fault: "client",
|
|
33
33
|
...opts
|
|
34
34
|
});
|
|
35
|
-
Object.setPrototypeOf(this,
|
|
35
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
export const ChatFeedbackScore = {
|
|
@@ -155,7 +155,7 @@ export const de_GetChatCommand = async (output, context) => {
|
|
|
155
155
|
});
|
|
156
156
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
157
157
|
const doc = take(data, {
|
|
158
|
-
'chat':
|
|
158
|
+
'chat': _ => de_Chat(_, context),
|
|
159
159
|
'history': _ => de_ChatHistory(_, context),
|
|
160
160
|
});
|
|
161
161
|
Object.assign(contents, doc);
|
|
@@ -195,7 +195,7 @@ export const de_ListChatsCommand = async (output, context) => {
|
|
|
195
195
|
});
|
|
196
196
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
197
197
|
const doc = take(data, {
|
|
198
|
-
'chats':
|
|
198
|
+
'chats': _ => de_ChatsList(_, context),
|
|
199
199
|
'lastEvaluatedKey': __expectString,
|
|
200
200
|
});
|
|
201
201
|
Object.assign(contents, doc);
|
|
@@ -284,6 +284,18 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
284
284
|
const de_Document = (output, context) => {
|
|
285
285
|
return output;
|
|
286
286
|
};
|
|
287
|
+
const de_Chat = (output, context) => {
|
|
288
|
+
return take(output, {
|
|
289
|
+
'agentId': __expectString,
|
|
290
|
+
'createdAt': __expectString,
|
|
291
|
+
'id': __expectString,
|
|
292
|
+
'mentions': (_) => de_Document(_, context),
|
|
293
|
+
'options': (_) => de_Document(_, context),
|
|
294
|
+
'target': __expectString,
|
|
295
|
+
'title': __expectString,
|
|
296
|
+
'updatedAt': __expectString,
|
|
297
|
+
});
|
|
298
|
+
};
|
|
287
299
|
const de_ChatHistory = (output, context) => {
|
|
288
300
|
return take(output, {
|
|
289
301
|
'mentions': (_) => de_ChatMentionsList(_, context),
|
|
@@ -303,6 +315,12 @@ const de_ChatMessagesList = (output, context) => {
|
|
|
303
315
|
});
|
|
304
316
|
return retVal;
|
|
305
317
|
};
|
|
318
|
+
const de_ChatsList = (output, context) => {
|
|
319
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
320
|
+
return de_Chat(entry, context);
|
|
321
|
+
});
|
|
322
|
+
return retVal;
|
|
323
|
+
};
|
|
306
324
|
const deserializeMetadata = (output) => ({
|
|
307
325
|
httpStatusCode: output.statusCode,
|
|
308
326
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -47,6 +47,8 @@ declare const GetChatCommand_base: {
|
|
|
47
47
|
* // agentId: "STRING_VALUE",
|
|
48
48
|
* // title: "STRING_VALUE",
|
|
49
49
|
* // target: "STRING_VALUE",
|
|
50
|
+
* // options: "DOCUMENT_VALUE",
|
|
51
|
+
* // mentions: "DOCUMENT_VALUE",
|
|
50
52
|
* // createdAt: "STRING_VALUE", // required
|
|
51
53
|
* // updatedAt: "STRING_VALUE",
|
|
52
54
|
* // },
|
|
@@ -48,6 +48,8 @@ declare const ListChatsCommand_base: {
|
|
|
48
48
|
* // agentId: "STRING_VALUE",
|
|
49
49
|
* // title: "STRING_VALUE",
|
|
50
50
|
* // target: "STRING_VALUE",
|
|
51
|
+
* // options: "DOCUMENT_VALUE",
|
|
52
|
+
* // mentions: "DOCUMENT_VALUE",
|
|
51
53
|
* // createdAt: "STRING_VALUE", // required
|
|
52
54
|
* // updatedAt: "STRING_VALUE",
|
|
53
55
|
* // },
|
|
@@ -4,35 +4,35 @@ import { DocumentType as __DocumentType } from "@smithy/types";
|
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export declare class
|
|
8
|
-
readonly name: "
|
|
7
|
+
export declare class ForbiddenException extends __BaseException {
|
|
8
|
+
readonly name: "ForbiddenException";
|
|
9
9
|
readonly $fault: "client";
|
|
10
10
|
/**
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
constructor(opts: __ExceptionOptionType<
|
|
13
|
+
constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
18
|
-
export declare class
|
|
19
|
-
readonly name: "
|
|
18
|
+
export declare class NotFoundException extends __BaseException {
|
|
19
|
+
readonly name: "NotFoundException";
|
|
20
20
|
readonly $fault: "client";
|
|
21
21
|
/**
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
|
-
constructor(opts: __ExceptionOptionType<
|
|
24
|
+
constructor(opts: __ExceptionOptionType<NotFoundException, __BaseException>);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* @public
|
|
28
28
|
*/
|
|
29
|
-
export declare class
|
|
30
|
-
readonly name: "
|
|
29
|
+
export declare class ValidationException extends __BaseException {
|
|
30
|
+
readonly name: "ValidationException";
|
|
31
31
|
readonly $fault: "client";
|
|
32
32
|
/**
|
|
33
33
|
* @internal
|
|
34
34
|
*/
|
|
35
|
-
constructor(opts: __ExceptionOptionType<
|
|
35
|
+
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* @public
|
|
@@ -42,6 +42,8 @@ export interface Chat {
|
|
|
42
42
|
agentId?: string | undefined;
|
|
43
43
|
title?: string | undefined;
|
|
44
44
|
target?: string | undefined;
|
|
45
|
+
options?: __DocumentType | undefined;
|
|
46
|
+
mentions?: __DocumentType | undefined;
|
|
45
47
|
createdAt: string;
|
|
46
48
|
updatedAt?: string | undefined;
|
|
47
49
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-wilma-client",
|
|
3
3
|
"description": "@wildix/wim-wilma-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|