@wildix/wda-stream-client > QueryPresenceCommand
QueryPresenceCommand class
Retrieves the presence of a single user using specified query. If no presence information found for the query a PresenceNotAvailableException will be thrown.
Signature:
export declare class QueryPresenceCommand extends QueryPresenceCommand_base
Extends: QueryPresenceCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { WdaStreamClient, QueryPresenceCommand } from "@wildix/wda-stream-client"; // ES Modules import
// const { WdaStreamClient, QueryPresenceCommand } = require("@wildix/wda-stream-client"); // CommonJS import
const client = new WdaStreamClient(config);
const input = { // QueryPresenceInput
filter: { // PresenceQueryFilter
id: "STRING_VALUE",
company: "STRING_VALUE",
extension: "STRING_VALUE",
},
};
const command = new QueryPresenceCommand(input);
const response = await client.send(command);
// { // QueryPresenceOutput
// presence: { // Presence
// company: "STRING_VALUE",
// address: "STRING_VALUE",
// extension: "STRING_VALUE",
// id: "STRING_VALUE",
// lng: "STRING_VALUE",
// lat: "STRING_VALUE",
// until: "STRING_VALUE",
// status: "ONLINE" || "OFFLINE" || "DND" || "AWAY" || "ONLY_SIP",
// message: "STRING_VALUE",
// telephony: "REGISTERED" || "UNREGISTERED" || "RINGING" || "TALKING" || "RT",
// seen: "STRING_VALUE",
// },
// };