@thinkai/tai-api-contract 1.0.3 → 1.1.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 +192 -224
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +206 -207
- package/package.json +1 -1
- package/src/generated/openapi.ts +192 -224
package/openapi/openapi.yaml
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version:
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
description: >
|
|
6
6
|
Contract surface for the Performance Intelligence Platform backend used by ThinkAI.
|
|
7
7
|
Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
|
|
8
|
-
Legacy tenant-scoped routes (`/tenants/{tenantId}/...`, `/me/tenants`)
|
|
8
|
+
Legacy tenant-scoped routes (`/tenants/{tenantId}/...`, `/me/tenants`) were removed from runtime.
|
|
9
9
|
Admin routes use `/admin/...` and require role `admin`.
|
|
10
10
|
Legacy HTTP routes that exist on the server but are not listed here (for example
|
|
11
|
-
`PUT /
|
|
11
|
+
`PUT /workspaces/{workspaceId}/dashboard-settings`) remain supported for existing PIP clients;
|
|
12
12
|
prefer OpenAPI-documented equivalents where available. Removal will be coordinated with ThinkAI releases.
|
|
13
13
|
security:
|
|
14
14
|
- bearerAuth: []
|
|
15
15
|
tags:
|
|
16
|
-
- name:
|
|
16
|
+
- name: Workspace
|
|
17
17
|
description: Workspace bootstrap (§13)
|
|
18
18
|
- name: CompanyProfile
|
|
19
19
|
description: Company profile (§1)
|
|
@@ -38,32 +38,11 @@ tags:
|
|
|
38
38
|
- name: Me
|
|
39
39
|
description: Authenticated user profile (§11)
|
|
40
40
|
- name: Preferences
|
|
41
|
-
description: Per-user per-
|
|
41
|
+
description: Per-user per-workspace preferences (§12)
|
|
42
42
|
- name: OrgChartImport
|
|
43
43
|
description: Org chart import via storage path (§14)
|
|
44
44
|
|
|
45
45
|
paths:
|
|
46
|
-
/tenants:
|
|
47
|
-
post:
|
|
48
|
-
tags: [Tenant]
|
|
49
|
-
summary: Create tenant
|
|
50
|
-
operationId: createTenant
|
|
51
|
-
requestBody:
|
|
52
|
-
required: true
|
|
53
|
-
content:
|
|
54
|
-
application/json:
|
|
55
|
-
schema:
|
|
56
|
-
$ref: "#/components/schemas/CreateTenantBodyDto"
|
|
57
|
-
responses:
|
|
58
|
-
"201":
|
|
59
|
-
description: Tenant created or acknowledged (idempotent; same body if already existed)
|
|
60
|
-
content:
|
|
61
|
-
application/json:
|
|
62
|
-
schema:
|
|
63
|
-
$ref: "#/components/schemas/CreateTenantResponseDto"
|
|
64
|
-
"401":
|
|
65
|
-
$ref: "#/components/responses/Unauthorized"
|
|
66
|
-
|
|
67
46
|
/me:
|
|
68
47
|
get:
|
|
69
48
|
tags: [Me]
|
|
@@ -111,7 +90,7 @@ paths:
|
|
|
111
90
|
|
|
112
91
|
/workspaces:
|
|
113
92
|
post:
|
|
114
|
-
tags: [
|
|
93
|
+
tags: [Workspace]
|
|
115
94
|
summary: Create workspace
|
|
116
95
|
operationId: createWorkspace
|
|
117
96
|
requestBody:
|
|
@@ -130,56 +109,16 @@ paths:
|
|
|
130
109
|
"401":
|
|
131
110
|
$ref: "#/components/responses/Unauthorized"
|
|
132
111
|
|
|
133
|
-
/workspaces/{workspaceId}/
|
|
134
|
-
get:
|
|
135
|
-
tags: [CompanyProfile]
|
|
136
|
-
summary: Get workspace organization profile
|
|
137
|
-
operationId: getWorkspaceOrganization
|
|
138
|
-
parameters:
|
|
139
|
-
- name: workspaceId
|
|
140
|
-
in: path
|
|
141
|
-
required: true
|
|
142
|
-
schema: { type: string }
|
|
143
|
-
responses:
|
|
144
|
-
"200":
|
|
145
|
-
description: Organization profile or null if unset
|
|
146
|
-
content:
|
|
147
|
-
application/json:
|
|
148
|
-
schema:
|
|
149
|
-
$ref: "#/components/schemas/OrganizationDto"
|
|
150
|
-
"401":
|
|
151
|
-
$ref: "#/components/responses/Unauthorized"
|
|
152
|
-
put:
|
|
153
|
-
tags: [CompanyProfile]
|
|
154
|
-
summary: Upsert workspace organization profile
|
|
155
|
-
operationId: putWorkspaceOrganization
|
|
156
|
-
parameters:
|
|
157
|
-
- name: workspaceId
|
|
158
|
-
in: path
|
|
159
|
-
required: true
|
|
160
|
-
schema: { type: string }
|
|
161
|
-
requestBody:
|
|
162
|
-
required: true
|
|
163
|
-
content:
|
|
164
|
-
application/json:
|
|
165
|
-
schema:
|
|
166
|
-
$ref: "#/components/schemas/OrganizationDto"
|
|
167
|
-
responses:
|
|
168
|
-
"204":
|
|
169
|
-
description: Updated
|
|
170
|
-
"401":
|
|
171
|
-
$ref: "#/components/responses/Unauthorized"
|
|
172
|
-
|
|
173
|
-
/tenants/{tenantId}/members:
|
|
112
|
+
/workspaces/{workspaceId}/members:
|
|
174
113
|
get:
|
|
175
|
-
tags: [
|
|
176
|
-
summary: List
|
|
114
|
+
tags: [Workspace]
|
|
115
|
+
summary: List workspace team members
|
|
177
116
|
operationId: listTenantMembers
|
|
178
117
|
parameters:
|
|
179
|
-
- $ref: "#/components/parameters/
|
|
118
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
180
119
|
responses:
|
|
181
120
|
"200":
|
|
182
|
-
description: Team members for
|
|
121
|
+
description: Team members for workspace
|
|
183
122
|
content:
|
|
184
123
|
application/json:
|
|
185
124
|
schema:
|
|
@@ -189,13 +128,13 @@ paths:
|
|
|
189
128
|
"403":
|
|
190
129
|
$ref: "#/components/responses/Forbidden"
|
|
191
130
|
|
|
192
|
-
/
|
|
131
|
+
/workspaces/{workspaceId}/members/invite:
|
|
193
132
|
post:
|
|
194
|
-
tags: [
|
|
195
|
-
summary: Invite member to
|
|
133
|
+
tags: [Workspace]
|
|
134
|
+
summary: Invite member to workspace
|
|
196
135
|
operationId: inviteTenantMember
|
|
197
136
|
parameters:
|
|
198
|
-
- $ref: "#/components/parameters/
|
|
137
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
199
138
|
requestBody:
|
|
200
139
|
required: true
|
|
201
140
|
content:
|
|
@@ -214,13 +153,13 @@ paths:
|
|
|
214
153
|
"403":
|
|
215
154
|
$ref: "#/components/responses/Forbidden"
|
|
216
155
|
|
|
217
|
-
/
|
|
156
|
+
/workspaces/{workspaceId}/members/{memberId}:
|
|
218
157
|
patch:
|
|
219
|
-
tags: [
|
|
220
|
-
summary: Update
|
|
158
|
+
tags: [Workspace]
|
|
159
|
+
summary: Update workspace member role
|
|
221
160
|
operationId: updateTenantMemberRole
|
|
222
161
|
parameters:
|
|
223
|
-
- $ref: "#/components/parameters/
|
|
162
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
224
163
|
- name: memberId
|
|
225
164
|
in: path
|
|
226
165
|
required: true
|
|
@@ -245,11 +184,11 @@ paths:
|
|
|
245
184
|
"404":
|
|
246
185
|
description: Member not found
|
|
247
186
|
delete:
|
|
248
|
-
tags: [
|
|
249
|
-
summary: Remove member from
|
|
187
|
+
tags: [Workspace]
|
|
188
|
+
summary: Remove member from workspace
|
|
250
189
|
operationId: removeTenantMember
|
|
251
190
|
parameters:
|
|
252
|
-
- $ref: "#/components/parameters/
|
|
191
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
253
192
|
- name: memberId
|
|
254
193
|
in: path
|
|
255
194
|
required: true
|
|
@@ -264,13 +203,13 @@ paths:
|
|
|
264
203
|
"404":
|
|
265
204
|
description: Member not found
|
|
266
205
|
|
|
267
|
-
/
|
|
206
|
+
/workspaces/{workspaceId}/org-chart:
|
|
268
207
|
get:
|
|
269
|
-
tags: [
|
|
208
|
+
tags: [Workspace]
|
|
270
209
|
summary: Get org chart tree
|
|
271
210
|
operationId: getTenantOrgChart
|
|
272
211
|
parameters:
|
|
273
|
-
- $ref: "#/components/parameters/
|
|
212
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
274
213
|
- name: withScores
|
|
275
214
|
in: query
|
|
276
215
|
schema: { type: boolean }
|
|
@@ -284,13 +223,13 @@ paths:
|
|
|
284
223
|
"401":
|
|
285
224
|
$ref: "#/components/responses/Unauthorized"
|
|
286
225
|
"404":
|
|
287
|
-
description:
|
|
226
|
+
description: Workspace not found
|
|
288
227
|
post:
|
|
289
|
-
tags: [
|
|
228
|
+
tags: [Workspace]
|
|
290
229
|
summary: Save org chart tree
|
|
291
230
|
operationId: postTenantOrgChart
|
|
292
231
|
parameters:
|
|
293
|
-
- $ref: "#/components/parameters/
|
|
232
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
294
233
|
requestBody:
|
|
295
234
|
required: true
|
|
296
235
|
content:
|
|
@@ -304,20 +243,20 @@ paths:
|
|
|
304
243
|
application/json:
|
|
305
244
|
schema:
|
|
306
245
|
type: object
|
|
307
|
-
required: [ok,
|
|
246
|
+
required: [ok, workspaceId]
|
|
308
247
|
properties:
|
|
309
248
|
ok: { type: boolean }
|
|
310
|
-
|
|
249
|
+
workspaceId: { type: string }
|
|
311
250
|
"401":
|
|
312
251
|
$ref: "#/components/responses/Unauthorized"
|
|
313
252
|
|
|
314
|
-
/
|
|
253
|
+
/workspaces/{workspaceId}/sources:
|
|
315
254
|
put:
|
|
316
|
-
tags: [
|
|
317
|
-
summary: Replace
|
|
255
|
+
tags: [Workspace]
|
|
256
|
+
summary: Replace workspace data sources
|
|
318
257
|
operationId: putTenantSources
|
|
319
258
|
parameters:
|
|
320
|
-
- $ref: "#/components/parameters/
|
|
259
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
321
260
|
requestBody:
|
|
322
261
|
required: true
|
|
323
262
|
content:
|
|
@@ -337,20 +276,20 @@ paths:
|
|
|
337
276
|
application/json:
|
|
338
277
|
schema:
|
|
339
278
|
type: object
|
|
340
|
-
required: [ok,
|
|
279
|
+
required: [ok, workspaceId]
|
|
341
280
|
properties:
|
|
342
281
|
ok: { type: boolean }
|
|
343
|
-
|
|
282
|
+
workspaceId: { type: string }
|
|
344
283
|
"401":
|
|
345
284
|
$ref: "#/components/responses/Unauthorized"
|
|
346
285
|
|
|
347
|
-
/
|
|
286
|
+
/workspaces/{workspaceId}/sources/test:
|
|
348
287
|
post:
|
|
349
|
-
tags: [
|
|
288
|
+
tags: [Workspace]
|
|
350
289
|
summary: Test one source connection (does not persist)
|
|
351
290
|
operationId: postTenantSourceTest
|
|
352
291
|
parameters:
|
|
353
|
-
- $ref: "#/components/parameters/
|
|
292
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
354
293
|
requestBody:
|
|
355
294
|
required: true
|
|
356
295
|
content:
|
|
@@ -369,13 +308,13 @@ paths:
|
|
|
369
308
|
"401":
|
|
370
309
|
$ref: "#/components/responses/Unauthorized"
|
|
371
310
|
|
|
372
|
-
/
|
|
311
|
+
/workspaces/{workspaceId}/dashboard/productivity:
|
|
373
312
|
get:
|
|
374
|
-
tags: [
|
|
313
|
+
tags: [Workspace]
|
|
375
314
|
summary: CTO dashboard productivity snapshot
|
|
376
315
|
operationId: getDashboardProductivity
|
|
377
316
|
parameters:
|
|
378
|
-
- $ref: "#/components/parameters/
|
|
317
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
379
318
|
- name: scope
|
|
380
319
|
in: query
|
|
381
320
|
schema:
|
|
@@ -400,13 +339,13 @@ paths:
|
|
|
400
339
|
"401":
|
|
401
340
|
$ref: "#/components/responses/Unauthorized"
|
|
402
341
|
|
|
403
|
-
/
|
|
342
|
+
/workspaces/{workspaceId}/dashboard/productivity/history:
|
|
404
343
|
get:
|
|
405
|
-
tags: [
|
|
344
|
+
tags: [Workspace]
|
|
406
345
|
summary: CTO dashboard productivity time series
|
|
407
346
|
operationId: getDashboardProductivityHistory
|
|
408
347
|
parameters:
|
|
409
|
-
- $ref: "#/components/parameters/
|
|
348
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
410
349
|
- name: bucket
|
|
411
350
|
in: query
|
|
412
351
|
schema: { type: string, enum: [day, week, month] }
|
|
@@ -596,36 +535,60 @@ paths:
|
|
|
596
535
|
"403":
|
|
597
536
|
$ref: "#/components/responses/Forbidden"
|
|
598
537
|
|
|
599
|
-
/
|
|
538
|
+
/workspaces/{workspaceId}/company-profile:
|
|
600
539
|
get:
|
|
601
540
|
tags: [CompanyProfile]
|
|
602
541
|
summary: Get company profile
|
|
603
542
|
operationId: getCompanyProfile
|
|
604
543
|
parameters:
|
|
605
|
-
- $ref: "#/components/parameters/
|
|
544
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
606
545
|
responses:
|
|
607
546
|
"200":
|
|
608
|
-
description:
|
|
547
|
+
description: >
|
|
548
|
+
Company profile DTO, or JSON `null` when the workspace exists but no profile
|
|
549
|
+
has been saved yet. Clients should treat `null` as the empty initial state
|
|
550
|
+
(the wizard renders blank inputs); they MUST NOT treat the absence of a
|
|
551
|
+
saved profile as a 404.
|
|
609
552
|
content:
|
|
610
553
|
application/json:
|
|
611
554
|
schema:
|
|
612
555
|
$ref: "#/components/schemas/CompanyProfileDto"
|
|
613
556
|
examples:
|
|
614
557
|
sample:
|
|
558
|
+
summary: Saved profile
|
|
615
559
|
value:
|
|
616
560
|
companyName: Acme
|
|
617
561
|
industry: software
|
|
618
562
|
companySize: "51-200"
|
|
619
563
|
engineeringHC: "42"
|
|
620
564
|
headquarters: "Austin, TX"
|
|
565
|
+
"400":
|
|
566
|
+
description: Malformed workspaceId
|
|
567
|
+
content:
|
|
568
|
+
application/json:
|
|
569
|
+
schema:
|
|
570
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
621
571
|
"401":
|
|
622
572
|
$ref: "#/components/responses/Unauthorized"
|
|
573
|
+
"403":
|
|
574
|
+
$ref: "#/components/responses/Forbidden"
|
|
575
|
+
"404":
|
|
576
|
+
description: Workspace does not exist
|
|
577
|
+
content:
|
|
578
|
+
application/json:
|
|
579
|
+
schema:
|
|
580
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
623
581
|
put:
|
|
624
582
|
tags: [CompanyProfile]
|
|
625
583
|
summary: Upsert company profile
|
|
626
584
|
operationId: putCompanyProfile
|
|
585
|
+
description: >
|
|
586
|
+
Idempotent upsert of the workspace's company profile. On success, also
|
|
587
|
+
synchronizes `tai_workspaces.name` to the new `companyName` so subsequent
|
|
588
|
+
calls to `GET /me/workspaces` reflect the updated display name. Repeated
|
|
589
|
+
PUTs replace the stored payload entirely.
|
|
627
590
|
parameters:
|
|
628
|
-
- $ref: "#/components/parameters/
|
|
591
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
629
592
|
requestBody:
|
|
630
593
|
required: true
|
|
631
594
|
content:
|
|
@@ -635,16 +598,30 @@ paths:
|
|
|
635
598
|
responses:
|
|
636
599
|
"204":
|
|
637
600
|
description: Saved
|
|
601
|
+
"400":
|
|
602
|
+
description: Body fails validation (missing/invalid required field, bad enum, conditional rule)
|
|
603
|
+
content:
|
|
604
|
+
application/json:
|
|
605
|
+
schema:
|
|
606
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
638
607
|
"401":
|
|
639
608
|
$ref: "#/components/responses/Unauthorized"
|
|
609
|
+
"403":
|
|
610
|
+
$ref: "#/components/responses/Forbidden"
|
|
611
|
+
"404":
|
|
612
|
+
description: Workspace does not exist
|
|
613
|
+
content:
|
|
614
|
+
application/json:
|
|
615
|
+
schema:
|
|
616
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
640
617
|
|
|
641
|
-
/
|
|
618
|
+
/workspaces/{workspaceId}/ai-readiness:
|
|
642
619
|
get:
|
|
643
620
|
tags: [AIReadiness]
|
|
644
621
|
summary: Get AI readiness
|
|
645
622
|
operationId: getAiReadiness
|
|
646
623
|
parameters:
|
|
647
|
-
- $ref: "#/components/parameters/
|
|
624
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
648
625
|
responses:
|
|
649
626
|
"200":
|
|
650
627
|
description: State or JSON null
|
|
@@ -659,7 +636,7 @@ paths:
|
|
|
659
636
|
summary: Upsert AI readiness
|
|
660
637
|
operationId: putAiReadiness
|
|
661
638
|
parameters:
|
|
662
|
-
- $ref: "#/components/parameters/
|
|
639
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
663
640
|
requestBody:
|
|
664
641
|
required: true
|
|
665
642
|
content:
|
|
@@ -672,13 +649,13 @@ paths:
|
|
|
672
649
|
"401":
|
|
673
650
|
$ref: "#/components/responses/Unauthorized"
|
|
674
651
|
|
|
675
|
-
/
|
|
652
|
+
/workspaces/{workspaceId}/ai-readiness/maturity:
|
|
676
653
|
post:
|
|
677
654
|
tags: [AIReadiness]
|
|
678
655
|
summary: Compute maturity level
|
|
679
656
|
operationId: postAiReadinessMaturity
|
|
680
657
|
parameters:
|
|
681
|
-
- $ref: "#/components/parameters/
|
|
658
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
682
659
|
requestBody:
|
|
683
660
|
required: true
|
|
684
661
|
content:
|
|
@@ -695,13 +672,13 @@ paths:
|
|
|
695
672
|
"401":
|
|
696
673
|
$ref: "#/components/responses/Unauthorized"
|
|
697
674
|
|
|
698
|
-
/
|
|
675
|
+
/workspaces/{workspaceId}/tech-stack:
|
|
699
676
|
get:
|
|
700
677
|
tags: [TechStack]
|
|
701
678
|
summary: Get tech stack
|
|
702
679
|
operationId: getTechStack
|
|
703
680
|
parameters:
|
|
704
|
-
- $ref: "#/components/parameters/
|
|
681
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
705
682
|
responses:
|
|
706
683
|
"200":
|
|
707
684
|
description: Stack or JSON null
|
|
@@ -716,7 +693,7 @@ paths:
|
|
|
716
693
|
summary: Upsert tech stack
|
|
717
694
|
operationId: putTechStack
|
|
718
695
|
parameters:
|
|
719
|
-
- $ref: "#/components/parameters/
|
|
696
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
720
697
|
requestBody:
|
|
721
698
|
required: true
|
|
722
699
|
content:
|
|
@@ -729,13 +706,13 @@ paths:
|
|
|
729
706
|
"401":
|
|
730
707
|
$ref: "#/components/responses/Unauthorized"
|
|
731
708
|
|
|
732
|
-
/
|
|
709
|
+
/workspaces/{workspaceId}/nda:
|
|
733
710
|
get:
|
|
734
711
|
tags: [NDA]
|
|
735
712
|
summary: Get NDA completion state
|
|
736
713
|
operationId: getNda
|
|
737
714
|
parameters:
|
|
738
|
-
- $ref: "#/components/parameters/
|
|
715
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
739
716
|
responses:
|
|
740
717
|
"200":
|
|
741
718
|
description: Completion or JSON null
|
|
@@ -746,13 +723,13 @@ paths:
|
|
|
746
723
|
"401":
|
|
747
724
|
$ref: "#/components/responses/Unauthorized"
|
|
748
725
|
|
|
749
|
-
/
|
|
726
|
+
/workspaces/{workspaceId}/nda/template:
|
|
750
727
|
get:
|
|
751
728
|
tags: [NDA]
|
|
752
729
|
summary: NDA template for display
|
|
753
730
|
operationId: getNdaTemplate
|
|
754
731
|
parameters:
|
|
755
|
-
- $ref: "#/components/parameters/
|
|
732
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
756
733
|
responses:
|
|
757
734
|
"200":
|
|
758
735
|
description: Template
|
|
@@ -763,13 +740,13 @@ paths:
|
|
|
763
740
|
"401":
|
|
764
741
|
$ref: "#/components/responses/Unauthorized"
|
|
765
742
|
|
|
766
|
-
/
|
|
743
|
+
/workspaces/{workspaceId}/nda/sign:
|
|
767
744
|
post:
|
|
768
745
|
tags: [NDA]
|
|
769
746
|
summary: Electronic NDA signature
|
|
770
747
|
operationId: postNdaSign
|
|
771
748
|
parameters:
|
|
772
|
-
- $ref: "#/components/parameters/
|
|
749
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
773
750
|
requestBody:
|
|
774
751
|
required: true
|
|
775
752
|
content:
|
|
@@ -786,7 +763,7 @@ paths:
|
|
|
786
763
|
"401":
|
|
787
764
|
$ref: "#/components/responses/Unauthorized"
|
|
788
765
|
|
|
789
|
-
/
|
|
766
|
+
/workspaces/{workspaceId}/nda/external:
|
|
790
767
|
post:
|
|
791
768
|
tags: [NDA]
|
|
792
769
|
summary: External NDA path (after Supabase upload)
|
|
@@ -795,7 +772,7 @@ paths:
|
|
|
795
772
|
Multipart variant may be supported by the server as an alternative.
|
|
796
773
|
operationId: postNdaExternal
|
|
797
774
|
parameters:
|
|
798
|
-
- $ref: "#/components/parameters/
|
|
775
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
799
776
|
requestBody:
|
|
800
777
|
required: true
|
|
801
778
|
content:
|
|
@@ -812,13 +789,13 @@ paths:
|
|
|
812
789
|
"401":
|
|
813
790
|
$ref: "#/components/responses/Unauthorized"
|
|
814
791
|
|
|
815
|
-
/
|
|
792
|
+
/workspaces/{workspaceId}/readiness/repos:
|
|
816
793
|
get:
|
|
817
794
|
tags: [RepositoryReadiness]
|
|
818
795
|
summary: List repo readiness scores
|
|
819
796
|
operationId: listReadinessRepos
|
|
820
797
|
parameters:
|
|
821
|
-
- $ref: "#/components/parameters/
|
|
798
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
822
799
|
responses:
|
|
823
800
|
"200":
|
|
824
801
|
description: Repositories analyzed
|
|
@@ -831,13 +808,13 @@ paths:
|
|
|
831
808
|
"401":
|
|
832
809
|
$ref: "#/components/responses/Unauthorized"
|
|
833
810
|
|
|
834
|
-
/
|
|
811
|
+
/workspaces/{workspaceId}/readiness/repos/{repoId}:
|
|
835
812
|
get:
|
|
836
813
|
tags: [RepositoryReadiness]
|
|
837
814
|
summary: Single repo readiness
|
|
838
815
|
operationId: getReadinessRepo
|
|
839
816
|
parameters:
|
|
840
|
-
- $ref: "#/components/parameters/
|
|
817
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
841
818
|
- $ref: "#/components/parameters/RepoId"
|
|
842
819
|
responses:
|
|
843
820
|
"200":
|
|
@@ -849,13 +826,13 @@ paths:
|
|
|
849
826
|
"401":
|
|
850
827
|
$ref: "#/components/responses/Unauthorized"
|
|
851
828
|
|
|
852
|
-
/
|
|
829
|
+
/workspaces/{workspaceId}/readiness/dimensions:
|
|
853
830
|
get:
|
|
854
831
|
tags: [RepositoryReadiness]
|
|
855
832
|
summary: Readiness dimensions catalog
|
|
856
833
|
operationId: listReadinessDimensions
|
|
857
834
|
parameters:
|
|
858
|
-
- $ref: "#/components/parameters/
|
|
835
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
859
836
|
responses:
|
|
860
837
|
"200":
|
|
861
838
|
description: Dimensions
|
|
@@ -868,13 +845,13 @@ paths:
|
|
|
868
845
|
"401":
|
|
869
846
|
$ref: "#/components/responses/Unauthorized"
|
|
870
847
|
|
|
871
|
-
/
|
|
848
|
+
/workspaces/{workspaceId}/readiness/fixes:
|
|
872
849
|
get:
|
|
873
850
|
tags: [RepositoryReadiness]
|
|
874
851
|
summary: List fix requests
|
|
875
852
|
operationId: listReadinessFixes
|
|
876
853
|
parameters:
|
|
877
|
-
- $ref: "#/components/parameters/
|
|
854
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
878
855
|
responses:
|
|
879
856
|
"200":
|
|
880
857
|
description: Fix queue
|
|
@@ -891,7 +868,7 @@ paths:
|
|
|
891
868
|
summary: Enqueue fix for an issue
|
|
892
869
|
operationId: postReadinessFix
|
|
893
870
|
parameters:
|
|
894
|
-
- $ref: "#/components/parameters/
|
|
871
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
895
872
|
requestBody:
|
|
896
873
|
required: true
|
|
897
874
|
content:
|
|
@@ -908,13 +885,13 @@ paths:
|
|
|
908
885
|
"401":
|
|
909
886
|
$ref: "#/components/responses/Unauthorized"
|
|
910
887
|
|
|
911
|
-
/
|
|
888
|
+
/workspaces/{workspaceId}/squad:
|
|
912
889
|
get:
|
|
913
890
|
tags: [SquadProjects]
|
|
914
891
|
summary: Get squad configuration
|
|
915
892
|
operationId: getSquad
|
|
916
893
|
parameters:
|
|
917
|
-
- $ref: "#/components/parameters/
|
|
894
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
918
895
|
responses:
|
|
919
896
|
"200":
|
|
920
897
|
description: Squad
|
|
@@ -929,7 +906,7 @@ paths:
|
|
|
929
906
|
summary: Upsert squad
|
|
930
907
|
operationId: putSquad
|
|
931
908
|
parameters:
|
|
932
|
-
- $ref: "#/components/parameters/
|
|
909
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
933
910
|
requestBody:
|
|
934
911
|
required: true
|
|
935
912
|
content:
|
|
@@ -942,13 +919,13 @@ paths:
|
|
|
942
919
|
"401":
|
|
943
920
|
$ref: "#/components/responses/Unauthorized"
|
|
944
921
|
|
|
945
|
-
/
|
|
922
|
+
/workspaces/{workspaceId}/projects:
|
|
946
923
|
get:
|
|
947
924
|
tags: [SquadProjects]
|
|
948
925
|
summary: List projects
|
|
949
926
|
operationId: listProjects
|
|
950
927
|
parameters:
|
|
951
|
-
- $ref: "#/components/parameters/
|
|
928
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
952
929
|
responses:
|
|
953
930
|
"200":
|
|
954
931
|
description: Projects
|
|
@@ -965,7 +942,7 @@ paths:
|
|
|
965
942
|
summary: Create project
|
|
966
943
|
operationId: createProject
|
|
967
944
|
parameters:
|
|
968
|
-
- $ref: "#/components/parameters/
|
|
945
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
969
946
|
requestBody:
|
|
970
947
|
required: true
|
|
971
948
|
content:
|
|
@@ -982,13 +959,13 @@ paths:
|
|
|
982
959
|
"401":
|
|
983
960
|
$ref: "#/components/responses/Unauthorized"
|
|
984
961
|
|
|
985
|
-
/
|
|
962
|
+
/workspaces/{workspaceId}/projects/{projectId}:
|
|
986
963
|
patch:
|
|
987
964
|
tags: [SquadProjects]
|
|
988
965
|
summary: Update project
|
|
989
966
|
operationId: patchProject
|
|
990
967
|
parameters:
|
|
991
|
-
- $ref: "#/components/parameters/
|
|
968
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
992
969
|
- $ref: "#/components/parameters/ProjectId"
|
|
993
970
|
requestBody:
|
|
994
971
|
required: true
|
|
@@ -1006,13 +983,13 @@ paths:
|
|
|
1006
983
|
"401":
|
|
1007
984
|
$ref: "#/components/responses/Unauthorized"
|
|
1008
985
|
|
|
1009
|
-
/
|
|
986
|
+
/workspaces/{workspaceId}/notifications:
|
|
1010
987
|
get:
|
|
1011
988
|
tags: [Notifications]
|
|
1012
989
|
summary: Paginated notifications
|
|
1013
990
|
operationId: listNotifications
|
|
1014
991
|
parameters:
|
|
1015
|
-
- $ref: "#/components/parameters/
|
|
992
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1016
993
|
- name: limit
|
|
1017
994
|
in: query
|
|
1018
995
|
schema: { type: integer, minimum: 1 }
|
|
@@ -1029,13 +1006,13 @@ paths:
|
|
|
1029
1006
|
"401":
|
|
1030
1007
|
$ref: "#/components/responses/Unauthorized"
|
|
1031
1008
|
|
|
1032
|
-
/
|
|
1009
|
+
/workspaces/{workspaceId}/notifications/{id}/read:
|
|
1033
1010
|
post:
|
|
1034
1011
|
tags: [Notifications]
|
|
1035
1012
|
summary: Mark notification read
|
|
1036
1013
|
operationId: postNotificationRead
|
|
1037
1014
|
parameters:
|
|
1038
|
-
- $ref: "#/components/parameters/
|
|
1015
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1039
1016
|
- $ref: "#/components/parameters/NotificationId"
|
|
1040
1017
|
responses:
|
|
1041
1018
|
"204":
|
|
@@ -1043,26 +1020,26 @@ paths:
|
|
|
1043
1020
|
"401":
|
|
1044
1021
|
$ref: "#/components/responses/Unauthorized"
|
|
1045
1022
|
|
|
1046
|
-
/
|
|
1023
|
+
/workspaces/{workspaceId}/notifications/read-all:
|
|
1047
1024
|
post:
|
|
1048
1025
|
tags: [Notifications]
|
|
1049
1026
|
summary: Mark all notifications read
|
|
1050
1027
|
operationId: postNotificationsReadAll
|
|
1051
1028
|
parameters:
|
|
1052
|
-
- $ref: "#/components/parameters/
|
|
1029
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1053
1030
|
responses:
|
|
1054
1031
|
"204":
|
|
1055
1032
|
description: Updated
|
|
1056
1033
|
"401":
|
|
1057
1034
|
$ref: "#/components/responses/Unauthorized"
|
|
1058
1035
|
|
|
1059
|
-
/
|
|
1036
|
+
/workspaces/{workspaceId}/ai-strategy/recommend:
|
|
1060
1037
|
post:
|
|
1061
1038
|
tags: [AIStrategy]
|
|
1062
1039
|
summary: Generate AI strategy recommendations
|
|
1063
1040
|
operationId: postAiStrategyRecommend
|
|
1064
1041
|
parameters:
|
|
1065
|
-
- $ref: "#/components/parameters/
|
|
1042
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1066
1043
|
requestBody:
|
|
1067
1044
|
required: true
|
|
1068
1045
|
content:
|
|
@@ -1079,28 +1056,45 @@ paths:
|
|
|
1079
1056
|
"401":
|
|
1080
1057
|
$ref: "#/components/responses/Unauthorized"
|
|
1081
1058
|
|
|
1082
|
-
/
|
|
1059
|
+
/workspaces/{workspaceId}/journey/progress:
|
|
1083
1060
|
get:
|
|
1084
1061
|
tags: [Journey]
|
|
1085
1062
|
summary: Journey step completion
|
|
1086
1063
|
operationId: getJourneyProgress
|
|
1087
1064
|
parameters:
|
|
1088
|
-
- $ref: "#/components/parameters/
|
|
1065
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1089
1066
|
responses:
|
|
1090
1067
|
"200":
|
|
1091
|
-
description: Progress
|
|
1068
|
+
description: Progress (empty completedSteps when no row exists yet; updatedAt is synthetic in that case)
|
|
1092
1069
|
content:
|
|
1093
1070
|
application/json:
|
|
1094
1071
|
schema:
|
|
1095
1072
|
$ref: "#/components/schemas/JourneyProgressDto"
|
|
1073
|
+
"400":
|
|
1074
|
+
description: Malformed workspaceId
|
|
1075
|
+
content:
|
|
1076
|
+
application/json:
|
|
1077
|
+
schema:
|
|
1078
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1096
1079
|
"401":
|
|
1097
1080
|
$ref: "#/components/responses/Unauthorized"
|
|
1081
|
+
"403":
|
|
1082
|
+
$ref: "#/components/responses/Forbidden"
|
|
1083
|
+
"404":
|
|
1084
|
+
description: Workspace does not exist
|
|
1085
|
+
content:
|
|
1086
|
+
application/json:
|
|
1087
|
+
schema:
|
|
1088
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1098
1089
|
put:
|
|
1099
1090
|
tags: [Journey]
|
|
1100
1091
|
summary: Replace completed steps
|
|
1101
1092
|
operationId: putJourneyProgress
|
|
1093
|
+
description: >
|
|
1094
|
+
Idempotent replace-all of completed route strings. Returns the persisted
|
|
1095
|
+
JourneyProgressDto including updatedAt.
|
|
1102
1096
|
parameters:
|
|
1103
|
-
- $ref: "#/components/parameters/
|
|
1097
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1104
1098
|
requestBody:
|
|
1105
1099
|
required: true
|
|
1106
1100
|
content:
|
|
@@ -1108,18 +1102,34 @@ paths:
|
|
|
1108
1102
|
schema:
|
|
1109
1103
|
$ref: "#/components/schemas/JourneyProgressUpdateDto"
|
|
1110
1104
|
responses:
|
|
1111
|
-
"
|
|
1112
|
-
description: Saved
|
|
1105
|
+
"200":
|
|
1106
|
+
description: Saved progress
|
|
1107
|
+
content:
|
|
1108
|
+
application/json:
|
|
1109
|
+
schema:
|
|
1110
|
+
$ref: "#/components/schemas/JourneyProgressDto"
|
|
1111
|
+
"400":
|
|
1112
|
+
description: Body fails validation (non-array, invalid entries, too many steps)
|
|
1113
|
+
content:
|
|
1114
|
+
application/json:
|
|
1115
|
+
schema:
|
|
1116
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1113
1117
|
"401":
|
|
1114
1118
|
$ref: "#/components/responses/Unauthorized"
|
|
1119
|
+
"403":
|
|
1120
|
+
$ref: "#/components/responses/Forbidden"
|
|
1121
|
+
"404":
|
|
1122
|
+
description: Workspace does not exist
|
|
1123
|
+
content:
|
|
1124
|
+
application/json:
|
|
1125
|
+
schema:
|
|
1126
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
1115
1127
|
|
|
1116
|
-
/
|
|
1128
|
+
/me/preferences:
|
|
1117
1129
|
get:
|
|
1118
1130
|
tags: [Preferences]
|
|
1119
|
-
summary: Get preferences for current user
|
|
1131
|
+
summary: Get preferences for current user
|
|
1120
1132
|
operationId: getMyPreferences
|
|
1121
|
-
parameters:
|
|
1122
|
-
- $ref: "#/components/parameters/TenantId"
|
|
1123
1133
|
responses:
|
|
1124
1134
|
"200":
|
|
1125
1135
|
description: Preferences
|
|
@@ -1133,8 +1143,6 @@ paths:
|
|
|
1133
1143
|
tags: [Preferences]
|
|
1134
1144
|
summary: Upsert preferences
|
|
1135
1145
|
operationId: putMyPreferences
|
|
1136
|
-
parameters:
|
|
1137
|
-
- $ref: "#/components/parameters/TenantId"
|
|
1138
1146
|
requestBody:
|
|
1139
1147
|
required: true
|
|
1140
1148
|
content:
|
|
@@ -1147,13 +1155,13 @@ paths:
|
|
|
1147
1155
|
"401":
|
|
1148
1156
|
$ref: "#/components/responses/Unauthorized"
|
|
1149
1157
|
|
|
1150
|
-
/
|
|
1158
|
+
/workspaces/{workspaceId}/org-chart/import:
|
|
1151
1159
|
post:
|
|
1152
1160
|
tags: [OrgChartImport]
|
|
1153
1161
|
summary: Import org chart from Supabase storage path
|
|
1154
1162
|
operationId: postOrgChartImport
|
|
1155
1163
|
parameters:
|
|
1156
|
-
- $ref: "#/components/parameters/
|
|
1164
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
1157
1165
|
requestBody:
|
|
1158
1166
|
required: true
|
|
1159
1167
|
content:
|
|
@@ -1180,8 +1188,8 @@ components:
|
|
|
1180
1188
|
description: Supabase access token (`Authorization` header).
|
|
1181
1189
|
|
|
1182
1190
|
parameters:
|
|
1183
|
-
|
|
1184
|
-
name:
|
|
1191
|
+
WorkspaceId:
|
|
1192
|
+
name: workspaceId
|
|
1185
1193
|
in: path
|
|
1186
1194
|
required: true
|
|
1187
1195
|
schema:
|
|
@@ -1241,16 +1249,16 @@ components:
|
|
|
1241
1249
|
|
|
1242
1250
|
CreateTenantBodyDto:
|
|
1243
1251
|
type: object
|
|
1244
|
-
required: [
|
|
1252
|
+
required: [workspaceId]
|
|
1245
1253
|
properties:
|
|
1246
|
-
|
|
1254
|
+
workspaceId:
|
|
1247
1255
|
type: string
|
|
1248
1256
|
|
|
1249
1257
|
CreateTenantResponseDto:
|
|
1250
1258
|
type: object
|
|
1251
|
-
required: [
|
|
1259
|
+
required: [workspaceId, ok]
|
|
1252
1260
|
properties:
|
|
1253
|
-
|
|
1261
|
+
workspaceId:
|
|
1254
1262
|
type: string
|
|
1255
1263
|
ok:
|
|
1256
1264
|
type: boolean
|
|
@@ -1354,9 +1362,9 @@ components:
|
|
|
1354
1362
|
|
|
1355
1363
|
DashboardProductivityDto:
|
|
1356
1364
|
type: object
|
|
1357
|
-
required: [
|
|
1365
|
+
required: [workspaceId, windowStart, windowEnd, scope, metrics]
|
|
1358
1366
|
properties:
|
|
1359
|
-
|
|
1367
|
+
workspaceId:
|
|
1360
1368
|
type: string
|
|
1361
1369
|
windowStart:
|
|
1362
1370
|
type: string
|
|
@@ -1452,27 +1460,6 @@ components:
|
|
|
1452
1460
|
name:
|
|
1453
1461
|
type: string
|
|
1454
1462
|
|
|
1455
|
-
OrganizationDto:
|
|
1456
|
-
type: object
|
|
1457
|
-
required: [workspaceId, legalName]
|
|
1458
|
-
properties:
|
|
1459
|
-
workspaceId:
|
|
1460
|
-
type: string
|
|
1461
|
-
legalName:
|
|
1462
|
-
type: string
|
|
1463
|
-
industry:
|
|
1464
|
-
type: string
|
|
1465
|
-
companySize:
|
|
1466
|
-
type: string
|
|
1467
|
-
engineeringHeadcount:
|
|
1468
|
-
type: integer
|
|
1469
|
-
nullable: true
|
|
1470
|
-
headquarters:
|
|
1471
|
-
type: string
|
|
1472
|
-
metadata:
|
|
1473
|
-
type: object
|
|
1474
|
-
additionalProperties: true
|
|
1475
|
-
|
|
1476
1463
|
CompanyProfileDto:
|
|
1477
1464
|
type: object
|
|
1478
1465
|
required: [companyName, industry, companySize, engineeringHC, headquarters]
|
|
@@ -2244,30 +2231,42 @@ components:
|
|
|
2244
2231
|
items:
|
|
2245
2232
|
type: string
|
|
2246
2233
|
|
|
2234
|
+
ThemePreference:
|
|
2235
|
+
type: string
|
|
2236
|
+
enum: [light, dark, system]
|
|
2237
|
+
|
|
2238
|
+
NotificationPreferencesDto:
|
|
2239
|
+
type: object
|
|
2240
|
+
additionalProperties: false
|
|
2241
|
+
required: [status, comment, activity, system]
|
|
2242
|
+
properties:
|
|
2243
|
+
status:
|
|
2244
|
+
type: boolean
|
|
2245
|
+
description: Sync/health status notifications.
|
|
2246
|
+
comment:
|
|
2247
|
+
type: boolean
|
|
2248
|
+
description: Comments and mentions.
|
|
2249
|
+
activity:
|
|
2250
|
+
type: boolean
|
|
2251
|
+
description: General activity feed.
|
|
2252
|
+
system:
|
|
2253
|
+
type: boolean
|
|
2254
|
+
description: System / platform announcements.
|
|
2255
|
+
|
|
2247
2256
|
PreferencesDto:
|
|
2248
2257
|
type: object
|
|
2258
|
+
additionalProperties: false
|
|
2249
2259
|
required: [theme, sidebarCollapsed, timezone, notifications]
|
|
2250
2260
|
properties:
|
|
2251
2261
|
theme:
|
|
2252
|
-
|
|
2253
|
-
enum: [light, dark, system]
|
|
2262
|
+
$ref: "#/components/schemas/ThemePreference"
|
|
2254
2263
|
sidebarCollapsed:
|
|
2255
2264
|
type: boolean
|
|
2256
2265
|
timezone:
|
|
2257
2266
|
type: string
|
|
2258
2267
|
description: IANA timezone name
|
|
2259
2268
|
notifications:
|
|
2260
|
-
|
|
2261
|
-
required: [status, comment, activity, system]
|
|
2262
|
-
properties:
|
|
2263
|
-
status:
|
|
2264
|
-
type: boolean
|
|
2265
|
-
comment:
|
|
2266
|
-
type: boolean
|
|
2267
|
-
activity:
|
|
2268
|
-
type: boolean
|
|
2269
|
-
system:
|
|
2270
|
-
type: boolean
|
|
2269
|
+
$ref: "#/components/schemas/NotificationPreferencesDto"
|
|
2271
2270
|
|
|
2272
2271
|
OrgChartImportBodyDto:
|
|
2273
2272
|
type: object
|