@thinkai/tai-api-contract 2.91.0 → 2.93.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 +161 -5
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +240 -2
- package/package.json +1 -1
- package/src/generated/openapi.ts +161 -5
- package/src/index.ts +34 -0
package/src/generated/openapi.ts
CHANGED
|
@@ -2609,6 +2609,26 @@ export interface paths {
|
|
|
2609
2609
|
patch?: never;
|
|
2610
2610
|
trace?: never;
|
|
2611
2611
|
};
|
|
2612
|
+
"/workspaces/{workspaceId}/code-intelligence": {
|
|
2613
|
+
parameters: {
|
|
2614
|
+
query?: never;
|
|
2615
|
+
header?: never;
|
|
2616
|
+
path?: never;
|
|
2617
|
+
cookie?: never;
|
|
2618
|
+
};
|
|
2619
|
+
get?: never;
|
|
2620
|
+
/**
|
|
2621
|
+
* Update Code Intelligence workspace settings
|
|
2622
|
+
* @description Admin-only. Enables/disables Code Intelligence for the workspace, chooses whether to reuse the Agent Execution key or a dedicated `code_intelligence` source credential, and optional Cursor/Claude model overrides. Does not store secrets — use `PUT .../sources` with `type: code_intelligence` and `executionToken` when key mode is `dedicated` (except `thinkai_platform_cursor`, which uses the platform key). Preview UI remains behind `?code_kn=true`.
|
|
2623
|
+
*/
|
|
2624
|
+
put: operations["putCodeIntelligenceSettings"];
|
|
2625
|
+
post?: never;
|
|
2626
|
+
delete?: never;
|
|
2627
|
+
options?: never;
|
|
2628
|
+
head?: never;
|
|
2629
|
+
patch?: never;
|
|
2630
|
+
trace?: never;
|
|
2631
|
+
};
|
|
2612
2632
|
"/workspaces/{workspaceId}/repo-eligibility": {
|
|
2613
2633
|
parameters: {
|
|
2614
2634
|
query?: never;
|
|
@@ -3872,6 +3892,20 @@ export interface components {
|
|
|
3872
3892
|
/** @description Masked preview of the stored insights key (prefix + last four characters). Never includes the full secret. */
|
|
3873
3893
|
insightsTokenHint?: string;
|
|
3874
3894
|
};
|
|
3895
|
+
/** @description Dedicated Engineering Context Graph execution credential for `PUT /workspaces/{workspaceId}/sources` when `codeIntelligenceKeyMode` is `dedicated`. Provide `executionToken` (Cursor user/service key or Anthropic `sk-ant-api…`). Admin keys are rejected. Reads from `GET /workspaces/{workspaceId}/config` redact the secret to `hasExecutionToken` via `CodeIntelligenceSourceConfigDto`. */
|
|
3896
|
+
CodeIntelligenceSourcePatchDto: {
|
|
3897
|
+
/** @enum {string} */
|
|
3898
|
+
type: "code_intelligence";
|
|
3899
|
+
/** @description Execution key for wiki/chat LLM calls in dedicated key mode. Whitespace and `env:` prefix are rejected. */
|
|
3900
|
+
executionToken?: string;
|
|
3901
|
+
};
|
|
3902
|
+
/** @description Redacted Engineering Context Graph source returned by `GET /workspaces/{workspaceId}/config`. Raw `executionToken` values are never returned. */
|
|
3903
|
+
CodeIntelligenceSourceConfigDto: {
|
|
3904
|
+
/** @enum {string} */
|
|
3905
|
+
type: "code_intelligence";
|
|
3906
|
+
/** @description Whether a dedicated ECG execution token is stored for this workspace. */
|
|
3907
|
+
hasExecutionToken: boolean;
|
|
3908
|
+
};
|
|
3875
3909
|
/** @description New Relic monitoring source for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. Requires a User API key and numeric account ID. */
|
|
3876
3910
|
NewRelicSourceDto: {
|
|
3877
3911
|
/** @enum {string} */
|
|
@@ -4013,8 +4047,17 @@ export interface components {
|
|
|
4013
4047
|
* @enum {string}
|
|
4014
4048
|
*/
|
|
4015
4049
|
AgentExecutionProviderDto: "thinkai_platform_cursor" | "cursor_user_api_key" | "claude_api_key";
|
|
4050
|
+
/** @description Partial update for Code Intelligence workspace settings (admin-only). */
|
|
4051
|
+
PutCodeIntelligenceSettingsDto: {
|
|
4052
|
+
enabled?: boolean;
|
|
4053
|
+
/** @enum {string} */
|
|
4054
|
+
keyMode?: "reuse_agent_execution" | "dedicated";
|
|
4055
|
+
provider?: components["schemas"]["AgentExecutionProviderDto"] | null;
|
|
4056
|
+
cursorModel?: string | null;
|
|
4057
|
+
claudeModel?: string | null;
|
|
4058
|
+
};
|
|
4016
4059
|
WorkspaceConfigDto: {
|
|
4017
|
-
sources: (components["schemas"]["CursorSourceConfigDto"] | components["schemas"]["ClaudeSourceConfigDto"] | components["schemas"]["NewRelicSourceConfigDto"] | components["schemas"]["PrometheusSourceConfigDto"] | components["schemas"]["GrafanaSourceConfigDto"] | components["schemas"]["SonarQubeSourceConfigDto"] | components["schemas"]["PagerDutySourceConfigDto"] | components["schemas"]["TenantSourceEntryDto"])[];
|
|
4060
|
+
sources: (components["schemas"]["CursorSourceConfigDto"] | components["schemas"]["ClaudeSourceConfigDto"] | components["schemas"]["CodeIntelligenceSourceConfigDto"] | components["schemas"]["NewRelicSourceConfigDto"] | components["schemas"]["PrometheusSourceConfigDto"] | components["schemas"]["GrafanaSourceConfigDto"] | components["schemas"]["SonarQubeSourceConfigDto"] | components["schemas"]["PagerDutySourceConfigDto"] | components["schemas"]["TenantSourceEntryDto"])[];
|
|
4018
4061
|
orgChart?: components["schemas"]["ScoringOrgChartDto"] | null;
|
|
4019
4062
|
/** @enum {string|null} */
|
|
4020
4063
|
region?: "us" | "eu" | "me" | null;
|
|
@@ -4025,6 +4068,21 @@ export interface components {
|
|
|
4025
4068
|
cursorPlatformKeyEnabled?: boolean;
|
|
4026
4069
|
/** @description The single active agent execution account for this workspace's readiness scanner and fix processor. Defaults to `cursor_user_api_key`. Change via `PUT /workspaces/{workspaceId}/agent-execution-provider`. */
|
|
4027
4070
|
agentExecutionProvider?: components["schemas"]["AgentExecutionProviderDto"];
|
|
4071
|
+
/** @description When false (default), Code Intelligence write APIs (`/code-chat/*` index/sync/wiki/messages) return 403. Preview UI still requires `?code_kn=true`. Change via `PUT /workspaces/{workspaceId}/code-intelligence`. */
|
|
4072
|
+
codeIntelligenceEnabled?: boolean;
|
|
4073
|
+
/**
|
|
4074
|
+
* @description `reuse_agent_execution` uses the workspace Agent Execution key. `dedicated` uses the `code_intelligence` source token (or platform Cursor when provider is `thinkai_platform_cursor`).
|
|
4075
|
+
* @enum {string}
|
|
4076
|
+
*/
|
|
4077
|
+
codeIntelligenceKeyMode?: "reuse_agent_execution" | "dedicated";
|
|
4078
|
+
/** @description Active when `codeIntelligenceKeyMode` is `dedicated`. Null when reusing Agent Execution. */
|
|
4079
|
+
codeIntelligenceProvider?: components["schemas"]["AgentExecutionProviderDto"] | null;
|
|
4080
|
+
/** @description Optional Cursor model override for Code Intelligence (null/empty → env default). */
|
|
4081
|
+
codeIntelligenceCursorModel?: string | null;
|
|
4082
|
+
/** @description Optional Claude model override for Code Intelligence (null/empty → env default). */
|
|
4083
|
+
codeIntelligenceClaudeModel?: string | null;
|
|
4084
|
+
/** @description True when a dedicated `code_intelligence` source has a stored executionToken. */
|
|
4085
|
+
hasCodeIntelligenceExecutionToken?: boolean;
|
|
4028
4086
|
};
|
|
4029
4087
|
TestConnectionResponseDto: {
|
|
4030
4088
|
success: boolean;
|
|
@@ -4172,6 +4230,10 @@ export interface components {
|
|
|
4172
4230
|
*/
|
|
4173
4231
|
date: string;
|
|
4174
4232
|
mergedPrCount: number;
|
|
4233
|
+
/** @description Sum of ship-weight scores for PRs merged on this day. */
|
|
4234
|
+
shipWeightSum?: number;
|
|
4235
|
+
/** @description GitHub merged PRs on this day still awaiting ship-weight scoring. */
|
|
4236
|
+
shipWeightPendingCount?: number;
|
|
4175
4237
|
/** @description GitHub Actions CI build failures on this day from `ciFailureRuns` ledger when CI ingest is enabled. */
|
|
4176
4238
|
ciFailuresCount?: number;
|
|
4177
4239
|
/** @description Mean hours from PR creation to first review for PRs merged on this day. */
|
|
@@ -4191,6 +4253,10 @@ export interface components {
|
|
|
4191
4253
|
/** @description Short label for the week column (MM/DD), aligned with Measure charts. */
|
|
4192
4254
|
weekLabel?: string;
|
|
4193
4255
|
mergedPrCount: number;
|
|
4256
|
+
/** @description Sum of ship-weight scores for PRs merged in this week bucket. */
|
|
4257
|
+
shipWeightSum?: number;
|
|
4258
|
+
/** @description GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
|
|
4259
|
+
shipWeightPendingCount?: number;
|
|
4194
4260
|
/** @description DORA change failure rate (deployments/incidents), not CI build failures. */
|
|
4195
4261
|
failRatePercent: number;
|
|
4196
4262
|
/** @description GitHub Actions / Checks CI build failure rate for the week bucket (failed runs / (failed + passed) * 100). Zero when GitHub Actions CI is disabled. */
|
|
@@ -4251,6 +4317,10 @@ export interface components {
|
|
|
4251
4317
|
/** @description Short label for the week column (MM/DD), aligned with Measure charts. */
|
|
4252
4318
|
weekLabel?: string;
|
|
4253
4319
|
mergedPrCount: number;
|
|
4320
|
+
/** @description Sum of ship-weight scores for PRs merged in this week bucket. */
|
|
4321
|
+
shipWeightSum?: number;
|
|
4322
|
+
/** @description GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
|
|
4323
|
+
shipWeightPendingCount?: number;
|
|
4254
4324
|
};
|
|
4255
4325
|
ProductivityInsightsMergedPrContributorRowDto: {
|
|
4256
4326
|
/** @description Canonical person identifier (matches org chart person_id / employeeId). */
|
|
@@ -4300,6 +4370,8 @@ export interface components {
|
|
|
4300
4370
|
subtitle?: string;
|
|
4301
4371
|
/** @description Average weekly merged PR count over the selected range. */
|
|
4302
4372
|
periodAvgMergedPrs: number;
|
|
4373
|
+
/** @description Average weekly ship-weight sum over the selected range. */
|
|
4374
|
+
periodAvgShipWeight?: number;
|
|
4303
4375
|
/** @description Average change failure rate over the range when available. */
|
|
4304
4376
|
avgFailRatePercent?: number;
|
|
4305
4377
|
/** @description Average GitHub Actions CI build failure rate over the range when CI ingest is enabled. */
|
|
@@ -4307,7 +4379,13 @@ export interface components {
|
|
|
4307
4379
|
};
|
|
4308
4380
|
ProductivityInsightsTeamSummaryDto: {
|
|
4309
4381
|
totalMergedPrs: number;
|
|
4382
|
+
/** @description Sum of ship-weight scores for merged PRs over the selected range. */
|
|
4383
|
+
totalShipWeight?: number;
|
|
4384
|
+
/** @description True when merged GitHub PRs in scope still lack ship-weight scores (ingest backfill in progress). */
|
|
4385
|
+
shipWeightBackfillPending?: boolean;
|
|
4310
4386
|
avgMergedPrsPerWeek: number;
|
|
4387
|
+
/** @description Mean weekly ship-weight sum over the selected range. */
|
|
4388
|
+
avgShipWeightPerWeek?: number;
|
|
4311
4389
|
/** @description Average DORA change failure rate over the range when available. */
|
|
4312
4390
|
avgFailRatePercent: number;
|
|
4313
4391
|
/** @description Average GitHub Actions CI build failure rate over the range when CI ingest is enabled. */
|
|
@@ -4377,6 +4455,10 @@ export interface components {
|
|
|
4377
4455
|
date: string;
|
|
4378
4456
|
dayIndex: number;
|
|
4379
4457
|
mergedPrCount: number;
|
|
4458
|
+
/** @description Sum of ship-weight scores for PRs merged on this day. */
|
|
4459
|
+
shipWeightSum?: number;
|
|
4460
|
+
/** @description GitHub merged PRs on this day still awaiting ship-weight scoring. */
|
|
4461
|
+
shipWeightPendingCount?: number;
|
|
4380
4462
|
mergedPrs: string[];
|
|
4381
4463
|
absent: boolean;
|
|
4382
4464
|
absenceType?: string;
|
|
@@ -4413,14 +4495,24 @@ export interface components {
|
|
|
4413
4495
|
};
|
|
4414
4496
|
ProductivityInsightsContributorActivitySummaryDto: {
|
|
4415
4497
|
totalMergedPrs: number;
|
|
4498
|
+
/** @description Sum of ship-weight scores for merged PRs over the selected range. */
|
|
4499
|
+
totalShipWeight?: number;
|
|
4500
|
+
/** @description True when merged GitHub PRs in scope still lack ship-weight scores (ingest backfill in progress). */
|
|
4501
|
+
shipWeightBackfillPending?: boolean;
|
|
4416
4502
|
avgMergedPrsPerWeek: number;
|
|
4503
|
+
/** @description Mean weekly ship-weight sum over the selected range. */
|
|
4504
|
+
avgShipWeightPerWeek?: number;
|
|
4417
4505
|
totalAbsenceDays: number;
|
|
4418
4506
|
/** @description CI failure rate (%) over the selected range when GitHub Actions CI ingest is enabled (failures / runs × 100); otherwise average DORA change failure rate when available. */
|
|
4419
4507
|
avgFailRate: number;
|
|
4420
4508
|
/** @description Average GitHub Actions CI build failure rate over the range when CI ingest is enabled. */
|
|
4421
4509
|
avgCiFailRate?: number;
|
|
4422
4510
|
mergedPrDelta: number;
|
|
4511
|
+
/** @description Change in total ship-weight sum vs the prior comparison window. */
|
|
4512
|
+
shipWeightDelta?: number;
|
|
4423
4513
|
avgMergedPrsPerWeekDelta: number;
|
|
4514
|
+
/** @description Change in mean weekly ship-weight sum vs the prior comparison window. */
|
|
4515
|
+
avgShipWeightPerWeekDelta?: number;
|
|
4424
4516
|
totalAbsenceDaysDelta: number;
|
|
4425
4517
|
avgFailRateDelta: number;
|
|
4426
4518
|
/** @description Change in average CI build failure rate vs the prior comparison window. */
|
|
@@ -4467,6 +4559,8 @@ export interface components {
|
|
|
4467
4559
|
subtitle?: string;
|
|
4468
4560
|
/** @description Mean weekly merged PR count across the selected range. */
|
|
4469
4561
|
periodAvgMergedPrs: number;
|
|
4562
|
+
/** @description Mean weekly ship-weight sum across the selected range. */
|
|
4563
|
+
periodAvgShipWeight?: number;
|
|
4470
4564
|
/** @description Mean weekly change-failure rate when available. */
|
|
4471
4565
|
avgFailRatePercent?: number;
|
|
4472
4566
|
/** @description Mean weekly GitHub Actions CI build failure rate when CI ingest is enabled. */
|
|
@@ -4826,6 +4920,10 @@ export interface components {
|
|
|
4826
4920
|
date: string;
|
|
4827
4921
|
dayLabel?: string;
|
|
4828
4922
|
mergedPrCount: number;
|
|
4923
|
+
/** @description Sum of ship-weight scores for PRs merged on this day. */
|
|
4924
|
+
shipWeightSum?: number;
|
|
4925
|
+
/** @description GitHub merged PRs on this day still awaiting ship-weight scoring. */
|
|
4926
|
+
shipWeightPendingCount?: number;
|
|
4829
4927
|
tokenCount: number;
|
|
4830
4928
|
};
|
|
4831
4929
|
AiUsageSpendRoiProductivitySignalWeekDto: {
|
|
@@ -4836,6 +4934,10 @@ export interface components {
|
|
|
4836
4934
|
weekLabel?: string;
|
|
4837
4935
|
/** @description Estimated merged PR count in the bucket from dashboard velocity metrics. */
|
|
4838
4936
|
mergedPrCount: number;
|
|
4937
|
+
/** @description Sum of ship-weight scores for PRs merged in this week bucket. */
|
|
4938
|
+
shipWeightSum?: number;
|
|
4939
|
+
/** @description GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
|
|
4940
|
+
shipWeightPendingCount?: number;
|
|
4839
4941
|
/** @description Total AI-tool tokens consumed in the bucket. */
|
|
4840
4942
|
tokenCount: number;
|
|
4841
4943
|
};
|
|
@@ -4858,6 +4960,8 @@ export interface components {
|
|
|
4858
4960
|
/** Format: date-time */
|
|
4859
4961
|
generatedAt: string;
|
|
4860
4962
|
totalMergedPrs: number;
|
|
4963
|
+
/** @description Sum of ship-weight scores for merged PRs over the selected range. */
|
|
4964
|
+
totalShipWeight?: number;
|
|
4861
4965
|
totalSpendCents: number;
|
|
4862
4966
|
activeUsers: number;
|
|
4863
4967
|
totalEngineers: number;
|
|
@@ -6729,6 +6833,10 @@ export interface components {
|
|
|
6729
6833
|
bucketEnd: string;
|
|
6730
6834
|
weekLabel: string;
|
|
6731
6835
|
mergedPrCount: number;
|
|
6836
|
+
/** @description Sum of ship-weight scores for PRs merged in this week bucket. */
|
|
6837
|
+
shipWeightSum?: number;
|
|
6838
|
+
/** @description GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
|
|
6839
|
+
shipWeightPendingCount?: number;
|
|
6732
6840
|
tokenCount: number;
|
|
6733
6841
|
};
|
|
6734
6842
|
YourAiJourneyAiSpendDto: {
|
|
@@ -6806,7 +6914,7 @@ export interface components {
|
|
|
6806
6914
|
* @description Type of workspace lifecycle event.
|
|
6807
6915
|
* @enum {string}
|
|
6808
6916
|
*/
|
|
6809
|
-
ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.repo_eligibility.languages_refresh_requested" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.invite_accepted" | "member.invite_rejected" | "member.role_changed" | "member.removed" | "hris.personio.sync_started" | "hris.personio.sync_completed" | "hris.personio.sync_failed" | "hris.zenhr.sync_started" | "hris.zenhr.sync_completed" | "hris.zenhr.sync_failed" | "hris.zelt.sync_started" | "hris.zelt.sync_completed" | "hris.zelt.sync_failed" | "hris.sync_started" | "hris.sync_completed" | "hris.sync_failed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "integrations.claude.analytics_key.added" | "integrations.claude.analytics_key.updated" | "integrations.claude.analytics_key.removed" | "readiness.scan_precheck_failed" | "productivity.ingest.completed" | "productivity.ingest.failed" | "productivity.ingest.skipped" | "productivity.ingest.repo_skipped" | "productivity.ingest.coverage_gap_detected" | "integrations.newrelic.added" | "integrations.newrelic.removed" | "integrations.newrelic.sync_completed" | "integrations.newrelic.sync_failed" | "integrations.prometheus.added" | "integrations.prometheus.removed" | "integrations.prometheus.sync_completed" | "integrations.prometheus.sync_failed" | "integrations.grafana.added" | "integrations.grafana.removed" | "integrations.grafana.sync_completed" | "integrations.grafana.sync_failed" | "integrations.zelt.added" | "integrations.zelt.removed";
|
|
6917
|
+
ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.repo_eligibility.languages_refresh_requested" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.invite_accepted" | "member.invite_rejected" | "member.role_changed" | "member.removed" | "hris.personio.sync_started" | "hris.personio.sync_completed" | "hris.personio.sync_failed" | "hris.zenhr.sync_started" | "hris.zenhr.sync_completed" | "hris.zenhr.sync_failed" | "hris.zelt.sync_started" | "hris.zelt.sync_completed" | "hris.zelt.sync_failed" | "hris.sync_started" | "hris.sync_completed" | "hris.sync_failed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "integrations.claude.analytics_key.added" | "integrations.claude.analytics_key.updated" | "integrations.claude.analytics_key.removed" | "integrations.code_intelligence.settings_changed" | "integrations.code_intelligence.execution_key.added" | "integrations.code_intelligence.execution_key.updated" | "integrations.code_intelligence.execution_key.removed" | "integrations.code_intelligence.execution_key.check_failed" | "readiness.scan_precheck_failed" | "productivity.ingest.completed" | "productivity.ingest.failed" | "productivity.ingest.skipped" | "productivity.ingest.repo_skipped" | "productivity.ingest.coverage_gap_detected" | "integrations.newrelic.added" | "integrations.newrelic.removed" | "integrations.newrelic.sync_completed" | "integrations.newrelic.sync_failed" | "integrations.prometheus.added" | "integrations.prometheus.removed" | "integrations.prometheus.sync_completed" | "integrations.prometheus.sync_failed" | "integrations.grafana.added" | "integrations.grafana.removed" | "integrations.grafana.sync_completed" | "integrations.grafana.sync_failed" | "integrations.zelt.added" | "integrations.zelt.removed";
|
|
6810
6918
|
ActivityLogActorDto: {
|
|
6811
6919
|
/** Format: uuid */
|
|
6812
6920
|
userId: string;
|
|
@@ -8051,6 +8159,8 @@ export type CursorSourceConfigDto = components['schemas']['CursorSourceConfigDto
|
|
|
8051
8159
|
export type ClaudeSourceDto = components['schemas']['ClaudeSourceDto'];
|
|
8052
8160
|
export type ClaudeSourcePatchDto = components['schemas']['ClaudeSourcePatchDto'];
|
|
8053
8161
|
export type ClaudeSourceConfigDto = components['schemas']['ClaudeSourceConfigDto'];
|
|
8162
|
+
export type CodeIntelligenceSourcePatchDto = components['schemas']['CodeIntelligenceSourcePatchDto'];
|
|
8163
|
+
export type CodeIntelligenceSourceConfigDto = components['schemas']['CodeIntelligenceSourceConfigDto'];
|
|
8054
8164
|
export type NewRelicSourceDto = components['schemas']['NewRelicSourceDto'];
|
|
8055
8165
|
export type NewRelicSourceConfigDto = components['schemas']['NewRelicSourceConfigDto'];
|
|
8056
8166
|
export type PrometheusSourceDto = components['schemas']['PrometheusSourceDto'];
|
|
@@ -8062,6 +8172,7 @@ export type SonarQubeSourceConfigDto = components['schemas']['SonarQubeSourceCon
|
|
|
8062
8172
|
export type PagerDutySourceDto = components['schemas']['PagerDutySourceDto'];
|
|
8063
8173
|
export type PagerDutySourceConfigDto = components['schemas']['PagerDutySourceConfigDto'];
|
|
8064
8174
|
export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
|
|
8175
|
+
export type PutCodeIntelligenceSettingsDto = components['schemas']['PutCodeIntelligenceSettingsDto'];
|
|
8065
8176
|
export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
|
|
8066
8177
|
export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
|
|
8067
8178
|
export type CursorKeyUsageDto = components['schemas']['CursorKeyUsageDto'];
|
|
@@ -10026,7 +10137,7 @@ export interface operations {
|
|
|
10026
10137
|
requestBody: {
|
|
10027
10138
|
content: {
|
|
10028
10139
|
"application/json": {
|
|
10029
|
-
sources: (components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["TenantSourceEntryDto"])[];
|
|
10140
|
+
sources: (components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["TenantSourceEntryDto"])[];
|
|
10030
10141
|
};
|
|
10031
10142
|
};
|
|
10032
10143
|
};
|
|
@@ -10080,7 +10191,7 @@ export interface operations {
|
|
|
10080
10191
|
};
|
|
10081
10192
|
requestBody: {
|
|
10082
10193
|
content: {
|
|
10083
|
-
"application/json": components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["TenantSourceEntryDto"];
|
|
10194
|
+
"application/json": components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["TenantSourceEntryDto"];
|
|
10084
10195
|
};
|
|
10085
10196
|
};
|
|
10086
10197
|
responses: {
|
|
@@ -15299,7 +15410,52 @@ export interface operations {
|
|
|
15299
15410
|
[name: string]: unknown;
|
|
15300
15411
|
};
|
|
15301
15412
|
content: {
|
|
15302
|
-
"application/json":
|
|
15413
|
+
"application/json": {
|
|
15414
|
+
/** @example invalid_body */
|
|
15415
|
+
error: string;
|
|
15416
|
+
};
|
|
15417
|
+
};
|
|
15418
|
+
};
|
|
15419
|
+
401: components["responses"]["Unauthorized"];
|
|
15420
|
+
403: components["responses"]["Forbidden"];
|
|
15421
|
+
};
|
|
15422
|
+
};
|
|
15423
|
+
putCodeIntelligenceSettings: {
|
|
15424
|
+
parameters: {
|
|
15425
|
+
query?: never;
|
|
15426
|
+
header?: never;
|
|
15427
|
+
path: {
|
|
15428
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
15429
|
+
};
|
|
15430
|
+
cookie?: never;
|
|
15431
|
+
};
|
|
15432
|
+
requestBody: {
|
|
15433
|
+
content: {
|
|
15434
|
+
"application/json": components["schemas"]["PutCodeIntelligenceSettingsDto"];
|
|
15435
|
+
};
|
|
15436
|
+
};
|
|
15437
|
+
responses: {
|
|
15438
|
+
/** @description Settings updated */
|
|
15439
|
+
200: {
|
|
15440
|
+
headers: {
|
|
15441
|
+
[name: string]: unknown;
|
|
15442
|
+
};
|
|
15443
|
+
content: {
|
|
15444
|
+
"application/json": {
|
|
15445
|
+
ok: boolean;
|
|
15446
|
+
};
|
|
15447
|
+
};
|
|
15448
|
+
};
|
|
15449
|
+
/** @description Invalid request body */
|
|
15450
|
+
400: {
|
|
15451
|
+
headers: {
|
|
15452
|
+
[name: string]: unknown;
|
|
15453
|
+
};
|
|
15454
|
+
content: {
|
|
15455
|
+
"application/json": {
|
|
15456
|
+
/** @example invalid_body */
|
|
15457
|
+
error: string;
|
|
15458
|
+
};
|
|
15303
15459
|
};
|
|
15304
15460
|
};
|
|
15305
15461
|
401: components["responses"]["Unauthorized"];
|
package/src/index.ts
CHANGED
|
@@ -291,6 +291,10 @@ export interface DashboardProductivityMetricsDto {
|
|
|
291
291
|
prsPerDeveloperPerWeek?: number;
|
|
292
292
|
/** Raw merged PR count in the metrics window (all scopes). */
|
|
293
293
|
mergedPrCount?: number;
|
|
294
|
+
/** Sum of ship-weight scores for PRs merged in the metrics window. */
|
|
295
|
+
shipWeightSum?: number;
|
|
296
|
+
/** Alias of shipWeightSum for single-window productivity cards. */
|
|
297
|
+
totalShipWeight?: number;
|
|
294
298
|
avgPrMergeTimeHours?: number;
|
|
295
299
|
/** Per-PR summaries for contributor drilldown (stored during productivity ingest). */
|
|
296
300
|
mergedPullRequests?: {
|
|
@@ -486,6 +490,10 @@ export type ProductivityInsightsGranularity = "day" | "week";
|
|
|
486
490
|
export interface ProductivityInsightsDailyBucketDto {
|
|
487
491
|
date: string;
|
|
488
492
|
mergedPrCount: number;
|
|
493
|
+
/** Sum of ship-weight scores for PRs merged on this day. */
|
|
494
|
+
shipWeightSum?: number;
|
|
495
|
+
/** GitHub merged PRs on this day still awaiting ship-weight scoring. */
|
|
496
|
+
shipWeightPendingCount?: number;
|
|
489
497
|
ciFailuresCount?: number;
|
|
490
498
|
/** Mean hours from PR creation to first review for PRs merged on this day. */
|
|
491
499
|
avgReviewWaitHours?: number;
|
|
@@ -506,6 +514,10 @@ export interface ProductivityInsightsAggregatedTeamWeekDto {
|
|
|
506
514
|
bucketEnd: string;
|
|
507
515
|
weekLabel?: string;
|
|
508
516
|
mergedPrCount: number;
|
|
517
|
+
/** Sum of ship-weight scores for PRs merged in this week bucket. */
|
|
518
|
+
shipWeightSum?: number;
|
|
519
|
+
/** GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
|
|
520
|
+
shipWeightPendingCount?: number;
|
|
509
521
|
failRatePercent: number;
|
|
510
522
|
/** GitHub Actions CI build failure rate (failed / (failed + passed) * 100). */
|
|
511
523
|
ciFailRatePercent?: number;
|
|
@@ -551,6 +563,10 @@ export interface ProductivityInsightsMergedPrTrendWeekDto {
|
|
|
551
563
|
bucketEnd: string;
|
|
552
564
|
weekLabel?: string;
|
|
553
565
|
mergedPrCount: number;
|
|
566
|
+
/** Sum of ship-weight scores for PRs merged in this week bucket. */
|
|
567
|
+
shipWeightSum?: number;
|
|
568
|
+
/** GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
|
|
569
|
+
shipWeightPendingCount?: number;
|
|
554
570
|
}
|
|
555
571
|
|
|
556
572
|
/** Per-contributor merged PR weekly series. */
|
|
@@ -591,6 +607,8 @@ export interface ProductivityInsightsTeamLeaderItemDto {
|
|
|
591
607
|
teamName: string;
|
|
592
608
|
subtitle?: string;
|
|
593
609
|
periodAvgMergedPrs: number;
|
|
610
|
+
/** Period average ship-weight sum per week. */
|
|
611
|
+
periodAvgShipWeight?: number;
|
|
594
612
|
avgFailRatePercent?: number;
|
|
595
613
|
avgCiFailRatePercent?: number;
|
|
596
614
|
}
|
|
@@ -598,7 +616,11 @@ export interface ProductivityInsightsTeamLeaderItemDto {
|
|
|
598
616
|
/** Period summary for a single-team drilldown. */
|
|
599
617
|
export interface ProductivityInsightsTeamSummaryDto {
|
|
600
618
|
totalMergedPrs: number;
|
|
619
|
+
totalShipWeight?: number;
|
|
620
|
+
/** True when merged GitHub PRs in scope still lack ship-weight scores. */
|
|
621
|
+
shipWeightBackfillPending?: boolean;
|
|
601
622
|
avgMergedPrsPerWeek: number;
|
|
623
|
+
avgShipWeightPerWeek?: number;
|
|
602
624
|
avgFailRatePercent: number;
|
|
603
625
|
/** Average GitHub Actions CI build failure rate over the range when CI ingest is enabled. */
|
|
604
626
|
avgCiFailRatePercent?: number;
|
|
@@ -681,6 +703,10 @@ export interface ProductivityInsightsContributorActivityDayDto {
|
|
|
681
703
|
date: string;
|
|
682
704
|
dayIndex: number;
|
|
683
705
|
mergedPrCount: number;
|
|
706
|
+
/** Sum of ship-weight scores for PRs merged on this day. */
|
|
707
|
+
shipWeightSum?: number;
|
|
708
|
+
/** GitHub merged PRs on this day still awaiting ship-weight scoring. */
|
|
709
|
+
shipWeightPendingCount?: number;
|
|
684
710
|
mergedPrs: string[];
|
|
685
711
|
/** Optional PR links when ingest stored URLs. */
|
|
686
712
|
mergedPrItems?: ProductivityInsightsContributorMergedPrItemDto[];
|
|
@@ -703,14 +729,20 @@ export interface ProductivityInsightsContributorActivityWeekDto {
|
|
|
703
729
|
/** Summary stats for contributor activity drilldown. */
|
|
704
730
|
export interface ProductivityInsightsContributorActivitySummaryDto {
|
|
705
731
|
totalMergedPrs: number;
|
|
732
|
+
totalShipWeight?: number;
|
|
733
|
+
/** True when merged GitHub PRs in scope still lack ship-weight scores. */
|
|
734
|
+
shipWeightBackfillPending?: boolean;
|
|
706
735
|
avgMergedPrsPerWeek: number;
|
|
736
|
+
avgShipWeightPerWeek?: number;
|
|
707
737
|
totalAbsenceDays: number;
|
|
708
738
|
/** CI failure rate (%) over the range when GitHub Actions CI ingest is enabled; otherwise DORA change failure rate when available. */
|
|
709
739
|
avgFailRate: number;
|
|
710
740
|
/** Average GitHub Actions CI build failure rate over the range when CI ingest is enabled. */
|
|
711
741
|
avgCiFailRate?: number;
|
|
712
742
|
mergedPrDelta: number;
|
|
743
|
+
shipWeightDelta?: number;
|
|
713
744
|
avgMergedPrsPerWeekDelta: number;
|
|
745
|
+
avgShipWeightPerWeekDelta?: number;
|
|
714
746
|
totalAbsenceDaysDelta: number;
|
|
715
747
|
avgFailRateDelta: number;
|
|
716
748
|
/** Change in average CI build failure rate vs the prior comparison window. */
|
|
@@ -746,6 +778,8 @@ export interface ProductivityInsightsNeedsAttentionItemDto {
|
|
|
746
778
|
name: string;
|
|
747
779
|
subtitle?: string;
|
|
748
780
|
periodAvgMergedPrs: number;
|
|
781
|
+
/** Period average ship-weight sum per week. */
|
|
782
|
+
periodAvgShipWeight?: number;
|
|
749
783
|
avgFailRatePercent?: number;
|
|
750
784
|
avgCiFailRatePercent?: number;
|
|
751
785
|
}
|