@thinkai/tai-api-contract 2.169.0 → 2.171.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,48 @@ 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
+ };
69
+ "/admin/assessment-manifest-validation": {
70
+ parameters: {
71
+ query?: never;
72
+ header?: never;
73
+ path?: never;
74
+ cookie?: never;
75
+ };
76
+ get?: never;
77
+ put?: never;
78
+ /**
79
+ * Validate an assessment manifest before export
80
+ * @description Runs the fail-closed manifest check for one sold assessment. The server ignores `manifest.validation` and `manifest.watermark` from the client. `buyerDeliverable` is true only when the result is validated and `shareMode` is internal. An external share-safe result can be validated and is never the buyer file. Unset or exceeded tolerances fail. No numeric tolerance is assumed. GitLab and Bitbucket fixtures are not part of this operation.
81
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
82
+ */
83
+ post: operations["runAssessmentManifestValidation"];
84
+ delete?: never;
85
+ options?: never;
86
+ head?: never;
87
+ patch?: never;
88
+ trace?: never;
89
+ };
48
90
  "/admin/readiness/token-usage": {
49
91
  parameters: {
50
92
  query?: never;
@@ -11874,6 +11916,226 @@ export interface operations {
11874
11916
  };
11875
11917
  };
11876
11918
  };
11919
+ runAssessmentPreflight: {
11920
+ parameters: {
11921
+ query?: never;
11922
+ header?: never;
11923
+ path?: never;
11924
+ cookie?: never;
11925
+ };
11926
+ requestBody: {
11927
+ content: {
11928
+ "application/json": {
11929
+ /** @enum {string} */
11930
+ offerId: "engineering_readiness_baseline" | "agentic_ai_roi";
11931
+ /** @enum {string} */
11932
+ sourceControl: "connected" | "pending_approval" | "setup_in_progress" | "revoked" | "stale" | "missing";
11933
+ platformExecutionReady: boolean;
11934
+ repositoryCount?: number | null;
11935
+ activeEngineerCount?: number | null;
11936
+ scans: {
11937
+ /** @enum {string} */
11938
+ status: "unknown" | "known";
11939
+ fresh?: boolean;
11940
+ };
11941
+ windows: {
11942
+ /** @enum {string} */
11943
+ status: "unknown" | "known";
11944
+ currentComplete?: boolean;
11945
+ preComplete?: boolean;
11946
+ postComplete?: boolean;
11947
+ };
11948
+ premiumAi: {
11949
+ cursor: boolean;
11950
+ claude: boolean;
11951
+ copilot: boolean;
11952
+ };
11953
+ jiraSelected: boolean;
11954
+ incidentSelected: boolean;
11955
+ incidentAvailable: boolean;
11956
+ owner?: string | null;
11957
+ };
11958
+ };
11959
+ };
11960
+ responses: {
11961
+ /** @description Preflight result. `dueDate` is set only when `ready` is true. */
11962
+ 200: {
11963
+ headers: {
11964
+ [name: string]: unknown;
11965
+ };
11966
+ content: {
11967
+ "application/json": {
11968
+ ready: boolean;
11969
+ clockStarted: boolean;
11970
+ /** Format: date */
11971
+ dueDate: string | null;
11972
+ owner: string | null;
11973
+ blocker: string | null;
11974
+ nextAction: {
11975
+ label: string;
11976
+ href: string | null;
11977
+ } | null;
11978
+ failures: {
11979
+ code: string;
11980
+ blocker: string;
11981
+ nextAction: {
11982
+ label: string;
11983
+ href: string | null;
11984
+ };
11985
+ }[];
11986
+ chapters: {
11987
+ /** @enum {string} */
11988
+ id: "jira" | "incidents";
11989
+ /** @enum {string} */
11990
+ status: "unavailable";
11991
+ reason: string;
11992
+ }[];
11993
+ };
11994
+ };
11995
+ };
11996
+ /** @description Body failed validation. */
11997
+ 400: {
11998
+ headers: {
11999
+ [name: string]: unknown;
12000
+ };
12001
+ content: {
12002
+ /**
12003
+ * @example {
12004
+ * "error": "offerId is not a known assessment offer",
12005
+ * "code": "invalid_body"
12006
+ * }
12007
+ */
12008
+ "application/json": components["schemas"]["ErrorMessageDto"];
12009
+ };
12010
+ };
12011
+ /** @description Missing or invalid JWT. */
12012
+ 401: {
12013
+ headers: {
12014
+ [name: string]: unknown;
12015
+ };
12016
+ content: {
12017
+ "application/json": components["schemas"]["ErrorMessageDto"];
12018
+ };
12019
+ };
12020
+ /** @description Caller is not a platform admin. */
12021
+ 403: {
12022
+ headers: {
12023
+ [name: string]: unknown;
12024
+ };
12025
+ content: {
12026
+ /**
12027
+ * @example {
12028
+ * "error": "Forbidden",
12029
+ * "code": "forbidden"
12030
+ * }
12031
+ */
12032
+ "application/json": components["schemas"]["ErrorMessageDto"];
12033
+ };
12034
+ };
12035
+ };
12036
+ };
12037
+ runAssessmentManifestValidation: {
12038
+ parameters: {
12039
+ query?: never;
12040
+ header?: never;
12041
+ path?: never;
12042
+ cookie?: never;
12043
+ };
12044
+ requestBody: {
12045
+ content: {
12046
+ "application/json": {
12047
+ manifest: {
12048
+ /** @enum {string} */
12049
+ offerId: "engineering_readiness_baseline" | "agentic_ai_roi";
12050
+ dictionaryVersion: string;
12051
+ /** @enum {string} */
12052
+ validation: "validated" | "not_validated";
12053
+ /** @enum {string} */
12054
+ shareMode: "internal" | "external";
12055
+ /** @enum {string|null} */
12056
+ watermark: "NOT VALIDATED" | "SAMPLE · SYNTHETIC DATA" | null;
12057
+ scope: Record<string, never>;
12058
+ windows: Record<string, never>;
12059
+ sources: Record<string, never>[];
12060
+ consent: Record<string, never>;
12061
+ sections: Record<string, never>[];
12062
+ };
12063
+ workspaceId: string;
12064
+ expectedWorkspaceId: string;
12065
+ expectedRepositoryIds: string[];
12066
+ soldWindowComplete: boolean;
12067
+ premiumAiAssessable: boolean;
12068
+ namedPersonSectionIds: string[];
12069
+ tolerances: {
12070
+ id: string;
12071
+ /** @enum {string} */
12072
+ status: "unset" | "exceeded" | "within";
12073
+ }[];
12074
+ };
12075
+ };
12076
+ };
12077
+ responses: {
12078
+ /** @description Validation result. Client validation and watermark inputs are ignored. */
12079
+ 200: {
12080
+ headers: {
12081
+ [name: string]: unknown;
12082
+ };
12083
+ content: {
12084
+ "application/json": {
12085
+ buyerDeliverable: boolean;
12086
+ /** @enum {string} */
12087
+ validation: "validated" | "not_validated";
12088
+ /** @enum {string|null} */
12089
+ watermark: "NOT VALIDATED" | null;
12090
+ reasons: {
12091
+ code: string;
12092
+ message: string;
12093
+ }[];
12094
+ contentHash: string;
12095
+ };
12096
+ };
12097
+ };
12098
+ /** @description Body failed validation. */
12099
+ 400: {
12100
+ headers: {
12101
+ [name: string]: unknown;
12102
+ };
12103
+ content: {
12104
+ /**
12105
+ * @example {
12106
+ * "error": "manifest.offerId is not a known assessment offer",
12107
+ * "code": "invalid_body"
12108
+ * }
12109
+ */
12110
+ "application/json": components["schemas"]["ErrorMessageDto"];
12111
+ };
12112
+ };
12113
+ /** @description Missing or invalid JWT. */
12114
+ 401: {
12115
+ headers: {
12116
+ [name: string]: unknown;
12117
+ };
12118
+ content: {
12119
+ "application/json": components["schemas"]["ErrorMessageDto"];
12120
+ };
12121
+ };
12122
+ /** @description Caller is not a platform admin. */
12123
+ 403: {
12124
+ headers: {
12125
+ [name: string]: unknown;
12126
+ };
12127
+ content: {
12128
+ /**
12129
+ * @example {
12130
+ * "error": "Forbidden",
12131
+ * "code": "forbidden"
12132
+ * }
12133
+ */
12134
+ "application/json": components["schemas"]["ErrorMessageDto"];
12135
+ };
12136
+ };
12137
+ };
12138
+ };
11877
12139
  adminListReadinessTokenUsage: {
11878
12140
  parameters: {
11879
12141
  query?: {