@pushwoosh/rpc-v2-http-api-data 0.1.883 → 0.1.885

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 (45) hide show
  1. package/account_groups.d.ts +9 -0
  2. package/account_invites.d.ts +2 -0
  3. package/account_overview.d.ts +21 -0
  4. package/account_users.d.ts +3 -0
  5. package/accounts.d.ts +29 -0
  6. package/accounts_get_auth_info.d.ts +4 -0
  7. package/api_tokens.d.ts +1 -0
  8. package/applications.d.ts +7 -0
  9. package/applications_alerts.d.ts +7 -1
  10. package/applications_groups.d.ts +2 -0
  11. package/applications_statistics.d.ts +28 -0
  12. package/categories.d.ts +1 -0
  13. package/cloud_pages.d.ts +2 -0
  14. package/data.js +330 -1314
  15. package/deeplinks.d.ts +3 -0
  16. package/devices.d.ts +5 -0
  17. package/email_categories.d.ts +3 -0
  18. package/emails_configurations.d.ts +1 -0
  19. package/events.d.ts +3 -0
  20. package/filters.d.ts +28 -0
  21. package/inapp_messages.d.ts +13 -0
  22. package/integrations.d.ts +38 -0
  23. package/ios_categories.d.ts +1 -0
  24. package/kakao_presets.d.ts +2 -0
  25. package/line_presets.d.ts +5 -0
  26. package/messages.d.ts +15 -2
  27. package/package.json +1 -1
  28. package/presets.d.ts +71 -0
  29. package/pushwoosh_accounts_alerts_v1.d.ts +2 -0
  30. package/pushwoosh_channels_messagingApi_v2.d.ts +51 -2
  31. package/pushwoosh_export_messages_v2.d.ts +17 -2
  32. package/pushwoosh_objects_filters_v1.d.ts +70 -11
  33. package/pushwoosh_objects_restrictionValues_v1.d.ts +86 -427
  34. package/pushwoosh_rpc_errors_v3.d.ts +20 -0
  35. package/pushwoosh_rpc_popup_forms_contents_v3.d.ts +48 -0
  36. package/pushwoosh_rpc_segments_v3.d.ts +54 -0
  37. package/referral_partners.d.ts +1 -0
  38. package/rich_medias.d.ts +6 -0
  39. package/sms_presets.d.ts +5 -0
  40. package/statistics_dashboards_widgets.d.ts +291 -3
  41. package/tags.d.ts +3 -0
  42. package/test_devices.d.ts +37 -0
  43. package/types.d.ts +6 -0
  44. package/whatsapp.d.ts +10 -0
  45. package/whatsapp_presets.d.ts +3 -0
@@ -8,62 +8,188 @@ export type StatisticsDashboardsWidgetsService_GetLinearChartMetrics = RpcMethod
8
8
  export type StatisticsDashboardsWidgetsService_GetTotalsChartMetrics = RpcMethod<GetTotalsChartMetricsRequest, GetTotalsChartMetricsResponse>;
9
9
  export type StatisticsDashboardsWidgetsService_GetFunnel = RpcMethod<GetFunnelRequest, GetFunnelResponse>;
10
10
  export type StatisticsDashboardsWidgetsService_GetCategoryTree = RpcMethod<GetCategoryTreeRequest, GetCategoryTreeResponse>;
