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