@thinkai/tai-api-contract 2.48.0 → 2.49.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.
@@ -66,6 +66,156 @@ export interface paths {
66
66
  patch?: never;
67
67
  trace?: never;
68
68
  };
69
+ "/privacy-requests": {
70
+ parameters: {
71
+ query?: never;
72
+ header?: never;
73
+ path?: never;
74
+ cookie?: never;
75
+ };
76
+ get?: never;
77
+ put?: never;
78
+ /**
79
+ * Submit a privacy rights request (public)
80
+ * @description Public, unauthenticated intake for data subject access, erasure, portability, rectification, restriction, and objection requests (#611). No bearer token required.
81
+ * **Abuse controls:** requests are rate limited per client IP (`429` with `Retry-After` when exceeded). A hidden honeypot field (`companyWebsite`) silently absorbs bot submissions. The response shape is identical whether or not the email matches an existing account, so the endpoint cannot be used to enumerate users. Duplicate open requests for the same email and request type within 24h are rejected with `409`.
82
+ * **Identity is not proven** by this route; privacy ops must verify identity before any export or erasure is fulfilled.
83
+ */
84
+ post: operations["submitPublicPrivacyRequest"];
85
+ delete?: never;
86
+ options?: never;
87
+ head?: never;
88
+ patch?: never;
89
+ trace?: never;
90
+ };
91
+ "/me/privacy-requests": {
92
+ parameters: {
93
+ query?: never;
94
+ header?: never;
95
+ path?: never;
96
+ cookie?: never;
97
+ };
98
+ /**
99
+ * List the caller's privacy requests
100
+ * @description Returns privacy requests whose subject is the authenticated caller (matched by user id or email), limited to a reference code and status so callers can track progress.
101
+ */
102
+ get: operations["listMyPrivacyRequests"];
103
+ put?: never;
104
+ /**
105
+ * Submit a privacy request as the authenticated user
106
+ * @description Authenticated intake. The subject is always the caller's own profile; the request is auto-marked identity-verified because the JWT proves identity. Supplying an `email` that does not match the caller is rejected with `400`.
107
+ */
108
+ post: operations["submitMyPrivacyRequest"];
109
+ delete?: never;
110
+ options?: never;
111
+ head?: never;
112
+ patch?: never;
113
+ trace?: never;
114
+ };
115
+ "/workspaces/{workspaceId}/privacy-requests": {
116
+ parameters: {
117
+ query?: never;
118
+ header?: never;
119
+ path?: never;
120
+ cookie?: never;
121
+ };
122
+ get?: never;
123
+ put?: never;
124
+ /**
125
+ * Submit a privacy request on behalf of a workspace member (B2B controller)
126
+ * @description Workspace-admin route for B2B controllers to raise a privacy request on behalf of an employee (`subjectEmail`). The request is bound to the workspace and requires manual identity verification by privacy ops before fulfillment. Non-admin members receive `403`.
127
+ */
128
+ post: operations["submitWorkspacePrivacyRequest"];
129
+ delete?: never;
130
+ options?: never;
131
+ head?: never;
132
+ patch?: never;
133
+ trace?: never;
134
+ };
135
+ "/admin/privacy-requests": {
136
+ parameters: {
137
+ query?: never;
138
+ header?: never;
139
+ path?: never;
140
+ cookie?: never;
141
+ };
142
+ /**
143
+ * List privacy requests (privacy-ops queue)
144
+ * @description Platform-admin queue of privacy requests, newest first, with SLA due dates for triage.
145
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
146
+ */
147
+ get: operations["adminListPrivacyRequests"];
148
+ put?: never;
149
+ post?: never;
150
+ delete?: never;
151
+ options?: never;
152
+ head?: never;
153
+ patch?: never;
154
+ trace?: never;
155
+ };
156
+ "/admin/privacy-requests/{requestId}": {
157
+ parameters: {
158
+ query?: never;
159
+ header?: never;
160
+ path?: never;
161
+ cookie?: never;
162
+ };
163
+ /** Get a privacy request with its event timeline */
164
+ get: operations["adminGetPrivacyRequest"];
165
+ put?: never;
166
+ post?: never;
167
+ delete?: never;
168
+ options?: never;
169
+ head?: never;
170
+ /**
171
+ * Update a privacy request (status, assignee, notes, identity verification)
172
+ * @description Update workflow fields. Setting `markIdentityVerified: true` records the verifying admin and unlocks export and erasure fulfillment. Transitioning `status` to `completed` requires both `fulfillmentAction` and `fulfillmentRef`.
173
+ */
174
+ patch: operations["adminUpdatePrivacyRequest"];
175
+ trace?: never;
176
+ };
177
+ "/admin/privacy-requests/{requestId}/export": {
178
+ parameters: {
179
+ query?: never;
180
+ header?: never;
181
+ path?: never;
182
+ cookie?: never;
183
+ };
184
+ get?: never;
185
+ put?: never;
186
+ /**
187
+ * Generate a DSAR export bundle for a privacy request
188
+ * @description Assembles the subject's personal data across workspaces into a single JSON bundle for an access or portability request, per the PII inventory scope. The subject is resolved by user id or email. Blocked until identity is verified (`403 identity_not_verified`). Bundles larger than the size cap return `413 export_too_large`; scope by workspace in that case. The bundle is generated on demand and not persisted server-side.
189
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
190
+ */
191
+ post: operations["adminExportPrivacyRequest"];
192
+ delete?: never;
193
+ options?: never;
194
+ head?: never;
195
+ patch?: never;
196
+ trace?: never;
197
+ };
198
+ "/admin/privacy-requests/{requestId}/fulfill/person-erasure": {
199
+ parameters: {
200
+ query?: never;
201
+ header?: never;
202
+ path?: never;
203
+ cookie?: never;
204
+ };
205
+ get?: never;
206
+ put?: never;
207
+ /**
208
+ * Fulfill an erasure request by erasing workspace person-level data
209
+ * @description Thin wrapper around workspace person-level insights erasure (#706) for privacy-request fulfillment. Erases or anonymizes the subject's org-chart, AI-tool, dashboard, absence, and readiness data in one workspace. Blocked until identity is verified. Records an audit event on the privacy request with the categories erased.
210
+ * **Authorization:** Bearer JWT required. Caller email must appear in `PLATFORM_ADMIN_EMAILS`.
211
+ */
212
+ post: operations["adminFulfillPrivacyRequestPersonErasure"];
213
+ delete?: never;
214
+ options?: never;
215
+ head?: never;
216
+ patch?: never;
217
+ trace?: never;
218
+ };
69
219
  "/me": {
70
220
  parameters: {
71
221
  query?: never;
@@ -2630,6 +2780,21 @@ export interface components {
2630
2780
  /** @description Applied team name filter from the Measure UI. */
2631
2781
  team: string;
2632
2782
  };
2783
+ /**
2784
+ * @description Echo of the resolved time bucket for this response. `day` when the request used an `Nd`/`cr:`/`from`+`to` window; `week` for legacy weekly rangeIds or `year` heatmap mode.
2785
+ * @enum {string}
2786
+ */
2787
+ ProductivityInsightsGranularity: "day" | "week";
2788
+ ProductivityInsightsDailyBucketDto: {
2789
+ /**
2790
+ * Format: date
2791
+ * @description UTC calendar day (`YYYY-MM-DD`).
2792
+ */
2793
+ date: string;
2794
+ mergedPrCount: number;
2795
+ /** @description GitHub Actions CI build failures on this day from `ciFailureRuns` ledger when CI ingest is enabled. */
2796
+ ciFailuresCount?: number;
2797
+ };
2633
2798
  ProductivityInsightsAggregatedTeamWeekDto: {
2634
2799
  /** Format: date-time */
2635
2800
  bucketStart: string;
@@ -2662,17 +2827,27 @@ export interface components {
2662
2827
  managerLabel?: string;
2663
2828
  /** @description True when the team aggregates GitHub logins not mapped in the org chart (`teamId` `__other`). */
2664
2829
  notInOrgChart?: boolean;
2665
- weeks: components["schemas"]["ProductivityInsightsAggregatedTeamWeekDto"][];
2830
+ /** @description Present in day-mode responses — daily merged PR and CI failure counts. */
2831
+ days?: components["schemas"]["ProductivityInsightsDailyBucketDto"][];
2832
+ weeks?: components["schemas"]["ProductivityInsightsAggregatedTeamWeekDto"][];
2666
2833
  };
2667
- /**
2668
- * @description Weekly bucket count (`4w`=4, `8w`=8, `12w`=12, `16w`=16). Legacy `q` aliases 12 weeks.
2669
- * @enum {string}
2670
- */
2671
- ProductivityInsightsRangeId: "4w" | "8w" | "q" | "12w" | "16w";
2834
+ /** @description Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. */
2835
+ ProductivityInsightsRangeId: string;
2672
2836
  ProductivityInsightsAggregatedTeamsDto: {
2673
2837
  /** Format: uuid */
2674
2838
  workspaceId: string;
2675
2839
  range: components["schemas"]["ProductivityInsightsRangeId"];
2840
+ granularity?: components["schemas"]["ProductivityInsightsGranularity"];
2841
+ /**
2842
+ * Format: date
2843
+ * @description Inclusive start day when `granularity` is `day`.
2844
+ */
2845
+ from?: string;
2846
+ /**
2847
+ * Format: date
2848
+ * @description Inclusive end day when `granularity` is `day`.
2849
+ */
2850
+ to?: string;
2676
2851
  scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
2677
2852
  /** Format: date-time */
2678
2853
  generatedAt: string;
@@ -2700,17 +2875,32 @@ export interface components {
2700
2875
  notInOrgChart?: boolean;
2701
2876
  /** @description GitHub login for unattributed contributors (when notInOrgChart is true). */
2702
2877
  githubLogin?: string;
2703
- weeks: components["schemas"]["ProductivityInsightsMergedPrTrendWeekDto"][];
2878
+ /** @description Present in day-mode responses — daily merged PR counts per contributor. */
2879
+ days?: components["schemas"]["ProductivityInsightsDailyBucketDto"][];
2880
+ weeks?: components["schemas"]["ProductivityInsightsMergedPrTrendWeekDto"][];
2704
2881
  };
2705
2882
  ProductivityInsightsMergedPrTrendsDto: {
2706
2883
  /** Format: uuid */
2707
2884
  workspaceId: string;
2708
2885
  range: components["schemas"]["ProductivityInsightsRangeId"];
2886
+ granularity?: components["schemas"]["ProductivityInsightsGranularity"];
2887
+ /**
2888
+ * Format: date
2889
+ * @description Inclusive start day when `granularity` is `day`.
2890
+ */
2891
+ from?: string;
2892
+ /**
2893
+ * Format: date
2894
+ * @description Inclusive end day when `granularity` is `day`.
2895
+ */
2896
+ to?: string;
2709
2897
  scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
2710
2898
  /** Format: date-time */
2711
2899
  generatedAt: string;
2712
- /** @description Sum of contributor weekly merged PR counts (matches the contributors table). Not deduplicated org-wide unique PRs when the same PR appears on multiple rows. */
2713
- weeks: components["schemas"]["ProductivityInsightsMergedPrTrendWeekDto"][];
2900
+ /** @description Portfolio daily merged PR series in day mode (max of contributor sum and org ledger). */
2901
+ days?: components["schemas"]["ProductivityInsightsDailyBucketDto"][];
2902
+ /** @description Sum of contributor weekly merged PR counts (matches the contributors table). Not deduplicated org-wide unique PRs when the same PR appears on multiple rows. Present in week-mode responses. */
2903
+ weeks?: components["schemas"]["ProductivityInsightsMergedPrTrendWeekDto"][];
2714
2904
  contributors: components["schemas"]["ProductivityInsightsMergedPrContributorRowDto"][];
2715
2905
  };
2716
2906
  ProductivityInsightsTeamLeaderItemDto: {
@@ -2745,18 +2935,31 @@ export interface components {
2745
2935
  notInOrgChart?: boolean;
2746
2936
  /** @description Present when the request included `year` — calendar-year heatmap mode. */
2747
2937
  year?: number;
2938
+ /** @description Daily merged PR and CI failure counts for the selected period when `granularity` is `day` (not present in `year` heatmap mode). */
2939
+ days?: components["schemas"]["ProductivityInsightsDailyBucketDto"][];
2748
2940
  /** @description Daily buckets aggregated from ingested person-level merged PR events for the selected period range or calendar year (same source as memberContributors). */
2749
2941
  heatmapWeeks?: components["schemas"]["ProductivityInsightsContributorActivityWeekDto"][];
2750
2942
  heatmapSummary?: components["schemas"]["ProductivityInsightsContributorActivitySummaryDto"];
2751
2943
  /** @description Per-member merged PR weekly series for the selected period or year — person-level source aligned with heatmapWeeks and the team roster table. */
2752
2944
  memberContributors?: components["schemas"]["ProductivityInsightsMergedPrContributorRowDto"][];
2753
- weeks: components["schemas"]["ProductivityInsightsAggregatedTeamWeekDto"][];
2945
+ weeks?: components["schemas"]["ProductivityInsightsAggregatedTeamWeekDto"][];
2754
2946
  summary: components["schemas"]["ProductivityInsightsTeamSummaryDto"];
2755
2947
  };
2756
2948
  ProductivityInsightsTeamsResponseDto: {
2757
2949
  /** Format: uuid */
2758
2950
  workspaceId: string;
2759
2951
  range: components["schemas"]["ProductivityInsightsRangeId"];
2952
+ granularity?: components["schemas"]["ProductivityInsightsGranularity"];
2953
+ /**
2954
+ * Format: date
2955
+ * @description Inclusive start day when `granularity` is `day`.
2956
+ */
2957
+ from?: string;
2958
+ /**
2959
+ * Format: date
2960
+ * @description Inclusive end day when `granularity` is `day`.
2961
+ */
2962
+ to?: string;
2760
2963
  /** @description Present when the request included `year` — calendar-year heatmap mode. */
2761
2964
  year?: number;
2762
2965
  scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
@@ -2840,6 +3043,17 @@ export interface components {
2840
3043
  workspaceId: string;
2841
3044
  contributorId: string;
2842
3045
  range: components["schemas"]["ProductivityInsightsRangeId"];
3046
+ granularity?: components["schemas"]["ProductivityInsightsGranularity"];
3047
+ /**
3048
+ * Format: date
3049
+ * @description Inclusive start day when `granularity` is `day`.
3050
+ */
3051
+ from?: string;
3052
+ /**
3053
+ * Format: date
3054
+ * @description Inclusive end day when `granularity` is `day`.
3055
+ */
3056
+ to?: string;
2843
3057
  /** @description Present when the request included `year` — calendar-year heatmap mode. */
2844
3058
  year?: number;
2845
3059
  scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
@@ -2848,7 +3062,9 @@ export interface components {
2848
3062
  /** @description True when the workspace has opted in to GitHub Actions CI ingest. */
2849
3063
  githubActionsCiEnabled?: boolean;
2850
3064
  contributor: components["schemas"]["ProductivityInsightsContributorProfileDto"];
2851
- weeks: components["schemas"]["ProductivityInsightsContributorActivityWeekDto"][];
3065
+ /** @description Daily merged PR and CI failure counts for the selected period when `granularity` is `day` (not present in `year` heatmap mode). */
3066
+ days?: components["schemas"]["ProductivityInsightsDailyBucketDto"][];
3067
+ weeks?: components["schemas"]["ProductivityInsightsContributorActivityWeekDto"][];
2852
3068
  summary: components["schemas"]["ProductivityInsightsContributorActivitySummaryDto"];
2853
3069
  };
2854
3070
  ProductivityInsightsNeedsAttentionItemDto: {
@@ -2872,6 +3088,17 @@ export interface components {
2872
3088
  /** Format: uuid */
2873
3089
  workspaceId: string;
2874
3090
  range: components["schemas"]["ProductivityInsightsRangeId"];
3091
+ granularity?: components["schemas"]["ProductivityInsightsGranularity"];
3092
+ /**
3093
+ * Format: date
3094
+ * @description Inclusive start day when `granularity` is `day`.
3095
+ */
3096
+ from?: string;
3097
+ /**
3098
+ * Format: date
3099
+ * @description Inclusive end day when `granularity` is `day`.
3100
+ */
3101
+ to?: string;
2875
3102
  scope: components["schemas"]["ProductivityInsightsAggregatedTeamsScopeDto"];
2876
3103
  /** @enum {string} */
2877
3104
  entityType: "teams" | "contributors";
@@ -3181,6 +3408,8 @@ export interface components {
3181
3408
  name: string;
3182
3409
  roles: string[];
3183
3410
  defaultWorkspaceId?: string | null;
3411
+ /** @description True when the caller's email is on the `PLATFORM_ADMIN_EMAILS` allowlist. Lets the frontend gate platform-admin surfaces (e.g. the privacy-request queue) without duplicating the allowlist client-side. */
3412
+ isPlatformAdmin?: boolean;
3184
3413
  };
3185
3414
  UpdateMeBodyDto: {
3186
3415
  name?: string;
@@ -3194,6 +3423,190 @@ export interface components {
3194
3423
  */
3195
3424
  email: string;
3196
3425
  };
3426
+ /**
3427
+ * @description Data subject right being exercised (GDPR Arts. 15–21 / UAE PDPL).
3428
+ * @enum {string}
3429
+ */
3430
+ PrivacyRequestType: "access" | "erasure" | "portability" | "rectification" | "restriction" | "objection";
3431
+ /**
3432
+ * @description Workflow status of a privacy request.
3433
+ * @enum {string}
3434
+ */
3435
+ PrivacyRequestStatus: "pending" | "in_progress" | "completed" | "rejected";
3436
+ /**
3437
+ * @description How the request was submitted.
3438
+ * @enum {string}
3439
+ */
3440
+ PrivacyRequestIntakeChannel: "public" | "authenticated" | "workspace_admin";
3441
+ CreatePrivacyRequestBodyDto: {
3442
+ /**
3443
+ * Format: email
3444
+ * @description Subject's email address.
3445
+ */
3446
+ email: string;
3447
+ requestType: components["schemas"]["PrivacyRequestType"];
3448
+ /** @description Optional free-text description of the request (max 4000 chars). */
3449
+ details?: string;
3450
+ /** @description Optional free-text hint (e.g. company or workspace name) to help privacy ops locate the subject. Never bound to a workspace id on the public channel. */
3451
+ workspaceHint?: string;
3452
+ /** @description Honeypot field. Must be left empty by real clients; non-empty submissions are silently accepted but not persisted. Rendered hidden in the UI. */
3453
+ companyWebsite?: string;
3454
+ };
3455
+ CreateMyPrivacyRequestBodyDto: {
3456
+ requestType: components["schemas"]["PrivacyRequestType"];
3457
+ details?: string;
3458
+ /**
3459
+ * Format: email
3460
+ * @description Optional. If provided it must match the caller's own email; a differing value is rejected with `400 email_override_rejected`.
3461
+ */
3462
+ email?: string;
3463
+ };
3464
+ CreateWorkspacePrivacyRequestBodyDto: {
3465
+ /**
3466
+ * Format: email
3467
+ * @description Email of the workspace member the request is raised on behalf of.
3468
+ */
3469
+ subjectEmail: string;
3470
+ requestType: components["schemas"]["PrivacyRequestType"];
3471
+ details?: string;
3472
+ };
3473
+ CreatePrivacyRequestResultDto: {
3474
+ /** @description Human-friendly tracking code (e.g. `PR-2026-00042`). */
3475
+ referenceCode: string;
3476
+ requestType: components["schemas"]["PrivacyRequestType"];
3477
+ status: components["schemas"]["PrivacyRequestStatus"];
3478
+ /**
3479
+ * Format: date-time
3480
+ * @description When the request should be resolved by (default 30 days from submission).
3481
+ */
3482
+ slaDueAt: string;
3483
+ };
3484
+ MyPrivacyRequestSummaryDto: {
3485
+ referenceCode: string;
3486
+ requestType: components["schemas"]["PrivacyRequestType"];
3487
+ status: components["schemas"]["PrivacyRequestStatus"];
3488
+ /** Format: date-time */
3489
+ createdAt: string;
3490
+ /** Format: date-time */
3491
+ slaDueAt: string;
3492
+ /** Format: date-time */
3493
+ completedAt?: string | null;
3494
+ };
3495
+ MyPrivacyRequestListDto: {
3496
+ requests: components["schemas"]["MyPrivacyRequestSummaryDto"][];
3497
+ };
3498
+ PrivacyRequestDto: {
3499
+ /** Format: uuid */
3500
+ id: string;
3501
+ referenceCode: string;
3502
+ requestType: components["schemas"]["PrivacyRequestType"];
3503
+ status: components["schemas"]["PrivacyRequestStatus"];
3504
+ intakeChannel: components["schemas"]["PrivacyRequestIntakeChannel"];
3505
+ subjectEmail: string;
3506
+ /** Format: uuid */
3507
+ subjectUserId?: string | null;
3508
+ /**
3509
+ * Format: uuid
3510
+ * @description Set only for workspace-admin (B2B) submissions.
3511
+ */
3512
+ workspaceId?: string | null;
3513
+ subjectWorkspaceHint?: string | null;
3514
+ /** Format: uuid */
3515
+ requestedByUserId?: string | null;
3516
+ details?: string | null;
3517
+ internalNotes?: string | null;
3518
+ assignedTo?: string | null;
3519
+ /** Format: date-time */
3520
+ identityVerifiedAt?: string | null;
3521
+ verifiedBy?: string | null;
3522
+ fulfillmentAction?: string | null;
3523
+ fulfillmentRef?: string | null;
3524
+ /** Format: date-time */
3525
+ slaDueAt: string;
3526
+ /** Format: date-time */
3527
+ completedAt?: string | null;
3528
+ /** Format: date-time */
3529
+ createdAt: string;
3530
+ /** Format: date-time */
3531
+ updatedAt: string;
3532
+ /** @description True when the SLA due date has passed and the request is not completed/rejected. */
3533
+ overdue?: boolean;
3534
+ };
3535
+ PrivacyRequestEventDto: {
3536
+ /** Format: uuid */
3537
+ id: string;
3538
+ /** @enum {string} */
3539
+ eventType: "submitted" | "identity_verified" | "status_changed" | "assigned" | "export_generated" | "fulfillment_noted" | "duplicate_rejected";
3540
+ actorEmail?: string | null;
3541
+ payload?: {
3542
+ [key: string]: unknown;
3543
+ } | null;
3544
+ /** Format: date-time */
3545
+ createdAt: string;
3546
+ };
3547
+ PrivacyRequestDetailDto: {
3548
+ request: components["schemas"]["PrivacyRequestDto"];
3549
+ events: components["schemas"]["PrivacyRequestEventDto"][];
3550
+ };
3551
+ PrivacyRequestListDto: {
3552
+ requests: components["schemas"]["PrivacyRequestDto"][];
3553
+ };
3554
+ UpdatePrivacyRequestBodyDto: {
3555
+ status?: components["schemas"]["PrivacyRequestStatus"];
3556
+ assignedTo?: string | null;
3557
+ internalNotes?: string | null;
3558
+ /** @description When true, records the caller as the verifier and unlocks export/erasure. */
3559
+ markIdentityVerified?: boolean;
3560
+ /** @description Short label for how the request was fulfilled (required when completing). */
3561
+ fulfillmentAction?: string;
3562
+ /** @description Reference to the fulfillment artifact (e.g. deletion job id; required when completing). */
3563
+ fulfillmentRef?: string;
3564
+ };
3565
+ FulfillPersonErasureBodyDto: {
3566
+ /** Format: uuid */
3567
+ workspaceId: string;
3568
+ /** @description Org-chart person id (usually the subject's email) within the workspace. */
3569
+ personId: string;
3570
+ orgChart?: boolean;
3571
+ dashboardMetrics?: boolean;
3572
+ aiToolData?: boolean;
3573
+ absences?: boolean;
3574
+ readinessAnonymize?: boolean;
3575
+ };
3576
+ PrivacyRequestPersonErasureResultDto: {
3577
+ deleted: boolean;
3578
+ aiToolRowsDeleted?: number;
3579
+ absencesDeleted?: number;
3580
+ readinessRunsAnonymized?: number;
3581
+ auditEntriesAnonymized?: number;
3582
+ };
3583
+ /** @description DSAR export bundle assembled on demand for an access/portability request. `sections` holds the subject's data grouped by source; shapes vary by section, so values are opaque objects. */
3584
+ PrivacyRequestExportDto: {
3585
+ metadata: {
3586
+ referenceCode: string;
3587
+ /** Format: date-time */
3588
+ generatedAt: string;
3589
+ subjectEmail: string;
3590
+ subjectUserId?: string | null;
3591
+ workspaceCount?: number;
3592
+ /** @description Data categories intentionally excluded from the bundle. */
3593
+ excluded?: string[];
3594
+ /** @description Redaction policy applied to readiness runs (e.g. `requester_runs_only`). */
3595
+ readinessRedaction?: string;
3596
+ };
3597
+ /** @description Profile and consent records for the subject. */
3598
+ subject: {
3599
+ [key: string]: unknown;
3600
+ };
3601
+ /** @description Per-source personal data (memberships, AI-tool, dashboard, absences, org chart, activity). */
3602
+ sections?: {
3603
+ [key: string]: unknown;
3604
+ };
3605
+ /** @description Workspaces where person-keyed rows exist but the subject has no membership (#269). */
3606
+ residualPersonData?: {
3607
+ [key: string]: unknown;
3608
+ }[];
3609
+ };
3197
3610
  WorkspaceSummaryDto: {
3198
3611
  id: string;
3199
3612
  slug: string;
@@ -4681,9 +5094,15 @@ export interface components {
4681
5094
  NotificationId: string;
4682
5095
  /** @description Workspace member user id (`tai_users.id`). */
4683
5096
  WorkspaceMemberId: string;
5097
+ /** @description Privacy request id (`tai_privacy_requests.id`). */
5098
+ PrivacyRequestId: string;
4684
5099
  FixId: string;
4685
- /** @description Productivity insights time range in weeks (`4w`=4, `8w`=8, `12w`=12, `16w`=16). Legacy `q` is an alias for 12 weeks. */
4686
- InsightsProductivityRangeId: "4w" | "8w" | "q" | "12w" | "16w";
5100
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
5101
+ InsightsProductivityRangeId: string;
5102
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
5103
+ InsightsProductivityFrom: string;
5104
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
5105
+ InsightsProductivityTo: string;
4687
5106
  /** @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). */
4688
5107
  InsightsDepartmentFilter: string;
4689
5108
  /** @description Page size (default 25, max 100). */
@@ -4758,6 +5177,8 @@ export type DashboardProductivityMetricsDto = components['schemas']['DashboardPr
4758
5177
  export type DashboardProductivityDto = components['schemas']['DashboardProductivityDto'];
4759
5178
  export type DashboardProductivityHistoryDto = components['schemas']['DashboardProductivityHistoryDto'];
4760
5179
  export type ProductivityInsightsAggregatedTeamsScopeDto = components['schemas']['ProductivityInsightsAggregatedTeamsScopeDto'];
5180
+ export type ProductivityInsightsGranularity = components['schemas']['ProductivityInsightsGranularity'];
5181
+ export type ProductivityInsightsDailyBucketDto = components['schemas']['ProductivityInsightsDailyBucketDto'];
4761
5182
  export type ProductivityInsightsAggregatedTeamWeekDto = components['schemas']['ProductivityInsightsAggregatedTeamWeekDto'];
4762
5183
  export type ProductivityInsightsAggregatedTeamRowDto = components['schemas']['ProductivityInsightsAggregatedTeamRowDto'];
4763
5184
  export type ProductivityInsightsRangeId = components['schemas']['ProductivityInsightsRangeId'];
@@ -4811,6 +5232,23 @@ export type AiToolMemberDetailDto = components['schemas']['AiToolMemberDetailDto
4811
5232
  export type MeProfileDto = components['schemas']['MeProfileDto'];
4812
5233
  export type UpdateMeBodyDto = components['schemas']['UpdateMeBodyDto'];
4813
5234
  export type DeleteMeBodyDto = components['schemas']['DeleteMeBodyDto'];
5235
+ export type PrivacyRequestType = components['schemas']['PrivacyRequestType'];
5236
+ export type PrivacyRequestStatus = components['schemas']['PrivacyRequestStatus'];
5237
+ export type PrivacyRequestIntakeChannel = components['schemas']['PrivacyRequestIntakeChannel'];
5238
+ export type CreatePrivacyRequestBodyDto = components['schemas']['CreatePrivacyRequestBodyDto'];
5239
+ export type CreateMyPrivacyRequestBodyDto = components['schemas']['CreateMyPrivacyRequestBodyDto'];
5240
+ export type CreateWorkspacePrivacyRequestBodyDto = components['schemas']['CreateWorkspacePrivacyRequestBodyDto'];
5241
+ export type CreatePrivacyRequestResultDto = components['schemas']['CreatePrivacyRequestResultDto'];
5242
+ export type MyPrivacyRequestSummaryDto = components['schemas']['MyPrivacyRequestSummaryDto'];
5243
+ export type MyPrivacyRequestListDto = components['schemas']['MyPrivacyRequestListDto'];
5244
+ export type PrivacyRequestDto = components['schemas']['PrivacyRequestDto'];
5245
+ export type PrivacyRequestEventDto = components['schemas']['PrivacyRequestEventDto'];
5246
+ export type PrivacyRequestDetailDto = components['schemas']['PrivacyRequestDetailDto'];
5247
+ export type PrivacyRequestListDto = components['schemas']['PrivacyRequestListDto'];
5248
+ export type UpdatePrivacyRequestBodyDto = components['schemas']['UpdatePrivacyRequestBodyDto'];
5249
+ export type FulfillPersonErasureBodyDto = components['schemas']['FulfillPersonErasureBodyDto'];
5250
+ export type PrivacyRequestPersonErasureResultDto = components['schemas']['PrivacyRequestPersonErasureResultDto'];
5251
+ export type PrivacyRequestExportDto = components['schemas']['PrivacyRequestExportDto'];
4814
5252
  export type WorkspaceSummaryDto = components['schemas']['WorkspaceSummaryDto'];
4815
5253
  export type WorkspacesForUserDto = components['schemas']['WorkspacesForUserDto'];
4816
5254
  export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyDto'];
@@ -4950,8 +5388,11 @@ export type ParameterProviderSlug = components['parameters']['ProviderSlug'];
4950
5388
  export type ParameterProjectId = components['parameters']['ProjectId'];
4951
5389
  export type ParameterNotificationId = components['parameters']['NotificationId'];
4952
5390
  export type ParameterWorkspaceMemberId = components['parameters']['WorkspaceMemberId'];
5391
+ export type ParameterPrivacyRequestId = components['parameters']['PrivacyRequestId'];
4953
5392
  export type ParameterFixId = components['parameters']['FixId'];
4954
5393
  export type ParameterInsightsProductivityRangeId = components['parameters']['InsightsProductivityRangeId'];
5394
+ export type ParameterInsightsProductivityFrom = components['parameters']['InsightsProductivityFrom'];
5395
+ export type ParameterInsightsProductivityTo = components['parameters']['InsightsProductivityTo'];
4955
5396
  export type ParameterInsightsDepartmentFilter = components['parameters']['InsightsDepartmentFilter'];
4956
5397
  export type ParameterPaginationLimit = components['parameters']['PaginationLimit'];
4957
5398
  export type ParameterPaginationOffset = components['parameters']['PaginationOffset'];
@@ -5164,6 +5605,477 @@ export interface operations {
5164
5605
  };
5165
5606
  };
5166
5607
  };
5608
+ submitPublicPrivacyRequest: {
5609
+ parameters: {
5610
+ query?: never;
5611
+ header?: never;
5612
+ path?: never;
5613
+ cookie?: never;
5614
+ };
5615
+ requestBody: {
5616
+ content: {
5617
+ "application/json": components["schemas"]["CreatePrivacyRequestBodyDto"];
5618
+ };
5619
+ };
5620
+ responses: {
5621
+ /** @description Request accepted and queued for privacy ops. */
5622
+ 201: {
5623
+ headers: {
5624
+ [name: string]: unknown;
5625
+ };
5626
+ content: {
5627
+ "application/json": components["schemas"]["CreatePrivacyRequestResultDto"];
5628
+ };
5629
+ };
5630
+ /** @description Missing or invalid email, unknown request type, or details too long. */
5631
+ 400: {
5632
+ headers: {
5633
+ [name: string]: unknown;
5634
+ };
5635
+ content: {
5636
+ /**
5637
+ * @example {
5638
+ * "error": "A valid email is required",
5639
+ * "code": "invalid_email"
5640
+ * }
5641
+ */
5642
+ "application/json": components["schemas"]["ErrorMessageDto"];
5643
+ };
5644
+ };
5645
+ /** @description An open request for this email and type already exists. */
5646
+ 409: {
5647
+ headers: {
5648
+ [name: string]: unknown;
5649
+ };
5650
+ content: {
5651
+ /**
5652
+ * @example {
5653
+ * "error": "An open request for this email already exists",
5654
+ * "code": "duplicate_open_request"
5655
+ * }
5656
+ */
5657
+ "application/json": components["schemas"]["ErrorMessageDto"];
5658
+ };
5659
+ };
5660
+ /** @description Too many submissions from this client; retry later. */
5661
+ 429: {
5662
+ headers: {
5663
+ [name: string]: unknown;
5664
+ };
5665
+ content: {
5666
+ /**
5667
+ * @example {
5668
+ * "error": "Too many requests",
5669
+ * "code": "too_many_requests"
5670
+ * }
5671
+ */
5672
+ "application/json": components["schemas"]["ErrorMessageDto"];
5673
+ };
5674
+ };
5675
+ };
5676
+ };
5677
+ listMyPrivacyRequests: {
5678
+ parameters: {
5679
+ query?: never;
5680
+ header?: never;
5681
+ path?: never;
5682
+ cookie?: never;
5683
+ };
5684
+ requestBody?: never;
5685
+ responses: {
5686
+ /** @description Caller's privacy requests, newest first. */
5687
+ 200: {
5688
+ headers: {
5689
+ [name: string]: unknown;
5690
+ };
5691
+ content: {
5692
+ "application/json": components["schemas"]["MyPrivacyRequestListDto"];
5693
+ };
5694
+ };
5695
+ 401: components["responses"]["Unauthorized"];
5696
+ };
5697
+ };
5698
+ submitMyPrivacyRequest: {
5699
+ parameters: {
5700
+ query?: never;
5701
+ header?: never;
5702
+ path?: never;
5703
+ cookie?: never;
5704
+ };
5705
+ requestBody: {
5706
+ content: {
5707
+ "application/json": components["schemas"]["CreateMyPrivacyRequestBodyDto"];
5708
+ };
5709
+ };
5710
+ responses: {
5711
+ /** @description Request accepted and queued. */
5712
+ 201: {
5713
+ headers: {
5714
+ [name: string]: unknown;
5715
+ };
5716
+ content: {
5717
+ "application/json": components["schemas"]["CreatePrivacyRequestResultDto"];
5718
+ };
5719
+ };
5720
+ /** @description Unknown request type, details too long, or email override attempted. */
5721
+ 400: {
5722
+ headers: {
5723
+ [name: string]: unknown;
5724
+ };
5725
+ content: {
5726
+ /**
5727
+ * @example {
5728
+ * "error": "Email cannot be overridden on an authenticated request",
5729
+ * "code": "email_override_rejected"
5730
+ * }
5731
+ */
5732
+ "application/json": components["schemas"]["ErrorMessageDto"];
5733
+ };
5734
+ };
5735
+ 401: components["responses"]["Unauthorized"];
5736
+ /** @description An open request for this subject and type already exists. */
5737
+ 409: {
5738
+ headers: {
5739
+ [name: string]: unknown;
5740
+ };
5741
+ content: {
5742
+ "application/json": components["schemas"]["ErrorMessageDto"];
5743
+ };
5744
+ };
5745
+ };
5746
+ };
5747
+ submitWorkspacePrivacyRequest: {
5748
+ parameters: {
5749
+ query?: never;
5750
+ header?: never;
5751
+ path: {
5752
+ workspaceId: components["parameters"]["WorkspaceId"];
5753
+ };
5754
+ cookie?: never;
5755
+ };
5756
+ requestBody: {
5757
+ content: {
5758
+ "application/json": components["schemas"]["CreateWorkspacePrivacyRequestBodyDto"];
5759
+ };
5760
+ };
5761
+ responses: {
5762
+ /** @description Request accepted and queued. */
5763
+ 201: {
5764
+ headers: {
5765
+ [name: string]: unknown;
5766
+ };
5767
+ content: {
5768
+ "application/json": components["schemas"]["CreatePrivacyRequestResultDto"];
5769
+ };
5770
+ };
5771
+ /** @description Invalid subject email, unknown request type, or details too long. */
5772
+ 400: {
5773
+ headers: {
5774
+ [name: string]: unknown;
5775
+ };
5776
+ content: {
5777
+ "application/json": components["schemas"]["ErrorMessageDto"];
5778
+ };
5779
+ };
5780
+ 401: components["responses"]["Unauthorized"];
5781
+ /** @description Caller is not a workspace admin. */
5782
+ 403: {
5783
+ headers: {
5784
+ [name: string]: unknown;
5785
+ };
5786
+ content: {
5787
+ /**
5788
+ * @example {
5789
+ * "error": "Forbidden",
5790
+ * "code": "workspace_admin_required"
5791
+ * }
5792
+ */
5793
+ "application/json": components["schemas"]["ErrorMessageDto"];
5794
+ };
5795
+ };
5796
+ /** @description Workspace not found. */
5797
+ 404: {
5798
+ headers: {
5799
+ [name: string]: unknown;
5800
+ };
5801
+ content: {
5802
+ "application/json": components["schemas"]["ErrorMessageDto"];
5803
+ };
5804
+ };
5805
+ };
5806
+ };
5807
+ adminListPrivacyRequests: {
5808
+ parameters: {
5809
+ query?: {
5810
+ /** @description Filter by workflow status. */
5811
+ status?: components["schemas"]["PrivacyRequestStatus"];
5812
+ /** @description Filter by request type. */
5813
+ requestType?: components["schemas"]["PrivacyRequestType"];
5814
+ /** @description When true, return only requests past their SLA due date and not yet completed. */
5815
+ overdue?: boolean;
5816
+ /** @description Maximum number of rows to return (default 100, max 200). */
5817
+ limit?: number;
5818
+ };
5819
+ header?: never;
5820
+ path?: never;
5821
+ cookie?: never;
5822
+ };
5823
+ requestBody?: never;
5824
+ responses: {
5825
+ /** @description Privacy request queue. */
5826
+ 200: {
5827
+ headers: {
5828
+ [name: string]: unknown;
5829
+ };
5830
+ content: {
5831
+ "application/json": components["schemas"]["PrivacyRequestListDto"];
5832
+ };
5833
+ };
5834
+ 401: components["responses"]["Unauthorized"];
5835
+ /** @description Caller is not a platform admin. */
5836
+ 403: {
5837
+ headers: {
5838
+ [name: string]: unknown;
5839
+ };
5840
+ content: {
5841
+ /**
5842
+ * @example {
5843
+ * "error": "Forbidden",
5844
+ * "code": "forbidden"
5845
+ * }
5846
+ */
5847
+ "application/json": components["schemas"]["ErrorMessageDto"];
5848
+ };
5849
+ };
5850
+ };
5851
+ };
5852
+ adminGetPrivacyRequest: {
5853
+ parameters: {
5854
+ query?: never;
5855
+ header?: never;
5856
+ path: {
5857
+ /** @description Privacy request id (`tai_privacy_requests.id`). */
5858
+ requestId: components["parameters"]["PrivacyRequestId"];
5859
+ };
5860
+ cookie?: never;
5861
+ };
5862
+ requestBody?: never;
5863
+ responses: {
5864
+ /** @description Privacy request detail with audit timeline. */
5865
+ 200: {
5866
+ headers: {
5867
+ [name: string]: unknown;
5868
+ };
5869
+ content: {
5870
+ "application/json": components["schemas"]["PrivacyRequestDetailDto"];
5871
+ };
5872
+ };
5873
+ 401: components["responses"]["Unauthorized"];
5874
+ /** @description Caller is not a platform admin. */
5875
+ 403: {
5876
+ headers: {
5877
+ [name: string]: unknown;
5878
+ };
5879
+ content: {
5880
+ "application/json": components["schemas"]["ErrorMessageDto"];
5881
+ };
5882
+ };
5883
+ /** @description Request not found. */
5884
+ 404: {
5885
+ headers: {
5886
+ [name: string]: unknown;
5887
+ };
5888
+ content: {
5889
+ "application/json": components["schemas"]["ErrorMessageDto"];
5890
+ };
5891
+ };
5892
+ };
5893
+ };
5894
+ adminUpdatePrivacyRequest: {
5895
+ parameters: {
5896
+ query?: never;
5897
+ header?: never;
5898
+ path: {
5899
+ /** @description Privacy request id (`tai_privacy_requests.id`). */
5900
+ requestId: components["parameters"]["PrivacyRequestId"];
5901
+ };
5902
+ cookie?: never;
5903
+ };
5904
+ requestBody: {
5905
+ content: {
5906
+ "application/json": components["schemas"]["UpdatePrivacyRequestBodyDto"];
5907
+ };
5908
+ };
5909
+ responses: {
5910
+ /** @description Updated privacy request detail. */
5911
+ 200: {
5912
+ headers: {
5913
+ [name: string]: unknown;
5914
+ };
5915
+ content: {
5916
+ "application/json": components["schemas"]["PrivacyRequestDetailDto"];
5917
+ };
5918
+ };
5919
+ /** @description Invalid field value or missing fulfillment metadata for completion. */
5920
+ 400: {
5921
+ headers: {
5922
+ [name: string]: unknown;
5923
+ };
5924
+ content: {
5925
+ /**
5926
+ * @example {
5927
+ * "error": "Completing a request requires a fulfillment action and reference",
5928
+ * "code": "fulfillment_metadata_required"
5929
+ * }
5930
+ */
5931
+ "application/json": components["schemas"]["ErrorMessageDto"];
5932
+ };
5933
+ };
5934
+ 401: components["responses"]["Unauthorized"];
5935
+ /** @description Caller is not a platform admin. */
5936
+ 403: {
5937
+ headers: {
5938
+ [name: string]: unknown;
5939
+ };
5940
+ content: {
5941
+ "application/json": components["schemas"]["ErrorMessageDto"];
5942
+ };
5943
+ };
5944
+ /** @description Request not found. */
5945
+ 404: {
5946
+ headers: {
5947
+ [name: string]: unknown;
5948
+ };
5949
+ content: {
5950
+ "application/json": components["schemas"]["ErrorMessageDto"];
5951
+ };
5952
+ };
5953
+ };
5954
+ };
5955
+ adminExportPrivacyRequest: {
5956
+ parameters: {
5957
+ query?: never;
5958
+ header?: never;
5959
+ path: {
5960
+ /** @description Privacy request id (`tai_privacy_requests.id`). */
5961
+ requestId: components["parameters"]["PrivacyRequestId"];
5962
+ };
5963
+ cookie?: never;
5964
+ };
5965
+ requestBody?: never;
5966
+ responses: {
5967
+ /** @description DSAR export bundle (also offered as a file download via Content-Disposition). */
5968
+ 200: {
5969
+ headers: {
5970
+ [name: string]: unknown;
5971
+ };
5972
+ content: {
5973
+ "application/json": components["schemas"]["PrivacyRequestExportDto"];
5974
+ };
5975
+ };
5976
+ 401: components["responses"]["Unauthorized"];
5977
+ /** @description Caller is not a platform admin, or identity has not been verified. */
5978
+ 403: {
5979
+ headers: {
5980
+ [name: string]: unknown;
5981
+ };
5982
+ content: {
5983
+ /**
5984
+ * @example {
5985
+ * "error": "Identity must be verified before export",
5986
+ * "code": "identity_not_verified"
5987
+ * }
5988
+ */
5989
+ "application/json": components["schemas"]["ErrorMessageDto"];
5990
+ };
5991
+ };
5992
+ /** @description Request not found. */
5993
+ 404: {
5994
+ headers: {
5995
+ [name: string]: unknown;
5996
+ };
5997
+ content: {
5998
+ "application/json": components["schemas"]["ErrorMessageDto"];
5999
+ };
6000
+ };
6001
+ /** @description Export exceeds the size cap; scope the request by workspace. */
6002
+ 413: {
6003
+ headers: {
6004
+ [name: string]: unknown;
6005
+ };
6006
+ content: {
6007
+ /**
6008
+ * @example {
6009
+ * "error": "Export bundle is too large; scope by workspace",
6010
+ * "code": "export_too_large"
6011
+ * }
6012
+ */
6013
+ "application/json": components["schemas"]["ErrorMessageDto"];
6014
+ };
6015
+ };
6016
+ };
6017
+ };
6018
+ adminFulfillPrivacyRequestPersonErasure: {
6019
+ parameters: {
6020
+ query?: never;
6021
+ header?: never;
6022
+ path: {
6023
+ /** @description Privacy request id (`tai_privacy_requests.id`). */
6024
+ requestId: components["parameters"]["PrivacyRequestId"];
6025
+ };
6026
+ cookie?: never;
6027
+ };
6028
+ requestBody: {
6029
+ content: {
6030
+ "application/json": components["schemas"]["FulfillPersonErasureBodyDto"];
6031
+ };
6032
+ };
6033
+ responses: {
6034
+ /** @description Erasure result. */
6035
+ 200: {
6036
+ headers: {
6037
+ [name: string]: unknown;
6038
+ };
6039
+ content: {
6040
+ "application/json": components["schemas"]["PrivacyRequestPersonErasureResultDto"];
6041
+ };
6042
+ };
6043
+ /** @description Missing workspaceId/personId or invalid options. */
6044
+ 400: {
6045
+ headers: {
6046
+ [name: string]: unknown;
6047
+ };
6048
+ content: {
6049
+ "application/json": components["schemas"]["ErrorMessageDto"];
6050
+ };
6051
+ };
6052
+ 401: components["responses"]["Unauthorized"];
6053
+ /** @description Caller is not a platform admin, or identity has not been verified. */
6054
+ 403: {
6055
+ headers: {
6056
+ [name: string]: unknown;
6057
+ };
6058
+ content: {
6059
+ /**
6060
+ * @example {
6061
+ * "error": "Identity must be verified before erasure",
6062
+ * "code": "identity_not_verified"
6063
+ * }
6064
+ */
6065
+ "application/json": components["schemas"]["ErrorMessageDto"];
6066
+ };
6067
+ };
6068
+ /** @description Request not found, or person not found in the workspace org chart. */
6069
+ 404: {
6070
+ headers: {
6071
+ [name: string]: unknown;
6072
+ };
6073
+ content: {
6074
+ "application/json": components["schemas"]["ErrorMessageDto"];
6075
+ };
6076
+ };
6077
+ };
6078
+ };
5167
6079
  getMe: {
5168
6080
  parameters: {
5169
6081
  query?: never;
@@ -5994,8 +6906,12 @@ export interface operations {
5994
6906
  getProductivityInsightsAggregatedTeams: {
5995
6907
  parameters: {
5996
6908
  query?: {
5997
- /** @description Productivity insights time range in weeks (`4w`=4, `8w`=8, `12w`=12, `16w`=16). Legacy `q` is an alias for 12 weeks. */
6909
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
5998
6910
  rangeId?: components["parameters"]["InsightsProductivityRangeId"];
6911
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
6912
+ from?: components["parameters"]["InsightsProductivityFrom"];
6913
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
6914
+ to?: components["parameters"]["InsightsProductivityTo"];
5999
6915
  /** @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). */
6000
6916
  department?: components["parameters"]["InsightsDepartmentFilter"];
6001
6917
  /** @description Team name filter; send `All teams` to include every team. */
@@ -6046,8 +6962,12 @@ export interface operations {
6046
6962
  getProductivityInsightsMergedPrTrends: {
6047
6963
  parameters: {
6048
6964
  query?: {
6049
- /** @description Productivity insights time range in weeks (`4w`=4, `8w`=8, `12w`=12, `16w`=16). Legacy `q` is an alias for 12 weeks. */
6965
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
6050
6966
  rangeId?: components["parameters"]["InsightsProductivityRangeId"];
6967
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
6968
+ from?: components["parameters"]["InsightsProductivityFrom"];
6969
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
6970
+ to?: components["parameters"]["InsightsProductivityTo"];
6051
6971
  /** @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). */
6052
6972
  department?: components["parameters"]["InsightsDepartmentFilter"];
6053
6973
  /** @description Team name filter; send `All teams` to include every team. */
@@ -6102,8 +7022,12 @@ export interface operations {
6102
7022
  teamId?: string;
6103
7023
  /** @description Maximum top-team rows when `teamId` is omitted (UI default 3). */
6104
7024
  limit?: number;
6105
- /** @description Productivity insights time range in weeks (`4w`=4, `8w`=8, `12w`=12, `16w`=16). Legacy `q` is an alias for 12 weeks. */
7025
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
6106
7026
  rangeId?: components["parameters"]["InsightsProductivityRangeId"];
7027
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
7028
+ from?: components["parameters"]["InsightsProductivityFrom"];
7029
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
7030
+ to?: components["parameters"]["InsightsProductivityTo"];
6107
7031
  /** @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). */
6108
7032
  department?: components["parameters"]["InsightsDepartmentFilter"];
6109
7033
  /** @description Team name filter; send `All teams` to include every team. */
@@ -6156,8 +7080,12 @@ export interface operations {
6156
7080
  getProductivityInsightsContributor: {
6157
7081
  parameters: {
6158
7082
  query?: {
6159
- /** @description Productivity insights time range in weeks (`4w`=4, `8w`=8, `12w`=12, `16w`=16). Legacy `q` is an alias for 12 weeks. */
7083
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
6160
7084
  rangeId?: components["parameters"]["InsightsProductivityRangeId"];
7085
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
7086
+ from?: components["parameters"]["InsightsProductivityFrom"];
7087
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
7088
+ to?: components["parameters"]["InsightsProductivityTo"];
6161
7089
  /** @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). */
6162
7090
  department?: components["parameters"]["InsightsDepartmentFilter"];
6163
7091
  /** @description Team name filter; send `All teams` to include every team. */
@@ -6216,8 +7144,12 @@ export interface operations {
6216
7144
  entityType?: "teams" | "contributors";
6217
7145
  /** @description Maximum number of laggard rows to return (UI default 3). */
6218
7146
  limit?: number;
6219
- /** @description Productivity insights time range in weeks (`4w`=4, `8w`=8, `12w`=12, `16w`=16). Legacy `q` is an alias for 12 weeks. */
7147
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
6220
7148
  rangeId?: components["parameters"]["InsightsProductivityRangeId"];
7149
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
7150
+ from?: components["parameters"]["InsightsProductivityFrom"];
7151
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
7152
+ to?: components["parameters"]["InsightsProductivityTo"];
6221
7153
  /** @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). */
6222
7154
  department?: components["parameters"]["InsightsDepartmentFilter"];
6223
7155
  /** @description Team name filter; send `All teams` to include every team. */