@thinkai/tai-api-contract 2.221.0 → 2.223.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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.221.0
4
+ version: 2.223.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -11431,6 +11431,88 @@ paths:
11431
11431
  error: Code Intelligence is disabled for this workspace
11432
11432
  code: code_intelligence_disabled
11433
11433
 
11434
+ /workspaces/{workspaceId}/code-chat/ecg/sources:
11435
+ get:
11436
+ tags: [CodeChat]
11437
+ summary: List ECG connectors
11438
+ description: >
11439
+ Any workspace member. Returns active workspace integrations with ECG fields
11440
+ (`kind`, `readable`, `note`, `enabled`) for Settings → Connectors. Readable today:
11441
+ GitHub, Bitbucket Cloud, Confluence. GitHub Actions and Notion are Coming soon;
11442
+ other connected connectors stay listed as not supported yet.
11443
+ operationId: listEcgSources
11444
+ parameters:
11445
+ - $ref: "#/components/parameters/WorkspaceId"
11446
+ responses:
11447
+ "200":
11448
+ description: Connector list
11449
+ content:
11450
+ application/json:
11451
+ schema:
11452
+ $ref: "#/components/schemas/EcgSourceListDto"
11453
+ "401":
11454
+ $ref: "#/components/responses/Unauthorized"
11455
+ "403":
11456
+ $ref: "#/components/responses/Forbidden"
11457
+
11458
+ /workspaces/{workspaceId}/code-chat/ecg/sources/{integrationId}:
11459
+ patch:
11460
+ tags: [CodeChat]
11461
+ summary: Toggle ECG for a connector
11462
+ description: >
11463
+ Any workspace member. Sets `enabled` for one integration. Enabling a non-readable
11464
+ connector returns **400** `ecg_connector_not_readable`. Disabling is always allowed.
11465
+ operationId: patchEcgSource
11466
+ parameters:
11467
+ - $ref: "#/components/parameters/WorkspaceId"
11468
+ - name: integrationId
11469
+ in: path
11470
+ required: true
11471
+ schema:
11472
+ type: string
11473
+ format: uuid
11474
+ requestBody:
11475
+ required: true
11476
+ content:
11477
+ application/json:
11478
+ schema:
11479
+ $ref: "#/components/schemas/PatchEcgSourceBodyDto"
11480
+ responses:
11481
+ "200":
11482
+ description: Updated connector
11483
+ content:
11484
+ application/json:
11485
+ schema:
11486
+ $ref: "#/components/schemas/EcgSourceDto"
11487
+ "400":
11488
+ description: Invalid body or connector not readable for ECG
11489
+ content:
11490
+ application/json:
11491
+ schema:
11492
+ $ref: "#/components/schemas/ErrorMessageDto"
11493
+ examples:
11494
+ invalid_input:
11495
+ value:
11496
+ error: enabled must be true or false
11497
+ code: invalid_input
11498
+ not_readable:
11499
+ value:
11500
+ error: Coming soon
11501
+ code: ecg_connector_not_readable
11502
+ "401":
11503
+ $ref: "#/components/responses/Unauthorized"
11504
+ "403":
11505
+ $ref: "#/components/responses/Forbidden"
11506
+ "404":
11507
+ description: Integration not found
11508
+ content:
11509
+ application/json:
11510
+ schema:
11511
+ $ref: "#/components/schemas/ErrorMessageDto"
11512
+ example:
11513
+ error: Integration not found
11514
+ code: integration_not_found
11515
+
11434
11516
  /workspaces/{workspaceId}/code-chat/attachments:
11435
11517
  post:
11436
11518
  tags: [CodeChat]
@@ -17736,6 +17818,7 @@ components:
17736
17818
  - unknown_review_comments
17737
17819
  - no_linked_deploys
17738
17820
  - no_deployments
17821
+ - deploys_without_commit
17739
17822
  - six_month_window
17740
17823
  message: { type: string }
17741
17824
  percent: { type: number }
