export declare enum CommunicationEndpointKind { PHONE = "phone", EMAIL = "email", PROVIDER_IDENTITY = "provider_identity" } /** * Known provider identity namespaces. Contracts continue to accept strings so * custom providers and namespaces can be introduced without a library update. */ export declare const providerIdentityNamespaces: { readonly meta: { readonly instagramUser: "instagram_user"; readonly messengerUser: "messenger_user"; readonly whatsappUser: "whatsapp_user"; }; readonly telegram: { readonly user: "user"; readonly chat: "chat"; }; readonly trii: { readonly webchatVisitor: "webchat_visitor"; }; readonly mercadolibre: { readonly buyer: "buyer"; }; readonly google: { readonly businessMessagesUser: "business_messages_user"; }; }; export type KnownIdentityProvider = keyof typeof providerIdentityNamespaces; export type KnownProviderIdentityNamespace = { [TProvider in KnownIdentityProvider]: (typeof providerIdentityNamespaces)[TProvider][keyof (typeof providerIdentityNamespaces)[TProvider]]; }[KnownIdentityProvider]; export declare enum CommunicationEndpointStatus { ACTIVE = "active", INACTIVE = "inactive", ORPHANED = "orphaned" } export interface ICommunicationEndpointActivity { firstSeenAt?: Date; lastSeenAt?: Date; lastMessageInAt?: Date; lastMessageOutAt?: Date; } export interface ICommunicationEndpoint { id: string; spaceId: string; kind: CommunicationEndpointKind; status: CommunicationEndpointStatus; normalizedValue: string; normalizationVersion: number; displayValue: string; phoneInfo?: IPhoneEndpointInfo; emailInfo?: IEmailEndpointInfo; providerIdentityInfo?: IProviderIdentityEndpointInfo; activity?: ICommunicationEndpointActivity; createdAt: Date; createdBy?: string; updatedAt?: Date; updatedBy?: string; inactiveAt?: Date; inactiveBy?: string; } export interface IPhoneEndpointInfo { e164: string; isMobile: boolean; country: string; countryName: string; /** * ISO 3166-2 subdivision code when it can be resolved from the phone * number, for example `AR-C` or `US-CA`. Empty when unknown, not * applicable, or when the number does not identify a subdivision. */ state: string; /** * Display name corresponding to `state`, for example `Córdoba` or * `California`. Empty when `state` is not available. */ stateName: string; } export interface IEmailEndpointInfo { localPart: string; domain: string; } export interface IProviderIdentityProfile { displayName?: string; username?: string; imageUrl?: string; imageObservedAt?: Date; } export interface IProviderIdentityEndpointInfo { /** System that issues and controls the external identity. */ provider: string; /** * Provider-defined namespace in which the identity keys are valid. * This is not a communication channel or a configured channel account. */ identityNamespace: string; /** Configured channel account in which the external identity is valid. */ channelAccountId: string; profile?: IProviderIdentityProfile; } export interface ICommunicationEndpointSnapshot { endpointId: string; kind: CommunicationEndpointKind; displayValue: string; }