featurebase-node 0.14.1 → 0.14.2
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 +4 -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/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 +89 -10
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +89 -10
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +9 -6
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +9 -6
- package/resources/reports.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/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 +127 -10
- 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
|
|
@@ -84,8 +87,8 @@ export class Reports extends APIResource {
|
|
|
84
87
|
* {
|
|
85
88
|
* "metric": "new_conversations",
|
|
86
89
|
* "aggregation": "count",
|
|
87
|
-
* "startDate": "2026-
|
|
88
|
-
* "endDate": "2026-
|
|
90
|
+
* "startDate": "2026-07-12",
|
|
91
|
+
* "endDate": "2026-07-15",
|
|
89
92
|
* "granularity": "day",
|
|
90
93
|
* "groupBy": "conversation.channel",
|
|
91
94
|
* "filters": {
|
|
@@ -121,10 +124,10 @@ export class Reports extends APIResource {
|
|
|
121
124
|
* ```ts
|
|
122
125
|
* const response = await client.reports.query({
|
|
123
126
|
* aggregation: 'count',
|
|
124
|
-
* endDate: '2026-
|
|
127
|
+
* endDate: '2026-07-15',
|
|
125
128
|
* granularity: 'day',
|
|
126
129
|
* metric: 'new_conversations',
|
|
127
|
-
* startDate: '2026-
|
|
130
|
+
* startDate: '2026-07-12',
|
|
128
131
|
* });
|
|
129
132
|
* ```
|
|
130
133
|
*/
|
|
@@ -275,6 +278,12 @@ export interface ReportAttribute {
|
|
|
275
278
|
|
|
276
279
|
name: string;
|
|
277
280
|
|
|
281
|
+
/**
|
|
282
|
+
* Whether the filter uses the latest mutable state, an immutable historical
|
|
283
|
+
* action/snapshot, or a metric-dependent mapping.
|
|
284
|
+
*/
|
|
285
|
+
semantics: 'current_state' | 'historical_action' | 'historical_snapshot' | 'dynamic_metric_mapped';
|
|
286
|
+
|
|
278
287
|
/**
|
|
279
288
|
* Whether the attribute can be used in `filters` rules.
|
|
280
289
|
*/
|
|
@@ -405,12 +414,24 @@ export interface ReportMetric {
|
|
|
405
414
|
*/
|
|
406
415
|
id: string;
|
|
407
416
|
|
|
408
|
-
allowedAggregations: Array<
|
|
417
|
+
allowedAggregations: Array<
|
|
418
|
+
'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value'
|
|
419
|
+
>;
|
|
409
420
|
|
|
410
421
|
description: string;
|
|
411
422
|
|
|
412
423
|
name: string;
|
|
413
424
|
|
|
425
|
+
/**
|
|
426
|
+
* Attribute IDs this specific metric accepts in filter expressions.
|
|
427
|
+
*/
|
|
428
|
+
supportedFilterAttributeIds: Array<string>;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Attribute IDs this specific metric accepts as `groupBy` or `segmentBy`.
|
|
432
|
+
*/
|
|
433
|
+
supportedGroupByDimensions: Array<string>;
|
|
434
|
+
|
|
414
435
|
/**
|
|
415
436
|
* Which `view` values `POST /v2/reports/query` accepts for this metric. Most
|
|
416
437
|
* metrics support `standard` and `hourly_heatmap`; conversation-flow metrics are
|
|
@@ -555,6 +576,8 @@ export interface ReportQueryResponse {
|
|
|
555
576
|
|
|
556
577
|
segmentData?: Array<ReportSegmentDatum>;
|
|
557
578
|
|
|
579
|
+
table?: ReportQueryResponse.Table;
|
|
580
|
+
|
|
558
581
|
timeSeries?: Array<ReportTimeSeriesDatum>;
|
|
559
582
|
}
|
|
560
583
|
|
|
@@ -565,7 +588,7 @@ export namespace ReportQueryResponse {
|
|
|
565
588
|
* aggregations — see the `allowedAggregations` field in the
|
|
566
589
|
* `GET /v2/reports/datasets` catalog.
|
|
567
590
|
*/
|
|
568
|
-
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'percentile' | 'value';
|
|
591
|
+
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value';
|
|
569
592
|
|
|
570
593
|
datasetId: string;
|
|
571
594
|
|
|
@@ -603,6 +626,98 @@ export namespace ReportQueryResponse {
|
|
|
603
626
|
|
|
604
627
|
sortOrder?: number;
|
|
605
628
|
}
|
|
629
|
+
|
|
630
|
+
export interface Table {
|
|
631
|
+
columns: Array<Table.Column>;
|
|
632
|
+
|
|
633
|
+
key: string;
|
|
634
|
+
|
|
635
|
+
mode: 'aggregate' | 'records';
|
|
636
|
+
|
|
637
|
+
page: number;
|
|
638
|
+
|
|
639
|
+
pageSize: number;
|
|
640
|
+
|
|
641
|
+
rows: Array<Table.Row>;
|
|
642
|
+
|
|
643
|
+
totalRows: number;
|
|
644
|
+
|
|
645
|
+
sort?: Table.Sort;
|
|
646
|
+
|
|
647
|
+
summaryRows?: Array<Table.SummaryRow>;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export namespace Table {
|
|
651
|
+
export interface Column {
|
|
652
|
+
id: string;
|
|
653
|
+
|
|
654
|
+
kind: 'dimension' | 'metric' | 'record_attribute';
|
|
655
|
+
|
|
656
|
+
label: string;
|
|
657
|
+
|
|
658
|
+
sortable: boolean;
|
|
659
|
+
|
|
660
|
+
unit: 'count' | 'percentage' | 'duration_ms' | 'number' | 'text' | 'datetime';
|
|
661
|
+
|
|
662
|
+
align?: 'left' | 'right';
|
|
663
|
+
|
|
664
|
+
sticky?: boolean;
|
|
665
|
+
|
|
666
|
+
summary?: 'sum' | 'weighted_rate' | 'none';
|
|
667
|
+
|
|
668
|
+
valueType?: string;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export interface Row {
|
|
672
|
+
id: string;
|
|
673
|
+
|
|
674
|
+
cells: { [key: string]: Row.Cells };
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export namespace Row {
|
|
678
|
+
export interface Cells {
|
|
679
|
+
display: string;
|
|
680
|
+
|
|
681
|
+
denominator?: number;
|
|
682
|
+
|
|
683
|
+
numerator?: number;
|
|
684
|
+
|
|
685
|
+
raw?: unknown;
|
|
686
|
+
|
|
687
|
+
sortValue?: string | number | null;
|
|
688
|
+
|
|
689
|
+
value?: unknown;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export interface Sort {
|
|
694
|
+
columnId: string;
|
|
695
|
+
|
|
696
|
+
direction: 'asc' | 'desc';
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export interface SummaryRow {
|
|
700
|
+
id: string;
|
|
701
|
+
|
|
702
|
+
cells: { [key: string]: SummaryRow.Cells };
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export namespace SummaryRow {
|
|
706
|
+
export interface Cells {
|
|
707
|
+
display: string;
|
|
708
|
+
|
|
709
|
+
denominator?: number;
|
|
710
|
+
|
|
711
|
+
numerator?: number;
|
|
712
|
+
|
|
713
|
+
raw?: unknown;
|
|
714
|
+
|
|
715
|
+
sortValue?: string | number | null;
|
|
716
|
+
|
|
717
|
+
value?: unknown;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
606
721
|
}
|
|
607
722
|
|
|
608
723
|
export interface ReportListDatasetsParams {
|
|
@@ -619,10 +734,11 @@ export interface ReportQueryParams {
|
|
|
619
734
|
* subset of aggregations — see the `allowedAggregations` field in the
|
|
620
735
|
* `GET /v2/reports/datasets` catalog.
|
|
621
736
|
*/
|
|
622
|
-
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'percentile' | 'value';
|
|
737
|
+
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value';
|
|
623
738
|
|
|
624
739
|
/**
|
|
625
740
|
* Body param: End of the reporting window (ISO 8601 date or datetime, inclusive).
|
|
741
|
+
* Windows ending before 2026-07-12 are rejected.
|
|
626
742
|
*/
|
|
627
743
|
endDate: string;
|
|
628
744
|
|
|
@@ -639,7 +755,8 @@ export interface ReportQueryParams {
|
|
|
639
755
|
|
|
640
756
|
/**
|
|
641
757
|
* Body param: Start of the reporting window (ISO 8601 date or datetime,
|
|
642
|
-
* inclusive).
|
|
758
|
+
* inclusive). Reporting data is available from 2026-07-12; crossing windows are
|
|
759
|
+
* clamped to that boundary.
|
|
643
760
|
*/
|
|
644
761
|
startDate: string;
|
|
645
762
|
|
|
@@ -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.2'; // 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.2";
|
|
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.2";
|
|
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.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|