@pushwoosh/rpc-gateway-statistics-api 1.3.765 → 1.3.767

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/data.js CHANGED
@@ -213,12 +213,6 @@ export const data = {
213
213
  "method": "post",
214
214
  "path": "/api/v2/statistics/audience/getEmailEventTriggeredPerformance"
215
215
  },
216
- "GetEmailCategoryPerformanceCP": {
217
- "request": "pushwoosh.statistics.statistics.v1.GetEmailCategoryPerformanceCPRequest",
218
- "response": "pushwoosh.statistics.statistics.v1.GetEmailCategoryPerformanceCPResponse",
219
- "method": "post",
220
- "path": "/api/v2/statistics/audience/getEmailCategoryPerformance"
221
- },
222
216
  "GetEmailFrequencyCappingCP": {
223
217
  "request": "pushwoosh.statistics.statistics.v1.GetEmailFrequencyCappingCPRequest",
224
218
  "response": "pushwoosh.statistics.statistics.v1.GetEmailFrequencyCappingCPResponse",
@@ -1282,58 +1276,6 @@ export const data = {
1282
1276
  }
1283
1277
  }
1284
1278
  },
1285
- "pushwoosh.statistics.statistics.v1.GetEmailCategoryPerformanceCPRequest": {
1286
- "type": "I",
1287
- "fields": {
1288
- "applicationCode": {
1289
- "type": "string"
1290
- },
1291
- "timestampFrom": {
1292
- "type": "string"
1293
- },
1294
- "timestampTo": {
1295
- "type": "string"
1296
- }
1297
- }
1298
- },
1299
- "pushwoosh.statistics.statistics.v1.EmailCategoryPerformance": {
1300
- "type": "I",
1301
- "fields": {
1302
- "categoryCode": {
1303
- "type": "string"
1304
- },
1305
- "categoryName": {
1306
- "type": "string"
1307
- },
1308
- "sends": {
1309
- "type": "number"
1310
- },
1311
- "opens": {
1312
- "type": "number"
1313
- },
1314
- "clicks": {
1315
- "type": "number"
1316
- },
1317
- "unsubscribes": {
1318
- "type": "number"
1319
- }
1320
- }
1321
- },
1322
- "pushwoosh.statistics.statistics.v1.GetEmailCategoryPerformanceCPResponse": {
1323
- "type": "I",
1324
- "fields": {
1325
- "rows": {
1326
- "type": "pushwoosh.statistics.statistics.v1.EmailCategoryPerformance",
1327
- "array": true
1328
- },
1329
- "windowFrom": {
1330
- "type": "string"
1331
- },
1332
- "windowTo": {
1333
- "type": "string"
1334
- }
1335
- }
1336
- },
1337
1279
  "pushwoosh.statistics.statistics.v1.GetEmailFrequencyCappingCPRequest": {
1338
1280
  "type": "I",
1339
1281
  "fields": {
@@ -3821,6 +3763,12 @@ export const data = {
3821
3763
  "response": "pushwoosh.statistics.statistics.v2.statistics.GetActiveAudienceResponse",
3822
3764
  "method": "post",
3823
3765
  "path": "/api/v2/statistics/audience/getActiveAudience"
3766
+ },
3767
+ "GetEmailCategoryPerformance": {
3768
+ "request": "pushwoosh.statistics.statistics.v2.statistics.GetEmailCategoryPerformanceRequest",
3769
+ "response": "pushwoosh.statistics.statistics.v2.statistics.GetEmailCategoryPerformanceResponse",
3770
+ "method": "post",
3771
+ "path": "/api/v2/statistics/messages/getEmailCategoryPerformance"
3824
3772
  }
3825
3773
  }
3826
3774
  },
@@ -5370,5 +5318,59 @@ export const data = {
5370
5318
  "array": true
5371
5319
  }
5372
5320
  }
