@wildix/wda-insights-client > GetChatInsightsCommand
GetChatInsightsCommand class
Gets the insights for a chat by chatId.
Signature:
export declare class GetChatInsightsCommand extends GetChatInsightsCommand_base
Extends: GetChatInsightsCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { WdaInsightsClient, GetChatInsightsCommand } from "@wildix/wda-insights-client"; // ES Modules import
// const { WdaInsightsClient, GetChatInsightsCommand } = require("@wildix/wda-insights-client"); // CommonJS import
const client = new WdaInsightsClient(config);
const input = { // GetChatInsightsInput
company: "STRING_VALUE",
chatId: "STRING_VALUE", // required
};
const command = new GetChatInsightsCommand(input);
const response = await client.send(command);
// { // GetChatInsightsOutput
// status: "NONE" || "UNAVAILABLE" || "SCHEDULED" || "STARTED" || "SUCCEEDED" || "FAILED", // required
// insights: [ // ProjectionInsightsList
// { // ProjectionInsights
// id: "STRING_VALUE", // required
// version: Number("int"), // required
// name: "STRING_VALUE", // required
// status: "NONE" || "UNAVAILABLE" || "SCHEDULED" || "STARTED" || "SUCCEEDED" || "FAILED", // required
// reason: "TRANSCRIPTION_TOO_SMALL" || "CONDITIONS_NOT_MATCH" || "INTERNAL_ERROR",
// fields: [ // ProjectionInsightsFieldsList // required
// { // ProjectionInsightsField
// id: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// value: "DOCUMENT_VALUE", // required
// },
// ],
// },
// ],
// };