UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

44 lines (43 loc) 1.31 kB
/** * @example * { * from: { * type: "user", * id: "6762f11b1bb69f9f2193bba3" * }, * body: "Hello there" * } * * @example * { * from: { * type: "user", * id: "123_doesnt_exist" * }, * body: "Hello there" * } */ export interface CreateConversationRequest { from: CreateConversationRequest.From; /** The content of the message. HTML is not supported. */ body: string; /** The time the conversation was created as a UTC Unix timestamp. If not provided, the current time will be used. This field is only recommneded for migrating past conversations from another source into Intercom. */ created_at?: number; } export declare namespace CreateConversationRequest { interface From { /** The role associated to the contact - user or lead. */ type: From.Type; /** The identifier for the contact which is given by Intercom. */ id: string; } namespace From { /** The role associated to the contact - user or lead. */ const Type: { readonly Lead: "lead"; readonly User: "user"; readonly Contact: "contact"; }; type Type = (typeof Type)[keyof typeof Type]; } }