featurebase-node 0.14.2 → 0.15.0
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 +16 -0
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/audit-logs.d.mts +3 -3
- package/resources/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs.d.ts +3 -3
- package/resources/audit-logs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.d.mts +116 -116
- package/resources/changelogs/changelogs.d.mts.map +1 -1
- package/resources/changelogs/changelogs.d.ts +116 -116
- package/resources/changelogs/changelogs.d.ts.map +1 -1
- package/resources/changelogs/changelogs.js +74 -74
- package/resources/changelogs/changelogs.js.map +1 -1
- package/resources/changelogs/changelogs.mjs +74 -74
- package/resources/changelogs/changelogs.mjs.map +1 -1
- package/resources/changelogs/index.d.mts +1 -1
- package/resources/changelogs/index.d.mts.map +1 -1
- package/resources/changelogs/index.d.ts +1 -1
- package/resources/changelogs/index.d.ts.map +1 -1
- package/resources/changelogs/subscribers.d.mts +3 -3
- package/resources/changelogs/subscribers.d.mts.map +1 -1
- package/resources/changelogs/subscribers.d.ts +3 -3
- package/resources/changelogs/subscribers.d.ts.map +1 -1
- package/resources/conversation-attributes.d.mts +17 -17
- package/resources/conversation-attributes.d.mts.map +1 -1
- package/resources/conversation-attributes.d.ts +17 -17
- package/resources/conversation-attributes.d.ts.map +1 -1
- package/resources/conversation-attributes.js +19 -19
- package/resources/conversation-attributes.js.map +1 -1
- package/resources/conversation-attributes.mjs +19 -19
- package/resources/conversation-attributes.mjs.map +1 -1
- package/resources/feedback/boards.d.mts +19 -19
- package/resources/feedback/boards.d.mts.map +1 -1
- package/resources/feedback/boards.d.ts +19 -19
- package/resources/feedback/boards.d.ts.map +1 -1
- package/resources/feedback/boards.js +20 -20
- package/resources/feedback/boards.js.map +1 -1
- package/resources/feedback/boards.mjs +20 -20
- package/resources/feedback/boards.mjs.map +1 -1
- package/resources/feedback/comments.d.mts +113 -113
- package/resources/feedback/comments.d.mts.map +1 -1
- package/resources/feedback/comments.d.ts +113 -113
- package/resources/feedback/comments.d.ts.map +1 -1
- package/resources/feedback/comments.js +93 -93
- package/resources/feedback/comments.js.map +1 -1
- package/resources/feedback/comments.mjs +93 -93
- package/resources/feedback/comments.mjs.map +1 -1
- package/resources/feedback/custom-fields.d.mts +36 -36
- package/resources/feedback/custom-fields.d.mts.map +1 -1
- package/resources/feedback/custom-fields.d.ts +36 -36
- package/resources/feedback/custom-fields.d.ts.map +1 -1
- package/resources/feedback/custom-fields.js +36 -36
- package/resources/feedback/custom-fields.js.map +1 -1
- package/resources/feedback/custom-fields.mjs +36 -36
- package/resources/feedback/custom-fields.mjs.map +1 -1
- package/resources/feedback/feedback.d.mts +6 -6
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +6 -6
- 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 +5 -5
- package/resources/feedback/index.d.mts.map +1 -1
- package/resources/feedback/index.d.ts +5 -5
- 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/post-statuses.d.mts +20 -20
- package/resources/feedback/post-statuses.d.mts.map +1 -1
- package/resources/feedback/post-statuses.d.ts +20 -20
- package/resources/feedback/post-statuses.d.ts.map +1 -1
- package/resources/feedback/post-statuses.js +23 -23
- package/resources/feedback/post-statuses.js.map +1 -1
- package/resources/feedback/post-statuses.mjs +23 -23
- package/resources/feedback/post-statuses.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 +169 -102
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +169 -102
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +144 -75
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +144 -75
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/feedback/posts/voters.d.mts +3 -3
- package/resources/feedback/posts/voters.d.mts.map +1 -1
- package/resources/feedback/posts/voters.d.ts +3 -3
- package/resources/feedback/posts/voters.d.ts.map +1 -1
- package/resources/help-center/articles.d.mts +213 -97
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +213 -97
- package/resources/help-center/articles.d.ts.map +1 -1
- package/resources/help-center/articles.js +73 -73
- package/resources/help-center/articles.js.map +1 -1
- package/resources/help-center/articles.mjs +73 -73
- package/resources/help-center/articles.mjs.map +1 -1
- package/resources/help-center/collections.d.mts +158 -71
- package/resources/help-center/collections.d.mts.map +1 -1
- package/resources/help-center/collections.d.ts +158 -71
- package/resources/help-center/collections.d.ts.map +1 -1
- package/resources/help-center/collections.js +65 -65
- package/resources/help-center/collections.js.map +1 -1
- package/resources/help-center/collections.mjs +65 -65
- package/resources/help-center/collections.mjs.map +1 -1
- package/resources/help-center/help-center.d.mts +4 -4
- package/resources/help-center/help-center.d.mts.map +1 -1
- package/resources/help-center/help-center.d.ts +4 -4
- package/resources/help-center/help-center.d.ts.map +1 -1
- package/resources/help-center/help-centers.d.mts +77 -48
- package/resources/help-center/help-centers.d.mts.map +1 -1
- package/resources/help-center/help-centers.d.ts +77 -48
- package/resources/help-center/help-centers.d.ts.map +1 -1
- package/resources/help-center/help-centers.js +43 -43
- package/resources/help-center/help-centers.js.map +1 -1
- package/resources/help-center/help-centers.mjs +43 -43
- package/resources/help-center/help-centers.mjs.map +1 -1
- package/resources/help-center/index.d.mts +4 -4
- package/resources/help-center/index.d.mts.map +1 -1
- package/resources/help-center/index.d.ts +4 -4
- package/resources/help-center/index.d.ts.map +1 -1
- package/resources/help-center/redirect-rules.d.mts +124 -124
- package/resources/help-center/redirect-rules.d.mts.map +1 -1
- package/resources/help-center/redirect-rules.d.ts +124 -124
- package/resources/help-center/redirect-rules.d.ts.map +1 -1
- package/resources/help-center/redirect-rules.js +112 -112
- package/resources/help-center/redirect-rules.js.map +1 -1
- package/resources/help-center/redirect-rules.mjs +112 -112
- package/resources/help-center/redirect-rules.mjs.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/organization/admins.d.mts +26 -26
- package/resources/organization/admins.d.mts.map +1 -1
- package/resources/organization/admins.d.ts +26 -26
- package/resources/organization/admins.d.ts.map +1 -1
- package/resources/organization/admins.js +25 -25
- package/resources/organization/admins.js.map +1 -1
- package/resources/organization/admins.mjs +25 -25
- package/resources/organization/admins.mjs.map +1 -1
- package/resources/organization/brands.d.mts +52 -52
- package/resources/organization/brands.d.mts.map +1 -1
- package/resources/organization/brands.d.ts +52 -52
- package/resources/organization/brands.d.ts.map +1 -1
- package/resources/organization/brands.js +54 -54
- package/resources/organization/brands.js.map +1 -1
- package/resources/organization/brands.mjs +54 -54
- package/resources/organization/brands.mjs.map +1 -1
- package/resources/organization/index.d.mts +3 -3
- package/resources/organization/index.d.mts.map +1 -1
- package/resources/organization/index.d.ts +3 -3
- package/resources/organization/index.d.ts.map +1 -1
- package/resources/organization/organization.d.mts +3 -3
- package/resources/organization/organization.d.mts.map +1 -1
- package/resources/organization/organization.d.ts +3 -3
- package/resources/organization/organization.d.ts.map +1 -1
- package/resources/organization/teams.d.mts +47 -47
- package/resources/organization/teams.d.mts.map +1 -1
- package/resources/organization/teams.d.ts +47 -47
- package/resources/organization/teams.d.ts.map +1 -1
- package/resources/organization/teams.js +44 -44
- package/resources/organization/teams.js.map +1 -1
- package/resources/organization/teams.mjs +44 -44
- package/resources/organization/teams.mjs.map +1 -1
- package/resources/reports.d.mts +347 -180
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +347 -180
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +124 -99
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +124 -99
- package/resources/reports.mjs.map +1 -1
- package/resources/support/conversation-tags.d.mts +43 -43
- package/resources/support/conversation-tags.d.mts.map +1 -1
- package/resources/support/conversation-tags.d.ts +43 -43
- package/resources/support/conversation-tags.d.ts.map +1 -1
- package/resources/support/conversation-tags.js +32 -32
- package/resources/support/conversation-tags.js.map +1 -1
- package/resources/support/conversation-tags.mjs +32 -32
- package/resources/support/conversation-tags.mjs.map +1 -1
- package/resources/support/conversations/conversations.d.mts +402 -351
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +402 -351
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +340 -295
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +340 -295
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/support/conversations/index.d.mts +1 -1
- package/resources/support/conversations/index.d.mts.map +1 -1
- package/resources/support/conversations/index.d.ts +1 -1
- package/resources/support/conversations/index.d.ts.map +1 -1
- package/resources/support/conversations/participants.d.mts +2 -2
- package/resources/support/conversations/participants.d.mts.map +1 -1
- package/resources/support/conversations/participants.d.ts +2 -2
- package/resources/support/conversations/participants.d.ts.map +1 -1
- package/resources/support/index.d.mts +3 -3
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts +3 -3
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/support.d.mts +3 -3
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts +3 -3
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/tickets/categories.d.mts +20 -20
- package/resources/support/tickets/categories.d.mts.map +1 -1
- package/resources/support/tickets/categories.d.ts +20 -20
- package/resources/support/tickets/categories.d.ts.map +1 -1
- package/resources/support/tickets/categories.js +25 -25
- package/resources/support/tickets/categories.js.map +1 -1
- package/resources/support/tickets/categories.mjs +25 -25
- package/resources/support/tickets/categories.mjs.map +1 -1
- package/resources/support/tickets/custom-fields.d.mts +22 -22
- package/resources/support/tickets/custom-fields.d.mts.map +1 -1
- package/resources/support/tickets/custom-fields.d.ts +22 -22
- package/resources/support/tickets/custom-fields.d.ts.map +1 -1
- package/resources/support/tickets/custom-fields.js +19 -19
- package/resources/support/tickets/custom-fields.js.map +1 -1
- package/resources/support/tickets/custom-fields.mjs +19 -19
- package/resources/support/tickets/custom-fields.mjs.map +1 -1
- package/resources/support/tickets/index.d.mts +4 -4
- package/resources/support/tickets/index.d.mts.map +1 -1
- package/resources/support/tickets/index.d.ts +4 -4
- package/resources/support/tickets/index.d.ts.map +1 -1
- package/resources/support/tickets/statuses.d.mts +19 -19
- package/resources/support/tickets/statuses.d.mts.map +1 -1
- package/resources/support/tickets/statuses.d.ts +19 -19
- package/resources/support/tickets/statuses.d.ts.map +1 -1
- package/resources/support/tickets/statuses.js +21 -21
- package/resources/support/tickets/statuses.js.map +1 -1
- package/resources/support/tickets/statuses.mjs +21 -21
- package/resources/support/tickets/statuses.mjs.map +1 -1
- package/resources/support/tickets/tickets.d.mts +75 -75
- package/resources/support/tickets/tickets.d.mts.map +1 -1
- package/resources/support/tickets/tickets.d.ts +75 -75
- package/resources/support/tickets/tickets.d.ts.map +1 -1
- package/resources/support/tickets/tickets.js +44 -44
- package/resources/support/tickets/tickets.js.map +1 -1
- package/resources/support/tickets/tickets.mjs +44 -44
- package/resources/support/tickets/tickets.mjs.map +1 -1
- package/resources/surveys.d.mts +43 -43
- package/resources/surveys.d.mts.map +1 -1
- package/resources/surveys.d.ts +43 -43
- package/resources/surveys.d.ts.map +1 -1
- package/resources/surveys.js +44 -44
- package/resources/surveys.js.map +1 -1
- package/resources/surveys.mjs +44 -44
- package/resources/surveys.mjs.map +1 -1
- package/resources/users/companies/companies.d.mts +121 -130
- package/resources/users/companies/companies.d.mts.map +1 -1
- package/resources/users/companies/companies.d.ts +121 -130
- package/resources/users/companies/companies.d.ts.map +1 -1
- package/resources/users/companies/companies.js +125 -125
- package/resources/users/companies/companies.js.map +1 -1
- package/resources/users/companies/companies.mjs +125 -125
- package/resources/users/companies/companies.mjs.map +1 -1
- package/resources/users/companies/contacts.d.mts +3 -3
- package/resources/users/companies/contacts.d.mts.map +1 -1
- package/resources/users/companies/contacts.d.ts +3 -3
- package/resources/users/companies/contacts.d.ts.map +1 -1
- package/resources/users/companies/index.d.mts +1 -1
- package/resources/users/companies/index.d.mts.map +1 -1
- package/resources/users/companies/index.d.ts +1 -1
- package/resources/users/companies/index.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id/by-user-id.d.mts +2 -2
- package/resources/users/contacts/by-user-id/by-user-id.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id/by-user-id.d.ts +2 -2
- package/resources/users/contacts/by-user-id/by-user-id.d.ts.map +1 -1
- package/resources/users/contacts/by-user-id/email-preferences.d.mts +2 -2
- package/resources/users/contacts/by-user-id/email-preferences.d.mts.map +1 -1
- package/resources/users/contacts/by-user-id/email-preferences.d.ts +2 -2
- package/resources/users/contacts/by-user-id/email-preferences.d.ts.map +1 -1
- package/resources/users/contacts/contacts.d.mts +249 -235
- package/resources/users/contacts/contacts.d.mts.map +1 -1
- package/resources/users/contacts/contacts.d.ts +249 -235
- package/resources/users/contacts/contacts.d.ts.map +1 -1
- package/resources/users/contacts/contacts.js +211 -184
- package/resources/users/contacts/contacts.js.map +1 -1
- package/resources/users/contacts/contacts.mjs +211 -184
- package/resources/users/contacts/contacts.mjs.map +1 -1
- package/resources/users/contacts/email-preferences.d.mts +2 -2
- package/resources/users/contacts/email-preferences.d.mts.map +1 -1
- package/resources/users/contacts/email-preferences.d.ts +2 -2
- package/resources/users/contacts/email-preferences.d.ts.map +1 -1
- package/resources/users/contacts/index.d.mts +1 -1
- package/resources/users/contacts/index.d.mts.map +1 -1
- package/resources/users/contacts/index.d.ts +1 -1
- package/resources/users/contacts/index.d.ts.map +1 -1
- package/resources/users/index.d.mts +2 -2
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts +2 -2
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/users.d.mts +2 -2
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +2 -2
- package/resources/users/users.d.ts.map +1 -1
- package/resources/webhooks.d.mts +83 -83
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +83 -83
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +77 -77
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +77 -77
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +6 -6
- package/src/resources/audit-logs.ts +7 -1
- package/src/resources/changelogs/changelogs.ts +320 -175
- package/src/resources/changelogs/index.ts +1 -1
- package/src/resources/changelogs/subscribers.ts +31 -2
- package/src/resources/conversation-attributes.ts +34 -34
- package/src/resources/feedback/boards.ts +30 -30
- package/src/resources/feedback/comments.ts +137 -137
- package/src/resources/feedback/custom-fields.ts +46 -46
- package/src/resources/feedback/feedback.ts +9 -5
- package/src/resources/feedback/index.ts +7 -5
- package/src/resources/feedback/post-statuses.ts +33 -33
- package/src/resources/feedback/posts/index.ts +3 -1
- package/src/resources/feedback/posts/posts.ts +232 -128
- package/src/resources/feedback/posts/voters.ts +3 -3
- package/src/resources/help-center/articles.ts +631 -109
- package/src/resources/help-center/collections.ts +349 -88
- package/src/resources/help-center/help-center.ts +5 -5
- package/src/resources/help-center/help-centers.ts +202 -57
- package/src/resources/help-center/index.ts +5 -5
- package/src/resources/help-center/redirect-rules.ts +294 -178
- package/src/resources/index.ts +6 -6
- package/src/resources/organization/admins.ts +36 -36
- package/src/resources/organization/brands.ts +68 -68
- package/src/resources/organization/index.ts +3 -3
- package/src/resources/organization/organization.ts +3 -3
- package/src/resources/organization/teams.ts +54 -54
- package/src/resources/reports.ts +454 -232
- package/src/resources/support/conversation-tags.ts +62 -62
- package/src/resources/support/conversations/conversations.ts +489 -438
- package/src/resources/support/conversations/index.ts +4 -4
- package/src/resources/support/conversations/participants.ts +2 -2
- package/src/resources/support/index.ts +7 -7
- package/src/resources/support/support.ts +7 -7
- package/src/resources/support/tickets/categories.ts +35 -35
- package/src/resources/support/tickets/custom-fields.ts +29 -29
- package/src/resources/support/tickets/index.ts +4 -4
- package/src/resources/support/tickets/statuses.ts +31 -31
- package/src/resources/support/tickets/tickets.ts +101 -101
- package/src/resources/surveys.ts +60 -60
- package/src/resources/users/companies/companies.ts +158 -172
- package/src/resources/users/companies/contacts.ts +3 -3
- package/src/resources/users/companies/index.ts +2 -2
- package/src/resources/users/contacts/by-user-id/by-user-id.ts +2 -2
- package/src/resources/users/contacts/by-user-id/email-preferences.ts +2 -2
- package/src/resources/users/contacts/contacts.ts +284 -280
- package/src/resources/users/contacts/email-preferences.ts +2 -2
- package/src/resources/users/contacts/index.ts +3 -3
- package/src/resources/users/index.ts +5 -5
- package/src/resources/users/users.ts +5 -5
- package/src/resources/webhooks.ts +106 -100
- 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
|
@@ -10,6 +10,58 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
10
10
|
* Query your workspace analytics: conversation volume, response times, CSAT, SLA compliance, teammate performance, AI agent resolutions and more. Start with the datasets catalog to discover metrics and attributes, then run queries with filters, grouping and period comparison.
|
|
11
11
|
*/
|
|
12
12
|
export class Reports extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the paginated row-level records behind a metric — either the whole
|
|
15
|
+
* reporting window, or one specific data point from a previous
|
|
16
|
+
* `POST /v2/reports/query` response.
|
|
17
|
+
*
|
|
18
|
+
* Send the **same** `metric`, date range, `granularity`, `filters`, `groupBy` /
|
|
19
|
+
* `segmentBy` and `view` as the query you're drilling into, plus
|
|
20
|
+
* `dataPointFilters` selecting the data point:
|
|
21
|
+
*
|
|
22
|
+
* - `timeBucket` — a `date` from the time series
|
|
23
|
+
* - `groupValue` / `segmentValue` — a `group` / `segment` value from grouped data
|
|
24
|
+
* - `dayOfWeek` + `hourOfDay` — a heatmap cell (`hourly_heatmap` view)
|
|
25
|
+
* - `flowPathId` or `sourceNodeId` + `targetNodeId` — a flow edge (`sankey` view)
|
|
26
|
+
*
|
|
27
|
+
* Pass `dataPointFilters: {}` to list all rows behind the metric for the window.
|
|
28
|
+
*
|
|
29
|
+
* Results are paginated with `page` / `pageSize` (max 200 per page);
|
|
30
|
+
* `availableColumns` describes every column the dataset can return and
|
|
31
|
+
* `defaultColumnIds` the recommended subset. Rows are keyed by column ID; identity
|
|
32
|
+
* cells (teammates, contacts) are objects with `id` + `label`.
|
|
33
|
+
*
|
|
34
|
+
* ### Version Availability
|
|
35
|
+
*
|
|
36
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
37
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const response = await client.reports.drillIn({
|
|
42
|
+
* endDate: '2026-07-15',
|
|
43
|
+
* granularity: 'day',
|
|
44
|
+
* metric: 'new_conversations',
|
|
45
|
+
* startDate: '2026-07-14',
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
drillIn(params: ReportDrillInParams, options?: RequestOptions): APIPromise<ReportDrillInResponse> {
|
|
50
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
51
|
+
return this._client.post('/v2/reports/drill-in', {
|
|
52
|
+
body,
|
|
53
|
+
...options,
|
|
54
|
+
headers: buildHeaders([
|
|
55
|
+
{
|
|
56
|
+
...(featurebaseVersion?.toString() != null ?
|
|
57
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
58
|
+
: undefined),
|
|
59
|
+
},
|
|
60
|
+
options?.headers,
|
|
61
|
+
]),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
13
65
|
/**
|
|
14
66
|
* Returns the reporting catalog: every dataset available to your workspace with
|
|
15
67
|
* its metrics and attributes.
|
|
@@ -57,6 +109,55 @@ export class Reports extends APIResource {
|
|
|
57
109
|
});
|
|
58
110
|
}
|
|
59
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Returns the available values for a filterable attribute — use it to build valid
|
|
114
|
+
* `filters` rules for `POST /v2/reports/query`.
|
|
115
|
+
*
|
|
116
|
+
* Works for attributes whose values live in your workspace data (tags, teammates,
|
|
117
|
+
* teams, companies, plans, countries, ...). Attributes with `staticOptions` in the
|
|
118
|
+
* catalog don't need this endpoint — their value set is already inline.
|
|
119
|
+
*
|
|
120
|
+
* - `query` narrows results by search string
|
|
121
|
+
* - `selectedValues` resolves labels for values you already hold (returned
|
|
122
|
+
* alongside search results)
|
|
123
|
+
*
|
|
124
|
+
* ### Example
|
|
125
|
+
*
|
|
126
|
+
* ```json
|
|
127
|
+
* { "fieldId": "conversation.tags", "query": "bill", "limit": 20 }
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* ### Version Availability
|
|
131
|
+
*
|
|
132
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
133
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```ts
|
|
137
|
+
* const response = await client.reports.lookupFilterValues({
|
|
138
|
+
* fieldId: 'conversation.tags',
|
|
139
|
+
* });
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
lookupFilterValues(
|
|
143
|
+
params: ReportLookupFilterValuesParams,
|
|
144
|
+
options?: RequestOptions,
|
|
145
|
+
): APIPromise<ReportLookupFilterValuesResponse> {
|
|
146
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
147
|
+
return this._client.post('/v2/reports/filter-values', {
|
|
148
|
+
body,
|
|
149
|
+
...options,
|
|
150
|
+
headers: buildHeaders([
|
|
151
|
+
{
|
|
152
|
+
...(featurebaseVersion?.toString() != null ?
|
|
153
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
154
|
+
: undefined),
|
|
155
|
+
},
|
|
156
|
+
options?.headers,
|
|
157
|
+
]),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
60
161
|
/**
|
|
61
162
|
* Executes an ad-hoc reporting query: one metric + aggregation over a date range,
|
|
62
163
|
* with optional filters, grouping, segmentation and period-over-period comparison.
|
|
@@ -69,7 +170,7 @@ export class Reports extends APIResource {
|
|
|
69
170
|
* `percentile: 95` for p95); rate metrics use `value`.
|
|
70
171
|
* 2. Set the reporting window with `startDate` / `endDate` (ISO 8601) and a
|
|
71
172
|
* `granularity` (`hour`, `day`, `week`, `month`) for the returned time series.
|
|
72
|
-
* Reporting data is available from **July
|
|
173
|
+
* Reporting data is available from **July 14, 2026**. Windows ending earlier
|
|
73
174
|
* are rejected; crossing windows are clamped to that boundary in the requested
|
|
74
175
|
* timezone.
|
|
75
176
|
* 3. Optionally narrow with `filters` — a rule
|
|
@@ -81,13 +182,38 @@ export class Reports extends APIResource {
|
|
|
81
182
|
* 5. Optionally pass `compareStartDate` / `compareEndDate` to get `previousValue`
|
|
82
183
|
* / `deltaPercent` alongside every data point.
|
|
83
184
|
*
|
|
185
|
+
* ### Top-N and Show Other
|
|
186
|
+
*
|
|
187
|
+
* For high-cardinality breakdowns, cap the number of returned series:
|
|
188
|
+
*
|
|
189
|
+
* - `topValuesLimit` keeps only the top **N** `groupBy` values;
|
|
190
|
+
* `segmentTopValuesLimit` does the same for `segmentBy`. Allowed values: **5, 7,
|
|
191
|
+
* 10, 15, 20**. `topValuesLimit` requires `groupBy`; `segmentTopValuesLimit`
|
|
192
|
+
* requires `segmentBy`.
|
|
193
|
+
* - Members are ranked by the selected metric/aggregation over the **full filtered
|
|
194
|
+
* primary range**, so the ranked set is **stable across every time bucket** (a
|
|
195
|
+
* value that spikes in one bucket but is small overall does not enter the set).
|
|
196
|
+
* A comparison period reuses the **primary period's** ranked set — it is never
|
|
197
|
+
* re-ranked, so the legend stays identical period-over-period.
|
|
198
|
+
* - `showOther` / `segmentShowOther` append a single synthetic bucket with id
|
|
199
|
+
* `__other__` and label `Other` that sums every value outside the top set.
|
|
200
|
+
* Because the values are summed, Show Other is only supported for **additive
|
|
201
|
+
* aggregations** (`count`, `sum`, `value`); it is rejected for `avg`, `median`,
|
|
202
|
+
* `min`, `max`, `range`, `percentile`, and for percentage metrics (whose ratios
|
|
203
|
+
* cannot be summed). `showOther` also requires `topValuesLimit` (and
|
|
204
|
+
* `segmentShowOther` requires `segmentTopValuesLimit`). Plain `topValuesLimit`
|
|
205
|
+
* (without Show Other) works with any aggregation.
|
|
206
|
+
* - The `__other__` group/segment aggregates rows outside the selected top groups
|
|
207
|
+
* and **cannot be drilled into** (`POST /v2/reports/drill-in` rejects
|
|
208
|
+
* `dataPointFilters.groupValue` / `segmentValue` equal to `__other__`).
|
|
209
|
+
*
|
|
84
210
|
* ### Example
|
|
85
211
|
*
|
|
86
212
|
* ```json
|
|
87
213
|
* {
|
|
88
214
|
* "metric": "new_conversations",
|
|
89
215
|
* "aggregation": "count",
|
|
90
|
-
* "startDate": "2026-07-
|
|
216
|
+
* "startDate": "2026-07-14",
|
|
91
217
|
* "endDate": "2026-07-15",
|
|
92
218
|
* "granularity": "day",
|
|
93
219
|
* "groupBy": "conversation.channel",
|
|
@@ -127,7 +253,7 @@ export class Reports extends APIResource {
|
|
|
127
253
|
* endDate: '2026-07-15',
|
|
128
254
|
* granularity: 'day',
|
|
129
255
|
* metric: 'new_conversations',
|
|
130
|
-
* startDate: '2026-07-
|
|
256
|
+
* startDate: '2026-07-14',
|
|
131
257
|
* });
|
|
132
258
|
* ```
|
|
133
259
|
*/
|
|
@@ -146,107 +272,6 @@ export class Reports extends APIResource {
|
|
|
146
272
|
]),
|
|
147
273
|
});
|
|
148
274
|
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Returns the available values for a filterable attribute — use it to build valid
|
|
152
|
-
* `filters` rules for `POST /v2/reports/query`.
|
|
153
|
-
*
|
|
154
|
-
* Works for attributes whose values live in your workspace data (tags, teammates,
|
|
155
|
-
* teams, companies, plans, countries, ...). Attributes with `staticOptions` in the
|
|
156
|
-
* catalog don't need this endpoint — their value set is already inline.
|
|
157
|
-
*
|
|
158
|
-
* - `query` narrows results by search string
|
|
159
|
-
* - `selectedValues` resolves labels for values you already hold (returned
|
|
160
|
-
* alongside search results)
|
|
161
|
-
*
|
|
162
|
-
* ### Example
|
|
163
|
-
*
|
|
164
|
-
* ```json
|
|
165
|
-
* { "fieldId": "conversation.tags", "query": "bill", "limit": 20 }
|
|
166
|
-
* ```
|
|
167
|
-
*
|
|
168
|
-
* ### Version Availability
|
|
169
|
-
*
|
|
170
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
171
|
-
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* ```ts
|
|
175
|
-
* const response = await client.reports.lookupFilterValues({
|
|
176
|
-
* fieldId: 'conversation.tags',
|
|
177
|
-
* });
|
|
178
|
-
* ```
|
|
179
|
-
*/
|
|
180
|
-
lookupFilterValues(
|
|
181
|
-
params: ReportLookupFilterValuesParams,
|
|
182
|
-
options?: RequestOptions,
|
|
183
|
-
): APIPromise<ReportLookupFilterValuesResponse> {
|
|
184
|
-
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
185
|
-
return this._client.post('/v2/reports/filter-values', {
|
|
186
|
-
body,
|
|
187
|
-
...options,
|
|
188
|
-
headers: buildHeaders([
|
|
189
|
-
{
|
|
190
|
-
...(featurebaseVersion?.toString() != null ?
|
|
191
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
192
|
-
: undefined),
|
|
193
|
-
},
|
|
194
|
-
options?.headers,
|
|
195
|
-
]),
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Returns the paginated row-level records behind a metric — either the whole
|
|
201
|
-
* reporting window, or one specific data point from a previous
|
|
202
|
-
* `POST /v2/reports/query` response.
|
|
203
|
-
*
|
|
204
|
-
* Send the **same** `metric`, date range, `granularity`, `filters`, `groupBy` /
|
|
205
|
-
* `segmentBy` and `view` as the query you're drilling into, plus
|
|
206
|
-
* `dataPointFilters` selecting the data point:
|
|
207
|
-
*
|
|
208
|
-
* - `timeBucket` — a `date` from the time series
|
|
209
|
-
* - `groupValue` / `segmentValue` — a `group` / `segment` value from grouped data
|
|
210
|
-
* - `dayOfWeek` + `hourOfDay` — a heatmap cell (`hourly_heatmap` view)
|
|
211
|
-
* - `flowPathId` or `sourceNodeId` + `targetNodeId` — a flow edge (`sankey` view)
|
|
212
|
-
*
|
|
213
|
-
* Pass `dataPointFilters: {}` to list all rows behind the metric for the window.
|
|
214
|
-
*
|
|
215
|
-
* Results are paginated with `page` / `pageSize` (max 200 per page);
|
|
216
|
-
* `availableColumns` describes every column the dataset can return and
|
|
217
|
-
* `defaultColumnIds` the recommended subset. Rows are keyed by column ID; identity
|
|
218
|
-
* cells (teammates, contacts) are objects with `id` + `label`.
|
|
219
|
-
*
|
|
220
|
-
* ### Version Availability
|
|
221
|
-
*
|
|
222
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
223
|
-
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
224
|
-
*
|
|
225
|
-
* @example
|
|
226
|
-
* ```ts
|
|
227
|
-
* const response = await client.reports.drillIn({
|
|
228
|
-
* endDate: 'xxxxxxxxxx',
|
|
229
|
-
* granularity: 'day',
|
|
230
|
-
* metric: 'new_conversations',
|
|
231
|
-
* startDate: 'xxxxxxxxxx',
|
|
232
|
-
* });
|
|
233
|
-
* ```
|
|
234
|
-
*/
|
|
235
|
-
drillIn(params: ReportDrillInParams, options?: RequestOptions): APIPromise<ReportDrillInResponse> {
|
|
236
|
-
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
237
|
-
return this._client.post('/v2/reports/drill-in', {
|
|
238
|
-
body,
|
|
239
|
-
...options,
|
|
240
|
-
headers: buildHeaders([
|
|
241
|
-
{
|
|
242
|
-
...(featurebaseVersion?.toString() != null ?
|
|
243
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
244
|
-
: undefined),
|
|
245
|
-
},
|
|
246
|
-
options?.headers,
|
|
247
|
-
]),
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
275
|
}
|
|
251
276
|
|
|
252
277
|
export interface ReportAttribute {
|
|
@@ -414,14 +439,22 @@ export interface ReportMetric {
|
|
|
414
439
|
*/
|
|
415
440
|
id: string;
|
|
416
441
|
|
|
442
|
+
algebra: ReportMetric.Algebra;
|
|
443
|
+
|
|
417
444
|
allowedAggregations: Array<
|
|
418
445
|
'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value'
|
|
419
446
|
>;
|
|
420
447
|
|
|
421
448
|
description: string;
|
|
422
449
|
|
|
450
|
+
executionKind: 'pipe_aggregate' | 'pipe_computed_ratio';
|
|
451
|
+
|
|
423
452
|
name: string;
|
|
424
453
|
|
|
454
|
+
presentationFamily: 'count' | 'duration' | 'percentage' | 'decimal' | 'fibi' | 'ai';
|
|
455
|
+
|
|
456
|
+
releaseState: 'available' | 'unavailable';
|
|
457
|
+
|
|
425
458
|
/**
|
|
426
459
|
* Attribute IDs this specific metric accepts in filter expressions.
|
|
427
460
|
*/
|
|
@@ -446,6 +479,48 @@ export interface ReportMetric {
|
|
|
446
479
|
type: 'count' | 'percentage' | 'duration' | 'number';
|
|
447
480
|
|
|
448
481
|
unit: 'count' | 'percentage' | 'duration_ms' | 'number';
|
|
482
|
+
|
|
483
|
+
availabilityReason?: string;
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Local calendar date (ISO 8601) from which this specific metric has data, when it
|
|
487
|
+
* differs from the global reporting floor. Windows ending before this date are
|
|
488
|
+
* rejected for this metric.
|
|
489
|
+
*/
|
|
490
|
+
dataAvailableFromIso?: string;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Whether this variant is the default selection for its `variantGroupId`.
|
|
494
|
+
*/
|
|
495
|
+
isDefaultVariant?: boolean;
|
|
496
|
+
|
|
497
|
+
qualifiers?: Array<string>;
|
|
498
|
+
|
|
499
|
+
searchAliases?: Array<string>;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Metrics sharing a `variantGroupId` are timestamp variants of one logical metric
|
|
503
|
+
* (same display `name`); each measures the same population at a different
|
|
504
|
+
* timestamp. Query the concrete metric `id` to pick a variant.
|
|
505
|
+
*/
|
|
506
|
+
variantGroupId?: string;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Stable identifier for this variant within its group (e.g. `created_at`,
|
|
510
|
+
* `started_at`).
|
|
511
|
+
*/
|
|
512
|
+
variantId?: string;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Human-readable variant label for pickers (e.g. `Created at`, `Started at`).
|
|
516
|
+
*/
|
|
517
|
+
variantLabel?: string;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export namespace ReportMetric {
|
|
521
|
+
export interface Algebra {
|
|
522
|
+
kind: 'direct_aggregate' | 'pipe_computed_ratio';
|
|
523
|
+
}
|
|
449
524
|
}
|
|
450
525
|
|
|
451
526
|
export interface ReportSegmentDatum {
|
|
@@ -497,6 +572,7 @@ export interface ReportDrillInResponse {
|
|
|
497
572
|
| boolean
|
|
498
573
|
| Array<string>
|
|
499
574
|
| ReportDrillInResponse.ReportDrillInIdentityCell
|
|
575
|
+
| ReportDrillInResponse.ReportDrillInSourceDetailsCell
|
|
500
576
|
| null;
|
|
501
577
|
}>;
|
|
502
578
|
|
|
@@ -514,6 +590,11 @@ export namespace ReportDrillInResponse {
|
|
|
514
590
|
|
|
515
591
|
name: string;
|
|
516
592
|
|
|
593
|
+
/**
|
|
594
|
+
* Whether this column may be used in the drill-in sort request.
|
|
595
|
+
*/
|
|
596
|
+
supportsSort: boolean;
|
|
597
|
+
|
|
517
598
|
valueType: string;
|
|
518
599
|
|
|
519
600
|
category?: string;
|
|
@@ -523,6 +604,43 @@ export namespace ReportDrillInResponse {
|
|
|
523
604
|
datasetId: string;
|
|
524
605
|
|
|
525
606
|
metricId: string;
|
|
607
|
+
|
|
608
|
+
rawMetricId: string;
|
|
609
|
+
|
|
610
|
+
reconciliation: Meta.Reconciliation;
|
|
611
|
+
|
|
612
|
+
rowGrain: string;
|
|
613
|
+
|
|
614
|
+
rowSemantics: 'metric_rows' | 'numerator_rows';
|
|
615
|
+
|
|
616
|
+
sourceFact: string;
|
|
617
|
+
|
|
618
|
+
emptyReason?: 'no_matching_rows' | 'denominator_unavailable';
|
|
619
|
+
|
|
620
|
+
metricRowId?: string;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export namespace Meta {
|
|
624
|
+
export interface Reconciliation {
|
|
625
|
+
kind:
|
|
626
|
+
| 'rows'
|
|
627
|
+
| 'actions_across_conversations'
|
|
628
|
+
| 'active_hour_rate'
|
|
629
|
+
| 'positive_ratings_over_eligible_ratings'
|
|
630
|
+
| 'missed_over_evaluated';
|
|
631
|
+
|
|
632
|
+
rowCount: number;
|
|
633
|
+
|
|
634
|
+
status: 'not_applicable' | 'available' | 'denominator_unavailable';
|
|
635
|
+
|
|
636
|
+
denominatorHours?: number;
|
|
637
|
+
|
|
638
|
+
displayedRate?: number;
|
|
639
|
+
|
|
640
|
+
eligibleDenominatorTotal?: number;
|
|
641
|
+
|
|
642
|
+
rawNumeratorTotal?: number;
|
|
643
|
+
}
|
|
526
644
|
}
|
|
527
645
|
|
|
528
646
|
export interface ReportDrillInIdentityCell {
|
|
@@ -535,21 +653,45 @@ export namespace ReportDrillInResponse {
|
|
|
535
653
|
avatarUrl?: string;
|
|
536
654
|
|
|
537
655
|
color?: string;
|
|
656
|
+
|
|
657
|
+
provenance?: 'current' | 'historical' | 'fallback' | 'unassigned';
|
|
538
658
|
}
|
|
539
|
-
}
|
|
540
659
|
|
|
541
|
-
export interface
|
|
542
|
-
|
|
660
|
+
export interface ReportDrillInSourceDetailsCell {
|
|
661
|
+
items: Array<ReportDrillInSourceDetailsCell.Item>;
|
|
543
662
|
|
|
544
|
-
|
|
545
|
-
}
|
|
663
|
+
kind: 'source_details';
|
|
664
|
+
}
|
|
546
665
|
|
|
547
|
-
export
|
|
548
|
-
|
|
666
|
+
export namespace ReportDrillInSourceDetailsCell {
|
|
667
|
+
export interface Item {
|
|
668
|
+
label: string;
|
|
669
|
+
|
|
670
|
+
id?: string;
|
|
671
|
+
|
|
672
|
+
type?: string;
|
|
673
|
+
|
|
674
|
+
url?: string;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export interface ReportListDatasetsResponse {
|
|
680
|
+
data: Array<ReportDataset>;
|
|
549
681
|
|
|
550
682
|
object: 'list';
|
|
551
683
|
}
|
|
552
684
|
|
|
685
|
+
export interface ReportLookupFilterValuesResponse {
|
|
686
|
+
data: Array<ReportAttributeOption>;
|
|
687
|
+
|
|
688
|
+
object: 'list';
|
|
689
|
+
|
|
690
|
+
nextCursor?: string;
|
|
691
|
+
|
|
692
|
+
unavailableSelectedValues?: Array<string>;
|
|
693
|
+
}
|
|
694
|
+
|
|
553
695
|
export interface ReportQueryResponse {
|
|
554
696
|
meta: ReportQueryResponse.Meta;
|
|
555
697
|
|
|
@@ -720,25 +862,10 @@ export namespace ReportQueryResponse {
|
|
|
720
862
|
}
|
|
721
863
|
}
|
|
722
864
|
|
|
723
|
-
export interface
|
|
724
|
-
/**
|
|
725
|
-
* API version for this request. Defaults to your organization's configured API
|
|
726
|
-
* version if not specified.
|
|
727
|
-
*/
|
|
728
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
export interface ReportQueryParams {
|
|
732
|
-
/**
|
|
733
|
-
* Body param: Aggregation function applied to the metric. Each metric supports a
|
|
734
|
-
* subset of aggregations — see the `allowedAggregations` field in the
|
|
735
|
-
* `GET /v2/reports/datasets` catalog.
|
|
736
|
-
*/
|
|
737
|
-
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value';
|
|
738
|
-
|
|
865
|
+
export interface ReportDrillInParams {
|
|
739
866
|
/**
|
|
740
867
|
* Body param: End of the reporting window (ISO 8601 date or datetime, inclusive).
|
|
741
|
-
* Windows ending before 2026-07-
|
|
868
|
+
* Windows ending before 2026-07-14 are rejected.
|
|
742
869
|
*/
|
|
743
870
|
endDate: string;
|
|
744
871
|
|
|
@@ -748,29 +875,34 @@ export interface ReportQueryParams {
|
|
|
748
875
|
granularity: 'hour' | 'day' | 'week' | 'month';
|
|
749
876
|
|
|
750
877
|
/**
|
|
751
|
-
* Body param: Metric ID
|
|
752
|
-
* via `GET /v2/reports/datasets`.
|
|
878
|
+
* Body param: Metric ID the drill-in belongs to.
|
|
753
879
|
*/
|
|
754
880
|
metric: string;
|
|
755
881
|
|
|
756
882
|
/**
|
|
757
883
|
* Body param: Start of the reporting window (ISO 8601 date or datetime,
|
|
758
|
-
* inclusive). Reporting data is available from 2026-07-
|
|
884
|
+
* inclusive). Reporting data is available from 2026-07-14; crossing windows are
|
|
759
885
|
* clamped to that boundary.
|
|
760
886
|
*/
|
|
761
887
|
startDate: string;
|
|
762
888
|
|
|
763
889
|
/**
|
|
764
|
-
* Body param:
|
|
765
|
-
* `compareStartDate`.
|
|
890
|
+
* Body param: Stable editor ID of the saved chart that launched this drill-in.
|
|
766
891
|
*/
|
|
767
|
-
|
|
892
|
+
chartEditorId?: string;
|
|
768
893
|
|
|
769
894
|
/**
|
|
770
|
-
* Body param:
|
|
771
|
-
*
|
|
895
|
+
* Body param: Column IDs to include in each returned row. Omit for legacy
|
|
896
|
+
* full-width static rows; pass an empty array to use `defaultColumnIds`.
|
|
772
897
|
*/
|
|
773
|
-
|
|
898
|
+
columns?: Array<string>;
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Body param: Narrows the drill-in to one data point from a previous query (time
|
|
902
|
+
* bucket, group value, heatmap cell, or flow edge). Pass `{}` to list all
|
|
903
|
+
* underlying rows.
|
|
904
|
+
*/
|
|
905
|
+
dataPointFilters?: ReportDrillInParams.DataPointFilters;
|
|
774
906
|
|
|
775
907
|
/**
|
|
776
908
|
* Body param: Filter expression: a single rule, or an `and`/`or` group combining
|
|
@@ -780,31 +912,49 @@ export interface ReportQueryParams {
|
|
|
780
912
|
filters?: ReportFilterRule | ReportFilterExpression;
|
|
781
913
|
|
|
782
914
|
/**
|
|
783
|
-
* Body param
|
|
784
|
-
* `supportsGroupBy` in the catalog.
|
|
915
|
+
* Body param
|
|
785
916
|
*/
|
|
786
917
|
groupBy?: string;
|
|
787
918
|
|
|
788
919
|
/**
|
|
789
|
-
* Body param
|
|
790
|
-
* supported by some metrics (see `supportsOfficeHours` in the catalog).
|
|
920
|
+
* Body param
|
|
791
921
|
*/
|
|
792
922
|
officeHoursOnly?: boolean;
|
|
793
923
|
|
|
794
924
|
/**
|
|
795
|
-
* Body param:
|
|
925
|
+
* Body param: Page number (1-based).
|
|
796
926
|
*/
|
|
797
|
-
|
|
927
|
+
page?: number;
|
|
798
928
|
|
|
799
929
|
/**
|
|
800
|
-
* Body param:
|
|
801
|
-
|
|
930
|
+
* Body param: Rows per page (1-200, default 25).
|
|
931
|
+
*/
|
|
932
|
+
pageSize?: number;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Body param
|
|
802
936
|
*/
|
|
803
937
|
segmentBy?: string;
|
|
804
938
|
|
|
805
939
|
/**
|
|
806
|
-
* Body param:
|
|
807
|
-
* to
|
|
940
|
+
* Body param: A metric ID from the datasets catalog. Use when the originating
|
|
941
|
+
* chart aggregates several metrics to pick which one the drill-in follows.
|
|
942
|
+
* Defaults to `metric`.
|
|
943
|
+
*/
|
|
944
|
+
selectedMetricId?: string;
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Body param: Stable metric-row ID selected within the launching chart.
|
|
948
|
+
*/
|
|
949
|
+
selectedMetricRowId?: string;
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Body param
|
|
953
|
+
*/
|
|
954
|
+
sort?: Array<ReportDrillInParams.Sort>;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Body param
|
|
808
958
|
*/
|
|
809
959
|
timezone?: string;
|
|
810
960
|
|
|
@@ -820,7 +970,72 @@ export interface ReportQueryParams {
|
|
|
820
970
|
* Header param: API version for this request. Defaults to your organization's
|
|
821
971
|
* configured API version if not specified.
|
|
822
972
|
*/
|
|
823
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
973
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export namespace ReportDrillInParams {
|
|
977
|
+
/**
|
|
978
|
+
* Narrows the drill-in to one data point from a previous query (time bucket, group
|
|
979
|
+
* value, heatmap cell, or flow edge). Pass `{}` to list all underlying rows.
|
|
980
|
+
*/
|
|
981
|
+
export interface DataPointFilters {
|
|
982
|
+
/**
|
|
983
|
+
* Day of week (1 = Monday … 7 = Sunday) — for `hourly_heatmap` views.
|
|
984
|
+
*/
|
|
985
|
+
dayOfWeek?: number;
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Flow path ID — for `sankey` views.
|
|
989
|
+
*/
|
|
990
|
+
flowPathId?: string;
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Group value to drill into (a `group` value from `groupedData`).
|
|
994
|
+
*/
|
|
995
|
+
groupValue?: string;
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* Hour of day (0-23) — for `hourly_heatmap` views.
|
|
999
|
+
*/
|
|
1000
|
+
hourOfDay?: number;
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Segment value to drill into (a `segment` value from segment data).
|
|
1004
|
+
*/
|
|
1005
|
+
segmentValue?: string;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Flow source node ID — for `sankey` views.
|
|
1009
|
+
*/
|
|
1010
|
+
sourceNodeId?: string;
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Flow target node ID — for `sankey` views.
|
|
1014
|
+
*/
|
|
1015
|
+
targetNodeId?: string;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Time bucket to drill into (a `date` value from the query time series).
|
|
1019
|
+
*/
|
|
1020
|
+
timeBucket?: string;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
export interface Sort {
|
|
1024
|
+
direction: 'asc' | 'desc';
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* Column ID to sort by (an attribute ID or `metric.value`).
|
|
1028
|
+
*/
|
|
1029
|
+
fieldId: string;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export interface ReportListDatasetsParams {
|
|
1034
|
+
/**
|
|
1035
|
+
* API version for this request. Defaults to your organization's configured API
|
|
1036
|
+
* version if not specified.
|
|
1037
|
+
*/
|
|
1038
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
824
1039
|
}
|
|
825
1040
|
|
|
826
1041
|
export interface ReportLookupFilterValuesParams {
|
|
@@ -830,16 +1045,41 @@ export interface ReportLookupFilterValuesParams {
|
|
|
830
1045
|
*/
|
|
831
1046
|
fieldId: string;
|
|
832
1047
|
|
|
1048
|
+
/**
|
|
1049
|
+
* Body param
|
|
1050
|
+
*/
|
|
1051
|
+
cursor?: string;
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* Body param
|
|
1055
|
+
*/
|
|
1056
|
+
datasetId?: string;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Body param
|
|
1060
|
+
*/
|
|
1061
|
+
groupBy?: string;
|
|
1062
|
+
|
|
833
1063
|
/**
|
|
834
1064
|
* Body param: Maximum number of options to return (1-50, default 20).
|
|
835
1065
|
*/
|
|
836
1066
|
limit?: number;
|
|
837
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* Body param
|
|
1070
|
+
*/
|
|
1071
|
+
metricId?: string;
|
|
1072
|
+
|
|
838
1073
|
/**
|
|
839
1074
|
* Body param: Optional search string to narrow the returned options.
|
|
840
1075
|
*/
|
|
841
1076
|
query?: string;
|
|
842
1077
|
|
|
1078
|
+
/**
|
|
1079
|
+
* Body param
|
|
1080
|
+
*/
|
|
1081
|
+
segmentBy?: string;
|
|
1082
|
+
|
|
843
1083
|
/**
|
|
844
1084
|
* Body param: Already-selected values to resolve labels for (returned alongside
|
|
845
1085
|
* search results).
|
|
@@ -850,12 +1090,20 @@ export interface ReportLookupFilterValuesParams {
|
|
|
850
1090
|
* Header param: API version for this request. Defaults to your organization's
|
|
851
1091
|
* configured API version if not specified.
|
|
852
1092
|
*/
|
|
853
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1093
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
854
1094
|
}
|
|
855
1095
|
|
|
856
|
-
export interface
|
|
1096
|
+
export interface ReportQueryParams {
|
|
857
1097
|
/**
|
|
858
|
-
* Body param
|
|
1098
|
+
* Body param: Aggregation function applied to the metric. Each metric supports a
|
|
1099
|
+
* subset of aggregations — see the `allowedAggregations` field in the
|
|
1100
|
+
* `GET /v2/reports/datasets` catalog.
|
|
1101
|
+
*/
|
|
1102
|
+
aggregation: 'count' | 'sum' | 'avg' | 'median' | 'min' | 'max' | 'range' | 'percentile' | 'value';
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Body param: End of the reporting window (ISO 8601 date or datetime, inclusive).
|
|
1106
|
+
* Windows ending before 2026-07-14 are rejected.
|
|
859
1107
|
*/
|
|
860
1108
|
endDate: string;
|
|
861
1109
|
|
|
@@ -865,21 +1113,29 @@ export interface ReportDrillInParams {
|
|
|
865
1113
|
granularity: 'hour' | 'day' | 'week' | 'month';
|
|
866
1114
|
|
|
867
1115
|
/**
|
|
868
|
-
* Body param: Metric ID
|
|
1116
|
+
* Body param: Metric ID to query (e.g. `new_conversations`). Discover metric IDs
|
|
1117
|
+
* via `GET /v2/reports/datasets`.
|
|
869
1118
|
*/
|
|
870
1119
|
metric: string;
|
|
871
1120
|
|
|
872
1121
|
/**
|
|
873
|
-
* Body param
|
|
1122
|
+
* Body param: Start of the reporting window (ISO 8601 date or datetime,
|
|
1123
|
+
* inclusive). Reporting data is available from 2026-07-14; crossing windows are
|
|
1124
|
+
* clamped to that boundary.
|
|
874
1125
|
*/
|
|
875
1126
|
startDate: string;
|
|
876
1127
|
|
|
877
1128
|
/**
|
|
878
|
-
* Body param:
|
|
879
|
-
*
|
|
880
|
-
* underlying rows.
|
|
1129
|
+
* Body param: End of the comparison window. Must be paired with
|
|
1130
|
+
* `compareStartDate`.
|
|
881
1131
|
*/
|
|
882
|
-
|
|
1132
|
+
compareEndDate?: string;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Body param: Start of the comparison window for period-over-period deltas. Must
|
|
1136
|
+
* be paired with `compareEndDate`.
|
|
1137
|
+
*/
|
|
1138
|
+
compareStartDate?: string;
|
|
883
1139
|
|
|
884
1140
|
/**
|
|
885
1141
|
* Body param: Filter expression: a single rule, or an `and`/`or` group combining
|
|
@@ -889,47 +1145,70 @@ export interface ReportDrillInParams {
|
|
|
889
1145
|
filters?: ReportFilterRule | ReportFilterExpression;
|
|
890
1146
|
|
|
891
1147
|
/**
|
|
892
|
-
* Body param
|
|
1148
|
+
* Body param: Attribute ID to group results by (e.g. `conversation.channel`). See
|
|
1149
|
+
* `supportsGroupBy` in the catalog.
|
|
893
1150
|
*/
|
|
894
1151
|
groupBy?: string;
|
|
895
1152
|
|
|
896
1153
|
/**
|
|
897
|
-
* Body param
|
|
1154
|
+
* Body param: Restrict time-based metrics to configured office hours. Only
|
|
1155
|
+
* supported by some metrics (see `supportsOfficeHours` in the catalog).
|
|
898
1156
|
*/
|
|
899
1157
|
officeHoursOnly?: boolean;
|
|
900
1158
|
|
|
901
1159
|
/**
|
|
902
|
-
* Body param:
|
|
1160
|
+
* Body param: Percentile (1-100) — required when `aggregation` is `percentile`.
|
|
903
1161
|
*/
|
|
904
|
-
|
|
1162
|
+
percentile?: number;
|
|
905
1163
|
|
|
906
1164
|
/**
|
|
907
|
-
* Body param:
|
|
1165
|
+
* Body param: Attribute ID for secondary segmentation within each group or time
|
|
1166
|
+
* bucket.
|
|
908
1167
|
*/
|
|
909
|
-
|
|
1168
|
+
segmentBy?: string;
|
|
910
1169
|
|
|
911
1170
|
/**
|
|
912
|
-
* Body param
|
|
1171
|
+
* Body param: When `true`, fold `segmentBy` values outside the top set into a
|
|
1172
|
+
* synthetic `__other__` / `Other` segment. Only supported for additive
|
|
1173
|
+
* aggregations (`count`, `sum`, `value`) and not for percentage metrics. The
|
|
1174
|
+
* `__other__` segment cannot be drilled into. Requires `segmentBy` and
|
|
1175
|
+
* `segmentTopValuesLimit`.
|
|
913
1176
|
*/
|
|
914
|
-
|
|
1177
|
+
segmentShowOther?: boolean;
|
|
915
1178
|
|
|
916
1179
|
/**
|
|
917
|
-
* Body param:
|
|
918
|
-
*
|
|
919
|
-
*
|
|
1180
|
+
* Body param: Keep only the top N `segmentBy` values per series, ranked by the
|
|
1181
|
+
* selected metric over the full filtered primary range. Under a time View-by the
|
|
1182
|
+
* ranked segment set is identical across every bucket; under a dimension View-by
|
|
1183
|
+
* the ranking is applied within each retained parent group. Allowed values: `5`,
|
|
1184
|
+
* `7`, `10`, `15`, `20`. Requires `segmentBy`.
|
|
920
1185
|
*/
|
|
921
|
-
|
|
1186
|
+
segmentTopValuesLimit?: 5 | 7 | 10 | 15 | 20;
|
|
922
1187
|
|
|
923
1188
|
/**
|
|
924
|
-
* Body param
|
|
1189
|
+
* Body param: When `true`, append a single synthetic group with id `__other__` and
|
|
1190
|
+
* label `Other` that sums the values of every `groupBy` value outside the top set.
|
|
1191
|
+
* Only supported for additive aggregations (`count`, `sum`, `value`) and not for
|
|
1192
|
+
* percentage metrics. The `__other__` group cannot be drilled into. Requires
|
|
1193
|
+
* `groupBy` and `topValuesLimit`.
|
|
925
1194
|
*/
|
|
926
|
-
|
|
1195
|
+
showOther?: boolean;
|
|
927
1196
|
|
|
928
1197
|
/**
|
|
929
|
-
* Body param
|
|
1198
|
+
* Body param: IANA timezone for date bucketing (e.g. `America/New_York`). Defaults
|
|
1199
|
+
* to UTC.
|
|
930
1200
|
*/
|
|
931
1201
|
timezone?: string;
|
|
932
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
* Body param: Keep only the top N `groupBy` (View-by) values, ranked by the
|
|
1205
|
+
* selected metric/aggregation over the full filtered primary range. Allowed
|
|
1206
|
+
* values: `5`, `7`, `10`, `15`, `20`. The ranked set is stable across every time
|
|
1207
|
+
* bucket, and a comparison period reuses the primary period's ranked set (never
|
|
1208
|
+
* re-ranked). Requires `groupBy`.
|
|
1209
|
+
*/
|
|
1210
|
+
topValuesLimit?: 5 | 7 | 10 | 15 | 20;
|
|
1211
|
+
|
|
933
1212
|
/**
|
|
934
1213
|
* Body param: Result shape. `standard` returns a time series (plus grouped/segment
|
|
935
1214
|
* data when requested), `hourly_heatmap` buckets by day-of-week × hour-of-day,
|
|
@@ -942,64 +1221,7 @@ export interface ReportDrillInParams {
|
|
|
942
1221
|
* Header param: API version for this request. Defaults to your organization's
|
|
943
1222
|
* configured API version if not specified.
|
|
944
1223
|
*/
|
|
945
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
export namespace ReportDrillInParams {
|
|
949
|
-
/**
|
|
950
|
-
* Narrows the drill-in to one data point from a previous query (time bucket, group
|
|
951
|
-
* value, heatmap cell, or flow edge). Pass `{}` to list all underlying rows.
|
|
952
|
-
*/
|
|
953
|
-
export interface DataPointFilters {
|
|
954
|
-
/**
|
|
955
|
-
* Day of week (1 = Monday … 7 = Sunday) — for `hourly_heatmap` views.
|
|
956
|
-
*/
|
|
957
|
-
dayOfWeek?: number;
|
|
958
|
-
|
|
959
|
-
/**
|
|
960
|
-
* Flow path ID — for `sankey` views.
|
|
961
|
-
*/
|
|
962
|
-
flowPathId?: string;
|
|
963
|
-
|
|
964
|
-
/**
|
|
965
|
-
* Group value to drill into (a `group` value from `groupedData`).
|
|
966
|
-
*/
|
|
967
|
-
groupValue?: string;
|
|
968
|
-
|
|
969
|
-
/**
|
|
970
|
-
* Hour of day (0-23) — for `hourly_heatmap` views.
|
|
971
|
-
*/
|
|
972
|
-
hourOfDay?: number;
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
* Segment value to drill into (a `segment` value from segment data).
|
|
976
|
-
*/
|
|
977
|
-
segmentValue?: string;
|
|
978
|
-
|
|
979
|
-
/**
|
|
980
|
-
* Flow source node ID — for `sankey` views.
|
|
981
|
-
*/
|
|
982
|
-
sourceNodeId?: string;
|
|
983
|
-
|
|
984
|
-
/**
|
|
985
|
-
* Flow target node ID — for `sankey` views.
|
|
986
|
-
*/
|
|
987
|
-
targetNodeId?: string;
|
|
988
|
-
|
|
989
|
-
/**
|
|
990
|
-
* Time bucket to drill into (a `date` value from the query time series).
|
|
991
|
-
*/
|
|
992
|
-
timeBucket?: string;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
export interface Sort {
|
|
996
|
-
direction: 'asc' | 'desc';
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* Column ID to sort by (an attribute ID or `metric.value`).
|
|
1000
|
-
*/
|
|
1001
|
-
fieldId: string;
|
|
1002
|
-
}
|
|
1224
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
1003
1225
|
}
|
|
1004
1226
|
|
|
1005
1227
|
export declare namespace Reports {
|
|
@@ -1017,9 +1239,9 @@ export declare namespace Reports {
|
|
|
1017
1239
|
type ReportListDatasetsResponse as ReportListDatasetsResponse,
|
|
1018
1240
|
type ReportLookupFilterValuesResponse as ReportLookupFilterValuesResponse,
|
|
1019
1241
|
type ReportQueryResponse as ReportQueryResponse,
|
|
1242
|
+
type ReportDrillInParams as ReportDrillInParams,
|
|
1020
1243
|
type ReportListDatasetsParams as ReportListDatasetsParams,
|
|
1021
|
-
type ReportQueryParams as ReportQueryParams,
|
|
1022
1244
|
type ReportLookupFilterValuesParams as ReportLookupFilterValuesParams,
|
|
1023
|
-
type
|
|
1245
|
+
type ReportQueryParams as ReportQueryParams,
|
|
1024
1246
|
};
|
|
1025
1247
|
}
|