@wildix/xbees-kite-client 1.0.1 → 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/Kite.js CHANGED
@@ -6,6 +6,7 @@ const CreateWidgetCommand_1 = require("./commands/CreateWidgetCommand");
6
6
  const DeleteWidgetCommand_1 = require("./commands/DeleteWidgetCommand");
7
7
  const GetConfigCommand_1 = require("./commands/GetConfigCommand");
8
8
  const GetWidgetCommand_1 = require("./commands/GetWidgetCommand");
9
+ const ListAgentsCommand_1 = require("./commands/ListAgentsCommand");
9
10
  const ListServicesCommand_1 = require("./commands/ListServicesCommand");
10
11
  const ListWidgetsCommand_1 = require("./commands/ListWidgetsCommand");
11
12
  const UpdateWidgetCommand_1 = require("./commands/UpdateWidgetCommand");
@@ -15,6 +16,7 @@ const commands = {
15
16
  DeleteWidgetCommand: DeleteWidgetCommand_1.DeleteWidgetCommand,
16
17
  GetConfigCommand: GetConfigCommand_1.GetConfigCommand,
17
18
  GetWidgetCommand: GetWidgetCommand_1.GetWidgetCommand,
19
+ ListAgentsCommand: ListAgentsCommand_1.ListAgentsCommand,
18
20
  ListServicesCommand: ListServicesCommand_1.ListServicesCommand,
19
21
  ListWidgetsCommand: ListWidgetsCommand_1.ListWidgetsCommand,
20
22
  UpdateWidgetCommand: UpdateWidgetCommand_1.UpdateWidgetCommand,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListAgentsCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class ListAgentsCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Kite", "ListAgents", {})
15
+ .n("KiteClient", "ListAgentsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListAgentsCommand)
18
+ .de(Aws_restJson1_1.de_ListAgentsCommand)
19
+ .build() {
20
+ }
21
+ exports.ListAgentsCommand = ListAgentsCommand;
@@ -5,6 +5,7 @@ tslib_1.__exportStar(require("./CreateWidgetCommand"), exports);
5
5
  tslib_1.__exportStar(require("./DeleteWidgetCommand"), exports);
6
6
  tslib_1.__exportStar(require("./GetConfigCommand"), exports);
7
7
  tslib_1.__exportStar(require("./GetWidgetCommand"), exports);
8
+ tslib_1.__exportStar(require("./ListAgentsCommand"), exports);
8
9
  tslib_1.__exportStar(require("./ListServicesCommand"), exports);
9
10
  tslib_1.__exportStar(require("./ListWidgetsCommand"), exports);
10
11
  tslib_1.__exportStar(require("./UpdateWidgetCommand"), exports);
@@ -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 = {}));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateWidgetCommand = exports.de_ListWidgetsCommand = exports.de_ListServicesCommand = exports.de_GetWidgetCommand = exports.de_GetConfigCommand = exports.de_DeleteWidgetCommand = exports.de_CreateWidgetCommand = exports.se_UpdateWidgetCommand = exports.se_ListWidgetsCommand = exports.se_ListServicesCommand = exports.se_GetWidgetCommand = exports.se_GetConfigCommand = exports.se_DeleteWidgetCommand = exports.se_CreateWidgetCommand = void 0;
3
+ exports.de_UpdateWidgetCommand = exports.de_ListWidgetsCommand = exports.de_ListServicesCommand = exports.de_ListAgentsCommand = exports.de_GetWidgetCommand = exports.de_GetConfigCommand = exports.de_DeleteWidgetCommand = exports.de_CreateWidgetCommand = exports.se_UpdateWidgetCommand = exports.se_ListWidgetsCommand = exports.se_ListServicesCommand = exports.se_ListAgentsCommand = exports.se_GetWidgetCommand = exports.se_GetConfigCommand = exports.se_DeleteWidgetCommand = exports.se_CreateWidgetCommand = void 0;
4
4
  const KiteServiceException_1 = require("../models/KiteServiceException");
5
5
  const models_0_1 = require("../models/models_0");
6
6
  const core_1 = require("@smithy/core");
