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.
Files changed (49) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +1 -1
  3. package/resources/audit-logs.d.mts +2 -2
  4. package/resources/audit-logs.d.mts.map +1 -1
  5. package/resources/audit-logs.d.ts +2 -2
  6. package/resources/audit-logs.d.ts.map +1 -1
  7. package/resources/help-center/articles.d.mts +248 -11
  8. package/resources/help-center/articles.d.mts.map +1 -1
  9. package/resources/help-center/articles.d.ts +248 -11
  10. package/resources/help-center/articles.d.ts.map +1 -1
  11. package/resources/help-center/articles.js +78 -0
  12. package/resources/help-center/articles.js.map +1 -1
  13. package/resources/help-center/articles.mjs +78 -0
  14. package/resources/help-center/articles.mjs.map +1 -1
  15. package/resources/help-center/help-center.d.mts +2 -2
  16. package/resources/help-center/help-center.d.mts.map +1 -1
  17. package/resources/help-center/help-center.d.ts +2 -2
  18. package/resources/help-center/help-center.d.ts.map +1 -1
  19. package/resources/help-center/help-center.js.map +1 -1
  20. package/resources/help-center/help-center.mjs.map +1 -1
  21. package/resources/help-center/index.d.mts +1 -1
  22. package/resources/help-center/index.d.mts.map +1 -1
  23. package/resources/help-center/index.d.ts +1 -1
  24. package/resources/help-center/index.d.ts.map +1 -1
  25. package/resources/help-center/index.js.map +1 -1
  26. package/resources/help-center/index.mjs.map +1 -1
  27. package/resources/reports.d.mts +89 -10
  28. package/resources/reports.d.mts.map +1 -1
  29. package/resources/reports.d.ts +89 -10
  30. package/resources/reports.d.ts.map +1 -1
  31. package/resources/reports.js +9 -6
  32. package/resources/reports.js.map +1 -1
  33. package/resources/reports.mjs +9 -6
  34. package/resources/reports.mjs.map +1 -1
  35. package/resources/users/contacts/contacts.d.mts +2 -2
  36. package/resources/users/contacts/contacts.d.ts +2 -2
  37. package/resources/users/contacts/contacts.js +1 -1
  38. package/resources/users/contacts/contacts.mjs +1 -1
  39. package/src/resources/audit-logs.ts +2 -0
  40. package/src/resources/help-center/articles.ts +380 -10
  41. package/src/resources/help-center/help-center.ts +8 -0
  42. package/src/resources/help-center/index.ts +4 -0
  43. package/src/resources/reports.ts +127 -10
  44. package/src/resources/users/contacts/contacts.ts +2 -2
  45. package/src/version.ts +1 -1
  46. package/version.d.mts +1 -1
  47. package/version.d.ts +1 -1
  48. package/version.js +1 -1
  49. package/version.mjs +1 -1
@@ -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 `percentile: 95` for
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-06-01",
88
- * "endDate": "2026-06-30",
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-06-30',
127
+ * endDate: '2026-07-15',
125
128
  * granularity: 'day',
126
129
  * metric: 'new_conversations',
127
- * startDate: '2026-06-01',
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<'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'percentile' | 'value'>;
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 IDs to assign |
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 IDs to assign to the contact
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'; // x-release-please-version
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";
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";
1
+ export declare const VERSION = "0.14.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.14.1'; // x-release-please-version
4
+ exports.VERSION = '0.14.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.14.1'; // x-release-please-version
1
+ export const VERSION = '0.14.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map