@wildix/xbees-kite-client 1.0.10 → 1.0.12
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 +2 -2
- package/dist-cjs/commands/{GetCalendarAvailabilityCommand.js → GetCalendarSlotsCommand.js} +7 -7
- package/dist-cjs/commands/index.js +1 -1
- package/dist-cjs/models/models_0.js +34 -8
- package/dist-cjs/protocols/Aws_restJson1.js +69 -13
- package/dist-es/Kite.js +2 -2
- package/dist-es/commands/GetCalendarSlotsCommand.js +17 -0
- package/dist-es/commands/index.js +1 -1
- package/dist-es/models/models_0.js +31 -7
- package/dist-es/protocols/Aws_restJson1.js +68 -12
- package/dist-types/Kite.d.ts +5 -5
- package/dist-types/KiteClient.d.ts +3 -3
- package/dist-types/commands/CancelCalendarEventCommand.d.ts +2 -0
- package/dist-types/commands/CreateWidgetCommand.d.ts +82 -22
- package/dist-types/commands/{GetCalendarAvailabilityCommand.d.ts → GetCalendarSlotsCommand.d.ts} +21 -19
- package/dist-types/commands/GetWidgetCommand.d.ts +41 -11
- package/dist-types/commands/ListWidgetsCommand.d.ts +41 -11
- package/dist-types/commands/RescheduleCalendarEventCommand.d.ts +4 -0
- package/dist-types/commands/ScheduleCalendarEventCommand.d.ts +4 -0
- package/dist-types/commands/UpdateWidgetCommand.d.ts +82 -22
- package/dist-types/commands/index.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +51 -24
- package/dist-types/protocols/Aws_restJson1.d.ts +5 -5
- package/package.json +1 -1
- package/dist-es/commands/GetCalendarAvailabilityCommand.js +0 -17
package/dist-cjs/Kite.js
CHANGED
|
@@ -5,7 +5,7 @@ const KiteClient_1 = require("./KiteClient");
|
|
|
5
5
|
const CancelCalendarEventCommand_1 = require("./commands/CancelCalendarEventCommand");
|
|
6
6
|
const CreateWidgetCommand_1 = require("./commands/CreateWidgetCommand");
|
|
7
7
|
const DeleteWidgetCommand_1 = require("./commands/DeleteWidgetCommand");
|
|
8
|
-
const
|
|
8
|
+
const GetCalendarSlotsCommand_1 = require("./commands/GetCalendarSlotsCommand");
|
|
9
9
|
const GetConfigCommand_1 = require("./commands/GetConfigCommand");
|
|
10
10
|
const GetWidgetCommand_1 = require("./commands/GetWidgetCommand");
|
|
11
11
|
const ListAgentsCommand_1 = require("./commands/ListAgentsCommand");
|
|
@@ -19,7 +19,7 @@ const commands = {
|
|
|
19
19
|
CancelCalendarEventCommand: CancelCalendarEventCommand_1.CancelCalendarEventCommand,
|
|
20
20
|
CreateWidgetCommand: CreateWidgetCommand_1.CreateWidgetCommand,
|
|
21
21
|
DeleteWidgetCommand: DeleteWidgetCommand_1.DeleteWidgetCommand,
|
|
22
|
-
|
|
22
|
+
GetCalendarSlotsCommand: GetCalendarSlotsCommand_1.GetCalendarSlotsCommand,
|
|
23
23
|
GetConfigCommand: GetConfigCommand_1.GetConfigCommand,
|
|
24
24
|
GetWidgetCommand: GetWidgetCommand_1.GetWidgetCommand,
|
|
25
25
|
ListAgentsCommand: ListAgentsCommand_1.ListAgentsCommand,
|
|
@@ -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;
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./CancelCalendarEventCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./CreateWidgetCommand"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./DeleteWidgetCommand"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./
|
|
7
|
+
tslib_1.__exportStar(require("./GetCalendarSlotsCommand"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./GetConfigCommand"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./GetWidgetCommand"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./ListAgentsCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListAgentsFilter = exports.WidgetNotFoundException = exports.
|
|
3
|
+
exports.ListAgentsFilter = exports.WidgetNotFoundException = exports.KiteVariant = exports.KiteFeatures = exports.TargetNotFoundException = exports.EventNotFoundException = exports.WidgetTarget = exports.WidgetRouteRule = exports.WidgetRouteTimeFrameDay = exports.Element = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelAccess = exports.ChannelNotFoundException = 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) {
|
|
@@ -73,6 +73,19 @@ var ActionElement;
|
|
|
73
73
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
74
74
|
};
|
|
75
75
|
})(ActionElement = exports.ActionElement || (exports.ActionElement = {}));
|
|
76
|
+
class ChannelNotFoundException extends KiteServiceException_1.KiteServiceException {
|
|
77
|
+
constructor(opts) {
|
|
78
|
+
super({
|
|
79
|
+
name: "ChannelNotFoundException",
|
|
80
|
+
$fault: "client",
|
|
81
|
+
...opts
|
|
82
|
+
});
|
|
83
|
+
this.name = "ChannelNotFoundException";
|
|
84
|
+
this.$fault = "client";
|
|
85
|
+
Object.setPrototypeOf(this, ChannelNotFoundException.prototype);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.ChannelNotFoundException = ChannelNotFoundException;
|
|
76
89
|
exports.ChannelAccess = {
|
|
77
90
|
PRIVATE: "private",
|
|
78
91
|
PUBLIC: "public",
|
|
@@ -129,13 +142,19 @@ var WidgetTarget;
|
|
|
129
142
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
130
143
|
};
|
|
131
144
|
})(WidgetTarget = exports.WidgetTarget || (exports.WidgetTarget = {}));
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
};
|
|
145
|
+
class EventNotFoundException extends KiteServiceException_1.KiteServiceException {
|
|
146
|
+
constructor(opts) {
|
|
147
|
+
super({
|
|
148
|
+
name: "EventNotFoundException",
|
|
149
|
+
$fault: "client",
|
|
150
|
+
...opts
|
|
151
|
+
});
|
|
152
|
+
this.name = "EventNotFoundException";
|
|
153
|
+
this.$fault = "client";
|
|
154
|
+
Object.setPrototypeOf(this, EventNotFoundException.prototype);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
exports.EventNotFoundException = EventNotFoundException;
|
|
139
158
|
class TargetNotFoundException extends KiteServiceException_1.KiteServiceException {
|
|
140
159
|
constructor(opts) {
|
|
141
160
|
super({
|
|
@@ -149,6 +168,13 @@ class TargetNotFoundException extends KiteServiceException_1.KiteServiceExceptio
|
|
|
149
168
|
}
|
|
150
169
|
}
|
|
151
170
|
exports.TargetNotFoundException = TargetNotFoundException;
|
|
171
|
+
exports.KiteFeatures = {
|
|
172
|
+
SCHEDULING: "scheduling",
|
|
173
|
+
};
|
|
174
|
+
exports.KiteVariant = {
|
|
175
|
+
DIRECT: "direct",
|
|
176
|
+
GROUP: "group",
|
|
177
|
+
};
|
|
152
178
|
class WidgetNotFoundException extends KiteServiceException_1.KiteServiceException {
|
|
153
179
|
constructor(opts) {
|
|
154
180
|
super({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.
|
|
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");
|
|
@@ -36,7 +36,7 @@ const se_CreateWidgetCommand = async (input, context) => {
|
|
|
36
36
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
37
37
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
38
38
|
'name': [],
|
|
39
|
-
'routes': _ => (
|
|
39
|
+
'routes': _ => se_WidgetRoutesList(_, context),
|
|
40
40
|
'target': _ => (0, smithy_client_1._json)(_),
|
|
41
41
|
'welcomeMessages': _ => (0, smithy_client_1._json)(_),
|
|
42
42
|
}));
|
|
@@ -59,10 +59,10 @@ const se_DeleteWidgetCommand = async (input, context) => {
|
|
|
59
59
|
return b.build();
|
|
60
60
|
};
|
|
61
61
|
exports.se_DeleteWidgetCommand = se_DeleteWidgetCommand;
|
|
62
|
-
const
|
|
62
|
+
const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
63
63
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
64
64
|
const headers = {};
|
|
65
|
-
b.bp("/v2/kite/calendar/widgets/{targetId}/
|
|
65
|
+
b.bp("/v2/kite/calendar/widgets/{targetId}/slots");
|
|
66
66
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
67
67
|
const query = (0, smithy_client_1.map)({
|
|
68
68
|
[_f]: [, (0, smithy_client_1.expectNonNull)(input[_f], `from`)],
|
|
@@ -78,7 +78,7 @@ const se_GetCalendarAvailabilityCommand = async (input, context) => {
|
|
|
78
78
|
.b(body);
|
|
79
79
|
return b.build();
|
|
80
80
|
};
|
|
81
|
-
exports.
|
|
81
|
+
exports.se_GetCalendarSlotsCommand = se_GetCalendarSlotsCommand;
|
|
82
82
|
const se_GetConfigCommand = async (input, context) => {
|
|
83
83
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
84
84
|
const headers = {};
|
|
@@ -218,7 +218,7 @@ const se_UpdateWidgetCommand = async (input, context) => {
|
|
|
218
218
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
219
219
|
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
220
220
|
'name': [],
|
|
221
|
-
'routes': _ => (
|
|
221
|
+
'routes': _ => se_WidgetRoutesList(_, context),
|
|
222
222
|
'target': _ => (0, smithy_client_1._json)(_),
|
|
223
223
|
'welcomeMessages': _ => (0, smithy_client_1._json)(_),
|
|
224
224
|
}));
|
|
@@ -254,7 +254,7 @@ const de_CreateWidgetCommand = async (output, context) => {
|
|
|
254
254
|
});
|
|
255
255
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
256
256
|
const doc = (0, smithy_client_1.take)(data, {
|
|
257
|
-
'widget':
|
|
257
|
+
'widget': _ => de_Widget(_, context),
|
|
258
258
|
});
|
|
259
259
|
Object.assign(contents, doc);
|
|
260
260
|
return contents;
|
|
@@ -271,7 +271,7 @@ const de_DeleteWidgetCommand = async (output, context) => {
|
|
|
271
271
|
return contents;
|
|
272
272
|
};
|
|
273
273
|
exports.de_DeleteWidgetCommand = de_DeleteWidgetCommand;
|
|
274
|
-
const
|
|
274
|
+
const de_GetCalendarSlotsCommand = async (output, context) => {
|
|
275
275
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
276
276
|
return de_CommandError(output, context);
|
|
277
277
|
}
|
|
@@ -280,12 +280,12 @@ const de_GetCalendarAvailabilityCommand = async (output, context) => {
|
|
|
280
280
|
});
|
|
281
281
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
282
282
|
const doc = (0, smithy_client_1.take)(data, {
|
|
283
|
-
'
|
|
283
|
+
'calendar': smithy_client_1._json,
|
|
284
284
|
});
|
|
285
285
|
Object.assign(contents, doc);
|
|
286
286
|
return contents;
|
|
287
287
|
};
|
|
288
|
-
exports.
|
|
288
|
+
exports.de_GetCalendarSlotsCommand = de_GetCalendarSlotsCommand;
|
|
289
289
|
const de_GetConfigCommand = async (output, context) => {
|
|
290
290
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
291
291
|
return de_CommandError(output, context);
|
|
@@ -310,7 +310,7 @@ const de_GetWidgetCommand = async (output, context) => {
|
|
|
310
310
|
});
|
|
311
311
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
312
312
|
const doc = (0, smithy_client_1.take)(data, {
|
|
313
|
-
'widget':
|
|
313
|
+
'widget': _ => de_Widget(_, context),
|
|
314
314
|
});
|
|
315
315
|
Object.assign(contents, doc);
|
|
316
316
|
return contents;
|
|
@@ -402,7 +402,7 @@ const de_UpdateWidgetCommand = async (output, context) => {
|
|
|
402
402
|
});
|
|
403
403
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
404
404
|
const doc = (0, smithy_client_1.take)(data, {
|
|
405
|
-
'widget':
|
|
405
|
+
'widget': _ => de_Widget(_, context),
|
|
406
406
|
});
|
|
407
407
|
Object.assign(contents, doc);
|
|
408
408
|
return contents;
|
|
@@ -415,6 +415,9 @@ const de_CommandError = async (output, context) => {
|
|
|
415
415
|
};
|
|
416
416
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
417
417
|
switch (errorCode) {
|
|
418
|
+
case "ChannelNotFoundException":
|
|
419
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
420
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
418
421
|
case "ForbiddenException":
|
|
419
422
|
case "smithy.framework#ForbiddenException":
|
|
420
423
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -430,6 +433,9 @@ const de_CommandError = async (output, context) => {
|
|
|
430
433
|
case "WidgetNotFoundException":
|
|
431
434
|
case "wildix.xbees.kite#WidgetNotFoundException":
|
|
432
435
|
throw await de_WidgetNotFoundExceptionRes(parsedOutput, context);
|
|
436
|
+
case "EventNotFoundException":
|
|
437
|
+
case "wildix.xbees.kite#EventNotFoundException":
|
|
438
|
+
throw await de_EventNotFoundExceptionRes(parsedOutput, context);
|
|
433
439
|
default:
|
|
434
440
|
const parsedBody = parsedOutput.body;
|
|
435
441
|
return throwDefaultError({
|
|
@@ -484,6 +490,32 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
484
490
|
});
|
|
485
491
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
486
492
|
};
|
|
493
|
+
const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
494
|
+
const contents = (0, smithy_client_1.map)({});
|
|
495
|
+
const data = parsedOutput.body;
|
|
496
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
497
|
+
'message': smithy_client_1.expectString,
|
|
498
|
+
});
|
|
499
|
+
Object.assign(contents, doc);
|
|
500
|
+
const exception = new models_0_1.ChannelNotFoundException({
|
|
501
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
502
|
+
...contents
|
|
503
|
+
});
|
|
504
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
505
|
+
};
|
|
506
|
+
const de_EventNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
507
|
+
const contents = (0, smithy_client_1.map)({});
|
|
508
|
+
const data = parsedOutput.body;
|
|
509
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
510
|
+
'message': smithy_client_1.expectString,
|
|
511
|
+
});
|
|
512
|
+
Object.assign(contents, doc);
|
|
513
|
+
const exception = new models_0_1.EventNotFoundException({
|
|
514
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
515
|
+
...contents
|
|
516
|
+
});
|
|
517
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
518
|
+
};
|
|
487
519
|
const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
488
520
|
const contents = (0, smithy_client_1.map)({});
|
|
489
521
|
const data = parsedOutput.body;
|
|
@@ -510,12 +542,36 @@ const de_WidgetNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
510
542
|
});
|
|
511
543
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
512
544
|
};
|
|
513
|
-
const
|
|
545
|
+
const se_WidgetRoutesList = (input, context) => {
|
|
546
|
+
return input.filter((e) => e != null).map(entry => {
|
|
547
|
+
return (0, smithy_client_1._json)(entry);
|
|
548
|
+
});
|
|
549
|
+
};
|
|
550
|
+
const de_Widget = (output, context) => {
|
|
551
|
+
return (0, smithy_client_1.take)(output, {
|
|
552
|
+
'appearance': smithy_client_1._json,
|
|
553
|
+
'company': smithy_client_1.expectString,
|
|
554
|
+
'createdAt': smithy_client_1.expectString,
|
|
555
|
+
'id': smithy_client_1.expectString,
|
|
556
|
+
'name': smithy_client_1.expectString,
|
|
557
|
+
'routes': (_) => de_WidgetRoutesList(_, context),
|
|
558
|
+
'target': (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
|
|
559
|
+
'updatedAt': smithy_client_1.expectString,
|
|
560
|
+
'welcomeMessages': smithy_client_1._json,
|
|
561
|
+
});
|
|
562
|
+
};
|
|
563
|
+
const de_WidgetRoutesList = (output, context) => {
|
|
514
564
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
515
565
|
return (0, smithy_client_1._json)(entry);
|
|
516
566
|
});
|
|
517
567
|
return retVal;
|
|
518
568
|
};
|
|
569
|
+
const de_WidgetsList = (output, context) => {
|
|
570
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
571
|
+
return de_Widget(entry, context);
|
|
572
|
+
});
|
|
573
|
+
return retVal;
|
|
574
|
+
};
|
|
519
575
|
const deserializeMetadata = (output) => ({
|
|
520
576
|
httpStatusCode: output.statusCode,
|
|
521
577
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/Kite.js
CHANGED
|
@@ -2,7 +2,7 @@ import { KiteClient, } from "./KiteClient";
|
|
|
2
2
|
import { CancelCalendarEventCommand, } from "./commands/CancelCalendarEventCommand";
|
|
3
3
|
import { CreateWidgetCommand, } from "./commands/CreateWidgetCommand";
|
|
4
4
|
import { DeleteWidgetCommand, } from "./commands/DeleteWidgetCommand";
|
|
5
|
-
import {
|
|
5
|
+
import { GetCalendarSlotsCommand, } from "./commands/GetCalendarSlotsCommand";
|
|
6
6
|
import { GetConfigCommand, } from "./commands/GetConfigCommand";
|
|
7
7
|
import { GetWidgetCommand, } from "./commands/GetWidgetCommand";
|
|
8
8
|
import { ListAgentsCommand, } from "./commands/ListAgentsCommand";
|
|
@@ -16,7 +16,7 @@ const commands = {
|
|
|
16
16
|
CancelCalendarEventCommand,
|
|
17
17
|
CreateWidgetCommand,
|
|
18
18
|
DeleteWidgetCommand,
|
|
19
|
-
|
|
19
|
+
GetCalendarSlotsCommand,
|
|
20
20
|
GetConfigCommand,
|
|
21
21
|
GetWidgetCommand,
|
|
22
22
|
ListAgentsCommand,
|
|
@@ -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
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./CancelCalendarEventCommand";
|
|
2
2
|
export * from "./CreateWidgetCommand";
|
|
3
3
|
export * from "./DeleteWidgetCommand";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./GetCalendarSlotsCommand";
|
|
5
5
|
export * from "./GetConfigCommand";
|
|
6
6
|
export * from "./GetWidgetCommand";
|
|
7
7
|
export * from "./ListAgentsCommand";
|
|
@@ -67,6 +67,18 @@ export var ActionElement;
|
|
|
67
67
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
68
68
|
};
|
|
69
69
|
})(ActionElement || (ActionElement = {}));
|
|
70
|
+
export class ChannelNotFoundException extends __BaseException {
|
|
71
|
+
constructor(opts) {
|
|
72
|
+
super({
|
|
73
|
+
name: "ChannelNotFoundException",
|
|
74
|
+
$fault: "client",
|
|
75
|
+
...opts
|
|
76
|
+
});
|
|
77
|
+
this.name = "ChannelNotFoundException";
|
|
78
|
+
this.$fault = "client";
|
|
79
|
+
Object.setPrototypeOf(this, ChannelNotFoundException.prototype);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
70
82
|
export const ChannelAccess = {
|
|
71
83
|
PRIVATE: "private",
|
|
72
84
|
PUBLIC: "public",
|
|
@@ -123,13 +135,18 @@ export var WidgetTarget;
|
|
|
123
135
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
124
136
|
};
|
|
125
137
|
})(WidgetTarget || (WidgetTarget = {}));
|
|
126
|
-
export
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
};
|
|
138
|
+
export class EventNotFoundException extends __BaseException {
|
|
139
|
+
constructor(opts) {
|
|
140
|
+
super({
|
|
141
|
+
name: "EventNotFoundException",
|
|
142
|
+
$fault: "client",
|
|
143
|
+
...opts
|
|
144
|
+
});
|
|
145
|
+
this.name = "EventNotFoundException";
|
|
146
|
+
this.$fault = "client";
|
|
147
|
+
Object.setPrototypeOf(this, EventNotFoundException.prototype);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
133
150
|
export class TargetNotFoundException extends __BaseException {
|
|
134
151
|
constructor(opts) {
|
|
135
152
|
super({
|
|
@@ -142,6 +159,13 @@ export class TargetNotFoundException extends __BaseException {
|
|
|
142
159
|
Object.setPrototypeOf(this, TargetNotFoundException.prototype);
|
|
143
160
|
}
|
|
144
161
|
}
|
|
162
|
+
export const KiteFeatures = {
|
|
163
|
+
SCHEDULING: "scheduling",
|
|
164
|
+
};
|
|
165
|
+
export const KiteVariant = {
|
|
166
|
+
DIRECT: "direct",
|
|
167
|
+
GROUP: "group",
|
|
168
|
+
};
|
|
145
169
|
export class WidgetNotFoundException extends __BaseException {
|
|
146
170
|
constructor(opts) {
|
|
147
171
|
super({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KiteServiceException as __BaseException } from "../models/KiteServiceException";
|
|
2
|
-
import { ForbiddenException, RateLimitExceededException, TargetNotFoundException, ValidationException, WidgetNotFoundException, } from "../models/models_0";
|
|
2
|
+
import { ChannelNotFoundException, EventNotFoundException, ForbiddenException, RateLimitExceededException, TargetNotFoundException, ValidationException, WidgetNotFoundException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
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";
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, strictParseInt32 as __strictParseInt32, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_CancelCalendarEventCommand = async (input, context) => {
|
|
6
6
|
const b = rb(input, context);
|
|
7
7
|
const headers = {};
|
|
@@ -32,7 +32,7 @@ export const se_CreateWidgetCommand = async (input, context) => {
|
|
|
32
32
|
body = JSON.stringify(take(input, {
|
|
33
33
|
'appearance': _ => _json(_),
|
|
34
34
|
'name': [],
|
|
35
|
-
'routes': _ =>
|
|
35
|
+
'routes': _ => se_WidgetRoutesList(_, context),
|
|
36
36
|
'target': _ => _json(_),
|
|
37
37
|
'welcomeMessages': _ => _json(_),
|
|
38
38
|
}));
|
|
@@ -53,10 +53,10 @@ export const se_DeleteWidgetCommand = async (input, context) => {
|
|
|
53
53
|
.b(body);
|
|
54
54
|
return b.build();
|
|
55
55
|
};
|
|
56
|
-
export const
|
|
56
|
+
export const se_GetCalendarSlotsCommand = async (input, context) => {
|
|
57
57
|
const b = rb(input, context);
|
|
58
58
|
const headers = {};
|
|
59
|
-
b.bp("/v2/kite/calendar/widgets/{targetId}/
|
|
59
|
+
b.bp("/v2/kite/calendar/widgets/{targetId}/slots");
|
|
60
60
|
b.p('targetId', () => input.targetId, '{targetId}', false);
|
|
61
61
|
const query = map({
|
|
62
62
|
[_f]: [, __expectNonNull(input[_f], `from`)],
|
|
@@ -204,7 +204,7 @@ export const se_UpdateWidgetCommand = async (input, context) => {
|
|
|
204
204
|
body = JSON.stringify(take(input, {
|
|
205
205
|
'appearance': _ => _json(_),
|
|
206
206
|
'name': [],
|
|
207
|
-
'routes': _ =>
|
|
207
|
+
'routes': _ => se_WidgetRoutesList(_, context),
|
|
208
208
|
'target': _ => _json(_),
|
|
209
209
|
'welcomeMessages': _ => _json(_),
|
|
210
210
|
}));
|
|
@@ -238,7 +238,7 @@ export const de_CreateWidgetCommand = async (output, context) => {
|
|
|
238
238
|
});
|
|
239
239
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
240
240
|
const doc = take(data, {
|
|
241
|
-
'widget':
|
|
241
|
+
'widget': _ => de_Widget(_, context),
|
|
242
242
|
});
|
|
243
243
|
Object.assign(contents, doc);
|
|
244
244
|
return contents;
|
|
@@ -253,7 +253,7 @@ export const de_DeleteWidgetCommand = async (output, context) => {
|
|
|
253
253
|
await collectBody(output.body, context);
|
|
254
254
|
return contents;
|
|
255
255
|
};
|
|
256
|
-
export const
|
|
256
|
+
export const de_GetCalendarSlotsCommand = async (output, context) => {
|
|
257
257
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
258
258
|
return de_CommandError(output, context);
|
|
259
259
|
}
|
|
@@ -262,7 +262,7 @@ export const de_GetCalendarAvailabilityCommand = async (output, context) => {
|
|
|
262
262
|
});
|
|
263
263
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
264
264
|
const doc = take(data, {
|
|
265
|
-
'
|
|
265
|
+
'calendar': _json,
|
|
266
266
|
});
|
|
267
267
|
Object.assign(contents, doc);
|
|
268
268
|
return contents;
|
|
@@ -290,7 +290,7 @@ export const de_GetWidgetCommand = async (output, context) => {
|
|
|
290
290
|
});
|
|
291
291
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
292
292
|
const doc = take(data, {
|
|
293
|
-
'widget':
|
|
293
|
+
'widget': _ => de_Widget(_, context),
|
|
294
294
|
});
|
|
295
295
|
Object.assign(contents, doc);
|
|
296
296
|
return contents;
|
|
@@ -376,7 +376,7 @@ export const de_UpdateWidgetCommand = async (output, context) => {
|
|
|
376
376
|
});
|
|
377
377
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
378
378
|
const doc = take(data, {
|
|
379
|
-
'widget':
|
|
379
|
+
'widget': _ => de_Widget(_, context),
|
|
380
380
|
});
|
|
381
381
|
Object.assign(contents, doc);
|
|
382
382
|
return contents;
|
|
@@ -388,6 +388,9 @@ const de_CommandError = async (output, context) => {
|
|
|
388
388
|
};
|
|
389
389
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
390
390
|
switch (errorCode) {
|
|
391
|
+
case "ChannelNotFoundException":
|
|
392
|
+
case "wildix.xbees.conversations#ChannelNotFoundException":
|
|
393
|
+
throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
|
|
391
394
|
case "ForbiddenException":
|
|
392
395
|
case "smithy.framework#ForbiddenException":
|
|
393
396
|
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
@@ -403,6 +406,9 @@ const de_CommandError = async (output, context) => {
|
|
|
403
406
|
case "WidgetNotFoundException":
|
|
404
407
|
case "wildix.xbees.kite#WidgetNotFoundException":
|
|
405
408
|
throw await de_WidgetNotFoundExceptionRes(parsedOutput, context);
|
|
409
|
+
case "EventNotFoundException":
|
|
410
|
+
case "wildix.xbees.kite#EventNotFoundException":
|
|
411
|
+
throw await de_EventNotFoundExceptionRes(parsedOutput, context);
|
|
406
412
|
default:
|
|
407
413
|
const parsedBody = parsedOutput.body;
|
|
408
414
|
return throwDefaultError({
|
|
@@ -457,6 +463,32 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
457
463
|
});
|
|
458
464
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
459
465
|
};
|
|
466
|
+
const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
467
|
+
const contents = map({});
|
|
468
|
+
const data = parsedOutput.body;
|
|
469
|
+
const doc = take(data, {
|
|
470
|
+
'message': __expectString,
|
|
471
|
+
});
|
|
472
|
+
Object.assign(contents, doc);
|
|
473
|
+
const exception = new ChannelNotFoundException({
|
|
474
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
475
|
+
...contents
|
|
476
|
+
});
|
|
477
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
478
|
+
};
|
|
479
|
+
const de_EventNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
480
|
+
const contents = map({});
|
|
481
|
+
const data = parsedOutput.body;
|
|
482
|
+
const doc = take(data, {
|
|
483
|
+
'message': __expectString,
|
|
484
|
+
});
|
|
485
|
+
Object.assign(contents, doc);
|
|
486
|
+
const exception = new EventNotFoundException({
|
|
487
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
488
|
+
...contents
|
|
489
|
+
});
|
|
490
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
491
|
+
};
|
|
460
492
|
const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
461
493
|
const contents = map({});
|
|
462
494
|
const data = parsedOutput.body;
|
|
@@ -483,12 +515,36 @@ const de_WidgetNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
483
515
|
});
|
|
484
516
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
485
517
|
};
|
|
486
|
-
const
|
|
518
|
+
const se_WidgetRoutesList = (input, context) => {
|
|
519
|
+
return input.filter((e) => e != null).map(entry => {
|
|
520
|
+
return _json(entry);
|
|
521
|
+
});
|
|
522
|
+
};
|
|
523
|
+
const de_Widget = (output, context) => {
|
|
524
|
+
return take(output, {
|
|
525
|
+
'appearance': _json,
|
|
526
|
+
'company': __expectString,
|
|
527
|
+
'createdAt': __expectString,
|
|
528
|
+
'id': __expectString,
|
|
529
|
+
'name': __expectString,
|
|
530
|
+
'routes': (_) => de_WidgetRoutesList(_, context),
|
|
531
|
+
'target': (_) => _json(__expectUnion(_)),
|
|
532
|
+
'updatedAt': __expectString,
|
|
533
|
+
'welcomeMessages': _json,
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
const de_WidgetRoutesList = (output, context) => {
|
|
487
537
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
488
538
|
return _json(entry);
|
|
489
539
|
});
|
|
490
540
|
return retVal;
|
|
491
541
|
};
|
|
542
|
+
const de_WidgetsList = (output, context) => {
|
|
543
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
544
|
+
return de_Widget(entry, context);
|
|
545
|
+
});
|
|
546
|
+
return retVal;
|
|
547
|
+
};
|
|
492
548
|
const deserializeMetadata = (output) => ({
|
|
493
549
|
httpStatusCode: output.statusCode,
|
|
494
550
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-types/Kite.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { KiteClient } from "./KiteClient";
|
|
|
2
2
|
import { CancelCalendarEventCommandInput, CancelCalendarEventCommandOutput } from "./commands/CancelCalendarEventCommand";
|
|
3
3
|
import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/CreateWidgetCommand";
|
|
4
4
|
import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
|
|
5
|
-
import {
|
|
5
|
+
import { GetCalendarSlotsCommandInput, GetCalendarSlotsCommandOutput } from "./commands/GetCalendarSlotsCommand";
|
|
6
6
|
import { GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
|
|
7
7
|
import { GetWidgetCommandInput, GetWidgetCommandOutput } from "./commands/GetWidgetCommand";
|
|
8
8
|
import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
|
|
@@ -32,11 +32,11 @@ export interface Kite {
|
|
|
32
32
|
deleteWidget(args: DeleteWidgetCommandInput, cb: (err: any, data?: DeleteWidgetCommandOutput) => void): void;
|
|
33
33
|
deleteWidget(args: DeleteWidgetCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteWidgetCommandOutput) => void): void;
|
|
34
34
|
/**
|
|
35
|
-
* @see {@link
|
|
35
|
+
* @see {@link GetCalendarSlotsCommand}
|
|
36
36
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
getCalendarSlots(args: GetCalendarSlotsCommandInput, options?: __HttpHandlerOptions): Promise<GetCalendarSlotsCommandOutput>;
|
|
38
|
+
getCalendarSlots(args: GetCalendarSlotsCommandInput, cb: (err: any, data?: GetCalendarSlotsCommandOutput) => void): void;
|
|
39
|
+
getCalendarSlots(args: GetCalendarSlotsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetCalendarSlotsCommandOutput) => void): void;
|
|
40
40
|
/**
|
|
41
41
|
* @see {@link GetConfigCommand}
|
|
42
42
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelCalendarEventCommandInput, CancelCalendarEventCommandOutput } from "./commands/CancelCalendarEventCommand";
|
|
2
2
|
import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/CreateWidgetCommand";
|
|
3
3
|
import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
|
|
4
|
-
import {
|
|
4
|
+
import { GetCalendarSlotsCommandInput, GetCalendarSlotsCommandOutput } from "./commands/GetCalendarSlotsCommand";
|
|
5
5
|
import { GetConfigCommandInput, GetConfigCommandOutput } from "./commands/GetConfigCommand";
|
|
6
6
|
import { GetWidgetCommandInput, GetWidgetCommandOutput } from "./commands/GetWidgetCommand";
|
|
7
7
|
import { ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
|
|
@@ -21,11 +21,11 @@ export { __Client };
|
|
|
21
21
|
/**
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
export type ServiceInputTypes = CancelCalendarEventCommandInput | CreateWidgetCommandInput | DeleteWidgetCommandInput |
|
|
24
|
+
export type ServiceInputTypes = CancelCalendarEventCommandInput | CreateWidgetCommandInput | DeleteWidgetCommandInput | GetCalendarSlotsCommandInput | GetConfigCommandInput | GetWidgetCommandInput | ListAgentsCommandInput | ListServicesCommandInput | ListWidgetsCommandInput | RescheduleCalendarEventCommandInput | ScheduleCalendarEventCommandInput | UpdateWidgetCommandInput;
|
|
25
25
|
/**
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
export type ServiceOutputTypes = CancelCalendarEventCommandOutput | CreateWidgetCommandOutput | DeleteWidgetCommandOutput |
|
|
28
|
+
export type ServiceOutputTypes = CancelCalendarEventCommandOutput | CreateWidgetCommandOutput | DeleteWidgetCommandOutput | GetCalendarSlotsCommandOutput | GetConfigCommandOutput | GetWidgetCommandOutput | ListAgentsCommandOutput | ListServicesCommandOutput | ListWidgetsCommandOutput | RescheduleCalendarEventCommandOutput | ScheduleCalendarEventCommandOutput | UpdateWidgetCommandOutput;
|
|
29
29
|
/**
|
|
30
30
|
* @public
|
|
31
31
|
*/
|