11
+ /**
12
+ * StatisticsDashboardsWidgetsService provides APIs for managing statistics dashboard widgets (charts).
13
+ *
14
+ * Dashboard Layout Rules:
15
+ * - Dashboards typically contain 2 to 12 charts, but can include more if necessary.
16
+ * - Place the most important and high-level KPIs at the top (using lower order/index_number values).
17
+ * - The sum of size for charts in any single horizontal row MUST NOT exceed 6.
18
+ * - Every chart should offer potential insights that can lead to action or decision-making.
19
+ *
20
+ * Data Visualization Rules:
21
+ * - DO NOT combine metrics with different units (Number, Percent, Money) on the same chart.
22
+ * - DO NOT combine metrics with vastly different scales (e.g., Push Sends and Push Opens).
23
+ * - If a breakdown is applied to a chart, that chart MUST display ONLY ONE metric.
24
+ */
11
25
  export interface StatisticsDashboardsWidgetsService {
26
+ /** Load retrieves a single dashboard widget by its unique code identifier. */
12
27
  Load: StatisticsDashboardsWidgetsService_Load;
28
+ /** List retrieves all widgets belonging to a specific dashboard. */
13
29
  List: StatisticsDashboardsWidgetsService_List;
30
+ /** Create adds a new widget (chart) to a dashboard with specified metrics, filters, and visualization settings. */
14
31
  Create: StatisticsDashboardsWidgetsService_Create;
32
+ /** Update modifies an existing widget's configuration, including its name, type, size, metrics, and filters. */
15
33
  Update: StatisticsDashboardsWidgetsService_Update;
34
+ /** Delete removes a widget from the dashboard permanently. */
16
35
  Delete: StatisticsDashboardsWidgetsService_Delete;
36
+ /** GetLinearChartMetrics fetches time-series data for line and bar charts, returning data points over time. */
17
37
  GetLinearChartMetrics: StatisticsDashboardsWidgetsService_GetLinearChartMetrics;
38
+ /** GetTotalsChartMetrics fetches aggregated total values for pie charts and single-value metric widgets. */
18
39
  GetTotalsChartMetrics: StatisticsDashboardsWidgetsService_GetTotalsChartMetrics;
40
+ /** GetFunnel fetches funnel data showing sequential step conversion rates and user drop-off. */
19
41
  GetFunnel: StatisticsDashboardsWidgetsService_GetFunnel;
42
+ /**
43
+ * GetCategoryTree returns the hierarchical tree of all available metrics, events, and tags that can be selected in widgets.
44
+ * This includes:
45
+ * - Standard metrics from the "Metrics tree" (Push Sends, Email Opens, Subscribers, DAU, MAU, etc.)
46
+ * - Custom events available on the account without their attributes
47
+ * - Tags available on the account
48
+ * The response provides metadata like metric IDs, value types (Number/Percent/Money), available filters, and descriptions.
49
+ * Use this endpoint to discover which metrics, events, and tags are available for use in widget configurations.
50
+ */
20
51
  GetCategoryTree: StatisticsDashboardsWidgetsService_GetCategoryTree;
21
52
  }
22
53
  export type WidgetType = 'WIDGET_TYPE_UNKNOWN' | 'LINE' | 'BARS' | 'PIE' | 'NUMBER' | 'FUNNEL' | 'RETENTION';
23
54
  export type Widget = {
55
+ /** Chart's title, descriptive of the metrics displayed. Maximum length is 128 characters. */
24
56
  name: string;
57
+ /** Unique code identifier for the widget, generated by the system. */
25
58
  code: string;
59
+ /** Timestamp when the widget was created. */
26
60
  created: Date;
61
+ /** Timestamp when the widget was last updated. */
27
62
  updated: Date;
63
+ /** Visual representation of the chart (LINE for linear, BARS for bar, PIE for pie, NUMBER for metric) FUNNEL, RETENTION - temporary unavailable. */
28
64
  type: WidgetType;
65
+ /**
66
+ * Width of the chart in horizontal blocks (2-6). The sum of size for charts in any single horizontal row MUST NOT exceed 6.
67
+ * For single-value KPI metrics (NUMBER type), prefer size 2 or 3 for compactness.
68
+ * For trend charts (LINE type), prefer size 4 or 6 to ensure readability of data over time.
69
+ */
29
70
  size: string;
71
+ /**
72
+ * Optional JSON string representation of chart parameters. Deprecated in favor of widget_params.
73
+ * If provided, must be valid JSON that can be unmarshaled into Params structure.
74
+ */
30
75
  params?: string;
76
+ /**
77
+ * Structured chart parameters containing metrics, filters, time ranges, and breakdown configuration.
78
+ * This is the preferred way to specify widget configuration instead of the params JSON string.
79
+ */
31
80
  widgetParams: ChartParams;
81
+ /**
82
+ * Display order of the chart within the dashboard (lower number = higher placement).
83
+ * Place the most important and high-level KPIs at the top (using lower order values) for immediate visibility.
84
+ */
32
85
  indexNumber: number;
33
86
  };
34
87
  export type LoadDashboardWidgetRequest = {
88
+ /** Unique code identifier of the widget to load. Must exist in the database. */
35
89
  code?: string;
36
90
  };
37
91
  export type CreateDashboardWidgetRequest = {
92
+ /**
93
+ * Application code where the widget will be created. Validated to ensure the application exists
94
+ * and the user has access to it.
95
+ */
38
96
  application?: string;
97
+ /** Chart's title, descriptive of the metrics displayed. Required field, maximum length is 128 characters. */
39
98
  name?: string;
99
+ /** Visual representation of the chart (linear, bar, pie, metric). Required field, cannot be WIDGET_TYPE_UNKNOWN. */
40
100
  type?: WidgetType;
101
+ /** Width of the chart in horizontal blocks (2-6). The sum of size for charts in any single horizontal row MUST NOT exceed 6. */
41
102
  size?: string;
103
+ /**
104
+ * Optional JSON string representation of chart parameters. If provided, must be valid JSON
105
+ * that can be unmarshaled into Params structure. Deprecated in favor of widget_params.
106
+ */
42
107
  params?: string;
108
+ /**
109
+ * Structured chart parameters containing metrics, filters, time ranges, and breakdown configuration.
110
+ * This is the preferred way to specify widget configuration instead of the params JSON string.
111
+ */
43
112
  widgetParams?: ChartParams;
113
+ /** Dashboard code where the widget will be added. Required field, validated to ensure the dashboard exists. */
44
114
  dashboard?: string;
115
+ /** Display order of the chart within the dashboard (lower number = higher placement). */
45
116
  indexNumber?: number;
46
117
  };
