@wildix/xbees-kite-client 1.0.1

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.
Files changed (64) hide show
  1. package/dist-cjs/Kite.js +25 -0
  2. package/dist-cjs/KiteClient.js +37 -0
  3. package/dist-cjs/commands/CreateWidgetCommand.js +21 -0
  4. package/dist-cjs/commands/DeleteWidgetCommand.js +21 -0
  5. package/dist-cjs/commands/GetConfigCommand.js +21 -0
  6. package/dist-cjs/commands/GetWidgetCommand.js +21 -0
  7. package/dist-cjs/commands/ListServicesCommand.js +21 -0
  8. package/dist-cjs/commands/ListWidgetsCommand.js +21 -0
  9. package/dist-cjs/commands/UpdateWidgetCommand.js +21 -0
  10. package/dist-cjs/commands/index.js +10 -0
  11. package/dist-cjs/extensionConfiguration.js +2 -0
  12. package/dist-cjs/index.js +10 -0
  13. package/dist-cjs/models/KiteServiceException.js +12 -0
  14. package/dist-cjs/models/index.js +4 -0
  15. package/dist-cjs/models/models_0.js +112 -0
  16. package/dist-cjs/protocols/Aws_restJson1.js +387 -0
  17. package/dist-cjs/runtimeConfig.browser.js +32 -0
  18. package/dist-cjs/runtimeConfig.js +36 -0
  19. package/dist-cjs/runtimeConfig.native.js +15 -0
  20. package/dist-cjs/runtimeConfig.shared.js +21 -0
  21. package/dist-cjs/runtimeExtensions.js +19 -0
  22. package/dist-es/Kite.js +21 -0
  23. package/dist-es/KiteClient.js +33 -0
  24. package/dist-es/commands/CreateWidgetCommand.js +17 -0
  25. package/dist-es/commands/DeleteWidgetCommand.js +17 -0
  26. package/dist-es/commands/GetConfigCommand.js +17 -0
  27. package/dist-es/commands/GetWidgetCommand.js +17 -0
  28. package/dist-es/commands/ListServicesCommand.js +17 -0
  29. package/dist-es/commands/ListWidgetsCommand.js +17 -0
  30. package/dist-es/commands/UpdateWidgetCommand.js +17 -0
  31. package/dist-es/commands/index.js +7 -0
  32. package/dist-es/extensionConfiguration.js +1 -0
  33. package/dist-es/index.js +5 -0
  34. package/dist-es/models/KiteServiceException.js +8 -0
  35. package/dist-es/models/index.js +1 -0
  36. package/dist-es/models/models_0.js +104 -0
  37. package/dist-es/protocols/Aws_restJson1.js +370 -0
  38. package/dist-es/runtimeConfig.browser.js +27 -0
  39. package/dist-es/runtimeConfig.js +31 -0
  40. package/dist-es/runtimeConfig.native.js +11 -0
  41. package/dist-es/runtimeConfig.shared.js +17 -0
  42. package/dist-es/runtimeExtensions.js +15 -0
  43. package/dist-types/Kite.d.ts +60 -0
  44. package/dist-types/KiteClient.d.ts +149 -0
  45. package/dist-types/commands/CreateWidgetCommand.d.ts +199 -0
  46. package/dist-types/commands/DeleteWidgetCommand.d.ts +64 -0
  47. package/dist-types/commands/GetConfigCommand.d.ts +107 -0
  48. package/dist-types/commands/GetWidgetCommand.d.ts +137 -0
  49. package/dist-types/commands/ListServicesCommand.d.ts +94 -0
  50. package/dist-types/commands/ListWidgetsCommand.d.ts +137 -0
  51. package/dist-types/commands/UpdateWidgetCommand.d.ts +200 -0
  52. package/dist-types/commands/index.d.ts +7 -0
  53. package/dist-types/extensionConfiguration.d.ts +7 -0
  54. package/dist-types/index.d.ts +7 -0
  55. package/dist-types/models/KiteServiceException.d.ts +14 -0
  56. package/dist-types/models/index.d.ts +1 -0
  57. package/dist-types/models/models_0.d.ts +617 -0
  58. package/dist-types/protocols/Aws_restJson1.d.ts +65 -0
  59. package/dist-types/runtimeConfig.browser.d.ts +28 -0
  60. package/dist-types/runtimeConfig.d.ts +28 -0
  61. package/dist-types/runtimeConfig.native.d.ts +27 -0
  62. package/dist-types/runtimeConfig.shared.d.ts +15 -0
  63. package/dist-types/runtimeExtensions.d.ts +17 -0
  64. package/package.json +78 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Kite = void 0;