@@ -46,9 +46,13 @@ const se_GetConfigCommand = async (input, context) => {
46
46
  const headers = {};
47
47
  b.bp("/v2/kite/config/{targetId}");
48
48
  b.p('targetId', () => input.targetId, '{targetId}', false);
49
+ const query = (0, smithy_client_1.map)({
50
+ [_r]: [, input[_tRI]],
51
+ });
49
52
  let body;
50
53
  b.m("GET")
51
54
  .h(headers)
55
+ .q(query)
52
56
  .b(body);
53
57
  return b.build();
54
58
  };
@@ -65,16 +69,37 @@ const se_GetWidgetCommand = async (input, context) => {
65
69
  return b.build();
66
70
  };
67
71
  exports.se_GetWidgetCommand = se_GetWidgetCommand;
68
- const se_ListServicesCommand = async (input, context) => {
72
+ const se_ListAgentsCommand = async (input, context) => {
69
73
  const b = (0, core_1.requestBuilder)(input, context);
70
74
  const headers = {
71
75
  'content-type': 'application/json',
72
76
  };
77
+ b.bp("/v2/kite/agents");
78
+ const query = (0, smithy_client_1.map)({
79
+ [_c]: [, input[_cI]],
80
+ });
81
+ let body;
82
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
83
+ 'filter': _ => (0, smithy_client_1._json)(_),
84
+ }));
85
+ b.m("POST")
86
+ .h(headers)
87
+ .q(query)
88
+ .b(body);
89
+ return b.build();
90
+ };
91
+ exports.se_ListAgentsCommand = se_ListAgentsCommand;
92
+ const se_ListServicesCommand = async (input, context) => {
93
+ const b = (0, core_1.requestBuilder)(input, context);
94
+ const headers = {};
73
95
  b.bp("/v2/kite/services");
96
+ const query = (0, smithy_client_1.map)({
97
+ [_c]: [, input[_cI]],
98
+ });
74
99
  let body;
75
- body = "";
76
100
  b.m("GET")
77
101
  .h(headers)
102
+ .q(query)
78
103
  .b(body);
79
104
  return b.build();
80
105
  };
@@ -175,6 +200,21 @@ const de_GetWidgetCommand = async (output, context) => {
175
200
  return contents;
176
201
  };
177
202
  exports.de_GetWidgetCommand = de_GetWidgetCommand;