5321
+ },
5322
+ "pushwoosh.statistics.statistics.v2.statistics.GetEmailCategoryPerformanceRequest": {
5323
+ "type": "I",
5324
+ "fields": {
5325
+ "application": {
5326
+ "type": "string"
5327
+ },
5328
+ "dateFrom": {
5329
+ "type": "Date"
5330
+ },
5331
+ "dateTo": {
5332
+ "type": "Date"
5333
+ },
5334
+ "campaignCategories": {
5335
+ "type": "string",
5336
+ "mapKeyType": "number"
5337
+ }
5338
+ }
5339
+ },
5340
+ "pushwoosh.statistics.statistics.v2.statistics.EmailCategoryCounters": {
5341
+ "type": "I",
5342
+ "fields": {
5343
+ "categoryCode": {
5344
+ "type": "string"
5345
+ },
5346
+ "sends": {
5347
+ "type": "number"
5348
+ },
5349
+ "opens": {
5350
+ "type": "number"
5351
+ },
5352
+ "clicks": {
5353
+ "type": "number"
5354
+ }
5355
+ }
5356
+ },
5357
+ "pushwoosh.statistics.statistics.v2.statistics.GetEmailCategoryPerformanceResponse": {
5358
+ "type": "I",
5359
+ "fields": {
5360
+ "categories": {
5361
+ "type": "pushwoosh.statistics.statistics.v2.statistics.EmailCategoryCounters",
5362
+ "array": true
5363
+ },
5364
+ "unsubscribes": {
5365
+ "type": "number",
5366
+ "mapKeyType": "string"
5367
+ },
5368
+ "windowFrom": {
5369
+ "type": "Date"
5370
+ },
5371
+ "windowTo": {
5372
+ "type": "Date"
5373
+ }
5374
+ }
5373
5375
  }
5374
5376
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-statistics-api",
3
- "version": "1.3.765",
3
+ "version": "1.3.767",
4
4
  "description": "Statistics API gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -23,7 +23,6 @@ export type StatisticsService_GetSubscribersTotalStatisticsCP = RpcMethod<GetSub
23
23
  export type StatisticsService_GetSubscribersDailyStatisticsCP = RpcMethod<GetSubscribersDailyStatisticsCPRequest, GetSubscribersDailyStatisticsCPResponse>;
24
24
  export type StatisticsService_GetEmailActivityDistributionCP = RpcMethod<GetEmailActivityDistributionCPRequest, GetEmailActivityDistributionCPResponse>;
25
25
  export type StatisticsService_GetEmailEventTriggeredPerformanceCP = RpcMethod<GetEmailEventTriggeredPerformanceCPRequest, GetEmailEventTriggeredPerformanceCPResponse>;
26
- export type StatisticsService_GetEmailCategoryPerformanceCP = RpcMethod<GetEmailCategoryPerformanceCPRequest, GetEmailCategoryPerformanceCPResponse>;
27
26
  export type StatisticsService_GetEmailFrequencyCappingCP = RpcMethod<GetEmailFrequencyCappingCPRequest, GetEmailFrequencyCappingCPResponse>;
28
27
  export type StatisticsService_GetEmailUnsubscribeByFrequencyCP = RpcMethod<GetEmailUnsubscribeByFrequencyCPRequest, GetEmailUnsubscribeByFrequencyCPResponse>;
29
28
  export type StatisticsService_GetRetentionTotalStatisticsCP = RpcMethod<GetRetentionTotalStatisticsCPRequest, GetRetentionTotalStatisticsCPResponse>;
