@pushwoosh/rpc-gateway-statistics-api 1.3.847 → 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
@@ -3813,6 +3813,12 @@ export const data = {
3813
3813
  "method": "post",
3814
3814
  "path": "/api/v2/statistics/overview/getEmailCategoryStats"
3815
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
+ },
3816
3822
  "GetRetentionCurve": {
3817
3823
  "request": "pushwoosh.statistics.statistics.v2.overviewkpi.GetRetentionCurveRequest",
3818
3824
  "response": "pushwoosh.statistics.statistics.v2.overviewkpi.GetRetentionCurveResponse",
@@ -4341,6 +4347,49 @@ export const data = {
4341
4347
  }
4342
4348
  }
4343
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
+ },
4344
4393
  "pushwoosh.statistics.statistics.v2.overviewkpi.GetRetentionCurveRequest": {
4345
4394
  "type": "I",
4346
4395
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-statistics-api",
3
- "version": "1.3.847",
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",
@@ -9,6 +9,7 @@ export type OverviewKPIService_GetEmailActivityDistribution = RpcMethod<GetEmail
9
9
  export type OverviewKPIService_GetEmailBaseChange = RpcMethod<GetEmailBaseChangeRequest, GetEmailBaseChangeResponse>;
10
10
  export type OverviewKPIService_GetEmailPerformance = RpcMethod<GetEmailPerformanceRequest, GetEmailPerformanceResponse>;
11
11
  export type OverviewKPIService_GetEmailCategoryStats = RpcMethod<GetEmailCategoryStatsRequest, GetEmailCategoryStatsResponse>;
12
+ export type OverviewKPIService_GetEmailSendFrequency = RpcMethod<GetEmailSendFrequencyRequest, GetEmailSendFrequencyResponse>;
12
13
  export type OverviewKPIService_GetRetentionCurve = RpcMethod<GetRetentionCurveRequest, GetRetentionCurveResponse>;
13
14
  export type OverviewKPIService_GetBaseChange = RpcMethod<GetBaseChangeRequest, GetBaseChangeResponse>;
14
15
  export type OverviewKPIService_GetUserMessageMetrics = RpcMethod<GetUserMessageMetricsRequest, GetUserMessageMetricsResponse>;
@@ -40,6 +41,8 @@ export interface OverviewKPIService {
40
41
  GetEmailPerformance: OverviewKPIService_GetEmailPerformance;
41
42
  /** GetEmailCategoryStats returns the per-category email numbers of the period. */
42
43
  GetEmailCategoryStats: OverviewKPIService_GetEmailCategoryStats;
44
+ /** GetEmailSendFrequency splits the users of the period by how many letters they got. */
45
+ GetEmailSendFrequency: OverviewKPIService_GetEmailSendFrequency;
43
46
  /** GetRetentionCurve returns the D1/D7/D30 curve of one cohort. */
44
47
  GetRetentionCurve: OverviewKPIService_GetRetentionCurve;
45
48
  /** GetBaseChange returns how the push device base moved over a period. */
@@ -331,6 +334,31 @@ export type GetEmailCategoryStatsResponse = {
331
334
  /** one row per category of the application, zero rows and the unnamed row included */
332
335
  rows: EmailCategoryStats[];
333
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
+ };
334
362
  export type GetRetentionCurveRequest = {
335
363
  applicationCode: string;
336
364
  /** day the cohort registered on */