@thinkai/tai-api-contract 2.2.0 → 2.2.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.
@@ -211,109 +211,6 @@ export interface paths {
211
211
  patch?: never;
212
212
  trace?: never;
213
213
  };
214
- "/admin/reviews": {
215
- parameters: {
216
- query?: never;
217
- header?: never;
218
- path?: never;
219
- cookie?: never;
220
- };
221
- /** Admin review queue */
222
- get: operations["listAdminReviews"];
223
- put?: never;
224
- post?: never;
225
- delete?: never;
226
- options?: never;
227
- head?: never;
228
- patch?: never;
229
- trace?: never;
230
- };
231
- "/admin/reviews/{id}": {
232
- parameters: {
233
- query?: never;
234
- header?: never;
235
- path?: never;
236
- cookie?: never;
237
- };
238
- /** Single review submission */
239
- get: operations["getAdminReview"];
240
- put?: never;
241
- post?: never;
242
- delete?: never;
243
- options?: never;
244
- 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
- patch?: never;
264
- trace?: never;
265
- };
266
- "/admin/reviews/{id}/sections/{sectionId}/decision": {
267
- parameters: {
268
- query?: never;
269
- header?: never;
270
- path?: never;
271
- cookie?: never;
272
- };
273
- 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;
294
- delete?: never;
295
- options?: never;
296
- head?: never;
297
- patch?: never;
298
- trace?: never;
299
- };
300
- "/admin/reviews/{id}/deployment": {
301
- parameters: {
302
- query?: never;
303
- header?: never;
304
- path?: never;
305
- cookie?: never;
306
- };
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
214
  "/workspaces/{workspaceId}/company-profile": {
318
215
  parameters: {
319
216
  query?: never;
@@ -382,7 +279,10 @@ export interface paths {
382
279
  path?: never;
383
280
  cookie?: never;
384
281
  };
385
- /** GitHub App installation callback */
282
+ /**
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.
285
+ */
386
286
  get: operations["getGithubInstallCallback"];
387
287
  put?: never;
388
288
  post?: never;
@@ -401,7 +301,10 @@ export interface paths {
401
301
  };
402
302
  get?: never;
403
303
  put?: never;
404
- /** GitHub App webhook receiver */
304
+ /**
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.
307
+ */
405
308
  post: operations["postGithubWebhook"];
406
309
  delete?: never;
407
310
  options?: never;
@@ -841,7 +744,13 @@ export interface components {
841
744
  [key: string]: unknown;
842
745
  };
843
746
  DashboardProductivityDto: {
747
+ /** Format: uuid */
844
748
  workspaceId: string;
749
+ /**
750
+ * Format: date-time
751
+ * @description Response generation time (RFC 3339).
752
+ */
753
+ generatedAt?: string;
845
754
  /** Format: date-time */
846
755
  windowStart: string;
847
756
  /** Format: date-time */
@@ -854,6 +763,10 @@ export interface components {
854
763
  };
855
764
  };
856
765
  DashboardProductivityHistoryDto: {
766
+ /** Format: uuid */
767
+ workspaceId: string;
768
+ /** @enum {string} */
769
+ bucket: "day" | "week" | "month";
857
770
  buckets: {
858
771
  /** Format: date-time */
859
772
  bucketStart: string;
@@ -1169,86 +1082,6 @@ export interface components {
1169
1082
  items: components["schemas"]["NotificationDto"][];
1170
1083
  total: number;
1171
1084
  };
1172
- ReviewQueueItemDto: {
1173
- id: string;
1174
- client: string;
1175
- project: string;
1176
- workflows: ("greenfield" | "brownfield")[];
1177
- /** Format: date-time */
1178
- submittedAt: string;
1179
- reviewer: string | null;
1180
- /** @enum {string} */
1181
- status: "pending" | "in_review" | "approved" | "changes_requested";
1182
- /** @enum {string} */
1183
- priority: "high" | "medium" | "low";
1184
- };
1185
- AdminDashboardDto: {
1186
- queue: components["schemas"]["ReviewQueueItemDto"][];
1187
- reviewers: string[];
1188
- };
1189
- PatchAdminReviewBodyDto: {
1190
- /** @enum {string} */
1191
- status?: "pending" | "in_review" | "approved" | "changes_requested";
1192
- reviewer?: string;
1193
- /** @enum {string} */
1194
- priority?: "high" | "medium" | "low";
1195
- };
1196
- CommentDto: {
1197
- id: string;
1198
- sectionId: string;
1199
- author: string;
1200
- text: string;
1201
- /** Format: date-time */
1202
- timestamp: string;
1203
- };
1204
- AdminCommentBodyDto: {
1205
- text: string;
1206
- };
1207
- SectionDecisionBodyDto: {
1208
- /** @enum {string} */
1209
- decision: "pending" | "approved" | "changes_requested" | "rejected";
1210
- };
1211
- PricingLineDto: {
1212
- id: string;
1213
- label: string;
1214
- rate: number;
1215
- hours: number;
1216
- };
1217
- PricingUpdateBodyDto: {
1218
- items: {
1219
- id: string;
1220
- rate: number;
1221
- hours: number;
1222
- }[];
1223
- };
1224
- DeploymentPlanDto: {
1225
- startDate: string;
1226
- endDate: string;
1227
- milestones: string[];
1228
- };
1229
- ReviewSectionDto: {
1230
- id: string;
1231
- label: string;
1232
- detail: string;
1233
- /** @enum {string} */
1234
- decision: "pending" | "approved" | "changes_requested" | "rejected";
1235
- comments: components["schemas"]["CommentDto"][];
1236
- };
1237
- ReviewSubmissionDto: {
1238
- id: string;
1239
- client: string;
1240
- project: string;
1241
- workflows: ("greenfield" | "brownfield")[];
1242
- /** @enum {string} */
1243
- status: "pending" | "in_review" | "approved" | "changes_requested";
1244
- isResubmission: boolean;
1245
- context: {
1246
- text: string;
1247
- }[];
1248
- sections: components["schemas"]["ReviewSectionDto"][];
1249
- pricing: components["schemas"]["PricingLineDto"][];
1250
- deployment: components["schemas"]["DeploymentPlanDto"];
1251
- };
1252
1085
  EffectiveTaskRowDto: {
1253
1086
  id: string;
1254
1087
  name: string;
@@ -1339,8 +1172,6 @@ export interface components {
1339
1172
  WorkspaceId: string;
1340
1173
  RepoId: string;
1341
1174
  ProjectId: string;
1342
- ReviewId: string;
1343
- SectionId: string;
1344
1175
  NotificationId: string;
1345
1176
  };
1346
1177
  requestBodies: never;
@@ -1400,17 +1231,6 @@ export type ProjectDto = components['schemas']['ProjectDto'];
1400
1231
  export type ProjectPatchDto = components['schemas']['ProjectPatchDto'];
1401
1232
  export type NotificationDto = components['schemas']['NotificationDto'];
1402
1233
  export type NotificationListDto = components['schemas']['NotificationListDto'];
1403
- export type ReviewQueueItemDto = components['schemas']['ReviewQueueItemDto'];
1404
- export type AdminDashboardDto = components['schemas']['AdminDashboardDto'];
1405
- export type PatchAdminReviewBodyDto = components['schemas']['PatchAdminReviewBodyDto'];
1406
- export type CommentDto = components['schemas']['CommentDto'];
1407
- export type AdminCommentBodyDto = components['schemas']['AdminCommentBodyDto'];
1408
- export type SectionDecisionBodyDto = components['schemas']['SectionDecisionBodyDto'];
1409
- export type PricingLineDto = components['schemas']['PricingLineDto'];
1410
- export type PricingUpdateBodyDto = components['schemas']['PricingUpdateBodyDto'];
1411
- export type DeploymentPlanDto = components['schemas']['DeploymentPlanDto'];
1412
- export type ReviewSectionDto = components['schemas']['ReviewSectionDto'];
1413
- export type ReviewSubmissionDto = components['schemas']['ReviewSubmissionDto'];
1414
1234
  export type EffectiveTaskRowDto = components['schemas']['EffectiveTaskRowDto'];
1415
1235
  export type EffectivePhaseTasksBlockDto = components['schemas']['EffectivePhaseTasksBlockDto'];
1416
1236
  export type AiStrategyRecommendBodyDto = components['schemas']['AiStrategyRecommendBodyDto'];
@@ -1428,8 +1248,6 @@ export type ResponseForbidden = components['responses']['Forbidden'];
1428
1248
  export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
1429
1249
  export type ParameterRepoId = components['parameters']['RepoId'];
1430
1250
  export type ParameterProjectId = components['parameters']['ProjectId'];
1431
- export type ParameterReviewId = components['parameters']['ReviewId'];
1432
- export type ParameterSectionId = components['parameters']['SectionId'];
1433
1251
  export type ParameterNotificationId = components['parameters']['NotificationId'];
1434
1252
  export type $defs = Record<string, never>;
1435
1253
  export interface operations {
@@ -1827,6 +1645,18 @@ export interface operations {
1827
1645
  "application/json": components["schemas"]["DashboardProductivityDto"];
1828
1646
  };
1829
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
+ };
1830
1660
  401: components["responses"]["Unauthorized"];
1831
1661
  };
1832
1662
  };
@@ -1857,193 +1687,19 @@ export interface operations {
1857
1687
  "application/json": components["schemas"]["DashboardProductivityHistoryDto"];
1858
1688
  };
1859
1689
  };
1860
- 401: components["responses"]["Unauthorized"];
1861
- };
1862
- };
1863
- listAdminReviews: {
1864
- parameters: {
1865
- query?: {
1866
- status?: string;
1867
- priority?: string;
1868
- reviewer?: string;
1869
- };
1870
- header?: never;
1871
- path?: never;
1872
- cookie?: never;
1873
- };
1874
- requestBody?: never;
1875
- responses: {
1876
- /** @description Queue and reviewer list */
1877
- 200: {
1878
- headers: {
1879
- [name: string]: unknown;
1880
- };
1881
- content: {
1882
- "application/json": components["schemas"]["AdminDashboardDto"];
1883
- };
1884
- };
1885
- 401: components["responses"]["Unauthorized"];
1886
- 403: components["responses"]["Forbidden"];
1887
- };
1888
- };
1889
- getAdminReview: {
1890
- parameters: {
1891
- query?: never;
1892
- header?: never;
1893
- path: {
1894
- id: components["parameters"]["ReviewId"];
1895
- };
1896
- cookie?: never;
1897
- };
1898
- requestBody?: never;
1899
- responses: {
1900
- /** @description Review detail */
1901
- 200: {
1902
- headers: {
1903
- [name: string]: unknown;
1904
- };
1905
- content: {
1906
- "application/json": components["schemas"]["ReviewSubmissionDto"];
1907
- };
1908
- };
1909
- 401: components["responses"]["Unauthorized"];
1910
- 403: components["responses"]["Forbidden"];
1911
- };
1912
- };
1913
- patchAdminReview: {
1914
- parameters: {
1915
- query?: never;
1916
- header?: never;
1917
- path: {
1918
- id: components["parameters"]["ReviewId"];
1919
- };
1920
- cookie?: never;
1921
- };
1922
- requestBody: {
1923
- content: {
1924
- "application/json": components["schemas"]["PatchAdminReviewBodyDto"];
1925
- };
1926
- };
1927
- responses: {
1928
- /** @description Updated review */
1929
- 200: {
1930
- headers: {
1931
- [name: string]: unknown;
1932
- };
1933
- content: {
1934
- "application/json": components["schemas"]["ReviewSubmissionDto"];
1935
- };
1936
- };
1937
- 401: components["responses"]["Unauthorized"];
1938
- 403: components["responses"]["Forbidden"];
1939
- };
1940
- };
1941
- postAdminReviewComment: {
1942
- parameters: {
1943
- query?: never;
1944
- header?: never;
1945
- path: {
1946
- id: components["parameters"]["ReviewId"];
1947
- sectionId: components["parameters"]["SectionId"];
1948
- };
1949
- cookie?: never;
1950
- };
1951
- requestBody: {
1952
- content: {
1953
- "application/json": components["schemas"]["AdminCommentBodyDto"];
1954
- };
1955
- };
1956
- responses: {
1957
- /** @description Created comment */
1958
- 200: {
1690
+ /** @description Invalid query parameters */
1691
+ 400: {
1959
1692
  headers: {
1960
1693
  [name: string]: unknown;
1961
1694
  };
1962
1695
  content: {
1963
- "application/json": components["schemas"]["CommentDto"];
1964
- };
1965
- };
1966
- 401: components["responses"]["Unauthorized"];
1967
- 403: components["responses"]["Forbidden"];
1968
- };
1969
- };
1970
- putAdminReviewSectionDecision: {
1971
- parameters: {
1972
- query?: never;
1973
- header?: never;
1974
- path: {
1975
- id: components["parameters"]["ReviewId"];
1976
- sectionId: components["parameters"]["SectionId"];
1977
- };
1978
- cookie?: never;
1979
- };
1980
- requestBody: {
1981
- content: {
1982
- "application/json": components["schemas"]["SectionDecisionBodyDto"];
1983
- };
1984
- };
1985
- responses: {
1986
- /** @description Saved */
1987
- 204: {
1988
- headers: {
1989
- [name: string]: unknown;
1990
- };
1991
- content?: never;
1992
- };
1993
- 401: components["responses"]["Unauthorized"];
1994
- 403: components["responses"]["Forbidden"];
1995
- };
1996
- };
1997
- putAdminReviewPricing: {
1998
- parameters: {
1999
- query?: never;
2000
- header?: never;
2001
- path: {
2002
- id: components["parameters"]["ReviewId"];
2003
- };
2004
- cookie?: never;
2005
- };
2006
- requestBody: {
2007
- content: {
2008
- "application/json": components["schemas"]["PricingUpdateBodyDto"];
2009
- };
2010
- };
2011
- responses: {
2012
- /** @description Saved */
2013
- 204: {
2014
- headers: {
2015
- [name: string]: unknown;
2016
- };
2017
- content?: never;
2018
- };
2019
- 401: components["responses"]["Unauthorized"];
2020
- 403: components["responses"]["Forbidden"];
2021
- };
2022
- };
2023
- putAdminReviewDeployment: {
2024
- parameters: {
2025
- query?: never;
2026
- header?: never;
2027
- path: {
2028
- id: components["parameters"]["ReviewId"];
2029
- };
2030
- cookie?: never;
2031
- };
2032
- requestBody: {
2033
- content: {
2034
- "application/json": components["schemas"]["DeploymentPlanDto"];
2035
- };
2036
- };
2037
- responses: {
2038
- /** @description Saved */
2039
- 204: {
2040
- headers: {
2041
- [name: string]: unknown;
1696
+ "application/json": {
1697
+ /** @example invalid_query */
1698
+ error: string;
1699
+ };
2042
1700
  };
2043
- content?: never;
2044
1701
  };
2045
1702
  401: components["responses"]["Unauthorized"];
2046
- 403: components["responses"]["Forbidden"];
2047
1703
  };
2048
1704
  };
2049
1705
  getCompanyProfile: {
package/src/index.ts CHANGED
@@ -397,9 +397,10 @@ export interface CycleTimeBreakdownDto {
397
397
  items: CycleTimeBreakdownItemDto[];
398
398
  }
399
399
 
400
- /** CTO Dashboard: response for GET /tenants/:tenantId/dashboard/productivity */
400
+ /** CTO Dashboard: response for GET /workspaces/:workspaceId/dashboard/productivity */
401
401
  export interface DashboardProductivityDto {
402
- tenantId: string;
402
+ workspaceId: string;
403
+ generatedAt?: string;
403
404
  windowStart: string;
404
405
  windowEnd: string;
405
406
  scope: "org" | "team" | "person";
@@ -407,8 +408,10 @@ export interface DashboardProductivityDto {
407
408
  meta?: { sourceWindow?: string; computedAt?: string };
408
409
  }
409
410
 
410
- /** CTO Dashboard: time-series for GET /tenants/:tenantId/dashboard/productivity/history */
411
+ /** CTO Dashboard: time-series for GET /workspaces/:workspaceId/dashboard/productivity/history */
411
412
  export interface DashboardProductivityHistoryDto {
413
+ workspaceId: string;
414
+ bucket: "day" | "week" | "month";
412
415
  buckets: {
413
416
  bucketStart: string;
414
417
  bucketEnd: string;