@wildix/xbees-kite-client 1.0.2 → 1.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/KiteClient.js +7 -2
- package/dist-cjs/models/models_0.js +18 -6
- package/dist-cjs/protocols/Aws_restJson1.js +10 -8
- package/dist-es/KiteClient.js +7 -2
- package/dist-es/models/models_0.js +16 -4
- package/dist-es/protocols/Aws_restJson1.js +11 -9
- package/dist-types/Kite.d.ts +0 -1
- package/dist-types/KiteClient.d.ts +3 -2
- package/dist-types/commands/CreateWidgetCommand.d.ts +1 -1
- package/dist-types/commands/DeleteWidgetCommand.d.ts +1 -1
- package/dist-types/commands/GetConfigCommand.d.ts +20 -4
- package/dist-types/commands/GetWidgetCommand.d.ts +1 -1
- package/dist-types/commands/ListAgentsCommand.d.ts +12 -9
- package/dist-types/commands/ListServicesCommand.d.ts +1 -1
- package/dist-types/commands/ListWidgetsCommand.d.ts +1 -1
- package/dist-types/commands/UpdateWidgetCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +68 -19
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/package.json +1 -1
package/dist-cjs/KiteClient.js
CHANGED
|
@@ -4,6 +4,8 @@ exports.KiteClient = exports.__Client = void 0;
|
|
|
4
4
|
const runtimeConfig_1 = require("./runtimeConfig");
|
|
5
5
|
const runtimeExtensions_1 = require("./runtimeExtensions");
|
|
6
6
|
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
7
|
+
const middleware_content_length_1 = require("@smithy/middleware-content-length");
|
|
8
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
7
9
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
10
|
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
9
11
|
const smithy_utils_1 = require("@wildix/smithy-utils");
|
|
@@ -11,7 +13,8 @@ class KiteClient extends smithy_client_1.Client {
|
|
|
11
13
|
constructor(...[configuration]) {
|
|
12
14
|
let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
13
15
|
let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
|
|
14
|
-
let _config_2 = (0,
|
|
16
|
+
let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
|
|
17
|
+
let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
|
|
15
18
|
const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `api-${configuration.env}.x-bees.com` : 'api.x-bees.com';
|
|
16
19
|
const endpoint = () => {
|
|
17
20
|
return {
|
|
@@ -22,13 +25,15 @@ class KiteClient extends smithy_client_1.Client {
|
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
27
|
const config = {
|
|
25
|
-
...
|
|
28
|
+
..._config_3,
|
|
26
29
|
endpoint,
|
|
27
30
|
};
|
|
28
31
|
super(config);
|
|
29
32
|
this.config = config;
|
|
30
33
|
this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
31
34
|
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
|
35
|
+
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
36
|
+
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
|
32
37
|
}
|
|
33
38
|
destroy() {
|
|
34
39
|
super.destroy();
|
|
@@ -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.
|
|
3
|
+
exports.ListAgentsFilter = exports.WidgetNotFoundException = exports.TargetNotFoundException = exports.KiteVariant = exports.KiteFeatures = exports.WidgetTarget = exports.WidgetRouteRule = exports.WidgetRouteTimeFrameDay = exports.RateLimitExceededException = 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) {
|
|
@@ -28,23 +28,23 @@ class ForbiddenException extends KiteServiceException_1.KiteServiceException {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.ForbiddenException = ForbiddenException;
|
|
31
|
-
class
|
|
31
|
+
class RateLimitExceededException extends KiteServiceException_1.KiteServiceException {
|
|
32
32
|
constructor(opts) {
|
|
33
33
|
super({
|
|
34
|
-
name: "
|
|
34
|
+
name: "RateLimitExceededException",
|
|
35
35
|
$fault: "client",
|
|
36
36
|
...opts
|
|
37
37
|
});
|
|
38
|
-
this.name = "
|
|
38
|
+
this.name = "RateLimitExceededException";
|
|
39
39
|
this.$fault = "client";
|
|
40
|
-
Object.setPrototypeOf(this,
|
|
40
|
+
Object.setPrototypeOf(this, RateLimitExceededException.prototype);
|
|
41
41
|
this.rateLimit = opts.rateLimit;
|
|
42
42
|
this.rateLimitRemaining = opts.rateLimitRemaining;
|
|
43
43
|
this.rateLimitReset = opts.rateLimitReset;
|
|
44
44
|
this.retryAfter = opts.retryAfter;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
exports.
|
|
47
|
+
exports.RateLimitExceededException = RateLimitExceededException;
|
|
48
48
|
exports.WidgetRouteTimeFrameDay = {
|
|
49
49
|
EVERY_DAY: "EVERY_DAY",
|
|
50
50
|
FRIDAY: "FRIDAY",
|
|
@@ -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
|
};
|
|
@@ -268,9 +270,9 @@ const de_CommandError = async (output, context) => {
|
|
|
268
270
|
case "ForbiddenException":
|
|
269
271
|
case "smithy.framework#ForbiddenException":
|
|
270
272
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
271
|
-
case "
|
|
272
|
-
case "smithy.framework#
|
|
273
|
-
throw await
|
|
273
|
+
case "RateLimitExceededException":
|
|
274
|
+
case "smithy.framework#RateLimitExceededException":
|
|
275
|
+
throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
|
|
274
276
|
case "ValidationException":
|
|
275
277
|
case "smithy.framework#ValidationException":
|
|
276
278
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -303,7 +305,7 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
|
303
305
|
});
|
|
304
306
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
305
307
|
};
|
|
306
|
-
const
|
|
308
|
+
const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
307
309
|
const contents = (0, smithy_client_1.map)({
|
|
308
310
|
[_rL]: [, parsedOutput.headers[_xrl]],
|
|
309
311
|
[_rLR]: [() => void 0 !== parsedOutput.headers[_xrr], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_xrr])],
|
|
@@ -315,7 +317,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
315
317
|
'message': smithy_client_1.expectString,
|
|
316
318
|
});
|
|
317
319
|
Object.assign(contents, doc);
|
|
318
|
-
const exception = new models_0_1.
|
|
320
|
+
const exception = new models_0_1.RateLimitExceededException({
|
|
319
321
|
$metadata: deserializeMetadata(parsedOutput),
|
|
320
322
|
...contents
|
|
321
323
|
});
|
package/dist-es/KiteClient.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
2
2
|
import { resolveRuntimeExtensions, } from "./runtimeExtensions";
|
|
3
3
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
4
|
+
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
5
|
+
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
|
|
4
6
|
import { Client as __Client, } from "@smithy/smithy-client";
|
|
5
7
|
import { authorizationMiddleware } from '@wildix/smithy-utils';
|
|
6
8
|
export { __Client };
|
|
@@ -8,7 +10,8 @@ export class KiteClient extends __Client {
|
|
|
8
10
|
constructor(...[configuration]) {
|
|
9
11
|
let _config_0 = __getRuntimeConfig(configuration || {});
|
|
10
12
|
let _config_1 = resolveUserAgentConfig(_config_0);
|
|
11
|
-
let _config_2 =
|
|
13
|
+
let _config_2 = resolveRetryConfig(_config_1);
|
|
14
|
+
let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
|
|
12
15
|
const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `api-${configuration.env}.x-bees.com` : 'api.x-bees.com';
|
|
13
16
|
const endpoint = () => {
|
|
14
17
|
return {
|
|
@@ -19,13 +22,15 @@ export class KiteClient extends __Client {
|
|
|
19
22
|
};
|
|
20
23
|
};
|
|
21
24
|
const config = {
|
|
22
|
-
...
|
|
25
|
+
..._config_3,
|
|
23
26
|
endpoint,
|
|
24
27
|
};
|
|
25
28
|
super(config);
|
|
26
29
|
this.config = config;
|
|
27
30
|
this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
28
31
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
29
34
|
}
|
|
30
35
|
destroy() {
|
|
31
36
|
super.destroy();
|
|
@@ -23,16 +23,16 @@ export class ForbiddenException extends __BaseException {
|
|
|
23
23
|
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
export class
|
|
26
|
+
export class RateLimitExceededException extends __BaseException {
|
|
27
27
|
constructor(opts) {
|
|
28
28
|
super({
|
|
29
|
-
name: "
|
|
29
|
+
name: "RateLimitExceededException",
|
|
30
30
|
$fault: "client",
|
|
31
31
|
...opts
|
|
32
32
|
});
|
|
33
|
-
this.name = "
|
|
33
|
+
this.name = "RateLimitExceededException";
|
|
34
34
|
this.$fault = "client";
|
|
35
|
-
Object.setPrototypeOf(this,
|
|
35
|
+
Object.setPrototypeOf(this, RateLimitExceededException.prototype);
|
|
36
36
|
this.rateLimit = opts.rateLimit;
|
|
37
37
|
this.rateLimitRemaining = opts.rateLimitRemaining;
|
|
38
38
|
this.rateLimitReset = opts.rateLimitReset;
|
|
@@ -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 = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KiteServiceException as __BaseException } from "../models/KiteServiceException";
|
|
2
|
-
import { ForbiddenException,
|
|
2
|
+
import { ForbiddenException, RateLimitExceededException, TargetNotFoundException, ValidationException, WidgetNotFoundException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
4
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_CreateWidgetCommand = async (input, context) => {
|
|
@@ -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
|
};
|
|
@@ -249,9 +251,9 @@ const de_CommandError = async (output, context) => {
|
|
|
249
251
|
case "ForbiddenException":
|
|
250
252
|
case "smithy.framework#ForbiddenException":
|
|
251
253
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
252
|
-
case "
|
|
253
|
-
case "smithy.framework#
|
|
254
|
-
throw await
|
|
254
|
+
case "RateLimitExceededException":
|
|
255
|
+
case "smithy.framework#RateLimitExceededException":
|
|
256
|
+
throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
|
|
255
257
|
case "ValidationException":
|
|
256
258
|
case "smithy.framework#ValidationException":
|
|
257
259
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
@@ -284,7 +286,7 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
|
284
286
|
});
|
|
285
287
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
286
288
|
};
|
|
287
|
-
const
|
|
289
|
+
const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
288
290
|
const contents = map({
|
|
289
291
|
[_rL]: [, parsedOutput.headers[_xrl]],
|
|
290
292
|
[_rLR]: [() => void 0 !== parsedOutput.headers[_xrr], () => __strictParseInt32(parsedOutput.headers[_xrr])],
|
|
@@ -296,7 +298,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
296
298
|
'message': __expectString,
|
|
297
299
|
});
|
|
298
300
|
Object.assign(contents, doc);
|
|
299
|
-
const exception = new
|
|
301
|
+
const exception = new RateLimitExceededException({
|
|
300
302
|
$metadata: deserializeMetadata(parsedOutput),
|
|
301
303
|
...contents
|
|
302
304
|
});
|
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;
|
|
@@ -8,6 +8,7 @@ import { ListWidgetsCommandInput, ListWidgetsCommandOutput } from "./commands/Li
|
|
|
8
8
|
import { UpdateWidgetCommandInput, UpdateWidgetCommandOutput } from "./commands/UpdateWidgetCommand";
|
|
9
9
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
10
10
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
11
|
+
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
11
12
|
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
12
13
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
13
14
|
import { Provider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
@@ -111,7 +112,7 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
111
112
|
/**
|
|
112
113
|
* @public
|
|
113
114
|
*/
|
|
114
|
-
export type KiteClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig;
|
|
115
|
+
export type KiteClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig;
|
|
115
116
|
/**
|
|
116
117
|
* @public
|
|
117
118
|
*
|
|
@@ -124,7 +125,7 @@ export interface KiteClientConfig extends KiteClientConfigType {
|
|
|
124
125
|
/**
|
|
125
126
|
* @public
|
|
126
127
|
*/
|
|
127
|
-
export type KiteClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig;
|
|
128
|
+
export type KiteClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig;
|
|
128
129
|
/**
|
|
129
130
|
* @public
|
|
130
131
|
*
|
|
@@ -188,7 +188,7 @@ declare const CreateWidgetCommand_base: {
|
|
|
188
188
|
*
|
|
189
189
|
* @throws {@link ForbiddenException} (client fault)
|
|
190
190
|
*
|
|
191
|
-
* @throws {@link
|
|
191
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
192
192
|
*
|
|
193
193
|
* @throws {@link KiteServiceException}
|
|
194
194
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -53,7 +53,7 @@ declare const DeleteWidgetCommand_base: {
|
|
|
53
53
|
*
|
|
54
54
|
* @throws {@link ForbiddenException} (client fault)
|
|
55
55
|
*
|
|
56
|
-
* @throws {@link
|
|
56
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
57
57
|
*
|
|
58
58
|
* @throws {@link KiteServiceException}
|
|
59
59
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -45,13 +45,29 @@ declare const GetConfigCommand_base: {
|
|
|
45
45
|
* // config: { // KiteConfig
|
|
46
46
|
* // targetId: "STRING_VALUE", // required
|
|
47
47
|
* // targetRouteId: "STRING_VALUE",
|
|
48
|
-
* // targetVariant: "group" || "direct",
|
|
49
|
-
* //
|
|
50
|
-
* //
|
|
48
|
+
* // targetVariant: "group" || "direct", // required
|
|
49
|
+
* // targetService: { // KiteTargetService
|
|
50
|
+
* // uri: "STRING_VALUE", // required
|
|
51
|
+
* // title: "STRING_VALUE", // required
|
|
52
|
+
* // },
|
|
53
|
+
* // agents: [ // UsersList // required
|
|
54
|
+
* // { // User
|
|
51
55
|
* // id: "STRING_VALUE", // required
|
|
52
56
|
* // name: "STRING_VALUE",
|
|
57
|
+
* // email: "STRING_VALUE",
|
|
58
|
+
* // phone: "STRING_VALUE",
|
|
53
59
|
* // picture: "STRING_VALUE",
|
|
60
|
+
* // locale: "STRING_VALUE",
|
|
61
|
+
* // timeZone: "STRING_VALUE",
|
|
62
|
+
* // company: "STRING_VALUE",
|
|
54
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",
|
|
55
71
|
* // },
|
|
56
72
|
* // ],
|
|
57
73
|
* // appearance: { // WidgetAppearance
|
|
@@ -98,7 +114,7 @@ declare const GetConfigCommand_base: {
|
|
|
98
114
|
*
|
|
99
115
|
* @throws {@link ForbiddenException} (client fault)
|
|
100
116
|
*
|
|
101
|
-
* @throws {@link
|
|
117
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
102
118
|
*
|
|
103
119
|
* @throws {@link KiteServiceException}
|
|
104
120
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -126,7 +126,7 @@ declare const GetWidgetCommand_base: {
|
|
|
126
126
|
*
|
|
127
127
|
* @throws {@link ForbiddenException} (client fault)
|
|
128
128
|
*
|
|
129
|
-
* @throws {@link
|
|
129
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
130
130
|
*
|
|
131
131
|
* @throws {@link KiteServiceException}
|
|
132
132
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -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);
|
|
@@ -81,7 +84,7 @@ declare const ListAgentsCommand_base: {
|
|
|
81
84
|
*
|
|
82
85
|
* @throws {@link ForbiddenException} (client fault)
|
|
83
86
|
*
|
|
84
|
-
* @throws {@link
|
|
87
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
85
88
|
*
|
|
86
89
|
* @throws {@link KiteServiceException}
|
|
87
90
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -70,7 +70,7 @@ declare const ListServicesCommand_base: {
|
|
|
70
70
|
*
|
|
71
71
|
* @throws {@link ForbiddenException} (client fault)
|
|
72
72
|
*
|
|
73
|
-
* @throws {@link
|
|
73
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
74
74
|
*
|
|
75
75
|
* @throws {@link KiteServiceException}
|
|
76
76
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -127,7 +127,7 @@ declare const ListWidgetsCommand_base: {
|
|
|
127
127
|
*
|
|
128
128
|
* @throws {@link ForbiddenException} (client fault)
|
|
129
129
|
*
|
|
130
|
-
* @throws {@link
|
|
130
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
131
131
|
*
|
|
132
132
|
* @throws {@link KiteServiceException}
|
|
133
133
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -189,7 +189,7 @@ declare const UpdateWidgetCommand_base: {
|
|
|
189
189
|
*
|
|
190
190
|
* @throws {@link ForbiddenException} (client fault)
|
|
191
191
|
*
|
|
192
|
-
* @throws {@link
|
|
192
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
193
193
|
*
|
|
194
194
|
* @throws {@link KiteServiceException}
|
|
195
195
|
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
@@ -25,8 +25,8 @@ export declare class ForbiddenException extends __BaseException {
|
|
|
25
25
|
/**
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
export declare class
|
|
29
|
-
readonly name: "
|
|
28
|
+
export declare class RateLimitExceededException extends __BaseException {
|
|
29
|
+
readonly name: "RateLimitExceededException";
|
|
30
30
|
readonly $fault: "client";
|
|
31
31
|
/**
|
|
32
32
|
* Displays the applicable rate limits for the current request.
|
|
@@ -51,7 +51,7 @@ export declare class LimitExceededException extends __BaseException {
|
|
|
51
51
|
/**
|
|
52
52
|
* @internal
|
|
53
53
|
*/
|
|
54
|
-
constructor(opts: __ExceptionOptionType<
|
|
54
|
+
constructor(opts: __ExceptionOptionType<RateLimitExceededException, __BaseException>);
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* @public
|
|
@@ -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
|
|
@@ -441,6 +432,13 @@ export declare const KiteFeatures: {
|
|
|
441
432
|
* @public
|
|
442
433
|
*/
|
|
443
434
|
export type KiteFeatures = typeof KiteFeatures[keyof typeof KiteFeatures];
|
|
435
|
+
/**
|
|
436
|
+
* @public
|
|
437
|
+
*/
|
|
438
|
+
export interface KiteTargetService {
|
|
439
|
+
uri: string;
|
|
440
|
+
title: string;
|
|
441
|
+
}
|
|
444
442
|
/**
|
|
445
443
|
* @public
|
|
446
444
|
* @enum
|
|
@@ -467,8 +465,9 @@ export interface KiteConfig {
|
|
|
467
465
|
* @public
|
|
468
466
|
*/
|
|
469
467
|
targetRouteId?: string;
|
|
470
|
-
targetVariant
|
|
471
|
-
|
|
468
|
+
targetVariant: KiteVariant;
|
|
469
|
+
targetService?: KiteTargetService;
|
|
470
|
+
agents: (User)[];
|
|
472
471
|
/**
|
|
473
472
|
* The appearance settings like color scheme or custom texts.
|
|
474
473
|
* @public
|
|
@@ -532,22 +531,72 @@ export declare class WidgetNotFoundException extends __BaseException {
|
|
|
532
531
|
/**
|
|
533
532
|
* @public
|
|
534
533
|
*/
|
|
535
|
-
export
|
|
534
|
+
export type ListAgentsFilter = ListAgentsFilter.EmailsMember | ListAgentsFilter.ExtensionsMember | ListAgentsFilter.ServiceMember | ListAgentsFilter.$UnknownMember;
|
|
535
|
+
/**
|
|
536
|
+
* @public
|
|
537
|
+
*/
|
|
538
|
+
export declare namespace ListAgentsFilter {
|
|
536
539
|
/**
|
|
537
|
-
* The unique identifier of the service.
|
|
540
|
+
* The unique identifier of the service which represent URI (example - 2@example.wildixin.com:443).
|
|
538
541
|
* @public
|
|
539
542
|
*/
|
|
540
|
-
|
|
543
|
+
interface ServiceMember {
|
|
544
|
+
service: string;
|
|
545
|
+
extensions?: never;
|
|
546
|
+
emails?: never;
|
|
547
|
+
$unknown?: never;
|
|
548
|
+
}
|
|
541
549
|
/**
|
|
542
550
|
* A list of extensions that could be used inside Kite based conversation.
|
|
543
551
|
* @public
|
|
544
552
|
*/
|
|
545
|
-
|
|
553
|
+
interface ExtensionsMember {
|
|
554
|
+
service?: never;
|
|
555
|
+
extensions: (string)[];
|
|
556
|
+
emails?: never;
|
|
557
|
+
$unknown?: never;
|
|
558
|
+
}
|
|
546
559
|
/**
|
|
547
560
|
* A list of emails that could be used inside Kite based conversation.
|
|
548
561
|
* @public
|
|
549
562
|
*/
|
|
550
|
-
|
|
563
|
+
interface EmailsMember {
|
|
564
|
+
service?: never;
|
|
565
|
+
extensions?: never;
|
|
566
|
+
emails: (string)[];
|
|
567
|
+
$unknown?: never;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* @public
|
|
571
|
+
*/
|
|
572
|
+
interface $UnknownMember {
|
|
573
|
+
service?: never;
|
|
574
|
+
extensions?: never;
|
|
575
|
+
emails?: never;
|
|
576
|
+
$unknown: [string, any];
|
|
577
|
+
}
|
|
578
|
+
interface Visitor<T> {
|
|
579
|
+
service: (value: string) => T;
|
|
580
|
+
extensions: (value: (string)[]) => T;
|
|
581
|
+
emails: (value: (string)[]) => T;
|
|
582
|
+
_: (name: string, value: any) => T;
|
|
583
|
+
}
|
|
584
|
+
const visit: <T>(value: ListAgentsFilter, visitor: Visitor<T>) => T;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* @public
|
|
588
|
+
*/
|
|
589
|
+
export interface ListAgentsInput {
|
|
590
|
+
/**
|
|
591
|
+
* The unique identifier of the organization when a service token is used.
|
|
592
|
+
* @public
|
|
593
|
+
*/
|
|
594
|
+
companyId?: string;
|
|
595
|
+
/**
|
|
596
|
+
* The filter to be used to query agents.
|
|
597
|
+
* @public
|
|
598
|
+
*/
|
|
599
|
+
filter: ListAgentsFilter;
|
|
551
600
|
}
|
|
552
601
|
/**
|
|
553
602
|
* @public
|
|
@@ -25,4 +25,5 @@ export declare const getRuntimeConfig: (config: KiteClientConfig) => {
|
|
|
25
25
|
logger: import("@smithy/types").Logger;
|
|
26
26
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
27
27
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
28
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
28
29
|
};
|
|
@@ -25,4 +25,5 @@ export declare const getRuntimeConfig: (config: KiteClientConfig) => {
|
|
|
25
25
|
logger: import("@smithy/types").Logger;
|
|
26
26
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
27
27
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
28
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
28
29
|
};
|
|
@@ -24,4 +24,5 @@ export declare const getRuntimeConfig: (config: KiteClientConfig) => {
|
|
|
24
24
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
25
25
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
26
26
|
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
27
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
27
28
|
};
|
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.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",
|