@wildix/xbees-kite-client 1.0.9 → 1.0.11
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 +8 -2
- package/dist-cjs/commands/CancelCalendarEventCommand.js +21 -0
- package/dist-cjs/commands/{ListCalendarSlotsCommand.js → GetCalendarSlotsCommand.js} +7 -7
- package/dist-cjs/commands/RescheduleCalendarEventCommand.js +21 -0
- package/dist-cjs/commands/ScheduleCalendarEventCommand.js +21 -0
- package/dist-cjs/commands/index.js +4 -1
- package/dist-cjs/models/models_0.js +22 -2
- package/dist-cjs/protocols/Aws_restJson1.js +155 -24
- package/dist-es/Kite.js +8 -2
- package/dist-es/commands/CancelCalendarEventCommand.js +17 -0
- package/dist-es/commands/GetCalendarSlotsCommand.js +17 -0
- package/dist-es/commands/RescheduleCalendarEventCommand.js +17 -0
- package/dist-es/commands/ScheduleCalendarEventCommand.js +17 -0
- package/dist-es/commands/index.js +4 -1
- package/dist-es/models/models_0.js +21 -1
- package/dist-es/protocols/Aws_restJson1.js +144 -19
- package/dist-types/Kite.d.ts +28 -7
- package/dist-types/KiteClient.d.ts +6 -3
- package/dist-types/commands/CancelCalendarEventCommand.d.ts +146 -0
- package/dist-types/commands/CreateWidgetCommand.d.ts +2 -2
- package/dist-types/commands/GetCalendarSlotsCommand.d.ts +89 -0
- package/dist-types/commands/GetWidgetCommand.d.ts +1 -1
- package/dist-types/commands/ListWidgetsCommand.d.ts +1 -1
- package/dist-types/commands/RescheduleCalendarEventCommand.d.ts +155 -0
- package/dist-types/commands/ScheduleCalendarEventCommand.d.ts +152 -0
- package/dist-types/commands/UpdateWidgetCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +4 -1
- package/dist-types/models/models_0.d.ts +272 -16
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -9
- package/package.json +1 -1
- package/dist-es/commands/ListCalendarSlotsCommand.js +0 -17
- package/dist-types/commands/ListCalendarSlotsCommand.d.ts +0 -64
package/dist-cjs/Kite.js
CHANGED
|
@@ -2,25 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Kite = void 0;
|
|
4
4
|
const KiteClient_1 = require("./KiteClient");
|
|
5
|
+
const CancelCalendarEventCommand_1 = require("./commands/CancelCalendarEventCommand");
|
|
5
6
|
const CreateWidgetCommand_1 = require("./commands/CreateWidgetCommand");
|
|
6
7
|
const DeleteWidgetCommand_1 = require("./commands/DeleteWidgetCommand");
|
|
8
|
+
const GetCalendarSlotsCommand_1 = require("./commands/GetCalendarSlotsCommand");
|
|
7
9
|
const GetConfigCommand_1 = require("./commands/GetConfigCommand");
|
|
8
10
|
const GetWidgetCommand_1 = require("./commands/GetWidgetCommand");
|
|
9
11
|
const ListAgentsCommand_1 = require("./commands/ListAgentsCommand");
|
|
10
|
-
const ListCalendarSlotsCommand_1 = require("./commands/ListCalendarSlotsCommand");
|
|
11
12
|
const ListServicesCommand_1 = require("./commands/ListServicesCommand");
|
|
12
13
|
const ListWidgetsCommand_1 = require("./commands/ListWidgetsCommand");
|
|
14
|
+
const RescheduleCalendarEventCommand_1 = require("./commands/RescheduleCalendarEventCommand");
|
|
15
|
+
const ScheduleCalendarEventCommand_1 = require("./commands/ScheduleCalendarEventCommand");
|
|
13
16
|
const UpdateWidgetCommand_1 = require("./commands/UpdateWidgetCommand");
|
|
14
17
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
18
|
const commands = {
|
|
19
|
+
CancelCalendarEventCommand: CancelCalendarEventCommand_1.CancelCalendarEventCommand,
|
|
16
20
|
CreateWidgetCommand: CreateWidgetCommand_1.CreateWidgetCommand,
|
|
17
21
|
DeleteWidgetCommand: DeleteWidgetCommand_1.DeleteWidgetCommand,
|
|
22
|
+
GetCalendarSlotsCommand: GetCalendarSlotsCommand_1.GetCalendarSlotsCommand,
|
|
18
23
|
GetConfigCommand: GetConfigCommand_1.GetConfigCommand,
|
|
19
24
|
GetWidgetCommand: GetWidgetCommand_1.GetWidgetCommand,
|
|
20
25
|
ListAgentsCommand: ListAgentsCommand_1.ListAgentsCommand,
|
|
21
|
-
ListCalendarSlotsCommand: ListCalendarSlotsCommand_1.ListCalendarSlotsCommand,
|
|
22
26
|
ListServicesCommand: ListServicesCommand_1.ListServicesCommand,
|
|
23
27
|
ListWidgetsCommand: ListWidgetsCommand_1.ListWidgetsCommand,
|
|
28
|
+
RescheduleCalendarEventCommand: RescheduleCalendarEventCommand_1.RescheduleCalendarEventCommand,
|
|
29
|
+
ScheduleCalendarEventCommand: ScheduleCalendarEventCommand_1.ScheduleCalendarEventCommand,
|
|
24
30
|
UpdateWidgetCommand: UpdateWidgetCommand_1.UpdateWidgetCommand,
|
|
25
31
|
};
|
|
26
32
|
class Kite extends KiteClient_1.KiteClient {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancelCalendarEventCommand = 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 CancelCalendarEventCommand 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", "CancelCalendarEvent", {})
|
|
15
|
+
.n("KiteClient", "CancelCalendarEventCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_CancelCalendarEventCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_CancelCalendarEventCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.CancelCalendarEventCommand = CancelCalendarEventCommand;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.GetCalendarSlotsCommand = exports.$Command = void 0;
|
|
4
4
|
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
5
|
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
7
|
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
-
class
|
|
8
|
+
class GetCalendarSlotsCommand extends smithy_client_1.Command.classBuilder()
|
|
9
9
|
.m(function (Command, cs, config, o) {
|
|
10
10
|
return [
|
|
11
11
|
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
12
|
];
|
|
13
13
|
})
|
|
14
|
-
.s("Kite", "
|
|
15
|
-
.n("KiteClient", "
|
|
14
|
+
.s("Kite", "GetCalendarSlots", {})
|
|
15
|
+
.n("KiteClient", "GetCalendarSlotsCommand")
|
|
16
16
|
.f(void 0, void 0)
|
|
17
|
-
.ser(Aws_restJson1_1.
|
|
18
|
-
.de(Aws_restJson1_1.
|
|
17
|
+
.ser(Aws_restJson1_1.se_GetCalendarSlotsCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_GetCalendarSlotsCommand)
|
|
19
19
|
.build() {
|
|
20
20
|
}
|
|
21
|
-
exports.
|
|
21
|
+
exports.GetCalendarSlotsCommand = GetCalendarSlotsCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RescheduleCalendarEventCommand = 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 RescheduleCalendarEventCommand 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", "RescheduleCalendarEvent", {})
|
|
15
|
+
.n("KiteClient", "RescheduleCalendarEventCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_RescheduleCalendarEventCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_RescheduleCalendarEventCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.RescheduleCalendarEventCommand = RescheduleCalendarEventCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScheduleCalendarEventCommand = 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 ScheduleCalendarEventCommand 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", "ScheduleCalendarEvent", {})
|
|
15
|
+
.n("KiteClient", "ScheduleCalendarEventCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_ScheduleCalendarEventCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_ScheduleCalendarEventCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.ScheduleCalendarEventCommand = ScheduleCalendarEventCommand;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./CancelCalendarEventCommand"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./CreateWidgetCommand"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./DeleteWidgetCommand"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./GetCalendarSlotsCommand"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./GetConfigCommand"), exports);
|
|
7
9
|
tslib_1.__exportStar(require("./GetWidgetCommand"), exports);
|
|
8
10
|
tslib_1.__exportStar(require("./ListAgentsCommand"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./ListCalendarSlotsCommand"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./ListServicesCommand"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./ListWidgetsCommand"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./RescheduleCalendarEventCommand"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./ScheduleCalendarEventCommand"), exports);
|
|
12
15
|
tslib_1.__exportStar(require("./UpdateWidgetCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListAgentsFilter = exports.WidgetNotFoundException = exports.TargetNotFoundException = exports.KiteVariant = exports.KiteFeatures = exports.WidgetTarget = exports.WidgetRouteRule = exports.WidgetRouteTimeFrameDay = exports.Element = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.RateLimitExceededException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
3
|
+
exports.ListAgentsFilter = exports.WidgetNotFoundException = exports.TargetNotFoundException = exports.KiteVariant = exports.KiteFeatures = exports.WidgetTarget = exports.WidgetRouteRule = exports.WidgetRouteTimeFrameDay = exports.Element = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ChannelType = 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) {
|
|
@@ -45,6 +45,10 @@ class RateLimitExceededException extends KiteServiceException_1.KiteServiceExcep
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.RateLimitExceededException = RateLimitExceededException;
|
|
48
|
+
exports.ChannelType = {
|
|
49
|
+
DIRECT: "direct",
|
|
50
|
+
GROUP: "group",
|
|
51
|
+
};
|
|
48
52
|
var ButtonHandler;
|
|
49
53
|
(function (ButtonHandler) {
|
|
50
54
|
ButtonHandler.visit = (value, visitor) => {
|
|
@@ -69,6 +73,22 @@ var ActionElement;
|
|
|
69
73
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
70
74
|
};
|
|
71
75
|
})(ActionElement = exports.ActionElement || (exports.ActionElement = {}));
|
|
76
|
+
exports.ChannelAccess = {
|
|
77
|
+
PRIVATE: "private",
|
|
78
|
+
PUBLIC: "public",
|
|
79
|
+
};
|
|
80
|
+
exports.ChannelContextEventAttendeeStatus = {
|
|
81
|
+
ACCEPTED: "accepted",
|
|
82
|
+
DECLINED: "declined",
|
|
83
|
+
NONE: "none",
|
|
84
|
+
TENTATIVE: "tentative",
|
|
85
|
+
};
|
|
86
|
+
exports.ChannelContextSource = {
|
|
87
|
+
KITE: "kite",
|
|
88
|
+
};
|
|
89
|
+
exports.ChannelWhatsAppStatus = {
|
|
90
|
+
CHANNEL_CLOSED: "24h_channel_closed",
|
|
91
|
+
};
|
|
72
92
|
var Element;
|
|
73
93
|
(function (Element) {
|
|
74
94
|
Element.visit = (value, visitor) => {
|
|
@@ -83,8 +103,8 @@ exports.WidgetRouteTimeFrameDay = {
|
|
|
83
103
|
MONDAY: "MONDAY",
|
|
84
104
|
SATURDAY: "SATURDAY",
|
|
85
105
|
SUNDAY: "SUNDAY",
|
|
86
|
-
THUESDAY: "THUESDAY",
|
|
87
106
|
THURSDAY: "THURSDAY",
|
|
107
|
+
TUESDAY: "TUESDAY",
|
|
88
108
|
WEDNESDAY: "WEDNESDAY",
|
|
89
109
|
WEEKDAYS: "WEEKDAYS",
|
|
90
110
|
WEEKENDS: "WEEKENDS",
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateWidgetCommand = exports.
|
|
3
|
+
exports.de_UpdateWidgetCommand = exports.de_ScheduleCalendarEventCommand = exports.de_RescheduleCalendarEventCommand = exports.de_ListWidgetsCommand = exports.de_ListServicesCommand = exports.de_ListAgentsCommand = exports.de_GetWidgetCommand = exports.de_GetConfigCommand = exports.de_GetCalendarSlotsCommand = exports.de_DeleteWidgetCommand = exports.de_CreateWidgetCommand = exports.de_CancelCalendarEventCommand = exports.se_UpdateWidgetCommand = exports.se_ScheduleCalendarEventCommand = exports.se_RescheduleCalendarEventCommand = exports.se_ListWidgetsCommand = exports.se_ListServicesCommand = exports.se_ListAgentsCommand = exports.se_GetWidgetCommand = exports.se_GetConfigCommand = exports.se_GetCalendarSlotsCommand = exports.se_DeleteWidgetCommand = exports.se_CreateWidgetCommand = exports.se_CancelCalendarEventCommand = 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");
|
|
7
7
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
+
const se_CancelCalendarEventCommand = async (input, context) => {
|
|
9
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
+
const headers = {};
|
|
11
|
+
b.bp("/v2/kite/calendar/channels/{channelId}/events/{eventOwner}/{eventId}");
|
|
12
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
13
|
+
b.p('eventId', () => input.eventId, '{eventId}', false);
|
|
14
|
+
b.p('eventOwner', () => input.eventOwner, '{eventOwner}', false);
|
|
15
|
+
const query = (0, smithy_client_1.map)({
|
|
16
|
+
[_r]: [, input[_r]],
|
|
17
|
+
});
|
|
18
|
+
let body;
|
|
19
|
+
b.m("DELETE")
|
|
20
|
+
.h(headers)
|
|
21
|
+
.q(query)
|
|
22
|
+
.b(body);
|
|
23
|
+
return b.build();
|
|
24
|
+
};
|
|
25
|
+
exports.se_CancelCalendarEventCommand = se_CancelCalendarEventCommand;
|
|
8
26
|
const se_CreateWidgetCommand = async (input, context) => {
|
|
9
27
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
28
|
const headers = {
|
|
@@ -41,13 +59,33 @@ const se_DeleteWidgetCommand = async (input, context) => {
|
|
|
41
59
|
return b.build();
|
|
42
60
|
};
|
|
43
61
|
exports.se_DeleteWidgetCommand = se_DeleteWidgetCommand;
|
|
62
|
+
const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
63
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
64
|
+
const headers = {};
|
|
65
|
+
b.bp("/v2/kite/calendar/widgets/{targetId}/slots");
|
|
66
|
+
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
67
|
+
const query = (0, smithy_client_1.map)({
|
|
68
|
+
[_f]: [, (0, smithy_client_1.expectNonNull)(input[_f], `from`)],
|
|
69
|
+
[_t]: [, (0, smithy_client_1.expectNonNull)(input[_t], `till`)],
|
|
70
|
+
[_d]: [, input[_d]],
|
|
71
|
+
[_tZ]: [, (0, smithy_client_1.expectNonNull)(input[_tZ], `timeZone`)],
|
|
72
|
+
[_e]: [, input[_e]],
|
|
73
|
+
});
|
|
74
|
+
let body;
|
|
75
|
+
b.m("GET")
|
|
76
|
+
.h(headers)
|
|
77
|
+
.q(query)
|
|
78
|
+
.b(body);
|
|
79
|
+
return b.build();
|
|
80
|
+
};
|
|
81
|
+
exports.se_GetCalendarSlotsCommand = se_GetCalendarSlotsCommand;
|
|
44
82
|
const se_GetConfigCommand = async (input, context) => {
|
|
45
83
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
46
84
|
const headers = {};
|
|
47
85
|
b.bp("/v2/kite/config/{targetId}");
|
|
48
86
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
49
87
|
const query = (0, smithy_client_1.map)({
|
|
50
|
-
[
|
|
88
|
+
[_ro]: [, input[_tRI]],
|
|
51
89
|
});
|
|
52
90
|
let body;
|
|
53
91
|
b.m("GET")
|
|
@@ -89,18 +127,6 @@ const se_ListAgentsCommand = async (input, context) => {
|
|
|
89
127
|
return b.build();
|
|
90
128
|
};
|
|
91
129
|
exports.se_ListAgentsCommand = se_ListAgentsCommand;
|
|
92
|
-
const se_ListCalendarSlotsCommand = async (input, context) => {
|
|
93
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
94
|
-
const headers = {};
|
|
95
|
-
b.bp("/v2/kite/calendar/slots/{targetId}");
|
|
96
|
-
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
97
|
-
let body;
|
|
98
|
-
b.m("POST")
|
|
99
|
-
.h(headers)
|
|
100
|
-
.b(body);
|
|
101
|
-
return b.build();
|
|
102
|
-
};
|
|
103
|
-
exports.se_ListCalendarSlotsCommand = se_ListCalendarSlotsCommand;
|
|
104
130
|
const se_ListServicesCommand = async (input, context) => {
|
|
105
131
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
106
132
|
const headers = {};
|
|
@@ -131,6 +157,53 @@ const se_ListWidgetsCommand = async (input, context) => {
|
|
|
131
157
|
return b.build();
|
|
132
158
|
};
|
|
133
159
|
exports.se_ListWidgetsCommand = se_ListWidgetsCommand;
|
|
160
|
+
const se_RescheduleCalendarEventCommand = async (input, context) => {
|
|
161
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
162
|
+
const headers = {
|
|
163
|
+
'content-type': 'application/json',
|
|
164
|
+
};
|
|
165
|
+
b.bp("/v2/kite/calendar/channels/{channelId}/events/{eventOwner}/{eventId}");
|
|
166
|
+
b.p('channelId', () => input.channelId, '{channelId}', false);
|
|
167
|
+
b.p('eventId', () => input.eventId, '{eventId}', false);
|
|
168
|
+
b.p('eventOwner', () => input.eventOwner, '{eventOwner}', false);
|
|
169
|
+
let body;
|
|
170
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
171
|
+
'attendees': _ => (0, smithy_client_1._json)(_),
|
|
172
|
+
'changed': _ => (0, smithy_client_1._json)(_),
|
|
173
|
+
'duration': [],
|
|
174
|
+
'reason': [],
|
|
175
|
+
'start': [],
|
|
176
|
+
'summary': [],
|
|
177
|
+
}));
|
|
178
|
+
b.m("PATCH")
|
|
179
|
+
.h(headers)
|
|
180
|
+
.b(body);
|
|
181
|
+
return b.build();
|
|
182
|
+
};
|
|
183
|
+
exports.se_RescheduleCalendarEventCommand = se_RescheduleCalendarEventCommand;
|
|
184
|
+
const se_ScheduleCalendarEventCommand = async (input, context) => {
|
|
185
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
186
|
+
const headers = {
|
|
187
|
+
'content-type': 'application/json',
|
|
188
|
+
};
|
|
189
|
+
b.bp("/v2/kite/calendar/widgets/{targetId}");
|
|
190
|
+
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
191
|
+
let body;
|
|
192
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
193
|
+
'attendees': _ => (0, smithy_client_1._json)(_),
|
|
194
|
+
'channelId': [],
|
|
195
|
+
'duration': [],
|
|
196
|
+
'language': [],
|
|
197
|
+
'start': [],
|
|
198
|
+
'summary': [],
|
|
199
|
+
'timeZone': [],
|
|
200
|
+
}));
|
|
201
|
+
b.m("POST")
|
|
202
|
+
.h(headers)
|
|
203
|
+
.b(body);
|
|
204
|
+
return b.build();
|
|
205
|
+
};
|
|
206
|
+
exports.se_ScheduleCalendarEventCommand = se_ScheduleCalendarEventCommand;
|
|
134
207
|
const se_UpdateWidgetCommand = async (input, context) => {
|
|
135
208
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
136
209
|
const headers = {
|
|
@@ -156,6 +229,22 @@ const se_UpdateWidgetCommand = async (input, context) => {
|
|
|
156
229
|
return b.build();
|
|
157
230
|
};
|
|
158
231
|
exports.se_UpdateWidgetCommand = se_UpdateWidgetCommand;
|
|
232
|
+
const de_CancelCalendarEventCommand = async (output, context) => {
|
|
233
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
234
|
+
return de_CommandError(output, context);
|
|
235
|
+
}
|
|
236
|
+
const contents = (0, smithy_client_1.map)({
|
|
237
|
+
$metadata: deserializeMetadata(output),
|
|
238
|
+
});
|
|
239
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
240
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
241
|
+
'channel': smithy_client_1._json,
|
|
242
|
+
'event': smithy_client_1._json,
|
|
243
|
+
});
|
|
244
|
+
Object.assign(contents, doc);
|
|
245
|
+
return contents;
|
|
246
|
+
};
|
|
247
|
+
exports.de_CancelCalendarEventCommand = de_CancelCalendarEventCommand;
|
|
159
248
|
const de_CreateWidgetCommand = async (output, context) => {
|
|
160
249
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
161
250
|
return de_CommandError(output, context);
|
|
@@ -182,6 +271,21 @@ const de_DeleteWidgetCommand = async (output, context) => {
|
|
|
182
271
|
return contents;
|
|
183
272
|
};
|
|
184
273
|
exports.de_DeleteWidgetCommand = de_DeleteWidgetCommand;
|
|
274
|
+
const de_GetCalendarSlotsCommand = async (output, context) => {
|
|
275
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
276
|
+
return de_CommandError(output, context);
|
|
277
|
+
}
|
|
278
|
+
const contents = (0, smithy_client_1.map)({
|
|
279
|
+
$metadata: deserializeMetadata(output),
|
|
280
|
+
});
|
|
281
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
282
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
283
|
+
'calendar': smithy_client_1._json,
|
|
284
|
+
});
|
|
285
|
+
Object.assign(contents, doc);
|
|
286
|
+
return contents;
|
|
287
|
+
};
|
|
288
|
+
exports.de_GetCalendarSlotsCommand = de_GetCalendarSlotsCommand;
|
|
185
289
|
const de_GetConfigCommand = async (output, context) => {
|
|
186
290
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
187
291
|
return de_CommandError(output, context);
|
|
@@ -227,18 +331,22 @@ const de_ListAgentsCommand = async (output, context) => {
|
|
|
227
331
|
return contents;
|
|
228
332
|
};
|
|
229
333
|
exports.de_ListAgentsCommand = de_ListAgentsCommand;
|
|
230
|
-
const
|
|
334
|
+
const de_ListServicesCommand = async (output, context) => {
|
|
231
335
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
232
336
|
return de_CommandError(output, context);
|
|
233
337
|
}
|
|
234
338
|
const contents = (0, smithy_client_1.map)({
|
|
235
339
|
$metadata: deserializeMetadata(output),
|
|
236
340
|
});
|
|
237
|
-
|
|
341
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
342
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
343
|
+
'services': smithy_client_1._json,
|
|
344
|
+
});
|
|
345
|
+
Object.assign(contents, doc);
|
|
238
346
|
return contents;
|
|
239
347
|
};
|
|
240
|
-
exports.
|
|
241
|
-
const
|
|
348
|
+
exports.de_ListServicesCommand = de_ListServicesCommand;
|
|
349
|
+
const de_ListWidgetsCommand = async (output, context) => {
|
|
242
350
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
243
351
|
return de_CommandError(output, context);
|
|
244
352
|
}
|
|
@@ -247,13 +355,13 @@ const de_ListServicesCommand = async (output, context) => {
|
|
|
247
355
|
});
|
|
248
356
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
249
357
|
const doc = (0, smithy_client_1.take)(data, {
|
|
250
|
-
'
|
|
358
|
+
'widgets': _ => de_WidgetsList(_, context),
|
|
251
359
|
});
|
|
252
360
|
Object.assign(contents, doc);
|
|
253
361
|
return contents;
|
|
254
362
|
};
|
|
255
|
-
exports.
|
|
256
|
-
const
|
|
363
|
+
exports.de_ListWidgetsCommand = de_ListWidgetsCommand;
|
|
364
|
+
const de_RescheduleCalendarEventCommand = async (output, context) => {
|
|
257
365
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
258
366
|
return de_CommandError(output, context);
|
|
259
367
|
}
|
|
@@ -262,12 +370,29 @@ const de_ListWidgetsCommand = async (output, context) => {
|
|
|
262
370
|
});
|
|
263
371
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
264
372
|
const doc = (0, smithy_client_1.take)(data, {
|
|
265
|
-
'
|
|
373
|
+
'channel': smithy_client_1._json,
|
|
374
|
+
'event': smithy_client_1._json,
|
|
266
375
|
});
|
|
267
376
|
Object.assign(contents, doc);
|
|
268
377
|
return contents;
|
|
269
378
|
};
|
|
270
|
-
exports.
|
|
379
|
+
exports.de_RescheduleCalendarEventCommand = de_RescheduleCalendarEventCommand;
|
|
380
|
+
const de_ScheduleCalendarEventCommand = async (output, context) => {
|
|
381
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
382
|
+
return de_CommandError(output, context);
|
|
383
|
+
}
|
|
384
|
+
const contents = (0, smithy_client_1.map)({
|
|
385
|
+
$metadata: deserializeMetadata(output),
|
|
386
|
+
});
|
|
387
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
388
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
389
|
+
'channel': smithy_client_1._json,
|
|
390
|
+
'event': smithy_client_1._json,
|
|
391
|
+
});
|
|
392
|
+
Object.assign(contents, doc);
|
|
393
|
+
return contents;
|
|
394
|
+
};
|
|
395
|
+
exports.de_ScheduleCalendarEventCommand = de_ScheduleCalendarEventCommand;
|
|
271
396
|
const de_UpdateWidgetCommand = async (output, context) => {
|
|
272
397
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
273
398
|
return de_CommandError(output, context);
|
|
@@ -406,13 +531,19 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
406
531
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
407
532
|
const _c = "company";
|
|
408
533
|
const _cI = "companyId";
|
|
409
|
-
const
|
|
534
|
+
const _d = "duration";
|
|
535
|
+
const _e = "excluded";
|
|
536
|
+
const _f = "from";
|
|
537
|
+
const _r = "reason";
|
|
410
538
|
const _rA = "retryAfter";
|
|
411
539
|
const _rL = "rateLimit";
|
|
412
540
|
const _rLR = "rateLimitRemaining";
|
|
413
541
|
const _rLRa = "rateLimitReset";
|
|
414
542
|
const _ra = "retry-after";
|
|
543
|
+
const _ro = "route";
|
|
544
|
+
const _t = "till";
|
|
415
545
|
const _tRI = "targetRouteId";
|
|
546
|
+
const _tZ = "timeZone";
|
|
416
547
|
const _xrl = "x-ratelimit-limit";
|
|
417
548
|
const _xrr = "x-ratelimit-remaining";
|
|
418
549
|
const _xrr_ = "x-ratelimit-reset";
|
package/dist-es/Kite.js
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import { KiteClient, } from "./KiteClient";
|
|
2
|
+
import { CancelCalendarEventCommand, } from "./commands/CancelCalendarEventCommand";
|
|
2
3
|
import { CreateWidgetCommand, } from "./commands/CreateWidgetCommand";
|
|
3
4
|
import { DeleteWidgetCommand, } from "./commands/DeleteWidgetCommand";
|
|
5
|
+
import { GetCalendarSlotsCommand, } from "./commands/GetCalendarSlotsCommand";
|
|
4
6
|
import { GetConfigCommand, } from "./commands/GetConfigCommand";
|
|
5
7
|
import { GetWidgetCommand, } from "./commands/GetWidgetCommand";
|
|
6
8
|
import { ListAgentsCommand, } from "./commands/ListAgentsCommand";
|
|
7
|
-
import { ListCalendarSlotsCommand, } from "./commands/ListCalendarSlotsCommand";
|
|
8
9
|
import { ListServicesCommand, } from "./commands/ListServicesCommand";
|
|
9
10
|
import { ListWidgetsCommand, } from "./commands/ListWidgetsCommand";
|
|
11
|
+
import { RescheduleCalendarEventCommand, } from "./commands/RescheduleCalendarEventCommand";
|
|
12
|
+
import { ScheduleCalendarEventCommand, } from "./commands/ScheduleCalendarEventCommand";
|
|
10
13
|
import { UpdateWidgetCommand, } from "./commands/UpdateWidgetCommand";
|
|
11
14
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
12
15
|
const commands = {
|
|
16
|
+
CancelCalendarEventCommand,
|
|
13
17
|
CreateWidgetCommand,
|
|
14
18
|
DeleteWidgetCommand,
|
|
19
|
+
GetCalendarSlotsCommand,
|
|
15
20
|
GetConfigCommand,
|
|
16
21
|
GetWidgetCommand,
|
|
17
22
|
ListAgentsCommand,
|
|
18
|
-
ListCalendarSlotsCommand,
|
|
19
23
|
ListServicesCommand,
|
|
20
24
|
ListWidgetsCommand,
|
|
25
|
+
RescheduleCalendarEventCommand,
|
|
26
|
+
ScheduleCalendarEventCommand,
|
|
21
27
|
UpdateWidgetCommand,
|
|
22
28
|
};
|
|
23
29
|
export class Kite extends KiteClient {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_CancelCalendarEventCommand, se_CancelCalendarEventCommand, } 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 CancelCalendarEventCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Kite", "CancelCalendarEvent", {})
|
|
12
|
+
.n("KiteClient", "CancelCalendarEventCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_CancelCalendarEventCommand)
|
|
15
|
+
.de(de_CancelCalendarEventCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_GetCalendarSlotsCommand, se_GetCalendarSlotsCommand, } 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 GetCalendarSlotsCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Kite", "GetCalendarSlots", {})
|
|
12
|
+
.n("KiteClient", "GetCalendarSlotsCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_GetCalendarSlotsCommand)
|
|
15
|
+
.de(de_GetCalendarSlotsCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_RescheduleCalendarEventCommand, se_RescheduleCalendarEventCommand, } 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 RescheduleCalendarEventCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Kite", "RescheduleCalendarEvent", {})
|
|
12
|
+
.n("KiteClient", "RescheduleCalendarEventCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_RescheduleCalendarEventCommand)
|
|
15
|
+
.de(de_RescheduleCalendarEventCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ScheduleCalendarEventCommand, se_ScheduleCalendarEventCommand, } 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 ScheduleCalendarEventCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Kite", "ScheduleCalendarEvent", {})
|
|
12
|
+
.n("KiteClient", "ScheduleCalendarEventCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ScheduleCalendarEventCommand)
|
|
15
|
+
.de(de_ScheduleCalendarEventCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
export * from "./CancelCalendarEventCommand";
|
|
1
2
|
export * from "./CreateWidgetCommand";
|
|
2
3
|
export * from "./DeleteWidgetCommand";
|
|
4
|
+
export * from "./GetCalendarSlotsCommand";
|
|
3
5
|
export * from "./GetConfigCommand";
|
|
4
6
|
export * from "./GetWidgetCommand";
|
|
5
7
|
export * from "./ListAgentsCommand";
|
|
6
|
-
export * from "./ListCalendarSlotsCommand";
|
|
7
8
|
export * from "./ListServicesCommand";
|
|
8
9
|
export * from "./ListWidgetsCommand";
|
|
10
|
+
export * from "./RescheduleCalendarEventCommand";
|
|
11
|
+
export * from "./ScheduleCalendarEventCommand";
|
|
9
12
|
export * from "./UpdateWidgetCommand";
|
|
@@ -39,6 +39,10 @@ export class RateLimitExceededException extends __BaseException {
|
|
|
39
39
|
this.retryAfter = opts.retryAfter;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
export const ChannelType = {
|
|
43
|
+
DIRECT: "direct",
|
|
44
|
+
GROUP: "group",
|
|
45
|
+
};
|
|
42
46
|
export var ButtonHandler;
|
|
43
47
|
(function (ButtonHandler) {
|
|
44
48
|
ButtonHandler.visit = (value, visitor) => {
|
|
@@ -63,6 +67,22 @@ export var ActionElement;
|
|
|
63
67
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
64
68
|
};
|
|
65
69
|
})(ActionElement || (ActionElement = {}));
|
|
70
|
+
export const ChannelAccess = {
|
|
71
|
+
PRIVATE: "private",
|
|
72
|
+
PUBLIC: "public",
|
|
73
|
+
};
|
|
74
|
+
export const ChannelContextEventAttendeeStatus = {
|
|
75
|
+
ACCEPTED: "accepted",
|
|
76
|
+
DECLINED: "declined",
|
|
77
|
+
NONE: "none",
|
|
78
|
+
TENTATIVE: "tentative",
|
|
79
|
+
};
|
|
80
|
+
export const ChannelContextSource = {
|
|
81
|
+
KITE: "kite",
|
|
82
|
+
};
|
|
83
|
+
export const ChannelWhatsAppStatus = {
|
|
84
|
+
CHANNEL_CLOSED: "24h_channel_closed",
|
|
85
|
+
};
|
|
66
86
|
export var Element;
|
|
67
87
|
(function (Element) {
|
|
68
88
|
Element.visit = (value, visitor) => {
|
|
@@ -77,8 +97,8 @@ export const WidgetRouteTimeFrameDay = {
|
|
|
77
97
|
MONDAY: "MONDAY",
|
|
78
98
|
SATURDAY: "SATURDAY",
|
|
79
99
|
SUNDAY: "SUNDAY",
|
|
80
|
-
THUESDAY: "THUESDAY",
|
|
81
100
|
THURSDAY: "THURSDAY",
|
|
101
|
+
TUESDAY: "TUESDAY",
|
|
82
102
|
WEDNESDAY: "WEDNESDAY",
|
|
83
103
|
WEEKDAYS: "WEEKDAYS",
|
|
84
104
|
WEEKENDS: "WEEKENDS",
|