import vonage from '../utils/vonage';
import { ConversationChannelType, ConversationState, MemberState, PersistentConversationEvent } from '../kotlin/JsUnions';
import { Leg } from '../client';
/**
 * Represents a conversation
 *
 * @property id The conversation id
 * @property name The conversation name
 * @property timestamp The conversation timestamp
 * @property memberId The user member id in the conversation
 * @property memberState The user member state in the conversation
 * @property displayName The conversation display name
 * @property imageUrl The conversation image url
 * @property state The conversation state
 * @property properties The conversation properties
 * @interface
 */
export type Conversation = vonage.ConversationJS & {
    memberState?: MemberState;
    state?: ConversationState;
};
/**
 * Represents a {@link Conversation} timestamps
 *
 * @interface
 */
export type ConversationTimestamp = vonage.ConversationTimestampJS;
/**
 * Represents the properties for a {@link Conversation}
 *
 * @property ttl The time-to-live (TTL) for the conversation in seconds.
 * @property customSortKey A string according to which Conversations will be ordered
 * @property customData The Conversation custom data
 * @interface
 */
export type ConversationProperties = vonage.ConversationJS.Properties;
/**
 * Represents a page of conversations
 *
 * @beta
 * @property conversations The conversations in the page
 * @property previousCursor The cursor to fetch the previous page
 * @property nextCursor The cursor to fetch the next page
 * @interface
 * @group Chat
 */
export type ConversationsPage = vonage.ConversationsPageJS & {
    conversations: Conversation[];
};
/**
 * Represents a page of legs
 *
 * @beta
 * @property legs The legs in the page
 * @property previousCursor The cursor to fetch the previous page
 * @property nextCursor The cursor to fetch the next page
 * @interface
 * @group Voice
 */
export type LegsPage = vonage.LegsPageJS & {
    legs: Leg[];
};
/**
 * Represents a page of conversation events
 *
 * @beta
 * @property events The events in the page
 * @property previousCursor The cursor to fetch the previous page
 * @property nextCursor The cursor to fetch the next page
 * @interface
 * @group Chat
 */
export type EventsPage = vonage.EventsPageJS & {
    events: PersistentConversationEvent[];
};
/**
 * Represents the membership of a user in a conversation
 *
 * @property id The member id
 * @property state The member state
 * @property user The user associated to the member
 * @property channel The member channel
 * @property timestamp The member timestamp
 * @interface
 */
export type Member = Omit<vonage.MemberJS, 'state' | 'channel'> & {
    state?: MemberState;
    channel?: MemberChannel;
};
/**
 * Represents a {@link Member} timestamps
 *
 * @interface
 */
export type MemberTimestamp = vonage.MemberTimestampJS;
/**
 * Represents a page of conversation members
 *
 * @beta
 * @property members The members in the page
 * @property previousCursor The cursor to fetch the previous page
 * @property nextCursor The cursor to fetch the next page
 * @interface
 * @group Chat
 */
export type MembersPage = vonage.MembersPageJS & {
    members: Member[];
};
/**
 * Represents an SDK user
 *
 * @property id The user id
 * @property name The user name
 * @property displayName The user display name
 * @property channels The user channels
 * @property timestamp The user timestamp
 * @property imageUrl The user image url
 * @property customData The user custom data
 * @interface
 */
export type User = vonage.UserJS;
/**
 * Represents an {@link User} timestamps
 *
 * @interface
 */
export type UserTimestamp = vonage.UserTimestampJS;
/**
 * The type of a {@link MemberChannel}
 *
 * @enum
 */
export declare const ChannelType: {
    readonly APP: "APP";
    readonly PHONE: "PHONE";
    readonly PSTN: "PSTN";
    readonly sip: "sip";
    readonly VBC: "VBC";
    readonly WEBSOCKET: "WEBSOCKET";
    readonly SMS: "SMS";
    readonly MMS: "MMS";
    readonly WHATSAPP: "WHATSAPP";
    readonly VIBER: "VIBER";
    readonly MESSENGER: "MESSENGER";
};
export type ChannelType = ConversationChannelType;
/**
 * Represents a Member Channel
 *
 * @property type The {@link ChannelType}
 * @property from The from {@link Channel}
 * @property to The to {@link Channel}
 * @interface
 */
export type MemberChannel = Omit<vonage.MemberChannelJS, 'type'> & {
    type: ChannelType;
};
/**
 * Represents a Channel.
 * It will hold either an id or a number, depending on the Channel,
 * but never both of them.
 *
 * @property id The Channel id
 * @property number The Channel number
 * @interface
 */
export type Channel = vonage.ChannelJS;
/**
 * Represents all the Channels of a certain {@link User}.
 * For each type of Channel, it will hold an array of {@link Channel}
 *
 * @property app
 * @property phone
 * @property pstn
 * @property sip
 * @property vbc
 * @property websocket
 * @property sms
 * @property mms
 * @property whatsapp
 * @property viber
 * @property messenger
 * @interface
 */
export type UserChannels = vonage.UserChannelsJS;
