@thinkai/tai-api-contract 2.225.0 → 2.226.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.
@@ -456,6 +456,26 @@
456
456
  "method": "GET",
457
457
  "path": "/workspaces/{workspaceId}/insights/sdlc/drilldown/{metricId}"
458
458
  },
459
+ "getSecurityPosture": {
460
+ "status": "implemented",
461
+ "method": "GET",
462
+ "path": "/workspaces/{workspaceId}/insights/security/posture"
463
+ },
464
+ "getSecurityFindings": {
465
+ "status": "implemented",
466
+ "method": "GET",
467
+ "path": "/workspaces/{workspaceId}/insights/security/findings"
468
+ },
469
+ "getSecuritySettings": {
470
+ "status": "implemented",
471
+ "method": "GET",
472
+ "path": "/workspaces/{workspaceId}/insights/security/settings"
473
+ },
474
+ "putSecuritySettings": {
475
+ "status": "implemented",
476
+ "method": "PUT",
477
+ "path": "/workspaces/{workspaceId}/insights/security/settings"
478
+ },
459
479
  "getInsightsRecommendationsPageBundle": {
460
480
  "status": "implemented",
461
481
  "method": "GET",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.225.0",
3
+ "version": "2.226.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1924,6 +1924,70 @@ export interface paths {
1924
1924
  patch?: never;
1925
1925
  trace?: never;
1926
1926
  };