47
118
  export type CreateDashboardWidgetResponse = {
119
+ /** The newly created widget with generated code and timestamps. */
48
120
  widget: Widget;
49
121
  };
50
122
  export type UpdateDashboardWidgetRequest = {
123
+ /** Application code of the widget. Currently not validated but expected to match the widget's application. */
51
124
  application?: string;
125
+ /** Unique code identifier of the widget to update. Required field, validated to ensure the widget exists. */
52
126
  code?: string;
127
+ /** New chart title. If provided, maximum length is 128 characters. Only updated if not empty. */
53
128
  name?: string;
129
+ /** New visual representation type for the chart. Only updated if not WIDGET_TYPE_UNKNOWN. */
54
130
  type?: WidgetType;
131
+ /** New width of the chart in horizontal blocks (2-6). Only updated if not empty. */
55
132
  size?: string;
133
+ /** New chart parameters as JSON string. Only updated if not empty. If provided, must be valid JSON. */
56
134
  params?: string;
135
+ /**
136
+ * New structured chart parameters. Only updated if provided. This is the preferred way to update
137
+ * widget configuration instead of the params JSON string.
138
+ */
57
139
  widgetParams?: ChartParams;
140
+ /** New display order (lower number = higher placement). Only updated if not 0. */
58
141
  indexNumber?: number;
59
142
  };
60
143
  export type UpdateDashboardWidgetResponse = {};
61
144
  export type DeleteDashboardWidgetRequest = {
145
+ /**
146
+ * Unique code identifier of the widget to delete. Validated to ensure the widget exists
147
+ * before deletion.
148
+ */
62
149
  code?: string;
63
150
  };
64
151
  export type DeleteDashboardWidgetResponse = {};
65
152
  export type TimeInterval = 'TIME_INTERVAL_UNSPECIFIED' | 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'MINUTE';
66
- export type Breakdown = 'BREAKDOWN_UNKNOWN' | 'PLATFORMS' | 'EVENT_ATTRIBUTE' | 'TAG_VALUES' | 'CAMPAIGNS' | 'MESSAGES' | 'JOURNEYS';
153
+ export type Breakdown =
154
+ /**
155
+ * For general counts or when no specific data-driven breakdown is needed.
156
+ * Applicable to: Any standard metric from the "Metrics tree" (specified by id), Events (by event_name), or Tags (by tag).
157
+ * selected_breakdowns are automatically chosen by the system.
158
+ */
159
+ 'BREAKDOWN_UNKNOWN'
160
+ /**
161
+ * To split data by configured platforms (e.g., SMS, Email).
162
+ * Applicable to: Standard metrics from the "Metrics tree" (specified by id) and Events (by event_name). NEVER use for Tags.
163
+ * You MUST include the metric field within breakdown.
164
+ */
165
+ | 'PLATFORMS'
166
+ /**
167
+ * To split Event data by its specific attributes.
168
+ * Applicable to: ONLY custom Events (specified by event_name). NEVER use for standard metrics (IDs) or Tags.
169
+ * You MUST set breakdown.event_attribute and include metric (with event_name set) within breakdown.
170
+ */
171
+ | 'EVENT_ATTRIBUTE'
172
+ /**
173
+ * To split data by values of a specific user tag.
174
+ * Applicable to: ONLY Tags (specified by tag). NEVER use for standard metrics (IDs) or Events.
175
+ * You MUST set breakdown.tag and include metric (with tag set) within breakdown.
176
+ */
177
+ | 'TAG_VALUES'
178
+ /**
179
+ * To split data by campaigns. Groups metrics by campaign_id and displays campaign names.
180
+ * Applicable to: Push/Email metrics and Events that support campaign filtering.
181
+ */
182
+ | 'CAMPAIGNS'
183
+ /**
184
+ * To split data by messages (push notifications or emails). Groups metrics by message_code.
185
+ * Applicable to: Push/Email metrics and Events that support message filtering.
186
+ */
187
+ | 'MESSAGES'
188
+ /**
189
+ * To split data by journeys.
190
+ * Applicable to: Metrics that support journey filtering.
191
+ */
192
+ | 'JOURNEYS';
67
193
  export type MathOperator = 'MATH_OPERATOR_UNSPECIFIED' | 'EQ' | 'NOT_EQ' | 'GTE' | 'LTE' | 'BETWEEN' | 'IN' | 'NOT_IN' | 'ANY' | 'NOT_SET';
