@thinkai/tai-api-contract 2.166.0 → 2.168.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 +230 -1
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +204 -2
- package/package.json +1 -1
- package/src/generated/openapi.ts +230 -1
- package/src/index.ts +11 -0
package/src/generated/openapi.ts
CHANGED
|
@@ -25,6 +25,27 @@ export interface paths {
|
|
|
25
25
|
patch?: never;
|
|
26
26
|
trace?: never;
|
|
27
27
|
};
|
|
28
|
+
"/admin/users/{userId}/assessment-order": {
|
|
29
|
+
parameters: {
|
|
30
|
+
query?: never;
|
|
31
|
+
header?: never;
|
|
32
|
+
path?: never;
|
|
33
|
+
cookie?: never;
|
|
34
|
+
};
|
|
35
|
+
get?: never;
|
|
36
|
+
/**
|
|
37
|
+
* Authorize one extra assessment workspace
|
|
38
|
+
* @description Sets `tai_users.assessment_order_authorized`. When true, that account may create one workspace beyond the default single-workspace limit. The flag stays set until an operator clears it. Buyers cannot set it on `POST /workspaces`.
|
|
39
|
+
* **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`. All other callers receive `403 Forbidden`.
|
|
40
|
+
*/
|
|
41
|
+
put: operations["adminSetAssessmentOrder"];
|
|
42
|
+
post?: never;
|
|
43
|
+
delete?: never;
|
|
44
|
+
options?: never;
|
|
45
|
+
head?: never;
|
|
46
|
+
patch?: never;
|
|
47
|
+
trace?: never;
|
|
48
|
+
};
|
|
28
49
|
"/admin/readiness/token-usage": {
|
|
29
50
|
parameters: {
|
|
30
51
|
query?: never;
|
|
@@ -4639,6 +4660,30 @@ export interface paths {
|
|
|
4639
4660
|
patch?: never;
|
|
4640
4661
|
trace?: never;
|
|
4641
4662
|
};
|
|
4663
|
+
"/workspaces/{workspaceId}/ingest/productivity/dual-vcs-cutover": {
|
|
4664
|
+
parameters: {
|
|
4665
|
+
query?: never;
|
|
4666
|
+
header?: never;
|
|
4667
|
+
path?: never;
|
|
4668
|
+
cookie?: never;
|
|
4669
|
+
};
|
|
4670
|
+
/**
|
|
4671
|
+
* Get prefer-GitHub dual-VCS cutover
|
|
4672
|
+
* @description Returns `productivity_vcs_github_since` on the primary GitHub App VCS row. When set, Bitbucket productivity drain is eligible alongside GitHub; Bitbucket events with `occurred_at` at or after this instant are dropped (prefer GitHub during a migration transition). Null means Bitbucket stays skipped while a GitHub App installation is connected. Requires workspace membership.
|
|
4673
|
+
*/
|
|
4674
|
+
get: operations["getWorkspaceProductivityDualVcsCutover"];
|
|
4675
|
+
put?: never;
|
|
4676
|
+
post?: never;
|
|
4677
|
+
delete?: never;
|
|
4678
|
+
options?: never;
|
|
4679
|
+
head?: never;
|
|
4680
|
+
/**
|
|
4681
|
+
* Set or clear prefer-GitHub dual-VCS cutover
|
|
4682
|
+
* @description Workspace admin (or platform admin) sets `githubSince` (ISO-8601 UTC) or clears it with `null`. Members receive 403.
|
|
4683
|
+
*/
|
|
4684
|
+
patch: operations["patchWorkspaceProductivityDualVcsCutover"];
|
|
4685
|
+
trace?: never;
|
|
4686
|
+
};
|
|
4642
4687
|
"/workspaces/{workspaceId}/ingest-runs": {
|
|
4643
4688
|
parameters: {
|
|
4644
4689
|
query?: never;
|
|
@@ -9015,6 +9060,20 @@ export interface components {
|
|
|
9015
9060
|
/** @description True when productivity_incremental_requested_at is already set; no second queue stamp. */
|
|
9016
9061
|
alreadyQueued?: boolean;
|
|
9017
9062
|
};
|
|
9063
|
+
ProductivityDualVcsCutoverDto: {
|
|
9064
|
+
/**
|
|
9065
|
+
* Format: date-time
|
|
9066
|
+
* @description Prefer-GitHub from this UTC instant. Null clears dual-VCS (Bitbucket skipped when a GitHub App installation is connected).
|
|
9067
|
+
*/
|
|
9068
|
+
githubSince: string | null;
|
|
9069
|
+
};
|
|
9070
|
+
ProductivityDualVcsCutoverPatchDto: {
|
|
9071
|
+
/**
|
|
9072
|
+
* Format: date-time
|
|
9073
|
+
* @description ISO-8601 UTC instant when GitHub became the preferred merge target, or null to clear.
|
|
9074
|
+
*/
|
|
9075
|
+
githubSince: string | null;
|
|
9076
|
+
};
|
|
9018
9077
|
/** @description Latest depth scan read from stored activity. `capturePercent` is the minimum existing capture ratio over that scan's repo checks with a GitHub merge count, or null when none qualify. */
|
|
9019
9078
|
IngestCoverageProductivityDepthScanDto: {
|
|
9020
9079
|
/** Format: date-time */
|
|
@@ -11421,6 +11480,8 @@ export type IngestCoverageLastRunDto = components['schemas']['IngestCoverageLast
|
|
|
11421
11480
|
export type IngestCoverageProductivityRepoDto = components['schemas']['IngestCoverageProductivityRepoDto'];
|
|
11422
11481
|
export type ProductivityRepoRetryResponseDto = components['schemas']['ProductivityRepoRetryResponseDto'];
|
|
11423
11482
|
export type ProductivityCatchUpResponseDto = components['schemas']['ProductivityCatchUpResponseDto'];
|
|
11483
|
+
export type ProductivityDualVcsCutoverDto = components['schemas']['ProductivityDualVcsCutoverDto'];
|
|
11484
|
+
export type ProductivityDualVcsCutoverPatchDto = components['schemas']['ProductivityDualVcsCutoverPatchDto'];
|
|
11424
11485
|
export type IngestCoverageProductivityDepthScanDto = components['schemas']['IngestCoverageProductivityDepthScanDto'];
|
|
11425
11486
|
export type IngestCoverageProductivityWeekReconcileDto = components['schemas']['IngestCoverageProductivityWeekReconcileDto'];
|
|
11426
11487
|
export type IngestCoverageProductivitySelfHealDto = components['schemas']['IngestCoverageProductivitySelfHealDto'];
|
|
@@ -11723,6 +11784,95 @@ export interface operations {
|
|
|
11723
11784
|
};
|
|
11724
11785
|
};
|
|
11725
11786
|
};
|
|
11787
|
+
adminSetAssessmentOrder: {
|
|
11788
|
+
parameters: {
|
|
11789
|
+
query?: never;
|
|
11790
|
+
header?: never;
|
|
11791
|
+
path: {
|
|
11792
|
+
/** @description `tai_users.id` of the account to authorize. */
|
|
11793
|
+
userId: string;
|
|
11794
|
+
};
|
|
11795
|
+
cookie?: never;
|
|
11796
|
+
};
|
|
11797
|
+
requestBody: {
|
|
11798
|
+
content: {
|
|
11799
|
+
"application/json": {
|
|
11800
|
+
authorized: boolean;
|
|
11801
|
+
};
|
|
11802
|
+
};
|
|
11803
|
+
};
|
|
11804
|
+
responses: {
|
|
11805
|
+
/** @description Authorization flag stored. */
|
|
11806
|
+
204: {
|
|
11807
|
+
headers: {
|
|
11808
|
+
[name: string]: unknown;
|
|
11809
|
+
};
|
|
11810
|
+
content?: never;
|
|
11811
|
+
};
|
|
11812
|
+
/** @description Invalid UUID or `authorized` is not a boolean. */
|
|
11813
|
+
400: {
|
|
11814
|
+
headers: {
|
|
11815
|
+
[name: string]: unknown;
|
|
11816
|
+
};
|
|
11817
|
+
content: {
|
|
11818
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
11819
|
+
};
|
|
11820
|
+
};
|
|
11821
|
+
/** @description Missing or invalid JWT. */
|
|
11822
|
+
401: {
|
|
11823
|
+
headers: {
|
|
11824
|
+
[name: string]: unknown;
|
|
11825
|
+
};
|
|
11826
|
+
content: {
|
|
11827
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
11828
|
+
};
|
|
11829
|
+
};
|
|
11830
|
+
/** @description Caller is not a platform admin. */
|
|
11831
|
+
403: {
|
|
11832
|
+
headers: {
|
|
11833
|
+
[name: string]: unknown;
|
|
11834
|
+
};
|
|
11835
|
+
content: {
|
|
11836
|
+
/**
|
|
11837
|
+
* @example {
|
|
11838
|
+
* "error": "Forbidden",
|
|
11839
|
+
* "code": "forbidden"
|
|
11840
|
+
* }
|
|
11841
|
+
*/
|
|
11842
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
11843
|
+
};
|
|
11844
|
+
};
|
|
11845
|
+
/** @description User not found. */
|
|
11846
|
+
404: {
|
|
11847
|
+
headers: {
|
|
11848
|
+
[name: string]: unknown;
|
|
11849
|
+
};
|
|
11850
|
+
content: {
|
|
11851
|
+
/**
|
|
11852
|
+
* @example {
|
|
11853
|
+
* "error": "User not found",
|
|
11854
|
+
* "code": "user_not_found"
|
|
11855
|
+
* }
|
|
11856
|
+
*/
|
|
11857
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
11858
|
+
};
|
|
11859
|
+
};
|
|
11860
|
+
/** @description Workspace store cannot persist the flag. */
|
|
11861
|
+
503: {
|
|
11862
|
+
headers: {
|
|
11863
|
+
[name: string]: unknown;
|
|
11864
|
+
};
|
|
11865
|
+
content: {
|
|
11866
|
+
/**
|
|
11867
|
+
* @example {
|
|
11868
|
+
* "error": "Service unavailable"
|
|
11869
|
+
* }
|
|
11870
|
+
*/
|
|
11871
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
11872
|
+
};
|
|
11873
|
+
};
|
|
11874
|
+
};
|
|
11875
|
+
};
|
|
11726
11876
|
adminListReadinessTokenUsage: {
|
|
11727
11877
|
parameters: {
|
|
11728
11878
|
query?: {
|
|
@@ -12587,7 +12737,7 @@ export interface operations {
|
|
|
12587
12737
|
};
|
|
12588
12738
|
};
|
|
12589
12739
|
401: components["responses"]["Unauthorized"];
|
|
12590
|
-
/** @description Conflict creating workspace
|
|
12740
|
+
/** @description Conflict creating workspace. Stable cases: verified-email identity conflict, duplicate workspace name/slug, or `workspace_limit_reached` when the caller already has a workspace. An operator-authorized account (`PUT /admin/users/{userId}/assessment-order`) may create exactly one extra workspace; a third workspace still returns `workspace_limit_reached`. A buyer body field cannot grant that exception. */
|
|
12591
12741
|
409: {
|
|
12592
12742
|
headers: {
|
|
12593
12743
|
[name: string]: unknown;
|
|
@@ -23566,6 +23716,85 @@ export interface operations {
|
|
|
23566
23716
|
};
|
|
23567
23717
|
};
|
|
23568
23718
|
};
|
|
23719
|
+
getWorkspaceProductivityDualVcsCutover: {
|
|
23720
|
+
parameters: {
|
|
23721
|
+
query?: never;
|
|
23722
|
+
header?: never;
|
|
23723
|
+
path: {
|
|
23724
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
23725
|
+
};
|
|
23726
|
+
cookie?: never;
|
|
23727
|
+
};
|
|
23728
|
+
requestBody?: never;
|
|
23729
|
+
responses: {
|
|
23730
|
+
/** @description Current cutover */
|
|
23731
|
+
200: {
|
|
23732
|
+
headers: {
|
|
23733
|
+
[name: string]: unknown;
|
|
23734
|
+
};
|
|
23735
|
+
content: {
|
|
23736
|
+
"application/json": components["schemas"]["ProductivityDualVcsCutoverDto"];
|
|
23737
|
+
};
|
|
23738
|
+
};
|
|
23739
|
+
401: components["responses"]["Unauthorized"];
|
|
23740
|
+
403: components["responses"]["Forbidden"];
|
|
23741
|
+
/** @description Productivity not connected */
|
|
23742
|
+
404: {
|
|
23743
|
+
headers: {
|
|
23744
|
+
[name: string]: unknown;
|
|
23745
|
+
};
|
|
23746
|
+
content: {
|
|
23747
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
23748
|
+
};
|
|
23749
|
+
};
|
|
23750
|
+
};
|
|
23751
|
+
};
|
|
23752
|
+
patchWorkspaceProductivityDualVcsCutover: {
|
|
23753
|
+
parameters: {
|
|
23754
|
+
query?: never;
|
|
23755
|
+
header?: never;
|
|
23756
|
+
path: {
|
|
23757
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
23758
|
+
};
|
|
23759
|
+
cookie?: never;
|
|
23760
|
+
};
|
|
23761
|
+
requestBody: {
|
|
23762
|
+
content: {
|
|
23763
|
+
"application/json": components["schemas"]["ProductivityDualVcsCutoverPatchDto"];
|
|
23764
|
+
};
|
|
23765
|
+
};
|
|
23766
|
+
responses: {
|
|
23767
|
+
/** @description Updated cutover */
|
|
23768
|
+
200: {
|
|
23769
|
+
headers: {
|
|
23770
|
+
[name: string]: unknown;
|
|
23771
|
+
};
|
|
23772
|
+
content: {
|
|
23773
|
+
"application/json": components["schemas"]["ProductivityDualVcsCutoverDto"];
|
|
23774
|
+
};
|
|
23775
|
+
};
|
|
23776
|
+
/** @description Invalid body or timestamp */
|
|
23777
|
+
400: {
|
|
23778
|
+
headers: {
|
|
23779
|
+
[name: string]: unknown;
|
|
23780
|
+
};
|
|
23781
|
+
content: {
|
|
23782
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
23783
|
+
};
|
|
23784
|
+
};
|
|
23785
|
+
401: components["responses"]["Unauthorized"];
|
|
23786
|
+
403: components["responses"]["Forbidden"];
|
|
23787
|
+
/** @description Productivity not connected */
|
|
23788
|
+
404: {
|
|
23789
|
+
headers: {
|
|
23790
|
+
[name: string]: unknown;
|
|
23791
|
+
};
|
|
23792
|
+
content: {
|
|
23793
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
23794
|
+
};
|
|
23795
|
+
};
|
|
23796
|
+
};
|
|
23797
|
+
};
|
|
23569
23798
|
getWorkspaceIngestRuns: {
|
|
23570
23799
|
parameters: {
|
|
23571
23800
|
query?: {
|
package/src/index.ts
CHANGED
|
@@ -1339,6 +1339,17 @@ export interface ProductivityCatchUpResponseDto {
|
|
|
1339
1339
|
alreadyQueued?: boolean;
|
|
1340
1340
|
}
|
|
1341
1341
|
|
|
1342
|
+
/** GET/PATCH …/ingest/productivity/dual-vcs-cutover */
|
|
1343
|
+
export interface ProductivityDualVcsCutoverDto {
|
|
1344
|
+
/** Prefer-GitHub from this UTC instant; null clears dual-VCS (BB skipped when GH App connected). */
|
|
1345
|
+
githubSince: string | null;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
/** PATCH body for …/ingest/productivity/dual-vcs-cutover */
|
|
1349
|
+
export interface ProductivityDualVcsCutoverPatchDto {
|
|
1350
|
+
githubSince: string | null;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1342
1353
|
/** Latest depth-scan summary read from activity rows. Does not start a scan. */
|
|
1343
1354
|
export interface IngestCoverageProductivityDepthScanDto {
|
|
1344
1355
|
/** Newest `productivity.ingest.depth_scan_completed` time, or null when none. */
|