@vonage/client-sdk
Version:
The Client SDK is intended to provide a ready solution for developers to build Programmable Conversation applications across multiple Channels including: Messages, Voice, SIP, websockets, and App.
126 lines (125 loc) • 3.67 kB
TypeScript
import vonage from '../utils/vonage';
export type EventState = Omit<vonage.EventStateJS, 'current'> & {
current: Lowercase<typeof vonage.EventStateTypeJS.prototype.name>;
};
/**
* Member status is a map of member id to {@link EventState}
*/
export type MemberStatus = Record<string, EventState>;
/**
* The {@link MessageAudioEvent} Body type
*
* @property audio The audio URL
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageAudioEventBody = vonage.MessageAudioEventJS.MessageAudioEventBody;
/**
* The {@link MessageCustomEvent} Body type
*
* @property custom The message custom data
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageCustomEventBody = vonage.MessageCustomEventJS.MessageCustomEventBody;
/**
* The {@link MessageFileEvent} Body type
* @property fileUrl The file URL
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageFileEventBody = vonage.MessageFileEventJS.MessageFileEventBody;
/**
* The {@link MessageImageEvent} Body type
* @property imageUrl The image URL
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageImageEventBody = vonage.MessageImageEventJS.MessageImageEventBody;
/**
* The {@link MessageLocationEvent} Body type
* @property location The {@link Location} object
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageLocationEventBody = vonage.MessageLocationEventJS.MessageLocationEventBody;
/**
* The {@link MessageTemplateEvent} Body type
*
* @property template The {@link Template} object
* @property whatsapp The {@link Whatsapp} object
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageTemplateEventBody = vonage.MessageTemplateEventJS.MessageTemplateEventBody;
/**
* The {@link MessageVCardEvent} Body type
*
* @property vcardUrl The VCard URL
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageVCardEventBody = vonage.MessageVCardEventJS.MessageVCardEventBody;
/**
* The {@link MessageVideoEvent} Body type
*
* @property videoUrl The Video URL
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageVideoEventBody = vonage.MessageVideoEventJS.MessageVideoEventBody;
/**
* The {@link MessageTextEvent} Body type
*
* @property text The message text
* @property deleted The message deletion timestamp
* @interface
* @group Chat
*/
export type MessageTextEventBody = vonage.MessageTextEventJS.MessageTextEventBody;
/**
* The {@link MemberInvitedEvent}, {@link MemberJoinedEvent} and {@link MemberLeftEvent} Body type
*
* @property memberId The member id
* @property user The {@link User} associated to the member
* @interface
* @group Chat
*/
export type MemberEventBody = vonage.MemberEventBodyJS;
/**
* The Location object for a {@link MessageLocationEventBody}
*
* @group Chat
*/
export interface Location {
name?: string | null;
address?: string | null;
latitude: string;
longitude: string;
}
/**
* The Template object for a {@link MessageTemplateEventBody}
*
* @group Chat
*/
export interface Template {
name: string;
parameters?: string[] | null;
}
/**
* The Whatsapp object for a {@link MessageTemplateEventBody}
*
* @group Chat
*/
export interface Whatsapp {
policy: string;
locale: string;
}