@@ -17955,7 +18038,7 @@ components:
17955
18038
  $ref: "#/components/schemas/TeamEfficiencyMetricDto"
17956
18039
  setup:
17957
18040
  type: object
17958
- required: [items, complete]
18041
+ required: [items, complete, deploySources]
17959
18042
  additionalProperties: false
17960
18043
  properties:
17961
18044
  items:
@@ -17963,6 +18046,14 @@ components:
17963
18046
  items:
17964
18047
  $ref: "#/components/schemas/TeamEfficiencySetupItemDto"
17965
18048
  complete: { type: boolean }
18049
+ deploySources:
18050
+ type: array
18051
+ description: >-
18052
+ Connected workspace sources that can report production deployments. A release
18053
+ reported by several of them counts once.
18054
+ items:
18055
+ type: string
18056
+ enum: [datadog, newrelic, sentry, github]
17966
18057
  generatedAt: { type: string, format: date-time }
17967
18058
 
17968
18059
  DevexSyncRequestDto:
@@ -18503,6 +18594,67 @@ components:
18503
18594
  sizeBytes: { type: integer, minimum: 1 }
18504
18595
  createdAt: { type: string, format: date-time }
18505
18596
 
18597
+ EcgSourceDto:
18598
+ type: object
18599
+ required:
18600
+ - id
18601
+ - category
18602
+ - provider
18603
+ - label
18604
+ - enabled
18605
+ - status
18606
+ - lastScanAt
18607
+ - kind
18608
+ - readable
18609
+ - note
18610
+ properties:
18611
+ id:
18612
+ type: string
18613
+ format: uuid
18614
+ category:
18615
+ type: string
18616
+ description: Workspace integration category (for example `vcs`, `ci`, `knowledge`).
18617
+ provider:
18618
+ type: string
18619
+ description: Integration provider key (for example `github`, `github_actions`).
18620
+ label:
18621
+ type: string
18622
+ enabled:
18623
+ type: boolean
18624
+ description: When false, ECG does not scan or cite this connector.
18625
+ status:
18626
+ type: string
18627
+ lastScanAt:
18628
+ type: string
18629
+ format: date-time
18630
+ nullable: true
18631
+ kind:
18632
+ type: string
18633
+ enum: [code, document, other]
18634
+ readable:
18635
+ type: boolean
18636
+ description: When false, Settings shows Coming soon / Not supported and PATCH enable is rejected.
18637
+ note:
18638
+ type: string
18639
+ nullable: true
18640
+ description: Human-readable Coming soon / not-supported note when `readable` is false.
18641
+
18642
+ EcgSourceListDto:
18643
+ type: object
18644
+ required: [items]
18645
+ properties:
18646
+ items:
18647
+ type: array
18648
+ items:
18649
+ $ref: "#/components/schemas/EcgSourceDto"
18650
+
18651
+ PatchEcgSourceBodyDto:
18652
+ type: object
18653
+ required: [enabled]
18654
+ properties:
18655
+ enabled:
18656
+ type: boolean
18657
+
18506
18658
  CodeChatReadinessDto:
18507
18659
  type: object
18508
18660
  required:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.221.0",
3
+ "version": "2.223.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4232,6 +4232,46 @@ export interface paths {
4232
4232
  patch?: never;
4233
4233
  trace?: never;
4234
4234
  };
