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,4 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as TrainingDataAPI from "./training-data.js";
|
|
2
3
|
import * as FilesAPI from "./files.js";
|
|
3
4
|
import { FileCreateParams, FileDeleteParams, FileDeleteResponse, FileListParams, FileRetrieveParams, FileUpdateParams, Files, TrainingFile, TrainingFilesCursorPage } from "./files.js";
|
|
4
5
|
import * as QnaAPI from "./qna.js";
|
|
@@ -64,13 +65,66 @@ export declare class TrainingData extends APIResource {
|
|
|
64
65
|
*/
|
|
65
66
|
search(params: TrainingDataSearchParams, options?: RequestOptions): APIPromise<KnowledgeSearch>;
|
|
66
67
|
}
|
|
68
|
+
export interface KnowledgeMatchCandidate {
|
|
69
|
+
/**
|
|
70
|
+
* ID of the existing item
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* The item's source identity, for training files and Q&A
|
|
75
|
+
*/
|
|
76
|
+
externalId: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* What kind of knowledge item matched: a Q&A entry, a training file / crawled
|
|
79
|
+
* page, or a live help-center article.
|
|
80
|
+
*/
|
|
81
|
+
kind: 'qna' | 'training_file' | 'help_center_article';
|
|
82
|
+
/**
|
|
83
|
+
* Question variants, for Q&A entries
|
|
84
|
+
*/
|
|
85
|
+
questions: Array<string> | null;
|
|
86
|
+
/**
|
|
87
|
+
* Q&A revision compared by the judge; null for other kinds. Use with PATCH
|
|
88
|
+
* expectedRevision.
|
|
89
|
+
*/
|
|
90
|
+
revision: number | null;
|
|
91
|
+
/**
|
|
92
|
+
* Heading breadcrumb of the matching section, for training files
|
|
93
|
+
*/
|
|
94
|
+
section: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* Cosine similarity between the query and item. Calibrate any threshold using
|
|
97
|
+
* representative examples; it is not a correctness or contradiction score. `null`
|
|
98
|
+
* when the item was found by keywords only. Arrays are already ordered closest
|
|
99
|
+
* first.
|
|
100
|
+
*/
|
|
101
|
+
similarity: number | null;
|
|
102
|
+
/**
|
|
103
|
+
* The item's `source` label, for Q&A entries and training files
|
|
104
|
+
*/
|
|
105
|
+
source: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Excerpt of the existing content the judge compared against (Q&A answer, matching
|
|
108
|
+
* document section, or article body), up to 1200 characters plus an ellipsis when
|
|
109
|
+
* cut.
|
|
110
|
+
*/
|
|
111
|
+
text: string;
|
|
112
|
+
/**
|
|
113
|
+
* Title of the existing item
|
|
114
|
+
*/
|
|
115
|
+
title: string;
|
|
116
|
+
/**
|
|
117
|
+
* Public URL of the item when it has one
|
|
118
|
+
*/
|
|
119
|
+
url: string | null;
|
|
120
|
+
}
|
|
67
121
|
export interface KnowledgeSearch {
|
|
68
122
|
/**
|
|
69
123
|
* Existing items closest to the query, best first, at most `topK`. `text` is an
|
|
70
124
|
* excerpt focused on the query; `section` is the heading path inside a file when
|
|
71
125
|
* known.
|
|
72
126
|
*/
|
|
73
|
-
candidates: Array<
|
|
127
|
+
candidates: Array<KnowledgeMatchCandidate>;
|
|
74
128
|
/**
|
|
75
129
|
* Object type identifier
|
|
76
130
|
*/
|
|
@@ -85,59 +139,6 @@ export interface KnowledgeSearch {
|
|
|
85
139
|
timings: KnowledgeSearch.Timings;
|
|
86
140
|
}
|
|
87
141
|
export declare namespace KnowledgeSearch {
|
|
88
|
-
interface Candidate {
|
|
89
|
-
/**
|
|
90
|
-
* ID of the existing item
|
|
91
|
-
*/
|
|
92
|
-
id: string;
|
|
93
|
-
/**
|
|
94
|
-
* The item's source identity, for training files and Q&A
|
|
95
|
-
*/
|
|
96
|
-
externalId: string | null;
|
|
97
|
-
/**
|
|
98
|
-
* What kind of knowledge item matched: a Q&A entry, a training file / crawled
|
|
99
|
-
* page, or a live help-center article.
|
|
100
|
-
*/
|
|
101
|
-
kind: 'qna' | 'training_file' | 'help_center_article';
|
|
102
|
-
/**
|
|
103
|
-
* Question variants, for Q&A entries
|
|
104
|
-
*/
|
|
105
|
-
questions: Array<string> | null;
|
|
106
|
-
/**
|
|
107
|
-
* Q&A revision compared by the judge; null for other kinds. Use with PATCH
|
|
108
|
-
* expectedRevision.
|
|
109
|
-
*/
|
|
110
|
-
revision: number | null;
|
|
111
|
-
/**
|
|
112
|
-
* Heading breadcrumb of the matching section, for training files
|
|
113
|
-
*/
|
|
114
|
-
section: string | null;
|
|
115
|
-
/**
|
|
116
|
-
* Cosine similarity between the query and item. Calibrate any threshold using
|
|
117
|
-
* representative examples; it is not a correctness or contradiction score. `null`
|
|
118
|
-
* when the item was found by keywords only. Arrays are already ordered closest
|
|
119
|
-
* first.
|
|
120
|
-
*/
|
|
121
|
-
similarity: number | null;
|
|
122
|
-
/**
|
|
123
|
-
* The item's `source` label, for Q&A entries and training files
|
|
124
|
-
*/
|
|
125
|
-
source: string | null;
|
|
126
|
-
/**
|
|
127
|
-
* Excerpt of the existing content the judge compared against (Q&A answer, matching
|
|
128
|
-
* document section, or article body), up to 1200 characters plus an ellipsis when
|
|
129
|
-
* cut.
|
|
130
|
-
*/
|
|
131
|
-
text: string;
|
|
132
|
-
/**
|
|
133
|
-
* Title of the existing item
|
|
134
|
-
*/
|
|
135
|
-
title: string;
|
|
136
|
-
/**
|
|
137
|
-
* Public URL of the item when it has one
|
|
138
|
-
*/
|
|
139
|
-
url: string | null;
|
|
140
|
-
}
|
|
141
142
|
/**
|
|
142
143
|
* Where the time went
|
|
143
144
|
*/
|
|
@@ -167,7 +168,7 @@ export interface Oracle {
|
|
|
167
168
|
* Retrieved items and the addressed entry (first when present), at most 10.
|
|
168
169
|
* Excerpts are partial evidence.
|
|
169
170
|
*/
|
|
170
|
-
candidates: Array<
|
|
171
|
+
candidates: Array<KnowledgeMatchCandidate>;
|
|
171
172
|
/**
|
|
172
173
|
* A candidate or text budget limited verification (including clipped proposed
|
|
173
174
|
* answers or Q&A answers). This yields unclear unless a contradiction was already
|
|
@@ -194,6 +195,10 @@ export interface Oracle {
|
|
|
194
195
|
* One or two sentences explaining the action, from the judge when it ran
|
|
195
196
|
*/
|
|
196
197
|
reason: string;
|
|
198
|
+
/**
|
|
199
|
+
* The existing item the action refers to, with its excerpt; `null` for `create` /
|
|
200
|
+
* `update_target`. For a `different` verdict the closest miss is `candidates[0]`.
|
|
201
|
+
*/
|
|
197
202
|
target: Oracle.Target;
|
|
198
203
|
/**
|
|
199
204
|
* Where the time went
|
|
@@ -209,59 +214,6 @@ export interface Oracle {
|
|
|
209
214
|
verdict: 'same_topic' | 'contradicts' | 'different' | 'unclear' | 'no_match';
|
|
210
215
|
}
|
|
211
216
|
export declare namespace Oracle {
|
|
212
|
-
interface Candidate {
|
|
213
|
-
/**
|
|
214
|
-
* ID of the existing item
|
|
215
|
-
*/
|
|
216
|
-
id: string;
|
|
217
|
-
/**
|
|
218
|
-
* The item's source identity, for training files and Q&A
|
|
219
|
-
*/
|
|
220
|
-
externalId: string | null;
|
|
221
|
-
/**
|
|
222
|
-
* What kind of knowledge item matched: a Q&A entry, a training file / crawled
|
|
223
|
-
* page, or a live help-center article.
|
|
224
|
-
*/
|
|
225
|
-
kind: 'qna' | 'training_file' | 'help_center_article';
|
|
226
|
-
/**
|
|
227
|
-
* Question variants, for Q&A entries
|
|
228
|
-
*/
|
|
229
|
-
questions: Array<string> | null;
|
|
230
|
-
/**
|
|
231
|
-
* Q&A revision compared by the judge; null for other kinds. Use with PATCH
|
|
232
|
-
* expectedRevision.
|
|
233
|
-
*/
|
|
234
|
-
revision: number | null;
|
|
235
|
-
/**
|
|
236
|
-
* Heading breadcrumb of the matching section, for training files
|
|
237
|
-
*/
|
|
238
|
-
section: string | null;
|
|
239
|
-
/**
|
|
240
|
-
* Cosine similarity between the query and item. Calibrate any threshold using
|
|
241
|
-
* representative examples; it is not a correctness or contradiction score. `null`
|
|
242
|
-
* when the item was found by keywords only. Arrays are already ordered closest
|
|
243
|
-
* first.
|
|
244
|
-
*/
|
|
245
|
-
similarity: number | null;
|
|
246
|
-
/**
|
|
247
|
-
* The item's `source` label, for Q&A entries and training files
|
|
248
|
-
*/
|
|
249
|
-
source: string | null;
|
|
250
|
-
/**
|
|
251
|
-
* Excerpt of the existing content the judge compared against (Q&A answer, matching
|
|
252
|
-
* document section, or article body), up to 1200 characters plus an ellipsis when
|
|
253
|
-
* cut.
|
|
254
|
-
*/
|
|
255
|
-
text: string;
|
|
256
|
-
/**
|
|
257
|
-
* Title of the existing item
|
|
258
|
-
*/
|
|
259
|
-
title: string;
|
|
260
|
-
/**
|
|
261
|
-
* Public URL of the item when it has one
|
|
262
|
-
*/
|
|
263
|
-
url: string | null;
|
|
264
|
-
}
|
|
265
217
|
/**
|
|
266
218
|
* The Q&A entry addressed by externalId or a normalized question, including its
|
|
267
219
|
* checked revision, or null
|
|
@@ -300,58 +252,11 @@ export declare namespace Oracle {
|
|
|
300
252
|
*/
|
|
301
253
|
verdict: 'same_topic' | 'contradicts' | 'different' | 'unclear';
|
|
302
254
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* The item's source identity, for training files and Q&A
|
|
310
|
-
*/
|
|
311
|
-
externalId: string | null;
|
|
312
|
-
/**
|
|
313
|
-
* What kind of knowledge item matched: a Q&A entry, a training file / crawled
|
|
314
|
-
* page, or a live help-center article.
|
|
315
|
-
*/
|
|
316
|
-
kind: 'qna' | 'training_file' | 'help_center_article';
|
|
317
|
-
/**
|
|
318
|
-
* Question variants, for Q&A entries
|
|
319
|
-
*/
|
|
320
|
-
questions: Array<string> | null;
|
|
321
|
-
/**
|
|
322
|
-
* Q&A revision compared by the judge; null for other kinds. Use with PATCH
|
|
323
|
-
* expectedRevision.
|
|
324
|
-
*/
|
|
325
|
-
revision: number | null;
|
|
326
|
-
/**
|
|
327
|
-
* Heading breadcrumb of the matching section, for training files
|
|
328
|
-
*/
|
|
329
|
-
section: string | null;
|
|
330
|
-
/**
|
|
331
|
-
* Cosine similarity between the query and item. Calibrate any threshold using
|
|
332
|
-
* representative examples; it is not a correctness or contradiction score. `null`
|
|
333
|
-
* when the item was found by keywords only. Arrays are already ordered closest
|
|
334
|
-
* first.
|
|
335
|
-
*/
|
|
336
|
-
similarity: number | null;
|
|
337
|
-
/**
|
|
338
|
-
* The item's `source` label, for Q&A entries and training files
|
|
339
|
-
*/
|
|
340
|
-
source: string | null;
|
|
341
|
-
/**
|
|
342
|
-
* Excerpt of the existing content the judge compared against (Q&A answer, matching
|
|
343
|
-
* document section, or article body), up to 1200 characters plus an ellipsis when
|
|
344
|
-
* cut.
|
|
345
|
-
*/
|
|
346
|
-
text: string;
|
|
347
|
-
/**
|
|
348
|
-
* Title of the existing item
|
|
349
|
-
*/
|
|
350
|
-
title: string;
|
|
351
|
-
/**
|
|
352
|
-
* Public URL of the item when it has one
|
|
353
|
-
*/
|
|
354
|
-
url: string | null;
|
|
255
|
+
/**
|
|
256
|
+
* The existing item the action refers to, with its excerpt; `null` for `create` /
|
|
257
|
+
* `update_target`. For a `different` verdict the closest miss is `candidates[0]`.
|
|
258
|
+
*/
|
|
259
|
+
interface Target extends TrainingDataAPI.KnowledgeMatchCandidate {
|
|
355
260
|
}
|
|
356
261
|
/**
|
|
357
262
|
* Where the time went
|
|
@@ -435,7 +340,7 @@ export interface TrainingDataSearchParams {
|
|
|
435
340
|
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
436
341
|
}
|
|
437
342
|
export declare namespace TrainingData {
|
|
438
|
-
export { type KnowledgeSearch as KnowledgeSearch, type Oracle as Oracle, type TrainingDataOracleParams as TrainingDataOracleParams, type TrainingDataSearchParams as TrainingDataSearchParams, };
|
|
343
|
+
export { type KnowledgeMatchCandidate as KnowledgeMatchCandidate, type KnowledgeSearch as KnowledgeSearch, type Oracle as Oracle, type TrainingDataOracleParams as TrainingDataOracleParams, type TrainingDataSearchParams as TrainingDataSearchParams, };
|
|
439
344
|
export { Files as Files, type TrainingFile as TrainingFile, type FileDeleteResponse as FileDeleteResponse, type TrainingFilesCursorPage as TrainingFilesCursorPage, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, };
|
|
440
345
|
export { QnaResource as QnaResource, type Qna as Qna, type QnaDeleteResponse as QnaDeleteResponse, type QnasCursorPage as QnasCursorPage, type QnaCreateParams as QnaCreateParams, type QnaRetrieveParams as QnaRetrieveParams, type QnaUpdateParams as QnaUpdateParams, type QnaListParams as QnaListParams, type QnaDeleteParams as QnaDeleteParams, };
|
|
441
346
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"training-data.d.ts","sourceRoot":"","sources":["../../src/resources/training-data/training-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,YAAY,EACZ,uBAAuB,EACxB,mBAAgB;AACjB,OAAO,KAAK,MAAM,iBAAc;AAChC,OAAO,EACL,GAAG,EACH,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,cAAc,EACf,iBAAc;AACf,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,GAAG,EAAE,MAAM,CAAC,WAAW,CAAwC;IAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAgBtF;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,MAAM,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;CAehG;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"training-data.d.ts","sourceRoot":"","sources":["../../src/resources/training-data/training-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,eAAe,2BAAwB;AACnD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EACL,gBAAgB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.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"training-data.js","sourceRoot":"","sources":["../../src/resources/training-data/training-data.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAUiB;AACjB,yDAAgC;AAChC,kCAUe;AAEf,uDAAsD;AAGtD;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,QAAG,GAAuB,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmFjE,CAAC;IAjFC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE;YACnD,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;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE;YACnD,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;AArFD,oCAqFC;AA2UD,YAAY,CAAC,KAAK,GAAG,aAAK,CAAC;AAC3B,YAAY,CAAC,WAAW,GAAG,iBAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"training-data.mjs","sourceRoot":"","sources":["../../src/resources/training-data/training-data.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;
|
|
1
|
+
{"version":3,"file":"training-data.mjs","sourceRoot":"","sources":["../../src/resources/training-data/training-data.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAOL,KAAK,GAGN,oBAAgB;AACjB,OAAO,KAAK,MAAM,kBAAc;AAChC,OAAO,EAML,WAAW,GAIZ,kBAAc;AAEf,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAGtD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,QAAG,GAAuB,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmFjE,CAAC;IAjFC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE;YACnD,IAAI;YACJ,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;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE;YACnD,IAAI;YACJ,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;CACF;AA2UD,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;AAC3B,YAAY,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as AdminsAPI from "./organization/admins.mjs";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Live conversation workload, teammate availability, capacity limits, and managed away reasons for large support teams.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Workload extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns live workspace, team, and admin workload. Admin rows use cursor
|
|
11
|
+
* pagination. teamId and adminId filter admin and team rows. The summary stays
|
|
12
|
+
* workspace-wide. The snapshot is cached for five seconds.
|
|
13
|
+
*/
|
|
14
|
+
list(params?: WorkloadListParams | null | undefined, options?: RequestOptions): APIPromise<WorkloadListResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkloadListResponse {
|
|
17
|
+
admins: WorkloadListResponse.Admins;
|
|
18
|
+
generatedAt: string;
|
|
19
|
+
object: 'workload';
|
|
20
|
+
summary: WorkloadListResponse.Summary;
|
|
21
|
+
teams: Array<WorkloadListResponse.Team>;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace WorkloadListResponse {
|
|
24
|
+
interface Admins {
|
|
25
|
+
data: Array<Admins.Data>;
|
|
26
|
+
nextCursor: string | null;
|
|
27
|
+
object: 'list';
|
|
28
|
+
}
|
|
29
|
+
namespace Admins {
|
|
30
|
+
interface Data {
|
|
31
|
+
adminId: string;
|
|
32
|
+
assignmentLimit: AdminsAPI.AssignmentLimit;
|
|
33
|
+
atCapacity: boolean;
|
|
34
|
+
availability: AdminsAPI.AdminAvailability;
|
|
35
|
+
idleCount: number;
|
|
36
|
+
inboxes: Array<Data.Inbox>;
|
|
37
|
+
object: 'workload_admin';
|
|
38
|
+
openCount: number;
|
|
39
|
+
snoozedCount: number;
|
|
40
|
+
waitingCount: number;
|
|
41
|
+
}
|
|
42
|
+
namespace Data {
|
|
43
|
+
interface Inbox {
|
|
44
|
+
assignmentLimit: number | null;
|
|
45
|
+
atCapacity: boolean;
|
|
46
|
+
idleCount: number;
|
|
47
|
+
openCount: number;
|
|
48
|
+
snoozedCount: number;
|
|
49
|
+
teamId: string;
|
|
50
|
+
waitingCount: number;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
interface Summary {
|
|
55
|
+
avgWaitMs: number | null;
|
|
56
|
+
awayReasonBreakdown: Array<Summary.AwayReasonBreakdown>;
|
|
57
|
+
closedToday: number;
|
|
58
|
+
idleConversations: number;
|
|
59
|
+
idleThresholdMinutes: number;
|
|
60
|
+
longestWaitingMs: number | null;
|
|
61
|
+
openConversations: number;
|
|
62
|
+
snoozedConversations: number;
|
|
63
|
+
unassignedConversations: number;
|
|
64
|
+
waitingConversations: number;
|
|
65
|
+
waitingFirstReplyConversations: number;
|
|
66
|
+
}
|
|
67
|
+
namespace Summary {
|
|
68
|
+
interface AwayReasonBreakdown {
|
|
69
|
+
count: number;
|
|
70
|
+
reason: string;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
interface Team {
|
|
74
|
+
assignedCount: number;
|
|
75
|
+
assignmentLimit: number | null;
|
|
76
|
+
atCapacityCount: number;
|
|
77
|
+
avgWaitMs: number | null;
|
|
78
|
+
awayCount: number;
|
|
79
|
+
closedToday: number;
|
|
80
|
+
idleCount: number;
|
|
81
|
+
longestWaitingMs: number | null;
|
|
82
|
+
memberCount: number;
|
|
83
|
+
name: string;
|
|
84
|
+
object: 'workload_team';
|
|
85
|
+
openCount: number;
|
|
86
|
+
queuedCount: number;
|
|
87
|
+
snoozedCount: number;
|
|
88
|
+
teamId: string;
|
|
89
|
+
waitingCount: number;
|
|
90
|
+
waitingFirstReplyCount: number;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export interface WorkloadListParams {
|
|
94
|
+
/**
|
|
95
|
+
* API version for this request. Defaults to your organization's configured API
|
|
96
|
+
* version if not specified.
|
|
97
|
+
*/
|
|
98
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
99
|
+
}
|
|
100
|
+
export declare namespace Workload {
|
|
101
|
+
export { type WorkloadListResponse as WorkloadListResponse, type WorkloadListParams as WorkloadListParams };
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=workload.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload.d.mts","sourceRoot":"","sources":["../src/resources/workload.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,SAAS,kCAA8B;AACnD,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,IAAI,CACF,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;CAcpC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC;IAEpC,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,UAAU,CAAC;IAEnB,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC;IAEtC,KAAK,EAAE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;CACzC;AAED,yBAAiB,oBAAoB,CAAC;IACpC,UAAiB,MAAM;QACrB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B,MAAM,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,MAAM,CAAC;QACtB,UAAiB,IAAI;YACnB,OAAO,EAAE,MAAM,CAAC;YAEhB,eAAe,EAAE,SAAS,CAAC,eAAe,CAAC;YAE3C,UAAU,EAAE,OAAO,CAAC;YAEpB,YAAY,EAAE,SAAS,CAAC,iBAAiB,CAAC;YAE1C,SAAS,EAAE,MAAM,CAAC;YAElB,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAE3B,MAAM,EA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gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;QAEhC,WAAW,EAAE,MAAM,CAAC;QAEpB,IAAI,EAAE,MAAM,CAAC;QAEb,MAAM,EAAE,eAAe,CAAC;QAExB,SAAS,EAAE,MAAM,CAAC;QAElB,WAAW,EAAE,MAAM,CAAC;QAEpB,YAAY,EAAE,MAAM,CAAC;QAErB,MAAM,EAAE,MAAM,CAAC;QAEf,YAAY,EAAE,MAAM,CAAC;QAErB,sBAAsB,EAAE,MAAM,CAAC;KAChC;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;CACtF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC7G"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as AdminsAPI from "./organization/admins.js";
|
|
3
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Live conversation workload, teammate availability, capacity limits, and managed away reasons for large support teams.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Workload extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns live workspace, team, and admin workload. Admin rows use cursor
|
|
11
|
+
* pagination. teamId and adminId filter admin and team rows. The summary stays
|
|
12
|
+
* workspace-wide. The snapshot is cached for five seconds.
|
|
13
|
+
*/
|
|
14
|
+
list(params?: WorkloadListParams | null | undefined, options?: RequestOptions): APIPromise<WorkloadListResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkloadListResponse {
|
|
17
|
+
admins: WorkloadListResponse.Admins;
|
|
18
|
+
generatedAt: string;
|
|
19
|
+
object: 'workload';
|
|
20
|
+
summary: WorkloadListResponse.Summary;
|
|
21
|
+
teams: Array<WorkloadListResponse.Team>;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace WorkloadListResponse {
|
|
24
|
+
interface Admins {
|
|
25
|
+
data: Array<Admins.Data>;
|
|
26
|
+
nextCursor: string | null;
|
|
27
|
+
object: 'list';
|
|
28
|
+
}
|
|
29
|
+
namespace Admins {
|
|
30
|
+
interface Data {
|
|
31
|
+
adminId: string;
|
|
32
|
+
assignmentLimit: AdminsAPI.AssignmentLimit;
|
|
33
|
+
atCapacity: boolean;
|
|
34
|
+
availability: AdminsAPI.AdminAvailability;
|
|
35
|
+
idleCount: number;
|
|
36
|
+
inboxes: Array<Data.Inbox>;
|
|
37
|
+
object: 'workload_admin';
|
|
38
|
+
openCount: number;
|
|
39
|
+
snoozedCount: number;
|
|
40
|
+
waitingCount: number;
|
|
41
|
+
}
|
|
42
|
+
namespace Data {
|
|
43
|
+
interface Inbox {
|
|
44
|
+
assignmentLimit: number | null;
|
|
45
|
+
atCapacity: boolean;
|
|
46
|
+
idleCount: number;
|
|
47
|
+
openCount: number;
|
|
48
|
+
snoozedCount: number;
|
|
49
|
+
teamId: string;
|
|
50
|
+
waitingCount: number;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
interface Summary {
|
|
55
|
+
avgWaitMs: number | null;
|
|
56
|
+
awayReasonBreakdown: Array<Summary.AwayReasonBreakdown>;
|
|
57
|
+
closedToday: number;
|
|
58
|
+
idleConversations: number;
|
|
59
|
+
idleThresholdMinutes: number;
|
|
60
|
+
longestWaitingMs: number | null;
|
|
61
|
+
openConversations: number;
|
|
62
|
+
snoozedConversations: number;
|
|
63
|
+
unassignedConversations: number;
|
|
64
|
+
waitingConversations: number;
|
|
65
|
+
waitingFirstReplyConversations: number;
|
|
66
|
+
}
|
|
67
|
+
namespace Summary {
|
|
68
|
+
interface AwayReasonBreakdown {
|
|
69
|
+
count: number;
|
|
70
|
+
reason: string;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
interface Team {
|
|
74
|
+
assignedCount: number;
|
|
75
|
+
assignmentLimit: number | null;
|
|
76
|
+
atCapacityCount: number;
|
|
77
|
+
avgWaitMs: number | null;
|
|
78
|
+
awayCount: number;
|
|
79
|
+
closedToday: number;
|
|
80
|
+
idleCount: number;
|
|
81
|
+
longestWaitingMs: number | null;
|
|
82
|
+
memberCount: number;
|
|
83
|
+
name: string;
|
|
84
|
+
object: 'workload_team';
|
|
85
|
+
openCount: number;
|
|
86
|
+
queuedCount: number;
|
|
87
|
+
snoozedCount: number;
|
|
88
|
+
teamId: string;
|
|
89
|
+
waitingCount: number;
|
|
90
|
+
waitingFirstReplyCount: number;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
export interface WorkloadListParams {
|
|
94
|
+
/**
|
|
95
|
+
* API version for this request. Defaults to your organization's configured API
|
|
96
|
+
* version if not specified.
|
|
97
|
+
*/
|
|
98
|
+
'Featurebase-Version'?: '2026-08-19.orbit' | '2026-01-01.nova' | '2025-12-12.clover';
|
|
99
|
+
}
|
|
100
|
+
export declare namespace Workload {
|
|
101
|
+
export { type WorkloadListResponse as WorkloadListResponse, type WorkloadListParams as WorkloadListParams };
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=workload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload.d.ts","sourceRoot":"","sources":["../src/resources/workload.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,SAAS,iCAA8B;AACnD,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,IAAI,CACF,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,U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WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,KAAK,kBAAkB,IAAI,kBAAkB,EAAE,CAAC;CAC7G"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.Workload = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
/**
|
|
8
|
+
* Live conversation workload, teammate availability, capacity limits, and managed away reasons for large support teams.
|
|
9
|
+
*/
|
|
10
|
+
class Workload extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Returns live workspace, team, and admin workload. Admin rows use cursor
|
|
13
|
+
* pagination. teamId and adminId filter admin and team rows. The summary stays
|
|
14
|
+
* workspace-wide. The snapshot is cached for five seconds.
|
|
15
|
+
*/
|
|
16
|
+
list(params = {}, options) {
|
|
17
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
18
|
+
return this._client.get('/v2/workload', {
|
|
19
|
+
...options,
|
|
20
|
+
headers: (0, headers_1.buildHeaders)([
|
|
21
|
+
{
|
|
22
|
+
...(featurebaseVersion?.toString() != null ?
|
|
23
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
24
|
+
: undefined),
|
|
25
|
+
},
|
|
26
|
+
options?.headers,
|
|
27
|
+
]),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Workload = Workload;
|
|
32
|
+
//# sourceMappingURL=workload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload.js","sourceRoot":"","sources":["../src/resources/workload.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAAmD;AAGnD;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;OAIG;IACH,IAAI,CACF,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE;YACtC,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;AAvBD,4BAuBC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
* Live conversation workload, teammate availability, capacity limits, and managed away reasons for large support teams.
|
|
6
|
+
*/
|
|
7
|
+
export class Workload extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns live workspace, team, and admin workload. Admin rows use cursor
|
|
10
|
+
* pagination. teamId and adminId filter admin and team rows. The summary stays
|
|
11
|
+
* workspace-wide. The snapshot is cached for five seconds.
|
|
12
|
+
*/
|
|
13
|
+
list(params = {}, options) {
|
|
14
|
+
const { 'Featurebase-Version': featurebaseVersion } = params ?? {};
|
|
15
|
+
return this._client.get('/v2/workload', {
|
|
16
|
+
...options,
|
|
17
|
+
headers: buildHeaders([
|
|
18
|
+
{
|
|
19
|
+
...(featurebaseVersion?.toString() != null ?
|
|
20
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
21
|
+
: undefined),
|
|
22
|
+
},
|
|
23
|
+
options?.headers,
|
|
24
|
+
]),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=workload.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workload.mjs","sourceRoot":"","sources":["../src/resources/workload.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAGnD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;OAIG;IACH,IAAI,CACF,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE;YACtC,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;CACF"}
|