import { RpcMethod } from './commonTypes'; import { TimeInterval as pushwoosh_statistics_types_TimeInterval } from './pushwoosh_statistics_types'; export type StatisticsService_GetMessagesStatistics = RpcMethod; export type StatisticsService_GetCampaignStatistics = RpcMethod; export type StatisticsService_GetCampaignLinkClicks = RpcMethod; export type StatisticsService_GetBlockRevenue = RpcMethod; export type StatisticsService_GetDeliveryReport = RpcMethod; export type StatisticsService_GetErrorsStatistics = RpcMethod; export type StatisticsService_GetJourneyMetrics = RpcMethod; export type StatisticsService_GetUsersStatistics = RpcMethod; export type StatisticsService_GetMAUStatistics = RpcMethod; export type StatisticsService_GetDAUStatistics = RpcMethod; export type StatisticsService_GetPushApplicationStatistics = RpcMethod; export type StatisticsService_GetEmailApplicationStatistics = RpcMethod; export type StatisticsService_GetMessageDeliveryFunnel = RpcMethod; export type StatisticsService_GetCampaignDeliveryFunnel = RpcMethod; export type StatisticsService_GetMessageDeliveryTimeline = RpcMethod; export type StatisticsService_GetCampaignDeliveryTimeline = RpcMethod; export type StatisticsService_GetActiveAudience = RpcMethod; export type StatisticsService_GetEmailCategoryPerformance = RpcMethod; export type StatisticsService_GetConversionsBoard = RpcMethod; /** StatisticsService provides various statistics operations */ export interface StatisticsService { /** GetMessagesStatistics returns message statistics grouped by platform and time intervals */ GetMessagesStatistics: StatisticsService_GetMessagesStatistics; /** GetCampaignStatistics returns detailed campaign statistics with time series data */ GetCampaignStatistics: StatisticsService_GetCampaignStatistics; /** GetCampaignLinkClicks returns link click statistics for campaigns */ GetCampaignLinkClicks: StatisticsService_GetCampaignLinkClicks; /** GetBlockRevenue returns revenue attributed to the products blocks of a message */ GetBlockRevenue: StatisticsService_GetBlockRevenue; /** GetDeliveryReport returns delivery report with error details for campaigns */ GetDeliveryReport: StatisticsService_GetDeliveryReport; /** GetErrorsStatistics returns error statistics over time for campaigns */ GetErrorsStatistics: StatisticsService_GetErrorsStatistics; /** GetJourneyMetrics returns journey metrics with time series data and totals */ GetJourneyMetrics: StatisticsService_GetJourneyMetrics; /** GetUsersStatistics returns application users counts statistics with time series data */ GetUsersStatistics: StatisticsService_GetUsersStatistics; /** GetMAUStatistics returns mau statistics with time series data */ GetMAUStatistics: StatisticsService_GetMAUStatistics; /** GetDAUStatistics returns dau statistics with time series data */ GetDAUStatistics: StatisticsService_GetDAUStatistics; /** GetPushApplicationStatistics returns push statistics (total devices, sends, open rate) with time series data */ GetPushApplicationStatistics: StatisticsService_GetPushApplicationStatistics; /** GetEmailApplicationStatistics returns email statistics (total devices, sends, open rate) with time series data */ GetEmailApplicationStatistics: StatisticsService_GetEmailApplicationStatistics; /** * GetMessageDeliveryFunnel returns one message's funnel: audience -> sent -> deliveries * -> opened -> interactions. A stage equals the sum of its pieces, all of them. */ GetMessageDeliveryFunnel: StatisticsService_GetMessageDeliveryFunnel; /** * GetCampaignDeliveryFunnel sums GetMessageDeliveryFunnel over a campaign's messages. * Uniques stay unique within a message, so one subscriber can count more than once. */ GetCampaignDeliveryFunnel: StatisticsService_GetCampaignDeliveryFunnel; /** * GetMessageDeliveryTimeline returns the same message's numbers over time: the funnel * answers "how many", this answers "when". */ GetMessageDeliveryTimeline: StatisticsService_GetMessageDeliveryTimeline; /** * GetCampaignDeliveryTimeline is GetMessageDeliveryTimeline over a campaign's messages. * Uniques stay unique within a message, so one subscriber can count more than once. */ GetCampaignDeliveryTimeline: StatisticsService_GetCampaignDeliveryTimeline; /** GetActiveAudience returns active users and active devices groped by application and platform */ GetActiveAudience: StatisticsService_GetActiveAudience; /** * GetEmailCategoryPerformance counts email sends, openers and clickers per category code. * The caller names the categories; statistics only groups by the names it is given. */ GetEmailCategoryPerformance: StatisticsService_GetEmailCategoryPerformance; /** * Campaign attribution board: conversions and revenue of an application's messages, each * conversion credited to the last touch inside the attribution window (last touch). */ GetConversionsBoard: StatisticsService_GetConversionsBoard; } /** EmailEventType represents different types of email delivery events */ export type EmailEventType = /** Unknown or unspecified email event type */ 'EmailEventTypeUnknown' /** User marked email as spam */ | 'Complaint' /** Temporary delivery failure (mailbox full, server down) */ | 'Softbounce' /** Permanent delivery failure (invalid address) */ | 'Hardbounce'; /** GetBouncedEmailsRequest represents a request to retrieve bounced email addresses */ export type GetBouncedEmailsRequest = { /** Application Code to filter by */ application: string; /** Specific message code to filter by */ messageCode: string; /** Campaign Code to filter by */ campaign: string; /** Start date for the time range filter */ dateFrom: Date; /** End date for the time range filter */ dateTo: Date; /** Type of email event to filter by */ type: EmailEventType; /** Number of results per page for pagination */ perPage: number; /** Page number for pagination */ page: number; }; /** BouncedEmail represents a single bounced email record */ export type BouncedEmail = { /** Email address that bounced */ email: string; /** Timestamp when the bounce occurred */ date: Date; /** Detailed reason for the bounce */ reason: string; /** Type of bounce event */ type: EmailEventType; }; /** GetBouncedEmailsResponse contains the list of bounced emails and total count */ export type GetBouncedEmailsResponse = { /** Total number of bounced emails matching the criteria */ total: number; /** List of bounced email records */ bouncedEmails: BouncedEmail[]; }; /** GetMessagesStatisticsRequest represents a request for message statistics grouped by platform and time */ export type GetMessagesStatisticsRequest = { /** List of platform IDs to filter by */ platforms: number[]; /** Time interval for grouping statistics */ interval: pushwoosh_statistics_types_TimeInterval; /** Specific message code to get statistics for */ messageCode: string; }; /** PushMetricWithTimestamp contains push notification metrics for a specific time and platform */ export type PushMetricWithTimestamp = { /** Timestamp for these metrics */ timestamp: string; /** Platform ID (iOS, Android, etc.) */ platform: number; /** Number of messages sent */ sends: number; /** Number of messages opened */ opens: number; /** Number of messages delivered */ deliveries: number; /** Number of inbox opens */ inboxOpens: number; /** Number of messages that couldn't be shown */ unshowableSends: number; /** Number of errors during sending */ errors: number; }; /** EventStats contains statistics for a specific conversion event */ export type Conversion_EventStats = { /** Event name */ name: string; /** Number of times event occurred */ hits: number; /** Conversion rate percentage */ conversion: number; /** Revenue generated from this event */ revenue: number; }; /** Conversion represents conversion metrics and associated events */ export type Conversion = { /** Total number of messages sent */ sends: number; /** Total number of messages opened */ opens: number; /** List of conversion events and their statistics */ events: Conversion_EventStats[]; }; /** GetMessagesStatisticsResponse contains message statistics and conversion data */ export type GetMessagesStatisticsResponse = { /** Time series metrics for messages */ metrics: PushMetricWithTimestamp[]; /** Conversion statistics */ conversion: Conversion; }; /** GetCampaignStatisticsRequest represents a request for detailed campaign statistics */ export type GetCampaignStatisticsRequest = { /** Application Code */ application: string; /** Application group ID for multi-app campaigns */ applicationGroup: string; /** Specific message code */ messageCode: string; /** Campaign Code */ campaign: string; /** Customer journey ID */ journey: string; /** Start of time range */ timestampFrom: Date; /** End of time range */ timestampTo: Date; /** Time interval for grouping data */ interval: pushwoosh_statistics_types_TimeInterval; /** Timezone for displaying timestamps */ timezone: string; }; /** Breakdown contains platform-specific values over time */ export type GetCampaignStatisticsResponse_PlatformTimeSeries_Breakdown = { /** Platform name (iOS, Android, etc.) */ platform: string; /** Values for each timestamp */ values: number[]; }; /** PlatformTimeSeries represents time series data broken down by platform */ export type GetCampaignStatisticsResponse_PlatformTimeSeries = { /** Time points for the series */ timestamps: Date[]; /** Platform-specific breakdowns */ breakdowns: GetCampaignStatisticsResponse_PlatformTimeSeries_Breakdown[]; /** Total across all platforms */ total: number; }; /** Metrics contains all campaign metrics */ export type GetCampaignStatisticsResponse_Metrics = { /** Send statistics over time */ sends: GetCampaignStatisticsResponse_PlatformTimeSeries; /** Delivery statistics over time */ deliveries: GetCampaignStatisticsResponse_PlatformTimeSeries; /** Open statistics over time (unique) */ opens: GetCampaignStatisticsResponse_PlatformTimeSeries; /** Recipients count per platform */ recipientsByPlatform: Record; /** Total recipients count */ recipients: number; /** Total open statistics over time (including duplicates) */ totalOpens: GetCampaignStatisticsResponse_PlatformTimeSeries; /** Total open statistics (including duplicates) */ totalDeliveries: number; /** Unique users skipped by frequency capping */ frequencyCappingUniqueUsers: number; /** Total skipped count by frequency capping */ frequencyCappingSuppressions: number; /** Unique opens by Apple MPP / machine clients (ampp), subset of opens */ opensAmpp: GetCampaignStatisticsResponse_PlatformTimeSeries; /** Total opens by Apple MPP / machine clients (ampp), subset of total_opens */ totalOpensAmpp: GetCampaignStatisticsResponse_PlatformTimeSeries; }; /** GetCampaignStatisticsResponse contains detailed campaign statistics with platform breakdowns */ export type GetCampaignStatisticsResponse = { /** Campaign metrics data */ metrics: GetCampaignStatisticsResponse_Metrics; }; /** GetCampaignLinkClicksRequest represents a request for campaign link click statistics */ export type GetCampaignLinkClicksRequest = { /** Application Code */ application: string; /** Application group ID for multi-app campaigns */ applicationGroup: string; /** Specific message code */ messageCode: string; /** Campaign Code */ campaign: string; /** Start of time range */ timestampFrom: Date; /** End of time range */ timestampTo: Date; }; /** Attributes represents URL parameters and their click counts */ export type GetCampaignLinkClicksResponse_LinkClick_Attributes = { /** URL parameters (e.g., 'name=sam', 'age=20') */ attributes: string[]; /** Number of clicks with these parameters */ clicks: number; }; /** * LinkClick represents click statistics for a specific link * Example: 'https://google.com?name=sam&age=20' * link: 'https://google.com' * attributes: ['name=sam', 'age=20'] */ export type GetCampaignLinkClicksResponse_LinkClick = { /** Base URL without parameters */ link: string; /** Total clicks for this link */ clicks: number; /** Breakdown by URL parameters */ attributes: GetCampaignLinkClicksResponse_LinkClick_Attributes[]; }; /** GetCampaignLinkClicksResponse contains link click statistics for a campaign */ export type GetCampaignLinkClicksResponse = { /** List of clicked links with statistics */ links: GetCampaignLinkClicksResponse_LinkClick[]; /** Total number of clicks across all links */ totalClicks: number; /** Number of unique users who clicked */ uniqClick: number; }; /** GetBlockRevenueRequest represents a request for per-block revenue of a message */ export type GetBlockRevenueRequest = { /** Application Code */ application: string; /** Specific message code */ messageCode: string; /** Start of time range */ timestampFrom: Date; /** End of time range */ timestampTo: Date; }; /** BlockRevenue is one block's clicks and the revenue of the buyers who clicked it */ export type GetBlockRevenueResponse_BlockRevenue = { /** Block id carried by the product links (pw_block) */ block: string; /** Ranking that produced the items (pw_strategy), empty for manual */ strategy: string; /** Clicks on the block's product links */ clicks: number; /** Recipients who clicked them */ uniqClicks: number; /** * Multi-touch: a buyer who clicked several blocks credits each of them in * full, so block revenues do NOT add up to the message's total revenue. */ revenue: number; /** ISO 4217 code the revenue events carried */ currency: string; }; /** GetBlockRevenueResponse contains revenue attributed to each products block */ export type GetBlockRevenueResponse = { blocks: GetBlockRevenueResponse_BlockRevenue[]; /** * False when the account tracks no revenue at all: the UI shows a "revenue * tracking is not set up" hint instead of a zero, which would read as "earned nothing". */ revenueTrackingConfigured: boolean; }; /** GetDeliveryReportRequest represents a request for delivery report with error details */ export type GetDeliveryReportRequest = { /** Application Code */ application: string; /** Application group ID for multi-app campaigns */ applicationGroup: string; /** Specific message code */ messageCode: string; /** Campaign Code */ campaign: string; /** Customer journey ID */ journey: string; /** Start of time range */ timestampFrom: Date; /** End of time range */ timestampTo: Date; }; /** ProcessingErrorsType categorizes sending errors */ export type GetDeliveryReportResponse_DeliveryReport_ProcessingErrorsType = /** Any error types */ 'processing_unknown' /** Error during sending */ | 'send' /** Error during publishing */ | 'publish'; /** MailboxErrorType categorizes email delivery errors */ export type GetDeliveryReportResponse_DeliveryReport_MailboxErrorType = /** All error types (for compatibility with export service) */ 'all' /** Spam complaints from recipients */ | 'complaints' /** Temporary delivery failures */ | 'soft_bounces' /** Permanent delivery failures */ | 'hard_bounces'; /** ReportError represents a specific delivery error and its count */ export type GetDeliveryReportResponse_DeliveryReport_ReportError = { /** Error message */ error: string; /** Detailed error description for UI */ tooltip: string; /** Number of occurrences */ count: number; /** HTTP/SMTP status code */ statusCode: number; /** Error category for email errors */ mailboxErrorType: GetDeliveryReportResponse_DeliveryReport_MailboxErrorType; /** Error category for processing errors */ processingErrorType: GetDeliveryReportResponse_DeliveryReport_ProcessingErrorsType; /** Error category for email errors */ mailboxErrorStatus: number; }; /** DeliveryReport contains error statistics for message delivery */ export type GetDeliveryReportResponse_DeliveryReport = { /** Platform ID where errors occurred */ platform: number; /** Total number of errors */ total: number; /** List of specific errors */ errors: GetDeliveryReportResponse_DeliveryReport_ReportError[]; }; /** GetDeliveryReportResponse contains delivery reports with error breakdowns */ export type GetDeliveryReportResponse = { /** Push notification sending errors */ senderErrors: GetDeliveryReportResponse_DeliveryReport[]; /** Email delivery errors */ mailErrors: GetDeliveryReportResponse_DeliveryReport; }; /** GetErrorsStatisticsRequest represents a request for error statistics over time */ export type GetErrorsStatisticsRequest = { /** Application Code */ application: string; /** Application group ID for multi-app campaigns */ applicationGroup: string; /** Specific message code */ messageCode: string; /** Campaign Code */ campaign: string; /** Customer journey ID */ journey: string; /** Start of time range */ timestampFrom: Date; /** End of time range */ timestampTo: Date; }; /** GetErrorsStatisticsResponse contains error counts over time */ export type GetErrorsStatisticsResponse = { /** Time points for error measurements */ timestamps: Date[]; /** Error counts corresponding to each timestamp */ errors: number[]; }; /** GetJourneyMetricsRequest represents a request for journey metrics with time series data */ export type GetJourneyMetricsRequest = { /** Application Code */ application: string; /** Customer journey UUID */ journey: string; /** Start of time range */ timestampFrom: Date; /** End of time range */ timestampTo: Date; /** Time interval for grouping data */ interval: pushwoosh_statistics_types_TimeInterval; /** Timezone for displaying timestamps */ timezone: string; /** List of platforms to filter */ platforms: number[]; }; /** ChannelMetrics contains metrics for a specific channel over time */ export type GetJourneyMetricsResponse_ChannelMetrics = { /** Channel name (push, email, whatsapp, sms) */ channel: string; /** Sends for each timestamp */ sends: number[]; /** Opens for each timestamp (unique) */ opens: number[]; /** Deliveries for each timestamp */ deliveries: number[]; /** Errors for each timestamp */ deliveryIssues: number[]; /** Hard bounces for each timestamp */ hardBounces: number[]; /** Soft bounces for each timestamp */ softBounces: number[]; /** Complaints for each timestamp */ complaints: number[]; /** Link clicks for each timestamp */ clicks: number[]; /** Unsubscribes for each timestamp */ unsubscribes: number[]; /** Total opens for each timestamp (including duplicates) */ totalOpens: number[]; /** Total deliveries for each timestamp (including duplicates) */ totalDeliveries: number[]; /** Unique ampp (Apple MPP / machine) opens for each timestamp, subset of opens */ opensAmpp: number[]; /** Total ampp (Apple MPP / machine) opens for each timestamp, subset of total_opens */ totalOpensAmpp: number[]; }; /** ChannelTotals contains totals for a specific channel */ export type GetJourneyMetricsResponse_ChannelTotals = { /** Channel name (push, email, whatsapp, sms) */ channel: string; /** Total messages sent for this channel */ sent: number; /** Total unique recipients for this channel */ recipients: number; /** Total messages opened for this channel (unique) */ opened: number; /** Total delivery issues/errors for this channel */ deliveryIssues: number; /** Total messages delivered for this channel */ delivered: number; /** Total hard bounces for this channel */ hardBounces: number; /** Total soft bounces for this channel */ softBounces: number; /** Total complaints for this channel */ complaints: number; /** Total link clicks for this channel */ clicks: number; /** Total unsubscribes for this channel */ unsubscribes: number; /** Total messages opened for this channel (including duplicates) */ totalOpened: number; /** Total deliveries for this channel (including duplicates) */ totalDeliveries: number; /** Unique users skipped by frequency capping */ frequencyCappingUniqueUsers: number; /** Total skipped count by frequency capping */ frequencyCappingSuppressions: number; /** Total unique ampp (Apple MPP / machine) opens for this channel, subset of opened */ openedAmpp: number; /** Total ampp (Apple MPP / machine) opens for this channel, subset of total_opened */ totalOpenedAmpp: number; }; /** GetJourneyMetricsResponse contains journey metrics with time series data and totals broken down by channels */ export type GetJourneyMetricsResponse = { /** Time points for the series */ timestamps: Date[]; /** Metrics broken down by channel over time */ channelMetrics: GetJourneyMetricsResponse_ChannelMetrics[]; /** Aggregated totals */ channelTotals: GetJourneyMetricsResponse_ChannelTotals[]; }; export type GetUsersStatisticsRequest = { /** Application Code */ application: string; }; export type GetUsersStatisticsResponse = { /** Time points for the series */ timestamps: Date[]; /** Total users for each timestamp */ usersCount: number[]; /** Time interval for grouping data */ interval: pushwoosh_statistics_types_TimeInterval; }; export type GetMAUStatisticsRequest = { /** Application Code */ application: string; }; export type GetMAUStatisticsResponse = { /** Time points for the series */ timestamps: Date[]; /** monthly active users for each timestamp */ usersCount: number[]; }; export type GetDAUStatisticsRequest = { /** Application Code */ application: string; }; export type GetDAUStatisticsResponse = { /** Time points for the series */ timestamps: Date[]; /** daily active users for each timestamp */ usersCount: number[]; }; export type GetPushApplicationStatisticsRequest = { /** Application Code */ application: string; }; export type PlatformStatistics = { platform: string; values: number[]; }; export type GetPushApplicationStatisticsResponse = { /** Time points for the series */ timestamps: Date[]; /** total devices for each timestamp */ totalDevices: PlatformStatistics[]; /** total sends for each timestamp */ sends: PlatformStatistics[]; /** open rate for each timestamp */ openRate: PlatformStatistics[]; /** Time interval for grouping data */ interval: pushwoosh_statistics_types_TimeInterval; }; export type GetEmailApplicationStatisticsRequest = { /** Application Code */ application: string; }; export type GetEmailApplicationStatisticsResponse = { /** Time points for the series */ timestamps: Date[]; /** total devices for each timestamp */ totalDevices: PlatformStatistics[]; /** total sends for each timestamp */ sends: PlatformStatistics[]; /** open rate for each timestamp */ openRate: PlatformStatistics[]; /** Time interval for grouping data */ interval: pushwoosh_statistics_types_TimeInterval; }; /** * GetMessageDeliveryFunnelRequest asks for one message's funnel. No time range: sends * and confirmations sit on different axes, and a client window breaks the arithmetic. */ export type GetMessageDeliveryFunnelRequest = { /** Specific message code, required */ messageCode: string; /** Optional platform ID filter */ platforms: number[]; }; /** * Stage is a funnel level. Stages always come in the order they appear in the * funnel array; the numbers here do not define that order. */ export type GetDeliveryFunnelResponse_Stage = 'STAGE_UNSPECIFIED' /** taken into processing */ | 'STAGE_AUDIENCE' /** accepted by the gateway */ | 'STAGE_SENT' /** rejected before the gateway took it */ | 'STAGE_ERRORS' /** accepted, split by confirmation */ | 'STAGE_DELIVERIES' /** unique devices that opened */ | 'STAGE_OPENED' /** * STAGE_INTERACTIONS: what the recipient did with the letter — clicked, unsubscribed, * complained. Email broadcasts only, see the funnel formulas doc for why. */ | 'STAGE_INTERACTIONS' /** * STAGE_REACHED and STAGE_READ belong to the App Inbox channel alone, where they take * the place of STAGE_DELIVERIES. */ | 'STAGE_REACHED' /** reached, split by read / dismissed unread / still unread or expired */ | 'STAGE_READ'; /** * Kind tells how a piece relates to its stage total. PASSED and REASON pieces are the * stage's own distribution: disjoint, and they add up to its count. */ export type GetDeliveryFunnelResponse_Kind = 'KIND_UNSPECIFIED' /** moved on to the next stage */ | 'KIND_PASSED' /** did not move on, for this reason */ | 'KIND_REASON' /** * KIND_SUBSET cuts across the stage instead of dividing it: it overlaps the PASSED * and REASON pieces and is never a summand. Sum PASSED and REASON only. */ | 'KIND_SUBSET'; /** * FunnelState describes the response before any stage is read: an empty funnel has two * very different meanings and one shape. */ export type GetDeliveryFunnelResponse_FunnelState = 'FUNNEL_STATE_UNSPECIFIED' /** the funnel is populated */ | 'FUNNEL_STATE_READY' /** nothing happened for this message yet */ | 'FUNNEL_STATE_NO_EVENTS' /** sent longer ago than statistics are kept */ | 'FUNNEL_STATE_EXPIRED'; /** * DeliveriesForm tells which breakdown STAGE_DELIVERIES carries. The forms count * different sets, so their rows are not continuous. */ export type GetDeliveryFunnelResponse_DeliveriesForm = 'DELIVERIES_FORM_UNSPECIFIED' /** three disjoint rows, alert state known */ | 'DELIVERIES_FORM_PER_DEVICE' /** two rows, alert state unknown */ | 'DELIVERIES_FORM_BASIC'; /** * BasicFormReason explains why the per-device breakdown is missing; set only in the * basic form. NO_DELIVERIES is not NO_EVENTS — sends did happen. */ export type GetDeliveryFunnelResponse_BasicFormReason = 'BASIC_FORM_REASON_UNSPECIFIED' /** older than the row-level log keeps */ | 'BASIC_FORM_REASON_RETENTION' /** system message, account not covered */ | 'BASIC_FORM_REASON_UNAVAILABLE' /** nothing accepted yet — say nothing in the UI */ | 'BASIC_FORM_REASON_NO_DELIVERIES' /** * NOT_APPLICABLE: the channel has no alert state at all, so the basic form is what * it always carries — not a degradation the client should explain away. */ | 'BASIC_FORM_REASON_NOT_APPLICABLE'; /** * Channel groups platforms by how their funnel reads. Web push is apart from mobile * push because its alert state is always on: a not-displayable row could not fill. */ export type GetDeliveryFunnelResponse_Channel = 'CHANNEL_UNSPECIFIED' /** iOS, OSX, Android, Amazon, Huawei */ | 'CHANNEL_MOBILE_PUSH' /** Safari, Chrome, Firefox */ | 'CHANNEL_WEB_PUSH' | 'CHANNEL_EMAIL' /** SMS, messengers, Wallet, Windows, Baidu, Xiaomi */ | 'CHANNEL_OTHER' | 'CHANNEL_APP_INBOX'; /** * ChannelFunnel is one channel's whole funnel. The form belongs here rather than to * the response: a message on iOS and Email carries two different ones at once. */ export type GetDeliveryFunnelResponse_ChannelFunnel = { channel: GetDeliveryFunnelResponse_Channel; funnel: GetDeliveryFunnelResponse_StageItem[]; deliveriesForm: GetDeliveryFunnelResponse_DeliveriesForm; basicFormReason: GetDeliveryFunnelResponse_BasicFormReason; confirmedDeliveries: GetDeliveryFunnelResponse_ConfirmedDeliveries; }; /** * PlatformCount is one platform's share of the number above it; the parent is always * their sum. A platform with nothing to report is absent, which is not a zero. */ export type GetDeliveryFunnelResponse_PlatformCount = { platform: number; count: number; }; /** Piece is one row of the funnel table. */ export type GetDeliveryFunnelResponse_Piece = { kind: GetDeliveryFunnelResponse_Kind; /** FREQUENCY_CAPPING, ACCEPTED_BY_GATEWAY, ... */ category: string; count: number; platforms: GetDeliveryFunnelResponse_PlatformCount[]; }; /** * ErrorCode is one sender status code inside an error row. Platform is part of the row, * not a breakdown of it: 1002 is BadDeviceToken on APNS and ParameterErr on Huawei. */ export type GetDeliveryFunnelResponse_ErrorCode = { platform: number; code: number; /** short human name; our own publish codes read "Processing Error" */ name: string; count: number; }; /** * ErrorRow is what STAGE_ERRORS carries instead of pieces: a Piece in all but name, * since every row of that stage is a drop-out. */ export type GetDeliveryFunnelResponse_ErrorRow = { /** INVALID_TOKEN, QUOTA_EXCEEDED, INTERNAL_ERROR, ... */ category: string; count: number; platforms: GetDeliveryFunnelResponse_PlatformCount[]; /** * codes are the measured rows the category was folded from, so they sum to count -- * except on UNCLASSIFIED_ERROR, which is a remainder and carries none. */ codes: GetDeliveryFunnelResponse_ErrorCode[]; }; /** * StageItem is one funnel level with its breakdown. STAGE_DELIVERIES counts accepted * sends — how many there were to confirm, not how many confirmed. */ export type GetDeliveryFunnelResponse_StageItem = { stage: GetDeliveryFunnelResponse_Stage; count: number; /** empty on STAGE_ERRORS */ pieces: GetDeliveryFunnelResponse_Piece[]; /** STAGE_ERRORS only */ errors: GetDeliveryFunnelResponse_ErrorRow[]; platforms: GetDeliveryFunnelResponse_PlatformCount[]; }; /** * ConfirmedDeliveries equals the tracking log CSV export: past the accepted set and * never clamped, so no stage row derives from it. */ export type GetDeliveryFunnelResponse_ConfirmedDeliveries = { count: number; platforms: GetDeliveryFunnelResponse_PlatformCount[]; }; /** * GetDeliveryFunnelResponse is the shared answer of both funnel methods: a campaign's * funnel is the sum of its messages' funnels, so the shape has to be the same one. */ export type GetDeliveryFunnelResponse = { /** * Channels are not ordered; a client looks one up by its channel field, not by * position. */ channels: GetDeliveryFunnelResponse_ChannelFunnel[]; /** * The window the funnel was computed over, derived from the data: the numbers are * meaningless without it, and the pre-aggregate TTL can cut it short. */ windowFrom: Date; windowTo: Date; funnelState: GetDeliveryFunnelResponse_FunnelState; }; /** * GetCampaignDeliveryFunnelRequest asks for one campaign's funnel. No time range, for the * same reason the message funnel has none: sends and confirmations sit on different axes. */ export type GetCampaignDeliveryFunnelRequest = { /** Campaign code, required */ campaignCode: string; /** Optional platform ID filter */ platforms: number[]; }; /** * GetMessageDeliveryTimelineRequest asks for one message's metrics over time. Unlike * the funnel it takes a window: a timeline has no stage arithmetic to break. */ export type GetMessageDeliveryTimelineRequest = { /** Specific message code, required */ messageCode: string; /** Optional platform ID filter */ platforms: number[]; /** * Bucket width. Unset picks from the window: a year -> month, a month -> day, a day -> * hour, else minute. Over 1440 buckets widens it; the response states the width used. */ interval: pushwoosh_statistics_types_TimeInterval; /** * The window to read; an unset end is the message's own, and narrowing it narrows the * counts. A stated `from` rounds down to the minute, `to` clips exactly, derived — a day wide. */ from: Date; to: Date; }; /** * GetCampaignDeliveryTimelineRequest asks for one campaign's metrics over time. Same * window rules as the message timeline; the window is the campaign's, not one message's. */ export type GetCampaignDeliveryTimelineRequest = { /** Campaign code, required */ campaignCode: string; /** Optional platform ID filter */ platforms: number[]; /** * Bucket width. Unset picks from the window: a year -> month, a month -> day, a day -> * hour, else minute. Over 1440 buckets widens it; the response states the width used. */ interval: pushwoosh_statistics_types_TimeInterval; /** * The window to read; an unset end is the campaign's own, and narrowing it narrows the * counts. A stated `from` rounds down to the minute, `to` clips exactly, derived — a day wide. */ from: Date; to: Date; }; /** * Metric is one line of the chart. Metrics, not funnel stages: STAGE_DELIVERIES * counts accepted sends, and the number a reader wants there is not a stage at all. */ export type GetDeliveryTimelineResponse_Metric = 'METRIC_UNSPECIFIED' /** taken into processing */ | 'METRIC_AUDIENCE' /** accepted by the gateway */ | 'METRIC_SENT' /** rejected before the gateway took it */ | 'METRIC_ERRORS' /** devices that confirmed delivery */ | 'METRIC_CONFIRMED_DELIVERIES' /** unique devices that opened */ | 'METRIC_OPENED'; /** * ReadSource is which store answered. It decides the unit of METRIC_SENT — subscribers from * the log, send events from the pre-aggregate — and whether per-device detail exists. */ export type GetDeliveryTimelineResponse_ReadSource = 'READ_SOURCE_UNSPECIFIED' | 'READ_SOURCE_ROW_LEVEL_LOG' | 'READ_SOURCE_PRE_AGGREGATE'; /** * Point is one bucket of a series, always UTC. Empty buckets are not emitted: the * client draws the axis from the window and the interval. */ export type GetDeliveryTimelineResponse_Point = { /** start of the interval */ bucket: Date; count: number; }; /** * PlatformSeries is one platform's line: a metric's count is the sum of its platforms, * and a platform's points sum to its own count. */ export type GetDeliveryTimelineResponse_PlatformSeries = { platform: number; count: number; points: GetDeliveryTimelineResponse_Point[]; }; export type GetDeliveryTimelineResponse_MetricSeries = { metric: GetDeliveryTimelineResponse_Metric; count: number; platforms: GetDeliveryTimelineResponse_PlatformSeries[]; }; /** * GetDeliveryTimelineResponse is the shared answer of both timeline methods: a campaign's * series is the same shape as a message's, summed over the campaign's messages. */ export type GetDeliveryTimelineResponse = { series: GetDeliveryTimelineResponse_MetricSeries[]; /** * The window actually read: what the request asked for, clamped to the data, or the * subject's own window when the request asked for neither end. */ windowFrom: Date; windowTo: Date; /** * Same three states as the funnel, and for the same reasons: an empty answer * has to say which kind of empty it is. */ funnelState: GetDeliveryFunnelResponse_FunnelState; /** * The bucket width actually used, whether it came from the request, from the automatic * pick, or from widening a stated width that asked for too many buckets. */ interval: pushwoosh_statistics_types_TimeInterval; /** * These metrics are counted when the device answered, the others when we sent. The * metrics of one bucket are therefore not a funnel: they reconcile over the window. */ eventAxisMetrics: GetDeliveryTimelineResponse_Metric[]; /** * Which store answered, so a client can name the unit and explain a missing per-device * series. Unset on an empty or expired answer: nothing was read. */ readSource: GetDeliveryTimelineResponse_ReadSource; }; /** ActiveAudienceType specifies the type of active users calculation */ export type ActiveAudienceType = /** Unspecified type */ 'ACTIVE_USERS_TYPE_UNSPECIFIED' /** Daily Active Users (MAU) */ | 'ACTIVE_USERS_TYPE_DAY' /** Monthly Active Users from month start */ | 'ACTIVE_USERS_TYPE_MONTH' /** Monthly Active Users from specified date */ | 'ACTIVE_USERS_TYPE_CALENDAR_MONTH' /** Monthly Active Users from specified date */ | 'ACTIVE_USERS_TYPE_CALENDAR_MONTH_WITH_TOKEN' /** Monthly Active Users from specified date with device with token */ | 'ACTIVE_USERS_TYPE_MONTH_WITH_TOKEN' /** Daily Active Devices (MAD) */ | 'ACTIVE_DEVICES_TYPE_DAY' /** Monthly Active Devices from month start */ | 'ACTIVE_DEVICES_TYPE_MONTH' /** Monthly Active Devices from specified date */ | 'ACTIVE_DEVICES_TYPE_CALENDAR_MONTH' /** Monthly Active Devices with push token */ | 'ACTIVE_DEVICES_TYPE_MONTH_WITH_TOKEN'; export type ActiveAudienceCount = { timestamp: Date; applicationId: number; platformId: number; count: number; }; export type GetActiveAudienceRequest = { applicationIds: number[]; platformIds: number[]; dateFrom: Date; dateTo: Date; type: ActiveAudienceType; }; export type GetActiveAudienceResponse = { rows: ActiveAudienceCount[]; }; /** GetUniqueEmailRecipientsRequest represents a request to count unique email HWIDs with successful sends */ export type GetUniqueEmailRecipientsRequest = { applicationIds: number[]; /** Start date for the time range filter */ dateFrom: Date; /** End date for the time range filter */ dateTo: Date; }; /** GetUniqueEmailRecipientsResponse contains the count of unique email HWIDs */ export type GetUniqueEmailRecipientsResponse = { /** Count of unique email HWIDs with at least one successful send */ uniqueRecipients: number; }; export type GetSubscriptionFormStatisticsRequest = { /** Application Code */ application: string; /** Form Code */ form: string; /** Start date for the time range filter */ dateFrom: Date; /** End date for the time range filter */ dateTo: Date; }; export type GetSubscriptionFormStatisticsResponse = { /** Total views */ views: number; /** Total submissions */ submissions: number; /** Total conversions */ conversions: number; }; export type GetPopupFormsStatisticsRequest = { /** Application Code */ application: string; /** Form Codes */ forms: string[]; /** Start date for the time range filter */ dateFrom: Date; /** End date for the time range filter */ dateTo: Date; }; export type GetPopupFormsStatisticsResponse_FormStatistics = { /** Total visits */ visits: number; /** Total impressions */ impressions: number; }; export type GetPopupFormsStatisticsResponse = { forms: Record; }; /** WebhookLogStatus represents the status of inbound webhook processing */ export type WebhookLogStatus = /** Unknown or unspecified status */ 'WEBHOOK_LOG_STATUS_UNKNOWN' /** Webhook processed successfully */ | 'WEBHOOK_LOG_STATUS_SUCCESS' /** Internal server error during processing */ | 'WEBHOOK_LOG_STATUS_INTERNAL_ERROR' /** Validation error in webhook data */ | 'WEBHOOK_LOG_STATUS_VALIDATE_ERROR' /** Webhook is inactive or disabled */ | 'WEBHOOK_LOG_STATUS_WEBHOOK_INACTIVE' /** Authorization error */ | 'WEBHOOK_LOG_STATUS_AUTHORIZATION_ERROR'; /** GetInboundWebhookActivityLogRequest represents a request to retrieve inbound webhook activity log */ export type GetInboundWebhookActivityLogRequest = { /** Application ID to filter by */ applicationId: number; /** Webhook UUID to filter by */ webhookUuid: string; /** Start date for the time range filter */ timestampFrom: Date; /** End date for the time range filter */ timestampTo: Date; /** Maximum number of records to return */ limit: number; /** Number of records to skip for pagination */ offset: number; groupStatus: string; }; /** InboundWebhookLogItem represents a single log entry for inbound webhook processing */ export type InboundWebhookLogItem = { /** Timestamp when the webhook was processed */ timestamp: Date; /** Webhook UUID */ webhookUuid: string; /** Request identifier */ identifier: string; /** Overall processing status */ status: WebhookLogStatus; /** Status message or error description */ message: string; /** Raw request data */ rawRequest: string; statusIdentity: string; statusEvent: string; statusTags: string; userCreated: boolean; }; /** GetInboundWebhookActivityLogResponse contains the list of webhook log entries and totals */ export type GetInboundWebhookActivityLogResponse = { /** List of webhook log entries */ logItems: InboundWebhookLogItem[]; /** Total number of log entries matching the filter */ total: number; /** Total number of successful webhook calls */ totalSuccess: number; /** Total number of failed webhook calls */ totalFailed: number; totalWarning: number; }; /** GetInboundWebhooksStatusRequest represents a request to get status of webhooks by their UUIDs */ export type GetInboundWebhooksStatusRequest = { /** Application ID to filter by */ applicationId: number; /** List of webhook UUIDs to get status for */ webhookUuids: string[]; }; /** GetInboundWebhooksStatusResponse contains map of webhook UUID to status */ export type GetInboundWebhooksStatusResponse = { /** Map of webhook UUID to its last log status */ statuses: Record; }; /** GetUserFCSuppressionsRequest represents a request to retrieve user's frequency capping suppressions */ export type GetUserFCSuppressionsRequest = { /** Application Code to filter by */ application: string; /** User ID to get suppressions for */ userId: string; /** Page number for pagination */ page: number; /** Number of results per page for pagination */ perPage: number; }; /** FCSuppressionRecord represents a single frequency capping suppression record */ export type FCSuppressionRecord = { /** Timestamp when suppression occurred */ timestamp: Date; /** Message code (can be empty) */ messageCode: string; /** Campaign code */ campaignCode: string; /** Journey UUID (determined via point) */ journeyUuid: string; }; /** GetUserFCSuppressionsResponse contains the list of FC suppressions and pagination info */ export type GetUserFCSuppressionsResponse = { /** Total number of suppressions */ total: number; /** Current page number */ page: number; /** Number of results per page */ perPage: number; /** List of suppression records */ suppressions: FCSuppressionRecord[]; }; /** WindowDays is the analytics window preset */ export type GetControlGroupAnalyticsRequest_WindowDays = 'WINDOW_DAYS_UNSPECIFIED' | 'WINDOW_DAYS_3' | 'WINDOW_DAYS_7' | 'WINDOW_DAYS_30'; /** GetControlGroupAnalyticsRequest represents a request for Global Control Group analytics */ export type GetControlGroupAnalyticsRequest = { /** Application Code */ application: string; /** Analytics window preset */ windowDays: GetControlGroupAnalyticsRequest_WindowDays; /** * Control group code to report on. Empty returns the rows written before * control groups had codes, which is the application's only group. */ controlGroup: string; }; /** ControlGroupAnalyticsGroup contains metrics for one side of the experiment (treatment or control) */ export type ControlGroupAnalyticsGroup = { /** Number of users in the group */ users: number; /** Number of users who performed the event */ conversions: number; /** conversions / users * 100 */ conversionRate: number; /** Total events / users */ eventsPerUser: number; }; /** Significance is the statistical significance verdict for the uplift */ export type ControlGroupAnalyticsEvent_Significance = 'SIGNIFICANCE_UNSPECIFIED' | 'SIGNIFICANCE_NOT_ENOUGH_DATA' | 'SIGNIFICANCE_NOT_SIGNIFICANT' | 'SIGNIFICANCE_SIGNIFICANT'; /** ControlGroupAnalyticsEvent contains Control-vs-Treatment metrics for a single event */ export type ControlGroupAnalyticsEvent = { /** Event name */ event: string; /** Treatment group metrics */ treatment: ControlGroupAnalyticsGroup; /** Control group metrics */ control: ControlGroupAnalyticsGroup; /** Relative uplift of treatment over control, percent */ upliftPct: number; /** Estimated events attributable to messaging */ incrementalEvents: number; /** Incremental events as percent of treatment events */ percentOfTreatment: number; /** Z-score of the uplift */ zScore: number; /** P-value of the uplift */ pValue: number; /** Confidence level, percent */ confidencePct: number; /** Statistical significance verdict */ significance: ControlGroupAnalyticsEvent_Significance; }; /** GetControlGroupAnalyticsResponse contains per-event Control-vs-Treatment analytics */ export type GetControlGroupAnalyticsResponse = { /** Per-event analytics rows */ events: ControlGroupAnalyticsEvent[]; }; /** GetEmailCategoryPerformanceRequest asks for per-category counters over the period */ export type GetEmailCategoryPerformanceRequest = { /** Application Code */ application: string; /** Period start */ dateFrom: Date; /** Period end */ dateTo: Date; /** * Category code per campaign, for the email sends that have no message row of their own; * a send with a message row is named by the message and ignores this map. */ campaignCategories: Record; }; /** EmailCategoryCounters holds the counters of one category code */ export type EmailCategoryCounters = { /** Category code the sends were grouped by */ categoryCode: string; /** Letters sent */ sends: number; /** Recipients who opened at least one of them */ opens: number; /** Recipients who clicked a link other than unsubscribe */ clicks: number; }; /** * GetEmailCategoryPerformanceResponse contains per-category counters and the unsubscribes * the unsubscribe event reports, keyed by the category name it carries */ export type GetEmailCategoryPerformanceResponse = { /** Categories something was sent to */ categories: EmailCategoryCounters[]; /** Unsubscribed recipients per category name */ unsubscribes: Record; /** Window actually read, clamped to retention */ windowFrom: Date; /** Window actually read */ windowTo: Date; }; export type ContactType = 'CONTACT_TYPE_UNSPECIFIED' | 'CONTACT_TYPE_CLICK' | 'CONTACT_TYPE_SENT'; export type GetConversionsBoardRequest = { /** Application Code */ application: string; /** Conversion event name from the application's conversion settings */ event: string; /** Conversion time range start */ timestampFrom: Date; /** Conversion time range end */ timestampTo: Date; /** Overrides the configured window; 0 keeps the setting */ attributionWindowSeconds: number; /** Overrides the configured contact type; UNSPECIFIED keeps the setting */ contactType: ContactType; }; export type GetConversionsBoardResponse_Revenue = { currency: string; amount: number; }; export type GetConversionsBoardResponse_Row = { messageId: number; campaignId: number; messageCode: string; name: string; sent: number; opened: number; clicked: number; conversions: number; uniqueUsers: number; revenue: GetConversionsBoardResponse_Revenue[]; }; export type GetConversionsBoardResponse_Totals = { /** All conversions of the event in the period */ conversions: number; /** Conversions credited to a message */ attributedConversions: number; uniqueUsers: number; /** Revenue of attributed conversions */ revenue: GetConversionsBoardResponse_Revenue[]; }; export type GetConversionsBoardResponse = { totals: GetConversionsBoardResponse_Totals; rows: GetConversionsBoardResponse_Row[]; /** Effective window */ attributionWindowSeconds: number; /** Effective contact type */ contactType: ContactType; /** Touches are counted from this moment: period start minus the window */ touchesFrom: Date; };