4235
+ "/workspaces/{workspaceId}/code-chat/ecg/sources": {
4236
+ parameters: {
4237
+ query?: never;
4238
+ header?: never;
4239
+ path?: never;
4240
+ cookie?: never;
4241
+ };
4242
+ /**
4243
+ * List ECG connectors
4244
+ * @description Any workspace member. Returns active workspace integrations with ECG fields (`kind`, `readable`, `note`, `enabled`) for Settings → Connectors. Readable today: GitHub, Bitbucket Cloud, Confluence. GitHub Actions and Notion are Coming soon; other connected connectors stay listed as not supported yet.
4245
+ */
4246
+ get: operations["listEcgSources"];
4247
+ put?: never;
4248
+ post?: never;
4249
+ delete?: never;
4250
+ options?: never;
4251
+ head?: never;
4252
+ patch?: never;
4253
+ trace?: never;
4254
+ };
4255
+ "/workspaces/{workspaceId}/code-chat/ecg/sources/{integrationId}": {
4256
+ parameters: {
4257
+ query?: never;
4258
+ header?: never;
4259
+ path?: never;
4260
+ cookie?: never;
4261
+ };
4262
+ get?: never;
4263
+ put?: never;
4264
+ post?: never;
4265
+ delete?: never;
4266
+ options?: never;
4267
+ head?: never;
4268
+ /**
4269
+ * Toggle ECG for a connector
4270
+ * @description Any workspace member. Sets `enabled` for one integration. Enabling a non-readable connector returns **400** `ecg_connector_not_readable`. Disabling is always allowed.
4271
+ */
4272
+ patch: operations["patchEcgSource"];
4273
+ trace?: never;
4274
+ };
4235
4275
  "/workspaces/{workspaceId}/code-chat/attachments": {
4236
4276
  parameters: {
4237
4277
  query?: never;
@@ -6918,7 +6958,7 @@ export interface components {
6918
6958
  };
6919
6959
  TeamEfficiencyDataQualityDto: {
6920
6960
  /** @enum {string} */
6921
- code: "low_data" | "missing_start" | "batch_closed" | "no_roster" | "not_configured" | "no_bug_data" | "no_survey" | "unattributed_failures" | "excluded_incidents" | "unlinked_incidents" | "unknown_review_comments" | "no_linked_deploys" | "no_deployments" | "six_month_window";
6961
+ code: "low_data" | "missing_start" | "batch_closed" | "no_roster" | "not_configured" | "no_bug_data" | "no_survey" | "unattributed_failures" | "excluded_incidents" | "unlinked_incidents" | "unknown_review_comments" | "no_linked_deploys" | "no_deployments" | "deploys_without_commit" | "six_month_window";
6922
6962
  message: string;
6923
6963
  percent?: number;
6924
6964
  count?: number;
@@ -7039,6 +7079,8 @@ export interface components {
7039
7079
  setup: {
7040
7080
  items: components["schemas"]["TeamEfficiencySetupItemDto"][];
7041
7081
  complete: boolean;
7082
+ /** @description Connected workspace sources that can report production deployments. A release reported by several of them counts once. */
7083
+ deploySources: ("datadog" | "newrelic" | "sentry" | "github")[];
7042
7084
  };
7043
7085
  /** Format: date-time */
7044
7086
  generatedAt: string;
@@ -7298,6 +7340,32 @@ export interface components {
7298
7340
  /** Format: date-time */
7299
7341
  createdAt: string;
7300
7342
  };
7343
+ EcgSourceDto: {
7344
+ /** Format: uuid */
7345
+ id: string;
7346
+ /** @description Workspace integration category (for example `vcs`, `ci`, `knowledge`). */
7347
+ category: string;
7348
+ /** @description Integration provider key (for example `github`, `github_actions`). */
7349
+ provider: string;
7350
+ label: string;
7351
+ /** @description When false, ECG does not scan or cite this connector. */
7352
+ enabled: boolean;
7353
+ status: string;
7354
+ /** Format: date-time */
7355
+ lastScanAt: string | null;
7356
+ /** @enum {string} */
7357
+ kind: "code" | "document" | "other";
7358
+ /** @description When false, Settings shows Coming soon / Not supported and PATCH enable is rejected. */
7359
+ readable: boolean;
7360
+ /** @description Human-readable Coming soon / not-supported note when `readable` is false. */
7361
+ note: string | null;
7362
+ };
7363
+ EcgSourceListDto: {
7364
+ items: components["schemas"]["EcgSourceDto"][];
7365
+ };
7366
+ PatchEcgSourceBodyDto: {
7367
+ enabled: boolean;
7368
+ };
7301
7369
  CodeChatReadinessDto: {
7302
7370
  /** @enum {string} */
7303
7371
  status: "indexing" | "generating_agent_md" | "failed" | "ready";
@@ -14625,6 +14693,9 @@ export type PutCodeIntelligenceAgentMdDto = components['schemas']['PutCodeIntell
14625
14693
  export type CodeIntelligenceAgentMdDto = components['schemas']['CodeIntelligenceAgentMdDto'];
14626
14694
  export type CodeChatAttachmentLimitsDto = components['schemas']['CodeChatAttachmentLimitsDto'];
14627
14695
  export type CodeChatAttachmentMetaDto = components['schemas']['CodeChatAttachmentMetaDto'];
14696
+ export type EcgSourceDto = components['schemas']['EcgSourceDto'];
14697
+ export type EcgSourceListDto = components['schemas']['EcgSourceListDto'];
14698
+ export type PatchEcgSourceBodyDto = components['schemas']['PatchEcgSourceBodyDto'];
14628
14699
  export type CodeChatReadinessDto = components['schemas']['CodeChatReadinessDto'];
14629
14700
  export type CodeWikiGuidanceDto = components['schemas']['CodeWikiGuidanceDto'];
14630
14701
  export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
@@ -26836,6 +26907,83 @@ export interface operations {
26836
26907
  };
26837
26908
  };
26838
26909
  };
26910
+ listEcgSources: {
26911
+ parameters: {
26912
+ query?: never;
26913
+ header?: never;
26914
+ path: {
26915
+ workspaceId: components["parameters"]["WorkspaceId"];
26916
+ };
26917
+ cookie?: never;
26918
+ };
26919
+ requestBody?: never;
26920
+ responses: {
26921
+ /** @description Connector list */
26922
+ 200: {
26923
+ headers: {
26924
+ [name: string]: unknown;
26925
+ };
26926
+ content: {
26927
+ "application/json": components["schemas"]["EcgSourceListDto"];
26928
+ };
26929
+ };
26930
+ 401: components["responses"]["Unauthorized"];
26931
+ 403: components["responses"]["Forbidden"];
26932
+ };
26933
+ };
26934
+ patchEcgSource: {
26935
+ parameters: {
26936
+ query?: never;
26937
+ header?: never;
26938
+ path: {
26939
+ workspaceId: components["parameters"]["WorkspaceId"];
26940
+ integrationId: string;
26941
+ };
26942
+ cookie?: never;
26943
+ };
26944
+ requestBody: {
26945
+ content: {
26946
+ "application/json": components["schemas"]["PatchEcgSourceBodyDto"];
26947
+ };
26948
+ };
26949
+ responses: {
26950
+ /** @description Updated connector */
26951
+ 200: {
26952
+ headers: {
26953
+ [name: string]: unknown;
26954
+ };
26955
+ content: {
26956
+ "application/json": components["schemas"]["EcgSourceDto"];
26957
+ };
26958
+ };
26959
+ /** @description Invalid body or connector not readable for ECG */
26960
+ 400: {
26961
+ headers: {
26962
+ [name: string]: unknown;
26963
+ };
26964
+ content: {
26965
+ "application/json": components["schemas"]["ErrorMessageDto"];
26966
+ };
26967
+ };
26968
+ 401: components["responses"]["Unauthorized"];
26969
+ 403: components["responses"]["Forbidden"];
26970
+ /** @description Integration not found */
26971
+ 404: {
26972
+ headers: {
26973
+ [name: string]: unknown;
26974
+ };
26975
+ content: {
26976
+ /**
26977
+ * @example {
26978
+ * "error": "Integration not found",
26979
+ * "code": "integration_not_found"
26980
+ * }
26981
+ */
26982
+ "application/json": components["schemas"]["ErrorMessageDto"];
26983
+ };
26984
+ };
26985
+ };
26986
+ };
26839
26987
  postCodeChatAttachment: {
26840
26988
  parameters: {
26841
26989
  query?: never;