@thinkai/tai-api-contract 2.169.0 → 2.170.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 +139 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +178 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +139 -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.170.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}/...`.
|
|
@@ -235,6 +235,183 @@ paths:
|
|
|
235
235
|
example:
|
|
236
236
|
error: Service unavailable
|
|
237
237
|
|
|
238
|
+
/admin/assessment-preflight:
|
|
239
|
+
post:
|
|
240
|
+
tags: [PlatformAdmin]
|
|
241
|
+
summary: Evaluate assessment preflight
|
|
242
|
+
operationId: runAssessmentPreflight
|
|
243
|
+
description: >
|
|
244
|
+
Returns whether one paid assessment may start the five-business-day clock.
|
|
245
|
+
Pending approval does not count as connected. Optional Jira and incident
|
|
246
|
+
gaps are chapters, not preflight failures. Premium stays false while
|
|
247
|
+
currency, confounder rules, the active-engineer rule, or the working-day
|
|
248
|
+
calendar is unset.
|
|
249
|
+
|
|
250
|
+
**Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
|
|
251
|
+
requestBody:
|
|
252
|
+
required: true
|
|
253
|
+
content:
|
|
254
|
+
application/json:
|
|
255
|
+
schema:
|
|
256
|
+
type: object
|
|
257
|
+
required:
|
|
258
|
+
- offerId
|
|
259
|
+
- sourceControl
|
|
260
|
+
- platformExecutionReady
|
|
261
|
+
- scans
|
|
262
|
+
- windows
|
|
263
|
+
- premiumAi
|
|
264
|
+
- jiraSelected
|
|
265
|
+
- incidentSelected
|
|
266
|
+
- incidentAvailable
|
|
267
|
+
properties:
|
|
268
|
+
offerId:
|
|
269
|
+
type: string
|
|
270
|
+
enum: [engineering_readiness_baseline, agentic_ai_roi]
|
|
271
|
+
sourceControl:
|
|
272
|
+
type: string
|
|
273
|
+
enum: [connected, pending_approval, setup_in_progress, revoked, stale, missing]
|
|
274
|
+
platformExecutionReady:
|
|
275
|
+
type: boolean
|
|
276
|
+
repositoryCount:
|
|
277
|
+
type: integer
|
|
278
|
+
nullable: true
|
|
279
|
+
activeEngineerCount:
|
|
280
|
+
type: integer
|
|
281
|
+
nullable: true
|
|
282
|
+
scans:
|
|
283
|
+
type: object
|
|
284
|
+
required: [status]
|
|
285
|
+
properties:
|
|
286
|
+
status:
|
|
287
|
+
type: string
|
|
288
|
+
enum: [unknown, known]
|
|
289
|
+
fresh:
|
|
290
|
+
type: boolean
|
|
291
|
+
windows:
|
|
292
|
+
type: object
|
|
293
|
+
required: [status]
|
|
294
|
+
properties:
|
|
295
|
+
status:
|
|
296
|
+
type: string
|
|
297
|
+
enum: [unknown, known]
|
|
298
|
+
currentComplete:
|
|
299
|
+
type: boolean
|
|
300
|
+
preComplete:
|
|
301
|
+
type: boolean
|
|
302
|
+
postComplete:
|
|
303
|
+
type: boolean
|
|
304
|
+
premiumAi:
|
|
305
|
+
type: object
|
|
306
|
+
required: [cursor, claude, copilot]
|
|
307
|
+
properties:
|
|
308
|
+
cursor:
|
|
309
|
+
type: boolean
|
|
310
|
+
claude:
|
|
311
|
+
type: boolean
|
|
312
|
+
copilot:
|
|
313
|
+
type: boolean
|
|
314
|
+
jiraSelected:
|
|
315
|
+
type: boolean
|
|
316
|
+
incidentSelected:
|
|
317
|
+
type: boolean
|
|
318
|
+
incidentAvailable:
|
|
319
|
+
type: boolean
|
|
320
|
+
owner:
|
|
321
|
+
type: string
|
|
322
|
+
nullable: true
|
|
323
|
+
responses:
|
|
324
|
+
"200":
|
|
325
|
+
description: Preflight result. `dueDate` is set only when `ready` is true.
|
|
326
|
+
content:
|
|
327
|
+
application/json:
|
|
328
|
+
schema:
|
|
329
|
+
type: object
|
|
330
|
+
required:
|
|
331
|
+
[ready, clockStarted, dueDate, owner, blocker, nextAction, failures, chapters]
|
|
332
|
+
properties:
|
|
333
|
+
ready:
|
|
334
|
+
type: boolean
|
|
335
|
+
clockStarted:
|
|
336
|
+
type: boolean
|
|
337
|
+
dueDate:
|
|
338
|
+
type: string
|
|
339
|
+
nullable: true
|
|
340
|
+
format: date
|
|
341
|
+
owner:
|
|
342
|
+
type: string
|
|
343
|
+
nullable: true
|
|
344
|
+
blocker:
|
|
345
|
+
type: string
|
|
346
|
+
nullable: true
|
|
347
|
+
nextAction:
|
|
348
|
+
type: object
|
|
349
|
+
nullable: true
|
|
350
|
+
required: [label, href]
|
|
351
|
+
properties:
|
|
352
|
+
label:
|
|
353
|
+
type: string
|
|
354
|
+
href:
|
|
355
|
+
type: string
|
|
356
|
+
nullable: true
|
|
357
|
+
failures:
|
|
358
|
+
type: array
|
|
359
|
+
items:
|
|
360
|
+
type: object
|
|
361
|
+
required: [code, blocker, nextAction]
|
|
362
|
+
properties:
|
|
363
|
+
code:
|
|
364
|
+
type: string
|
|
365
|
+
blocker:
|
|
366
|
+
type: string
|
|
367
|
+
nextAction:
|
|
368
|
+
type: object
|
|
369
|
+
required: [label, href]
|
|
370
|
+
properties:
|
|
371
|
+
label:
|
|
372
|
+
type: string
|
|
373
|
+
href:
|
|
374
|
+
type: string
|
|
375
|
+
nullable: true
|
|
376
|
+
chapters:
|
|
377
|
+
type: array
|
|
378
|
+
items:
|
|
379
|
+
type: object
|
|
380
|
+
required: [id, status, reason]
|
|
381
|
+
properties:
|
|
382
|
+
id:
|
|
383
|
+
type: string
|
|
384
|
+
enum: [jira, incidents]
|
|
385
|
+
status:
|
|
386
|
+
type: string
|
|
387
|
+
enum: [unavailable]
|
|
388
|
+
reason:
|
|
389
|
+
type: string
|
|
390
|
+
"400":
|
|
391
|
+
description: Body failed validation.
|
|
392
|
+
content:
|
|
393
|
+
application/json:
|
|
394
|
+
schema:
|
|
395
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
396
|
+
example:
|
|
397
|
+
error: offerId is not a known assessment offer
|
|
398
|
+
code: invalid_body
|
|
399
|
+
"401":
|
|
400
|
+
description: Missing or invalid JWT.
|
|
401
|
+
content:
|
|
402
|
+
application/json:
|
|
403
|
+
schema:
|
|
404
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
405
|
+
"403":
|
|
406
|
+
description: Caller is not a platform admin.
|
|
407
|
+
content:
|
|
408
|
+
application/json:
|
|
409
|
+
schema:
|
|
410
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
411
|
+
example:
|
|
412
|
+
error: Forbidden
|
|
413
|
+
code: forbidden
|
|
414
|
+
|
|
238
415
|
/admin/readiness/token-usage:
|
|
239
416
|
get:
|
|
240
417
|
tags: [PlatformAdmin]
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -46,6 +46,27 @@ export interface paths {
|
|
|
46
46
|
patch?: never;
|
|
47
47
|
trace?: never;
|
|
48
48
|
};
|
|
49
|
+
"/admin/assessment-preflight": {
|
|
50
|
+
parameters: {
|
|
51
|
+
query?: never;
|
|
52
|
+
header?: never;
|
|
53
|
+
path?: never;
|
|
54
|
+
cookie?: never;
|
|
55
|
+
};
|
|
56
|
+
get?: never;
|
|
57
|
+
put?: never;
|
|
58
|
+
/**
|
|
59
|
+
* Evaluate assessment preflight
|
|
60
|
+
* @description Returns whether one paid assessment may start the five-business-day clock. Pending approval does not count as connected. Optional Jira and incident gaps are chapters, not preflight failures. Premium stays false while currency, confounder rules, the active-engineer rule, or the working-day calendar is unset.
|
|
61
|
+
* **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
|
|
62
|
+
*/
|
|
63
|
+
post: operations["runAssessmentPreflight"];
|
|
64
|
+
delete?: never;
|
|
65
|
+
options?: never;
|
|
66
|
+
head?: never;
|
|
67
|
+
patch?: never;
|
|
68
|
+
trace?: never;
|
|
69
|
+
};
|
|
49
70
|
"/admin/readiness/token-usage": {
|
|
50
71
|
parameters: {
|
|
51
72
|
query?: never;
|
|
@@ -11875,6 +11896,124 @@ export interface operations {
|
|
|
11875
11896
|
};
|
|
11876
11897
|
};
|
|
11877
11898
|
};
|
|
11899
|
+
runAssessmentPreflight: {
|
|
11900
|
+
parameters: {
|
|
11901
|
+
query?: never;
|
|
11902
|
+
header?: never;
|
|
11903
|
+
path?: never;
|
|
11904
|
+
cookie?: never;
|
|
11905
|
+
};
|
|
11906
|
+
requestBody: {
|
|
11907
|
+
content: {
|
|
11908
|
+
"application/json": {
|
|
11909
|
+
/** @enum {string} */
|
|
11910
|
+
offerId: "engineering_readiness_baseline" | "agentic_ai_roi";
|
|
11911
|
+
/** @enum {string} */
|
|
11912
|
+
sourceControl: "connected" | "pending_approval" | "setup_in_progress" | "revoked" | "stale" | "missing";
|
|
11913
|
+
platformExecutionReady: boolean;
|
|
11914
|
+
repositoryCount?: number | null;
|
|
11915
|
+
activeEngineerCount?: number | null;
|
|
11916
|
+
scans: {
|
|
11917
|
+
/** @enum {string} */
|
|
11918
|
+
status: "unknown" | "known";
|
|
11919
|
+
fresh?: boolean;
|
|
11920
|
+
};
|
|
11921
|
+
windows: {
|
|
11922
|
+
/** @enum {string} */
|
|
11923
|
+
status: "unknown" | "known";
|
|
11924
|
+
currentComplete?: boolean;
|
|
11925
|
+
preComplete?: boolean;
|
|
11926
|
+
postComplete?: boolean;
|
|
11927
|
+
};
|
|
11928
|
+
premiumAi: {
|
|
11929
|
+
cursor: boolean;
|
|
11930
|
+
claude: boolean;
|
|
11931
|
+
copilot: boolean;
|
|
11932
|
+
};
|
|
11933
|
+
jiraSelected: boolean;
|
|
11934
|
+
incidentSelected: boolean;
|
|
11935
|
+
incidentAvailable: boolean;
|
|
11936
|
+
owner?: string | null;
|
|
11937
|
+
};
|
|
11938
|
+
};
|
|
11939
|
+
};
|
|
11940
|
+
responses: {
|
|
11941
|
+
/** @description Preflight result. `dueDate` is set only when `ready` is true. */
|
|
11942
|
+
200: {
|
|
11943
|
+
headers: {
|
|
11944
|
+
[name: string]: unknown;
|
|
11945
|
+
};
|
|
11946
|
+
content: {
|
|
11947
|
+
"application/json": {
|
|
11948
|
+
ready: boolean;
|
|
11949
|
+
clockStarted: boolean;
|
|
11950
|
+
/** Format: date */
|
|
11951
|
+
dueDate: string | null;
|
|
11952
|
+
owner: string | null;
|
|
11953
|
+
blocker: string | null;
|
|
11954
|
+
nextAction: {
|
|
11955
|
+
label: string;
|
|
11956
|
+
href: string | null;
|
|
11957
|
+
} | null;
|
|
11958
|
+
failures: {
|
|
11959
|
+
code: string;
|
|
11960
|
+
blocker: string;
|
|
11961
|
+
nextAction: {
|
|
11962
|
+
label: string;
|
|
11963
|
+
href: string | null;
|
|
11964
|
+
};
|
|
11965
|
+
}[];
|
|
11966
|
+
chapters: {
|
|
11967
|
+
/** @enum {string} */
|
|
11968
|
+
id: "jira" | "incidents";
|
|
11969
|
+
/** @enum {string} */
|
|
11970
|
+
status: "unavailable";
|
|
11971
|
+
reason: string;
|
|
11972
|
+
}[];
|
|
11973
|
+
};
|
|
11974
|
+
};
|
|
11975
|
+
};
|
|
11976
|
+
/** @description Body failed validation. */
|
|
11977
|
+
400: {
|
|
11978
|
+
headers: {
|
|
11979
|
+
[name: string]: unknown;
|
|
11980
|
+
};
|
|
11981
|
+
content: {
|
|
11982
|
+
/**
|
|
11983
|
+
* @example {
|
|
11984
|
+
* "error": "offerId is not a known assessment offer",
|
|
11985
|
+
* "code": "invalid_body"
|
|
11986
|
+
* }
|
|
11987
|
+
*/
|
|
11988
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
11989
|
+
};
|
|
11990
|
+
};
|
|
11991
|
+
/** @description Missing or invalid JWT. */
|
|
11992
|
+
401: {
|
|
11993
|
+
headers: {
|
|
11994
|
+
[name: string]: unknown;
|
|
11995
|
+
};
|
|
11996
|
+
content: {
|
|
11997
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
11998
|
+
};
|
|
11999
|
+
};
|
|
12000
|
+
/** @description Caller is not a platform admin. */
|
|
12001
|
+
403: {
|
|
12002
|
+
headers: {
|
|
12003
|
+
[name: string]: unknown;
|
|
12004
|
+
};
|
|
12005
|
+
content: {
|
|
12006
|
+
/**
|
|
12007
|
+
* @example {
|
|
12008
|
+
* "error": "Forbidden",
|
|
12009
|
+
* "code": "forbidden"
|
|
12010
|
+
* }
|
|
12011
|
+
*/
|
|
12012
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
12013
|
+
};
|
|
12014
|
+
};
|
|
12015
|
+
};
|
|
12016
|
+
};
|
|
11878
12017
|
adminListReadinessTokenUsage: {
|
|
11879
12018
|
parameters: {
|
|
11880
12019
|
query?: {
|