featurebase-node 0.14.0 → 0.14.1
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/client.d.mts +12 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -0
- package/client.d.ts.map +1 -1
- package/client.js +21 -1
- package/client.js.map +1 -1
- package/client.mjs +21 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audit-logs.d.mts +233 -0
- package/resources/audit-logs.d.mts.map +1 -0
- package/resources/audit-logs.d.ts +233 -0
- package/resources/audit-logs.d.ts.map +1 -0
- package/resources/audit-logs.js +122 -0
- package/resources/audit-logs.js.map +1 -0
- package/resources/audit-logs.mjs +118 -0
- package/resources/audit-logs.mjs.map +1 -0
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization/admins.d.mts +10 -0
- package/resources/organization/admins.d.mts.map +1 -1
- package/resources/organization/admins.d.ts +10 -0
- package/resources/organization/admins.d.ts.map +1 -1
- package/resources/organization/admins.js +2 -0
- package/resources/organization/admins.js.map +1 -1
- package/resources/organization/admins.mjs +2 -0
- package/resources/organization/admins.mjs.map +1 -1
- package/resources/reports.d.mts +641 -0
- package/resources/reports.d.mts.map +1 -0
- package/resources/reports.d.ts +641 -0
- package/resources/reports.d.ts.map +1 -0
- package/resources/reports.js +238 -0
- package/resources/reports.js.map +1 -0
- package/resources/reports.mjs +234 -0
- package/resources/reports.mjs.map +1 -0
- package/resources/webhooks.d.mts +5 -3
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +5 -3
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +2 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +2 -0
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +73 -1
- package/src/resources/audit-logs.ts +607 -0
- package/src/resources/index.ts +26 -0
- package/src/resources/organization/admins.ts +12 -0
- package/src/resources/reports.ts +908 -0
- package/src/resources/webhooks.ts +5 -0
- 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
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Reports = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
/**
|
|
8
|
+
* 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.
|
|
9
|
+
*/
|
|
10
|
+
class Reports extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns the reporting catalog: every dataset available to your workspace with
|
|
13
|
+
* its metrics and attributes.
|
|
14
|
+
*
|
|
15
|
+
* This is the discovery endpoint for the reporting API — read it before building
|
|
16
|
+
* query payloads:
|
|
17
|
+
*
|
|
18
|
+
* - **Metrics** carry the `metric` IDs accepted by `POST /v2/reports/query`, plus
|
|
19
|
+
* each metric's `allowedAggregations`, unit, and whether it supports
|
|
20
|
+
* office-hours restriction and period comparison.
|
|
21
|
+
* - **Attributes** carry the `fieldId`s accepted in filter rules and the attribute
|
|
22
|
+
* IDs accepted as `groupBy` / `segmentBy`, plus each attribute's
|
|
23
|
+
* `allowedOperators` and value type. Attributes with `staticOptions` list their
|
|
24
|
+
* full value set inline; other filterable attributes resolve values via
|
|
25
|
+
* `POST /v2/reports/filter-values`.
|
|
26
|
+
*
|
|
27
|
+
* The catalog includes your workspace's custom conversation/ticket attributes
|
|
28
|
+
* where applicable, so it can differ between workspaces.
|
|
29
|
+
*
|
|
30
|
+
* ### Version Availability
|
|
31
|
+
*
|
|
32
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
33
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const response = await client.reports.listDatasets();
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
listDatasets(params = {}, options) {
|
|
41
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
42
|
+
return this._client.get('/v2/reports/datasets', {
|
|
43
|
+
...options,
|
|
44
|
+
headers: (0, headers_1.buildHeaders)([
|
|
45
|
+
{
|
|
46
|
+
...(featurebaseVersion?.toString() != null ?
|
|
47
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
48
|
+
: undefined),
|
|
49
|
+
},
|
|
50
|
+
options?.headers,
|
|
51
|
+
]),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Executes an ad-hoc reporting query: one metric + aggregation over a date range,
|
|
56
|
+
* with optional filters, grouping, segmentation and period-over-period comparison.
|
|
57
|
+
*
|
|
58
|
+
* ### Building a query
|
|
59
|
+
*
|
|
60
|
+
* 1. Pick a `metric` and `aggregation` from the datasets catalog
|
|
61
|
+
* (`GET /v2/reports/datasets`). Counts use `count`; duration metrics support
|
|
62
|
+
* `avg`, `median`, `min`, `max` and `percentile` (pass `percentile: 95` for
|
|
63
|
+
* p95); rate metrics use `value`.
|
|
64
|
+
* 2. Set the reporting window with `startDate` / `endDate` (ISO 8601) and a
|
|
65
|
+
* `granularity` (`hour`, `day`, `week`, `month`) for the returned time series.
|
|
66
|
+
* 3. Optionally narrow with `filters` — a rule
|
|
67
|
+
* (`{ "kind": "rule", "fieldId": "...", "operator": "in", "value": [...] }`) or
|
|
68
|
+
* an `and`/`or` group of rules. Attribute IDs and allowed operators come from
|
|
69
|
+
* the catalog.
|
|
70
|
+
* 4. Optionally break results down with `groupBy` (primary dimension) and
|
|
71
|
+
* `segmentBy` (secondary dimension).
|
|
72
|
+
* 5. Optionally pass `compareStartDate` / `compareEndDate` to get `previousValue`
|
|
73
|
+
* / `deltaPercent` alongside every data point.
|
|
74
|
+
*
|
|
75
|
+
* ### Example
|
|
76
|
+
*
|
|
77
|
+
* ```json
|
|
78
|
+
* {
|
|
79
|
+
* "metric": "new_conversations",
|
|
80
|
+
* "aggregation": "count",
|
|
81
|
+
* "startDate": "2026-06-01",
|
|
82
|
+
* "endDate": "2026-06-30",
|
|
83
|
+
* "granularity": "day",
|
|
84
|
+
* "groupBy": "conversation.channel",
|
|
85
|
+
* "filters": {
|
|
86
|
+
* "kind": "rule",
|
|
87
|
+
* "fieldId": "conversation.state",
|
|
88
|
+
* "operator": "is",
|
|
89
|
+
* "value": "closed"
|
|
90
|
+
* }
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* ### Response shape
|
|
95
|
+
*
|
|
96
|
+
* - `value` — the aggregate across the whole window
|
|
97
|
+
* - `timeSeries` — one datum per granularity bucket
|
|
98
|
+
* - `groupedData` / `segmentData` — present when `groupBy` / `segmentBy` were
|
|
99
|
+
* requested
|
|
100
|
+
* - `flowData` — present for `view: "sankey"` (Overview conversation-flow metrics)
|
|
101
|
+
* - `meta` — echo of the resolved metric, dataset, unit and aggregation
|
|
102
|
+
*
|
|
103
|
+
* ### Special views
|
|
104
|
+
*
|
|
105
|
+
* - `view: "hourly_heatmap"` buckets by day-of-week × hour-of-day (use with volume
|
|
106
|
+
* metrics)
|
|
107
|
+
* - `view: "sankey"` returns conversation flow edges (Overview metrics only)
|
|
108
|
+
*
|
|
109
|
+
* ### Version Availability
|
|
110
|
+
*
|
|
111
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
112
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* const response = await client.reports.query({
|
|
117
|
+
* aggregation: 'count',
|
|
118
|
+
* endDate: '2026-06-30',
|
|
119
|
+
* granularity: 'day',
|
|
120
|
+
* metric: 'new_conversations',
|
|
121
|
+
* startDate: '2026-06-01',
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
query(params, options) {
|
|
126
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
127
|
+
return this._client.post('/v2/reports/query', {
|
|
128
|
+
body,
|
|
129
|
+
...options,
|
|
130
|
+
headers: (0, headers_1.buildHeaders)([
|
|
131
|
+
{
|
|
132
|
+
...(featurebaseVersion?.toString() != null ?
|
|
133
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
134
|
+
: undefined),
|
|
135
|
+
},
|
|
136
|
+
options?.headers,
|
|
137
|
+
]),
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Returns the available values for a filterable attribute — use it to build valid
|
|
142
|
+
* `filters` rules for `POST /v2/reports/query`.
|
|
143
|
+
*
|
|
144
|
+
* Works for attributes whose values live in your workspace data (tags, teammates,
|
|
145
|
+
* teams, companies, plans, countries, ...). Attributes with `staticOptions` in the
|
|
146
|
+
* catalog don't need this endpoint — their value set is already inline.
|
|
147
|
+
*
|
|
148
|
+
* - `query` narrows results by search string
|
|
149
|
+
* - `selectedValues` resolves labels for values you already hold (returned
|
|
150
|
+
* alongside search results)
|
|
151
|
+
*
|
|
152
|
+
* ### Example
|
|
153
|
+
*
|
|
154
|
+
* ```json
|
|
155
|
+
* { "fieldId": "conversation.tags", "query": "bill", "limit": 20 }
|
|
156
|
+
* ```
|
|
157
|
+
*
|
|
158
|
+
* ### Version Availability
|
|
159
|
+
*
|
|
160
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
161
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* const response = await client.reports.lookupFilterValues({
|
|
166
|
+
* fieldId: 'conversation.tags',
|
|
167
|
+
* });
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
lookupFilterValues(params, options) {
|
|
171
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
172
|
+
return this._client.post('/v2/reports/filter-values', {
|
|
173
|
+
body,
|
|
174
|
+
...options,
|
|
175
|
+
headers: (0, headers_1.buildHeaders)([
|
|
176
|
+
{
|
|
177
|
+
...(featurebaseVersion?.toString() != null ?
|
|
178
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
179
|
+
: undefined),
|
|
180
|
+
},
|
|
181
|
+
options?.headers,
|
|
182
|
+
]),
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Returns the paginated row-level records behind a metric — either the whole
|
|
187
|
+
* reporting window, or one specific data point from a previous
|
|
188
|
+
* `POST /v2/reports/query` response.
|
|
189
|
+
*
|
|
190
|
+
* Send the **same** `metric`, date range, `granularity`, `filters`, `groupBy` /
|
|
191
|
+
* `segmentBy` and `view` as the query you're drilling into, plus
|
|
192
|
+
* `dataPointFilters` selecting the data point:
|
|
193
|
+
*
|
|
194
|
+
* - `timeBucket` — a `date` from the time series
|
|
195
|
+
* - `groupValue` / `segmentValue` — a `group` / `segment` value from grouped data
|
|
196
|
+
* - `dayOfWeek` + `hourOfDay` — a heatmap cell (`hourly_heatmap` view)
|
|
197
|
+
* - `flowPathId` or `sourceNodeId` + `targetNodeId` — a flow edge (`sankey` view)
|
|
198
|
+
*
|
|
199
|
+
* Pass `dataPointFilters: {}` to list all rows behind the metric for the window.
|
|
200
|
+
*
|
|
201
|
+
* Results are paginated with `page` / `pageSize` (max 200 per page);
|
|
202
|
+
* `availableColumns` describes every column the dataset can return and
|
|
203
|
+
* `defaultColumnIds` the recommended subset. Rows are keyed by column ID; identity
|
|
204
|
+
* cells (teammates, contacts) are objects with `id` + `label`.
|
|
205
|
+
*
|
|
206
|
+
* ### Version Availability
|
|
207
|
+
*
|
|
208
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
209
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```ts
|
|
213
|
+
* const response = await client.reports.drillIn({
|
|
214
|
+
* endDate: 'xxxxxxxxxx',
|
|
215
|
+
* granularity: 'day',
|
|
216
|
+
* metric: 'new_conversations',
|
|
217
|
+
* startDate: 'xxxxxxxxxx',
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
drillIn(params, options) {
|
|
222
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
223
|
+
return this._client.post('/v2/reports/drill-in', {
|
|
224
|
+
body,
|
|
225
|
+
...options,
|
|
226
|
+
headers: (0, headers_1.buildHeaders)([
|
|
227
|
+
{
|
|
228
|
+
...(featurebaseVersion?.toString() != null ?
|
|
229
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
230
|
+
: undefined),
|
|
231
|
+
},
|
|
232
|
+
options?.headers,
|
|
233
|
+
]),
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
exports.Reports = Reports;
|
|
238
|
+
//# sourceMappingURL=reports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAAmD;AAGnD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,YAAY,CACV,SAAsD,EAAE,EACxD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBA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ACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,OAAO,CAAC,MAA2B,EAAE,OAAwB;QAC3D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAC/C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA3OD,0BA2OC"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* 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.
|
|
6
|
+
*/
|
|
7
|
+
export class Reports extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns the reporting catalog: every dataset available to your workspace with
|
|
10
|
+
* its metrics and attributes.
|
|
11
|
+
*
|
|
12
|
+
* This is the discovery endpoint for the reporting API — read it before building
|
|
13
|
+
* query payloads:
|
|
14
|
+
*
|
|
15
|
+
* - **Metrics** carry the `metric` IDs accepted by `POST /v2/reports/query`, plus
|
|
16
|
+
* each metric's `allowedAggregations`, unit, and whether it supports
|
|
17
|
+
* office-hours restriction and period comparison.
|
|
18
|
+
* - **Attributes** carry the `fieldId`s accepted in filter rules and the attribute
|
|
19
|
+
* IDs accepted as `groupBy` / `segmentBy`, plus each attribute's
|
|
20
|
+
* `allowedOperators` and value type. Attributes with `staticOptions` list their
|
|
21
|
+
* full value set inline; other filterable attributes resolve values via
|
|
22
|
+
* `POST /v2/reports/filter-values`.
|
|
23
|
+
*
|
|
24
|
+
* The catalog includes your workspace's custom conversation/ticket attributes
|
|
25
|
+
* where applicable, so it can differ between workspaces.
|
|
26
|
+
*
|
|
27
|
+
* ### Version Availability
|
|
28
|
+
*
|
|
29
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
30
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const response = await client.reports.listDatasets();
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
listDatasets(params = {}, options) {
|
|
38
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
39
|
+
return this._client.get('/v2/reports/datasets', {
|
|
40
|
+
...options,
|
|
41
|
+
headers: buildHeaders([
|
|
42
|
+
{
|
|
43
|
+
...(featurebaseVersion?.toString() != null ?
|
|
44
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
45
|
+
: undefined),
|
|
46
|
+
},
|
|
47
|
+
options?.headers,
|
|
48
|
+
]),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Executes an ad-hoc reporting query: one metric + aggregation over a date range,
|
|
53
|
+
* with optional filters, grouping, segmentation and period-over-period comparison.
|
|
54
|
+
*
|
|
55
|
+
* ### Building a query
|
|
56
|
+
*
|
|
57
|
+
* 1. Pick a `metric` and `aggregation` from the datasets catalog
|
|
58
|
+
* (`GET /v2/reports/datasets`). Counts use `count`; duration metrics support
|
|
59
|
+
* `avg`, `median`, `min`, `max` and `percentile` (pass `percentile: 95` for
|
|
60
|
+
* p95); rate metrics use `value`.
|
|
61
|
+
* 2. Set the reporting window with `startDate` / `endDate` (ISO 8601) and a
|
|
62
|
+
* `granularity` (`hour`, `day`, `week`, `month`) for the returned time series.
|
|
63
|
+
* 3. Optionally narrow with `filters` — a rule
|
|
64
|
+
* (`{ "kind": "rule", "fieldId": "...", "operator": "in", "value": [...] }`) or
|
|
65
|
+
* an `and`/`or` group of rules. Attribute IDs and allowed operators come from
|
|
66
|
+
* the catalog.
|
|
67
|
+
* 4. Optionally break results down with `groupBy` (primary dimension) and
|
|
68
|
+
* `segmentBy` (secondary dimension).
|
|
69
|
+
* 5. Optionally pass `compareStartDate` / `compareEndDate` to get `previousValue`
|
|
70
|
+
* / `deltaPercent` alongside every data point.
|
|
71
|
+
*
|
|
72
|
+
* ### Example
|
|
73
|
+
*
|
|
74
|
+
* ```json
|
|
75
|
+
* {
|
|
76
|
+
* "metric": "new_conversations",
|
|
77
|
+
* "aggregation": "count",
|
|
78
|
+
* "startDate": "2026-06-01",
|
|
79
|
+
* "endDate": "2026-06-30",
|
|
80
|
+
* "granularity": "day",
|
|
81
|
+
* "groupBy": "conversation.channel",
|
|
82
|
+
* "filters": {
|
|
83
|
+
* "kind": "rule",
|
|
84
|
+
* "fieldId": "conversation.state",
|
|
85
|
+
* "operator": "is",
|
|
86
|
+
* "value": "closed"
|
|
87
|
+
* }
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* ### Response shape
|
|
92
|
+
*
|
|
93
|
+
* - `value` — the aggregate across the whole window
|
|
94
|
+
* - `timeSeries` — one datum per granularity bucket
|
|
95
|
+
* - `groupedData` / `segmentData` — present when `groupBy` / `segmentBy` were
|
|
96
|
+
* requested
|
|
97
|
+
* - `flowData` — present for `view: "sankey"` (Overview conversation-flow metrics)
|
|
98
|
+
* - `meta` — echo of the resolved metric, dataset, unit and aggregation
|
|
99
|
+
*
|
|
100
|
+
* ### Special views
|
|
101
|
+
*
|
|
102
|
+
* - `view: "hourly_heatmap"` buckets by day-of-week × hour-of-day (use with volume
|
|
103
|
+
* metrics)
|
|
104
|
+
* - `view: "sankey"` returns conversation flow edges (Overview metrics only)
|
|
105
|
+
*
|
|
106
|
+
* ### Version Availability
|
|
107
|
+
*
|
|
108
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
109
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const response = await client.reports.query({
|
|
114
|
+
* aggregation: 'count',
|
|
115
|
+
* endDate: '2026-06-30',
|
|
116
|
+
* granularity: 'day',
|
|
117
|
+
* metric: 'new_conversations',
|
|
118
|
+
* startDate: '2026-06-01',
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
query(params, options) {
|
|
123
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
124
|
+
return this._client.post('/v2/reports/query', {
|
|
125
|
+
body,
|
|
126
|
+
...options,
|
|
127
|
+
headers: buildHeaders([
|
|
128
|
+
{
|
|
129
|
+
...(featurebaseVersion?.toString() != null ?
|
|
130
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
131
|
+
: undefined),
|
|
132
|
+
},
|
|
133
|
+
options?.headers,
|
|
134
|
+
]),
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Returns the available values for a filterable attribute — use it to build valid
|
|
139
|
+
* `filters` rules for `POST /v2/reports/query`.
|
|
140
|
+
*
|
|
141
|
+
* Works for attributes whose values live in your workspace data (tags, teammates,
|
|
142
|
+
* teams, companies, plans, countries, ...). Attributes with `staticOptions` in the
|
|
143
|
+
* catalog don't need this endpoint — their value set is already inline.
|
|
144
|
+
*
|
|
145
|
+
* - `query` narrows results by search string
|
|
146
|
+
* - `selectedValues` resolves labels for values you already hold (returned
|
|
147
|
+
* alongside search results)
|
|
148
|
+
*
|
|
149
|
+
* ### Example
|
|
150
|
+
*
|
|
151
|
+
* ```json
|
|
152
|
+
* { "fieldId": "conversation.tags", "query": "bill", "limit": 20 }
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* ### Version Availability
|
|
156
|
+
*
|
|
157
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
158
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const response = await client.reports.lookupFilterValues({
|
|
163
|
+
* fieldId: 'conversation.tags',
|
|
164
|
+
* });
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
lookupFilterValues(params, options) {
|
|
168
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
169
|
+
return this._client.post('/v2/reports/filter-values', {
|
|
170
|
+
body,
|
|
171
|
+
...options,
|
|
172
|
+
headers: buildHeaders([
|
|
173
|
+
{
|
|
174
|
+
...(featurebaseVersion?.toString() != null ?
|
|
175
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
176
|
+
: undefined),
|
|
177
|
+
},
|
|
178
|
+
options?.headers,
|
|
179
|
+
]),
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Returns the paginated row-level records behind a metric — either the whole
|
|
184
|
+
* reporting window, or one specific data point from a previous
|
|
185
|
+
* `POST /v2/reports/query` response.
|
|
186
|
+
*
|
|
187
|
+
* Send the **same** `metric`, date range, `granularity`, `filters`, `groupBy` /
|
|
188
|
+
* `segmentBy` and `view` as the query you're drilling into, plus
|
|
189
|
+
* `dataPointFilters` selecting the data point:
|
|
190
|
+
*
|
|
191
|
+
* - `timeBucket` — a `date` from the time series
|
|
192
|
+
* - `groupValue` / `segmentValue` — a `group` / `segment` value from grouped data
|
|
193
|
+
* - `dayOfWeek` + `hourOfDay` — a heatmap cell (`hourly_heatmap` view)
|
|
194
|
+
* - `flowPathId` or `sourceNodeId` + `targetNodeId` — a flow edge (`sankey` view)
|
|
195
|
+
*
|
|
196
|
+
* Pass `dataPointFilters: {}` to list all rows behind the metric for the window.
|
|
197
|
+
*
|
|
198
|
+
* Results are paginated with `page` / `pageSize` (max 200 per page);
|
|
199
|
+
* `availableColumns` describes every column the dataset can return and
|
|
200
|
+
* `defaultColumnIds` the recommended subset. Rows are keyed by column ID; identity
|
|
201
|
+
* cells (teammates, contacts) are objects with `id` + `label`.
|
|
202
|
+
*
|
|
203
|
+
* ### Version Availability
|
|
204
|
+
*
|
|
205
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
206
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```ts
|
|
210
|
+
* const response = await client.reports.drillIn({
|
|
211
|
+
* endDate: 'xxxxxxxxxx',
|
|
212
|
+
* granularity: 'day',
|
|
213
|
+
* metric: 'new_conversations',
|
|
214
|
+
* startDate: 'xxxxxxxxxx',
|
|
215
|
+
* });
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
drillIn(params, options) {
|
|
219
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
220
|
+
return this._client.post('/v2/reports/drill-in', {
|
|
221
|
+
body,
|
|
222
|
+
...options,
|
|
223
|
+
headers: buildHeaders([
|
|
224
|
+
{
|
|
225
|
+
...(featurebaseVersion?.toString() != null ?
|
|
226
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
227
|
+
: undefined),
|
|
228
|
+
},
|
|
229
|
+
options?.headers,
|
|
230
|
+
]),
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=reports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.mjs","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAGnD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,YAAY,CACV,SAAsD,EAAE,EACxD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;YAC9C,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsEG;IACH,KAAK,CAAC,MAAyB,EAAE,OAAwB;QACvD,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC5C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAA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,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/webhooks.d.mts
CHANGED
|
@@ -96,6 +96,8 @@ export declare class Webhooks extends APIResource {
|
|
|
96
96
|
* - `comment.created` - When a comment is created
|
|
97
97
|
* - `comment.updated` - When a comment is updated
|
|
98
98
|
* - `comment.deleted` - When a comment is deleted
|
|
99
|
+
* - `audit_log.created` - When an audit log event is recorded (requires Enterprise
|
|
100
|
+
* plan)
|
|
99
101
|
*
|
|
100
102
|
* ### Response
|
|
101
103
|
*
|
|
@@ -420,7 +422,7 @@ export interface Webhook {
|
|
|
420
422
|
/**
|
|
421
423
|
* Array of event topics the webhook subscribes to
|
|
422
424
|
*/
|
|
423
|
-
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted'>;
|
|
425
|
+
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted' | 'audit_log.created'>;
|
|
424
426
|
/**
|
|
425
427
|
* ISO timestamp when the webhook was last updated
|
|
426
428
|
*/
|
|
@@ -531,7 +533,7 @@ export interface WebhookCreateParams {
|
|
|
531
533
|
/**
|
|
532
534
|
* Body param: Array of event topics to subscribe to
|
|
533
535
|
*/
|
|
534
|
-
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted'>;
|
|
536
|
+
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted' | 'audit_log.created'>;
|
|
535
537
|
/**
|
|
536
538
|
* Body param: Webhook endpoint URL (must be HTTPS)
|
|
537
539
|
*/
|
|
@@ -577,7 +579,7 @@ export interface WebhookUpdateParams {
|
|
|
577
579
|
/**
|
|
578
580
|
* Body param: Array of event topics to subscribe to
|
|
579
581
|
*/
|
|
580
|
-
topics?: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted'>;
|
|
582
|
+
topics?: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted' | 'audit_log.created'>;
|
|
581
583
|
/**
|
|
582
584
|
* Body param: Webhook endpoint URL (must be HTTPS)
|
|
583
585
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,+BAA2B;AAEpF,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6DG;IACH,IA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AAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/webhooks.d.ts
CHANGED
|
@@ -96,6 +96,8 @@ export declare class Webhooks extends APIResource {
|
|
|
96
96
|
* - `comment.created` - When a comment is created
|
|
97
97
|
* - `comment.updated` - When a comment is updated
|
|
98
98
|
* - `comment.deleted` - When a comment is deleted
|
|
99
|
+
* - `audit_log.created` - When an audit log event is recorded (requires Enterprise
|
|
100
|
+
* plan)
|
|
99
101
|
*
|
|
100
102
|
* ### Response
|
|
101
103
|
*
|
|
@@ -420,7 +422,7 @@ export interface Webhook {
|
|
|
420
422
|
/**
|
|
421
423
|
* Array of event topics the webhook subscribes to
|
|
422
424
|
*/
|
|
423
|
-
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted'>;
|
|
425
|
+
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted' | 'audit_log.created'>;
|
|
424
426
|
/**
|
|
425
427
|
* ISO timestamp when the webhook was last updated
|
|
426
428
|
*/
|
|
@@ -531,7 +533,7 @@ export interface WebhookCreateParams {
|
|
|
531
533
|
/**
|
|
532
534
|
* Body param: Array of event topics to subscribe to
|
|
533
535
|
*/
|
|
534
|
-
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted'>;
|
|
536
|
+
topics: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted' | 'audit_log.created'>;
|
|
535
537
|
/**
|
|
536
538
|
* Body param: Webhook endpoint URL (must be HTTPS)
|
|
537
539
|
*/
|
|
@@ -577,7 +579,7 @@ export interface WebhookUpdateParams {
|
|
|
577
579
|
/**
|
|
578
580
|
* Body param: Array of event topics to subscribe to
|
|
579
581
|
*/
|
|
580
|
-
topics?: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted'>;
|
|
582
|
+
topics?: Array<'post.created' | 'post.updated' | 'post.deleted' | 'post.voted' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted' | 'changelog.published' | 'comment.created' | 'comment.updated' | 'comment.deleted' | 'conversation.user.created' | 'conversation.user.replied' | 'conversation.admin.replied' | 'conversation.admin.closed' | 'conversation.handover_requested' | 'conversation.admin.assigned' | 'conversation.admin.noted' | 'conversation.admin.snoozed' | 'conversation.admin.unsnoozed' | 'conversation.admin.opened' | 'conversation.priority.updated' | 'conversation.deleted' | 'conversation.contact.attached' | 'conversation.contact.detached' | 'conversation.read' | 'conversation_part.redacted' | 'audit_log.created'>;
|
|
581
583
|
/**
|
|
582
584
|
* Body param: Webhook endpoint URL (must be HTTPS)
|
|
583
585
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/resources/webhooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,8BAA2B;AAEpF,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;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AAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/webhooks.js
CHANGED
|
@@ -114,6 +114,8 @@ class Webhooks extends resource_1.APIResource {
|
|
|
114
114
|
* - `comment.created` - When a comment is created
|
|
115
115
|
* - `comment.updated` - When a comment is updated
|
|
116
116
|
* - `comment.deleted` - When a comment is deleted
|
|
117
|
+
* - `audit_log.created` - When an audit log event is recorded (requires Enterprise
|
|
118
|
+
* plan)
|
|
117
119
|
*
|
|
118
120
|
* ### Response
|
|
119
121
|
*
|