@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.
@@ -1828,7 +1828,7 @@ export interface paths {
1828
1828
  };
1829
1829
  /**
1830
1830
  * Google sign-in URL for the Google Forms DevEx survey
1831
- * @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 disabled.
1831
+ * @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.
1832
1832
  */
1833
1833
  get: operations["getGoogleFormsInstallUrl"];
1834
1834
  put?: never;
@@ -1848,7 +1848,7 @@ export interface paths {
1848
1848
  };
1849
1849
  /**
1850
1850
  * Google Forms OAuth callback
1851
- * @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`, `not_found`, `access_denied`, `oauth_error`, `invalid_callback`, `callback_failed`, `missing_scopes`, `no_refresh_token`. No token is ever in the redirect.
1851
+ * @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.
1852
1852
  */
1853
1853
  get: operations["getGoogleFormsOauthCallback"];
1854
1854
  put?: never;
@@ -1868,14 +1868,14 @@ export interface paths {
1868
1868
  };
1869
1869
  /**
1870
1870
  * Google Forms connection status
1871
- * @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 disabled.
1871
+ * @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.
1872
1872
  */
1873
1873
  get: operations["getGoogleFormsConnection"];
1874
1874
  put?: never;
1875
1875
  post?: never;
1876
1876
  /**
1877
1877
  * Disconnect Google Forms
1878
- * @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.
1878
+ * @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.
1879
1879
  */
1880
1880
  delete: operations["deleteGoogleFormsConnection"];
1881
1881
  options?: never;
@@ -21141,25 +21141,27 @@ export interface operations {
21141
21141
  "application/json": components["schemas"]["ErrorMessageDto"];
21142
21142
  };
21143
21143
  };
21144
- /** @description Feature flag off or workspace not found */
21144
+ /** @description Feature flag off (`code` `team_efficiency_disabled`) or workspace not found */
21145
21145
  404: {
21146
21146
  headers: {
21147
21147
  [name: string]: unknown;
21148
21148
  };
21149
- content?: never;
21149
+ content: {
21150
+ /**
21151
+ * @example {
21152
+ * "error": "Not found",
21153
+ * "code": "team_efficiency_disabled"
21154
+ * }
21155
+ */
21156
+ "application/json": components["schemas"]["ErrorMessageDto"];
21157
+ };
21150
21158
  };
21151
- /** @description Google client id or secret is unset */
21159
+ /** @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) */
21152
21160
  503: {
21153
21161
  headers: {
21154
21162
  [name: string]: unknown;
21155
21163
  };
21156
21164
  content: {
21157
- /**
21158
- * @example {
21159
- * "error": "Google sign-in is not configured",
21160
- * "code": "googleforms_not_configured"
21161
- * }
21162
- */
21163
21165
  "application/json": components["schemas"]["ErrorMessageDto"];
21164
21166
  };
21165
21167
  };
@@ -21219,12 +21221,20 @@ export interface operations {
21219
21221
  };
21220
21222
  401: components["responses"]["Unauthorized"];
21221
21223
  403: components["responses"]["Forbidden"];
21222
- /** @description Feature flag off or workspace not found */
21224
+ /** @description Feature flag off (`code` `team_efficiency_disabled`) or workspace not found */
21223
21225
  404: {
21224
21226
  headers: {
21225
21227
  [name: string]: unknown;
21226
21228
  };
21227
- content?: never;
21229
+ content: {
21230
+ /**
21231
+ * @example {
21232
+ * "error": "Not found",
21233
+ * "code": "team_efficiency_disabled"
21234
+ * }
21235
+ */
21236
+ "application/json": components["schemas"]["ErrorMessageDto"];
21237
+ };
21228
21238
  };
21229
21239
  };
21230
21240
  };
@@ -21262,12 +21272,20 @@ export interface operations {
21262
21272
  "application/json": components["schemas"]["ErrorMessageDto"];
21263
21273
  };
21264
21274
  };
21265
- /** @description Feature flag off or workspace not found */
21275
+ /** @description Feature flag off (`code` `team_efficiency_disabled`) or workspace not found */
21266
21276
  404: {
21267
21277
  headers: {
21268
21278
  [name: string]: unknown;
21269
21279
  };
21270
- content?: never;
21280
+ content: {
21281
+ /**
21282
+ * @example {
21283
+ * "error": "Not found",
21284
+ * "code": "team_efficiency_disabled"
21285
+ * }
21286
+ */
21287
+ "application/json": components["schemas"]["ErrorMessageDto"];
21288
+ };
21271
21289
  };
21272
21290
  };
21273
21291
  };