Skip to main content

@wildix/xbees-kite-client > GetWidgetCommand

GetWidgetCommand class

Retrieves details of a specific widget by its unique identifier.

Signature:

export declare class GetWidgetCommand extends GetWidgetCommand_base 

Extends: GetWidgetCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { KiteClient, GetWidgetCommand } from "@wildix/xbees-kite-client"; // ES Modules import
// const { KiteClient, GetWidgetCommand } = require("@wildix/xbees-kite-client"); // CommonJS import
const client = new KiteClient(config);
const input = { // GetWidgetInput
widgetId: "STRING_VALUE", // required
};
const command = new GetWidgetCommand(input);
const response = await client.send(command);
// { // GetWidgetOutput
// widget: { // Widget
// appearance: { // WidgetAppearance
// pallete: { // WidgetPalleteSettings
// backgroundColor: "STRING_VALUE",
// accentColor: "STRING_VALUE",
// },
// text: { // WidgetTextSettings
// button: "STRING_VALUE",
// title: "STRING_VALUE",
// topTitle: "STRING_VALUE",
// topSubtitle: "STRING_VALUE",
// },
// },
// routes: [ // WidgetRoutesList
// { // WidgetRoute
// id: "STRING_VALUE", // required
// rules: [ // WidgetRouteRulesList // required
// { // WidgetRouteRule Union: only one key present
// timeFrame: { // WidgetRouteTimeFrameRule
// timeZone: "STRING_VALUE", // required
// day: "EVERY_DAY" || "WEEKDAYS" || "WEEKENDS" || "MONDAY" || "TUESDAY" || "WEDNESDAY" || "THURSDAY" || "FRIDAY" || "SATURDAY" || "SUNDAY", // required
// startMinute: Number("int"), // required
// endMinute: Number("int"), // required
// },
// },
// ],
// welcomeMessages: [ // WidgetWelcomeMessagesList
// { // WidgetWelcomeMessage
// text: "STRING_VALUE",
// elements: [ // ElementsList
// { // Element Union: only one key present
// actions: [ // ActionsElementsList
// { // ActionElement Union: only one key present
// button: { // ButtonElement
// text: "STRING_VALUE", // required
// handler: { // ButtonHandler Union: only one key present
// link: { // ButtonLinkHandler
// url: "STRING_VALUE", // required
// },
// reply: { // ButtonReplyHandler
// text: "STRING_VALUE",
// },
// action: { // ButtonActionHandler
// id: "STRING_VALUE", // required
// },
// },
// variant: "contained" || "outlined",
// disabled: true || false,
// },
// },
// ],
// },
// ],
// delay: Number("int"),
// },
// ],
// target: { // WidgetTarget Union: only one key present
// service: { // WidgetServiceTarget
// id: Number("int"), // required
// uri: "STRING_VALUE", // required
// },
// agent: { // WidgetAgentTarget
// email: "STRING_VALUE", // required
// },
// bot: { // WidgetBotTarget
// id: "STRING_VALUE", // required
// },
// },
// },
// ],
// welcomeMessages: [
// {
// text: "STRING_VALUE",
// elements: [
// {// Union: only one key present
// actions: [
// {// Union: only one key present
// button: {
// text: "STRING_VALUE", // required
// handler: {// Union: only one key present
// link: {
// url: "STRING_VALUE", // required
// },
// reply: {
// text: "STRING_VALUE",
// },
// action: {
// id: "STRING_VALUE", // required
// },
// },
// variant: "contained" || "outlined",
// disabled: true || false,
// },
// },
// ],
// },
// ],
// delay: Number("int"),
// },
// ],
// name: "STRING_VALUE", // required
// target: {// Union: only one key present
// service: {
// id: Number("int"), // required
// uri: "STRING_VALUE", // required
// },
// agent: {
// email: "STRING_VALUE", // required
// },
// bot: {
// id: "STRING_VALUE", // required
// },
// },
// id: "STRING_VALUE", // required
// company: "STRING_VALUE", // required
// createdAt: "STRING_VALUE", // required
// updatedAt: "STRING_VALUE",
// },
// };