4
+ const KiteClient_1 = require("./KiteClient");
5
+ const CreateWidgetCommand_1 = require("./commands/CreateWidgetCommand");
6
+ const DeleteWidgetCommand_1 = require("./commands/DeleteWidgetCommand");
7
+ const GetConfigCommand_1 = require("./commands/GetConfigCommand");
8
+ const GetWidgetCommand_1 = require("./commands/GetWidgetCommand");
9
+ const ListServicesCommand_1 = require("./commands/ListServicesCommand");
10
+ const ListWidgetsCommand_1 = require("./commands/ListWidgetsCommand");
11
+ const UpdateWidgetCommand_1 = require("./commands/UpdateWidgetCommand");
12
+ const smithy_client_1 = require("@smithy/smithy-client");
13
+ const commands = {
14
+ CreateWidgetCommand: CreateWidgetCommand_1.CreateWidgetCommand,
15
+ DeleteWidgetCommand: DeleteWidgetCommand_1.DeleteWidgetCommand,
16
+ GetConfigCommand: GetConfigCommand_1.GetConfigCommand,
17
+ GetWidgetCommand: GetWidgetCommand_1.GetWidgetCommand,
18
+ ListServicesCommand: ListServicesCommand_1.ListServicesCommand,
19
+ ListWidgetsCommand: ListWidgetsCommand_1.ListWidgetsCommand,
20
+ UpdateWidgetCommand: UpdateWidgetCommand_1.UpdateWidgetCommand,
21
+ };
22
+ class Kite extends KiteClient_1.KiteClient {
23
+ }
24
+ exports.Kite = Kite;
25
+ (0, smithy_client_1.createAggregatedClient)(commands, Kite);
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KiteClient = exports.__Client = void 0;
4
+ const runtimeConfig_1 = require("./runtimeConfig");
5
+ const runtimeExtensions_1 = require("./runtimeExtensions");
6
+ const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
7
+ const smithy_client_1 = require("@smithy/smithy-client");
8
+ Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
9
+ const smithy_utils_1 = require("@wildix/smithy-utils");
10
+ class KiteClient extends smithy_client_1.Client {
11
+ constructor(...[configuration]) {
12
+ let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
13
+ let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
14
+ let _config_2 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_1, configuration?.extensions || []);
15
+ const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `api-${configuration.env}.x-bees.com` : 'api.x-bees.com';
16
+ const endpoint = () => {
17
+ return {
18
+ hostname,
19
+ protocol: "https",
20
+ port: '443',
21
+ path: ''
22
+ };
23
+ };
24
+ const config = {
25
+ ..._config_2,
26
+ endpoint,
27
+ };
28
+ super(config);
29
+ this.config = config;
30
+ this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
31
+ this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
32
+ }
33
+ destroy() {
34
+ super.destroy();
35
+ }
36
+ }
37
+ exports.KiteClient = KiteClient;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateWidgetCommand = 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 CreateWidgetCommand 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", "CreateWidget", {})
15
+ .n("KiteClient", "CreateWidgetCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_CreateWidgetCommand)
18
+ .de(Aws_restJson1_1.de_CreateWidgetCommand)
19
+ .build() {
20
+ }
21
+ exports.CreateWidgetCommand = CreateWidgetCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteWidgetCommand = 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 DeleteWidgetCommand 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", "DeleteWidget", {})
15
+ .n("KiteClient", "DeleteWidgetCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_DeleteWidgetCommand)
18
+ .de(Aws_restJson1_1.de_DeleteWidgetCommand)
19
+ .build() {
20
+ }
21
+ exports.DeleteWidgetCommand = DeleteWidgetCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetConfigCommand = 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 GetConfigCommand 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", "GetConfig", {})
15
+ .n("KiteClient", "GetConfigCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetConfigCommand)
18
+ .de(Aws_restJson1_1.de_GetConfigCommand)
19
+ .build() {
20
+ }
21
+ exports.GetConfigCommand = GetConfigCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetWidgetCommand = 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 GetWidgetCommand 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", "GetWidget", {})
15
+ .n("KiteClient", "GetWidgetCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetWidgetCommand)
18
+ .de(Aws_restJson1_1.de_GetWidgetCommand)
19
+ .build() {
20
+ }
21
+ exports.GetWidgetCommand = GetWidgetCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListServicesCommand = 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 ListServicesCommand 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", "ListServices", {})
15
+ .n("KiteClient", "ListServicesCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListServicesCommand)
18
+ .de(Aws_restJson1_1.de_ListServicesCommand)
19
+ .build() {
20
+ }
21
+ exports.ListServicesCommand = ListServicesCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListWidgetsCommand = 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 ListWidgetsCommand 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", "ListWidgets", {})
15
+ .n("KiteClient", "ListWidgetsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListWidgetsCommand)
18
+ .de(Aws_restJson1_1.de_ListWidgetsCommand)
19
+ .build() {
20
+ }
21
+ exports.ListWidgetsCommand = ListWidgetsCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateWidgetCommand = 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 UpdateWidgetCommand 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", "UpdateWidget", {})
15
+ .n("KiteClient", "UpdateWidgetCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_UpdateWidgetCommand)
18
+ .de(Aws_restJson1_1.de_UpdateWidgetCommand)
19
+ .build() {
20
+ }
21
+ exports.UpdateWidgetCommand = UpdateWidgetCommand;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./CreateWidgetCommand"), exports);
5
+ tslib_1.__exportStar(require("./DeleteWidgetCommand"), exports);
6
+ tslib_1.__exportStar(require("./GetConfigCommand"), exports);
7
+ tslib_1.__exportStar(require("./GetWidgetCommand"), exports);
8
+ tslib_1.__exportStar(require("./ListServicesCommand"), exports);
9
+ tslib_1.__exportStar(require("./ListWidgetsCommand"), exports);
10
+ tslib_1.__exportStar(require("./UpdateWidgetCommand"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KiteServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./KiteClient"), exports);
6
+ tslib_1.__exportStar(require("./Kite"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./models"), exports);
9
+ var KiteServiceException_1 = require("./models/KiteServiceException");
10
+ Object.defineProperty(exports, "KiteServiceException", { enumerable: true, get: function () { return KiteServiceException_1.KiteServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KiteServiceException = exports.__ServiceException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
+ class KiteServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, KiteServiceException.prototype);
10
+ }
11
+ }
12
+ exports.KiteServiceException = KiteServiceException;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./models_0"), exports);
@@ -0,0 +1,112 @@
1
+ "use strict";
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;
4
+ const KiteServiceException_1 = require("./KiteServiceException");
5
+ class ValidationException extends KiteServiceException_1.KiteServiceException {
6
+ constructor(opts) {
7
+ super({
8
+ name: "ValidationException",
9
+ $fault: "client",
10
+ ...opts
11
+ });
12
+ this.name = "ValidationException";
13
+ this.$fault = "client";
14
+ Object.setPrototypeOf(this, ValidationException.prototype);
15
+ }
16
+ }
17
+ exports.ValidationException = ValidationException;
18
+ class ForbiddenException extends KiteServiceException_1.KiteServiceException {
19
+ constructor(opts) {
20
+ super({
21
+ name: "ForbiddenException",
22
+ $fault: "client",
23
+ ...opts
24
+ });
25
+ this.name = "ForbiddenException";
26
+ this.$fault = "client";
27
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
28
+ }
29
+ }
30
+ exports.ForbiddenException = ForbiddenException;
31
+ class LimitExceededException extends KiteServiceException_1.KiteServiceException {
32
+ constructor(opts) {
33
+ super({
34
+ name: "LimitExceededException",
35
+ $fault: "client",
36
+ ...opts
37
+ });
38
+ this.name = "LimitExceededException";
39
+ this.$fault = "client";
40
+ Object.setPrototypeOf(this, LimitExceededException.prototype);
41
+ this.rateLimit = opts.rateLimit;
42
+ this.rateLimitRemaining = opts.rateLimitRemaining;
43
+ this.rateLimitReset = opts.rateLimitReset;
44
+ this.retryAfter = opts.retryAfter;
45
+ }
46
+ }
47
+ exports.LimitExceededException = LimitExceededException;
48
+ exports.WidgetRouteTimeFrameDay = {
49
+ EVERY_DAY: "EVERY_DAY",
50
+ FRIDAY: "FRIDAY",
51
+ MONDAY: "MONDAY",
52
+ SATURDAY: "SATURDAY",
53
+ SUNDAY: "SUNDAY",
54
+ THUESDAY: "THUESDAY",
55
+ THURSDAY: "THURSDAY",
56
+ WEDNESDAY: "WEDNESDAY",
57
+ WEEKDAYS: "WEEKDAYS",
58
+ WEEKENDS: "WEEKENDS",
59
+ };
60
+ var WidgetRouteRule;
61
+ (function (WidgetRouteRule) {
62
+ WidgetRouteRule.visit = (value, visitor) => {
63
+ if (value.timeFrame !== undefined)
64
+ return visitor.timeFrame(value.timeFrame);
65
+ return visitor._(value.$unknown[0], value.$unknown[1]);
66
+ };
67
+ })(WidgetRouteRule = exports.WidgetRouteRule || (exports.WidgetRouteRule = {}));
68
+ var WidgetTarget;
69
+ (function (WidgetTarget) {
70
+ WidgetTarget.visit = (value, visitor) => {
71
+ if (value.service !== undefined)
72
+ return visitor.service(value.service);
73
+ if (value.agent !== undefined)
74
+ return visitor.agent(value.agent);
75
+ if (value.bot !== undefined)
76
+ return visitor.bot(value.bot);
77
+ return visitor._(value.$unknown[0], value.$unknown[1]);
78
+ };
79
+ })(WidgetTarget = exports.WidgetTarget || (exports.WidgetTarget = {}));
80
+ exports.KiteFeatures = {
81
+ SCHEDULING: "scheduling",
82
+ };
83
+ exports.KiteVariant = {
84
+ DIRECT: "direct",
85
+ GROUP: "group",
86
+ };
87
+ class TargetNotFoundException extends KiteServiceException_1.KiteServiceException {
88
+ constructor(opts) {
89
+ super({
90
+ name: "TargetNotFoundException",
91
+ $fault: "client",
92
+ ...opts
93
+ });
94
+ this.name = "TargetNotFoundException";
95
+ this.$fault = "client";
96
+ Object.setPrototypeOf(this, TargetNotFoundException.prototype);
97
+ }
98
+ }
99
+ exports.TargetNotFoundException = TargetNotFoundException;
100
+ class WidgetNotFoundException extends KiteServiceException_1.KiteServiceException {
101
+ constructor(opts) {
102
+ super({
103
+ name: "WidgetNotFoundException",
104
+ $fault: "client",
105
+ ...opts
106
+ });
107
+ this.name = "WidgetNotFoundException";
108
+ this.$fault = "client";
109
+ Object.setPrototypeOf(this, WidgetNotFoundException.prototype);
110
+ }
111
+ }
112
+ exports.WidgetNotFoundException = WidgetNotFoundException;