@wildix/xbees-kite-client 1.0.14 → 1.0.15
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 -0
- package/dist-cjs/commands/CreateOrUpdateWidgetPreviewCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +41 -1
- package/dist-es/Kite.js +2 -0
- package/dist-es/commands/CreateOrUpdateWidgetPreviewCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +38 -0
- package/dist-types/Kite.d.ts +7 -0
- package/dist-types/KiteClient.d.ts +3 -2
- package/dist-types/commands/CreateOrUpdateWidgetPreviewCommand.d.ts +296 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +39 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
package/dist-cjs/Kite.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Kite = void 0;
|
|
4
4
|
const KiteClient_1 = require("./KiteClient");
|
|
5
5
|
const CancelCalendarEventCommand_1 = require("./commands/CancelCalendarEventCommand");
|
|
6
|
+
const CreateOrUpdateWidgetPreviewCommand_1 = require("./commands/CreateOrUpdateWidgetPreviewCommand");
|
|
6
7
|
const CreateWidgetCommand_1 = require("./commands/CreateWidgetCommand");
|
|
7
8
|
const DeleteWidgetCommand_1 = require("./commands/DeleteWidgetCommand");
|
|
8
9
|
const GetCalendarSlotsCommand_1 = require("./commands/GetCalendarSlotsCommand");
|
|
@@ -17,6 +18,7 @@ const UpdateWidgetCommand_1 = require("./commands/UpdateWidgetCommand");
|
|
|
17
18
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
18
19
|
const commands = {
|
|
19
20
|
CancelCalendarEventCommand: CancelCalendarEventCommand_1.CancelCalendarEventCommand,
|
|
21
|
+
CreateOrUpdateWidgetPreviewCommand: CreateOrUpdateWidgetPreviewCommand_1.CreateOrUpdateWidgetPreviewCommand,
|
|
20
22
|
CreateWidgetCommand: CreateWidgetCommand_1.CreateWidgetCommand,
|
|
21
23
|
DeleteWidgetCommand: DeleteWidgetCommand_1.DeleteWidgetCommand,
|
|
22
24
|
GetCalendarSlotsCommand: GetCalendarSlotsCommand_1.GetCalendarSlotsCommand,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateOrUpdateWidgetPreviewCommand = 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 CreateOrUpdateWidgetPreviewCommand 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", "CreateOrUpdateWidgetPreview", {})
|
|
15
|
+
.n("KiteClient", "CreateOrUpdateWidgetPreviewCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_CreateOrUpdateWidgetPreviewCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_CreateOrUpdateWidgetPreviewCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.CreateOrUpdateWidgetPreviewCommand = CreateOrUpdateWidgetPreviewCommand;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./CancelCalendarEventCommand"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./CreateOrUpdateWidgetPreviewCommand"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./CreateWidgetCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./DeleteWidgetCommand"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./GetCalendarSlotsCommand"), exports);
|
|
@@ -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.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;
|
|
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_CreateOrUpdateWidgetPreviewCommand = 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_CreateOrUpdateWidgetPreviewCommand = 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");
|
|
@@ -23,6 +23,31 @@ const se_CancelCalendarEventCommand = async (input, context) => {
|
|
|
23
23
|
return b.build();
|
|
24
24
|
};
|
|
25
25
|
exports.se_CancelCalendarEventCommand = se_CancelCalendarEventCommand;
|
|
26
|
+
const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
|
|
27
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
28
|
+
const headers = {
|
|
29
|
+
'content-type': 'application/json',
|
|
30
|
+
};
|
|
31
|
+
b.bp("/v2/kite/widgets/preview");
|
|
32
|
+
const query = (0, smithy_client_1.map)({
|
|
33
|
+
[_c]: [, input[_cI]],
|
|
34
|
+
});
|
|
35
|
+
let body;
|
|
36
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
37
|
+
'appearance': _ => (0, smithy_client_1._json)(_),
|
|
38
|
+
'name': [],
|
|
39
|
+
'routes': _ => se_WidgetRoutesList(_, context),
|
|
40
|
+
'target': _ => (0, smithy_client_1._json)(_),
|
|
41
|
+
'temporaryWidgetId': [],
|
|
42
|
+
'welcomeMessages': _ => (0, smithy_client_1._json)(_),
|
|
43
|
+
}));
|
|
44
|
+
b.m("POST")
|
|
45
|
+
.h(headers)
|
|
46
|
+
.q(query)
|
|
47
|
+
.b(body);
|
|
48
|
+
return b.build();
|
|
49
|
+
};
|
|
50
|
+
exports.se_CreateOrUpdateWidgetPreviewCommand = se_CreateOrUpdateWidgetPreviewCommand;
|
|
26
51
|
const se_CreateWidgetCommand = async (input, context) => {
|
|
27
52
|
const b = (0, core_1.requestBuilder)(input, context);
|
|
28
53
|
const headers = {
|
|
@@ -245,6 +270,21 @@ const de_CancelCalendarEventCommand = async (output, context) => {
|
|
|
245
270
|
return contents;
|
|
246
271
|
};
|
|
247
272
|
exports.de_CancelCalendarEventCommand = de_CancelCalendarEventCommand;
|
|
273
|
+
const de_CreateOrUpdateWidgetPreviewCommand = async (output, context) => {
|
|
274
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
275
|
+
return de_CommandError(output, context);
|
|
276
|
+
}
|
|
277
|
+
const contents = (0, smithy_client_1.map)({
|
|
278
|
+
$metadata: deserializeMetadata(output),
|
|
279
|
+
});
|
|
280
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
281
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
282
|
+
'widget': _ => de_Widget(_, context),
|
|
283
|
+
});
|
|
284
|
+
Object.assign(contents, doc);
|
|
285
|
+
return contents;
|
|
286
|
+
};
|
|
287
|
+
exports.de_CreateOrUpdateWidgetPreviewCommand = de_CreateOrUpdateWidgetPreviewCommand;
|
|
248
288
|
const de_CreateWidgetCommand = async (output, context) => {
|
|
249
289
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
250
290
|
return de_CommandError(output, context);
|
package/dist-es/Kite.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KiteClient, } from "./KiteClient";
|
|
2
2
|
import { CancelCalendarEventCommand, } from "./commands/CancelCalendarEventCommand";
|
|
3
|
+
import { CreateOrUpdateWidgetPreviewCommand, } from "./commands/CreateOrUpdateWidgetPreviewCommand";
|
|
3
4
|
import { CreateWidgetCommand, } from "./commands/CreateWidgetCommand";
|
|
4
5
|
import { DeleteWidgetCommand, } from "./commands/DeleteWidgetCommand";
|
|
5
6
|
import { GetCalendarSlotsCommand, } from "./commands/GetCalendarSlotsCommand";
|
|
@@ -14,6 +15,7 @@ import { UpdateWidgetCommand, } from "./commands/UpdateWidgetCommand";
|
|
|
14
15
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
15
16
|
const commands = {
|
|
16
17
|
CancelCalendarEventCommand,
|
|
18
|
+
CreateOrUpdateWidgetPreviewCommand,
|
|
17
19
|
CreateWidgetCommand,
|
|
18
20
|
DeleteWidgetCommand,
|
|
19
21
|
GetCalendarSlotsCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_CreateOrUpdateWidgetPreviewCommand, se_CreateOrUpdateWidgetPreviewCommand, } 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 CreateOrUpdateWidgetPreviewCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Kite", "CreateOrUpdateWidgetPreview", {})
|
|
12
|
+
.n("KiteClient", "CreateOrUpdateWidgetPreviewCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_CreateOrUpdateWidgetPreviewCommand)
|
|
15
|
+
.de(de_CreateOrUpdateWidgetPreviewCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -19,6 +19,30 @@ export const se_CancelCalendarEventCommand = async (input, context) => {
|
|
|
19
19
|
.b(body);
|
|
20
20
|
return b.build();
|
|
21
21
|
};
|
|
22
|
+
export const se_CreateOrUpdateWidgetPreviewCommand = async (input, context) => {
|
|
23
|
+
const b = rb(input, context);
|
|
24
|
+
const headers = {
|
|
25
|
+
'content-type': 'application/json',
|
|
26
|
+
};
|
|
27
|
+
b.bp("/v2/kite/widgets/preview");
|
|
28
|
+
const query = map({
|
|
29
|
+
[_c]: [, input[_cI]],
|
|
30
|
+
});
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(take(input, {
|
|
33
|
+
'appearance': _ => _json(_),
|
|
34
|
+
'name': [],
|
|
35
|
+
'routes': _ => se_WidgetRoutesList(_, context),
|
|
36
|
+
'target': _ => _json(_),
|
|
37
|
+
'temporaryWidgetId': [],
|
|
38
|
+
'welcomeMessages': _ => _json(_),
|
|
39
|
+
}));
|
|
40
|
+
b.m("POST")
|
|
41
|
+
.h(headers)
|
|
42
|
+
.q(query)
|
|
43
|
+
.b(body);
|
|
44
|
+
return b.build();
|
|
45
|
+
};
|
|
22
46
|
export const se_CreateWidgetCommand = async (input, context) => {
|
|
23
47
|
const b = rb(input, context);
|
|
24
48
|
const headers = {
|
|
@@ -229,6 +253,20 @@ export const de_CancelCalendarEventCommand = async (output, context) => {
|
|
|
229
253
|
Object.assign(contents, doc);
|
|
230
254
|
return contents;
|
|
231
255
|
};
|
|
256
|
+
export const de_CreateOrUpdateWidgetPreviewCommand = async (output, context) => {
|
|
257
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
258
|
+
return de_CommandError(output, context);
|
|
259
|
+
}
|
|
260
|
+
const contents = map({
|
|
261
|
+
$metadata: deserializeMetadata(output),
|
|
262
|
+
});
|
|
263
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
264
|
+
const doc = take(data, {
|
|
265
|
+
'widget': _ => de_Widget(_, context),
|
|
266
|
+
});
|
|
267
|
+
Object.assign(contents, doc);
|
|
268
|
+
return contents;
|
|
269
|
+
};
|
|
232
270
|
export const de_CreateWidgetCommand = async (output, context) => {
|
|
233
271
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
234
272
|
return de_CommandError(output, context);
|
package/dist-types/Kite.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KiteClient } from "./KiteClient";
|
|
2
2
|
import { CancelCalendarEventCommandInput, CancelCalendarEventCommandOutput } from "./commands/CancelCalendarEventCommand";
|
|
3
|
+
import { CreateOrUpdateWidgetPreviewCommandInput, CreateOrUpdateWidgetPreviewCommandOutput } from "./commands/CreateOrUpdateWidgetPreviewCommand";
|
|
3
4
|
import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/CreateWidgetCommand";
|
|
4
5
|
import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
|
|
5
6
|
import { GetCalendarSlotsCommandInput, GetCalendarSlotsCommandOutput } from "./commands/GetCalendarSlotsCommand";
|
|
@@ -19,6 +20,12 @@ export interface Kite {
|
|
|
19
20
|
cancelCalendarEvent(args: CancelCalendarEventCommandInput, options?: __HttpHandlerOptions): Promise<CancelCalendarEventCommandOutput>;
|
|
20
21
|
cancelCalendarEvent(args: CancelCalendarEventCommandInput, cb: (err: any, data?: CancelCalendarEventCommandOutput) => void): void;
|
|
21
22
|
cancelCalendarEvent(args: CancelCalendarEventCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelCalendarEventCommandOutput) => void): void;
|
|
23
|
+
/**
|
|
24
|
+
* @see {@link CreateOrUpdateWidgetPreviewCommand}
|
|
25
|
+
*/
|
|
26
|
+
createOrUpdateWidgetPreview(args: CreateOrUpdateWidgetPreviewCommandInput, options?: __HttpHandlerOptions): Promise<CreateOrUpdateWidgetPreviewCommandOutput>;
|
|
27
|
+
createOrUpdateWidgetPreview(args: CreateOrUpdateWidgetPreviewCommandInput, cb: (err: any, data?: CreateOrUpdateWidgetPreviewCommandOutput) => void): void;
|
|
28
|
+
createOrUpdateWidgetPreview(args: CreateOrUpdateWidgetPreviewCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateOrUpdateWidgetPreviewCommandOutput) => void): void;
|
|
22
29
|
/**
|
|
23
30
|
* @see {@link CreateWidgetCommand}
|
|
24
31
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CancelCalendarEventCommandInput, CancelCalendarEventCommandOutput } from "./commands/CancelCalendarEventCommand";
|
|
2
|
+
import { CreateOrUpdateWidgetPreviewCommandInput, CreateOrUpdateWidgetPreviewCommandOutput } from "./commands/CreateOrUpdateWidgetPreviewCommand";
|
|
2
3
|
import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "./commands/CreateWidgetCommand";
|
|
3
4
|
import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "./commands/DeleteWidgetCommand";
|
|
4
5
|
import { GetCalendarSlotsCommandInput, GetCalendarSlotsCommandOutput } from "./commands/GetCalendarSlotsCommand";
|
|
@@ -21,11 +22,11 @@ export { __Client };
|
|
|
21
22
|
/**
|
|
22
23
|
* @public
|
|
23
24
|
*/
|
|
24
|
-
export type ServiceInputTypes = CancelCalendarEventCommandInput | CreateWidgetCommandInput | DeleteWidgetCommandInput | GetCalendarSlotsCommandInput | GetConfigCommandInput | GetWidgetCommandInput | ListAgentsCommandInput | ListServicesCommandInput | ListWidgetsCommandInput | RescheduleCalendarEventCommandInput | ScheduleCalendarEventCommandInput | UpdateWidgetCommandInput;
|
|
25
|
+
export type ServiceInputTypes = CancelCalendarEventCommandInput | CreateOrUpdateWidgetPreviewCommandInput | CreateWidgetCommandInput | DeleteWidgetCommandInput | GetCalendarSlotsCommandInput | GetConfigCommandInput | GetWidgetCommandInput | ListAgentsCommandInput | ListServicesCommandInput | ListWidgetsCommandInput | RescheduleCalendarEventCommandInput | ScheduleCalendarEventCommandInput | UpdateWidgetCommandInput;
|
|
25
26
|
/**
|
|
26
27
|
* @public
|
|
27
28
|
*/
|
|
28
|
-
export type ServiceOutputTypes = CancelCalendarEventCommandOutput | CreateWidgetCommandOutput | DeleteWidgetCommandOutput | GetCalendarSlotsCommandOutput | GetConfigCommandOutput | GetWidgetCommandOutput | ListAgentsCommandOutput | ListServicesCommandOutput | ListWidgetsCommandOutput | RescheduleCalendarEventCommandOutput | ScheduleCalendarEventCommandOutput | UpdateWidgetCommandOutput;
|
|
29
|
+
export type ServiceOutputTypes = CancelCalendarEventCommandOutput | CreateOrUpdateWidgetPreviewCommandOutput | CreateWidgetCommandOutput | DeleteWidgetCommandOutput | GetCalendarSlotsCommandOutput | GetConfigCommandOutput | GetWidgetCommandOutput | ListAgentsCommandOutput | ListServicesCommandOutput | ListWidgetsCommandOutput | RescheduleCalendarEventCommandOutput | ScheduleCalendarEventCommandOutput | UpdateWidgetCommandOutput;
|
|
29
30
|
/**
|
|
30
31
|
* @public
|
|
31
32
|
*/
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KiteClient";
|
|
2
|
+
import { CreateOrUpdateWidgetPreviewInput, CreateOrUpdateWidgetPreviewOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link CreateOrUpdateWidgetPreviewCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface CreateOrUpdateWidgetPreviewCommandInput extends CreateOrUpdateWidgetPreviewInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link CreateOrUpdateWidgetPreviewCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface CreateOrUpdateWidgetPreviewCommandOutput extends CreateOrUpdateWidgetPreviewOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const CreateOrUpdateWidgetPreviewCommand_base: {
|
|
25
|
+
new (input: CreateOrUpdateWidgetPreviewCommandInput): import("@smithy/smithy-client").CommandImpl<CreateOrUpdateWidgetPreviewCommandInput, CreateOrUpdateWidgetPreviewCommandOutput, KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: CreateOrUpdateWidgetPreviewCommandInput): import("@smithy/smithy-client").CommandImpl<CreateOrUpdateWidgetPreviewCommandInput, CreateOrUpdateWidgetPreviewCommandOutput, KiteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Creates or updates a temporary widget to assist with configuration testing. Preview widgets mimic the behavior and appearance of regular widgets but are automatically deleted after two hours. They are primarily designed for use in the Kite configuration interface, enabling users to experiment with settings and instantly visualize how changes affect the widget's design and functionality.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { KiteClient, CreateOrUpdateWidgetPreviewCommand } from "@wildix/xbees-kite-client"; // ES Modules import
|
|
35
|
+
* // const { KiteClient, CreateOrUpdateWidgetPreviewCommand } = require("@wildix/xbees-kite-client"); // CommonJS import
|
|
36
|
+
* const client = new KiteClient(config);
|
|
37
|
+
* const input = { // CreateOrUpdateWidgetPreviewInput
|
|
38
|
+
* appearance: { // WidgetAppearance
|
|
39
|
+
* pallete: { // WidgetPalleteSettings
|
|
40
|
+
* backgroundColor: "STRING_VALUE",
|
|
41
|
+
* accentColor: "STRING_VALUE",
|
|
42
|
+
* },
|
|
43
|
+
* text: { // WidgetTextSettings
|
|
44
|
+
* button: "STRING_VALUE",
|
|
45
|
+
* title: "STRING_VALUE",
|
|
46
|
+
* topTitle: "STRING_VALUE",
|
|
47
|
+
* topSubtitle: "STRING_VALUE",
|
|
48
|
+
* },
|
|
49
|
+
* },
|
|
50
|
+
* routes: [ // WidgetRoutesList
|
|
51
|
+
* { // WidgetRoute
|
|
52
|
+
* id: "STRING_VALUE", // required
|
|
53
|
+
* rules: [ // WidgetRouteRulesList // required
|
|
54
|
+
* { // WidgetRouteRule Union: only one key present
|
|
55
|
+
* timeFrame: { // WidgetRouteTimeFrameRule
|
|
56
|
+
* timeZone: "STRING_VALUE", // required
|
|
57
|
+
* day: "EVERY_DAY" || "WEEKDAYS" || "WEEKENDS" || "MONDAY" || "TUESDAY" || "WEDNESDAY" || "THURSDAY" || "FRIDAY" || "SATURDAY" || "SUNDAY", // required
|
|
58
|
+
* startMinute: Number("int"), // required
|
|
59
|
+
* endMinute: Number("int"), // required
|
|
60
|
+
* },
|
|
61
|
+
* },
|
|
62
|
+
* ],
|
|
63
|
+
* welcomeMessages: [ // WidgetWelcomeMessagesList
|
|
64
|
+
* { // WidgetWelcomeMessage
|
|
65
|
+
* text: "STRING_VALUE",
|
|
66
|
+
* elements: [ // ElementsList
|
|
67
|
+
* { // Element Union: only one key present
|
|
68
|
+
* actions: [ // ActionsElementsList
|
|
69
|
+
* { // ActionElement Union: only one key present
|
|
70
|
+
* button: { // ButtonElement
|
|
71
|
+
* text: "STRING_VALUE", // required
|
|
72
|
+
* handler: { // ButtonHandler Union: only one key present
|
|
73
|
+
* link: { // ButtonLinkHandler
|
|
74
|
+
* url: "STRING_VALUE", // required
|
|
75
|
+
* },
|
|
76
|
+
* reply: { // ButtonReplyHandler
|
|
77
|
+
* text: "STRING_VALUE",
|
|
78
|
+
* },
|
|
79
|
+
* action: { // ButtonActionHandler
|
|
80
|
+
* id: "STRING_VALUE", // required
|
|
81
|
+
* },
|
|
82
|
+
* },
|
|
83
|
+
* variant: "contained" || "outlined",
|
|
84
|
+
* disabled: true || false,
|
|
85
|
+
* },
|
|
86
|
+
* },
|
|
87
|
+
* ],
|
|
88
|
+
* },
|
|
89
|
+
* ],
|
|
90
|
+
* delay: Number("int"),
|
|
91
|
+
* },
|
|
92
|
+
* ],
|
|
93
|
+
* target: { // WidgetTarget Union: only one key present
|
|
94
|
+
* service: { // WidgetServiceTarget
|
|
95
|
+
* id: Number("int"), // required
|
|
96
|
+
* uri: "STRING_VALUE", // required
|
|
97
|
+
* },
|
|
98
|
+
* agent: { // WidgetAgentTarget
|
|
99
|
+
* email: "STRING_VALUE", // required
|
|
100
|
+
* },
|
|
101
|
+
* bot: { // WidgetBotTarget
|
|
102
|
+
* id: "STRING_VALUE", // required
|
|
103
|
+
* },
|
|
104
|
+
* },
|
|
105
|
+
* },
|
|
106
|
+
* ],
|
|
107
|
+
* welcomeMessages: [
|
|
108
|
+
* {
|
|
109
|
+
* text: "STRING_VALUE",
|
|
110
|
+
* elements: [
|
|
111
|
+
* {// Union: only one key present
|
|
112
|
+
* actions: [
|
|
113
|
+
* {// Union: only one key present
|
|
114
|
+
* button: {
|
|
115
|
+
* text: "STRING_VALUE", // required
|
|
116
|
+
* handler: {// Union: only one key present
|
|
117
|
+
* link: {
|
|
118
|
+
* url: "STRING_VALUE", // required
|
|
119
|
+
* },
|
|
120
|
+
* reply: {
|
|
121
|
+
* text: "STRING_VALUE",
|
|
122
|
+
* },
|
|
123
|
+
* action: {
|
|
124
|
+
* id: "STRING_VALUE", // required
|
|
125
|
+
* },
|
|
126
|
+
* },
|
|
127
|
+
* variant: "contained" || "outlined",
|
|
128
|
+
* disabled: true || false,
|
|
129
|
+
* },
|
|
130
|
+
* },
|
|
131
|
+
* ],
|
|
132
|
+
* },
|
|
133
|
+
* ],
|
|
134
|
+
* delay: Number("int"),
|
|
135
|
+
* },
|
|
136
|
+
* ],
|
|
137
|
+
* name: "STRING_VALUE", // required
|
|
138
|
+
* target: {// Union: only one key present
|
|
139
|
+
* service: {
|
|
140
|
+
* id: Number("int"), // required
|
|
141
|
+
* uri: "STRING_VALUE", // required
|
|
142
|
+
* },
|
|
143
|
+
* agent: {
|
|
144
|
+
* email: "STRING_VALUE", // required
|
|
145
|
+
* },
|
|
146
|
+
* bot: {
|
|
147
|
+
* id: "STRING_VALUE", // required
|
|
148
|
+
* },
|
|
149
|
+
* },
|
|
150
|
+
* companyId: "STRING_VALUE",
|
|
151
|
+
* temporaryWidgetId: "STRING_VALUE", // required
|
|
152
|
+
* };
|
|
153
|
+
* const command = new CreateOrUpdateWidgetPreviewCommand(input);
|
|
154
|
+
* const response = await client.send(command);
|
|
155
|
+
* // { // CreateOrUpdateWidgetPreviewOutput
|
|
156
|
+
* // widget: { // Widget
|
|
157
|
+
* // appearance: { // WidgetAppearance
|
|
158
|
+
* // pallete: { // WidgetPalleteSettings
|
|
159
|
+
* // backgroundColor: "STRING_VALUE",
|
|
160
|
+
* // accentColor: "STRING_VALUE",
|
|
161
|
+
* // },
|
|
162
|
+
* // text: { // WidgetTextSettings
|
|
163
|
+
* // button: "STRING_VALUE",
|
|
164
|
+
* // title: "STRING_VALUE",
|
|
165
|
+
* // topTitle: "STRING_VALUE",
|
|
166
|
+
* // topSubtitle: "STRING_VALUE",
|
|
167
|
+
* // },
|
|
168
|
+
* // },
|
|
169
|
+
* // routes: [ // WidgetRoutesList
|
|
170
|
+
* // { // WidgetRoute
|
|
171
|
+
* // id: "STRING_VALUE", // required
|
|
172
|
+
* // rules: [ // WidgetRouteRulesList // required
|
|
173
|
+
* // { // WidgetRouteRule Union: only one key present
|
|
174
|
+
* // timeFrame: { // WidgetRouteTimeFrameRule
|
|
175
|
+
* // timeZone: "STRING_VALUE", // required
|
|
176
|
+
* // day: "EVERY_DAY" || "WEEKDAYS" || "WEEKENDS" || "MONDAY" || "TUESDAY" || "WEDNESDAY" || "THURSDAY" || "FRIDAY" || "SATURDAY" || "SUNDAY", // required
|
|
177
|
+
* // startMinute: Number("int"), // required
|
|
178
|
+
* // endMinute: Number("int"), // required
|
|
179
|
+
* // },
|
|
180
|
+
* // },
|
|
181
|
+
* // ],
|
|
182
|
+
* // welcomeMessages: [ // WidgetWelcomeMessagesList
|
|
183
|
+
* // { // WidgetWelcomeMessage
|
|
184
|
+
* // text: "STRING_VALUE",
|
|
185
|
+
* // elements: [ // ElementsList
|
|
186
|
+
* // { // Element Union: only one key present
|
|
187
|
+
* // actions: [ // ActionsElementsList
|
|
188
|
+
* // { // ActionElement Union: only one key present
|
|
189
|
+
* // button: { // ButtonElement
|
|
190
|
+
* // text: "STRING_VALUE", // required
|
|
191
|
+
* // handler: { // ButtonHandler Union: only one key present
|
|
192
|
+
* // link: { // ButtonLinkHandler
|
|
193
|
+
* // url: "STRING_VALUE", // required
|
|
194
|
+
* // },
|
|
195
|
+
* // reply: { // ButtonReplyHandler
|
|
196
|
+
* // text: "STRING_VALUE",
|
|
197
|
+
* // },
|
|
198
|
+
* // action: { // ButtonActionHandler
|
|
199
|
+
* // id: "STRING_VALUE", // required
|
|
200
|
+
* // },
|
|
201
|
+
* // },
|
|
202
|
+
* // variant: "contained" || "outlined",
|
|
203
|
+
* // disabled: true || false,
|
|
204
|
+
* // },
|
|
205
|
+
* // },
|
|
206
|
+
* // ],
|
|
207
|
+
* // },
|
|
208
|
+
* // ],
|
|
209
|
+
* // delay: Number("int"),
|
|
210
|
+
* // },
|
|
211
|
+
* // ],
|
|
212
|
+
* // target: { // WidgetTarget Union: only one key present
|
|
213
|
+
* // service: { // WidgetServiceTarget
|
|
214
|
+
* // id: Number("int"), // required
|
|
215
|
+
* // uri: "STRING_VALUE", // required
|
|
216
|
+
* // },
|
|
217
|
+
* // agent: { // WidgetAgentTarget
|
|
218
|
+
* // email: "STRING_VALUE", // required
|
|
219
|
+
* // },
|
|
220
|
+
* // bot: { // WidgetBotTarget
|
|
221
|
+
* // id: "STRING_VALUE", // required
|
|
222
|
+
* // },
|
|
223
|
+
* // },
|
|
224
|
+
* // },
|
|
225
|
+
* // ],
|
|
226
|
+
* // welcomeMessages: [
|
|
227
|
+
* // {
|
|
228
|
+
* // text: "STRING_VALUE",
|
|
229
|
+
* // elements: [
|
|
230
|
+
* // {// Union: only one key present
|
|
231
|
+
* // actions: [
|
|
232
|
+
* // {// Union: only one key present
|
|
233
|
+
* // button: {
|
|
234
|
+
* // text: "STRING_VALUE", // required
|
|
235
|
+
* // handler: {// Union: only one key present
|
|
236
|
+
* // link: {
|
|
237
|
+
* // url: "STRING_VALUE", // required
|
|
238
|
+
* // },
|
|
239
|
+
* // reply: {
|
|
240
|
+
* // text: "STRING_VALUE",
|
|
241
|
+
* // },
|
|
242
|
+
* // action: {
|
|
243
|
+
* // id: "STRING_VALUE", // required
|
|
244
|
+
* // },
|
|
245
|
+
* // },
|
|
246
|
+
* // variant: "contained" || "outlined",
|
|
247
|
+
* // disabled: true || false,
|
|
248
|
+
* // },
|
|
249
|
+
* // },
|
|
250
|
+
* // ],
|
|
251
|
+
* // },
|
|
252
|
+
* // ],
|
|
253
|
+
* // delay: Number("int"),
|
|
254
|
+
* // },
|
|
255
|
+
* // ],
|
|
256
|
+
* // name: "STRING_VALUE", // required
|
|
257
|
+
* // target: {// Union: only one key present
|
|
258
|
+
* // service: {
|
|
259
|
+
* // id: Number("int"), // required
|
|
260
|
+
* // uri: "STRING_VALUE", // required
|
|
261
|
+
* // },
|
|
262
|
+
* // agent: {
|
|
263
|
+
* // email: "STRING_VALUE", // required
|
|
264
|
+
* // },
|
|
265
|
+
* // bot: {
|
|
266
|
+
* // id: "STRING_VALUE", // required
|
|
267
|
+
* // },
|
|
268
|
+
* // },
|
|
269
|
+
* // id: "STRING_VALUE", // required
|
|
270
|
+
* // company: "STRING_VALUE", // required
|
|
271
|
+
* // createdAt: "STRING_VALUE", // required
|
|
272
|
+
* // updatedAt: "STRING_VALUE",
|
|
273
|
+
* // },
|
|
274
|
+
* // };
|
|
275
|
+
*
|
|
276
|
+
* ```
|
|
277
|
+
*
|
|
278
|
+
* @param CreateOrUpdateWidgetPreviewCommandInput - {@link CreateOrUpdateWidgetPreviewCommandInput}
|
|
279
|
+
* @returns {@link CreateOrUpdateWidgetPreviewCommandOutput}
|
|
280
|
+
* @see {@link CreateOrUpdateWidgetPreviewCommandInput} for command's `input` shape.
|
|
281
|
+
* @see {@link CreateOrUpdateWidgetPreviewCommandOutput} for command's `response` shape.
|
|
282
|
+
* @see {@link KiteClientResolvedConfig | config} for KiteClient's `config` shape.
|
|
283
|
+
*
|
|
284
|
+
* @throws {@link ValidationException} (client fault)
|
|
285
|
+
*
|
|
286
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
287
|
+
*
|
|
288
|
+
* @throws {@link RateLimitExceededException} (client fault)
|
|
289
|
+
*
|
|
290
|
+
* @throws {@link KiteServiceException}
|
|
291
|
+
* <p>Base exception class for all service exceptions from Kite service.</p>
|
|
292
|
+
*
|
|
293
|
+
* @public
|
|
294
|
+
*/
|
|
295
|
+
export declare class CreateOrUpdateWidgetPreviewCommand extends CreateOrUpdateWidgetPreviewCommand_base {
|
|
296
|
+
}
|
|
@@ -656,7 +656,7 @@ export interface WidgetRoute {
|
|
|
656
656
|
/**
|
|
657
657
|
* @public
|
|
658
658
|
*/
|
|
659
|
-
export interface
|
|
659
|
+
export interface CreateOrUpdateWidgetPreviewInput {
|
|
660
660
|
/**
|
|
661
661
|
* The appearance configuration allows you to customize colors and text settings.
|
|
662
662
|
* @public
|
|
@@ -683,6 +683,7 @@ export interface CreateWidgetInput {
|
|
|
683
683
|
* @public
|
|
684
684
|
*/
|
|
685
685
|
companyId?: string;
|
|
686
|
+
temporaryWidgetId: string;
|
|
686
687
|
}
|
|
687
688
|
/**
|
|
688
689
|
* @public
|
|
@@ -714,6 +715,43 @@ export interface Widget {
|
|
|
714
715
|
createdAt: string;
|
|
715
716
|
updatedAt?: string;
|
|
716
717
|
}
|
|
718
|
+
/**
|
|
719
|
+
* @public
|
|
720
|
+
*/
|
|
721
|
+
export interface CreateOrUpdateWidgetPreviewOutput {
|
|
722
|
+
widget: Widget;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* @public
|
|
726
|
+
*/
|
|
727
|
+
export interface CreateWidgetInput {
|
|
728
|
+
/**
|
|
729
|
+
* The appearance configuration allows you to customize colors and text settings.
|
|
730
|
+
* @public
|
|
731
|
+
*/
|
|
732
|
+
appearance?: WidgetAppearance;
|
|
733
|
+
/**
|
|
734
|
+
* A list of routes that define different routing rules for the widget. Each route specifies a set of rules and a target to direct the interaction.
|
|
735
|
+
* @public
|
|
736
|
+
*/
|
|
737
|
+
routes?: (WidgetRoute)[];
|
|
738
|
+
/**
|
|
739
|
+
* A list of welcome messages that will be sent to the user when they first interact with the widget.
|
|
740
|
+
* @public
|
|
741
|
+
*/
|
|
742
|
+
welcomeMessages?: (WidgetWelcomeMessage)[];
|
|
743
|
+
name: string;
|
|
744
|
+
/**
|
|
745
|
+
* The primary target for the widget. This target is used if no route rules are matched. The target can be a service, an agent, or a bot, and it specifies where the widget directs its interactions.
|
|
746
|
+
* @public
|
|
747
|
+
*/
|
|
748
|
+
target: WidgetTarget;
|
|
749
|
+
/**
|
|
750
|
+
* The unique identifier of the company when a service token is used.
|
|
751
|
+
* @public
|
|
752
|
+
*/
|
|
753
|
+
companyId?: string;
|
|
754
|
+
}
|
|
717
755
|
/**
|
|
718
756
|
* @public
|
|
719
757
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CancelCalendarEventCommandInput, CancelCalendarEventCommandOutput } from "../commands/CancelCalendarEventCommand";
|
|
2
|
+
import { CreateOrUpdateWidgetPreviewCommandInput, CreateOrUpdateWidgetPreviewCommandOutput } from "../commands/CreateOrUpdateWidgetPreviewCommand";
|
|
2
3
|
import { CreateWidgetCommandInput, CreateWidgetCommandOutput } from "../commands/CreateWidgetCommand";
|
|
3
4
|
import { DeleteWidgetCommandInput, DeleteWidgetCommandOutput } from "../commands/DeleteWidgetCommand";
|
|
4
5
|
import { GetCalendarSlotsCommandInput, GetCalendarSlotsCommandOutput } from "../commands/GetCalendarSlotsCommand";
|
|
@@ -16,6 +17,10 @@ import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
|
16
17
|
* serializeAws_restJson1CancelCalendarEventCommand
|
|
17
18
|
*/
|
|
18
19
|
export declare const se_CancelCalendarEventCommand: (input: CancelCalendarEventCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
20
|
+
/**
|
|
21
|
+
* serializeAws_restJson1CreateOrUpdateWidgetPreviewCommand
|
|
22
|
+
*/
|
|
23
|
+
export declare const se_CreateOrUpdateWidgetPreviewCommand: (input: CreateOrUpdateWidgetPreviewCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
19
24
|
/**
|
|
20
25
|
* serializeAws_restJson1CreateWidgetCommand
|
|
21
26
|
*/
|
|
@@ -64,6 +69,10 @@ export declare const se_UpdateWidgetCommand: (input: UpdateWidgetCommandInput, c
|
|
|
64
69
|
* deserializeAws_restJson1CancelCalendarEventCommand
|
|
65
70
|
*/
|
|
66
71
|
export declare const de_CancelCalendarEventCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CancelCalendarEventCommandOutput>;
|
|
72
|
+
/**
|
|
73
|
+
* deserializeAws_restJson1CreateOrUpdateWidgetPreviewCommand
|
|
74
|
+
*/
|
|
75
|
+
export declare const de_CreateOrUpdateWidgetPreviewCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateOrUpdateWidgetPreviewCommandOutput>;
|
|
67
76
|
/**
|
|
68
77
|
* deserializeAws_restJson1CreateWidgetCommand
|
|
69
78
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/xbees-kite-client",
|
|
3
3
|
"description": "@wildix/xbees-kite-client client",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.15",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|