import { RpcMethod } from './commonTypes'; import { Source as pushwoosh_statistics_types_Source } from './pushwoosh_statistics_types'; import { TimeInterval as pushwoosh_statistics_types_TimeInterval } from './pushwoosh_statistics_types'; import { DateRange as pushwoosh_statistics_types_DateRange } from './pushwoosh_statistics_types'; export type StatisticsService_GetMessageDeliveryReport = RpcMethod; export type StatisticsService_GetMessagesList = RpcMethod; export type StatisticsService_GetMessageEmailStatistics = RpcMethod; export type StatisticsService_GetMessageEmailLinkStatistics = RpcMethod; export type StatisticsService_GetMessageHistory = RpcMethod; export type StatisticsService_GetMessageDetailStatistics = RpcMethod; export type StatisticsService_GetMessagesTotalStatistics = RpcMethod; export type StatisticsService_GetApplicationsSubscribersStatistics = RpcMethod; export type StatisticsService_GetApplicationsSubscribersStatisticsInternal = RpcMethod; export type StatisticsService_GetActiveUsersCount = RpcMethod; export type StatisticsService_GetSubscribers = RpcMethod; export type StatisticsService_GetApplicationTotalMetricsStatistics = RpcMethod; export type StatisticsService_GetUnregisteredDevices = RpcMethod; export type StatisticsService_GetMessagesTotalStatisticsCP = RpcMethod; export type StatisticsService_GetInappTotalStatisticsCP = RpcMethod; export type StatisticsService_GetEmailClicksTotalStatisticsCP = RpcMethod; export type StatisticsService_GetAverageCTRTotalStatisticsCP = RpcMethod; export type StatisticsService_GetSubscribersTotalStatisticsCP = RpcMethod; export type StatisticsService_GetSubscribersDailyStatisticsCP = RpcMethod; export type StatisticsService_GetEmailActivityDistributionCP = RpcMethod; export type StatisticsService_GetEmailEventTriggeredPerformanceCP = RpcMethod; export type StatisticsService_GetEmailFrequencyCappingCP = RpcMethod; export type StatisticsService_GetEmailUnsubscribeByFrequencyCP = RpcMethod; export type StatisticsService_GetEmailProviderStatisticsCP = RpcMethod; export type StatisticsService_GetRetentionTotalStatisticsCP = RpcMethod; export type StatisticsService_GetEngagementTotalStatisticsCP = RpcMethod; export type StatisticsService_GetActiveUsersTotalStatisticsCP = RpcMethod; export type StatisticsService_GetMessagesFunnelStatisticsCP = RpcMethod; export type StatisticsService_GetFrequencyCappingTotalStatisticsCP = RpcMethod; export type StatisticsService_GetUsersPAEStatisticsCP = RpcMethod; export type StatisticsService_GetEmailLinkStatistics = RpcMethod; export type StatisticsService_GetAdCampaignStatistics = RpcMethod; /** StatisticsService provides statistics operations for messages, campaigns, and applications */ export interface StatisticsService { /** TODO: delete? */ GetMessageDeliveryReport: StatisticsService_GetMessageDeliveryReport; /** TODO: delete? used in push history */ GetMessagesList: StatisticsService_GetMessagesList; /** TODO: delete? */ GetMessageEmailStatistics: StatisticsService_GetMessageEmailStatistics; /** TODO: delete? */ GetMessageEmailLinkStatistics: StatisticsService_GetMessageEmailLinkStatistics; /** GetMessageHistory returns paginated message history with filtering and sorting options, also includes metrics if requested */ GetMessageHistory: StatisticsService_GetMessageHistory; /** TODO: delete? */ GetMessageDetailStatistics: StatisticsService_GetMessageDetailStatistics; /** GetMessagesTotalStatistics returns total message statistics for specified campaigns or applications */ GetMessagesTotalStatistics: StatisticsService_GetMessagesTotalStatistics; /** GetApplicationsSubscribersStatistics returns daily subscriber statistics by platform */ GetApplicationsSubscribersStatistics: StatisticsService_GetApplicationsSubscribersStatistics; /** GetApplicationsSubscribersStatisticsInternal returns internal subscriber statistics (for internal services) */ GetApplicationsSubscribersStatisticsInternal: StatisticsService_GetApplicationsSubscribersStatisticsInternal; /** GetActiveUsersCount returns DAU/MAU statistics for applications */ GetActiveUsersCount: StatisticsService_GetActiveUsersCount; /** GetSubscribers returns subscriber counts with push enabled/disabled breakdown */ GetSubscribers: StatisticsService_GetSubscribers; /** GetApplicationTotalMetricsStatistics returns aggregated metrics for applications */ GetApplicationTotalMetricsStatistics: StatisticsService_GetApplicationTotalMetricsStatistics; /** GetUnregisteredDevices returns list of devices that unregistered in the specified time period */ GetUnregisteredDevices: StatisticsService_GetUnregisteredDevices; /** GetMessagesTotalStatisticsCP returns message statistics for control panel overview */ GetMessagesTotalStatisticsCP: StatisticsService_GetMessagesTotalStatisticsCP; /** GetInappTotalStatisticsCP returns in-app message statistics for control panel */ GetInappTotalStatisticsCP: StatisticsService_GetInappTotalStatisticsCP; /** GetEmailClicksTotalStatisticsCP returns email link click statistics for control panel */ GetEmailClicksTotalStatisticsCP: StatisticsService_GetEmailClicksTotalStatisticsCP; /** GetAverageCTRTotalStatisticsCP returns average click-through rate statistics */ GetAverageCTRTotalStatisticsCP: StatisticsService_GetAverageCTRTotalStatisticsCP; /** GetSubscribersTotalStatisticsCP returns subscriber statistics for control panel */ GetSubscribersTotalStatisticsCP: StatisticsService_GetSubscribersTotalStatisticsCP; /** GetSubscribersDailyStatisticsCP returns daily subscribers by platform over the requested period for control panel */ GetSubscribersDailyStatisticsCP: StatisticsService_GetSubscribersDailyStatisticsCP; /** GetEmailActivityDistributionCP splits the email subscribers base by what they did in the period */ GetEmailActivityDistributionCP: StatisticsService_GetEmailActivityDistributionCP; /** GetEmailEventTriggeredPerformanceCP returns performance of event-triggered emails for control panel */ GetEmailEventTriggeredPerformanceCP: StatisticsService_GetEmailEventTriggeredPerformanceCP; /** GetEmailFrequencyCappingCP returns email sends suppressed by frequency capping for control panel */ GetEmailFrequencyCappingCP: StatisticsService_GetEmailFrequencyCappingCP; /** GetEmailUnsubscribeByFrequencyCP returns the unsubscribe rate by how many letters an address got */ GetEmailUnsubscribeByFrequencyCP: StatisticsService_GetEmailUnsubscribeByFrequencyCP; /** GetEmailProviderStatisticsCP breaks email delivery of the period down by the recipients' mailbox provider */ GetEmailProviderStatisticsCP: StatisticsService_GetEmailProviderStatisticsCP; /** GetRetentionTotalStatisticsCP returns user retention statistics */ GetRetentionTotalStatisticsCP: StatisticsService_GetRetentionTotalStatisticsCP; /** GetEngagementTotalStatisticsCP returns user engagement metrics */ GetEngagementTotalStatisticsCP: StatisticsService_GetEngagementTotalStatisticsCP; /** GetActiveUsersTotalStatisticsCP returns active users statistics (DAU/MAU) for control panel */ GetActiveUsersTotalStatisticsCP: StatisticsService_GetActiveUsersTotalStatisticsCP; /** GetMessagesFunnelStatisticsCP returns message funnel conversion statistics */ GetMessagesFunnelStatisticsCP: StatisticsService_GetMessagesFunnelStatisticsCP; /** GetFrequencyCappingTotalStatisticsCP returns frequency capping totals for the application across all channels for the period */ GetFrequencyCappingTotalStatisticsCP: StatisticsService_GetFrequencyCappingTotalStatisticsCP; /** GetUsersPAEStatisticsCP returns Push Active Enabled (PAE) user statistics */ GetUsersPAEStatisticsCP: StatisticsService_GetUsersPAEStatisticsCP; /** GetEmailLinkStatistics returns email link click statistics with optional full link details */ GetEmailLinkStatistics: StatisticsService_GetEmailLinkStatistics; /** GetAdCampaignStatistics returns per-creative results of an ad campaign sold in emails */ GetAdCampaignStatistics: StatisticsService_GetAdCampaignStatistics; } /** StatisticsByApplicationIDRequest represents a request for application statistics */ export type StatisticsByApplicationIDRequest = { /** Application Code to get statistics for */ applicationId: number; /** Optional list of campaign IDs to filter by */ campaignIds: number[]; /** Start date in RFC3339 format */ fromRfc3339: string; /** End date in RFC3339 format */ toRfc3339: string; /** Include unique metrics */ withUniq: boolean; }; /** TotalStatisticsByApplicationIDResponse contains campaign statistics */ export type TotalStatisticsByApplicationIDResponse = { /** Statistics for each campaign */ campaigns: TotalEventCollection[]; }; /** TotalEventCollection contains aggregated event statistics for a campaign */ export type TotalEventCollection = { /** Campaign Code these stats belong to */ campaignId: number; /** Successful sends without errors */ sends: number; /** Number of message opens */ opens: number; /** Number of unsubscribes */ unsubs: number; /** Number of link clicks */ linkClicked: number; /** Number of message shows */ shows: number; /** Number of user interactions */ interactions: number; /** Number of skipped messages */ skipped: number; /** Number of successful deliveries */ deliveries: number; /** Total opens including duplicates */ totalOpens: number; /** Total deliveries including retries */ totalDeliveries: number; /** Permanent delivery failures */ hardBounces: number; /** Temporary delivery failures */ softBounces: number; /** Spam complaints */ complaints: number; /** Sending errors */ errors: number; /** Messages that couldn't be displayed */ unshowableSends: number; /** Rejected messages */ rejects: number; /** Publishing errors */ publishesErrors: number; /** Unique users skipped by frequency capping */ frequencyCappingUniqueUsers: number; /** Total skipped count by frequency capping */ frequencyCappingSuppressions: number; /** Unique opens attributed to Apple Mail Privacy Protection (AMPP) */ opensAmpp: number; }; export type MessageDeliveryReportRequest = { messageId: number; }; export type MessageDeliveryReportError = { error: string; tooltip: string; count: number; }; export type MessageDeliveryReport = { platform: string; total: number; errors: MessageDeliveryReportError[]; }; export type MessageDeliveryReportResponse = { messageDeliveryReport: MessageDeliveryReport[]; }; /** MessageStatus represents the current status of a message */ export type MessageStatus = /** Unknown or unspecified status */ 'MESSAGE_STATUS_UNSPECIFIED' /** Message was canceled */ | 'MESSAGE_STATUS_CANCELED' /** Message is being created */ | 'MESSAGE_STATUS_CREATING' /** Message sending completed */ | 'MESSAGE_STATUS_DONE' /** Message sending failed */ | 'MESSAGE_STATUS_FAIL' /** Message is pending */ | 'MESSAGE_STATUS_PENDING' /** Message is being processed */ | 'MESSAGE_STATUS_PROCESSING' /** Message is waiting to be sent */ | 'MESSAGE_STATUS_WAITING' /** Message was deleted */ | 'MESSAGE_STATUS_DELETED'; export type MessagesListRequest = { lastMessageId: number; createdVia: pushwoosh_statistics_types_Source; campaignCode: string; applicationCode: string; messageId: number; messageCode: string; status: MessageStatus; limit: number; searchContent: string; }; export type MessagesItem = { messageId: number; status: MessageStatus; content: string; sendDate: string; createdVia: pushwoosh_statistics_types_Source; hasError: boolean; hasReports: boolean; abTestId: number; }; export type MessagesListResponse = { messages: MessagesItem[]; }; export type GetMessageEmailStatisticsRequest = { messageId: number; }; export type MessageMetricWithTimestamp = { timestamp: string; sends: number; opens: number; deliveries: number; hardBounces: number; softBounces: number; rejects: number; confirmedSends: number; inboxOpens: number; unsubs: number; complaints: number; uniqOpens: number; uniqInboxOpens: number; unshowableSends: number; linksClicks: number; }; export type EmailLink = { link: string; count: number; conversion: number; }; export type GetMessageEmailStatisticsResponse = { metrics: MessageMetricWithTimestamp[]; links: EmailLink[]; }; export type GetMessageEmailLinkStatisticsRequest = { campaignCode: string; timestampFrom: string; timestampTo: string; }; export type EmailLinkTemplateCodeStatistics = { templateCode: string; links: EmailLink[]; }; export type GetMessageEmailLinkStatisticsResponse = { linksStatistics: EmailLinkTemplateCodeStatistics[]; }; export type GetMessagesTotalStatisticsRequest = { campaignIds: number[]; applicationId: number; messagesIds: number[]; withUniq: boolean; applicationIds: number[]; /** transactional messages share message_id 0, so they are addressed by code */ messagesCodes: string[]; /** required with messages_codes: the send date the server reads for ids is unavailable for them */ timestampFrom: string; }; export type MessageMetric = { sends: number; opens: number; deliveries: number; hardBounces: number; softBounces: number; rejects: number; confirmedSends: number; inboxOpens: number; unsubs: number; complaints: number; uniqOpens: number; uniqInboxOpens: number; unshowableSends: number; errors: number; totalOpens: number; totalDeliveries: number; linksClicks: number; uniqLinksClicks: number; }; export type MessageMetricItemTotal = { campaignId: number; applicationId: number; messageId: number; messageCode: string; platformId: number; metric: MessageMetric; }; export type GetMessagesTotalStatisticsResponse = { metrics: MessageMetricItemTotal[]; }; export type MessageMetricWithTimestampAndPlatformID = { timestamp: string; sends: number; opens: number; deliveries: number; hardBounces: number; softBounces: number; rejects: number; confirmedSends: number; inboxOpens: number; unsubs: number; complaints: number; uniqOpens: number; uniqInboxOpens: number; platformId: number; unshowableSends: number; }; export type GetMessageDetailStatisticsRequest = { messageId: number; applicationCode: string; timestampFrom: string; timestampTo: string; applicationGroup: string; campaignCode: string; }; export type GetMessageDetailStatisticsResponse = { metrics: MessageMetricWithTimestampAndPlatformID[]; }; export type DailyPlatformSubscribersStatistics = { timestamp: string; platformId: number; pushEnabled: number; pushDisabled: number; }; export type GetApplicationsSubscribersStatisticsRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type GetApplicationsSubscribersStatisticsResponse = { statistics: DailyPlatformSubscribersStatistics[]; }; export type GetApplicationsSubscribersStatisticsInternalRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type GetApplicationsSubscribersStatisticsInternalResponse = { statistics: DailyPlatformSubscribersStatistics[]; }; export type GetMessagesTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; interval: pushwoosh_statistics_types_TimeInterval; /** platforms to count; empty keeps every platform of the application */ platformIds: number[]; }; export type ShortMessageMetric = { sent: number; open: number; delivered: number; shown: number; hardBounces: number; softBounces: number; complaints: number; unsubs: number; /** sends that failed on the provider; bounces and complaints are email only */ errors: number; /** every open, while `open` above counts one per user */ openTotal: number; /** users the message reached, while `delivered` above counts every delivery */ deliveredUniq: number; }; export type ShortMessageMetricWithTimestampPlatformID = { timestamp: string; platformId: number; metrics: ShortMessageMetric; }; export type PlatformShortMetric = { platformId: number; currentMetric: ShortMessageMetric; previousMetric: ShortMessageMetric; }; export type GetMessagesTotalStatisticsCPResponse = { rows: ShortMessageMetricWithTimestampPlatformID[]; totals: PlatformShortMetric[]; }; export type GetInappTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; interval: pushwoosh_statistics_types_TimeInterval; inappCodes: string[]; richMediaCodes: string[]; }; export type CountPercent = { count: number; percent: number; }; export type MetricCountPercentWithTimestampPlatformID = { timestamp: string; platformId: number; metrics: CountPercent; }; export type PlatformMetricCount = { platformId: number; currentMetric: CountPercent; previousMetric: CountPercent; }; export type GetInappTotalStatisticsCPResponse = { rows: MetricCountPercentWithTimestampPlatformID[]; totals: PlatformMetricCount[]; frequencyCappingSuppressions: number; frequencyCappingUniqueUsers: number; }; export type GetEmailClicksTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; interval: pushwoosh_statistics_types_TimeInterval; }; export type GetEmailClicksTotalStatisticsCPResponse = { rows: MetricCountPercentWithTimestampPlatformID[]; totals: PlatformMetricCount[]; }; export type DevicePushCount = { pushEnable: number; pushDisable: number; }; export type MetricDevicePushCountWithTimestampPlatformID = { timestamp: string; platformId: number; metrics: DevicePushCount; }; export type PlatformDevicePushCount = { platformId: number; currentMetric: DevicePushCount; previousMetric: DevicePushCount; }; export type GetSubscribersTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type GetSubscribersTotalStatisticsCPResponse = { rows: MetricDevicePushCountWithTimestampPlatformID[]; totals: PlatformDevicePushCount[]; }; export type GetSubscribersDailyStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; platformIds: number[]; }; /** * subscribed = can be messaged on the platform, unsubscribed = address or token present but messaging off. * Email (platform 14) has no opt-out state in this source, so unsubscribed is always 0 there. */ export type SubscribersDailyCount = { subscribed: number; unsubscribed: number; }; export type SubscribersDailyCountWithTimestampPlatformID = { timestamp: string; platformId: number; metrics: SubscribersDailyCount; }; export type GetSubscribersDailyStatisticsCPResponse = { rows: SubscribersDailyCountWithTimestampPlatformID[]; }; export type GetEmailActivityDistributionCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; /** * The three buckets partition the base: dormant is what is left of it, so the shares * always add up to 100%. */ export type GetEmailActivityDistributionCPResponse = { base: number; clicked: number; openedNotClicked: number; dormant: number; /** Addresses whose only opens were machine ones (Apple MPP), counted as dormant. */ machineOnlyOpeners: number; /** The window actually read, clamped to the event log retention. */ windowFrom: string; windowTo: string; }; export type GetEmailEventTriggeredPerformanceCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type EmailPerformanceCounts = { sends: number; deliveries: number; opens: number; clicks: number; }; /** * Event-triggered here means everything sent by automation — Customer Journey and the * triggered API — as opposed to one-time campaigns composed in the control panel. */ export type GetEmailEventTriggeredPerformanceCPResponse = { /** * by_sends counts every send, by_uniques counts each recipient once; both come from one * read so the control panel switches between them without a refetch. */ bySends: EmailPerformanceCounts; byUniques: EmailPerformanceCounts; /** The window actually read, clamped to the event log retention. */ windowFrom: string; windowTo: string; }; export type GetEmailFrequencyCappingCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type EmailFrequencyCappingMetricWithTimestamp = { timestamp: string; suppressions: number; uniqueUsers: number; }; /** * rows are daily buckets, zero-filled over the window; the totals stand apart because a * unique-users total is not the sum of its daily ones. */ export type GetEmailFrequencyCappingCPResponse = { suppressions: number; uniqueUsers: number; rows: EmailFrequencyCappingMetricWithTimestamp[]; /** The window actually read, clamped to the action log retention. */ windowFrom: string; windowTo: string; }; export type GetEmailUnsubscribeByFrequencyCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; /** * One bucket of addresses by how many letters they got in the period; to = 0 is the open * ended last bucket. */ export type EmailUnsubscribeFrequencyBucket = { from: number; to: number; recipients: number; unsubscribed: number; }; export type GetEmailUnsubscribeByFrequencyCPResponse = { buckets: EmailUnsubscribeFrequencyBucket[]; /** The window actually read, clamped to the action log retention. */ windowFrom: string; windowTo: string; }; export type GetEmailProviderStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; /** * One mailbox provider of the recipients: gmail, outlook, yahoo, apple, yandex, mailru, or * other for every domain the taxonomy does not name. Counts are events, except opens, which * count each (recipient, message) once so a re-read letter cannot push opens past deliveries. */ export type EmailProviderStatistics = { provider: string; sends: number; deliveries: number; opens: number; hardBounces: number; softBounces: number; complaints: number; unsubscribes: number; }; export type GetEmailProviderStatisticsCPResponse = { /** Providers with at least one event in the window, most sends first. */ rows: EmailProviderStatistics[]; /** The window actually read, clamped to the email event log retention. */ windowFrom: string; windowTo: string; }; export type GetRetentionTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type GetRetentionTotalStatisticsCPResponse = { totals: PlatformMetricCount[]; }; export type GetEngagementTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; interval: pushwoosh_statistics_types_TimeInterval; }; export type GetEngagementTotalStatisticsCPResponse = { rows: MetricCountPercentWithTimestampPlatformID[]; totals: PlatformMetricCount[]; }; export type GetAverageCTRTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; interval: pushwoosh_statistics_types_TimeInterval; }; export type GetAverageCTRTotalStatisticsCPResponse = { rows: MetricCountPercentWithTimestampPlatformID[]; totals: PlatformMetricCount[]; }; export type GetActiveUsersTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type GetActiveUsersTotalStatisticsCPResponse = { dau: MetricCountPercentWithTimestampPlatformID[]; mau: MetricCountPercentWithTimestampPlatformID[]; dauTotals: PlatformMetricCount[]; mauTotals: PlatformMetricCount[]; }; export type GetMessagesFunnelStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type GetMessagesFunnelStatisticsCPResponse = { totals: PlatformShortMetric[]; }; export type GetFrequencyCappingTotalStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; interval: pushwoosh_statistics_types_TimeInterval; }; export type FrequencyCappingMetricWithTimestamp = { timestamp: string; frequencyCappingSuppressions: number; frequencyCappingUniqueUsers: number; }; export type GetFrequencyCappingTotalStatisticsCPResponse = { frequencyCappingSuppressions: number; frequencyCappingUniqueUsers: number; rows: FrequencyCappingMetricWithTimestamp[]; }; export type GetUsersPAEStatisticsCPRequest = { applicationCode: string; timestampFrom: string; timestampTo: string; }; export type GetUsersPAEStatisticsCPResponse = { rows: MetricCountPercentWithTimestampPlatformID[]; totals: PlatformMetricCount[]; }; /** ActiveUsersType specifies the type of active users calculation */ export type ActiveUsersType = /** Unspecified type */ 'ACTIVE_USERS_TYPE_UNSPECIFIED' /** Daily Active Users (DAU) */ | '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 with push token */ | 'ACTIVE_USERS_TYPE_MONTH_WITH_TOKEN'; export type ActiveUsersCount = { timestamp: string; applicationId: number; platformId: number; activeUsers: number; }; /** GetActiveUsersCountRequest represents a request for active users statistics */ export type GetActiveUsersCountRequest = { /** List of application IDs */ applicationIds: number[]; /** List of platform IDs to filter by */ platformIds: number[]; /** Start date (format: yyyy-mm-dd) */ dateFrom: string; /** End date (format: yyyy-mm-dd) */ dateTo: string; /** * Type of active users calculation: * ACTIVE_USERS_TYPE_DAY - return DAU * ACTIVE_USERS_TYPE_MONTH - month value is calculated as the number of monthly active users from start of the month * ACTIVE_USERS_TYPE_CALENDAR_MONTH - month value is calculated as the number of monthly active users from the specified date */ type: ActiveUsersType; }; export type GetActiveUsersCountResponse = { rows: ActiveUsersCount[]; }; /** GetSubscribersRequest represents a request for subscriber statistics */ export type GetSubscribersRequest = { /** List of application IDs */ applicationIds: number[]; /** List of platform IDs to filter by */ platformIds: number[]; /** Start date (format: yyyy-mm-dd) */ dateFrom: string; /** End date (format: yyyy-mm-dd) */ dateTo: string; }; export type GetSubscribersResponse_Subscribers = { timestamp: string; applicationId: number; platformId: number; pushEnable: number; pushDisable: number; }; export type GetSubscribersResponse = { rows: GetSubscribersResponse_Subscribers[]; }; /** GetApplicationTotalMetricsStatisticsRequest represents a request for application metrics */ export type GetApplicationTotalMetricsStatisticsRequest = { /** List of application IDs */ applicationIds: number[]; /** List of platform IDs to filter by */ platformIds: number[]; /** Start timestamp (format: yyyy-mm-dd hh:mm:ss) */ timestampFrom: string; /** End timestamp (format: yyyy-mm-dd hh:mm:ss) */ timestampTo: string; }; export type GetApplicationTotalMetricsStatisticsResponse = { rows: MessageMetricItemTotal[]; }; /** GetUnregisteredDevicesRequest represents a request for unregistered devices */ export type GetUnregisteredDevicesRequest = { /** Application Code */ applicationId: number; /** Start timestamp (format: yyyy-mm-dd hh:mm:ss) */ timestampFrom: string; /** End timestamp (format: yyyy-mm-dd hh:mm:ss) */ timestampTo: string; }; export type UnregisterDevice = { hwid: string; platformId: number; }; export type GetUnregisteredDevicesResponse = { devices: UnregisterDevice[]; }; /** OrderType specifies sort order */ export type OrderType = /** No specific order */ 'UNSPECIFIED' /** Ascending order */ | 'ASC' /** Descending order */ | 'DESC'; /** MessageHistoryOrderColumn specifies which column to sort by */ export type MessageHistoryOrderColumn = /** No specific column */ 'UNSPECIFIED_COLUMN' /** Sort by recipient count */ | 'RECIPIENTS' /** Sort by opened count */ | 'OPENED' /** Deprecated - click-through rate */ | 'CTR' /** Sort by send date */ | 'SENT_DATE' /** Sort by error count */ | 'ERRORS' /** Sort by open rate */ | 'OPEN_RATE' /** Sort by creation date */ | 'CREATED_DATE' /** Sort by last modification date */ | 'UPDATED_DATE'; export type MessageHistoryOrderBy = { by: MessageHistoryOrderColumn; order: OrderType; }; export type GetMessageHistoryFilters = { statuses: MessageStatus[]; platforms: number[]; sentDate: pushwoosh_statistics_types_DateRange; createdDate: pushwoosh_statistics_types_DateRange; createdVia: pushwoosh_statistics_types_Source[]; segments: string[]; campaigns: string[]; messageIds: number[]; messageCodes: string[]; }; export type GetMessageHistoryRequest_MessageType = 'UNKNOWN' | 'MARKETING' | 'TRANSACTIONAL'; export type GetMessageHistoryRequest = { page: number; limit: number; search: string; applicationCode: string; applications: string[]; appGroupCode: string; withoutMetrics: boolean; filters: GetMessageHistoryFilters; sort: MessageHistoryOrderBy; messageType: GetMessageHistoryRequest_MessageType; checkForMessages: boolean; }; export type MessageHistoryItemMetric = { recipients: number; opened: number; ctr: number; errors: number; }; export type MessageHistoryItem = { messageId: number; messageCode: string; title: string; content: string; sendFrom: string; createdAt: string; status: MessageStatus; metrics: MessageHistoryItemMetric; createdVia: pushwoosh_statistics_types_Source; campaignCode: string; segments: string; platforms: number[]; sentDate: string; ignoreUserTimezone: boolean; /** deprecated */ abTestId: number; timezone: string; isChild: boolean; viberTemplateId: string; whatsappContentId: string; }; export type GetMessageHistoryResponse = { total: number; items: MessageHistoryItem[]; hasAnyMessages: boolean; }; /** GetAccountTotalStatisticsRequest represents a request for account-level statistics */ export type GetAccountTotalStatisticsRequest = { /** List of account IDs */ accountIds: number[]; /** Start timestamp */ from: Date; /** End timestamp */ to: Date; }; export type GetAccountTotalStatisticsItem = { accountId: number; mau: number; emailSends: number; pushSend: number; date: string; }; export type GetAccountTotalStatisticsResponse = { items: GetAccountTotalStatisticsItem[]; }; /** MessageType filters tracking log rows by message type, mirroring rpc-v2. */ export type GetMessageLogRequest_MessageType = /** No filter */ 'unspecified' /** No filter */ | 'all' /** Only rows with message_id != 0 (broadcast/journey) */ | 'broadcast' /** Only rows with message_id = 0 */ | 'transactional'; /** GetMessageLogRequest represents a request for message tracking logs */ export type GetMessageLogRequest = { /** Token for pagination */ paginationToken: string; /** Filter by message ID */ messageId: number; /** Filter by message code */ messageCode: string; /** Filter by campaign code */ campaignCode: string; /** Filter by hardware ID */ hwid: string; /** Start date for filtering */ dateFrom: string; /** End date for filtering */ dateTo: string; /** Maximum number of results */ limit: number; /** Filter by user ID */ userId: string; /** Filter by application code */ applicationCode: string; /** Filter by action types */ actions: string[]; /** Filter by platforms */ platforms: string[]; /** Filter by message type (mirrors rpc-v2) */ messageType: GetMessageLogRequest_MessageType; }; export type TrackingLogStatistic = { timestamp: string; messageId: string; messageCode: string; campaignCode: string; hwid: string; platform: string; action: string; pushAlertsEnabled: string; status: string; errorReason: string; userId: string; applicationCode: string; payload?: string; }; export type GetMessageLogResponse = { paginationToken: string; data: TrackingLogStatistic[]; }; /** EmailLinkFilter contains filters for email link statistics */ export type EmailLinkFilter = { /** Date range filter */ dateRange: pushwoosh_statistics_types_DateRange; /** Filter by campaign */ campaign: string; /** Filter by application */ application: string; /** Filter by message IDs */ messagesIds: number[]; /** Filter by message codes */ messagesCodes: string[]; /** Filter by link template */ linkTemplate: string; /** Filter by email template */ template: string; /** Filter by email content code */ emailContentCode: string; }; export type EmailLinkParams = { withFullLinks: boolean; }; export type GetAdCampaignStatisticsRequest = { campaignId: number; dateRange: pushwoosh_statistics_types_DateRange; }; /** * One row per creative of the campaign. Opens are opens of the letters that * carried it: the creative is chosen once per send, so the send is the unit. * Every counter here belongs to ONE channel: a campaign sold in letters and in * pushes at once would otherwise report an open rate over two different things. */ export type AdCampaignStatisticsItem = { creativeId: number; /** letters of those sends */ sends: number; /** unique devices that opened a letter */ opens: number; /** unique devices that clicked the banner */ clicks: number; /** every click on the banner */ totalClicks: number; /** sends the creative was attached to, both channels */ messages: number; /** * A push has no link click of its own: what a recipient does with it is a tap, * counted apart from the banner clicks of a letter. */ pushTaps: number; /** every tap on it */ totalPushTaps: number; /** pushes of those sends */ pushSends: number; }; export type GetAdCampaignStatisticsResponse = { items: AdCampaignStatisticsItem[]; }; export type GetEmailLinkStatisticsRequest = { filters: EmailLinkFilter; params: EmailLinkParams; }; export type FullLinkStatistics = { fullLink: string; clicks: number; }; export type GetEmailLinkStatisticsResponseItem = { template: string; link: string; title: string; clicks: number; fullLinks: FullLinkStatistics[]; /** stable anchor id (data-pw-lid); empty for clicks from unstamped templates */ linkId: string; /** every click, where `clicks` counts unique devices */ totalClicks: number; }; export type GetEmailLinkStatisticsResponse = { items: GetEmailLinkStatisticsResponseItem[]; }; /** GetEmailLinkHWIDsRequest represents a request for devices that clicked email links */ export type GetEmailLinkHWIDsRequest = { /** Filters to apply */ filters: EmailLinkFilter; /** Results per page */ perPage: number; /** Page number */ page: number; }; export type GetEmailLinkHWIDsResponseItem = { timestamp: string; link: string; hwid: string; }; export type GetEmailLinkHWIDsResponse = { total: number; items: GetEmailLinkHWIDsResponseItem[]; };