203
+ const de_ListAgentsCommand = async (output, context) => {
204
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
205
+ return de_CommandError(output, context);
206
+ }
207
+ const contents = (0, smithy_client_1.map)({
208
+ $metadata: deserializeMetadata(output),
209
+ });
210
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
211
+ const doc = (0, smithy_client_1.take)(data, {
212
+ 'users': smithy_client_1._json,
213
+ });
214
+ Object.assign(contents, doc);
215
+ return contents;
216
+ };
217
+ exports.de_ListAgentsCommand = de_ListAgentsCommand;
178
218
  const de_ListServicesCommand = async (output, context) => {
179
219
  if (output.statusCode !== 200 && output.statusCode >= 300) {
180
220
  return de_CommandError(output, context);
@@ -337,11 +377,13 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
337
377
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
338
378
  const _c = "company";
339
379
  const _cI = "companyId";
380
+ const _r = "route";
340
381
  const _rA = "retryAfter";
341
382
  const _rL = "rateLimit";
342
383
  const _rLR = "rateLimitRemaining";
343
384
  const _rLRa = "rateLimitReset";
344
385
  const _ra = "retry-after";
386
+ const _tRI = "targetRouteId";
345
387
  const _xrl = "x-ratelimit-limit";
346
388
  const _xrr = "x-ratelimit-remaining";
347
389
  const _xrr_ = "x-ratelimit-reset";
package/dist-es/Kite.js CHANGED
@@ -3,6 +3,7 @@ import { CreateWidgetCommand, } from "./commands/CreateWidgetCommand";
3
3
  import { DeleteWidgetCommand, } from "./commands/DeleteWidgetCommand";
4
4
  import { GetConfigCommand, } from "./commands/GetConfigCommand";
5
5
  import { GetWidgetCommand, } from "./commands/GetWidgetCommand";
6
+ import { ListAgentsCommand, } from "./commands/ListAgentsCommand";
6
7
  import { ListServicesCommand, } from "./commands/ListServicesCommand";
7
8
  import { ListWidgetsCommand, } from "./commands/ListWidgetsCommand";
8
9
  import { UpdateWidgetCommand, } from "./commands/UpdateWidgetCommand";
@@ -12,6 +13,7 @@ const commands = {
12
13
  DeleteWidgetCommand,
13
14
  GetConfigCommand,
14
15
  GetWidgetCommand,
16
+ ListAgentsCommand,
15
17
  ListServicesCommand,
16
18
  ListWidgetsCommand,
17
19
  UpdateWidgetCommand,
@@ -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("Kite", "ListAgents", {})
12
+ .n("KiteClient", "ListAgentsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_ListAgentsCommand)
15
+ .de(de_ListAgentsCommand)
16
+ .build() {
17
+ }
@@ -2,6 +2,7 @@ export * from "./CreateWidgetCommand";
2
2
  export * from "./DeleteWidgetCommand";
3
3
  export * from "./GetConfigCommand";
4
4
  export * from "./GetWidgetCommand";
5
+ export * from "./ListAgentsCommand";
5
6
  export * from "./ListServicesCommand";
6
7
  export * from "./ListWidgetsCommand";
7
8
  export * from "./UpdateWidgetCommand";
@@ -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 = {}));
@@ -41,9 +41,13 @@ export const se_GetConfigCommand = async (input, context) => {
41
41
  const headers = {};
42
42
  b.bp("/v2/kite/config/{targetId}");
43
43
  b.p('targetId', () => input.targetId, '{targetId}', false);
44
+ const query = map({
45
+ [_r]: [, input[_tRI]],
46
+ });
44
47
  let body;
45
48
  b.m("GET")
46
49
  .h(headers)
50
+ .q(query)
47
51
  .b(body);
48
52
  return b.build();
49
53
  };
@@ -58,16 +62,36 @@ export const se_GetWidgetCommand = async (input, context) => {
58
62
  .b(body);
59
63
  return b.build();
60
64
  };
61
- export const se_ListServicesCommand = async (input, context) => {
65
+ export const se_ListAgentsCommand = async (input, context) => {
62
66
  const b = rb(input, context);
63
67
  const headers = {
64
68
  'content-type': 'application/json',
65
69
  };
70
+ b.bp("/v2/kite/agents");
71
+ const query = map({
72
+ [_c]: [, input[_cI]],
73
+ });
74
+ let body;
75
+ body = JSON.stringify(take(input, {
76
+ 'filter': _ => _json(_),
77
+ }));
78
+ b.m("POST")
79
+ .h(headers)
80
+ .q(query)
81
+ .b(body);
82
+ return b.build();
83
+ };
84
+ export const se_ListServicesCommand = async (input, context) => {
85
+ const b = rb(input, context);
86
+ const headers = {};
66
87
  b.bp("/v2/kite/services");
88
+ const query = map({
89
+ [_c]: [, input[_cI]],
90
+ });
67
91
  let body;
68
- body = "";
69
92
  b.m("GET")
70
93
  .h(headers)
94
+ .q(query)
71
95
  .b(body);
72
96
  return b.build();
73
97
  };
@@ -161,6 +185,20 @@ export const de_GetWidgetCommand = async (output, context) => {
161
185
  Object.assign(contents, doc);
162
186
  return contents;
163
187
  };
188
+ export const de_ListAgentsCommand = async (output, context) => {
189
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
190
+ return de_CommandError(output, context);
191
+ }
192
+ const contents = map({
193
+ $metadata: deserializeMetadata(output),
194
+ });
195
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
196
+ const doc = take(data, {
197
+ 'users': _json,
198
+ });
199
+ Object.assign(contents, doc);
200
+ return contents;
201
+ };
164
202
  export const de_ListServicesCommand = async (output, context) => {
165
203
  if (output.statusCode !== 200 && output.statusCode >= 300) {
166
204
  return de_CommandError(output, context);
@@ -320,11 +358,13 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
320
358
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
321
359
  const _c = "company";
322
360
  const _cI = "companyId";
361
+ const _r = "route";
323
362
  const _rA = "retryAfter";
324
363
  const _rL = "rateLimit";
325
364
  const _rLR = "rateLimitRemaining";
326
365
  const _rLRa = "rateLimitReset";
327
366
  const _ra = "retry-after";
367
+ const _tRI = "targetRouteId";
328
368
  const _xrl = "x-ratelimit-limit";
329
369
  const _xrr = "x-ratelimit-remaining";
330
370
  const _xrr_ = "x-ratelimit-reset";
@@ -3,6 +3,7 @@ import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/
3
3
  import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
4
4
  import { GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
5
5
  import { GetWidgetCommandInput, GetWidgetCommandOutput } from "./commands/GetWidgetCommand";
6
+ import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
6
7
  import { ListServicesCommandInput, ListServicesCommandOutput } from "./commands/ListServicesCommand";
7
8
  import { ListWidgetsCommandInput, ListWidgetsCommandOutput } from "./commands/ListWidgetsCommand";
8
9
  import { UpdateWidgetCommandInput, UpdateWidgetCommandOutput } from "./commands/UpdateWidgetCommand";
@@ -32,6 +33,12 @@ export interface Kite {
32
33
  getWidget(args: GetWidgetCommandInput, options?: __HttpHandlerOptions): Promise<GetWidgetCommandOutput>;
33
34
  getWidget(args: GetWidgetCommandInput, cb: (err: any, data?: GetWidgetCommandOutput) => void): void;
34
35
  getWidget(args: GetWidgetCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetWidgetCommandOutput) => void): void;
36
+ /**
37
+ * @see {@link ListAgentsCommand}
38
+ */
39
+ listAgents(args: ListAgentsCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentsCommandOutput>;
40
+ listAgents(args: ListAgentsCommandInput, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
41
+ listAgents(args: ListAgentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
35
42
  /**
36
43
  * @see {@link ListServicesCommand}
37
44
  */
@@ -2,6 +2,7 @@ import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/
2
2
  import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
3
3
  import { GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
4
4
  import { GetWidgetCommandInput, GetWidgetCommandOutput } from "./commands/GetWidgetCommand";
5
+ import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
5
6
  import { ListServicesCommandInput, ListServicesCommandOutput } from "./commands/ListServicesCommand";
6
7
  import { ListWidgetsCommandInput, ListWidgetsCommandOutput } from "./commands/ListWidgetsCommand";
7
8
  import { UpdateWidgetCommandInput, UpdateWidgetCommandOutput } from "./commands/UpdateWidgetCommand";
@@ -15,11 +16,11 @@ export { __Client };
15
16
  /**
16
17
  * @public
17
18
  */
18
- export type ServiceInputTypes = CreateWidgetCommandInput | DeleteWidgetCommandInput | GetConfigCommandInput | GetWidgetCommandInput | ListServicesCommandInput | ListWidgetsCommandInput | UpdateWidgetCommandInput;
19
+ export type ServiceInputTypes = CreateWidgetCommandInput | DeleteWidgetCommandInput | GetConfigCommandInput | GetWidgetCommandInput | ListAgentsCommandInput | ListServicesCommandInput | ListWidgetsCommandInput | UpdateWidgetCommandInput;
19
20
  /**
20
21
  * @public
21
22
  */
22
- export type ServiceOutputTypes = CreateWidgetCommandOutput | DeleteWidgetCommandOutput | GetConfigCommandOutput | GetWidgetCommandOutput | ListServicesCommandOutput | ListWidgetsCommandOutput | UpdateWidgetCommandOutput;
23
+ export type ServiceOutputTypes = CreateWidgetCommandOutput | DeleteWidgetCommandOutput | GetConfigCommandOutput | GetWidgetCommandOutput | ListAgentsCommandOutput | ListServicesCommandOutput | ListWidgetsCommandOutput | UpdateWidgetCommandOutput;
23
24
  /**
24
25
  * @public
25
26
  */
@@ -37,6 +37,7 @@ declare const GetConfigCommand_base: {
37
37
  * const client = new KiteClient(config);
38
38
  * const input = { // GetConfigInput
39
39
  * targetId: "STRING_VALUE", // required
40
+ * targetRouteId: "STRING_VALUE",
40
41
  * };
41
42
  * const command = new GetConfigCommand(input);
42
43
  * const response = await client.send(command);
@@ -45,12 +46,24 @@ declare const GetConfigCommand_base: {
45
46
  * // targetId: "STRING_VALUE", // required
46
47
  * // targetRouteId: "STRING_VALUE",
47
48
  * // targetVariant: "group" || "direct",
48
- * // agents: [ // KiteAgentsList
49
- * // { // KiteAgent
49
+ * // agents: [ // UsersList // required
50
+ * // { // User
50
51
  * // id: "STRING_VALUE", // required
51
52
  * // name: "STRING_VALUE",
53
+ * // email: "STRING_VALUE",
54
+ * // phone: "STRING_VALUE",
52
55
  * // picture: "STRING_VALUE",
56
+ * // locale: "STRING_VALUE",
57
+ * // timeZone: "STRING_VALUE",
58
+ * // company: "STRING_VALUE",
53
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",
54
67
  * // },
55
68
  * // ],
56
69
  * // appearance: { // WidgetAppearance
@@ -0,0 +1,94 @@
1
+ import { KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KiteClient";
2
+ import { ListAgentsInput, ListAgentsOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListAgentsCommand}.
14
+ */
15
+ export interface ListAgentsCommandInput extends ListAgentsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListAgentsCommand}.
21
+ */
22
+ export interface ListAgentsCommandOutput extends ListAgentsOutput, __MetadataBearer {
23
+ }
24
+ declare const ListAgentsCommand_base: {
25
+ new (input: ListAgentsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAgentsCommandInput, ListAgentsCommandOutput, KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: ListAgentsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAgentsCommandInput, ListAgentsCommandOutput, KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * @public
31
+ *
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { KiteClient, ListAgentsCommand } from "@wildix/xbees-kite-client"; // ES Modules import
36
+ * // const { KiteClient, ListAgentsCommand } = require("@wildix/xbees-kite-client"); // CommonJS import
37
+ * const client = new KiteClient(config);
38
+ * const input = { // ListAgentsInput
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
+ * },
49
+ * };
50
+ * const command = new ListAgentsCommand(input);
51
+ * const response = await client.send(command);
52
+ * // { // ListAgentsOutput
53
+ * // users: [ // UsersList // required
54
+ * // { // User
55
+ * // id: "STRING_VALUE", // required
56
+ * // name: "STRING_VALUE",
57
+ * // email: "STRING_VALUE",
58
+ * // phone: "STRING_VALUE",
59
+ * // picture: "STRING_VALUE",
60
+ * // locale: "STRING_VALUE",
61
+ * // timeZone: "STRING_VALUE",
62
+ * // company: "STRING_VALUE",
63
+ * // bot: true || false,
64
+ * // pbxDomain: "STRING_VALUE",
65
+ * // pbxPort: "STRING_VALUE",
66
+ * // pbxExtension: "STRING_VALUE",
67
+ * // pbxSerial: "STRING_VALUE",
68
+ * // pbxUserId: "STRING_VALUE",
69
+ * // createdAt: "STRING_VALUE",
70
+ * // updatedAt: "STRING_VALUE",
71
+ * // },
72
+ * // ],
73
+ * // };
74
+ *
75
+ * ```
76
+ *
77
+ * @param ListAgentsCommandInput - {@link ListAgentsCommandInput}
78
+ * @returns {@link ListAgentsCommandOutput}
79
+ * @see {@link ListAgentsCommandInput} for command's `input` shape.
80
+ * @see {@link ListAgentsCommandOutput} for command's `response` shape.
81
+ * @see {@link KiteClientResolvedConfig | config} for KiteClient's `config` shape.
82
+ *
83
+ * @throws {@link ValidationException} (client fault)
84
+ *
85
+ * @throws {@link ForbiddenException} (client fault)
86
+ *
87
+ * @throws {@link LimitExceededException} (client fault)
88
+ *
89
+ * @throws {@link KiteServiceException}
90
+ * <p>Base exception class for all service exceptions from Kite service.</p>
91
+ *
92
+ */
93
+ export declare class ListAgentsCommand extends ListAgentsCommand_base {
94
+ }
@@ -35,34 +35,20 @@ declare const ListServicesCommand_base: {
35
35
  * import { KiteClient, ListServicesCommand } from "@wildix/xbees-kite-client"; // ES Modules import
36
36
  * // const { KiteClient, ListServicesCommand } = require("@wildix/xbees-kite-client"); // CommonJS import
37
37
  * const client = new KiteClient(config);
38
- * const input = {};
38
+ * const input = { // ListServicesInput
39
+ * companyId: "STRING_VALUE",
40
+ * };
39
41
  * const command = new ListServicesCommand(input);
40
42
  * const response = await client.send(command);
41
43
  * // { // ListServicesOutput
42
44
  * // services: [ // ServicesList // required
43
45
  * // { // Service
44
46
  * // id: Number("int"), // required
47
+ * // uri: "STRING_VALUE", // required
45
48
  * // title: "STRING_VALUE", // required
46
49
  * // settings: {},
47
- * // members: [ // UsersList // required
48
- * // { // User
49
- * // id: "STRING_VALUE", // required
50
- * // name: "STRING_VALUE",
51
- * // email: "STRING_VALUE",
52
- * // phone: "STRING_VALUE",
53
- * // picture: "STRING_VALUE",
54
- * // locale: "STRING_VALUE",
55
- * // timeZone: "STRING_VALUE",
56
- * // company: "STRING_VALUE",
57
- * // bot: true || false,
58
- * // pbxDomain: "STRING_VALUE",
59
- * // pbxPort: "STRING_VALUE",
60
- * // pbxExtension: "STRING_VALUE",
61
- * // pbxSerial: "STRING_VALUE",
62
- * // pbxUserId: "STRING_VALUE",
63
- * // createdAt: "STRING_VALUE",
64
- * // updatedAt: "STRING_VALUE",
65
- * // },
50
+ * // extensions: [ // ExtensionsList // required
51
+ * // "STRING_VALUE",
66
52
  * // ],
67
53
  * // pbx: { // ServicePbx
68
54
  * // domain: "STRING_VALUE", // required
@@ -2,6 +2,7 @@ export * from "./CreateWidgetCommand";
2
2
  export * from "./DeleteWidgetCommand";
3
3
  export * from "./GetConfigCommand";
4
4
  export * from "./GetWidgetCommand";
5
+ export * from "./ListAgentsCommand";
5
6
  export * from "./ListServicesCommand";
6
7
  export * from "./ListWidgetsCommand";
7
8
  export * from "./UpdateWidgetCommand";
@@ -411,19 +411,15 @@ export interface DeleteWidgetOutput {
411
411
  */
412
412
  export interface GetConfigInput {
413
413
  /**
414
- * TODO
414
+ * The unique identifier of the Kite widget or email of the agent (example: 36cv69ao or vadim.ruban@wildix.com).
415
415
  * @public
416
416
  */
417
417
  targetId: string;
418
- }
419
- /**
420
- * @public
421
- */
422
- export interface KiteAgent {
423
- id: string;
424
- name?: string;
425
- picture?: string;
426
- bot?: boolean;
418
+ /**
419
+ * The unique identifier of the route for time-based configuration.
420
+ * @public
421
+ */
422
+ targetRouteId?: string;
427
423
  }
428
424
  /**
429
425
  * @public
@@ -463,7 +459,7 @@ export interface KiteConfig {
463
459
  */
464
460
  targetRouteId?: string;
465
461
  targetVariant?: KiteVariant;
466
- agents?: (KiteAgent)[];
462
+ agents: (User)[];
467
463
  /**
468
464
  * The appearance settings like color scheme or custom texts.
469
465
  * @public
@@ -524,10 +520,91 @@ export declare class WidgetNotFoundException extends __BaseException {
524
520
  */
525
521
  constructor(opts: __ExceptionOptionType<WidgetNotFoundException, __BaseException>);
526
522
  }
523
+ /**
524
+ * @public
525
+ */
526
+ export type ListAgentsFilter = ListAgentsFilter.EmailsMember | ListAgentsFilter.ExtensionsMember | ListAgentsFilter.ServiceMember | ListAgentsFilter.$UnknownMember;
527
+ /**
528
+ * @public
529
+ */
530
+ export declare namespace ListAgentsFilter {
531
+ /**
532
+ * The unique identifier of the service which represent URI (example - 2@example.wildixin.com:443).
533
+ * @public
534
+ */
535
+ interface ServiceMember {
536
+ service: string;
537
+ extensions?: never;
538
+ emails?: never;
539
+ $unknown?: never;
540
+ }
541
+ /**
542
+ * A list of extensions that could be used inside Kite based conversation.
543
+ * @public
544
+ */
545
+ interface ExtensionsMember {
546
+ service?: never;
547
+ extensions: (string)[];
548
+ emails?: never;
549
+ $unknown?: never;
550
+ }
551
+ /**
552
+ * A list of emails that could be used inside Kite based conversation.
553
+ * @public
554
+ */
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;
592
+ }
593
+ /**
594
+ * @public
595
+ */
596
+ export interface ListAgentsOutput {
597
+ users: (User)[];
598
+ }
527
599
  /**
528
600
  * @public
529
601
  */
530
602
  export interface ListServicesInput {
603
+ /**
604
+ * The unique identifier of the organization when a service token is used.
605
+ * @public
606
+ */
607
+ companyId?: string;
531
608
  }
532
609
  /**
533
610
  * @public
@@ -546,9 +623,10 @@ export interface ServiceSettings {
546
623
  */
547
624
  export interface Service {
548
625
  id: number;
626
+ uri: string;
549
627
  title: string;
550
628
  settings: ServiceSettings;
551
- members: (User)[];
629
+ extensions: (string)[];
552
630
  pbx: ServicePbx;
553
631
  }
554
632
  /**
@@ -2,6 +2,7 @@ import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "../commands
2
2
  import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "../commands/DeleteWidgetCommand";
3
3
  import { GetConfigCommandInput, GetConfigCommandOutput } from "../commands/GetConfigCommand";
4
4
  import { GetWidgetCommandInput, GetWidgetCommandOutput } from "../commands/GetWidgetCommand";
5
+ import { ListAgentsCommandInput, ListAgentsCommandOutput } from "../commands/ListAgentsCommand";
5
6
  import { ListServicesCommandInput, ListServicesCommandOutput } from "../commands/ListServicesCommand";
6
7
  import { ListWidgetsCommandInput, ListWidgetsCommandOutput } from "../commands/ListWidgetsCommand";
7
8
  import { UpdateWidgetCommandInput, UpdateWidgetCommandOutput } from "../commands/UpdateWidgetCommand";
@@ -23,6 +24,10 @@ export declare const se_GetConfigCommand: (input: GetConfigCommandInput, context
23
24
  * serializeAws_restJson1GetWidgetCommand
24
25
  */
25
26
  export declare const se_GetWidgetCommand: (input: GetWidgetCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
27
+ /**
28
+ * serializeAws_restJson1ListAgentsCommand
29
+ */
30
+ export declare const se_ListAgentsCommand: (input: ListAgentsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
26
31
  /**
27
32
  * serializeAws_restJson1ListServicesCommand
28
33
  */
@@ -51,6 +56,10 @@ export declare const de_GetConfigCommand: (output: __HttpResponse, context: __Se
51
56
  * deserializeAws_restJson1GetWidgetCommand
52
57
  */
53
58
  export declare const de_GetWidgetCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetWidgetCommandOutput>;
59
+ /**
60
+ * deserializeAws_restJson1ListAgentsCommand
61
+ */
62
+ export declare const de_ListAgentsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListAgentsCommandOutput>;
54
63
  /**
55
64
  * deserializeAws_restJson1ListServicesCommand
56
65
  */
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.1",
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",
@@ -75,4 +75,4 @@
75
75
  "react-native": {
76
76
  "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
77
77
  }
78
- }
78
+ }