@vonage/voice
Version:
The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.
34 lines (31 loc) • 1.08 kB
TypeScript
import { NCCOActions } from '../../enums/NCCOActions.js';
import { NotifyAction } from '../../types/NCCO/NotifyAction.js';
import { Serializable } from '../../interfaces/NCCO/Serializable.js';
/**
* Represents a Notify action in an NCCO.
*/
declare class Notify implements NotifyAction, Serializable {
action: NCCOActions.NOTIFY;
payload: {
[key: string]: string;
};
eventUrl: string[];
eventMethod?: string;
/**
* Creates a new Notify action.
*
* @param {Object} payload - The payload data to send with the notification.
* @param {string} eventUrl - The URL where the notification events will be sent.
* @param {string} [eventMethod] - The HTTP method for sending notification events (e.g., "POST").
*/
constructor(payload: {
[key: string]: string;
}, eventUrl: string, eventMethod?: string);
/**
* Serialize the Notify action to an NCCO-compatible format.
*
* @return {NotifyAction} - The serialized Notify action.
*/
serializeToNCCO(): NotifyAction;
}
export { Notify };