@thinkai/tai-api-contract 2.5.16 → 2.6.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 +671 -11
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +108 -1
- package/dist/index.d.ts.map +1 -1
- package/openapi/openapi.yaml +590 -12
- package/package.json +1 -1
- package/src/generated/openapi.ts +671 -11
- package/src/index.ts +122 -1
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.6.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}/...`.
|
|
@@ -50,6 +50,8 @@ tags:
|
|
|
50
50
|
description: Org chart import via storage path (§14)
|
|
51
51
|
- name: AgenticFoundation
|
|
52
52
|
description: Agentic Foundation pillars (epic #278); reads stored repository readiness snapshots
|
|
53
|
+
- name: YourAiJourney
|
|
54
|
+
description: Your AI Journey dashboard aggregators (epic #267); composes readiness, metrics, and AI-spend data for the /dashboard page
|
|
53
55
|
|
|
54
56
|
paths:
|
|
55
57
|
/me:
|
|
@@ -138,6 +140,9 @@ paths:
|
|
|
138
140
|
get:
|
|
139
141
|
tags: [Workspace]
|
|
140
142
|
summary: List workspace team members
|
|
143
|
+
description: >
|
|
144
|
+
Returns active workspace members (`tai_workspace_members` with `deleted_at` null).
|
|
145
|
+
Any workspace member may list; invite and role changes require admin.
|
|
141
146
|
operationId: listTenantMembers
|
|
142
147
|
parameters:
|
|
143
148
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
@@ -148,15 +153,33 @@ paths:
|
|
|
148
153
|
application/json:
|
|
149
154
|
schema:
|
|
150
155
|
$ref: "#/components/schemas/TeamMemberListDto"
|
|
156
|
+
example:
|
|
157
|
+
members:
|
|
158
|
+
- id: "11111111-1111-4111-8111-111111111111"
|
|
159
|
+
name: "Alex Admin"
|
|
160
|
+
email: "alex@example.com"
|
|
161
|
+
role: admin
|
|
151
162
|
"401":
|
|
152
163
|
$ref: "#/components/responses/Unauthorized"
|
|
153
164
|
"403":
|
|
154
165
|
$ref: "#/components/responses/Forbidden"
|
|
166
|
+
"404":
|
|
167
|
+
description: Workspace does not exist or malformed workspaceId
|
|
168
|
+
content:
|
|
169
|
+
application/json:
|
|
170
|
+
schema:
|
|
171
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
155
172
|
|
|
156
173
|
/workspaces/{workspaceId}/members/invite:
|
|
157
174
|
post:
|
|
158
175
|
tags: [Workspace]
|
|
159
176
|
summary: Invite member to workspace
|
|
177
|
+
description: >
|
|
178
|
+
Workspace admin only. Upserts `tai_users` by email and adds or reactivates
|
|
179
|
+
`tai_workspace_members`. Idempotent when the email is already an active member:
|
|
180
|
+
returns **201** with the existing row and **does not change** their role if the
|
|
181
|
+
request body role differs. Does not send email; optional `tai_workspace_invitations`
|
|
182
|
+
row may be recorded (no accept/link flow yet).
|
|
160
183
|
operationId: inviteTenantMember
|
|
161
184
|
parameters:
|
|
162
185
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
@@ -166,6 +189,9 @@ paths:
|
|
|
166
189
|
application/json:
|
|
167
190
|
schema:
|
|
168
191
|
$ref: "#/components/schemas/InviteTeamMemberBodyDto"
|
|
192
|
+
example:
|
|
193
|
+
email: new.member@example.com
|
|
194
|
+
role: editor
|
|
169
195
|
responses:
|
|
170
196
|
"201":
|
|
171
197
|
description: Invited member row
|
|
@@ -173,28 +199,40 @@ paths:
|
|
|
173
199
|
application/json:
|
|
174
200
|
schema:
|
|
175
201
|
$ref: "#/components/schemas/TeamMemberDto"
|
|
202
|
+
"400":
|
|
203
|
+
description: Invalid email or role
|
|
204
|
+
content:
|
|
205
|
+
application/json:
|
|
206
|
+
schema:
|
|
207
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
176
208
|
"401":
|
|
177
209
|
$ref: "#/components/responses/Unauthorized"
|
|
178
210
|
"403":
|
|
179
211
|
$ref: "#/components/responses/Forbidden"
|
|
212
|
+
"404":
|
|
213
|
+
description: Workspace does not exist or malformed workspaceId
|
|
214
|
+
content:
|
|
215
|
+
application/json:
|
|
216
|
+
schema:
|
|
217
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
180
218
|
|
|
181
219
|
/workspaces/{workspaceId}/members/{memberId}:
|
|
182
220
|
patch:
|
|
183
221
|
tags: [Workspace]
|
|
184
222
|
summary: Update workspace member role
|
|
223
|
+
description: Workspace admin only. `memberId` is `tai_users.id` (UUID), not the auth subject.
|
|
185
224
|
operationId: updateTenantMemberRole
|
|
186
225
|
parameters:
|
|
187
226
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
188
|
-
-
|
|
189
|
-
in: path
|
|
190
|
-
required: true
|
|
191
|
-
schema: { type: string }
|
|
227
|
+
- $ref: "#/components/parameters/WorkspaceMemberId"
|
|
192
228
|
requestBody:
|
|
193
229
|
required: true
|
|
194
230
|
content:
|
|
195
231
|
application/json:
|
|
196
232
|
schema:
|
|
197
233
|
$ref: "#/components/schemas/UpdateTeamMemberRoleBodyDto"
|
|
234
|
+
example:
|
|
235
|
+
role: viewer
|
|
198
236
|
responses:
|
|
199
237
|
"200":
|
|
200
238
|
description: Updated member row
|
|
@@ -202,22 +240,43 @@ paths:
|
|
|
202
240
|
application/json:
|
|
203
241
|
schema:
|
|
204
242
|
$ref: "#/components/schemas/TeamMemberDto"
|
|
243
|
+
"400":
|
|
244
|
+
description: Invalid role payload
|
|
245
|
+
content:
|
|
246
|
+
application/json:
|
|
247
|
+
schema:
|
|
248
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
205
249
|
"401":
|
|
206
250
|
$ref: "#/components/responses/Unauthorized"
|
|
207
251
|
"403":
|
|
208
252
|
$ref: "#/components/responses/Forbidden"
|
|
209
253
|
"404":
|
|
210
|
-
description: Member not found
|
|
254
|
+
description: Member not found or invalid memberId
|
|
255
|
+
content:
|
|
256
|
+
application/json:
|
|
257
|
+
schema:
|
|
258
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
259
|
+
"409":
|
|
260
|
+
description: Cannot demote the last workspace admin
|
|
261
|
+
content:
|
|
262
|
+
application/json:
|
|
263
|
+
schema:
|
|
264
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
265
|
+
examples:
|
|
266
|
+
lastAdmin:
|
|
267
|
+
value:
|
|
268
|
+
error: Cannot change role of the last workspace admin
|
|
269
|
+
code: last_admin
|
|
211
270
|
delete:
|
|
212
271
|
tags: [Workspace]
|
|
213
272
|
summary: Remove member from workspace
|
|
273
|
+
description: >
|
|
274
|
+
Workspace admin only. Soft-deletes the membership (`deleted_at` set).
|
|
275
|
+
Cannot remove the workspace owner or the last admin.
|
|
214
276
|
operationId: removeTenantMember
|
|
215
277
|
parameters:
|
|
216
278
|
- $ref: "#/components/parameters/WorkspaceId"
|
|
217
|
-
-
|
|
218
|
-
in: path
|
|
219
|
-
required: true
|
|
220
|
-
schema: { type: string }
|
|
279
|
+
- $ref: "#/components/parameters/WorkspaceMemberId"
|
|
221
280
|
responses:
|
|
222
281
|
"204":
|
|
223
282
|
description: Removed
|
|
@@ -226,7 +285,26 @@ paths:
|
|
|
226
285
|
"403":
|
|
227
286
|
$ref: "#/components/responses/Forbidden"
|
|
228
287
|
"404":
|
|
229
|
-
description: Member not found
|
|
288
|
+
description: Member not found or invalid memberId
|
|
289
|
+
content:
|
|
290
|
+
application/json:
|
|
291
|
+
schema:
|
|
292
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
293
|
+
"409":
|
|
294
|
+
description: Cannot remove workspace owner or last admin
|
|
295
|
+
content:
|
|
296
|
+
application/json:
|
|
297
|
+
schema:
|
|
298
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
299
|
+
examples:
|
|
300
|
+
lastAdmin:
|
|
301
|
+
value:
|
|
302
|
+
error: Cannot remove the last workspace admin
|
|
303
|
+
code: last_admin
|
|
304
|
+
workspaceOwner:
|
|
305
|
+
value:
|
|
306
|
+
error: Cannot remove the workspace owner
|
|
307
|
+
code: workspace_owner
|
|
230
308
|
|
|
231
309
|
/workspaces/{workspaceId}/org-chart:
|
|
232
310
|
get:
|
|
@@ -2986,6 +3064,272 @@ paths:
|
|
|
2986
3064
|
schema:
|
|
2987
3065
|
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2988
3066
|
|
|
3067
|
+
# ── Your AI Journey (/dashboard) — epic #267 ─────────────────────────────
|
|
3068
|
+
|
|
3069
|
+
/workspaces/{workspaceId}/your-ai-journey/analytics:
|
|
3070
|
+
get:
|
|
3071
|
+
tags: [YourAiJourney]
|
|
3072
|
+
summary: Combined analytics summary for the /dashboard page
|
|
3073
|
+
description: >
|
|
3074
|
+
Returns a single aggregated payload combining journey step progress, readiness summary,
|
|
3075
|
+
and PR-signal headline metrics. Covers issue #268. Results are cached for 60 seconds.
|
|
3076
|
+
operationId: getYourAiJourneyAnalytics
|
|
3077
|
+
parameters:
|
|
3078
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3079
|
+
responses:
|
|
3080
|
+
"200":
|
|
3081
|
+
description: Analytics summary
|
|
3082
|
+
content:
|
|
3083
|
+
application/json:
|
|
3084
|
+
schema:
|
|
3085
|
+
$ref: "#/components/schemas/YourAiJourneyAnalyticsDto"
|
|
3086
|
+
"401":
|
|
3087
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3088
|
+
"403":
|
|
3089
|
+
$ref: "#/components/responses/Forbidden"
|
|
3090
|
+
"404":
|
|
3091
|
+
description: Workspace does not exist
|
|
3092
|
+
content:
|
|
3093
|
+
application/json:
|
|
3094
|
+
schema:
|
|
3095
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3096
|
+
|
|
3097
|
+
/workspaces/{workspaceId}/your-ai-journey/pr-signals:
|
|
3098
|
+
get:
|
|
3099
|
+
tags: [YourAiJourney]
|
|
3100
|
+
summary: Weekly PR velocity and change-failure-rate time series
|
|
3101
|
+
description: >
|
|
3102
|
+
Returns a per-week time series of PR throughput and DORA change-failure-rate metrics,
|
|
3103
|
+
sourced from stored dashboard metrics. Covers issue #269. Results are cached for 60 seconds.
|
|
3104
|
+
operationId: getYourAiJourneyPrSignals
|
|
3105
|
+
parameters:
|
|
3106
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3107
|
+
- name: limit
|
|
3108
|
+
in: query
|
|
3109
|
+
schema:
|
|
3110
|
+
type: integer
|
|
3111
|
+
minimum: 1
|
|
3112
|
+
maximum: 52
|
|
3113
|
+
default: 8
|
|
3114
|
+
description: Number of weekly buckets to return (1–52; default 8).
|
|
3115
|
+
responses:
|
|
3116
|
+
"200":
|
|
3117
|
+
description: Weekly PR signals
|
|
3118
|
+
content:
|
|
3119
|
+
application/json:
|
|
3120
|
+
schema:
|
|
3121
|
+
$ref: "#/components/schemas/YourAiJourneyPrSignalsDto"
|
|
3122
|
+
"400":
|
|
3123
|
+
description: Invalid query parameter (limit out of range)
|
|
3124
|
+
content:
|
|
3125
|
+
application/json:
|
|
3126
|
+
schema:
|
|
3127
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3128
|
+
"401":
|
|
3129
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3130
|
+
"403":
|
|
3131
|
+
$ref: "#/components/responses/Forbidden"
|
|
3132
|
+
"404":
|
|
3133
|
+
description: Workspace does not exist
|
|
3134
|
+
content:
|
|
3135
|
+
application/json:
|
|
3136
|
+
schema:
|
|
3137
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3138
|
+
|
|
3139
|
+
/workspaces/{workspaceId}/your-ai-journey/readiness/aggregate:
|
|
3140
|
+
get:
|
|
3141
|
+
tags: [YourAiJourney]
|
|
3142
|
+
summary: Per-dimension readiness aggregate across all repos
|
|
3143
|
+
description: >
|
|
3144
|
+
Aggregates stored readiness scores across all workspace repos by dimension.
|
|
3145
|
+
Covers issue #270. Results are cached for 60 seconds.
|
|
3146
|
+
operationId: getYourAiJourneyReadinessAggregate
|
|
3147
|
+
parameters:
|
|
3148
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3149
|
+
responses:
|
|
3150
|
+
"200":
|
|
3151
|
+
description: Readiness aggregate
|
|
3152
|
+
content:
|
|
3153
|
+
application/json:
|
|
3154
|
+
schema:
|
|
3155
|
+
$ref: "#/components/schemas/YourAiJourneyReadinessAggregateDto"
|
|
3156
|
+
"401":
|
|
3157
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3158
|
+
"403":
|
|
3159
|
+
$ref: "#/components/responses/Forbidden"
|
|
3160
|
+
"404":
|
|
3161
|
+
description: Workspace does not exist
|
|
3162
|
+
content:
|
|
3163
|
+
application/json:
|
|
3164
|
+
schema:
|
|
3165
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3166
|
+
|
|
3167
|
+
/workspaces/{workspaceId}/your-ai-journey/journey/progress:
|
|
3168
|
+
get:
|
|
3169
|
+
tags: [YourAiJourney]
|
|
3170
|
+
summary: Workspace journey step completion
|
|
3171
|
+
description: >
|
|
3172
|
+
Returns the workspace-scoped journey progress state. Returns an empty `completedSteps`
|
|
3173
|
+
list with a synthetic `updatedAt` if no row exists yet. Covers issue #271.
|
|
3174
|
+
operationId: getYourAiJourneyProgress
|
|
3175
|
+
parameters:
|
|
3176
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3177
|
+
responses:
|
|
3178
|
+
"200":
|
|
3179
|
+
description: Journey progress
|
|
3180
|
+
content:
|
|
3181
|
+
application/json:
|
|
3182
|
+
schema:
|
|
3183
|
+
$ref: "#/components/schemas/JourneyProgressDto"
|
|
3184
|
+
"401":
|
|
3185
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3186
|
+
"403":
|
|
3187
|
+
$ref: "#/components/responses/Forbidden"
|
|
3188
|
+
"404":
|
|
3189
|
+
description: Workspace does not exist
|
|
3190
|
+
content:
|
|
3191
|
+
application/json:
|
|
3192
|
+
schema:
|
|
3193
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3194
|
+
put:
|
|
3195
|
+
tags: [YourAiJourney]
|
|
3196
|
+
summary: Replace workspace journey completed steps
|
|
3197
|
+
description: >
|
|
3198
|
+
Idempotent replace-all of completed route strings for the workspace journey.
|
|
3199
|
+
Requires editor role. Covers issue #271.
|
|
3200
|
+
operationId: putYourAiJourneyProgress
|
|
3201
|
+
parameters:
|
|
3202
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3203
|
+
requestBody:
|
|
3204
|
+
required: true
|
|
3205
|
+
content:
|
|
3206
|
+
application/json:
|
|
3207
|
+
schema:
|
|
3208
|
+
$ref: "#/components/schemas/JourneyProgressUpdateDto"
|
|
3209
|
+
responses:
|
|
3210
|
+
"200":
|
|
3211
|
+
description: Saved progress
|
|
3212
|
+
content:
|
|
3213
|
+
application/json:
|
|
3214
|
+
schema:
|
|
3215
|
+
$ref: "#/components/schemas/JourneyProgressDto"
|
|
3216
|
+
"400":
|
|
3217
|
+
description: Body fails validation (non-array, invalid entries, too many steps)
|
|
3218
|
+
content:
|
|
3219
|
+
application/json:
|
|
3220
|
+
schema:
|
|
3221
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3222
|
+
"401":
|
|
3223
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3224
|
+
"403":
|
|
3225
|
+
$ref: "#/components/responses/Forbidden"
|
|
3226
|
+
"404":
|
|
3227
|
+
description: Workspace does not exist
|
|
3228
|
+
content:
|
|
3229
|
+
application/json:
|
|
3230
|
+
schema:
|
|
3231
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3232
|
+
|
|
3233
|
+
/workspaces/{workspaceId}/your-ai-journey/agentic-foundation:
|
|
3234
|
+
get:
|
|
3235
|
+
tags: [YourAiJourney]
|
|
3236
|
+
summary: Agentic foundation dashboard slice for /dashboard
|
|
3237
|
+
description: >
|
|
3238
|
+
Returns the same `AgenticFoundationDashboardDto` payload as
|
|
3239
|
+
`GET /agentic-foundation/dashboard`, scoped to the /dashboard page context.
|
|
3240
|
+
Covers issue #272. Results are cached for 60 seconds.
|
|
3241
|
+
operationId: getYourAiJourneyAgenticFoundation
|
|
3242
|
+
parameters:
|
|
3243
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3244
|
+
responses:
|
|
3245
|
+
"200":
|
|
3246
|
+
description: Agentic foundation dashboard
|
|
3247
|
+
content:
|
|
3248
|
+
application/json:
|
|
3249
|
+
schema:
|
|
3250
|
+
$ref: "#/components/schemas/AgenticFoundationDashboardDto"
|
|
3251
|
+
"401":
|
|
3252
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3253
|
+
"403":
|
|
3254
|
+
$ref: "#/components/responses/Forbidden"
|
|
3255
|
+
"404":
|
|
3256
|
+
description: Workspace does not exist
|
|
3257
|
+
content:
|
|
3258
|
+
application/json:
|
|
3259
|
+
schema:
|
|
3260
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3261
|
+
|
|
3262
|
+
/workspaces/{workspaceId}/your-ai-journey/productivity:
|
|
3263
|
+
get:
|
|
3264
|
+
tags: [YourAiJourney]
|
|
3265
|
+
summary: Workspace productivity metrics for /dashboard
|
|
3266
|
+
description: >
|
|
3267
|
+
Returns the most recent stored dashboard productivity metrics snapshot that overlaps the
|
|
3268
|
+
requested window (defaults to the trailing 7 days). Same schema as
|
|
3269
|
+
`GET /dashboard/productivity`. Covers issue #273. Results are cached for 60 seconds.
|
|
3270
|
+
operationId: getYourAiJourneyProductivity
|
|
3271
|
+
parameters:
|
|
3272
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3273
|
+
- name: windowEnd
|
|
3274
|
+
in: query
|
|
3275
|
+
schema:
|
|
3276
|
+
type: string
|
|
3277
|
+
format: date-time
|
|
3278
|
+
description: Upper bound of the requested window (ISO 8601; defaults to now).
|
|
3279
|
+
responses:
|
|
3280
|
+
"200":
|
|
3281
|
+
description: Productivity metrics snapshot
|
|
3282
|
+
content:
|
|
3283
|
+
application/json:
|
|
3284
|
+
schema:
|
|
3285
|
+
$ref: "#/components/schemas/DashboardProductivityDto"
|
|
3286
|
+
"401":
|
|
3287
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3288
|
+
"403":
|
|
3289
|
+
$ref: "#/components/responses/Forbidden"
|
|
3290
|
+
"404":
|
|
3291
|
+
description: Workspace does not exist
|
|
3292
|
+
content:
|
|
3293
|
+
application/json:
|
|
3294
|
+
schema:
|
|
3295
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3296
|
+
|
|
3297
|
+
/workspaces/{workspaceId}/your-ai-journey/ai-spend:
|
|
3298
|
+
get:
|
|
3299
|
+
tags: [YourAiJourney]
|
|
3300
|
+
summary: AI tool spend and usage aggregated by week and provider
|
|
3301
|
+
description: >
|
|
3302
|
+
Returns token usage and spend aggregated from connected AI tool sources (e.g. Cursor)
|
|
3303
|
+
over the requested range, broken down by week and provider. Covers issue #274.
|
|
3304
|
+
Results are cached for 60 seconds.
|
|
3305
|
+
operationId: getYourAiJourneyAiSpend
|
|
3306
|
+
parameters:
|
|
3307
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3308
|
+
- name: rangeId
|
|
3309
|
+
in: query
|
|
3310
|
+
schema:
|
|
3311
|
+
type: string
|
|
3312
|
+
enum: [4w, 8w, q]
|
|
3313
|
+
default: 4w
|
|
3314
|
+
description: Time range — `4w` (4 weeks), `8w` (8 weeks), or `q` (quarter, 12 weeks).
|
|
3315
|
+
responses:
|
|
3316
|
+
"200":
|
|
3317
|
+
description: AI spend aggregation
|
|
3318
|
+
content:
|
|
3319
|
+
application/json:
|
|
3320
|
+
schema:
|
|
3321
|
+
$ref: "#/components/schemas/YourAiJourneyAiSpendDto"
|
|
3322
|
+
"401":
|
|
3323
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3324
|
+
"403":
|
|
3325
|
+
$ref: "#/components/responses/Forbidden"
|
|
3326
|
+
"404":
|
|
3327
|
+
description: Workspace does not exist
|
|
3328
|
+
content:
|
|
3329
|
+
application/json:
|
|
3330
|
+
schema:
|
|
3331
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3332
|
+
|
|
2989
3333
|
components:
|
|
2990
3334
|
securitySchemes:
|
|
2991
3335
|
bearerAuth:
|
|
@@ -3020,6 +3364,14 @@ components:
|
|
|
3020
3364
|
required: true
|
|
3021
3365
|
schema:
|
|
3022
3366
|
type: string
|
|
3367
|
+
WorkspaceMemberId:
|
|
3368
|
+
name: memberId
|
|
3369
|
+
in: path
|
|
3370
|
+
required: true
|
|
3371
|
+
schema:
|
|
3372
|
+
type: string
|
|
3373
|
+
format: uuid
|
|
3374
|
+
description: Workspace member user id (`tai_users.id`).
|
|
3023
3375
|
FixId:
|
|
3024
3376
|
name: fixId
|
|
3025
3377
|
in: path
|
|
@@ -3061,6 +3413,9 @@ components:
|
|
|
3061
3413
|
properties:
|
|
3062
3414
|
error:
|
|
3063
3415
|
type: string
|
|
3416
|
+
code:
|
|
3417
|
+
type: string
|
|
3418
|
+
description: Machine-readable error code when present (for example `last_admin`).
|
|
3064
3419
|
|
|
3065
3420
|
TeamMemberDto:
|
|
3066
3421
|
type: object
|
|
@@ -3068,6 +3423,7 @@ components:
|
|
|
3068
3423
|
properties:
|
|
3069
3424
|
id:
|
|
3070
3425
|
type: string
|
|
3426
|
+
format: uuid
|
|
3071
3427
|
name:
|
|
3072
3428
|
type: string
|
|
3073
3429
|
email:
|
|
@@ -3536,6 +3892,12 @@ components:
|
|
|
3536
3892
|
type: string
|
|
3537
3893
|
teamName:
|
|
3538
3894
|
type: string
|
|
3895
|
+
notInOrgChart:
|
|
3896
|
+
type: boolean
|
|
3897
|
+
description: True when the contributor GitHub login is not mapped in the org chart.
|
|
3898
|
+
githubLogin:
|
|
3899
|
+
type: string
|
|
3900
|
+
description: GitHub login for unattributed contributors (when notInOrgChart is true).
|
|
3539
3901
|
weeks:
|
|
3540
3902
|
type: array
|
|
3541
3903
|
items:
|
|
@@ -3559,7 +3921,7 @@ components:
|
|
|
3559
3921
|
format: date-time
|
|
3560
3922
|
weeks:
|
|
3561
3923
|
type: array
|
|
3562
|
-
description: Portfolio aggregate merged PR counts (
|
|
3924
|
+
description: Portfolio aggregate merged PR counts from org-scope metrics (all merged PRs in window).
|
|
3563
3925
|
items:
|
|
3564
3926
|
$ref: "#/components/schemas/ProductivityInsightsMergedPrTrendWeekDto"
|
|
3565
3927
|
contributors:
|
|
@@ -5525,3 +5887,219 @@ components:
|
|
|
5525
5887
|
storagePath:
|
|
5526
5888
|
type: string
|
|
5527
5889
|
description: Path in `org-charts` bucket after Supabase upload
|
|
5890
|
+
|
|
5891
|
+
# ── Your AI Journey schemas ─────────────────────────────────────────────
|
|
5892
|
+
|
|
5893
|
+
YourAiJourneyPrSignalsWeekDto:
|
|
5894
|
+
type: object
|
|
5895
|
+
required: [bucketStart, bucketEnd, weekLabel, prsPerDeveloperPerWeek, changeFailureRatePercent]
|
|
5896
|
+
properties:
|
|
5897
|
+
bucketStart:
|
|
5898
|
+
type: string
|
|
5899
|
+
format: date-time
|
|
5900
|
+
bucketEnd:
|
|
5901
|
+
type: string
|
|
5902
|
+
format: date-time
|
|
5903
|
+
weekLabel:
|
|
5904
|
+
type: string
|
|
5905
|
+
description: Display label in MM/DD format.
|
|
5906
|
+
prsPerDeveloperPerWeek:
|
|
5907
|
+
type: number
|
|
5908
|
+
changeFailureRatePercent:
|
|
5909
|
+
type: number
|
|
5910
|
+
|
|
5911
|
+
YourAiJourneyPrSignalsDto:
|
|
5912
|
+
type: object
|
|
5913
|
+
required: [workspaceId, generatedAt, windowStart, windowEnd, weeks, summary]
|
|
5914
|
+
properties:
|
|
5915
|
+
workspaceId:
|
|
5916
|
+
type: string
|
|
5917
|
+
format: uuid
|
|
5918
|
+
generatedAt:
|
|
5919
|
+
type: string
|
|
5920
|
+
format: date-time
|
|
5921
|
+
windowStart:
|
|
5922
|
+
type: string
|
|
5923
|
+
format: date-time
|
|
5924
|
+
windowEnd:
|
|
5925
|
+
type: string
|
|
5926
|
+
format: date-time
|
|
5927
|
+
weeks:
|
|
5928
|
+
type: array
|
|
5929
|
+
items:
|
|
5930
|
+
$ref: "#/components/schemas/YourAiJourneyPrSignalsWeekDto"
|
|
5931
|
+
summary:
|
|
5932
|
+
type: object
|
|
5933
|
+
required: [avgPrsPerDeveloperPerWeek, avgFailureRatePercent, prVelocityDeltaPercent]
|
|
5934
|
+
properties:
|
|
5935
|
+
avgPrsPerDeveloperPerWeek:
|
|
5936
|
+
type: number
|
|
5937
|
+
avgFailureRatePercent:
|
|
5938
|
+
type: number
|
|
5939
|
+
prVelocityDeltaPercent:
|
|
5940
|
+
type: number
|
|
5941
|
+
|
|
5942
|
+
YourAiJourneyReadinessDimensionDto:
|
|
5943
|
+
type: object
|
|
5944
|
+
required: [dimensionId, name, totalScore, maxScore, percent]
|
|
5945
|
+
properties:
|
|
5946
|
+
dimensionId:
|
|
5947
|
+
type: string
|
|
5948
|
+
name:
|
|
5949
|
+
type: string
|
|
5950
|
+
totalScore:
|
|
5951
|
+
type: number
|
|
5952
|
+
maxScore:
|
|
5953
|
+
type: number
|
|
5954
|
+
percent:
|
|
5955
|
+
type: number
|
|
5956
|
+
description: Rounded percentage 0–100.
|
|
5957
|
+
|
|
5958
|
+
YourAiJourneyReadinessAggregateDto:
|
|
5959
|
+
type: object
|
|
5960
|
+
required: [workspaceId, generatedAt, dimensions, summary]
|
|
5961
|
+
properties:
|
|
5962
|
+
workspaceId:
|
|
5963
|
+
type: string
|
|
5964
|
+
format: uuid
|
|
5965
|
+
generatedAt:
|
|
5966
|
+
type: string
|
|
5967
|
+
format: date-time
|
|
5968
|
+
dimensions:
|
|
5969
|
+
type: array
|
|
5970
|
+
items:
|
|
5971
|
+
$ref: "#/components/schemas/YourAiJourneyReadinessDimensionDto"
|
|
5972
|
+
summary:
|
|
5973
|
+
type: object
|
|
5974
|
+
required: [avgScore, repoCount, fixRate, totalOpenIssues, totalFixedIssues]
|
|
5975
|
+
properties:
|
|
5976
|
+
avgScore:
|
|
5977
|
+
type: number
|
|
5978
|
+
repoCount:
|
|
5979
|
+
type: integer
|
|
5980
|
+
fixRate:
|
|
5981
|
+
type: number
|
|
5982
|
+
totalOpenIssues:
|
|
5983
|
+
type: integer
|
|
5984
|
+
totalFixedIssues:
|
|
5985
|
+
type: integer
|
|
5986
|
+
|
|
5987
|
+
YourAiJourneyAnalyticsDto:
|
|
5988
|
+
type: object
|
|
5989
|
+
required: [workspaceId, generatedAt, windowStart, windowEnd, journey, readiness, prSignals]
|
|
5990
|
+
properties:
|
|
5991
|
+
workspaceId:
|
|
5992
|
+
type: string
|
|
5993
|
+
format: uuid
|
|
5994
|
+
generatedAt:
|
|
5995
|
+
type: string
|
|
5996
|
+
format: date-time
|
|
5997
|
+
windowStart:
|
|
5998
|
+
type: string
|
|
5999
|
+
format: date-time
|
|
6000
|
+
windowEnd:
|
|
6001
|
+
type: string
|
|
6002
|
+
format: date-time
|
|
6003
|
+
journey:
|
|
6004
|
+
type: object
|
|
6005
|
+
required: [completedSteps, updatedAt]
|
|
6006
|
+
properties:
|
|
6007
|
+
completedSteps:
|
|
6008
|
+
type: array
|
|
6009
|
+
items:
|
|
6010
|
+
type: string
|
|
6011
|
+
updatedAt:
|
|
6012
|
+
type: string
|
|
6013
|
+
format: date-time
|
|
6014
|
+
nullable: true
|
|
6015
|
+
readiness:
|
|
6016
|
+
type: object
|
|
6017
|
+
required: [avgScore, repoCount, fixRate, totalOpenIssues, totalFixedIssues]
|
|
6018
|
+
properties:
|
|
6019
|
+
avgScore:
|
|
6020
|
+
type: number
|
|
6021
|
+
repoCount:
|
|
6022
|
+
type: integer
|
|
6023
|
+
fixRate:
|
|
6024
|
+
type: number
|
|
6025
|
+
totalOpenIssues:
|
|
6026
|
+
type: integer
|
|
6027
|
+
totalFixedIssues:
|
|
6028
|
+
type: integer
|
|
6029
|
+
prSignals:
|
|
6030
|
+
type: object
|
|
6031
|
+
required: [avgPrsPerDeveloperPerWeek, prVelocityDeltaPercent, avgFailureRatePercent]
|
|
6032
|
+
properties:
|
|
6033
|
+
avgPrsPerDeveloperPerWeek:
|
|
6034
|
+
type: number
|
|
6035
|
+
prVelocityDeltaPercent:
|
|
6036
|
+
type: number
|
|
6037
|
+
avgFailureRatePercent:
|
|
6038
|
+
type: number
|
|
6039
|
+
|
|
6040
|
+
YourAiJourneyAiSpendWeekDto:
|
|
6041
|
+
type: object
|
|
6042
|
+
required: [bucketStart, bucketEnd, weekLabel, mergedPrCount, tokenCount]
|
|
6043
|
+
properties:
|
|
6044
|
+
bucketStart:
|
|
6045
|
+
type: string
|
|
6046
|
+
format: date-time
|
|
6047
|
+
bucketEnd:
|
|
6048
|
+
type: string
|
|
6049
|
+
format: date-time
|
|
6050
|
+
weekLabel:
|
|
6051
|
+
type: string
|
|
6052
|
+
mergedPrCount:
|
|
6053
|
+
type: integer
|
|
6054
|
+
tokenCount:
|
|
6055
|
+
type: integer
|
|
6056
|
+
|
|
6057
|
+
YourAiJourneyAiSpendDto:
|
|
6058
|
+
type: object
|
|
6059
|
+
required: [workspaceId, generatedAt, windowStart, windowEnd, totalSpendCents, totalTokenCount, activeUsers, aiAssistedPrRatio, prThroughputDeltaPercent, usageDeltaPercent, weeks, providers]
|
|
6060
|
+
properties:
|
|
6061
|
+
workspaceId:
|
|
6062
|
+
type: string
|
|
6063
|
+
format: uuid
|
|
6064
|
+
generatedAt:
|
|
6065
|
+
type: string
|
|
6066
|
+
format: date-time
|
|
6067
|
+
windowStart:
|
|
6068
|
+
type: string
|
|
6069
|
+
format: date-time
|
|
6070
|
+
windowEnd:
|
|
6071
|
+
type: string
|
|
6072
|
+
format: date-time
|
|
6073
|
+
totalSpendCents:
|
|
6074
|
+
type: integer
|
|
6075
|
+
totalTokenCount:
|
|
6076
|
+
type: integer
|
|
6077
|
+
activeUsers:
|
|
6078
|
+
type: integer
|
|
6079
|
+
aiAssistedPrRatio:
|
|
6080
|
+
type: number
|
|
6081
|
+
description: Fraction 0–1 of PRs that are AI-assisted.
|
|
6082
|
+
prThroughputDeltaPercent:
|
|
6083
|
+
type: number
|
|
6084
|
+
usageDeltaPercent:
|
|
6085
|
+
type: number
|
|
6086
|
+
weeks:
|
|
6087
|
+
type: array
|
|
6088
|
+
items:
|
|
6089
|
+
$ref: "#/components/schemas/YourAiJourneyAiSpendWeekDto"
|
|
6090
|
+
providers:
|
|
6091
|
+
type: array
|
|
6092
|
+
items:
|
|
6093
|
+
type: object
|
|
6094
|
+
required: [providerId, providerName, tokenCount, spendCents, activeUsers]
|
|
6095
|
+
properties:
|
|
6096
|
+
providerId:
|
|
6097
|
+
type: string
|
|
6098
|
+
providerName:
|
|
6099
|
+
type: string
|
|
6100
|
+
tokenCount:
|
|
6101
|
+
type: integer
|
|
6102
|
+
spendCents:
|
|
6103
|
+
type: integer
|
|
6104
|
+
activeUsers:
|
|
6105
|
+
type: integer
|