@thinkai/tai-api-contract 2.5.1 → 2.5.16
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/dist/generated/openapi.d.ts +1418 -26
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +317 -0
- package/dist/index.d.ts.map +1 -1
- package/openapi/openapi.yaml +2906 -1200
- package/package.json +1 -1
- package/src/generated/openapi.ts +1418 -26
- package/src/index.ts +353 -0
package/src/generated/openapi.ts
CHANGED
|
@@ -228,6 +228,266 @@ export interface paths {
|
|
|
228
228
|
patch?: never;
|
|
229
229
|
trace?: never;
|
|
230
230
|
};
|
|
231
|
+
"/workspaces/{workspaceId}/insights/productivity-insights/aggregated-teams": {
|
|
232
|
+
parameters: {
|
|
233
|
+
query?: never;
|
|
234
|
+
header?: never;
|
|
235
|
+
path?: never;
|
|
236
|
+
cookie?: never;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Productivity insights — aggregated team weekly metrics
|
|
240
|
+
* @description Team-level rollup for Productivity insights (Aggregated Teams view on /phase-c/c4). Returns weekly merged PR counts and fail rates per engineering team, filtered by the same department, team, and range controls as the Measure UI.
|
|
241
|
+
*/
|
|
242
|
+
get: operations["getProductivityInsightsAggregatedTeams"];
|
|
243
|
+
put?: never;
|
|
244
|
+
post?: never;
|
|
245
|
+
delete?: never;
|
|
246
|
+
options?: never;
|
|
247
|
+
head?: never;
|
|
248
|
+
patch?: never;
|
|
249
|
+
trace?: never;
|
|
250
|
+
};
|
|
251
|
+
"/workspaces/{workspaceId}/insights/productivity-insights/merged-pr-trends": {
|
|
252
|
+
parameters: {
|
|
253
|
+
query?: never;
|
|
254
|
+
header?: never;
|
|
255
|
+
path?: never;
|
|
256
|
+
cookie?: never;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Productivity insights — merged PR trends (portfolio + contributors)
|
|
260
|
+
* @description Weekly merged PR counts for the Measure "Merged PR Trends" widget on /phase-c/c4 Individual Contributors. Returns a portfolio aggregate series plus per-contributor weekly counts, filtered by the same department, team, and range controls as the Measure UI.
|
|
261
|
+
*/
|
|
262
|
+
get: operations["getProductivityInsightsMergedPrTrends"];
|
|
263
|
+
put?: never;
|
|
264
|
+
post?: never;
|
|
265
|
+
delete?: never;
|
|
266
|
+
options?: never;
|
|
267
|
+
head?: never;
|
|
268
|
+
patch?: never;
|
|
269
|
+
trace?: never;
|
|
270
|
+
};
|
|
271
|
+
"/workspaces/{workspaceId}/insights/productivity-insights/teams": {
|
|
272
|
+
parameters: {
|
|
273
|
+
query?: never;
|
|
274
|
+
header?: never;
|
|
275
|
+
path?: never;
|
|
276
|
+
cookie?: never;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Productivity insights — top teams and team drilldown
|
|
280
|
+
* @description Without `teamId`: returns the top-ranked teams by average weekly merged PR count for the Measure **Top teams** widget on /phase-c/c4 and /phase-c/c7. With `teamId`: returns weekly rollup and summary for a single team (powers `/phase-c/c4/teams/:teamId` drilldown).
|
|
281
|
+
*/
|
|
282
|
+
get: operations["getProductivityInsightsTeams"];
|
|
283
|
+
put?: never;
|
|
284
|
+
post?: never;
|
|
285
|
+
delete?: never;
|
|
286
|
+
options?: never;
|
|
287
|
+
head?: never;
|
|
288
|
+
patch?: never;
|
|
289
|
+
trace?: never;
|
|
290
|
+
};
|
|
291
|
+
"/workspaces/{workspaceId}/insights/productivity-insights/contributors/{contributorId}": {
|
|
292
|
+
parameters: {
|
|
293
|
+
query?: never;
|
|
294
|
+
header?: never;
|
|
295
|
+
path?: never;
|
|
296
|
+
cookie?: never;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Productivity insights — contributor drilldown
|
|
300
|
+
* @description Weekly and daily activity rollups for a single contributor on `/phase-c/c4/contributors/:id`. Distributes weekly merged PR counts from precomputed person metrics across weekdays; includes fail-rate signals and period-over-period summary deltas. Uses org-chart person ids (typically email).
|
|
301
|
+
*/
|
|
302
|
+
get: operations["getProductivityInsightsContributor"];
|
|
303
|
+
put?: never;
|
|
304
|
+
post?: never;
|
|
305
|
+
delete?: never;
|
|
306
|
+
options?: never;
|
|
307
|
+
head?: never;
|
|
308
|
+
patch?: never;
|
|
309
|
+
trace?: never;
|
|
310
|
+
};
|
|
311
|
+
"/workspaces/{workspaceId}/insights/productivity-insights/needs-attention": {
|
|
312
|
+
parameters: {
|
|
313
|
+
query?: never;
|
|
314
|
+
header?: never;
|
|
315
|
+
path?: never;
|
|
316
|
+
cookie?: never;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* Productivity insights — needs attention (bottom performers)
|
|
320
|
+
* @description Bottom performers for the Measure "Needs attention" widget on /phase-c/c4 (LeadersLaggards laggards column). Returns the lowest-ranked teams or contributors by average weekly merged PR count for the selected filters and range.
|
|
321
|
+
*/
|
|
322
|
+
get: operations["getProductivityInsightsNeedsAttention"];
|
|
323
|
+
put?: never;
|
|
324
|
+
post?: never;
|
|
325
|
+
delete?: never;
|
|
326
|
+
options?: never;
|
|
327
|
+
head?: never;
|
|
328
|
+
patch?: never;
|
|
329
|
+
trace?: never;
|
|
330
|
+
};
|
|
331
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/aggregated-teams": {
|
|
332
|
+
parameters: {
|
|
333
|
+
query?: never;
|
|
334
|
+
header?: never;
|
|
335
|
+
path?: never;
|
|
336
|
+
cookie?: never;
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* AI usage & spend insights — aggregated team weekly rollups
|
|
340
|
+
* @description Team-level AI adoption, token volume, and spend for the Measure **Aggregated Teams** view on `/phase-c/c7` and the dashboard AI Usage & Spend card. Aggregates stored AI-tool integration snapshots (daily usage + billing spend) by org-chart team using member email. Same filter params as other Measure insights routes.
|
|
341
|
+
*/
|
|
342
|
+
get: operations["getAiUsageSpendAggregatedTeams"];
|
|
343
|
+
put?: never;
|
|
344
|
+
post?: never;
|
|
345
|
+
delete?: never;
|
|
346
|
+
options?: never;
|
|
347
|
+
head?: never;
|
|
348
|
+
patch?: never;
|
|
349
|
+
trace?: never;
|
|
350
|
+
};
|
|
351
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/aggregated-contributors": {
|
|
352
|
+
parameters: {
|
|
353
|
+
query?: never;
|
|
354
|
+
header?: never;
|
|
355
|
+
path?: never;
|
|
356
|
+
cookie?: never;
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* AI usage & spend insights — aggregated contributor weekly rollups
|
|
360
|
+
* @description Per-contributor AI adoption, token volume, and spend for the Measure **Individual Contributors** view on `/phase-c/c7`. Aggregates stored AI-tool integration snapshots (daily usage + billing spend) by org-chart person id (typically email). Same filter params as other Measure insights routes.
|
|
361
|
+
*/
|
|
362
|
+
get: operations["getAiUsageSpendAggregatedContributors"];
|
|
363
|
+
put?: never;
|
|
364
|
+
post?: never;
|
|
365
|
+
delete?: never;
|
|
366
|
+
options?: never;
|
|
367
|
+
head?: never;
|
|
368
|
+
patch?: never;
|
|
369
|
+
trace?: never;
|
|
370
|
+
};
|
|
371
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/contributor-tool-heatmap": {
|
|
372
|
+
parameters: {
|
|
373
|
+
query?: never;
|
|
374
|
+
header?: never;
|
|
375
|
+
path?: never;
|
|
376
|
+
cookie?: never;
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* AI usage & spend insights — contributor × week heatmap rows
|
|
380
|
+
* @description Contributor × week heatmap rows for the Measure **Individual Contributors** tool heatmap on `/phase-c/c7`. Same aggregation as aggregated-contributors; returns weekly token, spend, and active-user counts per org-chart person.
|
|
381
|
+
*/
|
|
382
|
+
get: operations["getAiUsageSpendContributorToolHeatmap"];
|
|
383
|
+
put?: never;
|
|
384
|
+
post?: never;
|
|
385
|
+
delete?: never;
|
|
386
|
+
options?: never;
|
|
387
|
+
head?: never;
|
|
388
|
+
patch?: never;
|
|
389
|
+
trace?: never;
|
|
390
|
+
};
|
|
391
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/key-insights": {
|
|
392
|
+
parameters: {
|
|
393
|
+
query?: never;
|
|
394
|
+
header?: never;
|
|
395
|
+
path?: never;
|
|
396
|
+
cookie?: never;
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* AI usage & spend insights — key insights panel
|
|
400
|
+
* @description Narrative insight cards for the Measure **Key insights** panel on `/phase-c/c7` (AI Usage & Spend). Derived from scoped AI-tool usage/spend snapshots and productivity metrics for the selected filters and range.
|
|
401
|
+
*/
|
|
402
|
+
get: operations["getAiUsageSpendKeyInsights"];
|
|
403
|
+
put?: never;
|
|
404
|
+
post?: never;
|
|
405
|
+
delete?: never;
|
|
406
|
+
options?: never;
|
|
407
|
+
head?: never;
|
|
408
|
+
patch?: never;
|
|
409
|
+
trace?: never;
|
|
410
|
+
};
|
|
411
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/ai-assisted-code-percentage": {
|
|
412
|
+
parameters: {
|
|
413
|
+
query?: never;
|
|
414
|
+
header?: never;
|
|
415
|
+
path?: never;
|
|
416
|
+
cookie?: never;
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* AI usage & spend insights — AI-assisted code percentage
|
|
420
|
+
* @description Period and weekly AI-assisted code percentage for the Measure **AI-assisted code** card on `/phase-c/c7` and the **AI impact** curve on `/phase-c/c4`. When scoped productivity metrics include `aiAssistedContributionRatioPercent`, values are **measured** from ingest; otherwise the API falls back to token→LOC heuristics and sets `dataQuality` to **estimated**. Clients should not present estimated series as Cursor-measured signal.
|
|
421
|
+
*/
|
|
422
|
+
get: operations["getAiUsageSpendAiAssistedCodePercentage"];
|
|
423
|
+
put?: never;
|
|
424
|
+
post?: never;
|
|
425
|
+
delete?: never;
|
|
426
|
+
options?: never;
|
|
427
|
+
head?: never;
|
|
428
|
+
patch?: never;
|
|
429
|
+
trace?: never;
|
|
430
|
+
};
|
|
431
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/ai-tool-usage-spend": {
|
|
432
|
+
parameters: {
|
|
433
|
+
query?: never;
|
|
434
|
+
header?: never;
|
|
435
|
+
path?: never;
|
|
436
|
+
cookie?: never;
|
|
437
|
+
};
|
|
438
|
+
/**
|
|
439
|
+
* AI usage & spend insights — AI tool usage and spend by provider/model
|
|
440
|
+
* @description Scoped portfolio rollups of AI-tool token usage and spend by registered provider and by model (from daily usage `mostUsedModel`) for the **Provider / Model usage + spend** chart on `/phase-c/c4` and `/phase-c/c7`. Reads stored AI-tool integration snapshots (`tai_workspace_ai_tool_daily_usage`, `tai_workspace_ai_tool_spend`).
|
|
441
|
+
*/
|
|
442
|
+
get: operations["getAiUsageSpendAiToolUsageSpend"];
|
|
443
|
+
put?: never;
|
|
444
|
+
post?: never;
|
|
445
|
+
delete?: never;
|
|
446
|
+
options?: never;
|
|
447
|
+
head?: never;
|
|
448
|
+
patch?: never;
|
|
449
|
+
trace?: never;
|
|
450
|
+
};
|
|
451
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/team-tool-heatmap": {
|
|
452
|
+
parameters: {
|
|
453
|
+
query?: never;
|
|
454
|
+
header?: never;
|
|
455
|
+
path?: never;
|
|
456
|
+
cookie?: never;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* AI usage & spend insights — team weekly heatmap
|
|
460
|
+
* @description Team × week rollups of AI-tool token volume, spend, and active users for the **Team tool heatmap** on `/phase-c/c4` and `/phase-c/c7`. Aggregates stored AI-tool integration snapshots by org-chart team. Same filter params as other Measure insights routes.
|
|
461
|
+
*/
|
|
462
|
+
get: operations["getAiUsageSpendTeamToolHeatmap"];
|
|
463
|
+
put?: never;
|
|
464
|
+
post?: never;
|
|
465
|
+
delete?: never;
|
|
466
|
+
options?: never;
|
|
467
|
+
head?: never;
|
|
468
|
+
patch?: never;
|
|
469
|
+
trace?: never;
|
|
470
|
+
};
|
|
471
|
+
"/workspaces/{workspaceId}/insights/ai-usage-spend/roi-productivity-signal": {
|
|
472
|
+
parameters: {
|
|
473
|
+
query?: never;
|
|
474
|
+
header?: never;
|
|
475
|
+
path?: never;
|
|
476
|
+
cookie?: never;
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* AI usage & spend insights — ROI and productivity signal
|
|
480
|
+
* @description Connects scoped AI-tool usage and spend to engineering throughput (merged PRs) for the **ROI & Productivity Signal** panel on `/phase-c/c4` and `/phase-c/c7`. Returns spend efficiency metrics, adoption counts, and weekly usage vs PR series. Same filter params as other Measure insights routes.
|
|
481
|
+
*/
|
|
482
|
+
get: operations["getAiUsageSpendRoiProductivitySignal"];
|
|
483
|
+
put?: never;
|
|
484
|
+
post?: never;
|
|
485
|
+
delete?: never;
|
|
486
|
+
options?: never;
|
|
487
|
+
head?: never;
|
|
488
|
+
patch?: never;
|
|
489
|
+
trace?: never;
|
|
490
|
+
};
|
|
231
491
|
"/workspaces/{workspaceId}/company-profile": {
|
|
232
492
|
parameters: {
|
|
233
493
|
query?: never;
|
|
@@ -1054,7 +1314,7 @@ export interface paths {
|
|
|
1054
1314
|
put?: never;
|
|
1055
1315
|
/**
|
|
1056
1316
|
* Import org chart from Supabase storage path
|
|
1057
|
-
* @description Parse-only. Downloads the CSV at `storagePath` from the `org-charts` bucket and returns `persons` and `errors`. Does not persist to `spa_org_chart` or `org_chart`. The SPA derives teams client-side and saves the org structure via `POST /workspaces/{workspaceId}/org-chart`.
|
|
1317
|
+
* @description Parse-only. Downloads the CSV at `storagePath` from the `org-charts` bucket and returns `persons` and `errors`. Does not persist to `spa_org_chart` or `org_chart`. The SPA derives teams client-side and saves the org structure via `POST /workspaces/{workspaceId}/org-chart`. Required columns: employee_id, name, email, title, department, team, manager_id, location. Optional: github_username (GitHub login for productivity ingest). Saving the SPA snapshot also materializes a scoring `org_chart` tree for team/person metrics when import members are present.
|
|
1058
1318
|
*/
|
|
1059
1319
|
post: operations["postOrgChartImport"];
|
|
1060
1320
|
delete?: never;
|
|
@@ -1119,14 +1379,22 @@ export interface components {
|
|
|
1119
1379
|
root: components["schemas"]["OrgChartNodeDto"];
|
|
1120
1380
|
};
|
|
1121
1381
|
OrgChartPersonDto: {
|
|
1382
|
+
/** @description Stable HR identifier; referenced by manager_id for reporting lines. */
|
|
1122
1383
|
employeeId: string;
|
|
1123
1384
|
name: string;
|
|
1385
|
+
/** @description Work email; used as canonical person_id in productivity ingest when present. */
|
|
1124
1386
|
email: string;
|
|
1387
|
+
/** @description Job title; used for contributor rows and leadership (enabler) hints. */
|
|
1125
1388
|
title: string;
|
|
1389
|
+
/** @description Department filter on Productivity insights. */
|
|
1126
1390
|
department: string;
|
|
1391
|
+
/** @description Engineering team name for Aggregated Teams and team drill-downs. */
|
|
1127
1392
|
team: string;
|
|
1393
|
+
/** @description employee_id of the person's manager; leave empty for top-level leaders. */
|
|
1128
1394
|
managerId: string;
|
|
1129
1395
|
location: string;
|
|
1396
|
+
/** @description GitHub login (no @) to map merged PRs and reviews to this person in productivity ingest. */
|
|
1397
|
+
githubUsername?: string;
|
|
1130
1398
|
};
|
|
1131
1399
|
OrgChartImportResultDto: {
|
|
1132
1400
|
persons: components["schemas"]["OrgChartPersonDto"][];
|
|
@@ -1250,36 +1518,414 @@ export interface components {
|
|
|
1250
1518
|
metrics: components["schemas"]["DashboardProductivityMetricsDto"];
|
|
1251
1519
|
}[];
|
|
1252
1520
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
name
|
|
1257
|
-
|
|
1258
|
-
defaultWorkspaceId?: string | null;
|
|
1259
|
-
};
|
|
1260
|
-
UpdateMeBodyDto: {
|
|
1261
|
-
name?: string;
|
|
1262
|
-
email?: string;
|
|
1263
|
-
defaultWorkspaceId?: string | null;
|
|
1521
|
+
ProductivityInsightsAggregatedTeamsScopeDto: {
|
|
1522
|
+
/** @description Applied department filter from the Measure UI. Backend scopes via CSV import (`thinkai_org_structure`) or SPA `department` nodes; unknown departments yield empty scoped results rather than org-wide rollups. */
|
|
1523
|
+
department: string;
|
|
1524
|
+
/** @description Applied team name filter from the Measure UI. */
|
|
1525
|
+
team: string;
|
|
1264
1526
|
};
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1527
|
+
ProductivityInsightsAggregatedTeamWeekDto: {
|
|
1528
|
+
/** Format: date-time */
|
|
1529
|
+
bucketStart: string;
|
|
1530
|
+
/** Format: date-time */
|
|
1531
|
+
bucketEnd: string;
|
|
1532
|
+
/** @description Short label for the week column (MM/DD), aligned with Measure charts. */
|
|
1533
|
+
weekLabel?: string;
|
|
1534
|
+
mergedPrCount: number;
|
|
1535
|
+
failRatePercent: number;
|
|
1536
|
+
};
|
|
1537
|
+
ProductivityInsightsAggregatedTeamRowDto: {
|
|
1538
|
+
teamId: string;
|
|
1539
|
+
teamName: string;
|
|
1540
|
+
headcount: number;
|
|
1541
|
+
managerLabel?: string;
|
|
1542
|
+
weeks: components["schemas"]["ProductivityInsightsAggregatedTeamWeekDto"][];
|
|
1543
|
+
};
|
|
1544
|
+
ProductivityInsightsAggregatedTeamsDto: {
|
|
1545
|
+
/** Format: uuid */
|
|
1546
|
+
workspaceId: string;
|
|
1547
|
+
/** @enum {string} */
|
|
1548
|
+
range: "4w" | "8w" | "q";
|
|
1549
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1550
|
+
/** Format: date-time */
|
|
1551
|
+
generatedAt: string;
|
|
1552
|
+
teams: components["schemas"]["ProductivityInsightsAggregatedTeamRowDto"][];
|
|
1270
1553
|
};
|
|
1271
|
-
|
|
1272
|
-
|
|
1554
|
+
ProductivityInsightsMergedPrTrendWeekDto: {
|
|
1555
|
+
/** Format: date-time */
|
|
1556
|
+
bucketStart: string;
|
|
1557
|
+
/** Format: date-time */
|
|
1558
|
+
bucketEnd: string;
|
|
1559
|
+
/** @description Short label for the week column (MM/DD), aligned with Measure charts. */
|
|
1560
|
+
weekLabel?: string;
|
|
1561
|
+
mergedPrCount: number;
|
|
1562
|
+
};
|
|
1563
|
+
ProductivityInsightsMergedPrContributorRowDto: {
|
|
1564
|
+
/** @description Canonical person identifier (matches org chart person_id / employeeId). */
|
|
1565
|
+
personId: string;
|
|
1566
|
+
personName: string;
|
|
1567
|
+
teamName?: string;
|
|
1568
|
+
weeks: components["schemas"]["ProductivityInsightsMergedPrTrendWeekDto"][];
|
|
1569
|
+
};
|
|
1570
|
+
ProductivityInsightsMergedPrTrendsDto: {
|
|
1571
|
+
/** Format: uuid */
|
|
1572
|
+
workspaceId: string;
|
|
1573
|
+
/** @enum {string} */
|
|
1574
|
+
range: "4w" | "8w" | "q";
|
|
1575
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1576
|
+
/** Format: date-time */
|
|
1577
|
+
generatedAt: string;
|
|
1578
|
+
/** @description Portfolio aggregate merged PR counts (sum of filtered contributors per week). */
|
|
1579
|
+
weeks: components["schemas"]["ProductivityInsightsMergedPrTrendWeekDto"][];
|
|
1580
|
+
contributors: components["schemas"]["ProductivityInsightsMergedPrContributorRowDto"][];
|
|
1581
|
+
};
|
|
1582
|
+
ProductivityInsightsTeamLeaderItemDto: {
|
|
1583
|
+
/** @description 1-based rank within the top-teams list (1 = highest performer). */
|
|
1584
|
+
rank: number;
|
|
1585
|
+
teamId: string;
|
|
1586
|
+
teamName: string;
|
|
1587
|
+
/** @description Optional context line (e.g. headcount or manager). */
|
|
1588
|
+
subtitle?: string;
|
|
1589
|
+
/** @description Average weekly merged PR count over the selected range. */
|
|
1590
|
+
periodAvgMergedPrs: number;
|
|
1591
|
+
/** @description Percent change of the latest week vs the period average. */
|
|
1592
|
+
deltaVsPeriodAvgPercent: number;
|
|
1593
|
+
/** @description Average change failure rate over the range when available. */
|
|
1594
|
+
avgFailRatePercent?: number;
|
|
1595
|
+
};
|
|
1596
|
+
ProductivityInsightsTeamSummaryDto: {
|
|
1597
|
+
totalMergedPrs: number;
|
|
1598
|
+
avgMergedPrsPerWeek: number;
|
|
1599
|
+
avgFailRatePercent: number;
|
|
1600
|
+
headcount: number;
|
|
1601
|
+
};
|
|
1602
|
+
ProductivityInsightsTeamDetailDto: {
|
|
1603
|
+
teamId: string;
|
|
1604
|
+
teamName: string;
|
|
1605
|
+
headcount: number;
|
|
1606
|
+
managerLabel?: string;
|
|
1607
|
+
weeks: components["schemas"]["ProductivityInsightsAggregatedTeamWeekDto"][];
|
|
1608
|
+
summary: components["schemas"]["ProductivityInsightsTeamSummaryDto"];
|
|
1609
|
+
};
|
|
1610
|
+
ProductivityInsightsTeamsResponseDto: {
|
|
1611
|
+
/** Format: uuid */
|
|
1612
|
+
workspaceId: string;
|
|
1613
|
+
/** @enum {string} */
|
|
1614
|
+
range: "4w" | "8w" | "q";
|
|
1615
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1616
|
+
/** Format: date-time */
|
|
1617
|
+
generatedAt: string;
|
|
1618
|
+
/** @description Present when `teamId` query is omitted — top-ranked teams. */
|
|
1619
|
+
items?: components["schemas"]["ProductivityInsightsTeamLeaderItemDto"][];
|
|
1620
|
+
/** @description Present when `teamId` query is set — single-team drilldown. */
|
|
1621
|
+
team?: components["schemas"]["ProductivityInsightsTeamDetailDto"];
|
|
1273
1622
|
};
|
|
1274
|
-
|
|
1275
|
-
|
|
1623
|
+
ProductivityInsightsContributorProfileDto: {
|
|
1624
|
+
/** @description Org-chart person id (typically email). */
|
|
1625
|
+
id: string;
|
|
1276
1626
|
name: string;
|
|
1627
|
+
title?: string;
|
|
1628
|
+
team?: string;
|
|
1629
|
+
department?: string;
|
|
1277
1630
|
};
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1631
|
+
ProductivityInsightsContributorActivityDayDto: {
|
|
1632
|
+
/** Format: date */
|
|
1633
|
+
date: string;
|
|
1634
|
+
dayIndex: number;
|
|
1635
|
+
mergedPrCount: number;
|
|
1636
|
+
mergedPrs: string[];
|
|
1637
|
+
absent: boolean;
|
|
1638
|
+
absenceType?: string;
|
|
1639
|
+
failureSignal: boolean;
|
|
1640
|
+
failures: string[];
|
|
1641
|
+
};
|
|
1642
|
+
ProductivityInsightsContributorActivityWeekDto: {
|
|
1643
|
+
label: string;
|
|
1644
|
+
/** Format: date-time */
|
|
1645
|
+
bucketStart: string;
|
|
1646
|
+
/** Format: date-time */
|
|
1647
|
+
bucketEnd: string;
|
|
1648
|
+
days: components["schemas"]["ProductivityInsightsContributorActivityDayDto"][];
|
|
1649
|
+
};
|
|
1650
|
+
ProductivityInsightsContributorActivitySummaryDto: {
|
|
1651
|
+
totalMergedPrs: number;
|
|
1652
|
+
avgMergedPrsPerWeek: number;
|
|
1653
|
+
totalAbsenceDays: number;
|
|
1654
|
+
avgFailRate: number;
|
|
1655
|
+
mergedPrDelta: number;
|
|
1656
|
+
avgMergedPrsPerWeekDelta: number;
|
|
1657
|
+
totalAbsenceDaysDelta: number;
|
|
1658
|
+
avgFailRateDelta: number;
|
|
1659
|
+
};
|
|
1660
|
+
ProductivityInsightsContributorDetailDto: {
|
|
1661
|
+
/** Format: uuid */
|
|
1662
|
+
workspaceId: string;
|
|
1663
|
+
contributorId: string;
|
|
1664
|
+
/** @enum {string} */
|
|
1665
|
+
range: "4w" | "8w" | "q";
|
|
1666
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1667
|
+
/** Format: date-time */
|
|
1668
|
+
generatedAt: string;
|
|
1669
|
+
contributor: components["schemas"]["ProductivityInsightsContributorProfileDto"];
|
|
1670
|
+
weeks: components["schemas"]["ProductivityInsightsContributorActivityWeekDto"][];
|
|
1671
|
+
summary: components["schemas"]["ProductivityInsightsContributorActivitySummaryDto"];
|
|
1672
|
+
};
|
|
1673
|
+
ProductivityInsightsNeedsAttentionItemDto: {
|
|
1674
|
+
/** @description 1-based rank within the laggards list (1 = lowest performer). */
|
|
1675
|
+
rank: number;
|
|
1676
|
+
/** @description Org chart team id or canonical person id. */
|
|
1677
|
+
entityId: string;
|
|
1678
|
+
/** @enum {string} */
|
|
1679
|
+
entityType: "team" | "contributor";
|
|
1680
|
+
name: string;
|
|
1681
|
+
/** @description Optional context line (e.g. headcount or job title). */
|
|
1682
|
+
subtitle?: string;
|
|
1683
|
+
/** @description Mean weekly merged PR count across the selected range. */
|
|
1684
|
+
periodAvgMergedPrs: number;
|
|
1685
|
+
/** @description Percent change of the latest week vs the period mean. */
|
|
1686
|
+
deltaVsPeriodAvgPercent: number;
|
|
1687
|
+
/** @description Mean weekly change-failure rate when available. */
|
|
1688
|
+
avgFailRatePercent?: number;
|
|
1689
|
+
};
|
|
1690
|
+
ProductivityInsightsNeedsAttentionDto: {
|
|
1691
|
+
/** Format: uuid */
|
|
1692
|
+
workspaceId: string;
|
|
1693
|
+
/** @enum {string} */
|
|
1694
|
+
range: "4w" | "8w" | "q";
|
|
1695
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1696
|
+
/** @enum {string} */
|
|
1697
|
+
entityType: "teams" | "contributors";
|
|
1698
|
+
/** Format: date-time */
|
|
1699
|
+
generatedAt: string;
|
|
1700
|
+
items: components["schemas"]["ProductivityInsightsNeedsAttentionItemDto"][];
|
|
1701
|
+
};
|
|
1702
|
+
AiUsageSpendAggregatedTeamWeekDto: {
|
|
1703
|
+
/** Format: date-time */
|
|
1704
|
+
bucketStart: string;
|
|
1705
|
+
/** Format: date-time */
|
|
1706
|
+
bucketEnd: string;
|
|
1707
|
+
/** @description Short label for table headers (e.g. MM/DD). */
|
|
1708
|
+
weekLabel?: string;
|
|
1709
|
+
/** @description Total tokens consumed in the bucket (from AI-tool daily usage payloads when available). */
|
|
1710
|
+
tokenCount: number;
|
|
1711
|
+
/** @description Estimated spend in USD cents attributed to the bucket. */
|
|
1712
|
+
spendCents: number;
|
|
1713
|
+
/** @description Distinct engineers with active AI-tool usage in the bucket. */
|
|
1714
|
+
activeUsers: number;
|
|
1715
|
+
};
|
|
1716
|
+
AiUsageSpendAggregatedTeamRowDto: {
|
|
1717
|
+
teamId: string;
|
|
1718
|
+
teamName: string;
|
|
1719
|
+
headcount: number;
|
|
1720
|
+
managerLabel?: string;
|
|
1721
|
+
weeks: components["schemas"]["AiUsageSpendAggregatedTeamWeekDto"][];
|
|
1722
|
+
};
|
|
1723
|
+
AiUsageSpendAggregatedTeamsSummaryDto: {
|
|
1724
|
+
totalTokenCount: number;
|
|
1725
|
+
totalSpendCents: number;
|
|
1726
|
+
/** @description Distinct engineers with any active usage in the selected range. */
|
|
1727
|
+
activeUsers: number;
|
|
1728
|
+
/** @description Count of connected AI-tool providers with usage or spend in range. */
|
|
1729
|
+
activeTools: number;
|
|
1730
|
+
/** @description Sum of org-chart headcount across returned teams. */
|
|
1731
|
+
totalEngineers: number;
|
|
1732
|
+
};
|
|
1733
|
+
AiUsageSpendAggregatedTeamsDto: {
|
|
1734
|
+
/** Format: uuid */
|
|
1735
|
+
workspaceId: string;
|
|
1736
|
+
/** @enum {string} */
|
|
1737
|
+
range: "4w" | "8w" | "q";
|
|
1738
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1739
|
+
/** Format: date-time */
|
|
1740
|
+
generatedAt: string;
|
|
1741
|
+
teams: components["schemas"]["AiUsageSpendAggregatedTeamRowDto"][];
|
|
1742
|
+
summary: components["schemas"]["AiUsageSpendAggregatedTeamsSummaryDto"];
|
|
1743
|
+
};
|
|
1744
|
+
AiUsageSpendAggregatedContributorRowDto: {
|
|
1745
|
+
/** @description Org-chart person id (typically email). */
|
|
1746
|
+
contributorId: string;
|
|
1747
|
+
contributorName: string;
|
|
1748
|
+
title?: string;
|
|
1749
|
+
team?: string;
|
|
1750
|
+
department?: string;
|
|
1751
|
+
weeks: components["schemas"]["AiUsageSpendAggregatedTeamWeekDto"][];
|
|
1752
|
+
};
|
|
1753
|
+
AiUsageSpendAggregatedContributorsDto: {
|
|
1754
|
+
/** Format: uuid */
|
|
1755
|
+
workspaceId: string;
|
|
1756
|
+
/** @enum {string} */
|
|
1757
|
+
range: "4w" | "8w" | "q";
|
|
1758
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1759
|
+
/** Format: date-time */
|
|
1760
|
+
generatedAt: string;
|
|
1761
|
+
contributors: components["schemas"]["AiUsageSpendAggregatedContributorRowDto"][];
|
|
1762
|
+
summary: components["schemas"]["AiUsageSpendAggregatedTeamsSummaryDto"];
|
|
1763
|
+
};
|
|
1764
|
+
AiUsageSpendContributorToolHeatmapDto: {
|
|
1765
|
+
/** Format: uuid */
|
|
1766
|
+
workspaceId: string;
|
|
1767
|
+
/** @enum {string} */
|
|
1768
|
+
range: "4w" | "8w" | "q";
|
|
1769
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1770
|
+
/** Format: date-time */
|
|
1771
|
+
generatedAt: string;
|
|
1772
|
+
contributors: components["schemas"]["AiUsageSpendAggregatedContributorRowDto"][];
|
|
1773
|
+
};
|
|
1774
|
+
AiUsageSpendKeyInsightItemDto: {
|
|
1775
|
+
/** @description Stable insight key (e.g. spend-leader, spend-vs-output). */
|
|
1776
|
+
id: string;
|
|
1777
|
+
/** @enum {string} */
|
|
1778
|
+
tone: "positive" | "warning" | "neutral";
|
|
1779
|
+
/** @description Human-readable insight sentence for the UI panel. */
|
|
1780
|
+
text: string;
|
|
1781
|
+
};
|
|
1782
|
+
AiUsageSpendKeyInsightsDto: {
|
|
1783
|
+
/** Format: uuid */
|
|
1784
|
+
workspaceId: string;
|
|
1785
|
+
/** @enum {string} */
|
|
1786
|
+
range: "4w" | "8w" | "q";
|
|
1787
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1788
|
+
/** Format: date-time */
|
|
1789
|
+
generatedAt: string;
|
|
1790
|
+
items: components["schemas"]["AiUsageSpendKeyInsightItemDto"][];
|
|
1791
|
+
};
|
|
1792
|
+
/**
|
|
1793
|
+
* @description **measured** — derived from scoped productivity ingest (`aiAdoption.aiAssistedContributionRatioPercent`). **estimated** — derived from AI-tool token volume heuristics when ingest ratios are absent for that bucket.
|
|
1794
|
+
* @enum {string}
|
|
1795
|
+
*/
|
|
1796
|
+
AiAssistedCodeDataQuality: "estimated" | "measured";
|
|
1797
|
+
AiUsageSpendAiAssistedCodeWeekDto: {
|
|
1798
|
+
/** Format: date-time */
|
|
1799
|
+
bucketStart: string;
|
|
1800
|
+
/** Format: date-time */
|
|
1801
|
+
bucketEnd: string;
|
|
1802
|
+
weekLabel?: string;
|
|
1803
|
+
aiAssistedCodePercent: number;
|
|
1804
|
+
totalLoc: number;
|
|
1805
|
+
aiLoc: number;
|
|
1806
|
+
humanLoc: number;
|
|
1807
|
+
dataQuality: components["schemas"]["AiAssistedCodeDataQuality"];
|
|
1808
|
+
};
|
|
1809
|
+
AiUsageSpendAiAssistedCodePercentageDto: {
|
|
1810
|
+
/** Format: uuid */
|
|
1811
|
+
workspaceId: string;
|
|
1812
|
+
/** @enum {string} */
|
|
1813
|
+
range: "4w" | "8w" | "q";
|
|
1814
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1815
|
+
/** Format: date-time */
|
|
1816
|
+
generatedAt: string;
|
|
1817
|
+
/** @description Portfolio AI-assisted code share for the selected period (0–100). */
|
|
1818
|
+
aiAssistedCodePercent: number;
|
|
1819
|
+
/** @description Period rollup quality. **measured** only when every weekly bucket in `weeks` used ingest ratios; otherwise **estimated** (including mixed ingest/heuristic weeks). */
|
|
1820
|
+
dataQuality: components["schemas"]["AiAssistedCodeDataQuality"];
|
|
1821
|
+
/** @description Change in AI-assisted code share vs the prior half of the range (percentage points). */
|
|
1822
|
+
deltaVsPriorPeriodPercent: number;
|
|
1823
|
+
totalLoc: number;
|
|
1824
|
+
aiLoc: number;
|
|
1825
|
+
humanLoc: number;
|
|
1826
|
+
/** @default 50 */
|
|
1827
|
+
targetMinPercent: number;
|
|
1828
|
+
/** @default 75 */
|
|
1829
|
+
targetMaxPercent: number;
|
|
1830
|
+
weeks: components["schemas"]["AiUsageSpendAiAssistedCodeWeekDto"][];
|
|
1831
|
+
};
|
|
1832
|
+
AiUsageSpendAiToolUsageSpendProviderItemDto: {
|
|
1833
|
+
providerId: string;
|
|
1834
|
+
providerName: string;
|
|
1835
|
+
tokenCount: number;
|
|
1836
|
+
spendCents: number;
|
|
1837
|
+
activeUsers: number;
|
|
1838
|
+
};
|
|
1839
|
+
AiUsageSpendAiToolUsageSpendModelItemDto: {
|
|
1840
|
+
providerId: string;
|
|
1841
|
+
providerName: string;
|
|
1842
|
+
modelName: string;
|
|
1843
|
+
tokenCount: number;
|
|
1844
|
+
spendCents: number;
|
|
1845
|
+
};
|
|
1846
|
+
AiUsageSpendAiToolUsageSpendDto: {
|
|
1847
|
+
/** Format: uuid */
|
|
1848
|
+
workspaceId: string;
|
|
1849
|
+
/** @enum {string} */
|
|
1850
|
+
range: "4w" | "8w" | "q";
|
|
1851
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1852
|
+
/** Format: date-time */
|
|
1853
|
+
generatedAt: string;
|
|
1854
|
+
totalEngineers: number;
|
|
1855
|
+
providers: components["schemas"]["AiUsageSpendAiToolUsageSpendProviderItemDto"][];
|
|
1856
|
+
models: components["schemas"]["AiUsageSpendAiToolUsageSpendModelItemDto"][];
|
|
1857
|
+
};
|
|
1858
|
+
AiUsageSpendTeamToolHeatmapDto: {
|
|
1859
|
+
/** Format: uuid */
|
|
1860
|
+
workspaceId: string;
|
|
1861
|
+
/** @enum {string} */
|
|
1862
|
+
range: "4w" | "8w" | "q";
|
|
1863
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1864
|
+
/** Format: date-time */
|
|
1865
|
+
generatedAt: string;
|
|
1866
|
+
teams: components["schemas"]["AiUsageSpendAggregatedTeamRowDto"][];
|
|
1867
|
+
};
|
|
1868
|
+
AiUsageSpendRoiProductivitySignalWeekDto: {
|
|
1869
|
+
/** Format: date-time */
|
|
1870
|
+
bucketStart: string;
|
|
1871
|
+
/** Format: date-time */
|
|
1872
|
+
bucketEnd: string;
|
|
1873
|
+
weekLabel?: string;
|
|
1874
|
+
/** @description Estimated merged PR count in the bucket from dashboard velocity metrics. */
|
|
1875
|
+
mergedPrCount: number;
|
|
1876
|
+
/** @description Total AI-tool tokens consumed in the bucket. */
|
|
1877
|
+
tokenCount: number;
|
|
1878
|
+
};
|
|
1879
|
+
AiUsageSpendRoiProductivitySignalDto: {
|
|
1880
|
+
/** Format: uuid */
|
|
1881
|
+
workspaceId: string;
|
|
1882
|
+
/** @enum {string} */
|
|
1883
|
+
range: "4w" | "8w" | "q";
|
|
1884
|
+
scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
|
|
1885
|
+
/** Format: date-time */
|
|
1886
|
+
generatedAt: string;
|
|
1887
|
+
totalMergedPrs: number;
|
|
1888
|
+
totalSpendCents: number;
|
|
1889
|
+
activeUsers: number;
|
|
1890
|
+
totalEngineers: number;
|
|
1891
|
+
/** @description Share of merged PRs estimated to be AI-assisted (0–1). */
|
|
1892
|
+
aiAssistedPrRatio: number;
|
|
1893
|
+
/** @description Percent change in merged PR throughput (recent half vs prior half of range). */
|
|
1894
|
+
prThroughputDeltaPercent: number;
|
|
1895
|
+
/** @description Percent change in token usage (recent half vs prior half of range). */
|
|
1896
|
+
usageDeltaPercent: number;
|
|
1897
|
+
weeks: components["schemas"]["AiUsageSpendRoiProductivitySignalWeekDto"][];
|
|
1898
|
+
};
|
|
1899
|
+
MeProfileDto: {
|
|
1900
|
+
id: string;
|
|
1901
|
+
email: string;
|
|
1902
|
+
name: string;
|
|
1903
|
+
roles: string[];
|
|
1904
|
+
defaultWorkspaceId?: string | null;
|
|
1905
|
+
};
|
|
1906
|
+
UpdateMeBodyDto: {
|
|
1907
|
+
name?: string;
|
|
1908
|
+
email?: string;
|
|
1909
|
+
defaultWorkspaceId?: string | null;
|
|
1910
|
+
};
|
|
1911
|
+
WorkspaceSummaryDto: {
|
|
1912
|
+
id: string;
|
|
1913
|
+
slug: string;
|
|
1914
|
+
name: string;
|
|
1915
|
+
status: string;
|
|
1916
|
+
};
|
|
1917
|
+
WorkspacesForUserDto: {
|
|
1918
|
+
workspaces: components["schemas"]["WorkspaceSummaryDto"][];
|
|
1919
|
+
};
|
|
1920
|
+
CreateWorkspaceBodyDto: {
|
|
1921
|
+
slug: string;
|
|
1922
|
+
name: string;
|
|
1923
|
+
};
|
|
1924
|
+
CompanyProfileDto: {
|
|
1925
|
+
companyName: string;
|
|
1926
|
+
industry: string;
|
|
1927
|
+
industryOther?: string;
|
|
1928
|
+
/** @description One of 1-50 | 51-200 | 201-500 | 501-1000 | 1000+ */
|
|
1283
1929
|
companySize: string;
|
|
1284
1930
|
engineeringHC: string;
|
|
1285
1931
|
headquarters: string;
|
|
@@ -1300,6 +1946,17 @@ export interface components {
|
|
|
1300
1946
|
language?: string | null;
|
|
1301
1947
|
private?: boolean | null;
|
|
1302
1948
|
};
|
|
1949
|
+
GithubMissingPermissionDto: {
|
|
1950
|
+
/** @description GitHub App permission key (e.g. contents, pull_requests). */
|
|
1951
|
+
name: string;
|
|
1952
|
+
/** @enum {string} */
|
|
1953
|
+
required: "read" | "write" | "admin";
|
|
1954
|
+
/**
|
|
1955
|
+
* @description Null when the installation has not granted this permission.
|
|
1956
|
+
* @enum {string|null}
|
|
1957
|
+
*/
|
|
1958
|
+
granted?: "read" | "write" | "admin" | null;
|
|
1959
|
+
};
|
|
1303
1960
|
GithubInstallationSummaryDto: {
|
|
1304
1961
|
installationId: string;
|
|
1305
1962
|
account: components["schemas"]["GithubAccountDto"];
|
|
@@ -1308,10 +1965,17 @@ export interface components {
|
|
|
1308
1965
|
manageUrl?: string | null;
|
|
1309
1966
|
/** Format: date-time */
|
|
1310
1967
|
lastSyncedAt?: string | null;
|
|
1968
|
+
/** @description True when this installation's granted permissions are below what the ThinkAI GitHub App currently requests. */
|
|
1969
|
+
permissionsUpgradeRequired: boolean;
|
|
1970
|
+
missingPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
|
|
1971
|
+
/** @description Human-readable summary for UI when permissionsUpgradeRequired is true. */
|
|
1972
|
+
upgradeMessage?: string | null;
|
|
1311
1973
|
};
|
|
1312
1974
|
GithubInstallationStatusDto: {
|
|
1313
1975
|
installed: boolean;
|
|
1314
1976
|
installations: components["schemas"]["GithubInstallationSummaryDto"][];
|
|
1977
|
+
/** @description True if any connected installation is under-permissioned. */
|
|
1978
|
+
permissionsUpgradeRequired: boolean;
|
|
1315
1979
|
installationId?: string | null;
|
|
1316
1980
|
account?: components["schemas"]["GithubAccountDto"] | null;
|
|
1317
1981
|
repos?: components["schemas"]["GithubInstalledRepoDto"][] | null;
|
|
@@ -1786,6 +2450,8 @@ export interface components {
|
|
|
1786
2450
|
ProjectId: string;
|
|
1787
2451
|
NotificationId: string;
|
|
1788
2452
|
FixId: string;
|
|
2453
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
2454
|
+
InsightsDepartmentFilter: string;
|
|
1789
2455
|
};
|
|
1790
2456
|
requestBodies: never;
|
|
1791
2457
|
headers: never;
|
|
@@ -1815,6 +2481,42 @@ export type AiToolRefreshResponseDto = components['schemas']['AiToolRefreshRespo
|
|
|
1815
2481
|
export type DashboardProductivityMetricsDto = components['schemas']['DashboardProductivityMetricsDto'];
|
|
1816
2482
|
export type DashboardProductivityDto = components['schemas']['DashboardProductivityDto'];
|
|
1817
2483
|
export type DashboardProductivityHistoryDto = components['schemas']['DashboardProductivityHistoryDto'];
|
|
2484
|
+
export type ProductivityInsightsAggregatedTeamsScopeDto = components['schemas']['ProductivityInsightsAggregatedTeamsScopeDto'];
|
|
2485
|
+
export type ProductivityInsightsAggregatedTeamWeekDto = components['schemas']['ProductivityInsightsAggregatedTeamWeekDto'];
|
|
2486
|
+
export type ProductivityInsightsAggregatedTeamRowDto = components['schemas']['ProductivityInsightsAggregatedTeamRowDto'];
|
|
2487
|
+
export type ProductivityInsightsAggregatedTeamsDto = components['schemas']['ProductivityInsightsAggregatedTeamsDto'];
|
|
2488
|
+
export type ProductivityInsightsMergedPrTrendWeekDto = components['schemas']['ProductivityInsightsMergedPrTrendWeekDto'];
|
|
2489
|
+
export type ProductivityInsightsMergedPrContributorRowDto = components['schemas']['ProductivityInsightsMergedPrContributorRowDto'];
|
|
2490
|
+
export type ProductivityInsightsMergedPrTrendsDto = components['schemas']['ProductivityInsightsMergedPrTrendsDto'];
|
|
2491
|
+
export type ProductivityInsightsTeamLeaderItemDto = components['schemas']['ProductivityInsightsTeamLeaderItemDto'];
|
|
2492
|
+
export type ProductivityInsightsTeamSummaryDto = components['schemas']['ProductivityInsightsTeamSummaryDto'];
|
|
2493
|
+
export type ProductivityInsightsTeamDetailDto = components['schemas']['ProductivityInsightsTeamDetailDto'];
|
|
2494
|
+
export type ProductivityInsightsTeamsResponseDto = components['schemas']['ProductivityInsightsTeamsResponseDto'];
|
|
2495
|
+
export type ProductivityInsightsContributorProfileDto = components['schemas']['ProductivityInsightsContributorProfileDto'];
|
|
2496
|
+
export type ProductivityInsightsContributorActivityDayDto = components['schemas']['ProductivityInsightsContributorActivityDayDto'];
|
|
2497
|
+
export type ProductivityInsightsContributorActivityWeekDto = components['schemas']['ProductivityInsightsContributorActivityWeekDto'];
|
|
2498
|
+
export type ProductivityInsightsContributorActivitySummaryDto = components['schemas']['ProductivityInsightsContributorActivitySummaryDto'];
|
|
2499
|
+
export type ProductivityInsightsContributorDetailDto = components['schemas']['ProductivityInsightsContributorDetailDto'];
|
|
2500
|
+
export type ProductivityInsightsNeedsAttentionItemDto = components['schemas']['ProductivityInsightsNeedsAttentionItemDto'];
|
|
2501
|
+
export type ProductivityInsightsNeedsAttentionDto = components['schemas']['ProductivityInsightsNeedsAttentionDto'];
|
|
2502
|
+
export type AiUsageSpendAggregatedTeamWeekDto = components['schemas']['AiUsageSpendAggregatedTeamWeekDto'];
|
|
2503
|
+
export type AiUsageSpendAggregatedTeamRowDto = components['schemas']['AiUsageSpendAggregatedTeamRowDto'];
|
|
2504
|
+
export type AiUsageSpendAggregatedTeamsSummaryDto = components['schemas']['AiUsageSpendAggregatedTeamsSummaryDto'];
|
|
2505
|
+
export type AiUsageSpendAggregatedTeamsDto = components['schemas']['AiUsageSpendAggregatedTeamsDto'];
|
|
2506
|
+
export type AiUsageSpendAggregatedContributorRowDto = components['schemas']['AiUsageSpendAggregatedContributorRowDto'];
|
|
2507
|
+
export type AiUsageSpendAggregatedContributorsDto = components['schemas']['AiUsageSpendAggregatedContributorsDto'];
|
|
2508
|
+
export type AiUsageSpendContributorToolHeatmapDto = components['schemas']['AiUsageSpendContributorToolHeatmapDto'];
|
|
2509
|
+
export type AiUsageSpendKeyInsightItemDto = components['schemas']['AiUsageSpendKeyInsightItemDto'];
|
|
2510
|
+
export type AiUsageSpendKeyInsightsDto = components['schemas']['AiUsageSpendKeyInsightsDto'];
|
|
2511
|
+
export type AiAssistedCodeDataQuality = components['schemas']['AiAssistedCodeDataQuality'];
|
|
2512
|
+
export type AiUsageSpendAiAssistedCodeWeekDto = components['schemas']['AiUsageSpendAiAssistedCodeWeekDto'];
|
|
2513
|
+
export type AiUsageSpendAiAssistedCodePercentageDto = components['schemas']['AiUsageSpendAiAssistedCodePercentageDto'];
|
|
2514
|
+
export type AiUsageSpendAiToolUsageSpendProviderItemDto = components['schemas']['AiUsageSpendAiToolUsageSpendProviderItemDto'];
|
|
2515
|
+
export type AiUsageSpendAiToolUsageSpendModelItemDto = components['schemas']['AiUsageSpendAiToolUsageSpendModelItemDto'];
|
|
2516
|
+
export type AiUsageSpendAiToolUsageSpendDto = components['schemas']['AiUsageSpendAiToolUsageSpendDto'];
|
|
2517
|
+
export type AiUsageSpendTeamToolHeatmapDto = components['schemas']['AiUsageSpendTeamToolHeatmapDto'];
|
|
2518
|
+
export type AiUsageSpendRoiProductivitySignalWeekDto = components['schemas']['AiUsageSpendRoiProductivitySignalWeekDto'];
|
|
2519
|
+
export type AiUsageSpendRoiProductivitySignalDto = components['schemas']['AiUsageSpendRoiProductivitySignalDto'];
|
|
1818
2520
|
export type MeProfileDto = components['schemas']['MeProfileDto'];
|
|
1819
2521
|
export type UpdateMeBodyDto = components['schemas']['UpdateMeBodyDto'];
|
|
1820
2522
|
export type WorkspaceSummaryDto = components['schemas']['WorkspaceSummaryDto'];
|
|
@@ -1823,6 +2525,7 @@ export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyD
|
|
|
1823
2525
|
export type CompanyProfileDto = components['schemas']['CompanyProfileDto'];
|
|
1824
2526
|
export type GithubAccountDto = components['schemas']['GithubAccountDto'];
|
|
1825
2527
|
export type GithubInstalledRepoDto = components['schemas']['GithubInstalledRepoDto'];
|
|
2528
|
+
export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
|
|
1826
2529
|
export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
|
|
1827
2530
|
export type GithubInstallationStatusDto = components['schemas']['GithubInstallationStatusDto'];
|
|
1828
2531
|
export type GithubInstallUrlRequestDto = components['schemas']['GithubInstallUrlRequestDto'];
|
|
@@ -1887,6 +2590,7 @@ export type ParameterRepoId = components['parameters']['RepoId'];
|
|
|
1887
2590
|
export type ParameterProjectId = components['parameters']['ProjectId'];
|
|
1888
2591
|
export type ParameterNotificationId = components['parameters']['NotificationId'];
|
|
1889
2592
|
export type ParameterFixId = components['parameters']['FixId'];
|
|
2593
|
+
export type ParameterInsightsDepartmentFilter = components['parameters']['InsightsDepartmentFilter'];
|
|
1890
2594
|
export type $defs = Record<string, never>;
|
|
1891
2595
|
export interface operations {
|
|
1892
2596
|
getMe: {
|
|
@@ -2402,6 +3106,692 @@ export interface operations {
|
|
|
2402
3106
|
401: components["responses"]["Unauthorized"];
|
|
2403
3107
|
};
|
|
2404
3108
|
};
|
|
3109
|
+
getProductivityInsightsAggregatedTeams: {
|
|
3110
|
+
parameters: {
|
|
3111
|
+
query?: {
|
|
3112
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3113
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3114
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3115
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3116
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3117
|
+
team?: string;
|
|
3118
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3119
|
+
windowEnd?: string;
|
|
3120
|
+
};
|
|
3121
|
+
header?: never;
|
|
3122
|
+
path: {
|
|
3123
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3124
|
+
};
|
|
3125
|
+
cookie?: never;
|
|
3126
|
+
};
|
|
3127
|
+
requestBody?: never;
|
|
3128
|
+
responses: {
|
|
3129
|
+
/** @description Aggregated team productivity series */
|
|
3130
|
+
200: {
|
|
3131
|
+
headers: {
|
|
3132
|
+
[name: string]: unknown;
|
|
3133
|
+
};
|
|
3134
|
+
content: {
|
|
3135
|
+
"application/json": components["schemas"]["ProductivityInsightsAggregatedTeamsDto"];
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3138
|
+
/** @description Invalid query parameters */
|
|
3139
|
+
400: {
|
|
3140
|
+
headers: {
|
|
3141
|
+
[name: string]: unknown;
|
|
3142
|
+
};
|
|
3143
|
+
content: {
|
|
3144
|
+
"application/json": {
|
|
3145
|
+
/** @example invalid_query */
|
|
3146
|
+
error: string;
|
|
3147
|
+
};
|
|
3148
|
+
};
|
|
3149
|
+
};
|
|
3150
|
+
401: components["responses"]["Unauthorized"];
|
|
3151
|
+
403: components["responses"]["Forbidden"];
|
|
3152
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3153
|
+
404: {
|
|
3154
|
+
headers: {
|
|
3155
|
+
[name: string]: unknown;
|
|
3156
|
+
};
|
|
3157
|
+
content?: never;
|
|
3158
|
+
};
|
|
3159
|
+
};
|
|
3160
|
+
};
|
|
3161
|
+
getProductivityInsightsMergedPrTrends: {
|
|
3162
|
+
parameters: {
|
|
3163
|
+
query?: {
|
|
3164
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3165
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3166
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3167
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3168
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3169
|
+
team?: string;
|
|
3170
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3171
|
+
windowEnd?: string;
|
|
3172
|
+
};
|
|
3173
|
+
header?: never;
|
|
3174
|
+
path: {
|
|
3175
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3176
|
+
};
|
|
3177
|
+
cookie?: never;
|
|
3178
|
+
};
|
|
3179
|
+
requestBody?: never;
|
|
3180
|
+
responses: {
|
|
3181
|
+
/** @description Portfolio and per-contributor merged PR weekly series */
|
|
3182
|
+
200: {
|
|
3183
|
+
headers: {
|
|
3184
|
+
[name: string]: unknown;
|
|
3185
|
+
};
|
|
3186
|
+
content: {
|
|
3187
|
+
"application/json": components["schemas"]["ProductivityInsightsMergedPrTrendsDto"];
|
|
3188
|
+
};
|
|
3189
|
+
};
|
|
3190
|
+
/** @description Invalid query parameters */
|
|
3191
|
+
400: {
|
|
3192
|
+
headers: {
|
|
3193
|
+
[name: string]: unknown;
|
|
3194
|
+
};
|
|
3195
|
+
content: {
|
|
3196
|
+
"application/json": {
|
|
3197
|
+
/** @example invalid_query */
|
|
3198
|
+
error: string;
|
|
3199
|
+
};
|
|
3200
|
+
};
|
|
3201
|
+
};
|
|
3202
|
+
401: components["responses"]["Unauthorized"];
|
|
3203
|
+
403: components["responses"]["Forbidden"];
|
|
3204
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3205
|
+
404: {
|
|
3206
|
+
headers: {
|
|
3207
|
+
[name: string]: unknown;
|
|
3208
|
+
};
|
|
3209
|
+
content?: never;
|
|
3210
|
+
};
|
|
3211
|
+
};
|
|
3212
|
+
};
|
|
3213
|
+
getProductivityInsightsTeams: {
|
|
3214
|
+
parameters: {
|
|
3215
|
+
query?: {
|
|
3216
|
+
/** @description When set, return drilldown for this org-chart team id instead of the top-team list. */
|
|
3217
|
+
teamId?: string;
|
|
3218
|
+
/** @description Maximum top-team rows when `teamId` is omitted (UI default 3). */
|
|
3219
|
+
limit?: number;
|
|
3220
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3221
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3222
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3223
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3224
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3225
|
+
team?: string;
|
|
3226
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3227
|
+
windowEnd?: string;
|
|
3228
|
+
};
|
|
3229
|
+
header?: never;
|
|
3230
|
+
path: {
|
|
3231
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3232
|
+
};
|
|
3233
|
+
cookie?: never;
|
|
3234
|
+
};
|
|
3235
|
+
requestBody?: never;
|
|
3236
|
+
responses: {
|
|
3237
|
+
/** @description Top teams list or single-team drilldown */
|
|
3238
|
+
200: {
|
|
3239
|
+
headers: {
|
|
3240
|
+
[name: string]: unknown;
|
|
3241
|
+
};
|
|
3242
|
+
content: {
|
|
3243
|
+
"application/json": components["schemas"]["ProductivityInsightsTeamsResponseDto"];
|
|
3244
|
+
};
|
|
3245
|
+
};
|
|
3246
|
+
/** @description Invalid query parameters */
|
|
3247
|
+
400: {
|
|
3248
|
+
headers: {
|
|
3249
|
+
[name: string]: unknown;
|
|
3250
|
+
};
|
|
3251
|
+
content: {
|
|
3252
|
+
"application/json": {
|
|
3253
|
+
/** @example invalid_query */
|
|
3254
|
+
error: string;
|
|
3255
|
+
};
|
|
3256
|
+
};
|
|
3257
|
+
};
|
|
3258
|
+
401: components["responses"]["Unauthorized"];
|
|
3259
|
+
403: components["responses"]["Forbidden"];
|
|
3260
|
+
/** @description Workspace or team not found */
|
|
3261
|
+
404: {
|
|
3262
|
+
headers: {
|
|
3263
|
+
[name: string]: unknown;
|
|
3264
|
+
};
|
|
3265
|
+
content?: never;
|
|
3266
|
+
};
|
|
3267
|
+
};
|
|
3268
|
+
};
|
|
3269
|
+
getProductivityInsightsContributor: {
|
|
3270
|
+
parameters: {
|
|
3271
|
+
query?: {
|
|
3272
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3273
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3274
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3275
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3276
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3277
|
+
team?: string;
|
|
3278
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3279
|
+
windowEnd?: string;
|
|
3280
|
+
};
|
|
3281
|
+
header?: never;
|
|
3282
|
+
path: {
|
|
3283
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3284
|
+
/** @description Org-chart person id (e.g. email from `person_id` external id). */
|
|
3285
|
+
contributorId: string;
|
|
3286
|
+
};
|
|
3287
|
+
cookie?: never;
|
|
3288
|
+
};
|
|
3289
|
+
requestBody?: never;
|
|
3290
|
+
responses: {
|
|
3291
|
+
/** @description Contributor activity drilldown */
|
|
3292
|
+
200: {
|
|
3293
|
+
headers: {
|
|
3294
|
+
[name: string]: unknown;
|
|
3295
|
+
};
|
|
3296
|
+
content: {
|
|
3297
|
+
"application/json": components["schemas"]["ProductivityInsightsContributorDetailDto"];
|
|
3298
|
+
};
|
|
3299
|
+
};
|
|
3300
|
+
/** @description Invalid query parameters */
|
|
3301
|
+
400: {
|
|
3302
|
+
headers: {
|
|
3303
|
+
[name: string]: unknown;
|
|
3304
|
+
};
|
|
3305
|
+
content: {
|
|
3306
|
+
"application/json": {
|
|
3307
|
+
/** @example invalid_query */
|
|
3308
|
+
error: string;
|
|
3309
|
+
};
|
|
3310
|
+
};
|
|
3311
|
+
};
|
|
3312
|
+
401: components["responses"]["Unauthorized"];
|
|
3313
|
+
403: components["responses"]["Forbidden"];
|
|
3314
|
+
/** @description Workspace or contributor not found */
|
|
3315
|
+
404: {
|
|
3316
|
+
headers: {
|
|
3317
|
+
[name: string]: unknown;
|
|
3318
|
+
};
|
|
3319
|
+
content?: never;
|
|
3320
|
+
};
|
|
3321
|
+
};
|
|
3322
|
+
};
|
|
3323
|
+
getProductivityInsightsNeedsAttention: {
|
|
3324
|
+
parameters: {
|
|
3325
|
+
query?: {
|
|
3326
|
+
/** @description Rank teams (Aggregated Teams tab) or contributors (Individual Contributors tab). */
|
|
3327
|
+
entityType?: "teams" | "contributors";
|
|
3328
|
+
/** @description Maximum number of laggard rows to return (UI default 3). */
|
|
3329
|
+
limit?: number;
|
|
3330
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3331
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3332
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3333
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3334
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3335
|
+
team?: string;
|
|
3336
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3337
|
+
windowEnd?: string;
|
|
3338
|
+
};
|
|
3339
|
+
header?: never;
|
|
3340
|
+
path: {
|
|
3341
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3342
|
+
};
|
|
3343
|
+
cookie?: never;
|
|
3344
|
+
};
|
|
3345
|
+
requestBody?: never;
|
|
3346
|
+
responses: {
|
|
3347
|
+
/** @description Bottom performers for the needs-attention widget */
|
|
3348
|
+
200: {
|
|
3349
|
+
headers: {
|
|
3350
|
+
[name: string]: unknown;
|
|
3351
|
+
};
|
|
3352
|
+
content: {
|
|
3353
|
+
"application/json": components["schemas"]["ProductivityInsightsNeedsAttentionDto"];
|
|
3354
|
+
};
|
|
3355
|
+
};
|
|
3356
|
+
/** @description Invalid query parameters */
|
|
3357
|
+
400: {
|
|
3358
|
+
headers: {
|
|
3359
|
+
[name: string]: unknown;
|
|
3360
|
+
};
|
|
3361
|
+
content: {
|
|
3362
|
+
"application/json": {
|
|
3363
|
+
/** @example invalid_query */
|
|
3364
|
+
error: string;
|
|
3365
|
+
};
|
|
3366
|
+
};
|
|
3367
|
+
};
|
|
3368
|
+
401: components["responses"]["Unauthorized"];
|
|
3369
|
+
403: components["responses"]["Forbidden"];
|
|
3370
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3371
|
+
404: {
|
|
3372
|
+
headers: {
|
|
3373
|
+
[name: string]: unknown;
|
|
3374
|
+
};
|
|
3375
|
+
content?: never;
|
|
3376
|
+
};
|
|
3377
|
+
};
|
|
3378
|
+
};
|
|
3379
|
+
getAiUsageSpendAggregatedTeams: {
|
|
3380
|
+
parameters: {
|
|
3381
|
+
query?: {
|
|
3382
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3383
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3384
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3385
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3386
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3387
|
+
team?: string;
|
|
3388
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3389
|
+
windowEnd?: string;
|
|
3390
|
+
};
|
|
3391
|
+
header?: never;
|
|
3392
|
+
path: {
|
|
3393
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3394
|
+
};
|
|
3395
|
+
cookie?: never;
|
|
3396
|
+
};
|
|
3397
|
+
requestBody?: never;
|
|
3398
|
+
responses: {
|
|
3399
|
+
/** @description Aggregated team AI usage and spend series */
|
|
3400
|
+
200: {
|
|
3401
|
+
headers: {
|
|
3402
|
+
[name: string]: unknown;
|
|
3403
|
+
};
|
|
3404
|
+
content: {
|
|
3405
|
+
"application/json": components["schemas"]["AiUsageSpendAggregatedTeamsDto"];
|
|
3406
|
+
};
|
|
3407
|
+
};
|
|
3408
|
+
/** @description Invalid query parameters */
|
|
3409
|
+
400: {
|
|
3410
|
+
headers: {
|
|
3411
|
+
[name: string]: unknown;
|
|
3412
|
+
};
|
|
3413
|
+
content: {
|
|
3414
|
+
"application/json": {
|
|
3415
|
+
/** @example invalid_query */
|
|
3416
|
+
error: string;
|
|
3417
|
+
};
|
|
3418
|
+
};
|
|
3419
|
+
};
|
|
3420
|
+
401: components["responses"]["Unauthorized"];
|
|
3421
|
+
403: components["responses"]["Forbidden"];
|
|
3422
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3423
|
+
404: {
|
|
3424
|
+
headers: {
|
|
3425
|
+
[name: string]: unknown;
|
|
3426
|
+
};
|
|
3427
|
+
content?: never;
|
|
3428
|
+
};
|
|
3429
|
+
};
|
|
3430
|
+
};
|
|
3431
|
+
getAiUsageSpendAggregatedContributors: {
|
|
3432
|
+
parameters: {
|
|
3433
|
+
query?: {
|
|
3434
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3435
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3436
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3437
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3438
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3439
|
+
team?: string;
|
|
3440
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3441
|
+
windowEnd?: string;
|
|
3442
|
+
};
|
|
3443
|
+
header?: never;
|
|
3444
|
+
path: {
|
|
3445
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3446
|
+
};
|
|
3447
|
+
cookie?: never;
|
|
3448
|
+
};
|
|
3449
|
+
requestBody?: never;
|
|
3450
|
+
responses: {
|
|
3451
|
+
/** @description Aggregated contributor AI usage and spend series */
|
|
3452
|
+
200: {
|
|
3453
|
+
headers: {
|
|
3454
|
+
[name: string]: unknown;
|
|
3455
|
+
};
|
|
3456
|
+
content: {
|
|
3457
|
+
"application/json": components["schemas"]["AiUsageSpendAggregatedContributorsDto"];
|
|
3458
|
+
};
|
|
3459
|
+
};
|
|
3460
|
+
/** @description Invalid query parameters */
|
|
3461
|
+
400: {
|
|
3462
|
+
headers: {
|
|
3463
|
+
[name: string]: unknown;
|
|
3464
|
+
};
|
|
3465
|
+
content: {
|
|
3466
|
+
"application/json": {
|
|
3467
|
+
/** @example invalid_query */
|
|
3468
|
+
error: string;
|
|
3469
|
+
};
|
|
3470
|
+
};
|
|
3471
|
+
};
|
|
3472
|
+
401: components["responses"]["Unauthorized"];
|
|
3473
|
+
403: components["responses"]["Forbidden"];
|
|
3474
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3475
|
+
404: {
|
|
3476
|
+
headers: {
|
|
3477
|
+
[name: string]: unknown;
|
|
3478
|
+
};
|
|
3479
|
+
content?: never;
|
|
3480
|
+
};
|
|
3481
|
+
};
|
|
3482
|
+
};
|
|
3483
|
+
getAiUsageSpendContributorToolHeatmap: {
|
|
3484
|
+
parameters: {
|
|
3485
|
+
query?: {
|
|
3486
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3487
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3488
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3489
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3490
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3491
|
+
team?: string;
|
|
3492
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3493
|
+
windowEnd?: string;
|
|
3494
|
+
};
|
|
3495
|
+
header?: never;
|
|
3496
|
+
path: {
|
|
3497
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3498
|
+
};
|
|
3499
|
+
cookie?: never;
|
|
3500
|
+
};
|
|
3501
|
+
requestBody?: never;
|
|
3502
|
+
responses: {
|
|
3503
|
+
/** @description Contributor heatmap rows for AI usage and spend */
|
|
3504
|
+
200: {
|
|
3505
|
+
headers: {
|
|
3506
|
+
[name: string]: unknown;
|
|
3507
|
+
};
|
|
3508
|
+
content: {
|
|
3509
|
+
"application/json": components["schemas"]["AiUsageSpendContributorToolHeatmapDto"];
|
|
3510
|
+
};
|
|
3511
|
+
};
|
|
3512
|
+
/** @description Invalid query parameters */
|
|
3513
|
+
400: {
|
|
3514
|
+
headers: {
|
|
3515
|
+
[name: string]: unknown;
|
|
3516
|
+
};
|
|
3517
|
+
content: {
|
|
3518
|
+
"application/json": {
|
|
3519
|
+
/** @example invalid_query */
|
|
3520
|
+
error: string;
|
|
3521
|
+
};
|
|
3522
|
+
};
|
|
3523
|
+
};
|
|
3524
|
+
401: components["responses"]["Unauthorized"];
|
|
3525
|
+
403: components["responses"]["Forbidden"];
|
|
3526
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3527
|
+
404: {
|
|
3528
|
+
headers: {
|
|
3529
|
+
[name: string]: unknown;
|
|
3530
|
+
};
|
|
3531
|
+
content?: never;
|
|
3532
|
+
};
|
|
3533
|
+
};
|
|
3534
|
+
};
|
|
3535
|
+
getAiUsageSpendKeyInsights: {
|
|
3536
|
+
parameters: {
|
|
3537
|
+
query?: {
|
|
3538
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3539
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3540
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3541
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3542
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3543
|
+
team?: string;
|
|
3544
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3545
|
+
windowEnd?: string;
|
|
3546
|
+
};
|
|
3547
|
+
header?: never;
|
|
3548
|
+
path: {
|
|
3549
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3550
|
+
};
|
|
3551
|
+
cookie?: never;
|
|
3552
|
+
};
|
|
3553
|
+
requestBody?: never;
|
|
3554
|
+
responses: {
|
|
3555
|
+
/** @description Key insight cards for the AI usage & spend panel */
|
|
3556
|
+
200: {
|
|
3557
|
+
headers: {
|
|
3558
|
+
[name: string]: unknown;
|
|
3559
|
+
};
|
|
3560
|
+
content: {
|
|
3561
|
+
"application/json": components["schemas"]["AiUsageSpendKeyInsightsDto"];
|
|
3562
|
+
};
|
|
3563
|
+
};
|
|
3564
|
+
/** @description Invalid query parameters */
|
|
3565
|
+
400: {
|
|
3566
|
+
headers: {
|
|
3567
|
+
[name: string]: unknown;
|
|
3568
|
+
};
|
|
3569
|
+
content: {
|
|
3570
|
+
"application/json": {
|
|
3571
|
+
/** @example invalid_query */
|
|
3572
|
+
error: string;
|
|
3573
|
+
};
|
|
3574
|
+
};
|
|
3575
|
+
};
|
|
3576
|
+
401: components["responses"]["Unauthorized"];
|
|
3577
|
+
403: components["responses"]["Forbidden"];
|
|
3578
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3579
|
+
404: {
|
|
3580
|
+
headers: {
|
|
3581
|
+
[name: string]: unknown;
|
|
3582
|
+
};
|
|
3583
|
+
content?: never;
|
|
3584
|
+
};
|
|
3585
|
+
};
|
|
3586
|
+
};
|
|
3587
|
+
getAiUsageSpendAiAssistedCodePercentage: {
|
|
3588
|
+
parameters: {
|
|
3589
|
+
query?: {
|
|
3590
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3591
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3592
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3593
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3594
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3595
|
+
team?: string;
|
|
3596
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3597
|
+
windowEnd?: string;
|
|
3598
|
+
};
|
|
3599
|
+
header?: never;
|
|
3600
|
+
path: {
|
|
3601
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3602
|
+
};
|
|
3603
|
+
cookie?: never;
|
|
3604
|
+
};
|
|
3605
|
+
requestBody?: never;
|
|
3606
|
+
responses: {
|
|
3607
|
+
/** @description AI-assisted code percentage series */
|
|
3608
|
+
200: {
|
|
3609
|
+
headers: {
|
|
3610
|
+
[name: string]: unknown;
|
|
3611
|
+
};
|
|
3612
|
+
content: {
|
|
3613
|
+
"application/json": components["schemas"]["AiUsageSpendAiAssistedCodePercentageDto"];
|
|
3614
|
+
};
|
|
3615
|
+
};
|
|
3616
|
+
/** @description Invalid query parameters */
|
|
3617
|
+
400: {
|
|
3618
|
+
headers: {
|
|
3619
|
+
[name: string]: unknown;
|
|
3620
|
+
};
|
|
3621
|
+
content: {
|
|
3622
|
+
"application/json": {
|
|
3623
|
+
/** @example invalid_query */
|
|
3624
|
+
error: string;
|
|
3625
|
+
};
|
|
3626
|
+
};
|
|
3627
|
+
};
|
|
3628
|
+
401: components["responses"]["Unauthorized"];
|
|
3629
|
+
403: components["responses"]["Forbidden"];
|
|
3630
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3631
|
+
404: {
|
|
3632
|
+
headers: {
|
|
3633
|
+
[name: string]: unknown;
|
|
3634
|
+
};
|
|
3635
|
+
content?: never;
|
|
3636
|
+
};
|
|
3637
|
+
};
|
|
3638
|
+
};
|
|
3639
|
+
getAiUsageSpendAiToolUsageSpend: {
|
|
3640
|
+
parameters: {
|
|
3641
|
+
query?: {
|
|
3642
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3643
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3644
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3645
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3646
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3647
|
+
team?: string;
|
|
3648
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3649
|
+
windowEnd?: string;
|
|
3650
|
+
};
|
|
3651
|
+
header?: never;
|
|
3652
|
+
path: {
|
|
3653
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3654
|
+
};
|
|
3655
|
+
cookie?: never;
|
|
3656
|
+
};
|
|
3657
|
+
requestBody?: never;
|
|
3658
|
+
responses: {
|
|
3659
|
+
/** @description Provider and model AI tool usage/spend rollups */
|
|
3660
|
+
200: {
|
|
3661
|
+
headers: {
|
|
3662
|
+
[name: string]: unknown;
|
|
3663
|
+
};
|
|
3664
|
+
content: {
|
|
3665
|
+
"application/json": components["schemas"]["AiUsageSpendAiToolUsageSpendDto"];
|
|
3666
|
+
};
|
|
3667
|
+
};
|
|
3668
|
+
/** @description Invalid query parameters */
|
|
3669
|
+
400: {
|
|
3670
|
+
headers: {
|
|
3671
|
+
[name: string]: unknown;
|
|
3672
|
+
};
|
|
3673
|
+
content: {
|
|
3674
|
+
"application/json": {
|
|
3675
|
+
/** @example invalid_query */
|
|
3676
|
+
error: string;
|
|
3677
|
+
};
|
|
3678
|
+
};
|
|
3679
|
+
};
|
|
3680
|
+
401: components["responses"]["Unauthorized"];
|
|
3681
|
+
403: components["responses"]["Forbidden"];
|
|
3682
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3683
|
+
404: {
|
|
3684
|
+
headers: {
|
|
3685
|
+
[name: string]: unknown;
|
|
3686
|
+
};
|
|
3687
|
+
content?: never;
|
|
3688
|
+
};
|
|
3689
|
+
};
|
|
3690
|
+
};
|
|
3691
|
+
getAiUsageSpendTeamToolHeatmap: {
|
|
3692
|
+
parameters: {
|
|
3693
|
+
query?: {
|
|
3694
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3695
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3696
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3697
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3698
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3699
|
+
team?: string;
|
|
3700
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3701
|
+
windowEnd?: string;
|
|
3702
|
+
};
|
|
3703
|
+
header?: never;
|
|
3704
|
+
path: {
|
|
3705
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3706
|
+
};
|
|
3707
|
+
cookie?: never;
|
|
3708
|
+
};
|
|
3709
|
+
requestBody?: never;
|
|
3710
|
+
responses: {
|
|
3711
|
+
/** @description Team weekly AI usage heatmap rows */
|
|
3712
|
+
200: {
|
|
3713
|
+
headers: {
|
|
3714
|
+
[name: string]: unknown;
|
|
3715
|
+
};
|
|
3716
|
+
content: {
|
|
3717
|
+
"application/json": components["schemas"]["AiUsageSpendTeamToolHeatmapDto"];
|
|
3718
|
+
};
|
|
3719
|
+
};
|
|
3720
|
+
/** @description Invalid query parameters */
|
|
3721
|
+
400: {
|
|
3722
|
+
headers: {
|
|
3723
|
+
[name: string]: unknown;
|
|
3724
|
+
};
|
|
3725
|
+
content: {
|
|
3726
|
+
"application/json": {
|
|
3727
|
+
/** @example invalid_query */
|
|
3728
|
+
error: string;
|
|
3729
|
+
};
|
|
3730
|
+
};
|
|
3731
|
+
};
|
|
3732
|
+
401: components["responses"]["Unauthorized"];
|
|
3733
|
+
403: components["responses"]["Forbidden"];
|
|
3734
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3735
|
+
404: {
|
|
3736
|
+
headers: {
|
|
3737
|
+
[name: string]: unknown;
|
|
3738
|
+
};
|
|
3739
|
+
content?: never;
|
|
3740
|
+
};
|
|
3741
|
+
};
|
|
3742
|
+
};
|
|
3743
|
+
getAiUsageSpendRoiProductivitySignal: {
|
|
3744
|
+
parameters: {
|
|
3745
|
+
query?: {
|
|
3746
|
+
/** @description Measure time range (maps to weekly bucket count). */
|
|
3747
|
+
rangeId?: "4w" | "8w" | "q";
|
|
3748
|
+
/** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
|
|
3749
|
+
department?: components["parameters"]["InsightsDepartmentFilter"];
|
|
3750
|
+
/** @description Team name filter; send `All teams` to include every team. */
|
|
3751
|
+
team?: string;
|
|
3752
|
+
/** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
|
|
3753
|
+
windowEnd?: string;
|
|
3754
|
+
};
|
|
3755
|
+
header?: never;
|
|
3756
|
+
path: {
|
|
3757
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
3758
|
+
};
|
|
3759
|
+
cookie?: never;
|
|
3760
|
+
};
|
|
3761
|
+
requestBody?: never;
|
|
3762
|
+
responses: {
|
|
3763
|
+
/** @description ROI and productivity signal rollups */
|
|
3764
|
+
200: {
|
|
3765
|
+
headers: {
|
|
3766
|
+
[name: string]: unknown;
|
|
3767
|
+
};
|
|
3768
|
+
content: {
|
|
3769
|
+
"application/json": components["schemas"]["AiUsageSpendRoiProductivitySignalDto"];
|
|
3770
|
+
};
|
|
3771
|
+
};
|
|
3772
|
+
/** @description Invalid query parameters */
|
|
3773
|
+
400: {
|
|
3774
|
+
headers: {
|
|
3775
|
+
[name: string]: unknown;
|
|
3776
|
+
};
|
|
3777
|
+
content: {
|
|
3778
|
+
"application/json": {
|
|
3779
|
+
/** @example invalid_query */
|
|
3780
|
+
error: string;
|
|
3781
|
+
};
|
|
3782
|
+
};
|
|
3783
|
+
};
|
|
3784
|
+
401: components["responses"]["Unauthorized"];
|
|
3785
|
+
403: components["responses"]["Forbidden"];
|
|
3786
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
3787
|
+
404: {
|
|
3788
|
+
headers: {
|
|
3789
|
+
[name: string]: unknown;
|
|
3790
|
+
};
|
|
3791
|
+
content?: never;
|
|
3792
|
+
};
|
|
3793
|
+
};
|
|
3794
|
+
};
|
|
2405
3795
|
getCompanyProfile: {
|
|
2406
3796
|
parameters: {
|
|
2407
3797
|
query?: never;
|
|
@@ -2493,6 +3883,8 @@ export interface operations {
|
|
|
2493
3883
|
query?: {
|
|
2494
3884
|
/** @description When true, bypass `tai_workspace_vcs_repos_cache` and re-fetch from GitHub. */
|
|
2495
3885
|
refresh?: boolean;
|
|
3886
|
+
/** @description When true, re-fetch GitHub App and installation permission metadata (used by the login permission gate after the user approves on GitHub). */
|
|
3887
|
+
permissionsRefresh?: boolean;
|
|
2496
3888
|
};
|
|
2497
3889
|
header?: never;
|
|
2498
3890
|
path: {
|