@thinkai/tai-api-contract 2.2.0 → 2.2.1
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 +36 -380
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/openapi/openapi.yaml +29 -368
- package/package.json +1 -1
- package/src/generated/openapi.ts +36 -380
- package/src/index.ts +6 -3
package/openapi/openapi.yaml
CHANGED
|
@@ -6,7 +6,6 @@ info:
|
|
|
6
6
|
Contract surface for the Performance Intelligence Platform backend used by ThinkAI.
|
|
7
7
|
Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
|
|
8
8
|
Legacy tenant-scoped routes (`/tenants/{tenantId}/...`, `/me/tenants`) were removed from runtime.
|
|
9
|
-
Admin routes use `/admin/...` and require role `admin`.
|
|
10
9
|
Legacy HTTP routes that exist on the server but are not listed here (for example
|
|
11
10
|
`PUT /workspaces/{workspaceId}/dashboard-settings`) remain supported for existing PIP clients;
|
|
12
11
|
prefer OpenAPI-documented equivalents where available. Removal will be coordinated with ThinkAI releases.
|
|
@@ -31,8 +30,6 @@ tags:
|
|
|
31
30
|
description: Squad and projects (§6)
|
|
32
31
|
- name: Notifications
|
|
33
32
|
description: Notifications (§7)
|
|
34
|
-
- name: AdminReviewer
|
|
35
|
-
description: Admin review queue (§8)
|
|
36
33
|
- name: AIStrategy
|
|
37
34
|
description: AI strategy recommendations (§9)
|
|
38
35
|
- name: Journey
|
|
@@ -365,6 +362,15 @@ paths:
|
|
|
365
362
|
application/json:
|
|
366
363
|
schema:
|
|
367
364
|
$ref: "#/components/schemas/DashboardProductivityDto"
|
|
365
|
+
"400":
|
|
366
|
+
description: Invalid query parameters
|
|
367
|
+
content:
|
|
368
|
+
application/json:
|
|
369
|
+
schema:
|
|
370
|
+
type: object
|
|
371
|
+
required: [error]
|
|
372
|
+
properties:
|
|
373
|
+
error: { type: string, example: invalid_query }
|
|
368
374
|
"401":
|
|
369
375
|
$ref: "#/components/responses/Unauthorized"
|
|
370
376
|
|
|
@@ -377,10 +383,10 @@ paths:
|
|
|
377
383
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
378
384
|
- name: bucket
|
|
379
385
|
in: query
|
|
380
|
-
schema: { type: string, enum: [day, week, month] }
|
|
386
|
+
schema: { type: string, enum: [day, week, month], default: week }
|
|
381
387
|
- name: limit
|
|
382
388
|
in: query
|
|
383
|
-
schema: { type: integer, minimum: 1 }
|
|
389
|
+
schema: { type: integer, minimum: 1, maximum: 52, default: 8 }
|
|
384
390
|
- name: scope
|
|
385
391
|
in: query
|
|
386
392
|
schema:
|
|
@@ -402,167 +408,17 @@ paths:
|
|
|
402
408
|
application/json:
|
|
403
409
|
schema:
|
|
404
410
|
$ref: "#/components/schemas/DashboardProductivityHistoryDto"
|
|
405
|
-
"
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
/admin/reviews:
|
|
409
|
-
get:
|
|
410
|
-
tags: [AdminReviewer]
|
|
411
|
-
summary: Admin review queue
|
|
412
|
-
operationId: listAdminReviews
|
|
413
|
-
parameters:
|
|
414
|
-
- name: status
|
|
415
|
-
in: query
|
|
416
|
-
schema: { type: string }
|
|
417
|
-
- name: priority
|
|
418
|
-
in: query
|
|
419
|
-
schema: { type: string }
|
|
420
|
-
- name: reviewer
|
|
421
|
-
in: query
|
|
422
|
-
schema: { type: string }
|
|
423
|
-
responses:
|
|
424
|
-
"200":
|
|
425
|
-
description: Queue and reviewer list
|
|
426
|
-
content:
|
|
427
|
-
application/json:
|
|
428
|
-
schema:
|
|
429
|
-
$ref: "#/components/schemas/AdminDashboardDto"
|
|
430
|
-
"401":
|
|
431
|
-
$ref: "#/components/responses/Unauthorized"
|
|
432
|
-
"403":
|
|
433
|
-
$ref: "#/components/responses/Forbidden"
|
|
434
|
-
|
|
435
|
-
/admin/reviews/{id}:
|
|
436
|
-
get:
|
|
437
|
-
tags: [AdminReviewer]
|
|
438
|
-
summary: Single review submission
|
|
439
|
-
operationId: getAdminReview
|
|
440
|
-
parameters:
|
|
441
|
-
- $ref: "#/components/parameters/ReviewId"
|
|
442
|
-
responses:
|
|
443
|
-
"200":
|
|
444
|
-
description: Review detail
|
|
445
|
-
content:
|
|
446
|
-
application/json:
|
|
447
|
-
schema:
|
|
448
|
-
$ref: "#/components/schemas/ReviewSubmissionDto"
|
|
449
|
-
"401":
|
|
450
|
-
$ref: "#/components/responses/Unauthorized"
|
|
451
|
-
"403":
|
|
452
|
-
$ref: "#/components/responses/Forbidden"
|
|
453
|
-
patch:
|
|
454
|
-
tags: [AdminReviewer]
|
|
455
|
-
summary: Update review metadata
|
|
456
|
-
operationId: patchAdminReview
|
|
457
|
-
parameters:
|
|
458
|
-
- $ref: "#/components/parameters/ReviewId"
|
|
459
|
-
requestBody:
|
|
460
|
-
required: true
|
|
461
|
-
content:
|
|
462
|
-
application/json:
|
|
463
|
-
schema:
|
|
464
|
-
$ref: "#/components/schemas/PatchAdminReviewBodyDto"
|
|
465
|
-
responses:
|
|
466
|
-
"200":
|
|
467
|
-
description: Updated review
|
|
468
|
-
content:
|
|
469
|
-
application/json:
|
|
470
|
-
schema:
|
|
471
|
-
$ref: "#/components/schemas/ReviewSubmissionDto"
|
|
472
|
-
"401":
|
|
473
|
-
$ref: "#/components/responses/Unauthorized"
|
|
474
|
-
"403":
|
|
475
|
-
$ref: "#/components/responses/Forbidden"
|
|
476
|
-
|
|
477
|
-
/admin/reviews/{id}/sections/{sectionId}/comments:
|
|
478
|
-
post:
|
|
479
|
-
tags: [AdminReviewer]
|
|
480
|
-
summary: Add section comment
|
|
481
|
-
operationId: postAdminReviewComment
|
|
482
|
-
parameters:
|
|
483
|
-
- $ref: "#/components/parameters/ReviewId"
|
|
484
|
-
- $ref: "#/components/parameters/SectionId"
|
|
485
|
-
requestBody:
|
|
486
|
-
required: true
|
|
487
|
-
content:
|
|
488
|
-
application/json:
|
|
489
|
-
schema:
|
|
490
|
-
$ref: "#/components/schemas/AdminCommentBodyDto"
|
|
491
|
-
responses:
|
|
492
|
-
"200":
|
|
493
|
-
description: Created comment
|
|
411
|
+
"400":
|
|
412
|
+
description: Invalid query parameters
|
|
494
413
|
content:
|
|
495
414
|
application/json:
|
|
496
415
|
schema:
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
$ref: "#/components/responses/Forbidden"
|
|
502
|
-
|
|
503
|
-
/admin/reviews/{id}/sections/{sectionId}/decision:
|
|
504
|
-
put:
|
|
505
|
-
tags: [AdminReviewer]
|
|
506
|
-
summary: Set section decision
|
|
507
|
-
operationId: putAdminReviewSectionDecision
|
|
508
|
-
parameters:
|
|
509
|
-
- $ref: "#/components/parameters/ReviewId"
|
|
510
|
-
- $ref: "#/components/parameters/SectionId"
|
|
511
|
-
requestBody:
|
|
512
|
-
required: true
|
|
513
|
-
content:
|
|
514
|
-
application/json:
|
|
515
|
-
schema:
|
|
516
|
-
$ref: "#/components/schemas/SectionDecisionBodyDto"
|
|
517
|
-
responses:
|
|
518
|
-
"204":
|
|
519
|
-
description: Saved
|
|
520
|
-
"401":
|
|
521
|
-
$ref: "#/components/responses/Unauthorized"
|
|
522
|
-
"403":
|
|
523
|
-
$ref: "#/components/responses/Forbidden"
|
|
524
|
-
|
|
525
|
-
/admin/reviews/{id}/pricing:
|
|
526
|
-
put:
|
|
527
|
-
tags: [AdminReviewer]
|
|
528
|
-
summary: Update pricing lines
|
|
529
|
-
operationId: putAdminReviewPricing
|
|
530
|
-
parameters:
|
|
531
|
-
- $ref: "#/components/parameters/ReviewId"
|
|
532
|
-
requestBody:
|
|
533
|
-
required: true
|
|
534
|
-
content:
|
|
535
|
-
application/json:
|
|
536
|
-
schema:
|
|
537
|
-
$ref: "#/components/schemas/PricingUpdateBodyDto"
|
|
538
|
-
responses:
|
|
539
|
-
"204":
|
|
540
|
-
description: Saved
|
|
541
|
-
"401":
|
|
542
|
-
$ref: "#/components/responses/Unauthorized"
|
|
543
|
-
"403":
|
|
544
|
-
$ref: "#/components/responses/Forbidden"
|
|
545
|
-
|
|
546
|
-
/admin/reviews/{id}/deployment:
|
|
547
|
-
put:
|
|
548
|
-
tags: [AdminReviewer]
|
|
549
|
-
summary: Update deployment plan
|
|
550
|
-
operationId: putAdminReviewDeployment
|
|
551
|
-
parameters:
|
|
552
|
-
- $ref: "#/components/parameters/ReviewId"
|
|
553
|
-
requestBody:
|
|
554
|
-
required: true
|
|
555
|
-
content:
|
|
556
|
-
application/json:
|
|
557
|
-
schema:
|
|
558
|
-
$ref: "#/components/schemas/DeploymentPlanDto"
|
|
559
|
-
responses:
|
|
560
|
-
"204":
|
|
561
|
-
description: Saved
|
|
416
|
+
type: object
|
|
417
|
+
required: [error]
|
|
418
|
+
properties:
|
|
419
|
+
error: { type: string, example: invalid_query }
|
|
562
420
|
"401":
|
|
563
421
|
$ref: "#/components/responses/Unauthorized"
|
|
564
|
-
"403":
|
|
565
|
-
$ref: "#/components/responses/Forbidden"
|
|
566
422
|
|
|
567
423
|
/workspaces/{workspaceId}/company-profile:
|
|
568
424
|
get:
|
|
@@ -1448,18 +1304,6 @@ components:
|
|
|
1448
1304
|
required: true
|
|
1449
1305
|
schema:
|
|
1450
1306
|
type: string
|
|
1451
|
-
ReviewId:
|
|
1452
|
-
name: id
|
|
1453
|
-
in: path
|
|
1454
|
-
required: true
|
|
1455
|
-
schema:
|
|
1456
|
-
type: string
|
|
1457
|
-
SectionId:
|
|
1458
|
-
name: sectionId
|
|
1459
|
-
in: path
|
|
1460
|
-
required: true
|
|
1461
|
-
schema:
|
|
1462
|
-
type: string
|
|
1463
1307
|
NotificationId:
|
|
1464
1308
|
name: id
|
|
1465
1309
|
in: path
|
|
@@ -1608,6 +1452,11 @@ components:
|
|
|
1608
1452
|
properties:
|
|
1609
1453
|
workspaceId:
|
|
1610
1454
|
type: string
|
|
1455
|
+
format: uuid
|
|
1456
|
+
generatedAt:
|
|
1457
|
+
type: string
|
|
1458
|
+
format: date-time
|
|
1459
|
+
description: Response generation time (RFC 3339).
|
|
1611
1460
|
windowStart:
|
|
1612
1461
|
type: string
|
|
1613
1462
|
format: date-time
|
|
@@ -1625,8 +1474,14 @@ components:
|
|
|
1625
1474
|
|
|
1626
1475
|
DashboardProductivityHistoryDto:
|
|
1627
1476
|
type: object
|
|
1628
|
-
required: [buckets]
|
|
1477
|
+
required: [workspaceId, bucket, buckets]
|
|
1629
1478
|
properties:
|
|
1479
|
+
workspaceId:
|
|
1480
|
+
type: string
|
|
1481
|
+
format: uuid
|
|
1482
|
+
bucket:
|
|
1483
|
+
type: string
|
|
1484
|
+
enum: [day, week, month]
|
|
1630
1485
|
buckets:
|
|
1631
1486
|
type: array
|
|
1632
1487
|
items:
|
|
@@ -2346,200 +2201,6 @@ components:
|
|
|
2346
2201
|
total:
|
|
2347
2202
|
type: integer
|
|
2348
2203
|
|
|
2349
|
-
ReviewQueueItemDto:
|
|
2350
|
-
type: object
|
|
2351
|
-
required: [id, client, project, workflows, submittedAt, reviewer, status, priority]
|
|
2352
|
-
properties:
|
|
2353
|
-
id:
|
|
2354
|
-
type: string
|
|
2355
|
-
client:
|
|
2356
|
-
type: string
|
|
2357
|
-
project:
|
|
2358
|
-
type: string
|
|
2359
|
-
workflows:
|
|
2360
|
-
type: array
|
|
2361
|
-
items:
|
|
2362
|
-
type: string
|
|
2363
|
-
enum: [greenfield, brownfield]
|
|
2364
|
-
submittedAt:
|
|
2365
|
-
type: string
|
|
2366
|
-
format: date-time
|
|
2367
|
-
reviewer:
|
|
2368
|
-
type: string
|
|
2369
|
-
nullable: true
|
|
2370
|
-
status:
|
|
2371
|
-
type: string
|
|
2372
|
-
enum: [pending, in_review, approved, changes_requested]
|
|
2373
|
-
priority:
|
|
2374
|
-
type: string
|
|
2375
|
-
enum: [high, medium, low]
|
|
2376
|
-
|
|
2377
|
-
AdminDashboardDto:
|
|
2378
|
-
type: object
|
|
2379
|
-
required: [queue, reviewers]
|
|
2380
|
-
properties:
|
|
2381
|
-
queue:
|
|
2382
|
-
type: array
|
|
2383
|
-
items:
|
|
2384
|
-
$ref: "#/components/schemas/ReviewQueueItemDto"
|
|
2385
|
-
reviewers:
|
|
2386
|
-
type: array
|
|
2387
|
-
items:
|
|
2388
|
-
type: string
|
|
2389
|
-
|
|
2390
|
-
PatchAdminReviewBodyDto:
|
|
2391
|
-
type: object
|
|
2392
|
-
properties:
|
|
2393
|
-
status:
|
|
2394
|
-
type: string
|
|
2395
|
-
enum: [pending, in_review, approved, changes_requested]
|
|
2396
|
-
reviewer:
|
|
2397
|
-
type: string
|
|
2398
|
-
priority:
|
|
2399
|
-
type: string
|
|
2400
|
-
enum: [high, medium, low]
|
|
2401
|
-
|
|
2402
|
-
CommentDto:
|
|
2403
|
-
type: object
|
|
2404
|
-
required: [id, sectionId, author, text, timestamp]
|
|
2405
|
-
properties:
|
|
2406
|
-
id:
|
|
2407
|
-
type: string
|
|
2408
|
-
sectionId:
|
|
2409
|
-
type: string
|
|
2410
|
-
author:
|
|
2411
|
-
type: string
|
|
2412
|
-
text:
|
|
2413
|
-
type: string
|
|
2414
|
-
timestamp:
|
|
2415
|
-
type: string
|
|
2416
|
-
format: date-time
|
|
2417
|
-
|
|
2418
|
-
AdminCommentBodyDto:
|
|
2419
|
-
type: object
|
|
2420
|
-
required: [text]
|
|
2421
|
-
properties:
|
|
2422
|
-
text:
|
|
2423
|
-
type: string
|
|
2424
|
-
|
|
2425
|
-
SectionDecisionBodyDto:
|
|
2426
|
-
type: object
|
|
2427
|
-
required: [decision]
|
|
2428
|
-
properties:
|
|
2429
|
-
decision:
|
|
2430
|
-
type: string
|
|
2431
|
-
enum: [pending, approved, changes_requested, rejected]
|
|
2432
|
-
|
|
2433
|
-
PricingLineDto:
|
|
2434
|
-
type: object
|
|
2435
|
-
required: [id, label, rate, hours]
|
|
2436
|
-
properties:
|
|
2437
|
-
id:
|
|
2438
|
-
type: string
|
|
2439
|
-
label:
|
|
2440
|
-
type: string
|
|
2441
|
-
rate:
|
|
2442
|
-
type: number
|
|
2443
|
-
hours:
|
|
2444
|
-
type: number
|
|
2445
|
-
|
|
2446
|
-
PricingUpdateBodyDto:
|
|
2447
|
-
type: object
|
|
2448
|
-
required: [items]
|
|
2449
|
-
properties:
|
|
2450
|
-
items:
|
|
2451
|
-
type: array
|
|
2452
|
-
items:
|
|
2453
|
-
type: object
|
|
2454
|
-
required: [id, rate, hours]
|
|
2455
|
-
properties:
|
|
2456
|
-
id:
|
|
2457
|
-
type: string
|
|
2458
|
-
rate:
|
|
2459
|
-
type: number
|
|
2460
|
-
hours:
|
|
2461
|
-
type: number
|
|
2462
|
-
|
|
2463
|
-
DeploymentPlanDto:
|
|
2464
|
-
type: object
|
|
2465
|
-
required: [startDate, endDate, milestones]
|
|
2466
|
-
properties:
|
|
2467
|
-
startDate:
|
|
2468
|
-
type: string
|
|
2469
|
-
endDate:
|
|
2470
|
-
type: string
|
|
2471
|
-
milestones:
|
|
2472
|
-
type: array
|
|
2473
|
-
items:
|
|
2474
|
-
type: string
|
|
2475
|
-
|
|
2476
|
-
ReviewSectionDto:
|
|
2477
|
-
type: object
|
|
2478
|
-
required: [id, label, detail, decision, comments]
|
|
2479
|
-
properties:
|
|
2480
|
-
id:
|
|
2481
|
-
type: string
|
|
2482
|
-
label:
|
|
2483
|
-
type: string
|
|
2484
|
-
detail:
|
|
2485
|
-
type: string
|
|
2486
|
-
decision:
|
|
2487
|
-
type: string
|
|
2488
|
-
enum: [pending, approved, changes_requested, rejected]
|
|
2489
|
-
comments:
|
|
2490
|
-
type: array
|
|
2491
|
-
items:
|
|
2492
|
-
$ref: "#/components/schemas/CommentDto"
|
|
2493
|
-
|
|
2494
|
-
ReviewSubmissionDto:
|
|
2495
|
-
type: object
|
|
2496
|
-
required:
|
|
2497
|
-
- id
|
|
2498
|
-
- client
|
|
2499
|
-
- project
|
|
2500
|
-
- workflows
|
|
2501
|
-
- status
|
|
2502
|
-
- isResubmission
|
|
2503
|
-
- context
|
|
2504
|
-
- sections
|
|
2505
|
-
- pricing
|
|
2506
|
-
- deployment
|
|
2507
|
-
properties:
|
|
2508
|
-
id:
|
|
2509
|
-
type: string
|
|
2510
|
-
client:
|
|
2511
|
-
type: string
|
|
2512
|
-
project:
|
|
2513
|
-
type: string
|
|
2514
|
-
workflows:
|
|
2515
|
-
type: array
|
|
2516
|
-
items:
|
|
2517
|
-
type: string
|
|
2518
|
-
enum: [greenfield, brownfield]
|
|
2519
|
-
status:
|
|
2520
|
-
type: string
|
|
2521
|
-
enum: [pending, in_review, approved, changes_requested]
|
|
2522
|
-
isResubmission:
|
|
2523
|
-
type: boolean
|
|
2524
|
-
context:
|
|
2525
|
-
type: array
|
|
2526
|
-
items:
|
|
2527
|
-
type: object
|
|
2528
|
-
required: [text]
|
|
2529
|
-
properties:
|
|
2530
|
-
text:
|
|
2531
|
-
type: string
|
|
2532
|
-
sections:
|
|
2533
|
-
type: array
|
|
2534
|
-
items:
|
|
2535
|
-
$ref: "#/components/schemas/ReviewSectionDto"
|
|
2536
|
-
pricing:
|
|
2537
|
-
type: array
|
|
2538
|
-
items:
|
|
2539
|
-
$ref: "#/components/schemas/PricingLineDto"
|
|
2540
|
-
deployment:
|
|
2541
|
-
$ref: "#/components/schemas/DeploymentPlanDto"
|
|
2542
|
-
|
|
2543
2204
|
EffectiveTaskRowDto:
|
|
2544
2205
|
type: object
|
|
2545
2206
|
required: [id, name, summary, source]
|