@wildix/xbees-users-client 1.0.11 → 1.0.12
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/protocols/Aws_restJson1.js +68 -4
- package/dist-es/protocols/Aws_restJson1.js +70 -6
- package/dist-types/commands/CreateBotCommand.d.ts +2 -4
- package/dist-types/commands/GetBotCallbackCommand.d.ts +2 -4
- package/dist-types/commands/UpdateBotCallbackCommand.d.ts +4 -8
- package/dist-types/models/models_0.d.ts +4 -13
- package/package.json +1 -1
|
@@ -48,7 +48,7 @@ const se_CreateBotCommand = async (input, context) => {
|
|
|
48
48
|
});
|
|
49
49
|
let body;
|
|
50
50
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
51
|
-
'callback': _ => (
|
|
51
|
+
'callback': _ => se_BotCallback(_, context),
|
|
52
52
|
'name': [],
|
|
53
53
|
'picture': [],
|
|
54
54
|
'searchable': [],
|
|
@@ -212,7 +212,7 @@ const se_UpdateBotCallbackCommand = async (input, context) => {
|
|
|
212
212
|
});
|
|
213
213
|
let body;
|
|
214
214
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
215
|
-
'callback': _ => (
|
|
215
|
+
'callback': _ => se_BotCallback(_, context),
|
|
216
216
|
}));
|
|
217
217
|
b.m("PUT")
|
|
218
218
|
.h(headers)
|
|
@@ -360,7 +360,7 @@ const de_GetBotCallbackCommand = async (output, context) => {
|
|
|
360
360
|
});
|
|
361
361
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
362
362
|
const doc = (0, smithy_client_1.take)(data, {
|
|
363
|
-
'callback':
|
|
363
|
+
'callback': _ => de_BotCallback(_, context),
|
|
364
364
|
});
|
|
365
365
|
Object.assign(contents, doc);
|
|
366
366
|
return contents;
|
|
@@ -420,7 +420,7 @@ const de_UpdateBotCallbackCommand = async (output, context) => {
|
|
|
420
420
|
});
|
|
421
421
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
422
422
|
const doc = (0, smithy_client_1.take)(data, {
|
|
423
|
-
'callback':
|
|
423
|
+
'callback': _ => de_BotCallback(_, context),
|
|
424
424
|
});
|
|
425
425
|
Object.assign(contents, doc);
|
|
426
426
|
return contents;
|
|
@@ -555,6 +555,70 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
|
|
|
555
555
|
});
|
|
556
556
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
557
557
|
};
|
|
558
|
+
const se_Document = (input, context) => {
|
|
559
|
+
return input;
|
|
560
|
+
};
|
|
561
|
+
const se_BotCallback = (input, context) => {
|
|
562
|
+
return (0, smithy_client_1.take)(input, {
|
|
563
|
+
'endpoint': _ => se_BotEndpoint(_, context),
|
|
564
|
+
});
|
|
565
|
+
};
|
|
566
|
+
const se_BotDialogflowCxEndpoint = (input, context) => {
|
|
567
|
+
return (0, smithy_client_1.take)(input, {
|
|
568
|
+
'agent': [],
|
|
569
|
+
'credentials': _ => se_Document(_, context),
|
|
570
|
+
'language': [],
|
|
571
|
+
'location': [],
|
|
572
|
+
});
|
|
573
|
+
};
|
|
574
|
+
const se_BotEndpoint = (input, context) => {
|
|
575
|
+
return models_0_1.BotEndpoint.visit(input, {
|
|
576
|
+
dialogflowCx: value => ({ "dialogflowCx": se_BotDialogflowCxEndpoint(value, context) }),
|
|
577
|
+
openAiAssistant: value => ({ "openAiAssistant": (0, smithy_client_1._json)(value) }),
|
|
578
|
+
sqs: value => ({ "sqs": (0, smithy_client_1._json)(value) }),
|
|
579
|
+
webhook: value => ({ "webhook": (0, smithy_client_1._json)(value) }),
|
|
580
|
+
_: (name, value) => ({ name: value })
|
|
581
|
+
});
|
|
582
|
+
};
|
|
583
|
+
const de_Document = (output, context) => {
|
|
584
|
+
return output;
|
|
585
|
+
};
|
|
586
|
+
const de_BotCallback = (output, context) => {
|
|
587
|
+
return (0, smithy_client_1.take)(output, {
|
|
588
|
+
'endpoint': (_) => de_BotEndpoint((0, smithy_client_1.expectUnion)(_), context),
|
|
589
|
+
});
|
|
590
|
+
};
|
|
591
|
+
const de_BotDialogflowCxEndpoint = (output, context) => {
|
|
592
|
+
return (0, smithy_client_1.take)(output, {
|
|
593
|
+
'agent': smithy_client_1.expectString,
|
|
594
|
+
'credentials': (_) => de_Document(_, context),
|
|
595
|
+
'language': smithy_client_1.expectString,
|
|
596
|
+
'location': smithy_client_1.expectString,
|
|
597
|
+
});
|
|
598
|
+
};
|
|
599
|
+
const de_BotEndpoint = (output, context) => {
|
|
600
|
+
if (output.dialogflowCx != null) {
|
|
601
|
+
return {
|
|
602
|
+
dialogflowCx: de_BotDialogflowCxEndpoint(output.dialogflowCx, context)
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
if (output.openAiAssistant != null) {
|
|
606
|
+
return {
|
|
607
|
+
openAiAssistant: (0, smithy_client_1._json)(output.openAiAssistant)
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
if (output.sqs != null) {
|
|
611
|
+
return {
|
|
612
|
+
sqs: (0, smithy_client_1._json)(output.sqs)
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
if (output.webhook != null) {
|
|
616
|
+
return {
|
|
617
|
+
webhook: (0, smithy_client_1._json)(output.webhook)
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
return { $unknown: Object.entries(output)[0] };
|
|
621
|
+
};
|
|
558
622
|
const deserializeMetadata = (output) => ({
|
|
559
623
|
httpStatusCode: output.statusCode,
|
|
560
624
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UsersServiceException as __BaseException } from "../models/UsersServiceException";
|
|
2
|
-
import { BotApiKeyNotFoundException, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { BotApiKeyNotFoundException, BotEndpoint, BotNotFoundException, BotSecretKeyNotValidException, ForbiddenException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
|
|
6
6
|
const b = rb(input, context);
|
|
7
7
|
const headers = {
|
|
@@ -43,7 +43,7 @@ export const se_CreateBotCommand = async (input, context) => {
|
|
|
43
43
|
});
|
|
44
44
|
let body;
|
|
45
45
|
body = JSON.stringify(take(input, {
|
|
46
|
-
'callback': _ =>
|
|
46
|
+
'callback': _ => se_BotCallback(_, context),
|
|
47
47
|
'name': [],
|
|
48
48
|
'picture': [],
|
|
49
49
|
'searchable': [],
|
|
@@ -198,7 +198,7 @@ export const se_UpdateBotCallbackCommand = async (input, context) => {
|
|
|
198
198
|
});
|
|
199
199
|
let body;
|
|
200
200
|
body = JSON.stringify(take(input, {
|
|
201
|
-
'callback': _ =>
|
|
201
|
+
'callback': _ => se_BotCallback(_, context),
|
|
202
202
|
}));
|
|
203
203
|
b.m("PUT")
|
|
204
204
|
.h(headers)
|
|
@@ -336,7 +336,7 @@ export const de_GetBotCallbackCommand = async (output, context) => {
|
|
|
336
336
|
});
|
|
337
337
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
338
338
|
const doc = take(data, {
|
|
339
|
-
'callback':
|
|
339
|
+
'callback': _ => de_BotCallback(_, context),
|
|
340
340
|
});
|
|
341
341
|
Object.assign(contents, doc);
|
|
342
342
|
return contents;
|
|
@@ -392,7 +392,7 @@ export const de_UpdateBotCallbackCommand = async (output, context) => {
|
|
|
392
392
|
});
|
|
393
393
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
394
394
|
const doc = take(data, {
|
|
395
|
-
'callback':
|
|
395
|
+
'callback': _ => de_BotCallback(_, context),
|
|
396
396
|
});
|
|
397
397
|
Object.assign(contents, doc);
|
|
398
398
|
return contents;
|
|
@@ -524,6 +524,70 @@ const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
|
|
|
524
524
|
});
|
|
525
525
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
526
526
|
};
|
|
527
|
+
const se_Document = (input, context) => {
|
|
528
|
+
return input;
|
|
529
|
+
};
|
|
530
|
+
const se_BotCallback = (input, context) => {
|
|
531
|
+
return take(input, {
|
|
532
|
+
'endpoint': _ => se_BotEndpoint(_, context),
|
|
533
|
+
});
|
|
534
|
+
};
|
|
535
|
+
const se_BotDialogflowCxEndpoint = (input, context) => {
|
|
536
|
+
return take(input, {
|
|
537
|
+
'agent': [],
|
|
538
|
+
'credentials': _ => se_Document(_, context),
|
|
539
|
+
'language': [],
|
|
540
|
+
'location': [],
|
|
541
|
+
});
|
|
542
|
+
};
|
|
543
|
+
const se_BotEndpoint = (input, context) => {
|
|
544
|
+
return BotEndpoint.visit(input, {
|
|
545
|
+
dialogflowCx: value => ({ "dialogflowCx": se_BotDialogflowCxEndpoint(value, context) }),
|
|
546
|
+
openAiAssistant: value => ({ "openAiAssistant": _json(value) }),
|
|
547
|
+
sqs: value => ({ "sqs": _json(value) }),
|
|
548
|
+
webhook: value => ({ "webhook": _json(value) }),
|
|
549
|
+
_: (name, value) => ({ name: value })
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
const de_Document = (output, context) => {
|
|
553
|
+
return output;
|
|
554
|
+
};
|
|
555
|
+
const de_BotCallback = (output, context) => {
|
|
556
|
+
return take(output, {
|
|
557
|
+
'endpoint': (_) => de_BotEndpoint(__expectUnion(_), context),
|
|
558
|
+
});
|
|
559
|
+
};
|
|
560
|
+
const de_BotDialogflowCxEndpoint = (output, context) => {
|
|
561
|
+
return take(output, {
|
|
562
|
+
'agent': __expectString,
|
|
563
|
+
'credentials': (_) => de_Document(_, context),
|
|
564
|
+
'language': __expectString,
|
|
565
|
+
'location': __expectString,
|
|
566
|
+
});
|
|
567
|
+
};
|
|
568
|
+
const de_BotEndpoint = (output, context) => {
|
|
569
|
+
if (output.dialogflowCx != null) {
|
|
570
|
+
return {
|
|
571
|
+
dialogflowCx: de_BotDialogflowCxEndpoint(output.dialogflowCx, context)
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
if (output.openAiAssistant != null) {
|
|
575
|
+
return {
|
|
576
|
+
openAiAssistant: _json(output.openAiAssistant)
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
if (output.sqs != null) {
|
|
580
|
+
return {
|
|
581
|
+
sqs: _json(output.sqs)
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
if (output.webhook != null) {
|
|
585
|
+
return {
|
|
586
|
+
webhook: _json(output.webhook)
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
return { $unknown: Object.entries(output)[0] };
|
|
590
|
+
};
|
|
527
591
|
const deserializeMetadata = (output) => ({
|
|
528
592
|
httpStatusCode: output.statusCode,
|
|
529
593
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -42,12 +42,10 @@ declare const CreateBotCommand_base: {
|
|
|
42
42
|
* callback: { // BotCallback
|
|
43
43
|
* endpoint: { // BotEndpoint Union: only one key present
|
|
44
44
|
* dialogflowCx: { // BotDialogflowCxEndpoint
|
|
45
|
-
*
|
|
46
|
-
*
|
|
45
|
+
* credentials: "DOCUMENT_VALUE", // required
|
|
46
|
+
* agent: "STRING_VALUE", // required
|
|
47
47
|
* location: "STRING_VALUE", // required
|
|
48
48
|
* language: "STRING_VALUE", // required
|
|
49
|
-
* privateKey: "STRING_VALUE", // required
|
|
50
|
-
* clientEmail: "STRING_VALUE",
|
|
51
49
|
* },
|
|
52
50
|
* openAiAssistant: { // BotOpenAiAssistantEndpoint
|
|
53
51
|
* key: "STRING_VALUE", // required
|
|
@@ -44,12 +44,10 @@ declare const GetBotCallbackCommand_base: {
|
|
|
44
44
|
* // callback: { // BotCallback
|
|
45
45
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
46
46
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
47
|
-
* //
|
|
48
|
-
* //
|
|
47
|
+
* // credentials: "DOCUMENT_VALUE", // required
|
|
48
|
+
* // agent: "STRING_VALUE", // required
|
|
49
49
|
* // location: "STRING_VALUE", // required
|
|
50
50
|
* // language: "STRING_VALUE", // required
|
|
51
|
-
* // privateKey: "STRING_VALUE", // required
|
|
52
|
-
* // clientEmail: "STRING_VALUE",
|
|
53
51
|
* // },
|
|
54
52
|
* // openAiAssistant: { // BotOpenAiAssistantEndpoint
|
|
55
53
|
* // key: "STRING_VALUE", // required
|
|
@@ -40,12 +40,10 @@ declare const UpdateBotCallbackCommand_base: {
|
|
|
40
40
|
* callback: { // BotCallback
|
|
41
41
|
* endpoint: { // BotEndpoint Union: only one key present
|
|
42
42
|
* dialogflowCx: { // BotDialogflowCxEndpoint
|
|
43
|
-
*
|
|
44
|
-
*
|
|
43
|
+
* credentials: "DOCUMENT_VALUE", // required
|
|
44
|
+
* agent: "STRING_VALUE", // required
|
|
45
45
|
* location: "STRING_VALUE", // required
|
|
46
46
|
* language: "STRING_VALUE", // required
|
|
47
|
-
* privateKey: "STRING_VALUE", // required
|
|
48
|
-
* clientEmail: "STRING_VALUE",
|
|
49
47
|
* },
|
|
50
48
|
* openAiAssistant: { // BotOpenAiAssistantEndpoint
|
|
51
49
|
* key: "STRING_VALUE", // required
|
|
@@ -69,12 +67,10 @@ declare const UpdateBotCallbackCommand_base: {
|
|
|
69
67
|
* // callback: { // BotCallback
|
|
70
68
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
71
69
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
72
|
-
* //
|
|
73
|
-
* //
|
|
70
|
+
* // credentials: "DOCUMENT_VALUE", // required
|
|
71
|
+
* // agent: "STRING_VALUE", // required
|
|
74
72
|
* // location: "STRING_VALUE", // required
|
|
75
73
|
* // language: "STRING_VALUE", // required
|
|
76
|
-
* // privateKey: "STRING_VALUE", // required
|
|
77
|
-
* // clientEmail: "STRING_VALUE",
|
|
78
74
|
* // },
|
|
79
75
|
* // openAiAssistant: { // BotOpenAiAssistantEndpoint
|
|
80
76
|
* // key: "STRING_VALUE", // required
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UsersServiceException as __BaseException } from "./UsersServiceException";
|
|
2
2
|
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
3
|
+
import { DocumentType as __DocumentType } from "@smithy/types";
|
|
3
4
|
/**
|
|
4
5
|
* @public
|
|
5
6
|
*/
|
|
@@ -109,15 +110,15 @@ export declare class BotApiKeyNotFoundException extends __BaseException {
|
|
|
109
110
|
*/
|
|
110
111
|
export interface BotDialogflowCxEndpoint {
|
|
111
112
|
/**
|
|
112
|
-
* Dialogflow
|
|
113
|
+
* Dialogflow Service Account Credentials
|
|
113
114
|
* @public
|
|
114
115
|
*/
|
|
115
|
-
|
|
116
|
+
credentials: __DocumentType;
|
|
116
117
|
/**
|
|
117
118
|
* Dialogflow Agent Id (example - 88ff4635-0852-4f97-ae44-b19ae9fa6ea1
|
|
118
119
|
* @public
|
|
119
120
|
*/
|
|
120
|
-
|
|
121
|
+
agent: string;
|
|
121
122
|
/**
|
|
122
123
|
* Dialogflow Agent Region (example: europe-west3)
|
|
123
124
|
* @public
|
|
@@ -128,16 +129,6 @@ export interface BotDialogflowCxEndpoint {
|
|
|
128
129
|
* @public
|
|
129
130
|
*/
|
|
130
131
|
language: string;
|
|
131
|
-
/**
|
|
132
|
-
* Service Account Private Key
|
|
133
|
-
* @public
|
|
134
|
-
*/
|
|
135
|
-
privateKey: string;
|
|
136
|
-
/**
|
|
137
|
-
* Service Account Email (example name@fluent-imprint-571.iam.gserviceaccount.com)
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
140
|
-
clientEmail?: string;
|
|
141
132
|
}
|
|
142
133
|
/**
|
|
143
134
|
* @public
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-users-client",
|
|
3
3
|
"description": "@wildix/xbees-users-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.12",
|
|
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",
|