@wildix/xbees-conversations-client > ListChannelsCommand
ListChannelsCommand class
Lists all channels associated with a user. Allows pagination using limit and offset parameters. Sorted by last message in the channel.
Signature:
export declare class ListChannelsCommand extends ListChannelsCommand_base
Extends: ListChannelsCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { ConversationsClient, ListChannelsCommand } from "@wildix/xbees-conversations-client"; // ES Modules import
// const { ConversationsClient, ListChannelsCommand } = require("@wildix/xbees-conversations-client"); // CommonJS import
const client = new ConversationsClient(config);
const input = { // ListChannelsInput
userId: "STRING_VALUE",
limit: Number("int"),
offset: Number("int"),
};
const command = new ListChannelsCommand(input);
const response = await client.send(command);
// { // ListChannelsOutput
// channels: [ // ChannelsList // required
// { // Channel
// subject: "STRING_VALUE",
// description: "STRING_VALUE",
// picture: "STRING_VALUE",
// pictureColor: "STRING_VALUE",
// access: "private" || "public",
// company: "STRING_VALUE",
// context: { // ChannelContext
// source: "kite",
// target: "STRING_VALUE",
// events: [ // ChannelContextEventList
// { // ChannelContextEvent
// id: "STRING_VALUE",
// owner: "STRING_VALUE",
// start: "STRING_VALUE",
// end: "STRING_VALUE",
// summary: "STRING_VALUE",
// attendees: [ // ChannelContextEventAttendeeList
// { // ChannelContextEventAttendee
// email: "STRING_VALUE", // required
// name: "STRING_VALUE",
// status: "accepted" || "tentative" || "declined" || "none", // required
// },
// ],
// },
// ],
// },
// kite: true || false,
// kiteTarget: "STRING_VALUE",
// kiteVariant: "STRING_VALUE",
// kiteAssign: "STRING_VALUE",
// kiteServiceName: "STRING_VALUE",
// kiteDefaultSubject: "STRING_VALUE",
// service: "STRING_VALUE",
// serviceTitle: "STRING_VALUE",
// serviceRecipient: "STRING_VALUE",
// assignee: { // User
// id: "STRING_VALUE", // required
// name: "STRING_VALUE",
// email: "STRING_VALUE",
// phone: "STRING_VALUE",
// picture: "STRING_VALUE",
// locale: "STRING_VALUE",
// timeZone: "STRING_VALUE",
// company: "STRING_VALUE",
// bot: true || false,
// pbxDomain: "STRING_VALUE",
// pbxPort: "STRING_VALUE",
// pbxExtension: "STRING_VALUE",
// pbxSerial: "STRING_VALUE",
// pbxUserId: "STRING_VALUE",
// createdAt: "STRING_VALUE",
// updatedAt: "STRING_VALUE",
// },
// telephony: true || false,
// sms: true || false,
// mms: true || false,
// whatsapp: true || false,
// whatsappStatus: "24h_channel_closed",
// broadcast: true || false,
// external: true || false,
// channelId: "STRING_VALUE", // required
// channelType: "direct" || "group", // required
// memberCount: Number("int"), // required
// createdAt: "STRING_VALUE", // required
// createdBy: "STRING_VALUE", // required
// updatedAt: "STRING_VALUE",
// },
// ],
// };