@thinkai/tai-api-contract 2.168.0 → 2.170.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.
@@ -45,6 +45,27 @@ export interface paths {
45
45
  patch?: never;
46
46
  trace?: never;
47
47
  };
48
+ "/admin/assessment-preflight": {
49
+ parameters: {
50
+ query?: never;
51
+ header?: never;
52
+ path?: never;
53
+ cookie?: never;
54
+ };
55
+ get?: never;
56
+ put?: never;
57
+ /**
58
+ * Evaluate assessment preflight
59
+ * @description Returns whether one paid assessment may start the five-business-day clock. Pending approval does not count as connected. Optional Jira and incident gaps are chapters, not preflight failures. Premium stays false while currency, confounder rules, the active-engineer rule, or the working-day calendar is unset.
60
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
61
+ */
62
+ post: operations["runAssessmentPreflight"];
63
+ delete?: never;
64
+ options?: never;
65
+ head?: never;
66
+ patch?: never;
67
+ trace?: never;
68
+ };
48
69
  "/admin/readiness/token-usage": {
49
70
  parameters: {
50
71
  query?: never;
@@ -4774,6 +4795,8 @@ export interface components {
4774
4795
  email: string;
4775
4796
  /** @enum {string} */
4776
4797
  role: "admin" | "editor" | "viewer";
4798
+ /** @description True when this member is `tai_workspaces.owner_user_id` for the workspace. Workspace owners cannot be removed (`409` `workspace_owner`). Distinct from the Admin role — a workspace may have multiple admins but only one owner. */
4799
+ isOwner: boolean;
4777
4800
  };
4778
4801
  TeamMemberListDto: {
4779
4802
  members: components["schemas"]["TeamMemberDto"][];
@@ -11872,6 +11895,124 @@ export interface operations {
11872
11895
  };
11873
11896
  };
11874
11897
  };
11898
+ runAssessmentPreflight: {
11899
+ parameters: {
11900
+ query?: never;
11901
+ header?: never;
11902
+ path?: never;
11903
+ cookie?: never;
11904
+ };
11905
+ requestBody: {
11906
+ content: {
11907
+ "application/json": {
11908
+ /** @enum {string} */
11909
+ offerId: "engineering_readiness_baseline" | "agentic_ai_roi";
11910
+ /** @enum {string} */
11911
+ sourceControl: "connected" | "pending_approval" | "setup_in_progress" | "revoked" | "stale" | "missing";
11912
+ platformExecutionReady: boolean;
11913
+ repositoryCount?: number | null;
11914
+ activeEngineerCount?: number | null;
11915
+ scans: {
11916
+ /** @enum {string} */
11917
+ status: "unknown" | "known";
11918
+ fresh?: boolean;
11919
+ };
11920
+ windows: {
11921
+ /** @enum {string} */
11922
+ status: "unknown" | "known";
11923
+ currentComplete?: boolean;
11924
+ preComplete?: boolean;
11925
+ postComplete?: boolean;
11926
+ };
11927
+ premiumAi: {
11928
+ cursor: boolean;
11929
+ claude: boolean;
11930
+ copilot: boolean;
11931
+ };
11932
+ jiraSelected: boolean;
11933
+ incidentSelected: boolean;
11934
+ incidentAvailable: boolean;
11935
+ owner?: string | null;
11936
+ };
11937
+ };
11938
+ };
11939
+ responses: {
11940
+ /** @description Preflight result. `dueDate` is set only when `ready` is true. */
11941
+ 200: {
11942
+ headers: {
11943
+ [name: string]: unknown;
11944
+ };
11945
+ content: {
11946
+ "application/json": {
11947
+ ready: boolean;
11948
+ clockStarted: boolean;
11949
+ /** Format: date */
11950
+ dueDate: string | null;
11951
+ owner: string | null;
11952
+ blocker: string | null;
11953
+ nextAction: {
11954
+ label: string;
11955
+ href: string | null;
11956
+ } | null;
11957
+ failures: {
11958
+ code: string;
11959
+ blocker: string;
11960
+ nextAction: {
11961
+ label: string;
11962
+ href: string | null;
11963
+ };
11964
+ }[];
11965
+ chapters: {
11966
+ /** @enum {string} */
11967
+ id: "jira" | "incidents";
11968
+ /** @enum {string} */
11969
+ status: "unavailable";
11970
+ reason: string;
11971
+ }[];
11972
+ };
11973
+ };
11974
+ };
11975
+ /** @description Body failed validation. */
11976
+ 400: {
11977
+ headers: {
11978
+ [name: string]: unknown;
11979
+ };
11980
+ content: {
11981
+ /**
11982
+ * @example {
11983
+ * "error": "offerId is not a known assessment offer",
11984
+ * "code": "invalid_body"
11985
+ * }
11986
+ */
11987
+ "application/json": components["schemas"]["ErrorMessageDto"];
11988
+ };
11989
+ };
11990
+ /** @description Missing or invalid JWT. */
11991
+ 401: {
11992
+ headers: {
11993
+ [name: string]: unknown;
11994
+ };
11995
+ content: {
11996
+ "application/json": components["schemas"]["ErrorMessageDto"];
11997
+ };
11998
+ };
11999
+ /** @description Caller is not a platform admin. */
12000
+ 403: {
12001
+ headers: {
12002
+ [name: string]: unknown;
12003
+ };
12004
+ content: {
12005
+ /**
12006
+ * @example {
12007
+ * "error": "Forbidden",
12008
+ * "code": "forbidden"
12009
+ * }
12010
+ */
12011
+ "application/json": components["schemas"]["ErrorMessageDto"];
12012
+ };
12013
+ };
12014
+ };
12015
+ };
11875
12016
  adminListReadinessTokenUsage: {
11876
12017
  parameters: {
11877
12018
  query?: {
@@ -12771,7 +12912,8 @@ export interface operations {
12771
12912
  * "id": "11111111-1111-4111-8111-111111111111",
12772
12913
  * "name": "Alex Admin",
12773
12914
  * "email": "alex@example.com",
12774
- * "role": "admin"
12915
+ * "role": "admin",
12916
+ * "isOwner": true
12775
12917
  * }
12776
12918
  * ]
12777
12919
  * }