@pushwoosh/rpc-v2-http-api-data 0.2.322 → 0.2.323

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.
Files changed (3) hide show
  1. package/data.js +73 -0
  2. package/events.d.ts +32 -0
  3. package/package.json +1 -1
package/data.js CHANGED
@@ -13292,6 +13292,12 @@ export const data = {
13292
13292
  "method": "post",
13293
13293
  "path": "/api/events:getTotalStatistics"
13294
13294
  },
13295
+ "GetRevenueStatistics": {
13296
+ "request": "pushwoosh.rpc_v2.events.GetRevenueStatisticsRequest",
13297
+ "response": "pushwoosh.rpc_v2.events.GetRevenueStatisticsResponse",
13298
+ "method": "post",
13299
+ "path": "/api/events:getRevenueStatistics"
13300
+ },
13295
13301
  "GetConversionSettings": {
13296
13302
  "request": "pushwoosh.rpc_v2.events.GetConversionSettingsRequest",
13297
13303
  "response": "pushwoosh.rpc_v2.events.ConversionSettings",
@@ -13340,6 +13346,14 @@ export const data = {
13340
13346
  }
13341
13347
  }
13342
13348
  },
13349
+ "pushwoosh.rpc_v2.events.RevenueMappingSource": {
13350
+ "type": "E",
13351
+ "values": [
13352
+ "REVENUE_MAPPING_SOURCE_UNSPECIFIED",
13353
+ "REVENUE_MAPPING_SOURCE_MANUAL",
13354
+ "REVENUE_MAPPING_SOURCE_AUTO"
13355
+ ]
13356
+ },
13343
13357
  "pushwoosh.rpc_v2.events.RevenueMapping": {
13344
13358
  "type": "I",
13345
13359
  "fields": {
@@ -13354,6 +13368,12 @@ export const data = {
13354
13368
  },
13355
13369
  "productIdAttr": {
13356
13370
  "type": "string"
13371
+ },
13372
+ "source": {
13373
+ "type": "pushwoosh.rpc_v2.events.RevenueMappingSource"
13374
+ },
13375
+ "disabled": {
13376
+ "type": "boolean"
13357
13377
  }
13358
13378
  }
13359
13379
  },
@@ -13757,6 +13777,59 @@ export const data = {
13757
13777
  }
13758
13778
  }
13759
13779
  },