1927
+ "/workspaces/{workspaceId}/insights/security/posture": {
1928
+ parameters: {
1929
+ query?: never;
1930
+ header?: never;
1931
+ path?: never;
1932
+ cookie?: never;
1933
+ };
1934
+ /**
1935
+ * Security & Risk posture roll-up
1936
+ * @description Headline KPIs, data-source strip, Fix-first queue, blind spots, team rollups, and AI risk for `/insights/sdlc/security-risk`. Finding detail for secrets and critical/high vulnerabilities is redacted unless the caller is a workspace admin or a member of the finding's owning team. Returns 404 `security_findings_disabled` when the runtime flag is off.
1937
+ */
1938
+ get: operations["getSecurityPosture"];
1939
+ put?: never;
1940
+ post?: never;
1941
+ delete?: never;
1942
+ options?: never;
1943
+ head?: never;
1944
+ patch?: never;
1945
+ trace?: never;
1946
+ };
1947
+ "/workspaces/{workspaceId}/insights/security/findings": {
1948
+ parameters: {
1949
+ query?: never;
1950
+ header?: never;
1951
+ path?: never;
1952
+ cookie?: never;
1953
+ };
1954
+ /**
1955
+ * Security & Risk findings page
1956
+ * @description Paginated security findings with optional filters. Applies the same redaction rules as the posture endpoint. Returns 404 `security_findings_disabled` when the runtime flag is off.
1957
+ */
1958
+ get: operations["getSecurityFindings"];
1959
+ put?: never;
1960
+ post?: never;
1961
+ delete?: never;
1962
+ options?: never;
1963
+ head?: never;
1964
+ patch?: never;
1965
+ trace?: never;
1966
+ };
1967
+ "/workspaces/{workspaceId}/insights/security/settings": {
1968
+ parameters: {
1969
+ query?: never;
1970
+ header?: never;
1971
+ path?: never;
1972
+ cookie?: never;
1973
+ };
1974
+ /**
1975
+ * Security & Risk settings
1976
+ * @description Fix-by targets and incident/ticket classification rules for the workspace. Returns 404 `security_findings_disabled` when the runtime flag is off.
1977
+ */
1978
+ get: operations["getSecuritySettings"];
1979
+ /**
1980
+ * Update Security & Risk settings
1981
+ * @description Workspace-admin only. Validates SLA days (1–365 or null) and classification list caps (50 entries × 100 characters). Empty incident/ticket lists match nothing. Returns 403 `security_settings_admin_required` for non-admins and 404 `security_findings_disabled` when the runtime flag is off.
1982
+ */
1983
+ put: operations["putSecuritySettings"];
1984
+ post?: never;
1985
+ delete?: never;
1986
+ options?: never;
1987
+ head?: never;
1988
+ patch?: never;
1989
+ trace?: never;
1990
+ };
1927
1991
  "/workspaces/{workspaceId}/insights/recommendations-page/bundle": {
1928
1992
  parameters: {
1929
1993
  query?: never;
@@ -9514,10 +9578,14 @@ export interface components {
9514
9578
  corePermissionsOk: boolean;
9515
9579
  /** @description True when installation grants Vulnerability alerts and Secret scanning alerts read for SDLC security metrics. */
9516
9580
  securityPermissionsOk: boolean;
9581
+ /** @description Soft tier: true when installation grants security_events read for code scanning alerts. Independent of securityPermissionsOk so Dependabot/secret scanning keep working without it. */
9582
+ codeScanningPermissionsOk?: boolean;
9517
9583
  /** @description True when installation grants financial/operational SDLC metric permissions (Actions, Deployments, and org Administration / Copilot seat reads for organization installs). */
9518
9584
  financialPermissionsOk: boolean;
9519
9585
  /** @description Security alert permissions still needed for SDLC security metrics. */
9520
9586
  missingSecurityPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
9587
+ /** @description Code scanning permissions still needed for Security & Risk code scanning metrics. */
9588
+ missingCodeScanningPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
9521
9589
  /** @description Financial/operational permissions still needed for SDLC financial metrics. */
9522
9590
  missingFinancialPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
9523
9591
  /** @description Human-readable summary when security App permissions are missing. */
@@ -9810,10 +9878,14 @@ export interface components {
9810
9878
  corePermissionsOk: boolean;
9811
9879
  /** @description True when every connected installation grants security alert read permissions. */
9812
9880
  securityPermissionsOk: boolean;
9881
+ /** @description Soft tier: true when every connected installation grants code scanning alert read. Independent of securityPermissionsOk. */
9882
+ codeScanningPermissionsOk?: boolean;
9813
9883
  /** @description True when every connected installation grants financial/operational read permissions. */
9814
9884
  financialPermissionsOk: boolean;
9815
9885
  /** @description Aggregated security permissions missing on installations with security gaps. */
9816
9886
  missingSecurityPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
9887
+ /** @description Aggregated code scanning permissions missing on installations with code scanning gaps. */
9888
+ missingCodeScanningPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
9817
9889
  /** @description Aggregated financial permissions missing on installations with financial gaps. */
9818
9890
  missingFinancialPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
9819
9891
  /** @description Human-readable summary when security App permissions are missing. */
@@ -12682,7 +12754,7 @@ export interface components {
12682
12754
  /** @enum {string} */
12683
12755
  SdlcModuleId: "dora" | "ci-pipeline" | "collaboration-pr" | "security-risk" | "governance-architecture" | "financial-operational";
12684
12756
  /** @enum {string} */
12685
- SdlcMetricId: "dora-deployment-frequency" | "dora-lead-time" | "dora-cfr" | "dora-mttr" | "ci-success-rate" | "ci-duration-p50-p95" | "ci-flakiness" | "ci-queue-wait" | "ci-cache-hit" | "pr-review-time" | "pr-bus-factor" | "pr-size" | "pr-abandonment" | "pr-review-depth" | "pr-draft-duration" | "pr-merge-conflicts" | "pr-commit-density" | "sec-dependabot-backlog" | "sec-vuln-mttr" | "sec-secret-scanning" | "sec-self-approvals" | "sec-unreviewed-merge" | "gov-branch-protection" | "gov-stale-branches" | "gov-orphaned-repos" | "gov-readme-health" | "gov-codeowners" | "gov-issue-pr-linkage" | "fin-gha-minutes" | "fin-copilot-utilization" | "fin-org-inactivity" | "fin-env-drift" | "fin-release-cadence" | "fin-api-rate-limit";
12757
+ SdlcMetricId: "dora-deployment-frequency" | "dora-lead-time" | "dora-cfr" | "dora-mttr" | "ci-success-rate" | "ci-duration-p50-p95" | "ci-flakiness" | "ci-queue-wait" | "ci-cache-hit" | "pr-review-time" | "pr-bus-factor" | "pr-size" | "pr-abandonment" | "pr-review-depth" | "pr-draft-duration" | "pr-merge-conflicts" | "pr-commit-density" | "sec-dependabot-backlog" | "sec-vuln-mttr" | "sec-secret-scanning" | "sec-self-approvals" | "sec-unreviewed-merge" | "sec-critical-open" | "sec-past-due" | "sec-scan-coverage" | "sec-code-scanning-backlog" | "sec-sonar-vulnerabilities" | "sec-quality-gate-failing" | "sec-posture-gaps" | "sec-security-incidents" | "sec-security-tickets" | "sec-ai-pr-share" | "sec-ai-unreviewed-merge" | "gov-branch-protection" | "gov-stale-branches" | "gov-orphaned-repos" | "gov-readme-health" | "gov-codeowners" | "gov-issue-pr-linkage" | "fin-gha-minutes" | "fin-copilot-utilization" | "fin-org-inactivity" | "fin-env-drift" | "fin-release-cadence" | "fin-api-rate-limit";
12686
12758
  /** @enum {string} */
12687
12759
  SdlcMetricDataStatus: "live" | "preview" | "unavailable";
12688
12760
  /** @enum {string} */
@@ -12702,6 +12774,11 @@ export interface components {
12702
12774
  date: string;
12703
12775
  value: number;
12704
12776
  };
12777
+ SdlcMetricBreakdownItemDto: {
12778
+ key: string;
12779
+ label: string;
12780
+ value: number;
12781
+ };
12705
12782
  SdlcMetricDto: {
12706
12783
  id: components["schemas"]["SdlcMetricId"];
12707
12784
  name: string;
@@ -12715,6 +12792,8 @@ export interface components {
12715
12792
  benchmarkBand?: components["schemas"]["SdlcBenchmarkBand"];
12716
12793
  drilldownAvailable: boolean;
12717
12794
  dailySeries?: components["schemas"]["SdlcDailySeriesPointDto"][];
12795
+ /** @description Severity or category segments (e.g. Dependabot critical/high/medium/low). */
12796
+ breakdown?: components["schemas"]["SdlcMetricBreakdownItemDto"][];
12718
12797
  unavailableReason?: string;
12719
12798
  };
12720
12799
  SdlcModuleDto: {
@@ -12752,6 +12831,143 @@ export interface components {
12752
12831
  items: components["schemas"]["SdlcDrilldownItemDto"][];
12753
12832
  nextCursor?: string;
12754
12833
  };
12834
+ /** @enum {string} */
12835
+ SecurityFindingSource: "github_dependabot" | "github_secret_scanning" | "github_code_scanning" | "sonar_vulnerability" | "sonar_hotspot" | "readiness_gap" | "code_insights" | "incident" | "ticket";
12836
+ /** @enum {string} */
12837
+ SecurityFindingCategory: "dependency" | "secret" | "code" | "posture" | "incident" | "ticket";
12838
+ /** @enum {string} */
12839
+ SecuritySeverity: "critical" | "high" | "medium" | "low" | "unknown";
12840
+ /** @enum {string} */
12841
+ SecurityAiInvolvement: "measured" | "estimated" | "none" | "unknown";
12842
+ /** @enum {string} */
12843
+ SecurityFindingState: "open" | "fixed" | "dismissed";
12844
+ /** @enum {string} */
12845
+ SecurityFindingActionKind: "fix_pr" | "open_source" | "rotate_secret" | "assign_owner" | "open_incident" | "open_ticket";
12846
+ SecurityFindingActionDto: {
12847
+ kind: components["schemas"]["SecurityFindingActionKind"];
12848
+ /** Format: uri */
12849
+ href?: string;
12850
+ readinessIssueId?: string;
12851
+ };
12852
+ SecurityNamedRefDto: {
12853
+ id: string;
12854
+ name: string;
12855
+ };
12856
+ SecurityRepoRefDto: {
12857
+ id: string;
12858
+ slug: string;
12859
+ };
12860
+ SecurityFindingDto: {
12861
+ id: string;
12862
+ source: components["schemas"]["SecurityFindingSource"];
12863
+ sourceLabel: string;
12864
+ category: components["schemas"]["SecurityFindingCategory"];
12865
+ severity: components["schemas"]["SecuritySeverity"];
12866
+ title: string;
12867
+ repo: components["schemas"]["SecurityRepoRefDto"] | null;
12868
+ team: components["schemas"]["SecurityNamedRefDto"] | null;
12869
+ /** Format: date-time */
12870
+ openedAt: string;
12871
+ /** Format: date-time */
12872
+ dueAt: string | null;
12873
+ pastDue: boolean;
12874
+ state: components["schemas"]["SecurityFindingState"];
12875
+ /** Format: uri */
12876
+ url: string | null;
12877
+ aiInvolvement: components["schemas"]["SecurityAiInvolvement"];
12878
+ alsoSeenIn: components["schemas"]["SecurityFindingSource"][];
12879
+ primaryAction: components["schemas"]["SecurityFindingActionDto"];
12880
+ redacted: boolean;
12881
+ };
12882
+ /** @enum {string} */
12883
+ SecurityDataSourceCategory: "source_control" | "code_quality" | "ai_tools" | "incidents" | "tickets" | "security";
12884
+ /** @enum {string} */
12885
+ SecurityDataSourceStatus: "connected" | "stale" | "needs_permission" | "not_connected" | "coming_soon";
12886
+ SecurityDataSourceDto: {
12887
+ id: string;
12888
+ name: string;
12889
+ category: components["schemas"]["SecurityDataSourceCategory"];
12890
+ status: components["schemas"]["SecurityDataSourceStatus"];
12891
+ /** Format: date-time */
12892
+ lastSuccessAt: string | null;
12893
+ feeds: components["schemas"]["SdlcMetricId"][];
12894
+ actionLabel?: string;
12895
+ actionHref?: string;
12896
+ };
12897
+ /** @enum {string} */
12898
+ SecurityBlindSpotMissing: "dependabot" | "secret_scanning" | "sast" | "review_rule" | "owner";
12899
+ SecurityBlindSpotDto: {
12900
+ repo: components["schemas"]["SecurityRepoRefDto"];
12901
+ team: components["schemas"]["SecurityNamedRefDto"] | null;
12902
+ missing: components["schemas"]["SecurityBlindSpotMissing"][];
12903
+ };
12904
+ SecurityTeamRollupDto: {
12905
+ team: components["schemas"]["SecurityNamedRefDto"] | null;
12906
+ criticalOpen: number;
12907
+ pastDue: number;
12908
+ scanCoveragePercent: number | null;
12909
+ aiUnreviewedPercent: number | null;
12910
+ openFindings: number;
12911
+ };
12912
+ SecurityAiRiskDto: {
12913
+ agentPrSharePercent: number | null;
12914
+ agentUnreviewedPercent: number | null;
12915
+ humanUnreviewedPercent: number | null;
12916
+ acceptedAiLinesByTeam: {
12917
+ team: components["schemas"]["SecurityNamedRefDto"] | null;
12918
+ lines: number;
12919
+ }[];
12920
+ guardrails: {
12921
+ reposWithAgentIgnore: number;
12922
+ reposWithMcpPosture: number;
12923
+ reposWithSecretsScanner: number;
12924
+ reposScanned: number;
12925
+ };
12926
+ attributionQuality: components["schemas"]["SecurityAiInvolvement"];
12927
+ };
12928
+ SecurityPostureDto: {
12929
+ /** Format: date-time */
12930
+ asOf: string;
12931
+ rangeId: string;
12932
+ headline: {
12933
+ criticalOpen: number;
12934
+ pastDue: number;
12935
+ reposWithoutCoverage: number;
12936
+ unownedFindings: number;
12937
+ };
12938
+ dataSources: components["schemas"]["SecurityDataSourceDto"][];
12939
+ fixFirst: components["schemas"]["SecurityFindingDto"][];
12940
+ blindSpots: components["schemas"]["SecurityBlindSpotDto"][];
12941
+ teams: components["schemas"]["SecurityTeamRollupDto"][];
12942
+ aiRisk: components["schemas"]["SecurityAiRiskDto"];
12943
+ viewer: {
12944
+ isAdmin: boolean;
12945
+ ownedTeamIds: string[];
12946
+ };
12947
+ _meta: components["schemas"]["InsightsResponseMeta"];
12948
+ };
12949
+ SecurityFindingsPageDto: {
12950
+ items: components["schemas"]["SecurityFindingDto"][];
12951
+ nextCursor?: string;
12952
+ total: number;
12953
+ };
12954
+ SecuritySettingsDto: {
12955
+ slaDays: {
12956
+ critical: number | null;
12957
+ high: number | null;
12958
+ medium: number | null;
12959
+ low: number | null;
12960
+ };
12961
+ incidentRules: {
12962
+ labels: string[];
12963
+ severityNames: string[];
12964
+ titleKeywords: string[];
12965
+ };
12966
+ ticketRules: {
12967
+ labels: string[];
12968
+ issueTypes: string[];
12969
+ };
12970
+ };
12755
12971
  InsightsResponseMeta: {
12756
12972
  /**
12757
12973
  * Format: date-time
@@ -15300,11 +15516,32 @@ export type SdlcMetricHealthStatus = components['schemas']['SdlcMetricHealthStat
15300
15516
  export type SdlcBenchmarkBand = components['schemas']['SdlcBenchmarkBand'];
15301
15517
  export type SdlcMetricTrendDto = components['schemas']['SdlcMetricTrendDto'];
15302
15518
  export type SdlcDailySeriesPointDto = components['schemas']['SdlcDailySeriesPointDto'];
15519
+ export type SdlcMetricBreakdownItemDto = components['schemas']['SdlcMetricBreakdownItemDto'];
15303
15520
  export type SdlcMetricDto = components['schemas']['SdlcMetricDto'];
15304
15521
  export type SdlcModuleDto = components['schemas']['SdlcModuleDto'];
15305
15522
  export type SdlcOverviewDto = components['schemas']['SdlcOverviewDto'];
15306
15523
  export type SdlcDrilldownItemDto = components['schemas']['SdlcDrilldownItemDto'];
15307
15524
  export type SdlcDrilldownDto = components['schemas']['SdlcDrilldownDto'];
15525
+ export type SecurityFindingSource = components['schemas']['SecurityFindingSource'];
15526
+ export type SecurityFindingCategory = components['schemas']['SecurityFindingCategory'];
15527
+ export type SecuritySeverity = components['schemas']['SecuritySeverity'];
15528
+ export type SecurityAiInvolvement = components['schemas']['SecurityAiInvolvement'];
15529
+ export type SecurityFindingState = components['schemas']['SecurityFindingState'];
15530
+ export type SecurityFindingActionKind = components['schemas']['SecurityFindingActionKind'];
15531
+ export type SecurityFindingActionDto = components['schemas']['SecurityFindingActionDto'];
15532
+ export type SecurityNamedRefDto = components['schemas']['SecurityNamedRefDto'];
15533
+ export type SecurityRepoRefDto = components['schemas']['SecurityRepoRefDto'];
15534
+ export type SecurityFindingDto = components['schemas']['SecurityFindingDto'];
15535
+ export type SecurityDataSourceCategory = components['schemas']['SecurityDataSourceCategory'];
15536
+ export type SecurityDataSourceStatus = components['schemas']['SecurityDataSourceStatus'];
15537
+ export type SecurityDataSourceDto = components['schemas']['SecurityDataSourceDto'];
15538
+ export type SecurityBlindSpotMissing = components['schemas']['SecurityBlindSpotMissing'];
15539
+ export type SecurityBlindSpotDto = components['schemas']['SecurityBlindSpotDto'];
15540
+ export type SecurityTeamRollupDto = components['schemas']['SecurityTeamRollupDto'];
15541
+ export type SecurityAiRiskDto = components['schemas']['SecurityAiRiskDto'];
15542
+ export type SecurityPostureDto = components['schemas']['SecurityPostureDto'];
15543
+ export type SecurityFindingsPageDto = components['schemas']['SecurityFindingsPageDto'];
15544
+ export type SecuritySettingsDto = components['schemas']['SecuritySettingsDto'];
15308
15545
  export type InsightsResponseMeta = components['schemas']['InsightsResponseMeta'];
15309
15546
  export type InsightsVerdictStatus = components['schemas']['InsightsVerdictStatus'];
15310
15547
  export type InsightsRecommendationsVerdictSummary = components['schemas']['InsightsRecommendationsVerdictSummary'];
@@ -21051,6 +21288,207 @@ export interface operations {
21051
21288
  };
21052
21289
  };
21053
21290
  };
21291
+ getSecurityPosture: {
21292
+ parameters: {
21293
+ query?: never;
21294
+ header?: never;
21295
+ path: {
21296
+ workspaceId: components["parameters"]["WorkspaceId"];
21297
+ };
21298
+ cookie?: never;
21299
+ };
21300
+ requestBody?: never;
21301
+ responses: {
21302
+ /** @description Security posture payload */
21303
+ 200: {
21304
+ headers: {
21305
+ [name: string]: unknown;
21306
+ };
21307
+ content: {
21308
+ "application/json": components["schemas"]["SecurityPostureDto"];
21309
+ };
21310
+ };
21311
+ /** @description Invalid query parameters */
21312
+ 400: {
21313
+ headers: {
21314
+ [name: string]: unknown;
21315
+ };
21316
+ content: {
21317
+ "application/json": {
21318
+ /** @example invalid_query */
21319
+ error: string;
21320
+ };
21321
+ };
21322
+ };
21323
+ 401: components["responses"]["Unauthorized"];
21324
+ 403: components["responses"]["Forbidden"];
21325
+ /** @description Workspace not found, or security findings flag off */
21326
+ 404: {
21327
+ headers: {
21328
+ [name: string]: unknown;
21329
+ };
21330
+ content: {
21331
+ "application/json": components["schemas"]["ErrorMessageDto"];
21332
+ };
21333
+ };
21334
+ };
21335
+ };
21336
+ getSecurityFindings: {
21337
+ parameters: {
21338
+ query?: {
21339
+ source?: components["schemas"]["SecurityFindingSource"];
21340
+ category?: components["schemas"]["SecurityFindingCategory"];
21341
+ severity?: components["schemas"]["SecuritySeverity"];
21342
+ state?: components["schemas"]["SecurityFindingState"];
21343
+ /** @description Filter to findings owned by this team id. */
21344
+ teamId?: string;
21345
+ /** @description Filter to findings for this internal repo id. */
21346
+ repoId?: string;
21347
+ pastDue?: boolean;
21348
+ cursor?: string;
21349
+ limit?: number;
21350
+ };
21351
+ header?: never;
21352
+ path: {
21353
+ workspaceId: components["parameters"]["WorkspaceId"];
21354
+ };
21355
+ cookie?: never;
21356
+ };
21357
+ requestBody?: never;
21358
+ responses: {
21359
+ /** @description Findings page */
21360
+ 200: {
21361
+ headers: {
21362
+ [name: string]: unknown;
21363
+ };
21364
+ content: {
21365
+ "application/json": components["schemas"]["SecurityFindingsPageDto"];
21366
+ };
21367
+ };
21368
+ /** @description Invalid query parameters */
21369
+ 400: {
21370
+ headers: {
21371
+ [name: string]: unknown;
21372
+ };
21373
+ content: {
21374
+ "application/json": {
21375
+ /** @example invalid_query */
21376
+ error: string;
21377
+ };
21378
+ };
21379
+ };
21380
+ 401: components["responses"]["Unauthorized"];
21381
+ 403: components["responses"]["Forbidden"];
21382
+ /** @description Workspace not found, or security findings flag off */
21383
+ 404: {
21384
+ headers: {
21385
+ [name: string]: unknown;
21386
+ };
21387
+ content: {
21388
+ "application/json": components["schemas"]["ErrorMessageDto"];
21389
+ };
21390
+ };
21391
+ };
21392
+ };
21393
+ getSecuritySettings: {
21394
+ parameters: {
21395
+ query?: never;
21396
+ header?: never;
21397
+ path: {
21398
+ workspaceId: components["parameters"]["WorkspaceId"];
21399
+ };
21400
+ cookie?: never;
21401
+ };
21402
+ requestBody?: never;
21403
+ responses: {
21404
+ /** @description Current settings (defaults when no row exists) */
21405
+ 200: {
21406
+ headers: {
21407
+ [name: string]: unknown;
21408
+ };
21409
+ content: {
21410
+ "application/json": components["schemas"]["SecuritySettingsDto"];
21411
+ };
21412
+ };
21413
+ 401: components["responses"]["Unauthorized"];
21414
+ 403: components["responses"]["Forbidden"];
21415
+ /** @description Workspace not found, or security findings flag off */
21416
+ 404: {
21417
+ headers: {
21418
+ [name: string]: unknown;
21419
+ };
21420
+ content: {
21421
+ "application/json": components["schemas"]["ErrorMessageDto"];
21422
+ };
21423
+ };
21424
+ };
21425
+ };
21426
+ putSecuritySettings: {
21427
+ parameters: {
21428
+ query?: never;
21429
+ header?: never;
21430
+ path: {
21431
+ workspaceId: components["parameters"]["WorkspaceId"];
21432
+ };
21433
+ cookie?: never;
21434
+ };
21435
+ requestBody: {
21436
+ content: {
21437
+ "application/json": components["schemas"]["SecuritySettingsDto"];
21438
+ };
21439
+ };
21440
+ responses: {
21441
+ /** @description Updated settings */
21442
+ 200: {
21443
+ headers: {
21444
+ [name: string]: unknown;
21445
+ };
21446
+ content: {
21447
+ "application/json": components["schemas"]["SecuritySettingsDto"];
21448
+ };
21449
+ };
21450
+ /** @description Invalid settings payload */
21451
+ 400: {
21452
+ headers: {
21453
+ [name: string]: unknown;
21454
+ };
21455
+ content: {
21456
+ /**
21457
+ * @example {
21458
+ * "error": "Invalid SLA day",
21459
+ * "code": "invalid_input"
21460
+ * }
21461
+ */
21462
+ "application/json": components["schemas"]["ErrorMessageDto"];
21463
+ };
21464
+ };
21465
+ 401: components["responses"]["Unauthorized"];
21466
+ /** @description Caller is not a workspace admin */
21467
+ 403: {
21468
+ headers: {
21469
+ [name: string]: unknown;
21470
+ };
21471
+ content: {
21472
+ /**
21473
+ * @example {
21474
+ * "error": "Workspace admin access is required to change security settings",
21475
+ * "code": "security_settings_admin_required"
21476
+ * }
21477
+ */
21478
+ "application/json": components["schemas"]["ErrorMessageDto"];
21479
+ };
21480
+ };
21481
+ /** @description Workspace not found, or security findings flag off */
21482
+ 404: {
21483
+ headers: {
21484
+ [name: string]: unknown;
21485
+ };
21486
+ content: {
21487
+ "application/json": components["schemas"]["ErrorMessageDto"];
21488
+ };
21489
+ };
21490
+ };
21491
+ };
21054
21492
  getInsightsRecommendationsPageBundle: {
21055
21493
  parameters: {
21056
21494
  query: {