@thinkai/tai-api-contract 2.161.0 → 2.163.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.
@@ -2399,6 +2399,50 @@ export interface paths {
2399
2399
  patch?: never;
2400
2400
  trace?: never;
2401
2401
  };
2402
+ "/workspaces/{workspaceId}/assessment-dictionary": {
2403
+ parameters: {
2404
+ query?: never;
2405
+ header?: never;
2406
+ path?: never;
2407
+ cookie?: never;
2408
+ };
2409
+ /**
2410
+ * Read the versioned assessment launch dictionary
2411
+ * @description Returns approved assessment constants and explicit `unset` markers for unresolved decisions. Callers must fail closed instead of substituting values for an unset decision. Any workspace member may read it.
2412
+ */
2413
+ get: operations["getAssessmentDictionary"];
2414
+ put?: never;
2415
+ post?: never;
2416
+ delete?: never;
2417
+ options?: never;
2418
+ head?: never;
2419
+ patch?: never;
2420
+ trace?: never;
2421
+ };
2422
+ "/workspaces/{workspaceId}/aggregate-use-consent": {
2423
+ parameters: {
2424
+ query?: never;
2425
+ header?: never;
2426
+ path?: never;
2427
+ cookie?: never;
2428
+ };
2429
+ /**
2430
+ * Read anonymized aggregate-use permission
2431
+ * @description Returns whether ThinkAI may use this workspace's anonymized aggregate results in marketing and peer benchmarks. A workspace that never chose returns `unset`, which behaves as opted out (`effective: false`). The permission never covers company name, logo, quote, raw report, repository or person identity, or customer reference. Any workspace member may read it.
2432
+ */
2433
+ get: operations["getAggregateUseConsent"];
2434
+ /**
2435
+ * Set anonymized aggregate-use permission
2436
+ * @description Workspace admins opt in or out. Every change writes one `workspace.aggregate_use.changed` activity-log row in the same transaction. Moving from `opt_in` to `opt_out` records a withdrawal and stops future extraction. Opt-in requires the current legal-approved notice version; while no notice is approved, opt-in returns `409 aggregate_use_notice_unapproved`. Opt-out is always accepted. A refusal does not change price, delivery, support, or assessment output.
2437
+ */
2438
+ put: operations["putAggregateUseConsent"];
2439
+ post?: never;
2440
+ delete?: never;
2441
+ options?: never;
2442
+ head?: never;
2443
+ patch?: never;
2444
+ trace?: never;
2445
+ };
2402
2446
  "/workspaces/{workspaceId}/report-center/exports": {
2403
2447
  parameters: {
2404
2448
  query?: never;
@@ -8704,7 +8748,110 @@ export interface components {
8704
8748
  * @description Type of workspace lifecycle event.
8705
8749
  * @enum {string}
8706
8750
  */
8707
- 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" | "code_insights.design_run_started" | "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.hibob.sync_started" | "hris.hibob.sync_completed" | "hris.hibob.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" | "report.exported";
8751
+ 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" | "code_insights.design_run_started" | "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.hibob.sync_started" | "hris.hibob.sync_completed" | "hris.hibob.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" | "report.exported" | "workspace.aggregate_use.changed";
8752
+ UnsetAssessmentDecisionDto: {
8753
+ /** @enum {string} */
8754
+ status: "unset";
8755
+ };
8756
+ /** @description Current legal-approved opt-in notice, or `unset` while opt-in is unavailable. */
8757
+ AggregateUseNoticeStatusDto: {
8758
+ /** @enum {string} */
8759
+ status: "approved" | "unset";
8760
+ /** @description Present only when `status` is `approved`. Send it back on opt-in. */
8761
+ version?: string;
8762
+ };
8763
+ AggregateUseConsentDto: {
8764
+ /**
8765
+ * @description Saved choice. `unset` means the workspace never chose and is treated as opted out.
8766
+ * @enum {string}
8767
+ */
8768
+ aggregateUse: "opt_in" | "opt_out" | "unset";
8769
+ /** @description True only for `opt_in`. Benchmark and marketing extraction must check this. */
8770
+ effective: boolean;
8771
+ /** @description Notice version accepted with the current opt-in; null otherwise. */
8772
+ noticeVersion: string | null;
8773
+ /** @enum {string|null} */
8774
+ source: "workspace_settings" | null;
8775
+ /**
8776
+ * Format: date-time
8777
+ * @description When the current choice was saved; null when `unset`.
8778
+ */
8779
+ recordedAt: string | null;
8780
+ recordedBy: {
8781
+ /** Format: uuid */
8782
+ userId: string;
8783
+ displayName: string | null;
8784
+ } | null;
8785
+ /**
8786
+ * Format: date-time
8787
+ * @description Most recent opt-in withdrawal while the workspace remains opted out.
8788
+ */
8789
+ withdrawnAt: string | null;
8790
+ currentNotice: components["schemas"]["AggregateUseNoticeStatusDto"];
8791
+ /** @description Exact sentence the assessment PDF prints beside `recordedAt`. Opted-out and unset workspaces get the fixed refusal sentence. Opt-in returns the approved sentence for the accepted notice, or null if that notice is unknown, which blocks validation. */
8792
+ reportSentence: string | null;
8793
+ };
8794
+ AggregateUseConsentPutDto: {
8795
+ /** @enum {string} */
8796
+ aggregateUse: "opt_in" | "opt_out";
8797
+ /** @description Required for `opt_in` and must equal `currentNotice.version`. Ignored for `opt_out`. */
8798
+ noticeVersion?: string | null;
8799
+ };
8800
+ AssessmentDictionaryDto: {
8801
+ /** @enum {string} */
8802
+ version: "2026-10-18.1";
8803
+ /** @enum {integer} */
8804
+ periodDays: 90;
8805
+ /** @enum {integer} */
8806
+ transitionDays: 14;
8807
+ /** @enum {integer} */
8808
+ repairDays: 14;
8809
+ /** @enum {integer} */
8810
+ secureLinkDays: 14;
8811
+ /** @enum {integer} */
8812
+ accessDaysAfterDelivery: 30;
8813
+ /** @enum {integer} */
8814
+ maxRepositories: 50;
8815
+ /** @enum {integer} */
8816
+ maxActiveEngineers: 500;
8817
+ /** @enum {integer} */
8818
+ dataCoverageRefreshCapDays: 90;
8819
+ /** @enum {integer} */
8820
+ aiUsageMaxRangeDays: 180;
8821
+ /** @enum {integer} */
8822
+ cursorChunkDays: 30;
8823
+ /** @enum {integer} */
8824
+ claudeChunkDays: 31;
8825
+ watermarks: {
8826
+ /** @enum {string} */
8827
+ notValidated: "NOT VALIDATED";
8828
+ /** @enum {string} */
8829
+ syntheticSample: "SAMPLE · SYNTHETIC DATA";
8830
+ };
8831
+ offerIds: ("engineering_readiness_baseline" | "agentic_ai_roi")[];
8832
+ sourceProviders: ("github" | "gitlab" | "bitbucket")[];
8833
+ aiProviders: ("cursor" | "claude" | "copilot")[];
8834
+ optionalProviders: {
8835
+ roadmap: "jira"[];
8836
+ incident: ("pagerduty" | "opsgenie" | "goalert" | "newrelic" | "prometheus" | "grafana")[];
8837
+ };
8838
+ selfManagedGit: {
8839
+ /** @enum {string} */
8840
+ status: "supported";
8841
+ providers: ("gitlab_self_managed" | "bitbucket_data_center")[];
8842
+ };
8843
+ unresolved: {
8844
+ baselinePrice: components["schemas"]["UnsetAssessmentDecisionDto"];
8845
+ premiumPrice: components["schemas"]["UnsetAssessmentDecisionDto"];
8846
+ currency: components["schemas"]["UnsetAssessmentDecisionDto"];
8847
+ creditWindowDays: components["schemas"]["UnsetAssessmentDecisionDto"];
8848
+ jiraLinkageMinimum: components["schemas"]["UnsetAssessmentDecisionDto"];
8849
+ confounderRules: components["schemas"]["UnsetAssessmentDecisionDto"];
8850
+ activeEngineerRule: components["schemas"]["UnsetAssessmentDecisionDto"];
8851
+ workingDayCalendar: components["schemas"]["UnsetAssessmentDecisionDto"];
8852
+ countryAllowList: components["schemas"]["UnsetAssessmentDecisionDto"];
8853
+ };
8854
+ };
8708
8855
  /** @description Metadata for a successful Report Center PDF download. Secret-free; no table payloads. Recorded as `report.exported` on the workspace activity log. */
8709
8856
  ReportCenterExportRecordBodyDto: {
8710
8857
  /** @description Applied insights range id (e.g. `30d`, `cr:2026-01-01:2026-01-31`). */
@@ -11243,6 +11390,11 @@ export type PutAgenticFoundationRepoScopeAppliedDto = components['schemas']['Put
11243
11390
  export type PutAgenticFoundationRepoScopeFailureDto = components['schemas']['PutAgenticFoundationRepoScopeFailureDto'];
11244
11391
  export type PutAgenticFoundationRepoScopeResponseDto = components['schemas']['PutAgenticFoundationRepoScopeResponseDto'];
11245
11392
  export type ActivityLogEventTypeDto = components['schemas']['ActivityLogEventTypeDto'];
11393
+ export type UnsetAssessmentDecisionDto = components['schemas']['UnsetAssessmentDecisionDto'];
11394
+ export type AggregateUseNoticeStatusDto = components['schemas']['AggregateUseNoticeStatusDto'];
11395
+ export type AggregateUseConsentDto = components['schemas']['AggregateUseConsentDto'];
11396
+ export type AggregateUseConsentPutDto = components['schemas']['AggregateUseConsentPutDto'];
11397
+ export type AssessmentDictionaryDto = components['schemas']['AssessmentDictionaryDto'];
11246
11398
  export type ReportCenterExportRecordBodyDto = components['schemas']['ReportCenterExportRecordBodyDto'];
11247
11399
  export type ReportCenterExportRecordResponseDto = components['schemas']['ReportCenterExportRecordResponseDto'];
11248
11400
  export type ActivityLogActorDto = components['schemas']['ActivityLogActorDto'];
@@ -17869,6 +18021,135 @@ export interface operations {
17869
18021
  };
17870
18022
  };
17871
18023
  };
18024
+ getAssessmentDictionary: {
18025
+ parameters: {
18026
+ query?: never;
18027
+ header?: never;
18028
+ path: {
18029
+ workspaceId: components["parameters"]["WorkspaceId"];
18030
+ };
18031
+ cookie?: never;
18032
+ };
18033
+ requestBody?: never;
18034
+ responses: {
18035
+ /** @description Current assessment dictionary */
18036
+ 200: {
18037
+ headers: {
18038
+ [name: string]: unknown;
18039
+ };
18040
+ content: {
18041
+ "application/json": components["schemas"]["AssessmentDictionaryDto"];
18042
+ };
18043
+ };
18044
+ 401: components["responses"]["Unauthorized"];
18045
+ 403: components["responses"]["Forbidden"];
18046
+ /** @description Workspace does not exist */
18047
+ 404: {
18048
+ headers: {
18049
+ [name: string]: unknown;
18050
+ };
18051
+ content: {
18052
+ "application/json": components["schemas"]["ErrorMessageDto"];
18053
+ };
18054
+ };
18055
+ };
18056
+ };
18057
+ getAggregateUseConsent: {
18058
+ parameters: {
18059
+ query?: never;
18060
+ header?: never;
18061
+ path: {
18062
+ workspaceId: components["parameters"]["WorkspaceId"];
18063
+ };
18064
+ cookie?: never;
18065
+ };
18066
+ requestBody?: never;
18067
+ responses: {
18068
+ /** @description Current permission and the sentence reports must print */
18069
+ 200: {
18070
+ headers: {
18071
+ [name: string]: unknown;
18072
+ };
18073
+ content: {
18074
+ "application/json": components["schemas"]["AggregateUseConsentDto"];
18075
+ };
18076
+ };
18077
+ 401: components["responses"]["Unauthorized"];
18078
+ 403: components["responses"]["Forbidden"];
18079
+ /** @description Workspace does not exist */
18080
+ 404: {
18081
+ headers: {
18082
+ [name: string]: unknown;
18083
+ };
18084
+ content: {
18085
+ "application/json": components["schemas"]["ErrorMessageDto"];
18086
+ };
18087
+ };
18088
+ };
18089
+ };
18090
+ putAggregateUseConsent: {
18091
+ parameters: {
18092
+ query?: never;
18093
+ header?: never;
18094
+ path: {
18095
+ workspaceId: components["parameters"]["WorkspaceId"];
18096
+ };
18097
+ cookie?: never;
18098
+ };
18099
+ requestBody: {
18100
+ content: {
18101
+ "application/json": components["schemas"]["AggregateUseConsentPutDto"];
18102
+ };
18103
+ };
18104
+ responses: {
18105
+ /** @description Saved permission */
18106
+ 200: {
18107
+ headers: {
18108
+ [name: string]: unknown;
18109
+ };
18110
+ content: {
18111
+ "application/json": components["schemas"]["AggregateUseConsentDto"];
18112
+ };
18113
+ };
18114
+ /** @description Invalid body (`code`: `invalid_input`) */
18115
+ 400: {
18116
+ headers: {
18117
+ [name: string]: unknown;
18118
+ };
18119
+ content: {
18120
+ "application/json": components["schemas"]["ErrorMessageDto"];
18121
+ };
18122
+ };
18123
+ 401: components["responses"]["Unauthorized"];
18124
+ /** @description Caller is not a workspace admin (`code`: `workspace_admin_required`) */
18125
+ 403: {
18126
+ headers: {
18127
+ [name: string]: unknown;
18128
+ };
18129
+ content: {
18130
+ "application/json": components["schemas"]["ErrorMessageDto"];
18131
+ };
18132
+ };
18133
+ /** @description Workspace does not exist */
18134
+ 404: {
18135
+ headers: {
18136
+ [name: string]: unknown;
18137
+ };
18138
+ content: {
18139
+ "application/json": components["schemas"]["ErrorMessageDto"];
18140
+ };
18141
+ };
18142
+ /** @description Opt-in refused because no notice is approved (`aggregate_use_notice_unapproved`) or the submitted notice version is not current (`aggregate_use_notice_stale`). */
18143
+ 409: {
18144
+ headers: {
18145
+ [name: string]: unknown;
18146
+ };
18147
+ content: {
18148
+ "application/json": components["schemas"]["ErrorMessageDto"];
18149
+ };
18150
+ };
18151
+ };
18152
+ };
17872
18153
  recordReportCenterExport: {
17873
18154
  parameters: {
17874
18155
  query?: never;
@@ -17935,7 +18216,7 @@ export interface operations {
17935
18216
  order?: components["parameters"]["PaginationOrder"];
17936
18217
  /** @description Server-side sort column (the activity "5 W's"). Combined with `order` (asc/desc). Defaults to `when` (occurredAt). `occurredAt`/`id` is always the tiebreaker. */
17937
18218
  sort?: "when" | "who" | "what" | "why" | "where";
17938
- /** @description Coarse product-area grouping filter (#156). `integration` = GitHub + AI-tool key events; `agentic_foundation` = repos, readiness scans, fixes; `workspace_team` = members + HRIS + report exports; `productivity` = productivity ingest lifecycle events. Omit (or pass `all`) for every area. */
18219
+ /** @description Coarse product-area grouping filter (#156). `integration` = GitHub + AI-tool key events; `agentic_foundation` = repos, readiness scans, fixes; `workspace_team` = members + HRIS + report exports + workspace settings; `productivity` = productivity ingest lifecycle events. Omit (or pass `all`) for every area. */
17939
18220
  productArea?: "integration" | "agentic_foundation" | "workspace_team" | "productivity" | "all";
17940
18221
  /** @description Filter to a specific event type. */
17941
18222
  eventType?: components["schemas"]["ActivityLogEventTypeDto"];