@pushwoosh/rpc-gateway-statistics-api 1.3.846 → 1.3.848

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
@@ -3807,6 +3807,18 @@ export const data = {
3807
3807
  "method": "post",
3808
3808
  "path": "/api/v2/statistics/overview/getEmailPerformance"
3809
3809
  },
3810
+ "GetEmailCategoryStats": {
3811
+ "request": "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailCategoryStatsRequest",
3812
+ "response": "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailCategoryStatsResponse",
3813
+ "method": "post",
3814
+ "path": "/api/v2/statistics/overview/getEmailCategoryStats"
3815
+ },
3816
+ "GetEmailSendFrequency": {
3817
+ "request": "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailSendFrequencyRequest",
3818
+ "response": "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailSendFrequencyResponse",
3819
+ "method": "post",
3820
+ "path": "/api/v2/statistics/overview/getEmailSendFrequency"
3821
+ },
3810
3822
  "GetRetentionCurve": {
3811
3823
  "request": "pushwoosh.statistics.statistics.v2.overviewkpi.GetRetentionCurveRequest",
3812
3824
  "response": "pushwoosh.statistics.statistics.v2.overviewkpi.GetRetentionCurveResponse",
@@ -4283,6 +4295,101 @@ export const data = {
4283
4295
  }
4284
4296
  }
4285
4297
  },
