@thinkai/tai-api-contract 2.231.0 → 2.231.2
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 +35 -17
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +49 -13
- package/package.json +1 -1
- package/src/generated/openapi.ts +35 -17
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.231.
|
|
4
|
+
version: 2.231.2
|
|
5
5
|
description: >
|
|
6
6
|
Contract surface for the AI Driven SDLC backend used by ThinkAI.
|
|
7
7
|
Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
|
|
@@ -5364,8 +5364,12 @@ paths:
|
|
|
5364
5364
|
Workspace admin only. Returns the Google OAuth authorize URL (offline access, read-only
|
|
5365
5365
|
Forms scopes). State is stored server-side, single-use, and names this workspace and the
|
|
5366
5366
|
signed-in admin. Editor or viewer is `403` with `code` `workspace_admin_required`.
|
|
5367
|
-
Missing Google client settings
|
|
5368
|
-
`
|
|
5367
|
+
Missing Google client settings, or an unavailable OAuth state store (Postgres
|
|
5368
|
+
`42P01`/`42501` on insert), are `503` with `code` `googleforms_not_configured`.
|
|
5369
|
+
When the state insert cannot complete quickly (database lock wait, statement timeout,
|
|
5370
|
+
or no connection available), the route fails fast with `503` and `code`
|
|
5371
|
+
`googleforms_state_unavailable`; retry shortly. `404` with `code`
|
|
5372
|
+
`team_efficiency_disabled` when Team Efficiency is off for the workspace.
|
|
5369
5373
|
security:
|
|
5370
5374
|
- bearerAuth: []
|
|
5371
5375
|
parameters:
|
|
@@ -5389,16 +5393,33 @@ paths:
|
|
|
5389
5393
|
error: Forbidden
|
|
5390
5394
|
code: workspace_admin_required
|
|
5391
5395
|
"404":
|
|
5392
|
-
description: Feature flag off or workspace not found
|
|
5393
|
-
"503":
|
|
5394
|
-
description: Google client id or secret is unset
|
|
5396
|
+
description: Feature flag off (`code` `team_efficiency_disabled`) or workspace not found
|
|
5395
5397
|
content:
|
|
5396
5398
|
application/json:
|
|
5397
5399
|
schema:
|
|
5398
5400
|
$ref: "#/components/schemas/ErrorMessageDto"
|
|
5399
5401
|
example:
|
|
5400
|
-
error:
|
|
5401
|
-
code:
|
|
5402
|
+
error: Not found
|
|
5403
|
+
code: team_efficiency_disabled
|
|
5404
|
+
"503":
|
|
5405
|
+
description: >
|
|
5406
|
+
Google client id/secret unset, or OAuth state table missing/unwritable
|
|
5407
|
+
(`code` `googleforms_not_configured`); or the OAuth state could not be stored in
|
|
5408
|
+
time because of a database lock wait, statement timeout, or connection timeout
|
|
5409
|
+
(`code` `googleforms_state_unavailable`, retryable)
|
|
5410
|
+
content:
|
|
5411
|
+
application/json:
|
|
5412
|
+
schema:
|
|
5413
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
5414
|
+
examples:
|
|
5415
|
+
notConfigured:
|
|
5416
|
+
value:
|
|
5417
|
+
error: Google sign-in is not configured
|
|
5418
|
+
code: googleforms_not_configured
|
|
5419
|
+
stateUnavailable:
|
|
5420
|
+
value:
|
|
5421
|
+
error: Google sign-in is busy. Try again in a moment.
|
|
5422
|
+
code: googleforms_state_unavailable
|
|
5402
5423
|
|
|
5403
5424
|
/connectors/googleforms/callback:
|
|
5404
5425
|
get:
|
|
@@ -5412,8 +5433,8 @@ paths:
|
|
|
5412
5433
|
workspace admin and both Forms scopes were granted. Success redirects to
|
|
5413
5434
|
`{spa}/workspace/connectors/googleforms?googleforms=connected`. Failures
|
|
5414
5435
|
redirect to the same page with `googleformsError=<code>`, one of
|
|
5415
|
-
`invalid_or_expired_state`, `workspace_admin_required`, `
|
|
5416
|
-
`oauth_error`, `invalid_callback`, `callback_failed`, `missing_scopes`,
|
|
5436
|
+
`invalid_or_expired_state`, `workspace_admin_required`, `team_efficiency_disabled`,
|
|
5437
|
+
`access_denied`, `oauth_error`, `invalid_callback`, `callback_failed`, `missing_scopes`,
|
|
5417
5438
|
`no_refresh_token`. No token is ever in the redirect.
|
|
5418
5439
|
parameters:
|
|
5419
5440
|
- name: code
|
|
@@ -5452,7 +5473,7 @@ paths:
|
|
|
5452
5473
|
Any workspace member. `connected` is true when a Google grant is stored. `needsReauth`
|
|
5453
5474
|
is true after Google rejected the refresh token (revoked access, password change, or an
|
|
5454
5475
|
unpublished consent screen); the admin must reconnect. Tokens are never returned.
|
|
5455
|
-
`404` when Team Efficiency is
|
|
5476
|
+
`404` with `code` `team_efficiency_disabled` when Team Efficiency is off.
|
|
5456
5477
|
security:
|
|
5457
5478
|
- bearerAuth: []
|
|
5458
5479
|
parameters:
|
|
@@ -5469,7 +5490,14 @@ paths:
|
|
|
5469
5490
|
"403":
|
|
5470
5491
|
$ref: "#/components/responses/Forbidden"
|
|
5471
5492
|
"404":
|
|
5472
|
-
description: Feature flag off or workspace not found
|
|
5493
|
+
description: Feature flag off (`code` `team_efficiency_disabled`) or workspace not found
|
|
5494
|
+
content:
|
|
5495
|
+
application/json:
|
|
5496
|
+
schema:
|
|
5497
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
5498
|
+
example:
|
|
5499
|
+
error: Not found
|
|
5500
|
+
code: team_efficiency_disabled
|
|
5473
5501
|
delete:
|
|
5474
5502
|
tags: [TeamEfficiency]
|
|
5475
5503
|
summary: Disconnect Google Forms
|
|
@@ -5477,6 +5505,7 @@ paths:
|
|
|
5477
5505
|
description: >
|
|
5478
5506
|
Workspace **admin** only. Revokes the grant at Google (best effort) and deletes the
|
|
5479
5507
|
stored tokens. The saved Google Forms source and past DevEx aggregates are kept.
|
|
5508
|
+
`404` with `code` `team_efficiency_disabled` when Team Efficiency is off.
|
|
5480
5509
|
security:
|
|
5481
5510
|
- bearerAuth: []
|
|
5482
5511
|
parameters:
|
|
@@ -5496,7 +5525,14 @@ paths:
|
|
|
5496
5525
|
error: Forbidden
|
|
5497
5526
|
code: workspace_admin_required
|
|
5498
5527
|
"404":
|
|
5499
|
-
description: Feature flag off or workspace not found
|
|
5528
|
+
description: Feature flag off (`code` `team_efficiency_disabled`) or workspace not found
|
|
5529
|
+
content:
|
|
5530
|
+
application/json:
|
|
5531
|
+
schema:
|
|
5532
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
5533
|
+
example:
|
|
5534
|
+
error: Not found
|
|
5535
|
+
code: team_efficiency_disabled
|
|
5500
5536
|
|
|
5501
5537
|
/workspaces/{workspaceId}/insights/sdlc/overview:
|
|
5502
5538
|
get:
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -1829,7 +1829,7 @@ export interface paths {
|
|
|
1829
1829
|
};
|
|
1830
1830
|
/**
|
|
1831
1831
|
* Google sign-in URL for the Google Forms DevEx survey
|
|
1832
|
-
* @description Workspace admin only. Returns the Google OAuth authorize URL (offline access, read-only Forms scopes). State is stored server-side, single-use, and names this workspace and the signed-in admin. Editor or viewer is `403` with `code` `workspace_admin_required`. Missing Google client settings are `503` with `code` `googleforms_not_configured`. `404` when Team Efficiency is
|
|
1832
|
+
* @description Workspace admin only. Returns the Google OAuth authorize URL (offline access, read-only Forms scopes). State is stored server-side, single-use, and names this workspace and the signed-in admin. Editor or viewer is `403` with `code` `workspace_admin_required`. Missing Google client settings, or an unavailable OAuth state store (Postgres `42P01`/`42501` on insert), are `503` with `code` `googleforms_not_configured`. When the state insert cannot complete quickly (database lock wait, statement timeout, or no connection available), the route fails fast with `503` and `code` `googleforms_state_unavailable`; retry shortly. `404` with `code` `team_efficiency_disabled` when Team Efficiency is off for the workspace.
|
|
1833
1833
|
*/
|
|
1834
1834
|
get: operations["getGoogleFormsInstallUrl"];
|
|
1835
1835
|
put?: never;
|
|
@@ -1849,7 +1849,7 @@ export interface paths {
|
|
|
1849
1849
|
};
|
|
1850
1850
|
/**
|
|
1851
1851
|
* Google Forms OAuth callback
|
|
1852
|
-
* @description Browser return from Google. The provider redirect carries no API bearer token. `state` was issued by `getGoogleFormsInstallUrl` to a signed-in admin and is single-use (30 minute lifetime). The refresh token is stored encrypted only when that user is still a workspace admin and both Forms scopes were granted. Success redirects to `{spa}/workspace/connectors/googleforms?googleforms=connected`. Failures redirect to the same page with `googleformsError=<code>`, one of `invalid_or_expired_state`, `workspace_admin_required`, `
|
|
1852
|
+
* @description Browser return from Google. The provider redirect carries no API bearer token. `state` was issued by `getGoogleFormsInstallUrl` to a signed-in admin and is single-use (30 minute lifetime). The refresh token is stored encrypted only when that user is still a workspace admin and both Forms scopes were granted. Success redirects to `{spa}/workspace/connectors/googleforms?googleforms=connected`. Failures redirect to the same page with `googleformsError=<code>`, one of `invalid_or_expired_state`, `workspace_admin_required`, `team_efficiency_disabled`, `access_denied`, `oauth_error`, `invalid_callback`, `callback_failed`, `missing_scopes`, `no_refresh_token`. No token is ever in the redirect.
|
|
1853
1853
|
*/
|
|
1854
1854
|
get: operations["getGoogleFormsOauthCallback"];
|
|
1855
1855
|
put?: never;
|
|
@@ -1869,14 +1869,14 @@ export interface paths {
|
|
|
1869
1869
|
};
|
|
1870
1870
|
/**
|
|
1871
1871
|
* Google Forms connection status
|
|
1872
|
-
* @description Any workspace member. `connected` is true when a Google grant is stored. `needsReauth` is true after Google rejected the refresh token (revoked access, password change, or an unpublished consent screen); the admin must reconnect. Tokens are never returned. `404` when Team Efficiency is
|
|
1872
|
+
* @description Any workspace member. `connected` is true when a Google grant is stored. `needsReauth` is true after Google rejected the refresh token (revoked access, password change, or an unpublished consent screen); the admin must reconnect. Tokens are never returned. `404` with `code` `team_efficiency_disabled` when Team Efficiency is off.
|
|
1873
1873
|
*/
|
|
1874
1874
|
get: operations["getGoogleFormsConnection"];
|
|
1875
1875
|
put?: never;
|
|
1876
1876
|
post?: never;
|
|
1877
1877
|
/**
|
|
1878
1878
|
* Disconnect Google Forms
|
|
1879
|
-
* @description Workspace **admin** only. Revokes the grant at Google (best effort) and deletes the stored tokens. The saved Google Forms source and past DevEx aggregates are kept.
|
|
1879
|
+
* @description Workspace **admin** only. Revokes the grant at Google (best effort) and deletes the stored tokens. The saved Google Forms source and past DevEx aggregates are kept. `404` with `code` `team_efficiency_disabled` when Team Efficiency is off.
|
|
1880
1880
|
*/
|
|
1881
1881
|
delete: operations["deleteGoogleFormsConnection"];
|
|
1882
1882
|
options?: never;
|
|
@@ -21142,25 +21142,27 @@ export interface operations {
|
|
|
21142
21142
|
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
21143
21143
|
};
|
|
21144
21144
|
};
|
|
21145
|
-
/** @description Feature flag off or workspace not found */
|
|
21145
|
+
/** @description Feature flag off (`code` `team_efficiency_disabled`) or workspace not found */
|
|
21146
21146
|
404: {
|
|
21147
21147
|
headers: {
|
|
21148
21148
|
[name: string]: unknown;
|
|
21149
21149
|
};
|
|
21150
|
-
content
|
|
21150
|
+
content: {
|
|
21151
|
+
/**
|
|
21152
|
+
* @example {
|
|
21153
|
+
* "error": "Not found",
|
|
21154
|
+
* "code": "team_efficiency_disabled"
|
|
21155
|
+
* }
|
|
21156
|
+
*/
|
|
21157
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
21158
|
+
};
|
|
21151
21159
|
};
|
|
21152
|
-
/** @description Google client id or
|
|
21160
|
+
/** @description Google client id/secret unset, or OAuth state table missing/unwritable (`code` `googleforms_not_configured`); or the OAuth state could not be stored in time because of a database lock wait, statement timeout, or connection timeout (`code` `googleforms_state_unavailable`, retryable) */
|
|
21153
21161
|
503: {
|
|
21154
21162
|
headers: {
|
|
21155
21163
|
[name: string]: unknown;
|
|
21156
21164
|
};
|
|
21157
21165
|
content: {
|
|
21158
|
-
/**
|
|
21159
|
-
* @example {
|
|
21160
|
-
* "error": "Google sign-in is not configured",
|
|
21161
|
-
* "code": "googleforms_not_configured"
|
|
21162
|
-
* }
|
|
21163
|
-
*/
|
|
21164
21166
|
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
21165
21167
|
};
|
|
21166
21168
|
};
|
|
@@ -21220,12 +21222,20 @@ export interface operations {
|
|
|
21220
21222
|
};
|
|
21221
21223
|
401: components["responses"]["Unauthorized"];
|
|
21222
21224
|
403: components["responses"]["Forbidden"];
|
|
21223
|
-
/** @description Feature flag off or workspace not found */
|
|
21225
|
+
/** @description Feature flag off (`code` `team_efficiency_disabled`) or workspace not found */
|
|
21224
21226
|
404: {
|
|
21225
21227
|
headers: {
|
|
21226
21228
|
[name: string]: unknown;
|
|
21227
21229
|
};
|
|
21228
|
-
content
|
|
21230
|
+
content: {
|
|
21231
|
+
/**
|
|
21232
|
+
* @example {
|
|
21233
|
+
* "error": "Not found",
|
|
21234
|
+
* "code": "team_efficiency_disabled"
|
|
21235
|
+
* }
|
|
21236
|
+
*/
|
|
21237
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
21238
|
+
};
|
|
21229
21239
|
};
|
|
21230
21240
|
};
|
|
21231
21241
|
};
|
|
@@ -21263,12 +21273,20 @@ export interface operations {
|
|
|
21263
21273
|
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
21264
21274
|
};
|
|
21265
21275
|
};
|
|
21266
|
-
/** @description Feature flag off or workspace not found */
|
|
21276
|
+
/** @description Feature flag off (`code` `team_efficiency_disabled`) or workspace not found */
|
|
21267
21277
|
404: {
|
|
21268
21278
|
headers: {
|
|
21269
21279
|
[name: string]: unknown;
|
|
21270
21280
|
};
|
|
21271
|
-
content
|
|
21281
|
+
content: {
|
|
21282
|
+
/**
|
|
21283
|
+
* @example {
|
|
21284
|
+
* "error": "Not found",
|
|
21285
|
+
* "code": "team_efficiency_disabled"
|
|
21286
|
+
* }
|
|
21287
|
+
*/
|
|
21288
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
21289
|
+
};
|
|
21272
21290
|
};
|
|
21273
21291
|
};
|
|
21274
21292
|
};
|