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