@wildix/xbees-kite-client 1.0.2 → 1.0.3
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 +13 -1
- package/dist-cjs/protocols/Aws_restJson1.js +5 -3
- package/dist-es/models/models_0.js +12 -0
- package/dist-es/protocols/Aws_restJson1.js +5 -3
- package/dist-types/Kite.d.ts +0 -1
- package/dist-types/commands/GetConfigCommand.d.ts +14 -2
- package/dist-types/commands/ListAgentsCommand.d.ts +11 -8
- package/dist-types/models/models_0.d.ts +56 -15
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WidgetNotFoundException = exports.TargetNotFoundException = exports.KiteVariant = exports.KiteFeatures = exports.WidgetTarget = exports.WidgetRouteRule = exports.WidgetRouteTimeFrameDay = exports.LimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
3
|
+
exports.ListAgentsFilter = exports.WidgetNotFoundException = exports.TargetNotFoundException = exports.KiteVariant = exports.KiteFeatures = exports.WidgetTarget = exports.WidgetRouteRule = exports.WidgetRouteTimeFrameDay = exports.LimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
4
4
|
const KiteServiceException_1 = require("./KiteServiceException");
|
|
5
5
|
class ValidationException extends KiteServiceException_1.KiteServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -110,3 +110,15 @@ class WidgetNotFoundException extends KiteServiceException_1.KiteServiceExceptio
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
exports.WidgetNotFoundException = WidgetNotFoundException;
|
|
113
|
+
var ListAgentsFilter;
|
|
114
|
+
(function (ListAgentsFilter) {
|
|
115
|
+
ListAgentsFilter.visit = (value, visitor) => {
|
|
116
|
+
if (value.service !== undefined)
|
|
117
|
+
return visitor.service(value.service);
|
|
118
|
+
if (value.extensions !== undefined)
|
|
119
|
+
return visitor.extensions(value.extensions);
|
|
120
|
+
if (value.emails !== undefined)
|
|
121
|
+
return visitor.emails(value.emails);
|
|
122
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
123
|
+
};
|
|
124
|
+
})(ListAgentsFilter = exports.ListAgentsFilter || (exports.ListAgentsFilter = {}));
|
|
@@ -75,14 +75,16 @@ const se_ListAgentsCommand = async (input, context) => {
|
|
|
75
75
|
'content-type': 'application/json',
|
|
76
76
|
};
|
|
77
77
|
b.bp("/v2/kite/agents");
|
|
78
|
+
const query = (0, smithy_client_1.map)({
|
|
79
|
+
[_c]: [, input[_cI]],
|
|
80
|
+
});
|
|
78
81
|
let body;
|
|
79
82
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
80
|
-
'
|
|
81
|
-
'extensions': _ => (0, smithy_client_1._json)(_),
|
|
82
|
-
'service': [],
|
|
83
|
+
'filter': _ => (0, smithy_client_1._json)(_),
|
|
83
84
|
}));
|
|
84
85
|
b.m("POST")
|
|
85
86
|
.h(headers)
|
|
87
|
+
.q(query)
|
|
86
88
|
.b(body);
|
|
87
89
|
return b.build();
|
|
88
90
|
};
|
|
@@ -102,3 +102,15 @@ export class WidgetNotFoundException extends __BaseException {
|
|
|
102
102
|
Object.setPrototypeOf(this, WidgetNotFoundException.prototype);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
export var ListAgentsFilter;
|
|
106
|
+
(function (ListAgentsFilter) {
|
|
107
|
+
ListAgentsFilter.visit = (value, visitor) => {
|
|
108
|
+
if (value.service !== undefined)
|
|
109
|
+
return visitor.service(value.service);
|
|
110
|
+
if (value.extensions !== undefined)
|
|
111
|
+
return visitor.extensions(value.extensions);
|
|
112
|
+
if (value.emails !== undefined)
|
|
113
|
+
return visitor.emails(value.emails);
|
|
114
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
115
|
+
};
|
|
116
|
+
})(ListAgentsFilter || (ListAgentsFilter = {}));
|
|
@@ -68,14 +68,16 @@ export const se_ListAgentsCommand = async (input, context) => {
|
|
|
68
68
|
'content-type': 'application/json',
|
|
69
69
|
};
|
|
70
70
|
b.bp("/v2/kite/agents");
|
|
71
|
+
const query = map({
|
|
72
|
+
[_c]: [, input[_cI]],
|
|
73
|
+
});
|
|
71
74
|
let body;
|
|
72
75
|
body = JSON.stringify(take(input, {
|
|
73
|
-
'
|
|
74
|
-
'extensions': _ => _json(_),
|
|
75
|
-
'service': [],
|
|
76
|
+
'filter': _ => _json(_),
|
|
76
77
|
}));
|
|
77
78
|
b.m("POST")
|
|
78
79
|
.h(headers)
|
|
80
|
+
.q(query)
|
|
79
81
|
.b(body);
|
|
80
82
|
return b.build();
|
|
81
83
|
};
|
package/dist-types/Kite.d.ts
CHANGED
|
@@ -36,7 +36,6 @@ export interface Kite {
|
|
|
36
36
|
/**
|
|
37
37
|
* @see {@link ListAgentsCommand}
|
|
38
38
|
*/
|
|
39
|
-
listAgents(): Promise<ListAgentsCommandOutput>;
|
|
40
39
|
listAgents(args: ListAgentsCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentsCommandOutput>;
|
|
41
40
|
listAgents(args: ListAgentsCommandInput, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
|
|
42
41
|
listAgents(args: ListAgentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
|
|
@@ -46,12 +46,24 @@ declare const GetConfigCommand_base: {
|
|
|
46
46
|
* // targetId: "STRING_VALUE", // required
|
|
47
47
|
* // targetRouteId: "STRING_VALUE",
|
|
48
48
|
* // targetVariant: "group" || "direct",
|
|
49
|
-
* // agents: [ //
|
|
50
|
-
* // { //
|
|
49
|
+
* // agents: [ // UsersList // required
|
|
50
|
+
* // { // User
|
|
51
51
|
* // id: "STRING_VALUE", // required
|
|
52
52
|
* // name: "STRING_VALUE",
|
|
53
|
+
* // email: "STRING_VALUE",
|
|
54
|
+
* // phone: "STRING_VALUE",
|
|
53
55
|
* // picture: "STRING_VALUE",
|
|
56
|
+
* // locale: "STRING_VALUE",
|
|
57
|
+
* // timeZone: "STRING_VALUE",
|
|
58
|
+
* // company: "STRING_VALUE",
|
|
54
59
|
* // bot: true || false,
|
|
60
|
+
* // pbxDomain: "STRING_VALUE",
|
|
61
|
+
* // pbxPort: "STRING_VALUE",
|
|
62
|
+
* // pbxExtension: "STRING_VALUE",
|
|
63
|
+
* // pbxSerial: "STRING_VALUE",
|
|
64
|
+
* // pbxUserId: "STRING_VALUE",
|
|
65
|
+
* // createdAt: "STRING_VALUE",
|
|
66
|
+
* // updatedAt: "STRING_VALUE",
|
|
55
67
|
* // },
|
|
56
68
|
* // ],
|
|
57
69
|
* // appearance: { // WidgetAppearance
|
|
@@ -23,7 +23,7 @@ export interface ListAgentsCommandOutput extends ListAgentsOutput, __MetadataBea
|
|
|
23
23
|
}
|
|
24
24
|
declare const ListAgentsCommand_base: {
|
|
25
25
|
new (input: ListAgentsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAgentsCommandInput, ListAgentsCommandOutput, KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
-
new (
|
|
26
|
+
new (__0_0: ListAgentsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAgentsCommandInput, ListAgentsCommandOutput, KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -36,13 +36,16 @@ declare const ListAgentsCommand_base: {
|
|
|
36
36
|
* // const { KiteClient, ListAgentsCommand } = require("@wildix/xbees-kite-client"); // CommonJS import
|
|
37
37
|
* const client = new KiteClient(config);
|
|
38
38
|
* const input = { // ListAgentsInput
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* "STRING_VALUE",
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
39
|
+
* companyId: "STRING_VALUE",
|
|
40
|
+
* filter: { // ListAgentsFilter Union: only one key present
|
|
41
|
+
* service: "STRING_VALUE",
|
|
42
|
+
* extensions: [ // ExtensionsList
|
|
43
|
+
* "STRING_VALUE",
|
|
44
|
+
* ],
|
|
45
|
+
* emails: [ // EmailsList
|
|
46
|
+
* "STRING_VALUE",
|
|
47
|
+
* ],
|
|
48
|
+
* },
|
|
46
49
|
* };
|
|
47
50
|
* const command = new ListAgentsCommand(input);
|
|
48
51
|
* const response = await client.send(command);
|
|
@@ -421,15 +421,6 @@ export interface GetConfigInput {
|
|
|
421
421
|
*/
|
|
422
422
|
targetRouteId?: string;
|
|
423
423
|
}
|
|
424
|
-
/**
|
|
425
|
-
* @public
|
|
426
|
-
*/
|
|
427
|
-
export interface KiteAgent {
|
|
428
|
-
id: string;
|
|
429
|
-
name?: string;
|
|
430
|
-
picture?: string;
|
|
431
|
-
bot?: boolean;
|
|
432
|
-
}
|
|
433
424
|
/**
|
|
434
425
|
* @public
|
|
435
426
|
* @enum
|
|
@@ -468,7 +459,7 @@ export interface KiteConfig {
|
|
|
468
459
|
*/
|
|
469
460
|
targetRouteId?: string;
|
|
470
461
|
targetVariant?: KiteVariant;
|
|
471
|
-
agents
|
|
462
|
+
agents: (User)[];
|
|
472
463
|
/**
|
|
473
464
|
* The appearance settings like color scheme or custom texts.
|
|
474
465
|
* @public
|
|
@@ -532,22 +523,72 @@ export declare class WidgetNotFoundException extends __BaseException {
|
|
|
532
523
|
/**
|
|
533
524
|
* @public
|
|
534
525
|
*/
|
|
535
|
-
export
|
|
526
|
+
export type ListAgentsFilter = ListAgentsFilter.EmailsMember | ListAgentsFilter.ExtensionsMember | ListAgentsFilter.ServiceMember | ListAgentsFilter.$UnknownMember;
|
|
527
|
+
/**
|
|
528
|
+
* @public
|
|
529
|
+
*/
|
|
530
|
+
export declare namespace ListAgentsFilter {
|
|
536
531
|
/**
|
|
537
|
-
* The unique identifier of the service.
|
|
532
|
+
* The unique identifier of the service which represent URI (example - 2@example.wildixin.com:443).
|
|
538
533
|
* @public
|
|
539
534
|
*/
|
|
540
|
-
|
|
535
|
+
interface ServiceMember {
|
|
536
|
+
service: string;
|
|
537
|
+
extensions?: never;
|
|
538
|
+
emails?: never;
|
|
539
|
+
$unknown?: never;
|
|
540
|
+
}
|
|
541
541
|
/**
|
|
542
542
|
* A list of extensions that could be used inside Kite based conversation.
|
|
543
543
|
* @public
|
|
544
544
|
*/
|
|
545
|
-
|
|
545
|
+
interface ExtensionsMember {
|
|
546
|
+
service?: never;
|
|
547
|
+
extensions: (string)[];
|
|
548
|
+
emails?: never;
|
|
549
|
+
$unknown?: never;
|
|
550
|
+
}
|
|
546
551
|
/**
|
|
547
552
|
* A list of emails that could be used inside Kite based conversation.
|
|
548
553
|
* @public
|
|
549
554
|
*/
|
|
550
|
-
|
|
555
|
+
interface EmailsMember {
|
|
556
|
+
service?: never;
|
|
557
|
+
extensions?: never;
|
|
558
|
+
emails: (string)[];
|
|
559
|
+
$unknown?: never;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* @public
|
|
563
|
+
*/
|
|
564
|
+
interface $UnknownMember {
|
|
565
|
+
service?: never;
|
|
566
|
+
extensions?: never;
|
|
567
|
+
emails?: never;
|
|
568
|
+
$unknown: [string, any];
|
|
569
|
+
}
|
|
570
|
+
interface Visitor<T> {
|
|
571
|
+
service: (value: string) => T;
|
|
572
|
+
extensions: (value: (string)[]) => T;
|
|
573
|
+
emails: (value: (string)[]) => T;
|
|
574
|
+
_: (name: string, value: any) => T;
|
|
575
|
+
}
|
|
576
|
+
const visit: <T>(value: ListAgentsFilter, visitor: Visitor<T>) => T;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* @public
|
|
580
|
+
*/
|
|
581
|
+
export interface ListAgentsInput {
|
|
582
|
+
/**
|
|
583
|
+
* The unique identifier of the organization when a service token is used.
|
|
584
|
+
* @public
|
|
585
|
+
*/
|
|
586
|
+
companyId?: string;
|
|
587
|
+
/**
|
|
588
|
+
* The filter to be used to query agents.
|
|
589
|
+
* @public
|
|
590
|
+
*/
|
|
591
|
+
filter: ListAgentsFilter;
|
|
551
592
|
}
|
|
552
593
|
/**
|
|
553
594
|
* @public
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-kite-client",
|
|
3
3
|
"description": "@wildix/xbees-kite-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
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",
|