@thinkai/tai-api-contract 2.142.0 → 2.143.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,26 @@ export interface paths {
2399
2399
  patch?: never;
2400
2400
  trace?: never;
2401
2401
  };
2402
+ "/workspaces/{workspaceId}/report-center/exports": {
2403
+ parameters: {
2404
+ query?: never;
2405
+ header?: never;
2406
+ path?: never;
2407
+ cookie?: never;
2408
+ };
2409
+ get?: never;
2410
+ put?: never;
2411
+ /**
2412
+ * Record a Report Center PDF export
2413
+ * @description Workspace admin (or platform admin) records that a Report Center PDF was downloaded. Inserts one `report.exported` activity-log row with the request body as secret-free metadata. Does not store PDF bytes. Members who are not workspace admins receive 403.
2414
+ */
2415
+ post: operations["recordReportCenterExport"];
2416
+ delete?: never;
2417
+ options?: never;
2418
+ head?: never;
2419
+ patch?: never;
2420
+ trace?: never;
2421
+ };
2402
2422
  "/workspaces/{workspaceId}/activity": {
2403
2423
  parameters: {
2404
2424
  query?: never;
@@ -8097,7 +8117,31 @@ export interface components {
8097
8117
  * @description Type of workspace lifecycle event.
8098
8118
  * @enum {string}
8099
8119
  */
8100
- 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";
8120
+ 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";
8121
+ /** @description Metadata for a successful Report Center PDF download. Secret-free; no table payloads. Recorded as `report.exported` on the workspace activity log. */
8122
+ ReportCenterExportRecordBodyDto: {
8123
+ /** @description Applied insights range id (e.g. `30d`, `cr:2026-01-01:2026-01-31`). */
8124
+ rangeId: string;
8125
+ department: string;
8126
+ team: string;
8127
+ selectedProductivityTeamIds?: string[];
8128
+ sectionIds: string[];
8129
+ /** @description Preset id used as the starting point (e.g. `leadership`, `productivity`, `full`, `custom`). */
8130
+ preset: string;
8131
+ /** @description True when the admin changed section checks after picking a preset. */
8132
+ customized: boolean;
8133
+ /** @description IANA timezone printed on the PDF cover. */
8134
+ timezone: string;
8135
+ filename: string;
8136
+ providerIds?: string[];
8137
+ repoIds?: string[];
8138
+ };
8139
+ ReportCenterExportRecordResponseDto: {
8140
+ /** @enum {boolean} */
8141
+ ok: true;
8142
+ /** Format: uuid */
8143
+ activityEntryId: string;
8144
+ };
8101
8145
  ActivityLogActorDto: {
8102
8146
  /** Format: uuid */
8103
8147
  userId: string;
@@ -10169,6 +10213,8 @@ export interface components {
10169
10213
  InsightsRecommendationsDateTo: string;
10170
10214
  /** @description AI provider ids (e.g. `cursor`, `copilot`). Empty/omitted = all configured providers. */
10171
10215
  InsightsRecommendationsProvider: string[];
10216
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
10217
+ InsightsAiUsageProvider: ("cursor" | "claude")[];
10172
10218
  /** @description Include contributors / AI rows not mapped to a team. */
10173
10219
  InsightsRecommendationsIncludeUnmapped: boolean;
10174
10220
  /** @description Include bot accounts in PR/CI stats. */
@@ -10557,6 +10603,8 @@ export type PutAgenticFoundationRepoScopeAppliedDto = components['schemas']['Put
10557
10603
  export type PutAgenticFoundationRepoScopeFailureDto = components['schemas']['PutAgenticFoundationRepoScopeFailureDto'];
10558
10604
  export type PutAgenticFoundationRepoScopeResponseDto = components['schemas']['PutAgenticFoundationRepoScopeResponseDto'];
10559
10605
  export type ActivityLogEventTypeDto = components['schemas']['ActivityLogEventTypeDto'];
10606
+ export type ReportCenterExportRecordBodyDto = components['schemas']['ReportCenterExportRecordBodyDto'];
10607
+ export type ReportCenterExportRecordResponseDto = components['schemas']['ReportCenterExportRecordResponseDto'];
10560
10608
  export type ActivityLogActorDto = components['schemas']['ActivityLogActorDto'];
10561
10609
  export type ActivityLogEntryDto = components['schemas']['ActivityLogEntryDto'];
10562
10610
  export type WorkspaceAbsenceDto = components['schemas']['WorkspaceAbsenceDto'];
@@ -10768,6 +10816,7 @@ export type ParameterInsightsRecommendationsTeams = components['parameters']['In
10768
10816
  export type ParameterInsightsRecommendationsDateFrom = components['parameters']['InsightsRecommendationsDateFrom'];
10769
10817
  export type ParameterInsightsRecommendationsDateTo = components['parameters']['InsightsRecommendationsDateTo'];
10770
10818
  export type ParameterInsightsRecommendationsProvider = components['parameters']['InsightsRecommendationsProvider'];
10819
+ export type ParameterInsightsAiUsageProvider = components['parameters']['InsightsAiUsageProvider'];
10771
10820
  export type ParameterInsightsRecommendationsIncludeUnmapped = components['parameters']['InsightsRecommendationsIncludeUnmapped'];
10772
10821
  export type ParameterInsightsRecommendationsIncludeBots = components['parameters']['InsightsRecommendationsIncludeBots'];
10773
10822
  export type ParameterPaginationLimit = components['parameters']['PaginationLimit'];
@@ -13305,6 +13354,8 @@ export interface operations {
13305
13354
  to?: components["parameters"]["InsightsProductivityTo"];
13306
13355
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13307
13356
  department?: components["parameters"]["InsightsDepartmentFilter"];
13357
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13358
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13308
13359
  /** @description Team name filter; send `All teams` to include every team. */
13309
13360
  team?: string;
13310
13361
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -13361,6 +13412,8 @@ export interface operations {
13361
13412
  to?: components["parameters"]["InsightsProductivityTo"];
13362
13413
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13363
13414
  department?: components["parameters"]["InsightsDepartmentFilter"];
13415
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13416
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13364
13417
  /** @description Team name filter; send `All teams` to include every team. */
13365
13418
  team?: string;
13366
13419
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -13417,6 +13470,8 @@ export interface operations {
13417
13470
  to?: components["parameters"]["InsightsProductivityTo"];
13418
13471
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13419
13472
  department?: components["parameters"]["InsightsDepartmentFilter"];
13473
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13474
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13420
13475
  /** @description Team name filter; send `All teams` to include every team. */
13421
13476
  team?: string;
13422
13477
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -13473,6 +13528,8 @@ export interface operations {
13473
13528
  to?: components["parameters"]["InsightsProductivityTo"];
13474
13529
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13475
13530
  department?: components["parameters"]["InsightsDepartmentFilter"];
13531
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13532
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13476
13533
  /** @description Team name filter; send `All teams` to include every team. */
13477
13534
  team?: string;
13478
13535
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -13529,6 +13586,8 @@ export interface operations {
13529
13586
  to?: components["parameters"]["InsightsProductivityTo"];
13530
13587
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13531
13588
  department?: components["parameters"]["InsightsDepartmentFilter"];
13589
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13590
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13532
13591
  /** @description Team name filter; send `All teams` to include every team. */
13533
13592
  team?: string;
13534
13593
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -13649,6 +13708,8 @@ export interface operations {
13649
13708
  to?: components["parameters"]["InsightsProductivityTo"];
13650
13709
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13651
13710
  department?: components["parameters"]["InsightsDepartmentFilter"];
13711
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13712
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13652
13713
  /** @description Team name filter; send `All teams` to include every team. */
13653
13714
  team?: string;
13654
13715
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -13705,6 +13766,8 @@ export interface operations {
13705
13766
  to?: components["parameters"]["InsightsProductivityTo"];
13706
13767
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13707
13768
  department?: components["parameters"]["InsightsDepartmentFilter"];
13769
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13770
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13708
13771
  /** @description Team name filter; send `All teams` to include every team. */
13709
13772
  team?: string;
13710
13773
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -13761,6 +13824,8 @@ export interface operations {
13761
13824
  to?: components["parameters"]["InsightsProductivityTo"];
13762
13825
  /** @description Department filter; send `All departments` to include every department. Scoped using imported `thinkai_org_structure` members when present, otherwise SPA org chart `department` nodes and their descendant teams. When neither source defines the requested department, insights return no scoped teams or contributors (not org-wide data). */
13763
13826
  department?: components["parameters"]["InsightsDepartmentFilter"];
13827
+ /** @description AI provider ids to include. Repeat the parameter or send comma-separated values. Empty or omitted includes all supported providers. */
13828
+ provider?: components["parameters"]["InsightsAiUsageProvider"];
13764
13829
  /** @description Team name filter; send `All teams` to include every team. */
13765
13830
  team?: string;
13766
13831
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
@@ -17163,6 +17228,61 @@ export interface operations {
17163
17228
  };
17164
17229
  };
17165
17230
  };
17231
+ recordReportCenterExport: {
17232
+ parameters: {
17233
+ query?: never;
17234
+ header?: never;
17235
+ path: {
17236
+ workspaceId: components["parameters"]["WorkspaceId"];
17237
+ };
17238
+ cookie?: never;
17239
+ };
17240
+ requestBody: {
17241
+ content: {
17242
+ "application/json": components["schemas"]["ReportCenterExportRecordBodyDto"];
17243
+ };
17244
+ };
17245
+ responses: {
17246
+ /** @description Export recorded */
17247
+ 201: {
17248
+ headers: {
17249
+ [name: string]: unknown;
17250
+ };
17251
+ content: {
17252
+ "application/json": components["schemas"]["ReportCenterExportRecordResponseDto"];
17253
+ };
17254
+ };
17255
+ /** @description Invalid body */
17256
+ 400: {
17257
+ headers: {
17258
+ [name: string]: unknown;
17259
+ };
17260
+ content: {
17261
+ "application/json": components["schemas"]["ErrorMessageDto"];
17262
+ };
17263
+ };
17264
+ 401: components["responses"]["Unauthorized"];
17265
+ 403: components["responses"]["Forbidden"];
17266
+ /** @description Workspace does not exist */
17267
+ 404: {
17268
+ headers: {
17269
+ [name: string]: unknown;
17270
+ };
17271
+ content: {
17272
+ "application/json": components["schemas"]["ErrorMessageDto"];
17273
+ };
17274
+ };
17275
+ /** @description Activity log is not supported by this backend build */
17276
+ 501: {
17277
+ headers: {
17278
+ [name: string]: unknown;
17279
+ };
17280
+ content: {
17281
+ "application/json": components["schemas"]["ErrorMessageDto"];
17282
+ };
17283
+ };
17284
+ };
17285
+ };
17166
17286
  listWorkspaceActivity: {
17167
17287
  parameters: {
17168
17288
  query?: {
@@ -17174,7 +17294,7 @@ export interface operations {
17174
17294
  order?: components["parameters"]["PaginationOrder"];
17175
17295
  /** @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. */
17176
17296
  sort?: "when" | "who" | "what" | "why" | "where";
17177
- /** @description Coarse product-area grouping filter (#156). `integration` = GitHub + AI-tool key events; `agentic_foundation` = repos, readiness scans, fixes; `workspace_team` = members + HRIS; `productivity` = productivity ingest lifecycle events. Omit (or pass `all`) for every area. */
17297
+ /** @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. */
17178
17298
  productArea?: "integration" | "agentic_foundation" | "workspace_team" | "productivity" | "all";
17179
17299
  /** @description Filter to a specific event type. */
17180
17300
  eventType?: components["schemas"]["ActivityLogEventTypeDto"];