@@ -76,8 +75,6 @@ export interface StatisticsService {
76
75
  GetEmailActivityDistributionCP: StatisticsService_GetEmailActivityDistributionCP;
77
76
  /** GetEmailEventTriggeredPerformanceCP returns performance of event-triggered emails for control panel */
78
77
  GetEmailEventTriggeredPerformanceCP: StatisticsService_GetEmailEventTriggeredPerformanceCP;
79
- /** GetEmailCategoryPerformanceCP returns per-email-category performance for control panel */
80
- GetEmailCategoryPerformanceCP: StatisticsService_GetEmailCategoryPerformanceCP;
81
78
  /** GetEmailFrequencyCappingCP returns email sends suppressed by frequency capping for control panel */
82
79
  GetEmailFrequencyCappingCP: StatisticsService_GetEmailFrequencyCappingCP;
83
80
  /** GetEmailUnsubscribeByFrequencyCP returns the unsubscribe rate by how many letters an address got */
@@ -506,27 +503,6 @@ export type GetEmailEventTriggeredPerformanceCPResponse = {
506
503
  windowFrom: string;
507
504
  windowTo: string;
508
505
  };
509
- export type GetEmailCategoryPerformanceCPRequest = {
510
- applicationCode: string;
511
- timestampFrom: string;
512
- timestampTo: string;
513
- };
514
- export type EmailCategoryPerformance = {
515
- categoryCode: string;
516
- categoryName: string;
517
- sends: number;
518
- opens: number;
519
- clicks: number;
520
- /** Unsubscribes from this very category, not from the whole mailing. */
521
- unsubscribes: number;
522
- };
523
- /** One row per email category of the application, including categories nothing was sent to. */
524
- export type GetEmailCategoryPerformanceCPResponse = {
525
- rows: EmailCategoryPerformance[];
526
- /** The window actually read, clamped to the event log retention. */
527
- windowFrom: string;
528
- windowTo: string;
529
- };
530
506
  export type GetEmailFrequencyCappingCPRequest = {
531
507
  applicationCode: string;
532
508
  timestampFrom: string;
@@ -17,6 +17,7 @@ export type StatisticsService_GetCampaignDeliveryFunnel = RpcMethod<GetCampaignD
17
17
  export type StatisticsService_GetMessageDeliveryTimeline = RpcMethod<GetMessageDeliveryTimelineRequest, GetDeliveryTimelineResponse>;
18
18
  export type StatisticsService_GetCampaignDeliveryTimeline = RpcMethod<GetCampaignDeliveryTimelineRequest, GetDeliveryTimelineResponse>;
19
19
  export type StatisticsService_GetActiveAudience = RpcMethod<GetActiveAudienceRequest, GetActiveAudienceResponse>;
20
+ export type StatisticsService_GetEmailCategoryPerformance = RpcMethod<GetEmailCategoryPerformanceRequest, GetEmailCategoryPerformanceResponse>;
20
21
  /** StatisticsService provides various statistics operations */
21
22
  export interface StatisticsService {
22
23
  /** GetMessagesStatistics returns message statistics grouped by platform and time intervals */
@@ -65,6 +66,11 @@ export interface StatisticsService {
65
66
  GetCampaignDeliveryTimeline: StatisticsService_GetCampaignDeliveryTimeline;
66
67
  /** GetActiveAudience returns active users and active devices groped by application and platform */
67
68
  GetActiveAudience: StatisticsService_GetActiveAudience;
69
+ /**
70
+ * GetEmailCategoryPerformance counts email sends, openers and clickers per category code.
71
+ * The caller names the categories; statistics only groups by the names it is given.
72
+ */
73
+ GetEmailCategoryPerformance: StatisticsService_GetEmailCategoryPerformance;
68
74
  }
69
75
  /** EmailEventType represents different types of email delivery events */
70
76
  export type EmailEventType =
@@ -1106,3 +1112,42 @@ export type GetControlGroupAnalyticsResponse = {
1106
1112
  /** Per-event analytics rows */
1107
1113
  events: ControlGroupAnalyticsEvent[];
1108
1114
  };
1115
+ /** GetEmailCategoryPerformanceRequest asks for per-category counters over the period */
1116
+ export type GetEmailCategoryPerformanceRequest = {
1117
+ /** Application Code */
1118
+ application: string;
1119
+ /** Period start */
1120
+ dateFrom: Date;
1121
+ /** Period end */
1122
+ dateTo: Date;
1123
+ /**
1124
+ * Category code per campaign, for the email sends that have no message row of their own;
1125
+ * a send with a message row is named by the message and ignores this map.
1126
+ */
1127
+ campaignCategories: Record<number, string>;
1128
+ };
1129
+ /** EmailCategoryCounters holds the counters of one category code */
1130
+ export type EmailCategoryCounters = {
1131
+ /** Category code the sends were grouped by */
1132
+ categoryCode: string;
1133
+ /** Letters sent */
1134
+ sends: number;
1135
+ /** Recipients who opened at least one of them */
1136
+ opens: number;
1137
+ /** Recipients who clicked a link other than unsubscribe */
1138
+ clicks: number;
1139
+ };
1140
+ /**
1141
+ * GetEmailCategoryPerformanceResponse contains per-category counters and the unsubscribes
1142
+ * the unsubscribe event reports, keyed by the category name it carries
1143
+ */
1144
+ export type GetEmailCategoryPerformanceResponse = {
1145
+ /** Categories something was sent to */
1146
+ categories: EmailCategoryCounters[];
1147
+ /** Unsubscribed recipients per category name */
1148
+ unsubscribes: Record<string, number>;
1149
+ /** Window actually read, clamped to retention */
1150
+ windowFrom: Date;
1151
+ /** Window actually read */
1152
+ windowTo: Date;
1153
+ };