import { JsonObject } from './commonTypes'; import { Platform as pushwoosh_statistics_types_Platform } from './pushwoosh_statistics_types'; import { DateRange as pushwoosh_statistics_types_DateRange } from './pushwoosh_statistics_types'; import { Source as pushwoosh_statistics_types_Source } from './pushwoosh_statistics_types'; import { MessageType as pushwoosh_statistics_types_MessageType } from './pushwoosh_statistics_types'; export type ListRequest_Filter = { platforms: pushwoosh_statistics_types_Platform[]; dateRange: pushwoosh_statistics_types_DateRange; source: pushwoosh_statistics_types_Source; campaign: string; messagesIds: number[]; messagesCodes: string[]; application: string; messageType: pushwoosh_statistics_types_MessageType; }; export type ListRequest_Params = { withDetails: boolean; withMetrics: boolean; }; export type ListRequest = { filters: ListRequest_Filter; params: ListRequest_Params; perPage: number; page: number; }; export type PushDetails_PlatformParameters = { androidHeader: string; androidRootParams: Record; iosTitle: string; iosSubtitle: string; iosRootParams: Record; chromeHeader: string; chromeRootParams: Record; firefoxHeader: string; firefoxRootParams: Record; }; export type PushDetails = { filterName: string; filterCode: string; content: Record; title: Record; platformParameters: PushDetails_PlatformParameters; followUserTimezone: boolean; conditions: string; data: JsonObject; conditionsOperator: string; filterConditions: string; devicesFilter: string; }; export type EmailDetails = { template: string; filterName: string; filterCode: string; subject: Record; fromName: string; fromEmail: string; replyName: string; replyEmail: string; followUserTimezone: boolean; conditions: string; conditionsOperator: string; filterConditions: string; devicesFilter: string; data: string; }; export type PushMetrics = { sends: number; opens: number; deliveries: number; inboxOpens: number; unshowableSends: number; errors: number; platform: number; }; export type EmailMetrics = { sends: number; opens: number; deliveries: number; hardBounces: number; softBounces: number; rejects: number; confirmedSends: number; unsubs: number; complaints: number; errors: number; }; export type PushInfo = { details: PushDetails; metrics: PushMetrics[]; }; export type InboxMetrics = { sends: number; reached: number; read: number; clicks: number; dismissed: number; errors: number; }; export type InboxDetails = { title: string; content: string; iconUrl: string; bannerUrl: string; expirationDate: string; }; export type InboxInfo = { details: InboxDetails; metrics: InboxMetrics; }; export type EmailInfo = { details: EmailDetails; metrics: EmailMetrics[]; }; export type ListResponseItem_info_pushInfo = { type: 'pushInfo'; data: PushInfo; }; export type ListResponseItem_info_emailInfo = { type: 'emailInfo'; data: EmailInfo; }; export type ListResponseItem_info_inboxInfo = { type: 'inboxInfo'; data: InboxInfo; }; export type ListResponseItem_info = ListResponseItem_info_pushInfo | ListResponseItem_info_emailInfo | ListResponseItem_info_inboxInfo; export type ListResponseItem = { id: number; code: string; createdDate: string; sendDate: string; status: string; platforms: number[]; source: string; info: ListResponseItem_info; }; export type ListResponse = { total: number; items: ListResponseItem[]; }; export type Message_Status = 'status_unknown' | 'creating' | 'waiting' | 'pending' | 'processing' | 'done' | 'canceled' | 'fail'; export type Message_Type = 'type_unknown' | 'broadcast' | 'devices' | 'users'; export type Message = { id: number; code: string; accountId: number; campaignId: number; applicationIds: number[]; platforms: number[]; status: Message_Status; sendType: Message_Type; isCanceled: boolean; icon: string; banner: string; createdVia: pushwoosh_statistics_types_Source; title: Record; subtitle: Record; content: Record; createdTimestamp: Date; updatedTimestamp: Date; sentTimestamp: Date; properties: Record; childMessages: Message[]; }; export type LoadByCodesRequest = { codes: string[]; }; export type LoadByCodesResponse = { messages: Message[]; }; export type GetByIDsRequest = { ids: number[]; }; export type GetByIDsResponse = { messages: Message[]; }; export type LoadByCodeRequest = { code: string; }; export type LoadByCodeResponse = { message: Message; }; export type GetByIDRequest = { id: number; }; export type GetByIDResponse = { message: Message; }; export type LoadRequest = { application: string; code: string; id: number; relationUuid: string; relationParentUuid: string; }; export type LoadResponse = { message: Message; };