4298
+ "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailCategoryStatsRequest": {
4299
+ "type": "I",
4300
+ "fields": {
4301
+ "applicationCode": {
4302
+ "type": "string"
4303
+ },
4304
+ "dayFrom": {
4305
+ "type": "Date"
4306
+ },
4307
+ "dayTo": {
4308
+ "type": "Date"
4309
+ }
4310
+ }
4311
+ },
4312
+ "pushwoosh.statistics.statistics.v2.overviewkpi.EmailCategoryStats": {
4313
+ "type": "I",
4314
+ "fields": {
4315
+ "categoryCode": {
4316
+ "type": "string"
4317
+ },
4318
+ "categoryName": {
4319
+ "type": "string"
4320
+ },
4321
+ "sends": {
4322
+ "type": "number"
4323
+ },
4324
+ "recipients": {
4325
+ "type": "number"
4326
+ },
4327
+ "opens": {
4328
+ "type": "number"
4329
+ },
4330
+ "clicks": {
4331
+ "type": "number"
4332
+ },
4333
+ "unsubscribers": {
4334
+ "type": "number"
4335
+ },
4336
+ "cohortUnsubscribers": {
4337
+ "type": "number"
4338
+ }
4339
+ }
4340
+ },
4341
+ "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailCategoryStatsResponse": {
4342
+ "type": "I",
4343
+ "fields": {
4344
+ "rows": {
4345
+ "type": "pushwoosh.statistics.statistics.v2.overviewkpi.EmailCategoryStats",
4346
+ "array": true
4347
+ }
4348
+ }
4349
+ },
4350
+ "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailSendFrequencyRequest": {
4351
+ "type": "I",
4352
+ "fields": {
4353
+ "applicationCode": {
4354
+ "type": "string"
4355
+ },
4356
+ "dayFrom": {
4357
+ "type": "Date"
4358
+ },
4359
+ "dayTo": {
4360
+ "type": "Date"
4361
+ }
4362
+ }
4363
+ },
4364
+ "pushwoosh.statistics.statistics.v2.overviewkpi.EmailSendFrequencyBucket": {
4365
+ "type": "I",
4366
+ "fields": {
4367
+ "from": {
4368
+ "type": "number"
4369
+ },
4370
+ "to": {
4371
+ "type": "number"
4372
+ },
4373
+ "users": {
4374
+ "type": "number"
4375
+ },
4376
+ "unsubscribed": {
4377
+ "type": "number"
4378
+ }
4379
+ }
4380
+ },
4381
+ "pushwoosh.statistics.statistics.v2.overviewkpi.GetEmailSendFrequencyResponse": {
4382
+ "type": "I",
4383
+ "fields": {
4384
+ "buckets": {
4385
+ "type": "pushwoosh.statistics.statistics.v2.overviewkpi.EmailSendFrequencyBucket",
4386
+ "array": true
4387
+ },
4388
+ "unsubscribedWithoutSends": {
4389
+ "type": "number"
4390
+ }
4391
+ }
4392
+ },
4286
4393
  "pushwoosh.statistics.statistics.v2.overviewkpi.GetRetentionCurveRequest": {
4287
4394
  "type": "I",
4288
4395
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-statistics-api",
3
- "version": "1.3.846",
3
+ "version": "1.3.848",
4
4
  "description": "Statistics API gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -8,6 +8,8 @@ export type OverviewKPIService_GetEmailRates = RpcMethod<GetEmailRatesRequest, G
8
8
  export type OverviewKPIService_GetEmailActivityDistribution = RpcMethod<GetEmailActivityDistributionRequest, GetEmailActivityDistributionResponse>;
9
9
  export type OverviewKPIService_GetEmailBaseChange = RpcMethod<GetEmailBaseChangeRequest, GetEmailBaseChangeResponse>;
10
10
  export type OverviewKPIService_GetEmailPerformance = RpcMethod<GetEmailPerformanceRequest, GetEmailPerformanceResponse>;
11
+ export type OverviewKPIService_GetEmailCategoryStats = RpcMethod<GetEmailCategoryStatsRequest, GetEmailCategoryStatsResponse>;
12
+ export type OverviewKPIService_GetEmailSendFrequency = RpcMethod<GetEmailSendFrequencyRequest, GetEmailSendFrequencyResponse>;
11
13
  export type OverviewKPIService_GetRetentionCurve = RpcMethod<GetRetentionCurveRequest, GetRetentionCurveResponse>;
12
14
  export type OverviewKPIService_GetBaseChange = RpcMethod<GetBaseChangeRequest, GetBaseChangeResponse>;
13
15
  export type OverviewKPIService_GetUserMessageMetrics = RpcMethod<GetUserMessageMetricsRequest, GetUserMessageMetricsResponse>;
@@ -37,6 +39,10 @@ export interface OverviewKPIService {
37
39
  GetEmailBaseChange: OverviewKPIService_GetEmailBaseChange;
38
40
  /** GetEmailPerformance returns the sends, deliveries, opens and clicks of the period. */
39
41
  GetEmailPerformance: OverviewKPIService_GetEmailPerformance;
42
+ /** GetEmailCategoryStats returns the per-category email numbers of the period. */
43
+ GetEmailCategoryStats: OverviewKPIService_GetEmailCategoryStats;
44
+ /** GetEmailSendFrequency splits the users of the period by how many letters they got. */
45
+ GetEmailSendFrequency: OverviewKPIService_GetEmailSendFrequency;
40
46
  /** GetRetentionCurve returns the D1/D7/D30 curve of one cohort. */
41
47
  GetRetentionCurve: OverviewKPIService_GetRetentionCurve;
42
48
  /** GetBaseChange returns how the push device base moved over a period. */
@@ -297,6 +303,62 @@ export type GetEmailPerformanceResponse = {
297
303
  bySends: EmailPerformanceCounts;
298
304
  byUsers: EmailPerformanceCounts;
299
305
  };
306
+ export type GetEmailCategoryStatsRequest = {
307
+ applicationCode: string;
308
+ dayFrom: Date;
309
+ dayTo: Date;
310
+ };
311
+ /**
312
+ * EmailCategoryStats is one row of the table. An empty code is the letters that
313
+ * neither their message nor their journey point names.
314
+ */
315
+ export type EmailCategoryStats = {
316
+ categoryCode: string;
317
+ categoryName: string;
318
+ /** letters, not recipients */
319
+ sends: number;
320
+ recipients: number;
321
+ /** users who opened; Apple MPP prefetches are left out where the log marks them */
322
+ opens: number;
323
+ /** users who clicked; our own unsubscribe link belongs to the unsubscribe event */
324
+ clicks: number;
325
+ /** everyone who unsubscribed inside the period, whatever letter caused it */
326
+ unsubscribers: number;
327
+ /**
328
+ * of them, those whose letter was sent inside the period too: the only
329
+ * numerator that cannot exceed the sends it is divided by
330
+ */
331
+ cohortUnsubscribers: number;
332
+ };
333
+ export type GetEmailCategoryStatsResponse = {
334
+ /** one row per category of the application, zero rows and the unnamed row included */
335
+ rows: EmailCategoryStats[];
336
+ };
337
+ export type GetEmailSendFrequencyRequest = {
338
+ applicationCode: string;
339
+ dayFrom: Date;
340
+ dayTo: Date;
341
+ };
342
+ /** EmailSendFrequencyBucket holds the users who got between from and to letters. */
343
+ export type EmailSendFrequencyBucket = {
344
+ from: number;
345
+ /** zero on the last bucket, which is open ended */
346
+ to: number;
347
+ users: number;
348
+ unsubscribed: number;
349
+ };
350
+ export type GetEmailSendFrequencyResponse = {
351
+ /**
352
+ * the edges scale with the period, so a wide window does not pile everyone
353
+ * into the open ended bucket
354
+ */
355
+ buckets: EmailSendFrequencyBucket[];
356
+ /**
357
+ * users who unsubscribed without a letter inside the period; no bucket holds
358
+ * them, because the axis is the letter count they do not have
359
+ */
360
+ unsubscribedWithoutSends: number;
361
+ };
300
362
  export type GetRetentionCurveRequest = {
301
363
  applicationCode: string;
302
364
  /** day the cohort registered on */