@thinkai/tai-api-contract 2.59.0 → 2.60.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.
- package/dist/generated/openapi.d.ts +366 -5
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +373 -2
- package/package.json +1 -1
- package/src/generated/openapi.ts +366 -5
package/openapi/openapi.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
3
|
title: ThinkAI API
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.60.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}/...`.
|
|
@@ -1314,6 +1314,8 @@ paths:
|
|
|
1314
1314
|
- $ref: "#/components/schemas/ClaudeSourcePatchDto"
|
|
1315
1315
|
- $ref: "#/components/schemas/ClaudeSourceDto"
|
|
1316
1316
|
- $ref: "#/components/schemas/NewRelicSourceDto"
|
|
1317
|
+
- $ref: "#/components/schemas/PrometheusSourceDto"
|
|
1318
|
+
- $ref: "#/components/schemas/GrafanaSourceDto"
|
|
1317
1319
|
- $ref: "#/components/schemas/TenantSourceEntryDto"
|
|
1318
1320
|
examples:
|
|
1319
1321
|
cursorAndJira:
|
|
@@ -1426,6 +1428,8 @@ paths:
|
|
|
1426
1428
|
- $ref: "#/components/schemas/ClaudeSourcePatchDto"
|
|
1427
1429
|
- $ref: "#/components/schemas/ClaudeSourceDto"
|
|
1428
1430
|
- $ref: "#/components/schemas/NewRelicSourceDto"
|
|
1431
|
+
- $ref: "#/components/schemas/PrometheusSourceDto"
|
|
1432
|
+
- $ref: "#/components/schemas/GrafanaSourceDto"
|
|
1429
1433
|
- $ref: "#/components/schemas/TenantSourceEntryDto"
|
|
1430
1434
|
examples:
|
|
1431
1435
|
cursorValid:
|
|
@@ -3881,6 +3885,144 @@ paths:
|
|
|
3881
3885
|
schema:
|
|
3882
3886
|
$ref: "#/components/schemas/NewRelicTriggerSyncResultDto"
|
|
3883
3887
|
|
|
3888
|
+
/workspaces/{workspaceId}/integrations/prometheus:
|
|
3889
|
+
get:
|
|
3890
|
+
tags: [Integrations]
|
|
3891
|
+
summary: Prometheus monitoring integration status
|
|
3892
|
+
operationId: getWorkspacePrometheusIntegrationStatus
|
|
3893
|
+
description: >
|
|
3894
|
+
Returns whether Prometheus/Alertmanager is connected and the last monitoring ingest sync outcome.
|
|
3895
|
+
parameters:
|
|
3896
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3897
|
+
responses:
|
|
3898
|
+
"200":
|
|
3899
|
+
description: Prometheus integration status
|
|
3900
|
+
content:
|
|
3901
|
+
application/json:
|
|
3902
|
+
schema:
|
|
3903
|
+
$ref: "#/components/schemas/PrometheusIntegrationStatusDto"
|
|
3904
|
+
"401":
|
|
3905
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3906
|
+
"403":
|
|
3907
|
+
$ref: "#/components/responses/Forbidden"
|
|
3908
|
+
"404":
|
|
3909
|
+
description: Workspace does not exist or malformed workspaceId
|
|
3910
|
+
content:
|
|
3911
|
+
application/json:
|
|
3912
|
+
schema:
|
|
3913
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3914
|
+
|
|
3915
|
+
/workspaces/{workspaceId}/integrations/prometheus/sync:
|
|
3916
|
+
post:
|
|
3917
|
+
tags: [Integrations]
|
|
3918
|
+
summary: Trigger Prometheus monitoring ingest now
|
|
3919
|
+
operationId: postWorkspacePrometheusIntegrationSync
|
|
3920
|
+
description: >
|
|
3921
|
+
Manually polls Alertmanager for firing/resolved alerts and refreshes Quality dashboard buckets.
|
|
3922
|
+
Requires editor role.
|
|
3923
|
+
security:
|
|
3924
|
+
- bearerAuth: []
|
|
3925
|
+
parameters:
|
|
3926
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3927
|
+
responses:
|
|
3928
|
+
"200":
|
|
3929
|
+
description: Sync completed
|
|
3930
|
+
content:
|
|
3931
|
+
application/json:
|
|
3932
|
+
schema:
|
|
3933
|
+
$ref: "#/components/schemas/PrometheusTriggerSyncResultDto"
|
|
3934
|
+
"401":
|
|
3935
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3936
|
+
"403":
|
|
3937
|
+
$ref: "#/components/responses/Forbidden"
|
|
3938
|
+
"404":
|
|
3939
|
+
description: Workspace does not exist or malformed workspaceId
|
|
3940
|
+
content:
|
|
3941
|
+
application/json:
|
|
3942
|
+
schema:
|
|
3943
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3944
|
+
"422":
|
|
3945
|
+
description: Prometheus is not connected on this workspace
|
|
3946
|
+
content:
|
|
3947
|
+
application/json:
|
|
3948
|
+
schema:
|
|
3949
|
+
$ref: "#/components/schemas/PrometheusTriggerSyncResultDto"
|
|
3950
|
+
"503":
|
|
3951
|
+
description: Sync failed
|
|
3952
|
+
content:
|
|
3953
|
+
application/json:
|
|
3954
|
+
schema:
|
|
3955
|
+
$ref: "#/components/schemas/PrometheusTriggerSyncResultDto"
|
|
3956
|
+
|
|
3957
|
+
/workspaces/{workspaceId}/integrations/grafana:
|
|
3958
|
+
get:
|
|
3959
|
+
tags: [Integrations]
|
|
3960
|
+
summary: Grafana monitoring integration status
|
|
3961
|
+
operationId: getWorkspaceGrafanaIntegrationStatus
|
|
3962
|
+
description: >
|
|
3963
|
+
Returns whether Grafana is connected and the last monitoring ingest sync outcome.
|
|
3964
|
+
parameters:
|
|
3965
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3966
|
+
responses:
|
|
3967
|
+
"200":
|
|
3968
|
+
description: Grafana integration status
|
|
3969
|
+
content:
|
|
3970
|
+
application/json:
|
|
3971
|
+
schema:
|
|
3972
|
+
$ref: "#/components/schemas/GrafanaIntegrationStatusDto"
|
|
3973
|
+
"401":
|
|
3974
|
+
$ref: "#/components/responses/Unauthorized"
|
|
3975
|
+
"403":
|
|
3976
|
+
$ref: "#/components/responses/Forbidden"
|
|
3977
|
+
"404":
|
|
3978
|
+
description: Workspace does not exist or malformed workspaceId
|
|
3979
|
+
content:
|
|
3980
|
+
application/json:
|
|
3981
|
+
schema:
|
|
3982
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
3983
|
+
|
|
3984
|
+
/workspaces/{workspaceId}/integrations/grafana/sync:
|
|
3985
|
+
post:
|
|
3986
|
+
tags: [Integrations]
|
|
3987
|
+
summary: Trigger Grafana monitoring ingest now
|
|
3988
|
+
operationId: postWorkspaceGrafanaIntegrationSync
|
|
3989
|
+
description: >
|
|
3990
|
+
Manually polls Grafana Unified Alerting and deploy annotations, persists canonical events,
|
|
3991
|
+
and refreshes Quality/DORA dashboard buckets. Requires editor role.
|
|
3992
|
+
security:
|
|
3993
|
+
- bearerAuth: []
|
|
3994
|
+
parameters:
|
|
3995
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
3996
|
+
responses:
|
|
3997
|
+
"200":
|
|
3998
|
+
description: Sync completed
|
|
3999
|
+
content:
|
|
4000
|
+
application/json:
|
|
4001
|
+
schema:
|
|
4002
|
+
$ref: "#/components/schemas/GrafanaTriggerSyncResultDto"
|
|
4003
|
+
"401":
|
|
4004
|
+
$ref: "#/components/responses/Unauthorized"
|
|
4005
|
+
"403":
|
|
4006
|
+
$ref: "#/components/responses/Forbidden"
|
|
4007
|
+
"404":
|
|
4008
|
+
description: Workspace does not exist or malformed workspaceId
|
|
4009
|
+
content:
|
|
4010
|
+
application/json:
|
|
4011
|
+
schema:
|
|
4012
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
4013
|
+
"422":
|
|
4014
|
+
description: Grafana is not connected on this workspace
|
|
4015
|
+
content:
|
|
4016
|
+
application/json:
|
|
4017
|
+
schema:
|
|
4018
|
+
$ref: "#/components/schemas/GrafanaTriggerSyncResultDto"
|
|
4019
|
+
"503":
|
|
4020
|
+
description: Sync failed
|
|
4021
|
+
content:
|
|
4022
|
+
application/json:
|
|
4023
|
+
schema:
|
|
4024
|
+
$ref: "#/components/schemas/GrafanaTriggerSyncResultDto"
|
|
4025
|
+
|
|
3884
4026
|
/integrations/github/webhook:
|
|
3885
4027
|
post:
|
|
3886
4028
|
tags: [Integrations]
|
|
@@ -7452,6 +7594,103 @@ components:
|
|
|
7452
7594
|
type: string
|
|
7453
7595
|
description: New Relic user name when known from the last successful verify.
|
|
7454
7596
|
|
|
7597
|
+
PrometheusSourceDto:
|
|
7598
|
+
type: object
|
|
7599
|
+
description: >
|
|
7600
|
+
Prometheus / Alertmanager monitoring source for workspace sources PUT and connection test.
|
|
7601
|
+
Provide at least one URL; authentication is optional.
|
|
7602
|
+
required: [type]
|
|
7603
|
+
additionalProperties: false
|
|
7604
|
+
properties:
|
|
7605
|
+
type:
|
|
7606
|
+
type: string
|
|
7607
|
+
enum: [prometheus]
|
|
7608
|
+
baseUrl:
|
|
7609
|
+
type: string
|
|
7610
|
+
minLength: 1
|
|
7611
|
+
description: Prometheus server URL (health check when Alertmanager is separate).
|
|
7612
|
+
alertmanagerUrl:
|
|
7613
|
+
type: string
|
|
7614
|
+
minLength: 1
|
|
7615
|
+
description: Alertmanager API base URL (preferred for alert ingest).
|
|
7616
|
+
token:
|
|
7617
|
+
type: string
|
|
7618
|
+
minLength: 1
|
|
7619
|
+
maxLength: 512
|
|
7620
|
+
description: Optional bearer token (write-only on PUT).
|
|
7621
|
+
username:
|
|
7622
|
+
type: string
|
|
7623
|
+
description: Optional HTTP basic auth username.
|
|
7624
|
+
password:
|
|
7625
|
+
type: string
|
|
7626
|
+
minLength: 1
|
|
7627
|
+
maxLength: 512
|
|
7628
|
+
description: Optional HTTP basic auth password (write-only on PUT).
|
|
7629
|
+
|
|
7630
|
+
PrometheusSourceConfigDto:
|
|
7631
|
+
type: object
|
|
7632
|
+
description: Redacted Prometheus source returned by GET workspace config.
|
|
7633
|
+
required: [type, hasToken, baseUrl, alertmanagerUrl, hasPassword]
|
|
7634
|
+
additionalProperties: false
|
|
7635
|
+
properties:
|
|
7636
|
+
type:
|
|
7637
|
+
type: string
|
|
7638
|
+
enum: [prometheus]
|
|
7639
|
+
hasToken:
|
|
7640
|
+
type: boolean
|
|
7641
|
+
hasPassword:
|
|
7642
|
+
type: boolean
|
|
7643
|
+
baseUrl:
|
|
7644
|
+
type: string
|
|
7645
|
+
alertmanagerUrl:
|
|
7646
|
+
type: string
|
|
7647
|
+
username:
|
|
7648
|
+
type: string
|
|
7649
|
+
description: Stored basic auth username when configured.
|
|
7650
|
+
|
|
7651
|
+
GrafanaSourceDto:
|
|
7652
|
+
type: object
|
|
7653
|
+
description: Grafana monitoring source for workspace sources PUT and connection test.
|
|
7654
|
+
required: [type, baseUrl, token]
|
|
7655
|
+
additionalProperties: false
|
|
7656
|
+
properties:
|
|
7657
|
+
type:
|
|
7658
|
+
type: string
|
|
7659
|
+
enum: [grafana]
|
|
7660
|
+
baseUrl:
|
|
7661
|
+
type: string
|
|
7662
|
+
minLength: 1
|
|
7663
|
+
description: Grafana stack URL (Cloud or self-hosted).
|
|
7664
|
+
token:
|
|
7665
|
+
type: string
|
|
7666
|
+
minLength: 1
|
|
7667
|
+
maxLength: 512
|
|
7668
|
+
description: Service account token (write-only on PUT).
|
|
7669
|
+
orgId:
|
|
7670
|
+
type: string
|
|
7671
|
+
description: Optional organization ID for multi-org stacks.
|
|
7672
|
+
orgName:
|
|
7673
|
+
type: string
|
|
7674
|
+
description: Optional org display name from a successful connection test.
|
|
7675
|
+
|
|
7676
|
+
GrafanaSourceConfigDto:
|
|
7677
|
+
type: object
|
|
7678
|
+
description: Redacted Grafana source returned by GET workspace config.
|
|
7679
|
+
required: [type, hasToken, baseUrl]
|
|
7680
|
+
additionalProperties: false
|
|
7681
|
+
properties:
|
|
7682
|
+
type:
|
|
7683
|
+
type: string
|
|
7684
|
+
enum: [grafana]
|
|
7685
|
+
hasToken:
|
|
7686
|
+
type: boolean
|
|
7687
|
+
baseUrl:
|
|
7688
|
+
type: string
|
|
7689
|
+
orgId:
|
|
7690
|
+
type: string
|
|
7691
|
+
orgName:
|
|
7692
|
+
type: string
|
|
7693
|
+
|
|
7455
7694
|
AgentExecutionProviderDto:
|
|
7456
7695
|
type: string
|
|
7457
7696
|
description: >
|
|
@@ -7476,6 +7715,8 @@ components:
|
|
|
7476
7715
|
- $ref: "#/components/schemas/CursorSourceConfigDto"
|
|
7477
7716
|
- $ref: "#/components/schemas/ClaudeSourceConfigDto"
|
|
7478
7717
|
- $ref: "#/components/schemas/NewRelicSourceConfigDto"
|
|
7718
|
+
- $ref: "#/components/schemas/PrometheusSourceConfigDto"
|
|
7719
|
+
- $ref: "#/components/schemas/GrafanaSourceConfigDto"
|
|
7479
7720
|
- $ref: "#/components/schemas/TenantSourceEntryDto"
|
|
7480
7721
|
orgChart:
|
|
7481
7722
|
nullable: true
|
|
@@ -7522,13 +7763,22 @@ components:
|
|
|
7522
7763
|
description: Error detail when `executionKeyValid` is false.
|
|
7523
7764
|
userName:
|
|
7524
7765
|
type: string
|
|
7525
|
-
description: Present for New Relic verify success — authenticated
|
|
7766
|
+
description: Present for New Relic or Grafana verify success — authenticated user name.
|
|
7526
7767
|
accountName:
|
|
7527
7768
|
type: string
|
|
7528
7769
|
description: Present for New Relic verify success — resolved account display name.
|
|
7529
7770
|
accountId:
|
|
7530
7771
|
type: string
|
|
7531
7772
|
description: Present for New Relic verify success — resolved account ID.
|
|
7773
|
+
orgName:
|
|
7774
|
+
type: string
|
|
7775
|
+
description: Present for Grafana verify success — resolved organization name.
|
|
7776
|
+
clusterName:
|
|
7777
|
+
type: string
|
|
7778
|
+
description: Present for Prometheus verify success — Alertmanager cluster name.
|
|
7779
|
+
version:
|
|
7780
|
+
type: string
|
|
7781
|
+
description: Present for Prometheus verify success — Alertmanager version when available.
|
|
7532
7782
|
|
|
7533
7783
|
CursorKeyUsageDto:
|
|
7534
7784
|
type: object
|
|
@@ -10547,6 +10797,115 @@ components:
|
|
|
10547
10797
|
type: string
|
|
10548
10798
|
description: Error message when status is error.
|
|
10549
10799
|
|
|
10800
|
+
PrometheusIntegrationStatusDto:
|
|
10801
|
+
type: object
|
|
10802
|
+
additionalProperties: false
|
|
10803
|
+
required: [connected, status]
|
|
10804
|
+
properties:
|
|
10805
|
+
connected:
|
|
10806
|
+
type: boolean
|
|
10807
|
+
description: "True when a type:prometheus workspace source is configured."
|
|
10808
|
+
lastSyncAt:
|
|
10809
|
+
type: string
|
|
10810
|
+
format: date-time
|
|
10811
|
+
nullable: true
|
|
10812
|
+
status:
|
|
10813
|
+
type: string
|
|
10814
|
+
enum: [ok, error, never]
|
|
10815
|
+
lastError:
|
|
10816
|
+
type: string
|
|
10817
|
+
nullable: true
|
|
10818
|
+
issueCount:
|
|
10819
|
+
type: integer
|
|
10820
|
+
nullable: true
|
|
10821
|
+
description: Alerts fetched on the last successful sync.
|
|
10822
|
+
deploymentCount:
|
|
10823
|
+
type: integer
|
|
10824
|
+
nullable: true
|
|
10825
|
+
eventCount:
|
|
10826
|
+
type: integer
|
|
10827
|
+
nullable: true
|
|
10828
|
+
|
|
10829
|
+
PrometheusTriggerSyncResultDto:
|
|
10830
|
+
type: object
|
|
10831
|
+
additionalProperties: false
|
|
10832
|
+
required: [status]
|
|
10833
|
+
properties:
|
|
10834
|
+
status:
|
|
10835
|
+
type: string
|
|
10836
|
+
enum: [ok, skipped, error]
|
|
10837
|
+
code:
|
|
10838
|
+
type: string
|
|
10839
|
+
reason:
|
|
10840
|
+
type: string
|
|
10841
|
+
issueCount:
|
|
10842
|
+
type: integer
|
|
10843
|
+
deploymentCount:
|
|
10844
|
+
type: integer
|
|
10845
|
+
eventCount:
|
|
10846
|
+
type: integer
|
|
10847
|
+
bucketsWritten:
|
|
10848
|
+
type: integer
|
|
10849
|
+
durationMs:
|
|
10850
|
+
type: integer
|
|
10851
|
+
error:
|
|
10852
|
+
type: string
|
|
10853
|
+
|
|
10854
|
+
GrafanaIntegrationStatusDto:
|
|
10855
|
+
type: object
|
|
10856
|
+
additionalProperties: false
|
|
10857
|
+
required: [connected, status]
|
|
10858
|
+
properties:
|
|
10859
|
+
connected:
|
|
10860
|
+
type: boolean
|
|
10861
|
+
description: "True when a type:grafana workspace source is configured."
|
|
10862
|
+
lastSyncAt:
|
|
10863
|
+
type: string
|
|
10864
|
+
format: date-time
|
|
10865
|
+
nullable: true
|
|
10866
|
+
status:
|
|
10867
|
+
type: string
|
|
10868
|
+
enum: [ok, error, never]
|
|
10869
|
+
lastError:
|
|
10870
|
+
type: string
|
|
10871
|
+
nullable: true
|
|
10872
|
+
issueCount:
|
|
10873
|
+
type: integer
|
|
10874
|
+
nullable: true
|
|
10875
|
+
description: Unified alerts fetched on the last successful sync.
|
|
10876
|
+
deploymentCount:
|
|
10877
|
+
type: integer
|
|
10878
|
+
nullable: true
|
|
10879
|
+
description: Deploy annotations ingested on the last successful sync.
|
|
10880
|
+
eventCount:
|
|
10881
|
+
type: integer
|
|
10882
|
+
nullable: true
|
|
10883
|
+
|
|
10884
|
+
GrafanaTriggerSyncResultDto:
|
|
10885
|
+
type: object
|
|
10886
|
+
additionalProperties: false
|
|
10887
|
+
required: [status]
|
|
10888
|
+
properties:
|
|
10889
|
+
status:
|
|
10890
|
+
type: string
|
|
10891
|
+
enum: [ok, skipped, error]
|
|
10892
|
+
code:
|
|
10893
|
+
type: string
|
|
10894
|
+
reason:
|
|
10895
|
+
type: string
|
|
10896
|
+
issueCount:
|
|
10897
|
+
type: integer
|
|
10898
|
+
deploymentCount:
|
|
10899
|
+
type: integer
|
|
10900
|
+
eventCount:
|
|
10901
|
+
type: integer
|
|
10902
|
+
bucketsWritten:
|
|
10903
|
+
type: integer
|
|
10904
|
+
durationMs:
|
|
10905
|
+
type: integer
|
|
10906
|
+
error:
|
|
10907
|
+
type: string
|
|
10908
|
+
|
|
10550
10909
|
GithubActionsEnableResponseDto:
|
|
10551
10910
|
type: object
|
|
10552
10911
|
additionalProperties: false
|
|
@@ -12991,6 +13350,18 @@ components:
|
|
|
12991
13350
|
- productivity.ingest.completed
|
|
12992
13351
|
- productivity.ingest.failed
|
|
12993
13352
|
- productivity.ingest.skipped
|
|
13353
|
+
- integrations.newrelic.added
|
|
13354
|
+
- integrations.newrelic.removed
|
|
13355
|
+
- integrations.newrelic.sync_completed
|
|
13356
|
+
- integrations.newrelic.sync_failed
|
|
13357
|
+
- integrations.prometheus.added
|
|
13358
|
+
- integrations.prometheus.removed
|
|
13359
|
+
- integrations.prometheus.sync_completed
|
|
13360
|
+
- integrations.prometheus.sync_failed
|
|
13361
|
+
- integrations.grafana.added
|
|
13362
|
+
- integrations.grafana.removed
|
|
13363
|
+
- integrations.grafana.sync_completed
|
|
13364
|
+
- integrations.grafana.sync_failed
|
|
12994
13365
|
|
|
12995
13366
|
ActivityLogActorDto:
|
|
12996
13367
|
type: object
|