@thinkai/tai-api-contract 2.1.0 → 2.2.1

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.
@@ -211,16 +211,20 @@ export interface paths {
211
211
  patch?: never;
212
212
  trace?: never;
213
213
  };
214
- "/admin/reviews": {
214
+ "/workspaces/{workspaceId}/company-profile": {
215
215
  parameters: {
216
216
  query?: never;
217
217
  header?: never;
218
218
  path?: never;
219
219
  cookie?: never;
220
220
  };
221
- /** Admin review queue */
222
- get: operations["listAdminReviews"];
223
- put?: never;
221
+ /** Get company profile */
222
+ get: operations["getCompanyProfile"];
223
+ /**
224
+ * Upsert company profile
225
+ * @description Idempotent upsert of the workspace's company profile. On success, also synchronizes `tai_workspaces.name` to the new `companyName` so subsequent calls to `GET /me/workspaces` reflect the updated display name. Repeated PUTs replace the stored payload entirely.
226
+ */
227
+ put: operations["putCompanyProfile"];
224
228
  post?: never;
225
229
  delete?: never;
226
230
  options?: never;
@@ -228,42 +232,27 @@ export interface paths {
228
232
  patch?: never;
229
233
  trace?: never;
230
234
  };
231
- "/admin/reviews/{id}": {
235
+ "/workspaces/{workspaceId}/integrations/github": {
232
236
  parameters: {
233
237
  query?: never;
234
238
  header?: never;
235
239
  path?: never;
236
240
  cookie?: never;
237
241
  };
238
- /** Single review submission */
239
- get: operations["getAdminReview"];
242
+ /**
243
+ * GitHub App installation status for workspace
244
+ * @description Returns whether a GitHub App installation is linked and cached repo metadata. When no installation exists, returns 200 with `installed: false` (never 404 for missing install). Use `refresh=true` to bypass cache and re-list repositories from GitHub.
245
+ */
246
+ get: operations["getWorkspaceGithubInstallationStatus"];
240
247
  put?: never;
241
248
  post?: never;
242
249
  delete?: never;
243
250
  options?: never;
244
251
  head?: never;
245
- /** Update review metadata */
246
- patch: operations["patchAdminReview"];
247
- trace?: never;
248
- };
249
- "/admin/reviews/{id}/sections/{sectionId}/comments": {
250
- parameters: {
251
- query?: never;
252
- header?: never;
253
- path?: never;
254
- cookie?: never;
255
- };
256
- get?: never;
257
- put?: never;
258
- /** Add section comment */
259
- post: operations["postAdminReviewComment"];
260
- delete?: never;
261
- options?: never;
262
- head?: never;
263
252
  patch?: never;
264
253
  trace?: never;
265
254
  };
266
- "/admin/reviews/{id}/sections/{sectionId}/decision": {
255
+ "/workspaces/{workspaceId}/integrations/github/install-url": {
267
256
  parameters: {
268
257
  query?: never;
269
258
  header?: never;
@@ -271,63 +260,31 @@ export interface paths {
271
260
  cookie?: never;
272
261
  };
273
262
  get?: never;
274
- /** Set section decision */
275
- put: operations["putAdminReviewSectionDecision"];
276
- post?: never;
277
- delete?: never;
278
- options?: never;
279
- head?: never;
280
- patch?: never;
281
- trace?: never;
282
- };
283
- "/admin/reviews/{id}/pricing": {
284
- parameters: {
285
- query?: never;
286
- header?: never;
287
- path?: never;
288
- cookie?: never;
289
- };
290
- get?: never;
291
- /** Update pricing lines */
292
- put: operations["putAdminReviewPricing"];
293
- post?: never;
263
+ put?: never;
264
+ /**
265
+ * Create GitHub App installation URL
266
+ * @description Creates a GitHub App installation URL scoped to the workspace and caller. Body is optional; when omitted, defaults to `/phase-a/p3` return path.
267
+ */
268
+ post: operations["postGithubInstallUrl"];
294
269
  delete?: never;
295
270
  options?: never;
296
271
  head?: never;
297
272
  patch?: never;
298
273
  trace?: never;
299
274
  };
300
- "/admin/reviews/{id}/deployment": {
275
+ "/integrations/github/callback": {
301
276
  parameters: {
302
277
  query?: never;
303
278
  header?: never;
304
279
  path?: never;
305
280
  cookie?: never;
306
281
  };
307
- get?: never;
308
- /** Update deployment plan */
309
- put: operations["putAdminReviewDeployment"];
310
- post?: never;
311
- delete?: never;
312
- options?: never;
313
- head?: never;
314
- patch?: never;
315
- trace?: never;
316
- };
317
- "/workspaces/{workspaceId}/company-profile": {
318
- parameters: {
319
- query?: never;
320
- header?: never;
321
- path?: never;
322
- cookie?: never;
323
- };
324
- /** Get company profile */
325
- get: operations["getCompanyProfile"];
326
282
  /**
327
- * Upsert company profile
328
- * @description Idempotent upsert of the workspace's company profile. On success, also synchronizes `tai_workspaces.name` to the new `companyName` so subsequent calls to `GET /me/workspaces` reflect the updated display name. Repeated PUTs replace the stored payload entirely.
283
+ * GitHub App installation callback
284
+ * @description Public callback endpoint used by GitHub App installation flow. Resolves and consumes install state, persists workspace installation linkage, then redirects to configured SPA origin with status markers.
329
285
  */
330
- put: operations["putCompanyProfile"];
286
+ get: operations["getGithubInstallCallback"];
287
+ put?: never;
331
288
  post?: never;
332
289
  delete?: never;
333
290
  options?: never;
@@ -335,20 +292,20 @@ export interface paths {
335
292
  patch?: never;
336
293
  trace?: never;
337
294
  };
338
- "/workspaces/{workspaceId}/integrations/github": {
295
+ "/integrations/github/webhook": {
339
296
  parameters: {
340
297
  query?: never;
341
298
  header?: never;
342
299
  path?: never;
343
300
  cookie?: never;
344
301
  };
302
+ get?: never;
303
+ put?: never;
345
304
  /**
346
- * GitHub App installation status for workspace
347
- * @description Returns whether a GitHub App installation is linked and cached repo metadata. When no installation exists, returns 200 with `installed: false` (never 404 for missing install). Use `refresh=true` to bypass cache and re-list repositories from GitHub.
305
+ * GitHub App webhook receiver
306
+ * @description Public webhook endpoint that verifies `X-Hub-Signature-256` and updates or removes workspace GitHub integration/cache state for installation events.
348
307
  */
349
- get: operations["getWorkspaceGithubInstallationStatus"];
350
- put?: never;
351
- post?: never;
308
+ post: operations["postGithubWebhook"];
352
309
  delete?: never;
353
310
  options?: never;
354
311
  head?: never;
@@ -787,7 +744,13 @@ export interface components {
787
744
  [key: string]: unknown;
788
745
  };
789
746
  DashboardProductivityDto: {
747
+ /** Format: uuid */
790
748
  workspaceId: string;
749
+ /**
750
+ * Format: date-time
751
+ * @description Response generation time (RFC 3339).
752
+ */
753
+ generatedAt?: string;
791
754
  /** Format: date-time */
792
755
  windowStart: string;
793
756
  /** Format: date-time */
@@ -800,6 +763,10 @@ export interface components {
800
763
  };
801
764
  };
802
765
  DashboardProductivityHistoryDto: {
766
+ /** Format: uuid */
767
+ workspaceId: string;
768
+ /** @enum {string} */
769
+ bucket: "day" | "week" | "month";
803
770
  buckets: {
804
771
  /** Format: date-time */
805
772
  bucketStart: string;
@@ -871,6 +838,14 @@ export interface components {
871
838
  /** Format: date-time */
872
839
  lastSyncedAt?: string | null;
873
840
  };
841
+ GithubInstallUrlRequestDto: {
842
+ returnPath?: string;
843
+ };
844
+ GithubInstallUrlResponseDto: {
845
+ /** Format: uri */
846
+ url: string;
847
+ state: string;
848
+ };
874
849
  AIReadinessDto: {
875
850
  currentUsage: string;
876
851
  tools: string[];
@@ -1107,86 +1082,6 @@ export interface components {
1107
1082
  items: components["schemas"]["NotificationDto"][];
1108
1083
  total: number;
1109
1084
  };
1110
- ReviewQueueItemDto: {
1111
- id: string;
1112
- client: string;
1113
- project: string;
1114
- workflows: ("greenfield" | "brownfield")[];
1115
- /** Format: date-time */
1116
- submittedAt: string;
1117
- reviewer: string | null;
1118
- /** @enum {string} */
1119
- status: "pending" | "in_review" | "approved" | "changes_requested";
1120
- /** @enum {string} */
1121
- priority: "high" | "medium" | "low";
1122
- };
1123
- AdminDashboardDto: {
1124
- queue: components["schemas"]["ReviewQueueItemDto"][];
1125
- reviewers: string[];
1126
- };
1127
- PatchAdminReviewBodyDto: {
1128
- /** @enum {string} */
1129
- status?: "pending" | "in_review" | "approved" | "changes_requested";
1130
- reviewer?: string;
1131
- /** @enum {string} */
1132
- priority?: "high" | "medium" | "low";
1133
- };
1134
- CommentDto: {
1135
- id: string;
1136
- sectionId: string;
1137
- author: string;
1138
- text: string;
1139
- /** Format: date-time */
1140
- timestamp: string;
1141
- };
1142
- AdminCommentBodyDto: {
1143
- text: string;
1144
- };
1145
- SectionDecisionBodyDto: {
1146
- /** @enum {string} */
1147
- decision: "pending" | "approved" | "changes_requested" | "rejected";
1148
- };
1149
- PricingLineDto: {
1150
- id: string;
1151
- label: string;
1152
- rate: number;
1153
- hours: number;
1154
- };
1155
- PricingUpdateBodyDto: {
1156
- items: {
1157
- id: string;
1158
- rate: number;
1159
- hours: number;
1160
- }[];
1161
- };
1162
- DeploymentPlanDto: {
1163
- startDate: string;
1164
- endDate: string;
1165
- milestones: string[];
1166
- };
1167
- ReviewSectionDto: {
1168
- id: string;
1169
- label: string;
1170
- detail: string;
1171
- /** @enum {string} */
1172
- decision: "pending" | "approved" | "changes_requested" | "rejected";
1173
- comments: components["schemas"]["CommentDto"][];
1174
- };
1175
- ReviewSubmissionDto: {
1176
- id: string;
1177
- client: string;
1178
- project: string;
1179
- workflows: ("greenfield" | "brownfield")[];
1180
- /** @enum {string} */
1181
- status: "pending" | "in_review" | "approved" | "changes_requested";
1182
- isResubmission: boolean;
1183
- context: {
1184
- text: string;
1185
- }[];
1186
- sections: components["schemas"]["ReviewSectionDto"][];
1187
- pricing: components["schemas"]["PricingLineDto"][];
1188
- deployment: components["schemas"]["DeploymentPlanDto"];
1189
- };
1190
1085
  EffectiveTaskRowDto: {
1191
1086
  id: string;
1192
1087
  name: string;
@@ -1277,8 +1172,6 @@ export interface components {
1277
1172
  WorkspaceId: string;
1278
1173
  RepoId: string;
1279
1174
  ProjectId: string;
1280
- ReviewId: string;
1281
- SectionId: string;
1282
1175
  NotificationId: string;
1283
1176
  };
1284
1177
  requestBodies: never;
@@ -1307,6 +1200,8 @@ export type CompanyProfileDto = components['schemas']['CompanyProfileDto'];
1307
1200
  export type GithubAccountDto = components['schemas']['GithubAccountDto'];
1308
1201
  export type GithubInstalledRepoDto = components['schemas']['GithubInstalledRepoDto'];
1309
1202
  export type GithubInstallationStatusDto = components['schemas']['GithubInstallationStatusDto'];
1203
+ export type GithubInstallUrlRequestDto = components['schemas']['GithubInstallUrlRequestDto'];
1204
+ export type GithubInstallUrlResponseDto = components['schemas']['GithubInstallUrlResponseDto'];
1310
1205
  export type AiReadinessDto = components['schemas']['AIReadinessDto'];
1311
1206
  export type AiMaturityResultDto = components['schemas']['AiMaturityResultDto'];
1312
1207
  export type TechCategoryDto = components['schemas']['TechCategoryDto'];
@@ -1336,17 +1231,6 @@ export type ProjectDto = components['schemas']['ProjectDto'];
1336
1231
  export type ProjectPatchDto = components['schemas']['ProjectPatchDto'];
1337
1232
  export type NotificationDto = components['schemas']['NotificationDto'];
1338
1233
  export type NotificationListDto = components['schemas']['NotificationListDto'];
1339
- export type ReviewQueueItemDto = components['schemas']['ReviewQueueItemDto'];
1340
- export type AdminDashboardDto = components['schemas']['AdminDashboardDto'];
1341
- export type PatchAdminReviewBodyDto = components['schemas']['PatchAdminReviewBodyDto'];
1342
- export type CommentDto = components['schemas']['CommentDto'];
1343
- export type AdminCommentBodyDto = components['schemas']['AdminCommentBodyDto'];
1344
- export type SectionDecisionBodyDto = components['schemas']['SectionDecisionBodyDto'];
1345
- export type PricingLineDto = components['schemas']['PricingLineDto'];
1346
- export type PricingUpdateBodyDto = components['schemas']['PricingUpdateBodyDto'];
1347
- export type DeploymentPlanDto = components['schemas']['DeploymentPlanDto'];
1348
- export type ReviewSectionDto = components['schemas']['ReviewSectionDto'];
1349
- export type ReviewSubmissionDto = components['schemas']['ReviewSubmissionDto'];
1350
1234
  export type EffectiveTaskRowDto = components['schemas']['EffectiveTaskRowDto'];
1351
1235
  export type EffectivePhaseTasksBlockDto = components['schemas']['EffectivePhaseTasksBlockDto'];
1352
1236
  export type AiStrategyRecommendBodyDto = components['schemas']['AiStrategyRecommendBodyDto'];
@@ -1364,8 +1248,6 @@ export type ResponseForbidden = components['responses']['Forbidden'];
1364
1248
  export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
1365
1249
  export type ParameterRepoId = components['parameters']['RepoId'];
1366
1250
  export type ParameterProjectId = components['parameters']['ProjectId'];
1367
- export type ParameterReviewId = components['parameters']['ReviewId'];
1368
- export type ParameterSectionId = components['parameters']['SectionId'];
1369
1251
  export type ParameterNotificationId = components['parameters']['NotificationId'];
1370
1252
  export type $defs = Record<string, never>;
1371
1253
  export interface operations {
@@ -1763,6 +1645,18 @@ export interface operations {
1763
1645
  "application/json": components["schemas"]["DashboardProductivityDto"];
1764
1646
  };
1765
1647
  };
1648
+ /** @description Invalid query parameters */
1649
+ 400: {
1650
+ headers: {
1651
+ [name: string]: unknown;
1652
+ };
1653
+ content: {
1654
+ "application/json": {
1655
+ /** @example invalid_query */
1656
+ error: string;
1657
+ };
1658
+ };
1659
+ };
1766
1660
  401: components["responses"]["Unauthorized"];
1767
1661
  };
1768
1662
  };
@@ -1793,129 +1687,75 @@ export interface operations {
1793
1687
  "application/json": components["schemas"]["DashboardProductivityHistoryDto"];
1794
1688
  };
1795
1689
  };
1796
- 401: components["responses"]["Unauthorized"];
1797
- };
1798
- };
1799
- listAdminReviews: {
1800
- parameters: {
1801
- query?: {
1802
- status?: string;
1803
- priority?: string;
1804
- reviewer?: string;
1805
- };
1806
- header?: never;
1807
- path?: never;
1808
- cookie?: never;
1809
- };
1810
- requestBody?: never;
1811
- responses: {
1812
- /** @description Queue and reviewer list */
1813
- 200: {
1690
+ /** @description Invalid query parameters */
1691
+ 400: {
1814
1692
  headers: {
1815
1693
  [name: string]: unknown;
1816
1694
  };
1817
1695
  content: {
1818
- "application/json": components["schemas"]["AdminDashboardDto"];
1696
+ "application/json": {
1697
+ /** @example invalid_query */
1698
+ error: string;
1699
+ };
1819
1700
  };
1820
1701
  };
1821
1702
  401: components["responses"]["Unauthorized"];
1822
- 403: components["responses"]["Forbidden"];
1823
1703
  };
1824
1704
  };
1825
- getAdminReview: {
1705
+ getCompanyProfile: {
1826
1706
  parameters: {
1827
1707
  query?: never;
1828
1708
  header?: never;
1829
1709
  path: {
1830
- id: components["parameters"]["ReviewId"];
1710
+ workspaceId: components["parameters"]["WorkspaceId"];
1831
1711
  };
1832
1712
  cookie?: never;
1833
1713
  };
1834
1714
  requestBody?: never;
1835
1715
  responses: {
1836
- /** @description Review detail */
1716
+ /** @description Company profile DTO, or JSON `null` when the workspace exists but no profile has been saved yet. Clients should treat `null` as the empty initial state (the wizard renders blank inputs); they MUST NOT treat the absence of a saved profile as a 404. */
1837
1717
  200: {
1838
1718
  headers: {
1839
1719
  [name: string]: unknown;
1840
1720
  };
1841
1721
  content: {
1842
- "application/json": components["schemas"]["ReviewSubmissionDto"];
1722
+ "application/json": components["schemas"]["CompanyProfileDto"];
1843
1723
  };
1844
1724
  };
1845
- 401: components["responses"]["Unauthorized"];
1846
- 403: components["responses"]["Forbidden"];
1847
- };
1848
- };
1849
- patchAdminReview: {
1850
- parameters: {
1851
- query?: never;
1852
- header?: never;
1853
- path: {
1854
- id: components["parameters"]["ReviewId"];
1855
- };
1856
- cookie?: never;
1857
- };
1858
- requestBody: {
1859
- content: {
1860
- "application/json": components["schemas"]["PatchAdminReviewBodyDto"];
1861
- };
1862
- };
1863
- responses: {
1864
- /** @description Updated review */
1865
- 200: {
1725
+ /** @description Malformed workspaceId */
1726
+ 400: {
1866
1727
  headers: {
1867
1728
  [name: string]: unknown;
1868
1729
  };
1869
1730
  content: {
1870
- "application/json": components["schemas"]["ReviewSubmissionDto"];
1731
+ "application/json": components["schemas"]["ErrorMessageDto"];
1871
1732
  };
1872
1733
  };
1873
1734
  401: components["responses"]["Unauthorized"];
1874
1735
  403: components["responses"]["Forbidden"];
1875
- };
1876
- };
1877
- postAdminReviewComment: {
1878
- parameters: {
1879
- query?: never;
1880
- header?: never;
1881
- path: {
1882
- id: components["parameters"]["ReviewId"];
1883
- sectionId: components["parameters"]["SectionId"];
1884
- };
1885
- cookie?: never;
1886
- };
1887
- requestBody: {
1888
- content: {
1889
- "application/json": components["schemas"]["AdminCommentBodyDto"];
1890
- };
1891
- };
1892
- responses: {
1893
- /** @description Created comment */
1894
- 200: {
1736
+ /** @description Workspace does not exist */
1737
+ 404: {
1895
1738
  headers: {
1896
1739
  [name: string]: unknown;
1897
1740
  };
1898
1741
  content: {
1899
- "application/json": components["schemas"]["CommentDto"];
1742
+ "application/json": components["schemas"]["ErrorMessageDto"];
1900
1743
  };
1901
1744
  };
1902
- 401: components["responses"]["Unauthorized"];
1903
- 403: components["responses"]["Forbidden"];
1904
1745
  };
1905
1746
  };
1906
- putAdminReviewSectionDecision: {
1747
+ putCompanyProfile: {
1907
1748
  parameters: {
1908
1749
  query?: never;
1909
1750
  header?: never;
1910
1751
  path: {
1911
- id: components["parameters"]["ReviewId"];
1912
- sectionId: components["parameters"]["SectionId"];
1752
+ workspaceId: components["parameters"]["WorkspaceId"];
1913
1753
  };
1914
1754
  cookie?: never;
1915
1755
  };
1916
1756
  requestBody: {
1917
1757
  content: {
1918
- "application/json": components["schemas"]["SectionDecisionBodyDto"];
1758
+ "application/json": components["schemas"]["CompanyProfileDto"];
1919
1759
  };
1920
1760
  };
1921
1761
  responses: {
@@ -1926,84 +1766,132 @@ export interface operations {
1926
1766
  };
1927
1767
  content?: never;
1928
1768
  };
1769
+ /** @description Body fails validation (missing/invalid required field, bad enum, conditional rule) */
1770
+ 400: {
1771
+ headers: {
1772
+ [name: string]: unknown;
1773
+ };
1774
+ content: {
1775
+ "application/json": components["schemas"]["ErrorMessageDto"];
1776
+ };
1777
+ };
1929
1778
  401: components["responses"]["Unauthorized"];
1930
1779
  403: components["responses"]["Forbidden"];
1780
+ /** @description Workspace does not exist */
1781
+ 404: {
1782
+ headers: {
1783
+ [name: string]: unknown;
1784
+ };
1785
+ content: {
1786
+ "application/json": components["schemas"]["ErrorMessageDto"];
1787
+ };
1788
+ };
1931
1789
  };
1932
1790
  };
1933
- putAdminReviewPricing: {
1791
+ getWorkspaceGithubInstallationStatus: {
1934
1792
  parameters: {
1935
- query?: never;
1793
+ query?: {
1794
+ /** @description When true, bypass `tai_workspace_vcs_repos_cache` and re-fetch from GitHub. */
1795
+ refresh?: boolean;
1796
+ };
1936
1797
  header?: never;
1937
1798
  path: {
1938
- id: components["parameters"]["ReviewId"];
1799
+ workspaceId: components["parameters"]["WorkspaceId"];
1939
1800
  };
1940
1801
  cookie?: never;
1941
1802
  };
1942
- requestBody: {
1943
- content: {
1944
- "application/json": components["schemas"]["PricingUpdateBodyDto"];
1945
- };
1946
- };
1803
+ requestBody?: never;
1947
1804
  responses: {
1948
- /** @description Saved */
1949
- 204: {
1805
+ /** @description Installation status */
1806
+ 200: {
1950
1807
  headers: {
1951
1808
  [name: string]: unknown;
1952
1809
  };
1953
- content?: never;
1810
+ content: {
1811
+ "application/json": components["schemas"]["GithubInstallationStatusDto"];
1812
+ };
1954
1813
  };
1955
1814
  401: components["responses"]["Unauthorized"];
1956
1815
  403: components["responses"]["Forbidden"];
1816
+ /** @description Workspace does not exist or malformed workspaceId */
1817
+ 404: {
1818
+ headers: {
1819
+ [name: string]: unknown;
1820
+ };
1821
+ content: {
1822
+ "application/json": components["schemas"]["ErrorMessageDto"];
1823
+ };
1824
+ };
1957
1825
  };
1958
1826
  };
1959
- putAdminReviewDeployment: {
1827
+ postGithubInstallUrl: {
1960
1828
  parameters: {
1961
1829
  query?: never;
1962
1830
  header?: never;
1963
1831
  path: {
1964
- id: components["parameters"]["ReviewId"];
1832
+ workspaceId: components["parameters"]["WorkspaceId"];
1965
1833
  };
1966
1834
  cookie?: never;
1967
1835
  };
1968
- requestBody: {
1836
+ requestBody?: {
1969
1837
  content: {
1970
- "application/json": components["schemas"]["DeploymentPlanDto"];
1838
+ "application/json": components["schemas"]["GithubInstallUrlRequestDto"];
1971
1839
  };
1972
1840
  };
1973
1841
  responses: {
1974
- /** @description Saved */
1975
- 204: {
1842
+ /** @description Installation URL + signed state */
1843
+ 200: {
1976
1844
  headers: {
1977
1845
  [name: string]: unknown;
1978
1846
  };
1979
- content?: never;
1847
+ content: {
1848
+ "application/json": components["schemas"]["GithubInstallUrlResponseDto"];
1849
+ };
1850
+ };
1851
+ /** @description Request validation failed */
1852
+ 400: {
1853
+ headers: {
1854
+ [name: string]: unknown;
1855
+ };
1856
+ content: {
1857
+ "application/json": components["schemas"]["ErrorMessageDto"];
1858
+ };
1980
1859
  };
1981
1860
  401: components["responses"]["Unauthorized"];
1982
1861
  403: components["responses"]["Forbidden"];
1862
+ /** @description Workspace does not exist or malformed workspaceId */
1863
+ 404: {
1864
+ headers: {
1865
+ [name: string]: unknown;
1866
+ };
1867
+ content: {
1868
+ "application/json": components["schemas"]["ErrorMessageDto"];
1869
+ };
1870
+ };
1983
1871
  };
1984
1872
  };
1985
- getCompanyProfile: {
1873
+ getGithubInstallCallback: {
1986
1874
  parameters: {
1987
- query?: never;
1988
- header?: never;
1989
- path: {
1990
- workspaceId: components["parameters"]["WorkspaceId"];
1875
+ query: {
1876
+ state: string;
1877
+ installation_id: string;
1878
+ setup_action?: string;
1991
1879
  };
1880
+ header?: never;
1881
+ path?: never;
1992
1882
  cookie?: never;
1993
1883
  };
1994
1884
  requestBody?: never;
1995
1885
  responses: {
1996
- /** @description Company profile DTO, or JSON `null` when the workspace exists but no profile has been saved yet. Clients should treat `null` as the empty initial state (the wizard renders blank inputs); they MUST NOT treat the absence of a saved profile as a 404. */
1997
- 200: {
1886
+ /** @description Redirect to ThinkAI SPA return path with GitHub connection status */
1887
+ 302: {
1998
1888
  headers: {
1999
1889
  [name: string]: unknown;
2000
1890
  };
2001
- content: {
2002
- "application/json": components["schemas"]["CompanyProfileDto"];
2003
- };
1891
+ content?: never;
2004
1892
  };
2005
- /** @description Malformed workspaceId */
2006
- 400: {
1893
+ /** @description Workspace store not configured */
1894
+ 501: {
2007
1895
  headers: {
2008
1896
  [name: string]: unknown;
2009
1897
  };
@@ -2011,10 +1899,8 @@ export interface operations {
2011
1899
  "application/json": components["schemas"]["ErrorMessageDto"];
2012
1900
  };
2013
1901
  };
2014
- 401: components["responses"]["Unauthorized"];
2015
- 403: components["responses"]["Forbidden"];
2016
- /** @description Workspace does not exist */
2017
- 404: {
1902
+ /** @description SPA origin configuration missing */
1903
+ 503: {
2018
1904
  headers: {
2019
1905
  [name: string]: unknown;
2020
1906
  };
@@ -2024,29 +1910,32 @@ export interface operations {
2024
1910
  };
2025
1911
  };
2026
1912
  };
2027
- putCompanyProfile: {
1913
+ postGithubWebhook: {
2028
1914
  parameters: {
2029
1915
  query?: never;
2030
- header?: never;
2031
- path: {
2032
- workspaceId: components["parameters"]["WorkspaceId"];
1916
+ header: {
1917
+ "X-Hub-Signature-256": string;
1918
+ "X-GitHub-Event": string;
2033
1919
  };
1920
+ path?: never;
2034
1921
  cookie?: never;
2035
1922
  };
2036
1923
  requestBody: {
2037
1924
  content: {
2038
- "application/json": components["schemas"]["CompanyProfileDto"];
1925
+ "application/json": {
1926
+ [key: string]: unknown;
1927
+ };
2039
1928
  };
2040
1929
  };
2041
1930
  responses: {
2042
- /** @description Saved */
2043
- 204: {
1931
+ /** @description Webhook accepted */
1932
+ 200: {
2044
1933
  headers: {
2045
1934
  [name: string]: unknown;
2046
1935
  };
2047
1936
  content?: never;
2048
1937
  };
2049
- /** @description Body fails validation (missing/invalid required field, bad enum, conditional rule) */
1938
+ /** @description Invalid payload */
2050
1939
  400: {
2051
1940
  headers: {
2052
1941
  [name: string]: unknown;
@@ -2055,10 +1944,8 @@ export interface operations {
2055
1944
  "application/json": components["schemas"]["ErrorMessageDto"];
2056
1945
  };
2057
1946
  };
2058
- 401: components["responses"]["Unauthorized"];
2059
- 403: components["responses"]["Forbidden"];
2060
- /** @description Workspace does not exist */
2061
- 404: {
1947
+ /** @description Invalid webhook signature */
1948
+ 401: {
2062
1949
  headers: {
2063
1950
  [name: string]: unknown;
2064
1951
  };
@@ -2066,35 +1953,17 @@ export interface operations {
2066
1953
  "application/json": components["schemas"]["ErrorMessageDto"];
2067
1954
  };
2068
1955
  };
2069
- };
2070
- };
2071
- getWorkspaceGithubInstallationStatus: {
2072
- parameters: {
2073
- query?: {
2074
- /** @description When true, bypass `tai_workspace_vcs_repos_cache` and re-fetch from GitHub. */
2075
- refresh?: boolean;
2076
- };
2077
- header?: never;
2078
- path: {
2079
- workspaceId: components["parameters"]["WorkspaceId"];
2080
- };
2081
- cookie?: never;
2082
- };
2083
- requestBody?: never;
2084
- responses: {
2085
- /** @description Installation status */
2086
- 200: {
1956
+ /** @description Workspace store not configured */
1957
+ 501: {
2087
1958
  headers: {
2088
1959
  [name: string]: unknown;
2089
1960
  };
2090
1961
  content: {
2091
- "application/json": components["schemas"]["GithubInstallationStatusDto"];
1962
+ "application/json": components["schemas"]["ErrorMessageDto"];
2092
1963
  };
2093
1964
  };
2094
- 401: components["responses"]["Unauthorized"];
2095
- 403: components["responses"]["Forbidden"];
2096
- /** @description Workspace does not exist or malformed workspaceId */
2097
- 404: {
1965
+ /** @description Missing GitHub webhook secret or GitHub App configuration */
1966
+ 503: {
2098
1967
  headers: {
2099
1968
  [name: string]: unknown;
2100
1969
  };