13780
+ "pushwoosh.rpc_v2.events.GetRevenueStatisticsRequest": {
13781
+ "type": "I",
13782
+ "fields": {
13783
+ "application": {
13784
+ "type": "string"
13785
+ },
13786
+ "events": {
13787
+ "type": "string",
13788
+ "array": true
13789
+ },
13790
+ "dateFrom": {
13791
+ "type": "Date"
13792
+ },
13793
+ "dateTo": {
13794
+ "type": "Date"
13795
+ }
13796
+ }
13797
+ },
13798
+ "pushwoosh.rpc_v2.events.GetRevenueStatisticsResponse.CurrencyAmount": {
13799
+ "type": "I",
13800
+ "fields": {
13801
+ "currency": {
13802
+ "type": "string"
13803
+ },
13804
+ "amount": {
13805
+ "type": "number"
13806
+ }
13807
+ }
13808
+ },
13809
+ "pushwoosh.rpc_v2.events.GetRevenueStatisticsResponse.EventRevenue": {
13810
+ "type": "I",
13811
+ "fields": {
13812
+ "event": {
13813
+ "type": "string"
13814
+ },
13815
+ "triggeredCount": {
13816
+ "type": "number"
13817
+ },
13818
+ "incomeByCurrency": {
13819
+ "type": "pushwoosh.rpc_v2.events.GetRevenueStatisticsResponse.CurrencyAmount",
13820
+ "array": true
13821
+ }
13822
+ }
13823
+ },
13824
+ "pushwoosh.rpc_v2.events.GetRevenueStatisticsResponse": {
13825
+ "type": "I",
13826
+ "fields": {
13827
+ "metrics": {
13828
+ "type": "pushwoosh.rpc_v2.events.GetRevenueStatisticsResponse.EventRevenue",
13829
+ "array": true
13830
+ }
13831
+ }
13832
+ },
13760
13833
  "pushwoosh.rpc_v2.events.ContactType": {
13761
13834
  "type": "E",
13762
13835
  "values": [
package/events.d.ts CHANGED
@@ -8,6 +8,7 @@ export type EventsService_GetAttributeValues = RpcMethod<GetAttributeValuesReque
8
8
  export type EventsService_GetTriggeredCount = RpcMethod<GetTriggeredCountRequest, GetTriggeredCountResponse>;
9
9
  export type EventsService_GetDetailedStatistics = RpcMethod<GetDetailedStatisticsRequest, GetDetailedStatisticsResponse>;
10
10
  export type EventsService_GetTotalStatistics = RpcMethod<GetTotalStatisticsRequest, GetTotalStatisticsResponse>;
11
+ export type EventsService_GetRevenueStatistics = RpcMethod<GetRevenueStatisticsRequest, GetRevenueStatisticsResponse>;
11
12
  export type EventsService_GetConversionSettings = RpcMethod<GetConversionSettingsRequest, ConversionSettings>;
12
13
  export type EventsService_SaveConversionSettings = RpcMethod<SaveConversionSettingsRequest, ConversionSettings>;
13
14
  export interface EventsService {
@@ -29,6 +30,8 @@ export interface EventsService {
29
30
  GetDetailedStatistics: EventsService_GetDetailedStatistics;
30
31
  /** Returns total and unique triggered counts for custom events over a date range, optionally scoped to a message code or campaign. Use to attribute event volume to a specific send or campaign. */
31
32
  GetTotalStatistics: EventsService_GetTotalStatistics;
33
+ /** Returns per-currency revenue totals and triggered counts for the revenue-mapped events of an application over a date range. Use to show how much revenue an event brought, kept in the original currencies. */
34
+ GetRevenueStatistics: EventsService_GetRevenueStatistics;
32
35
  /** Returns which custom events of an application count as conversions for campaign attribution, each with its attribution window, plus the contact type (click or send) conversions are counted from. Empty events means attribution is not configured yet. */
33
36
  GetConversionSettings: EventsService_GetConversionSettings;
34
37
  /** Replaces the conversion settings of an application: up to 3 events with an attribution window each (24h, 72h, 7d or 30d) and one contact type for all of them. Events left out of the request stop counting as conversions. */
@@ -45,6 +48,11 @@ export type EventAttribute = {
45
48
  name: string;
46
49
  type: EventAttribute_Type;
47
50
  };
51
+ /**
52
+ * RevenueMappingSource is who created a revenue mapping: a user, the platform
53
+ * (system __amount/__currency attributes), or unset for rows predating the field.
54
+ */
55
+ export type RevenueMappingSource = 'REVENUE_MAPPING_SOURCE_UNSPECIFIED' | 'REVENUE_MAPPING_SOURCE_MANUAL' | 'REVENUE_MAPPING_SOURCE_AUTO';
48
56
  /**
49
57
  * RevenueMapping maps a source event's attributes onto the normalized
50
58
  * PW_Conversion revenue slots. Each field holds the name of the source
@@ -55,6 +63,8 @@ export type RevenueMapping = {
55
63
  currencyAttr: string;
56
64
  transactionIdAttr: string;
57
65
  productIdAttr: string;
66
+ source: RevenueMappingSource;
67
+ disabled: boolean;
58
68
  };
59
69
  export type Event = {
60
70
  name: string;
@@ -229,6 +239,28 @@ export type GetTotalStatisticsResponse = {
229
239
  /** Distinct users across all events at once; metrics are per event, so summing their uniq counts double-counts. */
230
240
  totalUniqTriggeredCount: number;
231
241
  };
242
+ export type GetRevenueStatisticsRequest = {
243
+ /** Application code (format XXXXX-XXXXX) whose revenue to count. */
244
+ application?: string;
245
+ /** Names of the custom events to report; empty returns every revenue-carrying event. */
246
+ events?: string[];
247
+ dateFrom?: Date;
248
+ dateTo?: Date;
249
+ };
250
+ export type GetRevenueStatisticsResponse_CurrencyAmount = {
251
+ /** ISO currency code, upper case. */
252
+ currency: string;
253
+ amount: number;
254
+ };
255
+ export type GetRevenueStatisticsResponse_EventRevenue = {
256
+ event: string;
257
+ triggeredCount: number;
258
+ /** Totals per original currency, no conversion applied. */
259
+ incomeByCurrency: GetRevenueStatisticsResponse_CurrencyAmount[];
260
+ };
261
+ export type GetRevenueStatisticsResponse = {
262
+ metrics: GetRevenueStatisticsResponse_EventRevenue[];
263
+ };
232
264
  /** ContactType is the touch a conversion is counted from: the click on the message (default) or the send itself. */
233
265
  export type ContactType = 'CONTACT_TYPE_UNSPECIFIED' | 'CONTACT_TYPE_CLICK' | 'CONTACT_TYPE_SENT';
234
266
  export type ConversionEvent = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.322",
3
+ "version": "0.2.323",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",