UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

105 lines (104 loc) 4.22 kB
/** * This file was auto-generated by Fern from our API Definition. */ import * as Intercom from "../index"; /** * You can create a message */ export type CreateMessageRequest = Intercom.CreateMessageRequest.Email | Intercom.CreateMessageRequest.Inapp; export declare namespace CreateMessageRequest { interface Email { message_type: "email"; /** The title of the email. */ subject: string; /** The content of the message. HTML and plaintext are supported. */ body: string; /** The style of the outgoing message. Possible values `plain` or `personal`. */ template: string; /** The sender of the message. If not provided, the default sender will be used. */ from: CreateMessageRequestWithEmail.From; /** The sender of the message. If not provided, the default sender will be used. */ to: CreateMessageRequestWithEmail.To; /** The time the message was created. If not provided, the current time will be used. */ created_at?: number; /** Whether a conversation should be opened in the inbox for the message without the contact replying. Defaults to false if not provided. */ create_conversation_without_contact_reply?: boolean; } namespace CreateMessageRequestWithEmail { /** * The sender of the message. If not provided, the default sender will be used. */ interface From { /** Always `admin`. */ type: "admin"; /** The identifier for the admin which is given by Intercom. */ id: number; } /** * The sender of the message. If not provided, the default sender will be used. */ interface To { /** The role associated to the contact - `user` or `lead`. */ type: To.Type; /** The identifier for the contact which is given by Intercom. */ id: string; } namespace To { /** * The role associated to the contact - `user` or `lead`. */ type Type = "user" | "lead"; const Type: { readonly User: "user"; readonly Lead: "lead"; }; } } interface Inapp { message_type: "inapp"; /** The title of the email. */ subject?: string; /** The content of the message. HTML and plaintext are supported. */ body: string; /** The style of the outgoing message. Possible values `plain` or `personal`. */ template?: string; /** The sender of the message. If not provided, the default sender will be used. */ from: CreateMessageRequestWithInapp.From; /** The sender of the message. If not provided, the default sender will be used. */ to: CreateMessageRequestWithInapp.To; /** The time the message was created. If not provided, the current time will be used. */ created_at?: number; /** Whether a conversation should be opened in the inbox for the message without the contact replying. Defaults to false if not provided. */ create_conversation_without_contact_reply?: boolean; } namespace CreateMessageRequestWithInapp { /** * The sender of the message. If not provided, the default sender will be used. */ interface From { /** Always `admin`. */ type: "admin"; /** The identifier for the admin which is given by Intercom. */ id: number; } /** * The sender of the message. If not provided, the default sender will be used. */ interface To { /** The role associated to the contact - `user` or `lead`. */ type: To.Type; /** The identifier for the contact which is given by Intercom. */ id: string; } namespace To { /** * The role associated to the contact - `user` or `lead`. */ type Type = "user" | "lead"; const Type: { readonly User: "user"; readonly Lead: "lead"; }; } } }