import { PARTNER_MESSAGE_TYPE } from "./index"; import { MESSAGE_STATUS, RawMessage, Application, TEMPLATE_STATUS, ChannelStatus, TARIFF_TYPE, ChannelRCSLaunchStatus } from "@peacom/model"; import { JobsOptions } from "bullmq"; export declare enum TemplateEventType { STATUS = 0, CATEGORY = 1, TARIFF = 2 } export declare enum PhoneEventType { CALL_CONSENT = 0, CALL_END = 1 } export interface PhoneEvent { type: PhoneEventType; userId: string; extraData?: Record; } export interface TemplateEvent { publicId: string; type?: TemplateEventType; partnerTemplateId?: string; status?: TEMPLATE_STATUS; tariffType?: TARIFF_TYPE; cause?: string; extraData?: Record; } export declare enum ConversationEventType { BILLING = 1 } export interface ConversationEvent { conversation: { channelId: string; from: string; }; type: ConversationEventType; extraData?: Record; expiredDate?: string; conversationBillingId?: string; } export declare enum ChannelEventType { STATUS = 0, CARRIER_LAUNCH = 1 } export interface CarrierLaunchEvent { carrierId: string; status: ChannelRCSLaunchStatus; } export interface ChannelEvent { publicId: string; type?: ChannelEventType; status?: ChannelStatus; carrierLaunchEvents?: CarrierLaunchEvent[]; cause?: string; extraData?: Record; } export interface PartnerEvent { eventId: string; type: PARTNER_MESSAGE_TYPE; timestamp: number; messageId?: string; cause?: string; status?: MESSAGE_STATUS; message?: RawMessage; replyToMessageId?: string; publicId?: string; applicationId?: Application; from?: string; clientMessageId?: string; template?: TemplateEvent; phoneEvent?: PhoneEvent; channelEvent?: ChannelEvent; nonBilling?: boolean; } export interface QueuePartnerEventParam { webHookUrl: string; event: PartnerEvent; companyId: number; jobOpt?: JobsOptions; } export interface QueuePartnerEvent { webHookId: number; event: PartnerEvent; jobOpt?: JobsOptions; }