featurebase-node 0.14.1 → 0.14.3
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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/audit-logs.d.mts +2 -2
- package/resources/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs.d.ts +2 -2
- package/resources/audit-logs.d.ts.map +1 -1
- package/resources/feedback/feedback.d.mts +2 -2
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +2 -2
- package/resources/feedback/feedback.d.ts.map +1 -1
- package/resources/feedback/feedback.js.map +1 -1
- package/resources/feedback/feedback.mjs.map +1 -1
- package/resources/feedback/index.d.mts +1 -1
- package/resources/feedback/index.d.mts.map +1 -1
- package/resources/feedback/index.d.ts +1 -1
- package/resources/feedback/index.d.ts.map +1 -1
- package/resources/feedback/index.js.map +1 -1
- package/resources/feedback/index.mjs.map +1 -1
- package/resources/feedback/posts/index.d.mts +1 -1
- package/resources/feedback/posts/index.d.mts.map +1 -1
- package/resources/feedback/posts/index.d.ts +1 -1
- package/resources/feedback/posts/index.d.ts.map +1 -1
- package/resources/feedback/posts/index.js.map +1 -1
- package/resources/feedback/posts/index.mjs.map +1 -1
- package/resources/feedback/posts/posts.d.mts +68 -1
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +68 -1
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +69 -0
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +69 -0
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/help-center/articles.d.mts +248 -11
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +248 -11
- package/resources/help-center/articles.d.ts.map +1 -1
- package/resources/help-center/articles.js +78 -0
- package/resources/help-center/articles.js.map +1 -1
- package/resources/help-center/articles.mjs +78 -0
- package/resources/help-center/articles.mjs.map +1 -1
- package/resources/help-center/help-center.d.mts +2 -2
- package/resources/help-center/help-center.d.mts.map +1 -1
- package/resources/help-center/help-center.d.ts +2 -2
- package/resources/help-center/help-center.d.ts.map +1 -1
- package/resources/help-center/help-center.js.map +1 -1
- package/resources/help-center/help-center.mjs.map +1 -1
- package/resources/help-center/index.d.mts +1 -1
- package/resources/help-center/index.d.mts.map +1 -1
- package/resources/help-center/index.d.ts +1 -1
- package/resources/help-center/index.d.ts.map +1 -1
- package/resources/help-center/index.js.map +1 -1
- package/resources/help-center/index.mjs.map +1 -1
- package/resources/reports.d.mts +227 -15
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +227 -15
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +36 -8
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +36 -8
- package/resources/reports.mjs.map +1 -1
- package/resources/support/conversations/conversations.d.mts +60 -19
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +60 -19
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +47 -12
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +47 -12
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/users/contacts/contacts.d.mts +2 -2
- package/resources/users/contacts/contacts.d.ts +2 -2
- package/resources/users/contacts/contacts.js +1 -1
- package/resources/users/contacts/contacts.mjs +1 -1
- package/src/resources/audit-logs.ts +2 -0
- package/src/resources/feedback/feedback.ts +4 -0
- package/src/resources/feedback/index.ts +2 -0
- package/src/resources/feedback/posts/index.ts +2 -0
- package/src/resources/feedback/posts/posts.ts +104 -0
- package/src/resources/help-center/articles.ts +380 -10
- package/src/resources/help-center/help-center.ts +8 -0
- package/src/resources/help-center/index.ts +4 -0
- package/src/resources/reports.ts +304 -14
- package/src/resources/support/conversations/conversations.ts +60 -19
- package/src/resources/users/contacts/contacts.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/reports.ts
CHANGED
|
@@ -65,10 +65,13 @@ export class Reports extends APIResource {
|
|
|
65
65
|
*
|
|
66
66
|
* 1. Pick a `metric` and `aggregation` from the datasets catalog
|
|
67
67
|
* (`GET /v2/reports/datasets`). Counts use `count`; duration metrics support
|
|
68
|
-
* `avg`, `median`, `min`, `max` and `percentile` (pass
|
|
69
|
-
* p95); rate metrics use `value`.
|
|
68
|
+
* `sum`, `avg`, `median`, `min`, `max`, `range` and `percentile` (pass
|
|
69
|
+
* `percentile: 95` for p95); rate metrics use `value`.
|
|
70
70
|
* 2. Set the reporting window with `startDate` / `endDate` (ISO 8601) and a
|
|
71
71
|
* `granularity` (`hour`, `day`, `week`, `month`) for the returned time series.
|
|
72
|
+
* Reporting data is available from **July 12, 2026**. Windows ending earlier
|
|
73
|
+
* are rejected; crossing windows are clamped to that boundary in the requested
|
|
74
|
+
* timezone.
|
|
72
75
|
* 3. Optionally narrow with `filters` — a rule
|
|
73
76
|
* (`{ "kind": "rule", "fieldId": "...", "operator": "in", "value": [...] }`) or
|
|
74
77
|
* an `and`/`or` group of rules. Attribute IDs and allowed operators come from
|
|
@@ -78,14 +81,39 @@ export class Reports extends APIResource {
|
|
|
78
81
|
* 5. Optionally pass `compareStartDate` / `compareEndDate` to get `previousValue`
|
|
79
82
|
* / `deltaPercent` alongside every data point.
|
|
80
83
|
*
|
|
84
|
+
* ### Top-N and Show Other
|
|
85
|
+
*
|
|
86
|
+
* For high-cardinality breakdowns, cap the number of returned series:
|
|
87
|
+
*
|
|
88
|
+
* - `topValuesLimit` keeps only the top **N** `groupBy` values;
|
|
89
|
+
* `segmentTopValuesLimit` does the same for `segmentBy`. Allowed values: **5, 7,
|
|
90
|
+
* 10, 15, 20**. `topValuesLimit` requires `groupBy`; `segmentTopValuesLimit`
|
|
91
|
+
* requires `segmentBy`.
|
|
92
|
+
* - Members are ranked by the selected metric/aggregation over the **full filtered
|
|
93
|
+
* primary range**, so the ranked set is **stable across every time bucket** (a
|
|
94
|
+
* value that spikes in one bucket but is small overall does not enter the set).
|
|
95
|
+
* A comparison period reuses the **primary period's** ranked set — it is never
|
|
96
|
+
* re-ranked, so the legend stays identical period-over-period.
|
|
97
|
+
* - `showOther` / `segmentShowOther` append a single synthetic bucket with id
|
|
98
|
+
* `__other__` and label `Other` that sums every value outside the top set.
|
|
99
|
+
* Because the values are summed, Show Other is only supported for **additive
|
|
100
|
+
* aggregations** (`count`, `sum`, `value`); it is rejected for `avg`, `median`,
|
|
101
|
+
* `min`, `max`, `range`, `percentile`, and for percentage metrics (whose ratios
|
|
102
|
+
* cannot be summed). `showOther` also requires `topValuesLimit` (and
|
|
103
|
+
* `segmentShowOther` requires `segmentTopValuesLimit`). Plain `topValuesLimit`
|
|
104
|
+
* (without Show Other) works with any aggregation.
|
|
105
|
+
* - The `__other__` group/segment aggregates rows outside the selected top groups
|
|
106
|
+
* and **cannot be drilled into** (`POST /v2/reports/drill-in` rejects
|
|
107
|
+
* `dataPointFilters.groupValue` / `segmentValue` equal to `__other__`).
|
|
108
|
+
*
|
|
81
109
|
* ### Example
|
|
82
110
|
*
|
|
83
111
|
* ```json
|
|
84
112
|
* {
|
|
85
113
|
* "metric": "new_conversations",
|
|
86
114
|
* "aggregation": "count",
|
|
87
|
-
* "startDate": "2026-
|
|
88
|
-
* "endDate": "2026-
|
|
115
|
+
* "startDate": "2026-07-12",
|
|
116
|
+
* "endDate": "2026-07-15",
|
|
89
117
|
* "granularity": "day",
|
|
90
118
|
* "groupBy": "conversation.channel",
|
|
91
119
|
* "filters": {
|
|
@@ -121,10 +149,10 @@ export class Reports extends APIResource {
|
|
|
121
149
|
* ```ts
|
|
122
150
|
* const response = await client.reports.query({
|
|
123
151
|
* aggregation: 'count',
|
|
124
|
-
* endDate: '2026-
|
|
152
|
+
* endDate: '2026-07-15',
|
|
125
153
|
* granularity: 'day',
|
|
126
154
|
* metric: 'new_conversations',
|
|
127
|
-
* startDate: '2026-
|
|
155
|
+
* startDate: '2026-07-12',
|
|
128
156
|
* });
|
|
129
157
|
* ```
|
|
130
158
|
*/
|
|
@@ -222,10 +250,10 @@ export class Reports extends APIResource {
|
|
|
222
250
|
* @example
|
|
223
251
|
* ```ts
|
|
224
252
|
* const response = await client.reports.drillIn({
|
|
225
|
-
* endDate: '
|
|
253
|
+
* endDate: '2026-07-15',
|
|
226
254
|
* granularity: 'day',
|
|
227
255
|
* metric: 'new_conversations',
|
|
228
|
-
* startDate: '
|
|
256
|
+
* startDate: '2026-07-12',
|
|
229
257
|
* });
|
|
230
258
|
* ```
|
|
231
259
|
*/
|
|
@@ -275,6 +303,12 @@ export interface ReportAttribute {
|
|
|
275
303
|
|
|
276
304
|
name: string;
|
|
277
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Whether the filter uses the latest mutable state, an immutable historical
|
|
308
|
+
* action/snapshot, or a metric-dependent mapping.
|
|
309
|
+
*/
|
|
310
|
+
semantics: 'current_state' | 'historical_action' | 'historical_snapshot' | 'dynamic_metric_mapped';
|
|
311
|
+
|
|
278
312
|
/**
|
|
279
313
|
* Whether the attribute can be used in `filters` rules.
|
|
280
314
|
*/
|
|
@@ -405,12 +439,24 @@ export interface ReportMetric {
|
|
|
405
439
|
*/
|
|
406
440
|
id: string;
|
|
407
441
|
|
|
408
|
-
allowedAggregations: Array<
|
|
442
|
+
allowedAggregations: Array<
|
|
443
|
+
'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value'
|
|
444
|
+
>;
|
|
409
445
|
|
|
410
446
|
description: string;
|
|
411
447
|
|
|
412
448
|
name: string;
|
|
413
449
|
|
|
450
|
+
/**
|
|
451
|
+
* Attribute IDs this specific metric accepts in filter expressions.
|
|
452
|
+
*/
|
|
453
|
+
supportedFilterAttributeIds: Array<string>;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Attribute IDs this specific metric accepts as `groupBy` or `segmentBy`.
|
|
457
|
+
*/
|
|
458
|
+
supportedGroupByDimensions: Array<string>;
|
|
459
|
+
|
|
414
460
|
/**
|
|
415
461
|
* Which `view` values `POST /v2/reports/query` accepts for this metric. Most
|
|
416
462
|
* metrics support `standard` and `hourly_heatmap`; conversation-flow metrics are
|
|
@@ -425,6 +471,36 @@ export interface ReportMetric {
|
|
|
425
471
|
type: 'count' | 'percentage' | 'duration' | 'number';
|
|
426
472
|
|
|
427
473
|
unit: 'count' | 'percentage' | 'duration_ms' | 'number';
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Local calendar date (ISO 8601) from which this specific metric has data, when it
|
|
477
|
+
* differs from the global reporting floor. Windows ending before this date are
|
|
478
|
+
* rejected for this metric.
|
|
479
|
+
*/
|
|
480
|
+
dataAvailableFromIso?: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Whether this variant is the default selection for its `variantGroupId`.
|
|
484
|
+
*/
|
|
485
|
+
isDefaultVariant?: boolean;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Metrics sharing a `variantGroupId` are timestamp variants of one logical metric
|
|
489
|
+
* (same display `name`); each measures the same population at a different
|
|
490
|
+
* timestamp. Query the concrete metric `id` to pick a variant.
|
|
491
|
+
*/
|
|
492
|
+
variantGroupId?: string;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Stable identifier for this variant within its group (e.g. `created_at`,
|
|
496
|
+
* `started_at`).
|
|
497
|
+
*/
|
|
498
|
+
variantId?: string;
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Human-readable variant label for pickers (e.g. `Created at`, `Started at`).
|
|
502
|
+
*/
|
|
503
|
+
variantLabel?: string;
|
|
428
504
|
}
|
|
429
505
|
|
|
430
506
|
export interface ReportSegmentDatum {
|
|
@@ -476,6 +552,7 @@ export interface ReportDrillInResponse {
|
|
|
476
552
|
| boolean
|
|
477
553
|
| Array<string>
|
|
478
554
|
| ReportDrillInResponse.ReportDrillInIdentityCell
|
|
555
|
+
| ReportDrillInResponse.ReportDrillInSourceDetailsCell
|
|
479
556
|
| null;
|
|
480
557
|
}>;
|
|
481
558
|
|
|
@@ -493,6 +570,11 @@ export namespace ReportDrillInResponse {
|
|
|
493
570
|
|
|
494
571
|
name: string;
|
|
495
572
|
|
|
573
|
+
/**
|
|
574
|
+
* Whether this column may be used in the drill-in sort request.
|
|
575
|
+
*/
|
|
576
|
+
supportsSort: boolean;
|
|
577
|
+
|
|
496
578
|
valueType: string;
|
|
497
579
|
|
|
498
580
|
category?: string;
|
|
@@ -502,6 +584,43 @@ export namespace ReportDrillInResponse {
|
|
|
502
584
|
datasetId: string;
|
|
503
585
|
|
|
504
586
|
metricId: string;
|
|
587
|
+
|
|
588
|
+
rawMetricId: string;
|
|
589
|
+
|
|
590
|
+
reconciliation: Meta.Reconciliation;
|
|
591
|
+
|
|
592
|
+
rowGrain: string;
|
|
593
|
+
|
|
594
|
+
rowSemantics: 'metric_rows' | 'numerator_rows';
|
|
595
|
+
|
|
596
|
+
sourceFact: string;
|
|
597
|
+
|
|
598
|
+
emptyReason?: 'no_matching_rows' | 'denominator_unavailable';
|
|
599
|
+
|
|
600
|
+
metricRowId?: string;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export namespace Meta {
|
|
604
|
+
export interface Reconciliation {
|
|
605
|
+
kind:
|
|
606
|
+
| 'rows'
|
|
607
|
+
| 'actions_across_conversations'
|
|
608
|
+
| 'active_hour_rate'
|
|
609
|
+
| 'positive_ratings_over_eligible_ratings'
|
|
610
|
+
| 'missed_over_evaluated';
|
|
611
|
+
|
|
612
|
+
rowCount: number;
|
|
613
|
+
|
|
614
|
+
status: 'not_applicable' | 'available' | 'denominator_unavailable';
|
|
615
|
+
|
|
616
|
+
denominatorHours?: number;
|
|
617
|
+
|
|
618
|
+
displayedRate?: number;
|
|
619
|
+
|
|
620
|
+
eligibleDenominatorTotal?: number;
|
|
621
|
+
|
|
622
|
+
rawNumeratorTotal?: number;
|
|
623
|
+
}
|
|
505
624
|
}
|
|
506
625
|
|
|
507
626
|
export interface ReportDrillInIdentityCell {
|
|
@@ -514,6 +633,26 @@ export namespace ReportDrillInResponse {
|
|
|
514
633
|
avatarUrl?: string;
|
|
515
634
|
|
|
516
635
|
color?: string;
|
|
636
|
+
|
|
637
|
+
provenance?: 'current' | 'historical' | 'fallback' | 'unassigned';
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export interface ReportDrillInSourceDetailsCell {
|
|
641
|
+
items: Array<ReportDrillInSourceDetailsCell.Item>;
|
|
642
|
+
|
|
643
|
+
kind: 'source_details';
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export namespace ReportDrillInSourceDetailsCell {
|
|
647
|
+
export interface Item {
|
|
648
|
+
label: string;
|
|
649
|
+
|
|
650
|
+
id?: string;
|
|
651
|
+
|
|
652
|
+
type?: string;
|
|
653
|
+
|
|
654
|
+
url?: string;
|
|
655
|
+
}
|
|
517
656
|
}
|
|
518
657
|
}
|
|
519
658
|
|
|
@@ -555,6 +694,8 @@ export interface ReportQueryResponse {
|
|
|
555
694
|
|
|
556
695
|
segmentData?: Array<ReportSegmentDatum>;
|
|
557
696
|
|
|
697
|
+
table?: ReportQueryResponse.Table;
|
|
698
|
+
|
|
558
699
|
timeSeries?: Array<ReportTimeSeriesDatum>;
|
|
559
700
|
}
|
|
560
701
|
|
|
@@ -565,7 +706,7 @@ export namespace ReportQueryResponse {
|
|
|
565
706
|
* aggregations — see the `allowedAggregations` field in the
|
|
566
707
|
* `GET /v2/reports/datasets` catalog.
|
|
567
708
|
*/
|
|
568
|
-
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'percentile' | 'value';
|
|
709
|
+
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value';
|
|
569
710
|
|
|
570
711
|
datasetId: string;
|
|
571
712
|
|
|
@@ -603,6 +744,98 @@ export namespace ReportQueryResponse {
|
|
|
603
744
|
|
|
604
745
|
sortOrder?: number;
|
|
605
746
|
}
|
|
747
|
+
|
|
748
|
+
export interface Table {
|
|
749
|
+
columns: Array<Table.Column>;
|
|
750
|
+
|
|
751
|
+
key: string;
|
|
752
|
+
|
|
753
|
+
mode: 'aggregate' | 'records';
|
|
754
|
+
|
|
755
|
+
page: number;
|
|
756
|
+
|
|
757
|
+
pageSize: number;
|
|
758
|
+
|
|
759
|
+
rows: Array<Table.Row>;
|
|
760
|
+
|
|
761
|
+
totalRows: number;
|
|
762
|
+
|
|
763
|
+
sort?: Table.Sort;
|
|
764
|
+
|
|
765
|
+
summaryRows?: Array<Table.SummaryRow>;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
export namespace Table {
|
|
769
|
+
export interface Column {
|
|
770
|
+
id: string;
|
|
771
|
+
|
|
772
|
+
kind: 'dimension' | 'metric' | 'record_attribute';
|
|
773
|
+
|
|
774
|
+
label: string;
|
|
775
|
+
|
|
776
|
+
sortable: boolean;
|
|
777
|
+
|
|
778
|
+
unit: 'count' | 'percentage' | 'duration_ms' | 'number' | 'text' | 'datetime';
|
|
779
|
+
|
|
780
|
+
align?: 'left' | 'right';
|
|
781
|
+
|
|
782
|
+
sticky?: boolean;
|
|
783
|
+
|
|
784
|
+
summary?: 'sum' | 'weighted_rate' | 'none';
|
|
785
|
+
|
|
786
|
+
valueType?: string;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export interface Row {
|
|
790
|
+
id: string;
|
|
791
|
+
|
|
792
|
+
cells: { [key: string]: Row.Cells };
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export namespace Row {
|
|
796
|
+
export interface Cells {
|
|
797
|
+
display: string;
|
|
798
|
+
|
|
799
|
+
denominator?: number;
|
|
800
|
+
|
|
801
|
+
numerator?: number;
|
|
802
|
+
|
|
803
|
+
raw?: unknown;
|
|
804
|
+
|
|
805
|
+
sortValue?: string | number | null;
|
|
806
|
+
|
|
807
|
+
value?: unknown;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export interface Sort {
|
|
812
|
+
columnId: string;
|
|
813
|
+
|
|
814
|
+
direction: 'asc' | 'desc';
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export interface SummaryRow {
|
|
818
|
+
id: string;
|
|
819
|
+
|
|
820
|
+
cells: { [key: string]: SummaryRow.Cells };
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export namespace SummaryRow {
|
|
824
|
+
export interface Cells {
|
|
825
|
+
display: string;
|
|
826
|
+
|
|
827
|
+
denominator?: number;
|
|
828
|
+
|
|
829
|
+
numerator?: number;
|
|
830
|
+
|
|
831
|
+
raw?: unknown;
|
|
832
|
+
|
|
833
|
+
sortValue?: string | number | null;
|
|
834
|
+
|
|
835
|
+
value?: unknown;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
606
839
|
}
|
|
607
840
|
|
|
608
841
|
export interface ReportListDatasetsParams {
|
|
@@ -619,10 +852,11 @@ export interface ReportQueryParams {
|
|
|
619
852
|
* subset of aggregations — see the `allowedAggregations` field in the
|
|
620
853
|
* `GET /v2/reports/datasets` catalog.
|
|
621
854
|
*/
|
|
622
|
-
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'percentile' | 'value';
|
|
855
|
+
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value';
|
|
623
856
|
|
|
624
857
|
/**
|
|
625
858
|
* Body param: End of the reporting window (ISO 8601 date or datetime, inclusive).
|
|
859
|
+
* Windows ending before 2026-07-12 are rejected.
|
|
626
860
|
*/
|
|
627
861
|
endDate: string;
|
|
628
862
|
|
|
@@ -639,7 +873,8 @@ export interface ReportQueryParams {
|
|
|
639
873
|
|
|
640
874
|
/**
|
|
641
875
|
* Body param: Start of the reporting window (ISO 8601 date or datetime,
|
|
642
|
-
* inclusive).
|
|
876
|
+
* inclusive). Reporting data is available from 2026-07-12; crossing windows are
|
|
877
|
+
* clamped to that boundary.
|
|
643
878
|
*/
|
|
644
879
|
startDate: string;
|
|
645
880
|
|
|
@@ -685,12 +920,48 @@ export interface ReportQueryParams {
|
|
|
685
920
|
*/
|
|
686
921
|
segmentBy?: string;
|
|
687
922
|
|
|
923
|
+
/**
|
|
924
|
+
* Body param: When `true`, fold `segmentBy` values outside the top set into a
|
|
925
|
+
* synthetic `__other__` / `Other` segment. Only supported for additive
|
|
926
|
+
* aggregations (`count`, `sum`, `value`) and not for percentage metrics. The
|
|
927
|
+
* `__other__` segment cannot be drilled into. Requires `segmentBy` and
|
|
928
|
+
* `segmentTopValuesLimit`.
|
|
929
|
+
*/
|
|
930
|
+
segmentShowOther?: boolean;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Body param: Keep only the top N `segmentBy` values per series, ranked by the
|
|
934
|
+
* selected metric over the full filtered primary range. Under a time View-by the
|
|
935
|
+
* ranked segment set is identical across every bucket; under a dimension View-by
|
|
936
|
+
* the ranking is applied within each retained parent group. Allowed values: `5`,
|
|
937
|
+
* `7`, `10`, `15`, `20`. Requires `segmentBy`.
|
|
938
|
+
*/
|
|
939
|
+
segmentTopValuesLimit?: 5 | 7 | 10 | 15 | 20;
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Body param: When `true`, append a single synthetic group with id `__other__` and
|
|
943
|
+
* label `Other` that sums the values of every `groupBy` value outside the top set.
|
|
944
|
+
* Only supported for additive aggregations (`count`, `sum`, `value`) and not for
|
|
945
|
+
* percentage metrics. The `__other__` group cannot be drilled into. Requires
|
|
946
|
+
* `groupBy` and `topValuesLimit`.
|
|
947
|
+
*/
|
|
948
|
+
showOther?: boolean;
|
|
949
|
+
|
|
688
950
|
/**
|
|
689
951
|
* Body param: IANA timezone for date bucketing (e.g. `America/New_York`). Defaults
|
|
690
952
|
* to UTC.
|
|
691
953
|
*/
|
|
692
954
|
timezone?: string;
|
|
693
955
|
|
|
956
|
+
/**
|
|
957
|
+
* Body param: Keep only the top N `groupBy` (View-by) values, ranked by the
|
|
958
|
+
* selected metric/aggregation over the full filtered primary range. Allowed
|
|
959
|
+
* values: `5`, `7`, `10`, `15`, `20`. The ranked set is stable across every time
|
|
960
|
+
* bucket, and a comparison period reuses the primary period's ranked set (never
|
|
961
|
+
* re-ranked). Requires `groupBy`.
|
|
962
|
+
*/
|
|
963
|
+
topValuesLimit?: 5 | 7 | 10 | 15 | 20;
|
|
964
|
+
|
|
694
965
|
/**
|
|
695
966
|
* Body param: Result shape. `standard` returns a time series (plus grouped/segment
|
|
696
967
|
* data when requested), `hourly_heatmap` buckets by day-of-week × hour-of-day,
|
|
@@ -738,7 +1009,8 @@ export interface ReportLookupFilterValuesParams {
|
|
|
738
1009
|
|
|
739
1010
|
export interface ReportDrillInParams {
|
|
740
1011
|
/**
|
|
741
|
-
* Body param
|
|
1012
|
+
* Body param: End of the reporting window (ISO 8601 date or datetime, inclusive).
|
|
1013
|
+
* Windows ending before 2026-07-12 are rejected.
|
|
742
1014
|
*/
|
|
743
1015
|
endDate: string;
|
|
744
1016
|
|
|
@@ -753,10 +1025,23 @@ export interface ReportDrillInParams {
|
|
|
753
1025
|
metric: string;
|
|
754
1026
|
|
|
755
1027
|
/**
|
|
756
|
-
* Body param
|
|
1028
|
+
* Body param: Start of the reporting window (ISO 8601 date or datetime,
|
|
1029
|
+
* inclusive). Reporting data is available from 2026-07-12; crossing windows are
|
|
1030
|
+
* clamped to that boundary.
|
|
757
1031
|
*/
|
|
758
1032
|
startDate: string;
|
|
759
1033
|
|
|
1034
|
+
/**
|
|
1035
|
+
* Body param: Stable editor ID of the saved chart that launched this drill-in.
|
|
1036
|
+
*/
|
|
1037
|
+
chartEditorId?: string;
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* Body param: Column IDs to include in each returned row. Omit for legacy
|
|
1041
|
+
* full-width static rows; pass an empty array to use `defaultColumnIds`.
|
|
1042
|
+
*/
|
|
1043
|
+
columns?: Array<string>;
|
|
1044
|
+
|
|
760
1045
|
/**
|
|
761
1046
|
* Body param: Narrows the drill-in to one data point from a previous query (time
|
|
762
1047
|
* bucket, group value, heatmap cell, or flow edge). Pass `{}` to list all
|
|
@@ -803,6 +1088,11 @@ export interface ReportDrillInParams {
|
|
|
803
1088
|
*/
|
|
804
1089
|
selectedMetricId?: string;
|
|
805
1090
|
|
|
1091
|
+
/**
|
|
1092
|
+
* Body param: Stable metric-row ID selected within the launching chart.
|
|
1093
|
+
*/
|
|
1094
|
+
selectedMetricRowId?: string;
|
|
1095
|
+
|
|
806
1096
|
/**
|
|
807
1097
|
* Body param
|
|
808
1098
|
*/
|
|
@@ -984,18 +984,53 @@ export class Conversations extends APIResource {
|
|
|
984
984
|
* `participant_id`, `company_id`, `created_at`) are still accepted for back-compat
|
|
985
985
|
* but are deprecated — please migrate to camelCase in new code.
|
|
986
986
|
*
|
|
987
|
-
* | Field
|
|
988
|
-
* |
|
|
989
|
-
* | `state`
|
|
990
|
-
* | `priority`
|
|
991
|
-
* | `adminAssigneeId`
|
|
992
|
-
* | `teamAssigneeId`
|
|
993
|
-
* | `brandId`
|
|
994
|
-
* | `tagIds`
|
|
995
|
-
* | `userId` / `participantId`
|
|
996
|
-
* | `companyId`
|
|
997
|
-
* | `mentionedAdminIds`
|
|
998
|
-
* | `createdAt`
|
|
987
|
+
* | Field | Type | Operators |
|
|
988
|
+
* | -------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
989
|
+
* | `state` | enum (`open` / `closed` / `snoozed`) | `=`, `!=`, `IN`, `NIN` |
|
|
990
|
+
* | `priority` | boolean | `=`, `!=` |
|
|
991
|
+
* | `adminAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
992
|
+
* | `teamAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
993
|
+
* | `brandId` | id or null | `=`, `!=`, `IN`, `NIN` |
|
|
994
|
+
* | `tagIds` | id (matches any conversation containing this tag) | `=`, `!=`, `IN`, `NIN` |
|
|
995
|
+
* | `userId` / `participantId` | id of a conversation participant | `=`, `!=`, `IN`, `NIN` |
|
|
996
|
+
* | `companyId` | company id (matches conversations whose participants belong to the company) | `=`, `!=`, `IN`, `NIN` |
|
|
997
|
+
* | `mentionedAdminIds` | admin id | `=`, `!=`, `IN`, `NIN` |
|
|
998
|
+
* | `createdAt` | unix seconds | `=`, `>`, `<` |
|
|
999
|
+
* | `customAttributes.<attributeId>` | conversation custom attribute (see below) | `=`, `!=`, `IN`, `NIN`; plus `>`, `<`, `>=`, `<=` for `number` / `date` |
|
|
1000
|
+
*
|
|
1001
|
+
* ### Filtering by custom attributes
|
|
1002
|
+
*
|
|
1003
|
+
* Any non-archived conversation custom attribute can be used as a filter field via
|
|
1004
|
+
* `customAttributes.<attributeId>`, where `<attributeId>` is the attribute's `id`
|
|
1005
|
+
* from `GET /v2/conversation_attributes`. The accepted value shape follows the
|
|
1006
|
+
* attribute's `fieldSubType`:
|
|
1007
|
+
*
|
|
1008
|
+
* - `select` / `multi-select` — pass an option **label** (e.g.
|
|
1009
|
+
* `"Product question"`) or an option **id**; both are matched interchangeably,
|
|
1010
|
+
* and id-based filters keep working after options are renamed
|
|
1011
|
+
* - `text` — string
|
|
1012
|
+
* - `number` — number; range operators (`>`, `<`, `>=`, `<=`) are supported
|
|
1013
|
+
* - `date` — ISO 8601 string or unix seconds; range operators are supported
|
|
1014
|
+
* - `checkbox` — boolean
|
|
1015
|
+
*
|
|
1016
|
+
* Example — all conversations where the "Issue type" select attribute is "Product
|
|
1017
|
+
* question":
|
|
1018
|
+
*
|
|
1019
|
+
* ```json
|
|
1020
|
+
* {
|
|
1021
|
+
* "query": {
|
|
1022
|
+
* "field": "customAttributes.6863d3fca1234b0d5e15c86c",
|
|
1023
|
+
* "operator": "=",
|
|
1024
|
+
* "value": "Product question"
|
|
1025
|
+
* },
|
|
1026
|
+
* "include": ["customAttributeDefinitions"]
|
|
1027
|
+
* }
|
|
1028
|
+
* ```
|
|
1029
|
+
*
|
|
1030
|
+
* Referencing an attribute id that does not exist (or has been archived) returns a
|
|
1031
|
+
* `field_unknown` error. Set `include` to `["customAttributeDefinitions"]` to get
|
|
1032
|
+
* each returned conversation's attribute values resolved with names and types
|
|
1033
|
+
* alongside the ID-keyed `customAttributes` map.
|
|
999
1034
|
*
|
|
1000
1035
|
* For unbounded fields a query consisting only of `!=` or `NIN` clauses is
|
|
1001
1036
|
* rejected with `query_too_broad` to prevent full-org scans. Combine the negation
|
|
@@ -1329,9 +1364,11 @@ export namespace Conversation {
|
|
|
1329
1364
|
requestId: string;
|
|
1330
1365
|
|
|
1331
1366
|
/**
|
|
1332
|
-
* Source that created the CSAT request
|
|
1367
|
+
* Source that created the CSAT request. `workflow` = Ask For Conversation Rating
|
|
1368
|
+
* workflow action, `fibi_auto` = automatic Fibi AI Agent survey on
|
|
1369
|
+
* resolve/handoff.
|
|
1333
1370
|
*/
|
|
1334
|
-
requestSource: 'workflow';
|
|
1371
|
+
requestSource: 'workflow' | 'fibi_auto';
|
|
1335
1372
|
|
|
1336
1373
|
/**
|
|
1337
1374
|
* Lifecycle status for this historical CSAT request
|
|
@@ -1437,7 +1474,7 @@ export namespace Conversation {
|
|
|
1437
1474
|
/**
|
|
1438
1475
|
* Source of the latest CSAT request when known
|
|
1439
1476
|
*/
|
|
1440
|
-
requestSource?: 'workflow';
|
|
1477
|
+
requestSource?: 'workflow' | 'fibi_auto';
|
|
1441
1478
|
|
|
1442
1479
|
/**
|
|
1443
1480
|
* CSAT score from 1 to 5 when rated
|
|
@@ -2001,9 +2038,11 @@ export namespace ConversationPart {
|
|
|
2001
2038
|
requestId: string;
|
|
2002
2039
|
|
|
2003
2040
|
/**
|
|
2004
|
-
* Source that created the CSAT request
|
|
2041
|
+
* Source that created the CSAT request. `workflow` = Ask For Conversation Rating
|
|
2042
|
+
* workflow action, `fibi_auto` = automatic Fibi AI Agent survey on
|
|
2043
|
+
* resolve/handoff.
|
|
2005
2044
|
*/
|
|
2006
|
-
requestSource: 'workflow';
|
|
2045
|
+
requestSource: 'workflow' | 'fibi_auto';
|
|
2007
2046
|
|
|
2008
2047
|
/**
|
|
2009
2048
|
* Status of the CSAT request represented by this part
|
|
@@ -2088,9 +2127,11 @@ export namespace ConversationPart {
|
|
|
2088
2127
|
requestId: string;
|
|
2089
2128
|
|
|
2090
2129
|
/**
|
|
2091
|
-
* Source that created the CSAT request
|
|
2130
|
+
* Source that created the CSAT request. `workflow` = Ask For Conversation Rating
|
|
2131
|
+
* workflow action, `fibi_auto` = automatic Fibi AI Agent survey on
|
|
2132
|
+
* resolve/handoff.
|
|
2092
2133
|
*/
|
|
2093
|
-
requestSource: 'workflow';
|
|
2134
|
+
requestSource: 'workflow' | 'fibi_auto';
|
|
2094
2135
|
|
|
2095
2136
|
/**
|
|
2096
2137
|
* CSAT score from 1 to 5
|
|
@@ -140,7 +140,7 @@ export class Contacts extends APIResource {
|
|
|
140
140
|
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
141
141
|
* | `locale` | string | No | Contact locale/language |
|
|
142
142
|
* | `phone` | string | No | Contact phone number |
|
|
143
|
-
* | `roles` | array | No | Role
|
|
143
|
+
* | `roles` | array | No | Role (User Tag) names to assign |
|
|
144
144
|
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
145
145
|
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
146
146
|
*
|
|
@@ -994,7 +994,7 @@ export interface ContactCreateOrUpdateParams {
|
|
|
994
994
|
profilePicture?: string | null;
|
|
995
995
|
|
|
996
996
|
/**
|
|
997
|
-
* Body param: Array of role
|
|
997
|
+
* Body param: Array of role (User Tag) names to assign to the contact
|
|
998
998
|
*/
|
|
999
999
|
roles?: Array<string>;
|
|
1000
1000
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.14.
|
|
1
|
+
export const VERSION = '0.14.3'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.14.
|
|
1
|
+
export declare const VERSION = "0.14.3";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.14.
|
|
1
|
+
export declare const VERSION = "0.14.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.14.
|
|
1
|
+
export const VERSION = '0.14.3'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|