featurebase-node 0.15.2 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/client.d.mts +16 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -4
- package/client.d.ts.map +1 -1
- package/client.js +12 -0
- package/client.js.map +1 -1
- package/client.mjs +12 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/away-reasons.d.mts +37 -0
- package/resources/away-reasons.d.mts.map +1 -0
- package/resources/away-reasons.d.ts +37 -0
- package/resources/away-reasons.d.ts.map +1 -0
- package/resources/away-reasons.js +31 -0
- package/resources/away-reasons.js.map +1 -0
- package/resources/away-reasons.mjs +27 -0
- package/resources/away-reasons.mjs.map +1 -0
- package/resources/feedback/feedback.d.mts +2 -2
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +2 -2
- package/resources/feedback/feedback.d.ts.map +1 -1
- package/resources/feedback/feedback.js.map +1 -1
- package/resources/feedback/feedback.mjs.map +1 -1
- package/resources/feedback/index.d.mts +1 -1
- package/resources/feedback/index.d.mts.map +1 -1
- package/resources/feedback/index.d.ts +1 -1
- package/resources/feedback/index.d.ts.map +1 -1
- package/resources/feedback/index.js.map +1 -1
- package/resources/feedback/index.mjs.map +1 -1
- package/resources/feedback/posts/index.d.mts +1 -1
- package/resources/feedback/posts/index.d.mts.map +1 -1
- package/resources/feedback/posts/index.d.ts +1 -1
- package/resources/feedback/posts/index.d.ts.map +1 -1
- package/resources/feedback/posts/index.js.map +1 -1
- package/resources/feedback/posts/index.mjs.map +1 -1
- package/resources/feedback/posts/posts.d.mts +123 -161
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +123 -161
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- 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 +151 -4
- package/resources/organization/admins.d.mts.map +1 -1
- package/resources/organization/admins.d.ts +151 -4
- package/resources/organization/admins.d.ts.map +1 -1
- package/resources/organization/admins.js +58 -3
- package/resources/organization/admins.js.map +1 -1
- package/resources/organization/admins.mjs +58 -3
- package/resources/organization/admins.mjs.map +1 -1
- package/resources/organization/index.d.mts +2 -2
- package/resources/organization/index.d.mts.map +1 -1
- package/resources/organization/index.d.ts +2 -2
- package/resources/organization/index.d.ts.map +1 -1
- package/resources/organization/index.js.map +1 -1
- package/resources/organization/index.mjs.map +1 -1
- package/resources/organization/organization.d.mts +4 -4
- package/resources/organization/organization.d.mts.map +1 -1
- package/resources/organization/organization.d.ts +4 -4
- package/resources/organization/organization.d.ts.map +1 -1
- package/resources/organization/organization.js.map +1 -1
- package/resources/organization/organization.mjs +1 -1
- package/resources/organization/organization.mjs.map +1 -1
- package/resources/organization/teams.d.mts +34 -4
- package/resources/organization/teams.d.mts.map +1 -1
- package/resources/organization/teams.d.ts +34 -4
- package/resources/organization/teams.d.ts.map +1 -1
- package/resources/organization/teams.js +18 -3
- package/resources/organization/teams.js.map +1 -1
- package/resources/organization/teams.mjs +18 -3
- package/resources/organization/teams.mjs.map +1 -1
- package/resources/reports.d.mts +45 -1
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +45 -1
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +35 -0
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +35 -0
- package/resources/reports.mjs.map +1 -1
- package/resources/training-data/index.d.mts +1 -1
- package/resources/training-data/index.d.mts.map +1 -1
- package/resources/training-data/index.d.ts +1 -1
- package/resources/training-data/index.d.ts.map +1 -1
- package/resources/training-data/index.js.map +1 -1
- package/resources/training-data/index.mjs.map +1 -1
- package/resources/training-data/training-data.d.mts +66 -161
- package/resources/training-data/training-data.d.mts.map +1 -1
- package/resources/training-data/training-data.d.ts +66 -161
- package/resources/training-data/training-data.d.ts.map +1 -1
- package/resources/training-data/training-data.js.map +1 -1
- package/resources/training-data/training-data.mjs.map +1 -1
- package/resources/workload.d.mts +103 -0
- package/resources/workload.d.mts.map +1 -0
- package/resources/workload.d.ts +103 -0
- package/resources/workload.d.ts.map +1 -0
- package/resources/workload.js +32 -0
- package/resources/workload.js.map +1 -0
- package/resources/workload.mjs +28 -0
- package/resources/workload.mjs.map +1 -0
- package/src/client.ts +34 -0
- package/src/resources/away-reasons.ts +68 -0
- package/src/resources/feedback/feedback.ts +4 -0
- package/src/resources/feedback/index.ts +2 -0
- package/src/resources/feedback/posts/index.ts +2 -0
- package/src/resources/feedback/posts/posts.ts +154 -204
- package/src/resources/index.ts +9 -0
- package/src/resources/organization/admins.ts +254 -3
- package/src/resources/organization/index.ts +8 -0
- package/src/resources/organization/organization.ts +23 -1
- package/src/resources/organization/teams.ts +69 -3
- package/src/resources/reports.ts +70 -0
- package/src/resources/training-data/index.ts +1 -0
- package/src/resources/training-data/training-data.ts +77 -193
- package/src/resources/workload.ts +179 -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
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as AdminsAPI from './admins';
|
|
4
5
|
import { APIPromise } from '../../core/api-promise';
|
|
5
6
|
import { buildHeaders } from '../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
9
|
-
/**
|
|
10
|
-
* Team members who manage your Featurebase organization. Admins have roles that define their permissions.
|
|
11
|
-
*/
|
|
12
10
|
export class Admins extends APIResource {
|
|
13
11
|
/**
|
|
14
12
|
* Retrieves a single admin by their unique identifier.
|
|
@@ -179,6 +177,75 @@ export class Admins extends APIResource {
|
|
|
179
177
|
]),
|
|
180
178
|
});
|
|
181
179
|
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Updates the admin capacity mode or paused state. mode can be inherit, custom, or
|
|
183
|
+
* unlimited. custom requires limit. Omitted fields keep their current value.
|
|
184
|
+
*/
|
|
185
|
+
updateAssignmentLimit(
|
|
186
|
+
id: string,
|
|
187
|
+
params: AdminUpdateAssignmentLimitParams,
|
|
188
|
+
options?: RequestOptions,
|
|
189
|
+
): APIPromise<AssignmentLimit> {
|
|
190
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
191
|
+
return this._client.patch(path`/v2/admins/${id}/assignment-limit`, {
|
|
192
|
+
body,
|
|
193
|
+
...options,
|
|
194
|
+
headers: buildHeaders([
|
|
195
|
+
{
|
|
196
|
+
...(featurebaseVersion?.toString() != null ?
|
|
197
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
198
|
+
: undefined),
|
|
199
|
+
},
|
|
200
|
+
options?.headers,
|
|
201
|
+
]),
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Updates an admin away state. awayReasonId uses a stable managed-reason ID. Omit
|
|
207
|
+
* it to preserve the current reason, or send null to clear the reason.
|
|
208
|
+
*/
|
|
209
|
+
updateAway(
|
|
210
|
+
id: string,
|
|
211
|
+
params: AdminUpdateAwayParams,
|
|
212
|
+
options?: RequestOptions,
|
|
213
|
+
): APIPromise<AdminAvailability> {
|
|
214
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
215
|
+
return this._client.patch(path`/v2/admins/${id}/away`, {
|
|
216
|
+
body,
|
|
217
|
+
...options,
|
|
218
|
+
headers: buildHeaders([
|
|
219
|
+
{
|
|
220
|
+
...(featurebaseVersion?.toString() != null ?
|
|
221
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
222
|
+
: undefined),
|
|
223
|
+
},
|
|
224
|
+
options?.headers,
|
|
225
|
+
]),
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Atomically updates away state or assignment limits for up to 50 admins. One
|
|
231
|
+
* request performs one operation type. Assignment-limit operations require an
|
|
232
|
+
* explicit paused value.
|
|
233
|
+
*/
|
|
234
|
+
updateBulk(params: AdminUpdateBulkParams, options?: RequestOptions): APIPromise<AdminUpdateBulkResponse> {
|
|
235
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
236
|
+
return this._client.patch('/v2/admins/bulk', {
|
|
237
|
+
body,
|
|
238
|
+
...options,
|
|
239
|
+
headers: buildHeaders([
|
|
240
|
+
{
|
|
241
|
+
...(featurebaseVersion?.toString() != null ?
|
|
242
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
243
|
+
: undefined),
|
|
244
|
+
},
|
|
245
|
+
options?.headers,
|
|
246
|
+
]),
|
|
247
|
+
});
|
|
248
|
+
}
|
|
182
249
|
}
|
|
183
250
|
|
|
184
251
|
export interface Admin {
|
|
@@ -213,6 +280,46 @@ export interface Admin {
|
|
|
213
280
|
roleId?: string;
|
|
214
281
|
}
|
|
215
282
|
|
|
283
|
+
export interface AdminAvailability {
|
|
284
|
+
adminId: string;
|
|
285
|
+
|
|
286
|
+
automatic: boolean;
|
|
287
|
+
|
|
288
|
+
away: boolean;
|
|
289
|
+
|
|
290
|
+
changedAt: string | null;
|
|
291
|
+
|
|
292
|
+
lastActiveAt: string | null;
|
|
293
|
+
|
|
294
|
+
object: 'admin_availability';
|
|
295
|
+
|
|
296
|
+
reason: AdminAvailability.Reason | null;
|
|
297
|
+
|
|
298
|
+
reassignReplies: boolean;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export namespace AdminAvailability {
|
|
302
|
+
export interface Reason {
|
|
303
|
+
id: string | null;
|
|
304
|
+
|
|
305
|
+
label: string;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface AssignmentLimit {
|
|
310
|
+
adminId: string;
|
|
311
|
+
|
|
312
|
+
effectiveLimit: number | null;
|
|
313
|
+
|
|
314
|
+
limit: number | null;
|
|
315
|
+
|
|
316
|
+
mode: 'inherit' | 'custom' | 'unlimited';
|
|
317
|
+
|
|
318
|
+
object: 'assignment_limit';
|
|
319
|
+
|
|
320
|
+
paused: boolean;
|
|
321
|
+
}
|
|
322
|
+
|
|
216
323
|
export interface AdminListResponse {
|
|
217
324
|
/**
|
|
218
325
|
* Array of admins
|
|
@@ -545,6 +652,28 @@ export namespace AdminListRolesResponse {
|
|
|
545
652
|
}
|
|
546
653
|
}
|
|
547
654
|
|
|
655
|
+
export interface AdminUpdateBulkResponse {
|
|
656
|
+
data: Array<AdminUpdateBulkResponse.Data>;
|
|
657
|
+
|
|
658
|
+
object: 'bulk_result';
|
|
659
|
+
|
|
660
|
+
operation: 'away' | 'assignment_limit';
|
|
661
|
+
|
|
662
|
+
updatedCount: number;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export namespace AdminUpdateBulkResponse {
|
|
666
|
+
export interface Data {
|
|
667
|
+
adminId: string;
|
|
668
|
+
|
|
669
|
+
assignmentLimit: AdminsAPI.AssignmentLimit;
|
|
670
|
+
|
|
671
|
+
availability: AdminsAPI.AdminAvailability;
|
|
672
|
+
|
|
673
|
+
object: 'admin_workload_state';
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
548
677
|
export interface AdminRetrieveParams {
|
|
549
678
|
/**
|
|
550
679
|
* API version for this request. Defaults to your organization's configured API
|
|
@@ -569,13 +698,135 @@ export interface AdminListRolesParams {
|
|
|
569
698
|
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
570
699
|
}
|
|
571
700
|
|
|
701
|
+
export interface AdminUpdateAssignmentLimitParams {
|
|
702
|
+
/**
|
|
703
|
+
* Body param
|
|
704
|
+
*/
|
|
705
|
+
limit?: number;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Body param
|
|
709
|
+
*/
|
|
710
|
+
mode?: 'inherit' | 'custom' | 'unlimited';
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Body param
|
|
714
|
+
*/
|
|
715
|
+
paused?: boolean;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
719
|
+
* configured API version if not specified.
|
|
720
|
+
*/
|
|
721
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export interface AdminUpdateAwayParams {
|
|
725
|
+
/**
|
|
726
|
+
* Body param
|
|
727
|
+
*/
|
|
728
|
+
enabled: boolean;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Body param
|
|
732
|
+
*/
|
|
733
|
+
awayReasonId?: string | null;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Body param
|
|
737
|
+
*/
|
|
738
|
+
reassignReplies?: boolean;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
742
|
+
* configured API version if not specified.
|
|
743
|
+
*/
|
|
744
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export type AdminUpdateBulkParams = AdminUpdateBulkParams.Variant0 | AdminUpdateBulkParams.Variant1;
|
|
748
|
+
|
|
749
|
+
export declare namespace AdminUpdateBulkParams {
|
|
750
|
+
export interface Variant0 {
|
|
751
|
+
/**
|
|
752
|
+
* Body param
|
|
753
|
+
*/
|
|
754
|
+
adminIds: Array<string>;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Body param
|
|
758
|
+
*/
|
|
759
|
+
enabled: boolean;
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Body param
|
|
763
|
+
*/
|
|
764
|
+
operation: 'away';
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Body param
|
|
768
|
+
*/
|
|
769
|
+
awayReasonId?: string | null;
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Body param
|
|
773
|
+
*/
|
|
774
|
+
reassignReplies?: boolean;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
778
|
+
* configured API version if not specified.
|
|
779
|
+
*/
|
|
780
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
export interface Variant1 {
|
|
784
|
+
/**
|
|
785
|
+
* Body param
|
|
786
|
+
*/
|
|
787
|
+
adminIds: Array<string>;
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Body param
|
|
791
|
+
*/
|
|
792
|
+
operation: 'assignment_limit';
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Body param
|
|
796
|
+
*/
|
|
797
|
+
paused: boolean;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Body param
|
|
801
|
+
*/
|
|
802
|
+
limit?: number;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Body param
|
|
806
|
+
*/
|
|
807
|
+
mode?: 'inherit' | 'custom' | 'unlimited';
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
811
|
+
* configured API version if not specified.
|
|
812
|
+
*/
|
|
813
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
572
817
|
export declare namespace Admins {
|
|
573
818
|
export {
|
|
574
819
|
type Admin as Admin,
|
|
820
|
+
type AdminAvailability as AdminAvailability,
|
|
821
|
+
type AssignmentLimit as AssignmentLimit,
|
|
575
822
|
type AdminListResponse as AdminListResponse,
|
|
576
823
|
type AdminListRolesResponse as AdminListRolesResponse,
|
|
824
|
+
type AdminUpdateBulkResponse as AdminUpdateBulkResponse,
|
|
577
825
|
type AdminRetrieveParams as AdminRetrieveParams,
|
|
578
826
|
type AdminListParams as AdminListParams,
|
|
579
827
|
type AdminListRolesParams as AdminListRolesParams,
|
|
828
|
+
type AdminUpdateAssignmentLimitParams as AdminUpdateAssignmentLimitParams,
|
|
829
|
+
type AdminUpdateAwayParams as AdminUpdateAwayParams,
|
|
830
|
+
type AdminUpdateBulkParams as AdminUpdateBulkParams,
|
|
580
831
|
};
|
|
581
832
|
}
|
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
export {
|
|
4
4
|
Admins,
|
|
5
5
|
type Admin,
|
|
6
|
+
type AdminAvailability,
|
|
7
|
+
type AssignmentLimit,
|
|
6
8
|
type AdminListResponse,
|
|
7
9
|
type AdminListRolesResponse,
|
|
10
|
+
type AdminUpdateBulkResponse,
|
|
8
11
|
type AdminRetrieveParams,
|
|
9
12
|
type AdminListParams,
|
|
10
13
|
type AdminListRolesParams,
|
|
14
|
+
type AdminUpdateAssignmentLimitParams,
|
|
15
|
+
type AdminUpdateAwayParams,
|
|
16
|
+
type AdminUpdateBulkParams,
|
|
11
17
|
} from './admins';
|
|
12
18
|
export {
|
|
13
19
|
Brands,
|
|
@@ -21,6 +27,8 @@ export {
|
|
|
21
27
|
Teams,
|
|
22
28
|
type Team,
|
|
23
29
|
type TeamListResponse,
|
|
30
|
+
type TeamRetrieveMetricsResponse,
|
|
24
31
|
type TeamRetrieveParams,
|
|
25
32
|
type TeamListParams,
|
|
33
|
+
type TeamRetrieveMetricsParams,
|
|
26
34
|
} from './teams';
|
|
@@ -4,17 +4,31 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as AdminsAPI from './admins';
|
|
5
5
|
import {
|
|
6
6
|
Admin,
|
|
7
|
+
AdminAvailability,
|
|
7
8
|
AdminListParams,
|
|
8
9
|
AdminListResponse,
|
|
9
10
|
AdminListRolesParams,
|
|
10
11
|
AdminListRolesResponse,
|
|
11
12
|
AdminRetrieveParams,
|
|
13
|
+
AdminUpdateAssignmentLimitParams,
|
|
14
|
+
AdminUpdateAwayParams,
|
|
15
|
+
AdminUpdateBulkParams,
|
|
16
|
+
AdminUpdateBulkResponse,
|
|
12
17
|
Admins,
|
|
18
|
+
AssignmentLimit,
|
|
13
19
|
} from './admins';
|
|
14
20
|
import * as BrandsAPI from './brands';
|
|
15
21
|
import { Brand, BrandListParams, BrandRetrieveParams, Brands, BrandsCursorPage } from './brands';
|
|
16
22
|
import * as TeamsAPI from './teams';
|
|
17
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
Team,
|
|
25
|
+
TeamListParams,
|
|
26
|
+
TeamListResponse,
|
|
27
|
+
TeamRetrieveMetricsParams,
|
|
28
|
+
TeamRetrieveMetricsResponse,
|
|
29
|
+
TeamRetrieveParams,
|
|
30
|
+
Teams,
|
|
31
|
+
} from './teams';
|
|
18
32
|
|
|
19
33
|
export class Organization extends APIResource {
|
|
20
34
|
admins: AdminsAPI.Admins = new AdminsAPI.Admins(this._client);
|
|
@@ -30,19 +44,27 @@ export declare namespace Organization {
|
|
|
30
44
|
export {
|
|
31
45
|
Admins as Admins,
|
|
32
46
|
type Admin as Admin,
|
|
47
|
+
type AdminAvailability as AdminAvailability,
|
|
48
|
+
type AssignmentLimit as AssignmentLimit,
|
|
33
49
|
type AdminListResponse as AdminListResponse,
|
|
34
50
|
type AdminListRolesResponse as AdminListRolesResponse,
|
|
51
|
+
type AdminUpdateBulkResponse as AdminUpdateBulkResponse,
|
|
35
52
|
type AdminRetrieveParams as AdminRetrieveParams,
|
|
36
53
|
type AdminListParams as AdminListParams,
|
|
37
54
|
type AdminListRolesParams as AdminListRolesParams,
|
|
55
|
+
type AdminUpdateAssignmentLimitParams as AdminUpdateAssignmentLimitParams,
|
|
56
|
+
type AdminUpdateAwayParams as AdminUpdateAwayParams,
|
|
57
|
+
type AdminUpdateBulkParams as AdminUpdateBulkParams,
|
|
38
58
|
};
|
|
39
59
|
|
|
40
60
|
export {
|
|
41
61
|
Teams as Teams,
|
|
42
62
|
type Team as Team,
|
|
43
63
|
type TeamListResponse as TeamListResponse,
|
|
64
|
+
type TeamRetrieveMetricsResponse as TeamRetrieveMetricsResponse,
|
|
44
65
|
type TeamRetrieveParams as TeamRetrieveParams,
|
|
45
66
|
type TeamListParams as TeamListParams,
|
|
67
|
+
type TeamRetrieveMetricsParams as TeamRetrieveMetricsParams,
|
|
46
68
|
};
|
|
47
69
|
|
|
48
70
|
export {
|
|
@@ -6,9 +6,6 @@ import { buildHeaders } from '../../internal/headers';
|
|
|
6
6
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
7
|
import { path } from '../../internal/utils/path';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Teams are groups within your Featurebase organization. Use this endpoint to list and retrieve team information for conversation assignment and organization management.
|
|
11
|
-
*/
|
|
12
9
|
export class Teams extends APIResource {
|
|
13
10
|
/**
|
|
14
11
|
* Retrieves a single team by its Featurebase ID.
|
|
@@ -132,6 +129,29 @@ export class Teams extends APIResource {
|
|
|
132
129
|
]),
|
|
133
130
|
});
|
|
134
131
|
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Returns Intercom-style per-admin team metrics with open, snoozed, waiting, idle,
|
|
135
|
+
* capacity limit, pause, and away state. Results use cursor pagination.
|
|
136
|
+
*/
|
|
137
|
+
retrieveMetrics(
|
|
138
|
+
id: string,
|
|
139
|
+
params: TeamRetrieveMetricsParams | null | undefined = {},
|
|
140
|
+
options?: RequestOptions,
|
|
141
|
+
): APIPromise<TeamRetrieveMetricsResponse> {
|
|
142
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
143
|
+
return this._client.get(path`/v2/teams/${id}/metrics`, {
|
|
144
|
+
...options,
|
|
145
|
+
headers: buildHeaders([
|
|
146
|
+
{
|
|
147
|
+
...(featurebaseVersion?.toString() != null ?
|
|
148
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
149
|
+
: undefined),
|
|
150
|
+
},
|
|
151
|
+
options?.headers,
|
|
152
|
+
]),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
135
155
|
}
|
|
136
156
|
|
|
137
157
|
export interface Team {
|
|
@@ -195,6 +215,42 @@ export interface TeamListResponse {
|
|
|
195
215
|
object: 'list';
|
|
196
216
|
}
|
|
197
217
|
|
|
218
|
+
export interface TeamRetrieveMetricsResponse {
|
|
219
|
+
data: Array<TeamRetrieveMetricsResponse.Data>;
|
|
220
|
+
|
|
221
|
+
generatedAt: string;
|
|
222
|
+
|
|
223
|
+
nextCursor: string | null;
|
|
224
|
+
|
|
225
|
+
object: 'team_metrics';
|
|
226
|
+
|
|
227
|
+
teamId: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export namespace TeamRetrieveMetricsResponse {
|
|
231
|
+
export interface Data {
|
|
232
|
+
adminId: string;
|
|
233
|
+
|
|
234
|
+
assignmentLimit: number | null;
|
|
235
|
+
|
|
236
|
+
atCapacity: boolean;
|
|
237
|
+
|
|
238
|
+
away: boolean;
|
|
239
|
+
|
|
240
|
+
idleCount: number;
|
|
241
|
+
|
|
242
|
+
object: 'team_admin_metrics';
|
|
243
|
+
|
|
244
|
+
openCount: number;
|
|
245
|
+
|
|
246
|
+
paused: boolean;
|
|
247
|
+
|
|
248
|
+
snoozedCount: number;
|
|
249
|
+
|
|
250
|
+
waitingCount: number;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
198
254
|
export interface TeamRetrieveParams {
|
|
199
255
|
/**
|
|
200
256
|
* API version for this request. Defaults to your organization's configured API
|
|
@@ -211,11 +267,21 @@ export interface TeamListParams {
|
|
|
211
267
|
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
212
268
|
}
|
|
213
269
|
|
|
270
|
+
export interface TeamRetrieveMetricsParams {
|
|
271
|
+
/**
|
|
272
|
+
* API version for this request. Defaults to your organization's configured API
|
|
273
|
+
* version if not specified.
|
|
274
|
+
*/
|
|
275
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
276
|
+
}
|
|
277
|
+
|
|
214
278
|
export declare namespace Teams {
|
|
215
279
|
export {
|
|
216
280
|
type Team as Team,
|
|
217
281
|
type TeamListResponse as TeamListResponse,
|
|
282
|
+
type TeamRetrieveMetricsResponse as TeamRetrieveMetricsResponse,
|
|
218
283
|
type TeamRetrieveParams as TeamRetrieveParams,
|
|
219
284
|
type TeamListParams as TeamListParams,
|
|
285
|
+
type TeamRetrieveMetricsParams as TeamRetrieveMetricsParams,
|
|
220
286
|
};
|
|
221
287
|
}
|
package/src/resources/reports.ts
CHANGED
|
@@ -64,6 +64,45 @@ export class Reports extends APIResource {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Returns the filter attribute IDs supported by the selected metric and optional
|
|
69
|
+
* grouping route.
|
|
70
|
+
*
|
|
71
|
+
* Use this operation before constructing metric-level filters. It applies the same
|
|
72
|
+
* routing rules as the dashboard and prevents clients from offering filters that
|
|
73
|
+
* the selected metric, group, or segment path cannot execute.
|
|
74
|
+
*
|
|
75
|
+
* ### Version Availability
|
|
76
|
+
*
|
|
77
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer, and
|
|
78
|
+
* only for workspaces with the Reports product enabled (404 otherwise).
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const response = await client.reports.filterCapabilities({
|
|
83
|
+
* metricId: 'x',
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
filterCapabilities(
|
|
88
|
+
params: ReportFilterCapabilitiesParams,
|
|
89
|
+
options?: RequestOptions,
|
|
90
|
+
): APIPromise<ReportFilterCapabilitiesResponse> {
|
|
91
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
92
|
+
return this._client.post('/v2/reports/filter-capabilities', {
|
|
93
|
+
body,
|
|
94
|
+
...options,
|
|
95
|
+
headers: buildHeaders([
|
|
96
|
+
{
|
|
97
|
+
...(featurebaseVersion?.toString() != null ?
|
|
98
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
99
|
+
: undefined),
|
|
100
|
+
},
|
|
101
|
+
options?.headers,
|
|
102
|
+
]),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
67
106
|
/**
|
|
68
107
|
* Returns the reporting catalog: every dataset available to your workspace with
|
|
69
108
|
* its metrics and attributes.
|
|
@@ -753,6 +792,12 @@ export namespace ReportDrillInResponse {
|
|
|
753
792
|
}
|
|
754
793
|
}
|
|
755
794
|
|
|
795
|
+
export interface ReportFilterCapabilitiesResponse {
|
|
796
|
+
object: 'report_metric_filter_capabilities';
|
|
797
|
+
|
|
798
|
+
supportedFilterAttributeIds: Array<string>;
|
|
799
|
+
}
|
|
800
|
+
|
|
756
801
|
export interface ReportListDatasetsResponse {
|
|
757
802
|
data: Array<ReportDataset>;
|
|
758
803
|
|
|
@@ -1165,6 +1210,29 @@ export namespace ReportDrillInParams {
|
|
|
1165
1210
|
}
|
|
1166
1211
|
}
|
|
1167
1212
|
|
|
1213
|
+
export interface ReportFilterCapabilitiesParams {
|
|
1214
|
+
/**
|
|
1215
|
+
* Body param
|
|
1216
|
+
*/
|
|
1217
|
+
metricId: string;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Body param
|
|
1221
|
+
*/
|
|
1222
|
+
groupBy?: string;
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* Body param
|
|
1226
|
+
*/
|
|
1227
|
+
segmentBy?: string;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
1231
|
+
* configured API version if not specified.
|
|
1232
|
+
*/
|
|
1233
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1168
1236
|
export interface ReportListDatasetsParams {
|
|
1169
1237
|
/**
|
|
1170
1238
|
* API version for this request. Defaults to your organization's configured API
|
|
@@ -1377,10 +1445,12 @@ export declare namespace Reports {
|
|
|
1377
1445
|
type ReportSegmentDatum as ReportSegmentDatum,
|
|
1378
1446
|
type ReportTimeSeriesDatum as ReportTimeSeriesDatum,
|
|
1379
1447
|
type ReportDrillInResponse as ReportDrillInResponse,
|
|
1448
|
+
type ReportFilterCapabilitiesResponse as ReportFilterCapabilitiesResponse,
|
|
1380
1449
|
type ReportListDatasetsResponse as ReportListDatasetsResponse,
|
|
1381
1450
|
type ReportLookupFilterValuesResponse as ReportLookupFilterValuesResponse,
|
|
1382
1451
|
type ReportQueryResponse as ReportQueryResponse,
|
|
1383
1452
|
type ReportDrillInParams as ReportDrillInParams,
|
|
1453
|
+
type ReportFilterCapabilitiesParams as ReportFilterCapabilitiesParams,
|
|
1384
1454
|
type ReportListDatasetsParams as ReportListDatasetsParams,
|
|
1385
1455
|
type ReportLookupFilterValuesParams as ReportLookupFilterValuesParams,
|
|
1386
1456
|
type ReportQueryParams as ReportQueryParams,
|