@thinkai/tai-api-contract 2.100.0 → 2.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/openapi.d.ts +127 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +117 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +127 -0
package/openapi/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.102.0
|
|
5
5
|
description: >
|
|
6
6
|
Contract surface for the AI Driven SDLC backend used by ThinkAI.
|
|
7
7
|
Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
|
|
@@ -1537,6 +1537,80 @@ paths:
|
|
|
1537
1537
|
schema:
|
|
1538
1538
|
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1539
1539
|
|
|
1540
|
+
/workspaces/{workspaceId}/productivity-targets:
|
|
1541
|
+
get:
|
|
1542
|
+
tags: [Workspace]
|
|
1543
|
+
summary: Get Productivity Insights weekly per-engineer targets
|
|
1544
|
+
description: >
|
|
1545
|
+
Returns workspace-wide weekly per-engineer targets for Productivity Insights
|
|
1546
|
+
(Merged PRs, Ship Weight, CI Failures). Empty object `{}` means no targets are set.
|
|
1547
|
+
Member-level read access.
|
|
1548
|
+
operationId: getWorkspaceProductivityTargets
|
|
1549
|
+
parameters:
|
|
1550
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1551
|
+
responses:
|
|
1552
|
+
"200":
|
|
1553
|
+
description: Current targets (may be empty)
|
|
1554
|
+
content:
|
|
1555
|
+
application/json:
|
|
1556
|
+
schema:
|
|
1557
|
+
$ref: "#/components/schemas/ProductivityTargetsDto"
|
|
1558
|
+
"401":
|
|
1559
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1560
|
+
"403":
|
|
1561
|
+
$ref: "#/components/responses/Forbidden"
|
|
1562
|
+
"404":
|
|
1563
|
+
description: Workspace does not exist or malformed workspaceId
|
|
1564
|
+
content:
|
|
1565
|
+
application/json:
|
|
1566
|
+
schema:
|
|
1567
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1568
|
+
put:
|
|
1569
|
+
tags: [Workspace]
|
|
1570
|
+
summary: Set Productivity Insights weekly per-engineer targets
|
|
1571
|
+
description: >
|
|
1572
|
+
Full-replace workspace-wide weekly per-engineer targets for Productivity Insights.
|
|
1573
|
+
Omit a key or send `null` to unset that metric. `PUT {}` clears all three.
|
|
1574
|
+
`0` is a valid CI Failures target (ceiling). Requires workspace **admin**
|
|
1575
|
+
(editors receive `403` with `code: workspace_admin_required`).
|
|
1576
|
+
operationId: putWorkspaceProductivityTargets
|
|
1577
|
+
parameters:
|
|
1578
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1579
|
+
requestBody:
|
|
1580
|
+
required: true
|
|
1581
|
+
content:
|
|
1582
|
+
application/json:
|
|
1583
|
+
schema:
|
|
1584
|
+
$ref: "#/components/schemas/ProductivityTargetsDto"
|
|
1585
|
+
responses:
|
|
1586
|
+
"204":
|
|
1587
|
+
description: Targets persisted (or cleared).
|
|
1588
|
+
"400":
|
|
1589
|
+
description: Invalid payload (unknown keys or out-of-range values)
|
|
1590
|
+
content:
|
|
1591
|
+
application/json:
|
|
1592
|
+
schema:
|
|
1593
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1594
|
+
"401":
|
|
1595
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1596
|
+
"403":
|
|
1597
|
+
description: Forbidden — workspace admin required
|
|
1598
|
+
content:
|
|
1599
|
+
application/json:
|
|
1600
|
+
schema:
|
|
1601
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1602
|
+
examples:
|
|
1603
|
+
workspaceAdminRequired:
|
|
1604
|
+
value:
|
|
1605
|
+
error: Forbidden
|
|
1606
|
+
code: workspace_admin_required
|
|
1607
|
+
"404":
|
|
1608
|
+
description: Workspace does not exist or malformed workspaceId
|
|
1609
|
+
content:
|
|
1610
|
+
application/json:
|
|
1611
|
+
schema:
|
|
1612
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1613
|
+
|
|
1540
1614
|
/workspaces/{workspaceId}/sources:
|
|
1541
1615
|
put:
|
|
1542
1616
|
tags: [Workspace]
|
|
@@ -10559,6 +10633,32 @@ components:
|
|
|
10559
10633
|
$ref: "#/components/schemas/RepoDeliveryOverrideDto"
|
|
10560
10634
|
description: Per-service-repo overrides keyed by provider slug.
|
|
10561
10635
|
|
|
10636
|
+
ProductivityTargetsDto:
|
|
10637
|
+
type: object
|
|
10638
|
+
description: >
|
|
10639
|
+
Optional weekly per-engineer targets for Productivity Insights. Omitted or null
|
|
10640
|
+
fields mean no target for that metric. Additional properties are rejected.
|
|
10641
|
+
additionalProperties: false
|
|
10642
|
+
properties:
|
|
10643
|
+
mergedPrsPerEngineerPerWeek:
|
|
10644
|
+
type: number
|
|
10645
|
+
nullable: true
|
|
10646
|
+
minimum: 0
|
|
10647
|
+
maximum: 10000
|
|
10648
|
+
description: Floor — meet or exceed this many merged PRs per engineer per week.
|
|
10649
|
+
shipWeightPerEngineerPerWeek:
|
|
10650
|
+
type: number
|
|
10651
|
+
nullable: true
|
|
10652
|
+
minimum: 0
|
|
10653
|
+
maximum: 10000
|
|
10654
|
+
description: Floor — meet or exceed this ship weight per engineer per week.
|
|
10655
|
+
ciFailuresPerEngineerPerWeek:
|
|
10656
|
+
type: number
|
|
10657
|
+
nullable: true
|
|
10658
|
+
minimum: 0
|
|
10659
|
+
maximum: 10000
|
|
10660
|
+
description: Ceiling — stay at or below this many CI failures per engineer per week. `0` is valid.
|
|
10661
|
+
|
|
10562
10662
|
TestConnectionResponseDto:
|
|
10563
10663
|
type: object
|
|
10564
10664
|
required: [success]
|
|
@@ -18559,6 +18659,22 @@ components:
|
|
|
18559
18659
|
type: array
|
|
18560
18660
|
items: { type: string }
|
|
18561
18661
|
description: Subset of `god_file`, `high_cc`, `long_params`, `deep_nesting`.
|
|
18662
|
+
peakFunction:
|
|
18663
|
+
type: string
|
|
18664
|
+
nullable: true
|
|
18665
|
+
description: Name of the function that owns `ccMax` (lizard). Null on snapshots taken before peak-function capture.
|
|
18666
|
+
peakStartLine:
|
|
18667
|
+
type: integer
|
|
18668
|
+
nullable: true
|
|
18669
|
+
description: 1-based start line of `peakFunction`.
|
|
18670
|
+
peakEndLine:
|
|
18671
|
+
type: integer
|
|
18672
|
+
nullable: true
|
|
18673
|
+
description: 1-based end line of `peakFunction`.
|
|
18674
|
+
peakParams:
|
|
18675
|
+
type: integer
|
|
18676
|
+
nullable: true
|
|
18677
|
+
description: Parameter count of `peakFunction` (not file-wide `paramsMax`). Null on older snapshots.
|
|
18562
18678
|
|
|
18563
18679
|
CodeInsightsFindingDto:
|
|
18564
18680
|
type: object
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -582,6 +582,30 @@ export interface paths {
|
|
|
582
582
|
patch?: never;
|
|
583
583
|
trace?: never;
|
|
584
584
|
};
|
|
585
|
+
"/workspaces/{workspaceId}/productivity-targets": {
|
|
586
|
+
parameters: {
|
|
587
|
+
query?: never;
|
|
588
|
+
header?: never;
|
|
589
|
+
path?: never;
|
|
590
|
+
cookie?: never;
|
|
591
|
+
};
|
|
592
|
+
/**
|
|
593
|
+
* Get Productivity Insights weekly per-engineer targets
|
|
594
|
+
* @description Returns workspace-wide weekly per-engineer targets for Productivity Insights (Merged PRs, Ship Weight, CI Failures). Empty object `{}` means no targets are set. Member-level read access.
|
|
595
|
+
*/
|
|
596
|
+
get: operations["getWorkspaceProductivityTargets"];
|
|
597
|
+
/**
|
|
598
|
+
* Set Productivity Insights weekly per-engineer targets
|
|
599
|
+
* @description Full-replace workspace-wide weekly per-engineer targets for Productivity Insights. Omit a key or send `null` to unset that metric. `PUT {}` clears all three. `0` is a valid CI Failures target (ceiling). Requires workspace **admin** (editors receive `403` with `code: workspace_admin_required`).
|
|
600
|
+
*/
|
|
601
|
+
put: operations["putWorkspaceProductivityTargets"];
|
|
602
|
+
post?: never;
|
|
603
|
+
delete?: never;
|
|
604
|
+
options?: never;
|
|
605
|
+
head?: never;
|
|
606
|
+
patch?: never;
|
|
607
|
+
trace?: never;
|
|
608
|
+
};
|
|
585
609
|
"/workspaces/{workspaceId}/sources": {
|
|
586
610
|
parameters: {
|
|
587
611
|
query?: never;
|
|
@@ -4254,6 +4278,15 @@ export interface components {
|
|
|
4254
4278
|
[key: string]: components["schemas"]["RepoDeliveryOverrideDto"];
|
|
4255
4279
|
};
|
|
4256
4280
|
};
|
|
4281
|
+
/** @description Optional weekly per-engineer targets for Productivity Insights. Omitted or null fields mean no target for that metric. Additional properties are rejected. */
|
|
4282
|
+
ProductivityTargetsDto: {
|
|
4283
|
+
/** @description Floor — meet or exceed this many merged PRs per engineer per week. */
|
|
4284
|
+
mergedPrsPerEngineerPerWeek?: number | null;
|
|
4285
|
+
/** @description Floor — meet or exceed this ship weight per engineer per week. */
|
|
4286
|
+
shipWeightPerEngineerPerWeek?: number | null;
|
|
4287
|
+
/** @description Ceiling — stay at or below this many CI failures per engineer per week. `0` is valid. */
|
|
4288
|
+
ciFailuresPerEngineerPerWeek?: number | null;
|
|
4289
|
+
};
|
|
4257
4290
|
TestConnectionResponseDto: {
|
|
4258
4291
|
success: boolean;
|
|
4259
4292
|
/** @description Machine-readable failure code when success=false (e.g. invalid_token, zenhr_sync_in_progress when ZenHR OAuth refresh is contended). */
|
|
@@ -8145,6 +8178,14 @@ export interface components {
|
|
|
8145
8178
|
dupPct?: number | null;
|
|
8146
8179
|
/** @description Subset of `god_file`, `high_cc`, `long_params`, `deep_nesting`. */
|
|
8147
8180
|
flags: string[];
|
|
8181
|
+
/** @description Name of the function that owns `ccMax` (lizard). Null on snapshots taken before peak-function capture. */
|
|
8182
|
+
peakFunction?: string | null;
|
|
8183
|
+
/** @description 1-based start line of `peakFunction`. */
|
|
8184
|
+
peakStartLine?: number | null;
|
|
8185
|
+
/** @description 1-based end line of `peakFunction`. */
|
|
8186
|
+
peakEndLine?: number | null;
|
|
8187
|
+
/** @description Parameter count of `peakFunction` (not file-wide `paramsMax`). Null on older snapshots. */
|
|
8188
|
+
peakParams?: number | null;
|
|
8148
8189
|
};
|
|
8149
8190
|
CodeInsightsFindingDto: {
|
|
8150
8191
|
/** Format: uuid */
|
|
@@ -8426,6 +8467,7 @@ export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
|
|
|
8426
8467
|
export type DeliveryRoleConfigDto = components['schemas']['DeliveryRoleConfigDto'];
|
|
8427
8468
|
export type RepoDeliveryOverrideDto = components['schemas']['RepoDeliveryOverrideDto'];
|
|
8428
8469
|
export type DeliveryTopologyDto = components['schemas']['DeliveryTopologyDto'];
|
|
8470
|
+
export type ProductivityTargetsDto = components['schemas']['ProductivityTargetsDto'];
|
|
8429
8471
|
export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
|
|
8430
8472
|
export type CursorKeyUsageDto = components['schemas']['CursorKeyUsageDto'];
|
|
8431
8473
|
export type AiToolSeatDto = components['schemas']['AiToolSeatDto'];
|
|
@@ -10425,6 +10467,91 @@ export interface operations {
|
|
|
10425
10467
|
};
|
|
10426
10468
|
};
|
|
10427
10469
|
};
|
|
10470
|
+
getWorkspaceProductivityTargets: {
|
|
10471
|
+
parameters: {
|
|
10472
|
+
query?: never;
|
|
10473
|
+
header?: never;
|
|
10474
|
+
path: {
|
|
10475
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
10476
|
+
};
|
|
10477
|
+
cookie?: never;
|
|
10478
|
+
};
|
|
10479
|
+
requestBody?: never;
|
|
10480
|
+
responses: {
|
|
10481
|
+
/** @description Current targets (may be empty) */
|
|
10482
|
+
200: {
|
|
10483
|
+
headers: {
|
|
10484
|
+
[name: string]: unknown;
|
|
10485
|
+
};
|
|
10486
|
+
content: {
|
|
10487
|
+
"application/json": components["schemas"]["ProductivityTargetsDto"];
|
|
10488
|
+
};
|
|
10489
|
+
};
|
|
10490
|
+
401: components["responses"]["Unauthorized"];
|
|
10491
|
+
403: components["responses"]["Forbidden"];
|
|
10492
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
10493
|
+
404: {
|
|
10494
|
+
headers: {
|
|
10495
|
+
[name: string]: unknown;
|
|
10496
|
+
};
|
|
10497
|
+
content: {
|
|
10498
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10499
|
+
};
|
|
10500
|
+
};
|
|
10501
|
+
};
|
|
10502
|
+
};
|
|
10503
|
+
putWorkspaceProductivityTargets: {
|
|
10504
|
+
parameters: {
|
|
10505
|
+
query?: never;
|
|
10506
|
+
header?: never;
|
|
10507
|
+
path: {
|
|
10508
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
10509
|
+
};
|
|
10510
|
+
cookie?: never;
|
|
10511
|
+
};
|
|
10512
|
+
requestBody: {
|
|
10513
|
+
content: {
|
|
10514
|
+
"application/json": components["schemas"]["ProductivityTargetsDto"];
|
|
10515
|
+
};
|
|
10516
|
+
};
|
|
10517
|
+
responses: {
|
|
10518
|
+
/** @description Targets persisted (or cleared). */
|
|
10519
|
+
204: {
|
|
10520
|
+
headers: {
|
|
10521
|
+
[name: string]: unknown;
|
|
10522
|
+
};
|
|
10523
|
+
content?: never;
|
|
10524
|
+
};
|
|
10525
|
+
/** @description Invalid payload (unknown keys or out-of-range values) */
|
|
10526
|
+
400: {
|
|
10527
|
+
headers: {
|
|
10528
|
+
[name: string]: unknown;
|
|
10529
|
+
};
|
|
10530
|
+
content: {
|
|
10531
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10532
|
+
};
|
|
10533
|
+
};
|
|
10534
|
+
401: components["responses"]["Unauthorized"];
|
|
10535
|
+
/** @description Forbidden — workspace admin required */
|
|
10536
|
+
403: {
|
|
10537
|
+
headers: {
|
|
10538
|
+
[name: string]: unknown;
|
|
10539
|
+
};
|
|
10540
|
+
content: {
|
|
10541
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10542
|
+
};
|
|
10543
|
+
};
|
|
10544
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
10545
|
+
404: {
|
|
10546
|
+
headers: {
|
|
10547
|
+
[name: string]: unknown;
|
|
10548
|
+
};
|
|
10549
|
+
content: {
|
|
10550
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10551
|
+
};
|
|
10552
|
+
};
|
|
10553
|
+
};
|
|
10554
|
+
};
|
|
10428
10555
|
putTenantSources: {
|
|
10429
10556
|
parameters: {
|
|
10430
10557
|
query?: never;
|