68
194
  export type Value_kind_string = {
69
195
  type: 'string';
@@ -94,123 +220,285 @@ export type Value = {
94
220
  kind: Value_kind;
95
221
  };
96
222
  export type List = {
223
+ /** List of string values used in IN/NOT_IN operators for attribute conditions. */
97
224
  values: string[];
98
225
  };
99
226
  export type AttributeCondition = {
227
+ /** Name of the event attribute or tag to filter by (e.g., "user_level", "purchase_amount", "device_type"). */
100
228
  name: string;
229
+ /** Mathematical operator to use for comparison (EQ, NOT_EQ, GTE, LTE, BETWEEN, IN, NOT_IN, ANY, NOT_SET). */
101
230
  operator: MathOperator;
231
+ /**
232
+ * Values to compare against. The number and type of values depends on the operator:
233
+ * - EQ, NOT_EQ, GTE, LTE: single value
234
+ * - BETWEEN: two values (min and max)
235
+ * - IN, NOT_IN: list value
236
+ * - ANY, NOT_SET: no values needed
237
+ */
102
238
  values: Value[];
103
239
  };
104
240
  export type EventCalcType = 'EVENT_CALC_TYPE_ALL' | 'EVENT_CALC_TYPE_UNIQUE';
105
241
  export type Metric = {
242
+ /**
243
+ * Metric ID from the category tree. Retrieved via GetCategoryTree endpoint.
244
+ * Used to identify standard metrics from the "Metrics tree" like "Subscribers" (1101), "Recipients" (1102), "Push Sends" (102), etc.
245
+ * Mutually exclusive with event_name and tag.
246
+ */
106
247
  id: number;
248
+ /**
249
+ * Optional event name for event-based metrics (e.g., "SubscriptionCancelled", "AccountRegistered", "SubscriptionPurchased").
250
+ * Used when tracking custom events instead of standard metrics.
251
+ * Mutually exclusive with id and tag.
252
+ */
107
253
  eventName?: string;
254
+ /**
255
+ * Optional conditions to filter events by their attributes. Multiple conditions are ANDed together.
256
+ * For example, to count purchases over $100: [{name: "amount", operator: GTE, values: [100]}]
257
+ * Only applicable when event_name is specified.
258
+ */
108
259
  attributeConditions: AttributeCondition[];
260
+ /**
261
+ * Optional tag name for tag-based metrics (e.g., "Subscription Preferences", "User Tier").
262
+ * Used when tracking tag values instead of events or standard metrics.
263
+ * Mutually exclusive with id and event_name.
264
+ */
109
265
  tag?: string;
266
+ /**
267
+ * Optional calculation type for event metrics:
268
+ * - EVENT_CALC_TYPE_ALL (0): Count all event occurrences
269
+ * - EVENT_CALC_TYPE_UNIQUE (1): Count unique users who triggered the event
270
+ * Only applicable when event_name is specified.
271
+ */
110
272
  eventCalcType?: EventCalcType;
111
273
  };
112
274
  export type TypeFilter = 'Platform' | 'Segment' | 'Push' | 'Email' | 'Campaign' | 'Journey';
113
275
  export type ChartParams_TimeRange = {
276
+ /** Start timestamp for the data range (inclusive). */
114
277
  from: Date;
278
+ /** End timestamp for the data range (inclusive). */
115
279
  to: Date;
280
+ /**
281
+ * Time interval for grouping data points (HOUR, DAY, WEEK, MONTH, MINUTE).
282
+ * Determines the granularity of the chart data.
283
+ */
116
284
  interval: TimeInterval;
117
285
  };
118
286
  export type ChartParams_Filters = {
287
+ /** DEPRECATED: Use fltrs instead. List of platform IDs to filter by (1=iOS, 2=Android, etc.). */
119
288
  platforms: number[];
289
+ /** DEPRECATED: Use fltrs instead. List of message IDs to filter by. */
120
290
  messagesIds: number[];
291
+ /** DEPRECATED: Use fltrs instead. List of campaign codes to filter by. */
121
292
  campaignsCodes: string[];
293
+ /** DEPRECATED: Use fltrs instead. Attribute conditions to filter events. */
122
294
  attributeConditions: AttributeCondition[];
295
+ /** DEPRECATED: Use fltrs instead. Segment code to filter by. */
123
296
  segment: string;
124
297
  };
125
298
  export type ChartParams_Filter = {
299
+ /** Type of filter to apply (Platform, Segment, Push, Email, Campaign, Journey). */
126
300
  type: TypeFilter;
301
+ /**
302
+ * List of platform IDs to filter by (1=iOS, 2=Android, 3=Windows Phone, etc.).
303
+ * Used when type is Platform.
304
+ */
127
305
  platforms: number[];
306
+ /** Segment code to filter by user segment. Used when type is Segment. */
128
307
  segment?: string;
308
+ /** Push notification message ID to filter by. Used when type is Push. */
129
309
  pushId?: number;
310
+ /** Email campaign message ID to filter by. Used when type is Email. */
130
311
  emailId?: number;
312
+ /** Campaign code to filter by. Used when type is Campaign. */
131
313
  campaign?: string;
314
+ /** Journey code to filter by. Used when type is Journey. */
132
315
  journey?: string;
316
+ /** List of journey point IDs to filter by specific points in a journey. Used with type Journey. */
133
317
  jPoints: string[];
318
+ /** Whether this filter is currently disabled. Disabled filters are ignored in queries. */
134
319
  disabled?: boolean;
135
320
  };
136
321
  export type ChartParams_BreakdownParams = {
322
+ /**
323
+ * Type of breakdown to apply (BREAKDOWN_UNKNOWN, PLATFORMS, EVENT_ATTRIBUTE, TAG_VALUES, CAMPAIGNS, MESSAGES, JOURNEYS).
324
+ * Determines how data is segmented in the response.
325
+ * CRITICAL RULE: If a breakdown is applied to a chart, that chart MUST display ONLY ONE metric.
326
+ * The breakdown.type chosen MUST correspond to the metric type being broken down.
327
+ */
137
328
  type: Breakdown;
329
+ /**
330
+ * Event attribute name to breakdown by. REQUIRED when type is EVENT_ATTRIBUTE.
331
+ * For example, "ProductName" to break down subscription cancellations by product.
332
+ * ONLY applicable to custom Events (not standard metrics or Tags).
333
+ */
138
334
  eventAttribute?: string;
335
+ /**
336
+ * Metric to use for breakdown calculation.
337
+ * REQUIRED for PLATFORMS breakdown (e.g., metric: {id: 1101} or metric: {event_name: "MyEvent"}).
338
+ * REQUIRED for EVENT_ATTRIBUTE breakdown (e.g., metric: {event_name: "SubscriptionCancelled"}).
339
+ * REQUIRED for TAG_VALUES breakdown (e.g., metric: {tag: "Subscription Preferences"}).
340
+ */
139
341
  metric: Metric;
342
+ /**
343
+ * Pre-selected breakdown values to display. Automatically chosen by the system (do NOT set).
344
+ * Empty means show all breakdown values determined by the system.
345
+ */
140
346
  selectedBreakdowns: string[];
141
347
  };
142
348
  export type ChartParams = {
349
+ /** Time range for the chart data including start, end, and interval. */
143
350
  timeRange: ChartParams_TimeRange;
351
+ /**
352
+ * List of metrics to display in the chart. Each metric represents a data series.
353
+ * STRICT RULE: DO NOT combine metrics with different units (e.g., 'Number' with 'Percent' or 'Money') on the same chart.
354
+ * DO NOT combine metrics with vastly different scales (e.g., 'Push Sends' and 'Push Opens' MUST be on separate charts).
355
+ * If a breakdown is applied, the chart MUST display ONLY ONE metric.
356
+ */
144
357
  metrics: Metric[];
358
+ /** DEPRECATED: Use fltrs instead. Legacy filter structure. */
145
359
  filters?: ChartParams_Filters;
360
+ /**
361
+ * List of filters to apply to the data. Multiple filters are ANDed together.
362
+ * DO NOT add any filters unless explicitly provided by the user (e.g., PushID, EmailID, Campaign name, Journey ID, Segment ID).
363
+ */
146
364
  fltrs: ChartParams_Filter[];
365
+ /**
366
+ * Optional breakdown configuration to segment data by platform, attribute, tag, campaign, etc.
367
+ * If a breakdown is applied to a chart, that chart MUST display ONLY ONE metric.
368
+ */
147
369
  breakdown?: ChartParams_BreakdownParams;
370
+ /** Application code to query data from. Required field. */
148
371
  application: string;
372
+ /**
373
+ * Timezone for date calculations (e.g., "America/New_York", "UTC", "Europe/London").
374
+ * Used to correctly bucket data into time intervals.
375
+ */
149
376
  timezone: string;
150
377
  };
151
378
  export type GetLinearChartMetricsRequest = {
379
+ /**
380
+ * Chart parameters specifying metrics, filters, time range, and breakdown configuration
381
+ * for the linear chart. Used to fetch time-series data for line/bar charts (chart_type: "linear" or "bar").
382
+ * For trend charts, prefer size 4 or 6 to ensure readability of data over time.
383
+ */
152
384
  params?: ChartParams;
153
385
  };
154
386
  export type GetLinearChartMetricsResponse_Breakdown = {
387
+ /** Breakdown label (e.g., "iOS", "Android", "premium_user"). Empty string for non-breakdown metrics. */
155
388
  breakdown: string;
389
+ /** Array of metric values corresponding to each timestamp. Length matches timestamps array. */
156
390
  values: number[];
391
+ /** Calculated total for this breakdown (sum, average, or last value depending on metric type). */
157
392
  total: number;
158
393
  };
159
394
  export type GetLinearChartMetricsResponse_Metric = {
395
+ /** Metric name or description (e.g., "Active Users", "Sessions", "Revenue"). */
160
396
  metric: string;
397
+ /** List of breakdowns for this metric. Contains one breakdown per segment (or one total if no breakdown). */
161
398
  breakdowns: GetLinearChartMetricsResponse_Breakdown[];
162
399
  };
163
400
  export type GetLinearChartMetricsResponse = {
401
+ /** Array of timestamps for the X-axis. All metrics use the same timestamp array. */
164
402
  timestamps: Date[];
403
+ /** List of metrics with their breakdown data. Each metric can have multiple breakdowns. */
165
404
  metrics: GetLinearChartMetricsResponse_Metric[];
166
405
  };
167
406
  export type GetTotalsChartMetricsRequest = {
407
+ /**
408
+ * Chart parameters specifying metrics, filters, and time range for the totals chart.
409
+ * Used to fetch aggregated totals (single values) for pie charts, number widgets (chart_type: "pie" or "metric"), etc.
410
+ * For single-value KPI metrics (chart_type: "metric"), prefer size 2 or 3 for compactness.
411
+ */
168
412
  params?: ChartParams;
169
413
  };
170
414
  export type GetTotalsChartMetricsResponse_Breakdown = {
415
+ /** Breakdown label (e.g., "iOS", "Android", "premium_user"). Empty string for non-breakdown metrics. */
171
416
  breakdown: string;
417
+ /** Aggregated total value for this breakdown segment. */
172
418
  value: number;
419
+ /** Same as value, provided for consistency with linear chart response. */
173
420
  total: number;
174
421
  };
175
422
  export type GetTotalsChartMetricsResponse_Metric = {
423
+ /** Metric name or description (e.g., "Total Active Users", "Total Revenue"). */
176
424
  metric: string;
425
+ /** List of breakdowns for this metric. Contains one breakdown per segment (or one total if no breakdown). */
177
426
  breakdowns: GetTotalsChartMetricsResponse_Breakdown[];
178
427
  };
179
428
  export type GetTotalsChartMetricsResponse = {
429
+ /** List of metrics with their aggregated total values and breakdowns. */
180
430
  metrics: GetTotalsChartMetricsResponse_Metric[];
181
431
  };
182
432
  export type GetFunnelRequest = {
433
+ /**
434
+ * Chart parameters specifying metrics (funnel steps), filters, and time range for the funnel.
435
+ * The metrics list represents the sequential steps in the funnel.
436
+ */
183
437
  params?: ChartParams;
184
438
  };
185
439
  export type GetFunnelResponse_Step = {
440
+ /** Step name or breakdown label (e.g., "Page View", "Add to Cart", "Purchase"). */
186
441
  breakdown: string;
442
+ /** Number of users who completed this step. */
187
443
  count: number;
444
+ /** Percentage of users from the first step who reached this step (0-100). */
188
445
  percent: number;
189
446
  };
190
447
  export type GetFunnelResponse = {
448
+ /** Sequential list of funnel steps with user counts and conversion percentages. */
191
449
  steps: GetFunnelResponse_Step[];
192
450
  };
193
451
  export type GetCategoryTreeRequest = {
452
+ /**
453
+ * Application code to get available metrics for. Required field, validated to ensure
454
+ * the application exists and the user has access to it.
455
+ */
194
456
  application?: string;
195
457
  };
196
- export type GetCategoryTreeResponse_Metric_ValueType = 'Number' | 'Percent' | 'Money';
197
- export type GetCategoryTreeResponse_Metric_TotalCalculationType = 'Sum' | 'Avg' | 'Last';
458
+ export type GetCategoryTreeResponse_Metric_ValueType =
459
+ /** Numeric value (e.g., count, quantity). */
460
+ 'Number'
461
+ /** Percentage value (0-100). */
462
+ | 'Percent'
463
+ /** Monetary value (revenue, cost). */
464
+ | 'Money';
465
+ export type GetCategoryTreeResponse_Metric_TotalCalculationType =
466
+ /** Sum all values across the time range. */
467
+ 'Sum'
468
+ /** Average values across the time range. */
469
+ | 'Avg'
470
+ /** Use the last/most recent value. */
471
+ | 'Last';
198
472
  export type GetCategoryTreeResponse_Metric = {
473
+ /** Unique ID for this metric. Used in Metric.id when creating widgets. */
199
474
  id: number;
475
+ /** Metric name/label (e.g., "Active Users", "Sessions", "Revenue"). */
200
476
  metric: string;
477
+ /** Hierarchy level in the category tree (0 = root category, 1 = subcategory, etc.). */
201
478
  level: number;
479
+ /** Nested sub-metrics forming a tree structure. Empty for leaf metrics. */
202
480
  subMetrics: GetCategoryTreeResponse_Metric[];
481
+ /** Value type indicating how to format the metric (Number, Percent, Money). */
203
482
  type: GetCategoryTreeResponse_Metric_ValueType;
483
+ /** How to calculate the total value for this metric (Sum, Avg, Last). */
204
484
  totalType: GetCategoryTreeResponse_Metric_TotalCalculationType;
485
+ /** List of filter types that can be applied to this metric (Platform, Segment, Push, Email, etc.). */
205
486
  availableFilters: TypeFilter[];
487
+ /** Human-readable description of what this metric represents. */
206
488
  description: string;
207
489
  };
208
490
  export type GetCategoryTreeResponse = {
491
+ /** Root metric containing the entire category tree with all available metrics and events. */
209
492
  metrics: GetCategoryTreeResponse_Metric;
210
493
  };
211
494
  export type ListDashboardWidgetRequest = {
495
+ /**
496
+ * Dashboard code to list widgets from. Required field, validated to ensure the dashboard
497
+ * exists and belongs to the user's account.
498
+ */
212
499
  dashboardCode?: string;
213
500
  };
214
501
  export type ListDashboardWidgetResponse = {
502
+ /** List of widgets in the dashboard, ordered by index_number. */
215
503
  widgets: Widget[];
216
504
  };
package/tags.d.ts CHANGED
@@ -41,6 +41,7 @@ export type DeleteTagResponse = {};
41
41
  export type ListTagsRequest_OrderBy = 'NAME' | 'CREATED';
42
42
  export type ListTagsRequest_OrderDirection = 'ASC' | 'DESC';
43
43
  export type ListTagsRequest = {
44
+ /** like %name% */
44
45
  searchByName?: string;
45
46
  orderBy?: ListTagsRequest_OrderBy;
46
47
  orderDirection?: ListTagsRequest_OrderDirection;
@@ -59,12 +60,14 @@ export type GetTagValuesRequest_LikeOperator = 'STARTS_WITH' | 'ENDS_WITH' | 'CO
59
60
  export type GetTagValuesRequest = {
60
61
  application?: string;
61
62
  name?: string;
63
+ /** filters values by regexp /.*{value}.*\/ */
62
64
  like?: string;
63
65
  likeOp?: GetTagValuesRequest_LikeOperator;
64
66
  orderBy?: GetTagValuesRequest_OrderBy;
65
67
  orderDirection?: GetTagValuesRequest_OrderDirection;
66
68
  limit?: number;
67
69
  offset?: number;
70
+ /** additional pagination for front */
68
71
  page?: number;
69
72
  perPage?: number;
70
73
  };
package/test_devices.d.ts CHANGED
@@ -4,43 +4,80 @@ export type TestDevicesService_Verify = RpcMethod<VerifyRequest, VerifyResponse>
4
4
  export type TestDevicesService_List = RpcMethod<ListRequest, ListResponse>;
5
5
  export type TestDevicesService_Delete = RpcMethod<DeleteRequest, DeleteResponse>;
6
6
  export interface TestDevicesService {
7
+ /** Create creates a new test device. */
7
8
  Create: TestDevicesService_Create;
9
+ /** Verify verifies a new test device for email, SMS and whatsapp plaftorm. */
8
10
  Verify: TestDevicesService_Verify;
11
+ /** List returns a list of test devices for given application. */
9
12
  List: TestDevicesService_List;
13
+ /** Delete deletes an existing test device by application code and push token. */
10
14
  Delete: TestDevicesService_Delete;
11
15
  }
12
16
  export type TestDevice = {
17
+ /** test device name */
13
18
  name: string;
19
+ /** test device push token */
14
20
  pushToken: string;
21
+ /** test device hwid */
15
22
  hwid: string;
23
+ /** test device description */
16
24
  description: string;
25
+ /** test device platform */
17
26
  platform: string;
27
+ /** test device creation time */
18
28
  createdAt: Date;
19
29
  };
20
30
  export type CreateRequest = {
31
+ /** application code */
21
32
  application?: string;
33
+ /** push token */
22
34
  pushToken?: string;
35
+ /** hwid (if push token provided, hwid will be loaded from database) */
23
36
  hwid?: string;
37
+ /**
38
+ * test device platform. case insensitive. possible values:
39
+ * ios
40
+ * android
41
+ * baidu_android
42
+ * osx
43
+ * windows
44
+ * amazon
45
+ * safari
46
+ * chrome
47
+ * firefox
48
+ * ie
49
+ * email
50
+ * huawei_android
51
+ * line
52
+ */
24
53
  platform?: string;
54
+ /** test device name. must be non-empty. max length: 32 characters. */
25
55
  name?: string;
56
+ /** test device description. max length: 64 characters. */
26
57
  description?: string;
27
58
  };
28
59
  export type CreateResponse = {
29
60
  needsVerify: boolean;
30
61
  };
31
62
  export type VerifyRequest = {
63
+ /** verification code */
32
64
  code?: string;
33
65
  };
34
66
  export type VerifyResponse = {};
35
67
  export type ListRequest = {
68
+ /** application code */
36
69
  application?: string;
37
70
  };
38
71
  export type ListResponse = {
72
+ /** collection of test devices */
39
73
  testDevices: TestDevice[];
40
74
  };
41
75
  export type DeleteRequest = {
76
+ /** application code */
42
77
  application?: string;
78
+ /** test device hwid */
43
79
  hwid?: string;
80
+ /** test device push token */
44
81
  pushToken?: string;
45
82
  };
46
83
  export type DeleteResponse = {};
package/types.d.ts CHANGED
@@ -7,12 +7,14 @@ export type InterfaceDefinition = {
7
7
  oneofs?: {
8
8
  [oneofName: string]: OneofGroup;
9
9
  };
10
+ comment?: string;
10
11
  };
11
12
  export type FieldDefinition = {
12
13
  type: string;
13
14
  mapKeyType?: string;
14
15
  array?: boolean;
15
16
  optional?: boolean;
17
+ comment?: string;
16
18
  };
17
19
  export type OneofGroup = {
18
20
  oneof: string[];
@@ -21,6 +23,8 @@ export type EnumDefinition = {
21
23
  type: 'E';
22
24
  values: string[];
23
25
  valuesArgs?: Record<string, string[]>;
26
+ comment?: string;
27
+ valueComments?: Record<string, string>;
24
28
  };
25
29
  export type ServiceDefinition = {
26
30
  type: 'S';
@@ -28,6 +32,7 @@ export type ServiceDefinition = {
28
32
  methods: {
29
33
  [methodName: string]: ServiceMethod;
30
34
  };
35
+ comment?: string;
31
36
  };
32
37
  export type ServiceMethod = {
33
38
  request: string;
@@ -40,6 +45,7 @@ export type ServiceMethod = {
40
45
  failedPreconditions?: string;
41
46
  commonFailedPreconditions?: string;
42
47
  };
48
+ comment?: string;
43
49
  };
44
50
  export type InterfaceDefinitionRaw = InterfaceDefinition & {
45
51
  package: string;
package/whatsapp.d.ts CHANGED
@@ -6,30 +6,40 @@ export type WhatsAppService_FetchCatalog = RpcMethod<FetchCatalogRequest, FetchC
6
6
  export interface WhatsAppService {
7
7
  RegisterWABA: WhatsAppService_RegisterWABA;
8
8
  RegisterWABATwilio: WhatsAppService_RegisterWABATwilio;
9
+ /**
10
+ * When the user completes the login dialog flow we will redirect the user to your redirect URL and include a code.
11
+ * You must then exchange this code for an access token by performing a server-to-server call to Meta servers.
12
+ */
9
13
  AuthResponseCode: WhatsAppService_AuthResponseCode;
14
+ /** Fetch WhatsApp Business catalog and its products */
10
15
  FetchCatalog: WhatsAppService_FetchCatalog;
11
16
  }
12
17
  export type RegisterWABARequest = {
18
+ /** application code */
13
19
  application?: string;
14
20
  wabaId?: string;
15
21
  phonenumberId?: string;
16
22
  };
17
23
  export type RegisterWABAResponse = {};
18
24
  export type AuthResponseCodeRequest = {
25
+ /** application code */
19
26
  application?: string;
20
27
  code?: string;
21
28
  };
22
29
  export type AuthResponseCodeResponse = {};
23
30
  export type RegisterWABATwilioRequest = {
31
+ /** application code */
24
32
  application?: string;
25
33
  wabaId?: string;
26
34
  phonenumberId?: string;
27
35
  };
28
36
  export type RegisterWABATwilioResponse = {};
29
37
  export type FetchCatalogRequest = {
38
+ /** application code */
30
39
  application?: string;
31
40
  };
32
41
  export type FetchCatalogResponse = {
42
+ /** WABA can have only one catalog */
33
43
  catalog: Catalog;
34
44
  products: Product[];
35
45
  };