@thinkai/tai-api-contract 2.99.0 → 2.101.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 +121 -2
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +107 -3
- package/package.json +1 -1
- package/src/generated/openapi.ts +121 -2
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.101.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]
|
|
@@ -18439,11 +18539,15 @@ components:
|
|
|
18439
18539
|
error_handling,
|
|
18440
18540
|
config_cohesion,
|
|
18441
18541
|
resilience_patterns,
|
|
18542
|
+
circular_deps,
|
|
18543
|
+
fan_in_hotspot,
|
|
18442
18544
|
]
|
|
18443
18545
|
description: >
|
|
18444
18546
|
Deterministic categories (`duplication`, `complexity`, `proliferation`,
|
|
18445
|
-
`coverage`) plus LLM semantic detectors
|
|
18446
|
-
`
|
|
18547
|
+
`coverage`, `circular_deps`, `fan_in_hotspot`) plus LLM semantic detectors
|
|
18548
|
+
(`anemic_domain`, `context_leak`, `tx_boundary`, `error_handling`,
|
|
18549
|
+
`config_cohesion`, `resilience_patterns`). Coupling categories are written
|
|
18550
|
+
only by Design risks runs (`source=deterministic` on the design run id).
|
|
18447
18551
|
|
|
18448
18552
|
CodeInsightsFindingSource:
|
|
18449
18553
|
type: string
|
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). */
|
|
@@ -8086,10 +8119,10 @@ export interface components {
|
|
|
8086
8119
|
/** @enum {string} */
|
|
8087
8120
|
CodeInsightsFindingSeverity: "critical" | "high" | "medium" | "low";
|
|
8088
8121
|
/**
|
|
8089
|
-
* @description Deterministic categories (`duplication`, `complexity`, `proliferation`, `coverage`) plus LLM semantic detectors (`anemic_domain`, `context_leak`, `tx_boundary`, `error_handling`, `config_cohesion`, `resilience_patterns`).
|
|
8122
|
+
* @description Deterministic categories (`duplication`, `complexity`, `proliferation`, `coverage`, `circular_deps`, `fan_in_hotspot`) plus LLM semantic detectors (`anemic_domain`, `context_leak`, `tx_boundary`, `error_handling`, `config_cohesion`, `resilience_patterns`). Coupling categories are written only by Design risks runs (`source=deterministic` on the design run id).
|
|
8090
8123
|
* @enum {string}
|
|
8091
8124
|
*/
|
|
8092
|
-
CodeInsightsFindingCategory: "duplication" | "complexity" | "proliferation" | "coverage" | "anemic_domain" | "context_leak" | "tx_boundary" | "error_handling" | "config_cohesion" | "resilience_patterns";
|
|
8125
|
+
CodeInsightsFindingCategory: "duplication" | "complexity" | "proliferation" | "coverage" | "anemic_domain" | "context_leak" | "tx_boundary" | "error_handling" | "config_cohesion" | "resilience_patterns" | "circular_deps" | "fan_in_hotspot";
|
|
8093
8126
|
/**
|
|
8094
8127
|
* @description `deterministic` = measured Code Insights rules; `llm` = AI-detected semantic findings (separate agent pass; never blended in scoring).
|
|
8095
8128
|
* @enum {string}
|
|
@@ -8426,6 +8459,7 @@ export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
|
|
|
8426
8459
|
export type DeliveryRoleConfigDto = components['schemas']['DeliveryRoleConfigDto'];
|
|
8427
8460
|
export type RepoDeliveryOverrideDto = components['schemas']['RepoDeliveryOverrideDto'];
|
|
8428
8461
|
export type DeliveryTopologyDto = components['schemas']['DeliveryTopologyDto'];
|
|
8462
|
+
export type ProductivityTargetsDto = components['schemas']['ProductivityTargetsDto'];
|
|
8429
8463
|
export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
|
|
8430
8464
|
export type CursorKeyUsageDto = components['schemas']['CursorKeyUsageDto'];
|
|
8431
8465
|
export type AiToolSeatDto = components['schemas']['AiToolSeatDto'];
|
|
@@ -10425,6 +10459,91 @@ export interface operations {
|
|
|
10425
10459
|
};
|
|
10426
10460
|
};
|
|
10427
10461
|
};
|
|
10462
|
+
getWorkspaceProductivityTargets: {
|
|
10463
|
+
parameters: {
|
|
10464
|
+
query?: never;
|
|
10465
|
+
header?: never;
|
|
10466
|
+
path: {
|
|
10467
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
10468
|
+
};
|
|
10469
|
+
cookie?: never;
|
|
10470
|
+
};
|
|
10471
|
+
requestBody?: never;
|
|
10472
|
+
responses: {
|
|
10473
|
+
/** @description Current targets (may be empty) */
|
|
10474
|
+
200: {
|
|
10475
|
+
headers: {
|
|
10476
|
+
[name: string]: unknown;
|
|
10477
|
+
};
|
|
10478
|
+
content: {
|
|
10479
|
+
"application/json": components["schemas"]["ProductivityTargetsDto"];
|
|
10480
|
+
};
|
|
10481
|
+
};
|
|
10482
|
+
401: components["responses"]["Unauthorized"];
|
|
10483
|
+
403: components["responses"]["Forbidden"];
|
|
10484
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
10485
|
+
404: {
|
|
10486
|
+
headers: {
|
|
10487
|
+
[name: string]: unknown;
|
|
10488
|
+
};
|
|
10489
|
+
content: {
|
|
10490
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10491
|
+
};
|
|
10492
|
+
};
|
|
10493
|
+
};
|
|
10494
|
+
};
|
|
10495
|
+
putWorkspaceProductivityTargets: {
|
|
10496
|
+
parameters: {
|
|
10497
|
+
query?: never;
|
|
10498
|
+
header?: never;
|
|
10499
|
+
path: {
|
|
10500
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
10501
|
+
};
|
|
10502
|
+
cookie?: never;
|
|
10503
|
+
};
|
|
10504
|
+
requestBody: {
|
|
10505
|
+
content: {
|
|
10506
|
+
"application/json": components["schemas"]["ProductivityTargetsDto"];
|
|
10507
|
+
};
|
|
10508
|
+
};
|
|
10509
|
+
responses: {
|
|
10510
|
+
/** @description Targets persisted (or cleared). */
|
|
10511
|
+
204: {
|
|
10512
|
+
headers: {
|
|
10513
|
+
[name: string]: unknown;
|
|
10514
|
+
};
|
|
10515
|
+
content?: never;
|
|
10516
|
+
};
|
|
10517
|
+
/** @description Invalid payload (unknown keys or out-of-range values) */
|
|
10518
|
+
400: {
|
|
10519
|
+
headers: {
|
|
10520
|
+
[name: string]: unknown;
|
|
10521
|
+
};
|
|
10522
|
+
content: {
|
|
10523
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10524
|
+
};
|
|
10525
|
+
};
|
|
10526
|
+
401: components["responses"]["Unauthorized"];
|
|
10527
|
+
/** @description Forbidden — workspace admin required */
|
|
10528
|
+
403: {
|
|
10529
|
+
headers: {
|
|
10530
|
+
[name: string]: unknown;
|
|
10531
|
+
};
|
|
10532
|
+
content: {
|
|
10533
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10534
|
+
};
|
|
10535
|
+
};
|
|
10536
|
+
/** @description Workspace does not exist or malformed workspaceId */
|
|
10537
|
+
404: {
|
|
10538
|
+
headers: {
|
|
10539
|
+
[name: string]: unknown;
|
|
10540
|
+
};
|
|
10541
|
+
content: {
|
|
10542
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
10543
|
+
};
|
|
10544
|
+
};
|
|
10545
|
+
};
|
|
10546
|
+
};
|
|
10428
10547
|
putTenantSources: {
|
|
10429
10548
|
parameters: {
|
|
10430
10549
|
query?: never;
|