@thinkai/tai-api-contract 2.28.0 → 3.1.0-pr.731.1

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.
@@ -856,6 +856,50 @@ export interface paths {
856
856
  patch?: never;
857
857
  trace?: never;
858
858
  };
859
+ "/workspaces/{workspaceId}/integrations/github-actions": {
860
+ parameters: {
861
+ query?: never;
862
+ header?: never;
863
+ path?: never;
864
+ cookie?: never;
865
+ };
866
+ /**
867
+ * GitHub Actions CI integration status for workspace
868
+ * @description Returns whether the workspace has explicitly enabled GitHub Actions CI metrics. Requires GitHub App (source control) to be connected; does not use workspace `sources` PATs. When GitHub is not connected, returns 200 with `githubConnected: false` and `enabled: false`.
869
+ */
870
+ get: operations["getWorkspaceGithubActionsIntegrationStatus"];
871
+ put?: never;
872
+ post?: never;
873
+ /**
874
+ * Disable GitHub Actions CI integration
875
+ * @description Disables GitHub Actions CI opt-in for the workspace. Does not disconnect GitHub source control. Idempotent: returns 204 when already disabled.
876
+ */
877
+ delete: operations["deleteWorkspaceGithubActionsIntegration"];
878
+ options?: never;
879
+ head?: never;
880
+ patch?: never;
881
+ trace?: never;
882
+ };
883
+ "/workspaces/{workspaceId}/integrations/github-actions/enable": {
884
+ parameters: {
885
+ query?: never;
886
+ header?: never;
887
+ path?: never;
888
+ cookie?: never;
889
+ };
890
+ get?: never;
891
+ put?: never;
892
+ /**
893
+ * Enable GitHub Actions CI integration
894
+ * @description Opts the workspace into GitHub Actions CI metrics using the existing GitHub App installation (no separate OAuth or PAT). Returns `outcome: needs_github` when source control is not connected, or `outcome: permissions_missing` when the installation lacks Actions read permission.
895
+ */
896
+ post: operations["postWorkspaceGithubActionsIntegrationEnable"];
897
+ delete?: never;
898
+ options?: never;
899
+ head?: never;
900
+ patch?: never;
901
+ trace?: never;
902
+ };
859
903
  "/integrations/github/webhook": {
860
904
  parameters: {
861
905
  query?: never;
@@ -1486,6 +1530,30 @@ export interface paths {
1486
1530
  patch?: never;
1487
1531
  trace?: never;
1488
1532
  };
1533
+ "/workspaces/{workspaceId}/repo-eligibility": {
1534
+ parameters: {
1535
+ query?: never;
1536
+ header?: never;
1537
+ path?: never;
1538
+ cookie?: never;
1539
+ };
1540
+ /**
1541
+ * Get repo-sync eligibility gate (defaults + per-workspace overrides)
1542
+ * @description Returns the effective repo-sync eligibility gate (archived / fork / size / count) for the workspace: the global `defaults`, any per-workspace `overrides`, the merged `effective` values, and whether the caller can edit without platform-admin (`canEditUnrestricted`). Member-level read access.
1543
+ */
1544
+ get: operations["getWorkspaceRepoEligibility"];
1545
+ /**
1546
+ * Set per-workspace repo-sync eligibility overrides
1547
+ * @description Set (or clear, with an empty `overrides`) the per-workspace repo-sync eligibility overrides. **Platform admins** may set any value (raise caps, `0` = unlimited, include archived/forks). **Workspace admins** may only make the gate *more restrictive* than the platform defaults (lower caps, exclude archived/forks) — exceeding a platform limit returns `403` (`repo_eligibility_bound_exceeded`). Requires workspace admin or platform admin.
1548
+ */
1549
+ put: operations["putWorkspaceRepoEligibility"];
1550
+ post?: never;
1551
+ delete?: never;
1552
+ options?: never;
1553
+ head?: never;
1554
+ patch?: never;
1555
+ trace?: never;
1556
+ };
1489
1557
  "/workspaces/{workspaceId}/readiness/cursor-key-usage": {
1490
1558
  parameters: {
1491
1559
  query?: never;
@@ -2688,6 +2756,56 @@ export interface components {
2688
2756
  * @description Last push or metadata update from GitHub when available.
2689
2757
  */
2690
2758
  updatedAt?: string | null;
2759
+ /** @description True when the repository is archived (read-only on GitHub). */
2760
+ archived?: boolean | null;
2761
+ /** @description True when the repository is a fork of another repository. */
2762
+ fork?: boolean | null;
2763
+ /** @description True when the repository is disabled on GitHub. */
2764
+ disabled?: boolean | null;
2765
+ /** @description Repository size in KB as reported by GitHub. */
2766
+ size?: number | null;
2767
+ /** @description True when the GitHub App installation lacks push access to this repo (read-only). Read-only repos are rejected during sync because readiness fixes require write access. */
2768
+ readOnly?: boolean | null;
2769
+ /** @description Set when this repo was skipped during sync due to an eligibility check. The frontend should display this as an inline explanation (e.g. "This repo is archived"). */
2770
+ ineligibleReason?: string | null;
2771
+ /**
2772
+ * @description Language-based eligibility for Agentic-Foundation readiness analysis (issue #44). `ineligible` repos (no supported stack) render read-only/orange in the AF list with no analyze/score/fix actions. Mixed monorepos with a supported secondary stack are `eligible`. Distinct from `ineligibleReason`, which reflects the structural sync gate.
2773
+ * @enum {string|null}
2774
+ */
2775
+ eligibilityStatus?: "eligible" | "ineligible" | null;
2776
+ /** @description Human-readable explanation when `eligibilityStatus` is `ineligible` (e.g. "This repository's primary language (Python) is not supported in v1"). */
2777
+ eligibilityReason?: string | null;
2778
+ /** @description Dominant supported stack (by GitHub language bytes), one of backend_jvm | ios_app | web_spa | backend_go. Null for ineligible repos. */
2779
+ primaryStack?: string | null;
2780
+ /** @description Second supported stack for a multi-stack repo, or null. */
2781
+ secondaryStack?: string | null;
2782
+ /** @description All supported stacks detected for the repo (ordered, primary first). Empty/null when no supported stack is present. Drives multi-stack scanning and the orange mixed-monorepo box in the AF UI. */
2783
+ supportedStacks?: string[] | null;
2784
+ };
2785
+ /** @description Resolved repo-sync eligibility gate (defaults or effective). All fields present. */
2786
+ RepoEligibilityConfigDto: {
2787
+ /** @description Skip archived repos during GitHub repo sync. */
2788
+ excludeArchived: boolean;
2789
+ /** @description Skip forked repos. Forks are included by default. */
2790
+ excludeForks: boolean;
2791
+ /** @description Max repo size in KB (GitHub-reported). 0 = no limit. */
2792
+ maxRepoSizeKb: number;
2793
+ /** @description Max repos materialized per workspace per sync. 0 = no limit. */
2794
+ maxReposPerWorkspace: number;
2795
+ };
2796
+ /** @description Per-workspace overrides for the repo-sync eligibility gate. Any field present wins over the global default; omit a field to inherit the default. An empty object clears all overrides. */
2797
+ RepoEligibilityOverridesDto: {
2798
+ excludeArchived?: boolean | null;
2799
+ excludeForks?: boolean | null;
2800
+ maxRepoSizeKb?: number | null;
2801
+ maxReposPerWorkspace?: number | null;
2802
+ };
2803
+ WorkspaceRepoEligibilityDto: {
2804
+ defaults: components["schemas"]["RepoEligibilityConfigDto"];
2805
+ overrides: components["schemas"]["RepoEligibilityOverridesDto"];
2806
+ effective: components["schemas"]["RepoEligibilityConfigDto"];
2807
+ /** @description True when the caller is a platform admin (may set any value, incl. raising caps). */
2808
+ canEditUnrestricted: boolean;
2691
2809
  };
2692
2810
  GithubMissingPermissionDto: {
2693
2811
  /** @description GitHub App permission key (e.g. contents, pull_requests). */
@@ -2729,6 +2847,42 @@ export interface components {
2729
2847
  */
2730
2848
  pendingSince: string;
2731
2849
  };
2850
+ GithubActionsWorkflowPreviewDto: {
2851
+ /** @description Approximate workflow count from recent API sample (best effort). */
2852
+ workflows?: number;
2853
+ /** @description Workflow runs in the trailing 7 days from sample repo (best effort). */
2854
+ runsThisWeek?: number;
2855
+ };
2856
+ GithubActionsIntegrationStatusDto: {
2857
+ /** @description True when the workspace admin explicitly enabled GitHub Actions CI. */
2858
+ enabled: boolean;
2859
+ /** @description True when at least one GitHub App VCS installation is linked. */
2860
+ githubConnected: boolean;
2861
+ /** @description False when GitHub App installation lacks Actions read permission. */
2862
+ permissionsOk: boolean;
2863
+ /** @description Alias for `!permissionsOk` when GitHub is connected. */
2864
+ permissionsUpgradeRequired?: boolean;
2865
+ missingPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
2866
+ /**
2867
+ * Format: uri
2868
+ * @description GitHub installation settings URL for permission approval.
2869
+ */
2870
+ manageUrl?: string | null;
2871
+ /**
2872
+ * Format: date-time
2873
+ * @description Last productivity ingest timestamp when CI is enabled.
2874
+ */
2875
+ lastSyncAt?: string | null;
2876
+ workflowPreview?: components["schemas"]["GithubActionsWorkflowPreviewDto"] | null;
2877
+ /** @description Last enable or status error message when applicable. */
2878
+ error?: string | null;
2879
+ };
2880
+ GithubActionsEnableResponseDto: {
2881
+ /** @enum {string} */
2882
+ outcome: "enabled" | "needs_github" | "permissions_missing" | "error";
2883
+ status?: components["schemas"]["GithubActionsIntegrationStatusDto"] | null;
2884
+ error?: string | null;
2885
+ };
2732
2886
  GithubInstallationStatusDto: {
2733
2887
  installed: boolean;
2734
2888
  installations: components["schemas"]["GithubInstallationSummaryDto"][];
@@ -2985,6 +3139,8 @@ export interface components {
2985
3139
  * @enum {string}
2986
3140
  */
2987
3141
  severity: "high" | "medium" | "low";
3142
+ /** @description Plain-language explanation of what this check means (from rubric, not LLM) */
3143
+ summary?: string | null;
2988
3144
  /** @description LLM scan notes explaining why this status was assigned */
2989
3145
  notes?: string | null;
2990
3146
  /** @description Suggested fix for gap/partial criteria */
@@ -3142,6 +3298,19 @@ export interface components {
3142
3298
  * @enum {string|null}
3143
3299
  */
3144
3300
  archivedReason?: "github_removed" | "installation_disconnected" | "installation_replaced" | "superseded" | null;
3301
+ /**
3302
+ * @description Language-based eligibility for Agentic-Foundation analysis (#44). `ineligible` repos (no v1-supported stack) render read-only/orange in the AF list with no analyze/score/fix actions; the server also rejects analyze requests for them. Null until the first sync/scan computes it.
3303
+ * @enum {string|null}
3304
+ */
3305
+ eligibilityStatus?: "eligible" | "ineligible" | null;
3306
+ /** @description Human-readable explanation when `eligibilityStatus` is `ineligible`. */
3307
+ eligibilityReason?: string | null;
3308
+ /** @description Dominant supported stack — backend_jvm | ios_app | web_spa | backend_go. Null when ineligible/uncomputed. */
3309
+ primaryStack?: string | null;
3310
+ /** @description Second supported stack for a multi-stack repo, or null. */
3311
+ secondaryStack?: string | null;
3312
+ /** @description All supported stacks detected (ordered, primary first). Empty/null when none. */
3313
+ supportedStacks?: string[] | null;
3145
3314
  };
3146
3315
  /** @description Single-repo detail response. Identical to RepoReadinessScoreDto except dimensions use DimensionScoreDetailDto (criteriaDetails required per dimension). */
3147
3316
  RepoReadinessScoreDetailDto: {
@@ -3603,7 +3772,7 @@ export interface components {
3603
3772
  * @description Type of workspace lifecycle event.
3604
3773
  * @enum {string}
3605
3774
  */
3606
- ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "config.cursor.added" | "config.cursor.updated" | "config.cursor.removed" | "config.cursor.platform_key_enabled" | "config.cursor.platform_key_disabled" | "config.claude.added" | "config.claude.updated" | "config.claude.removed" | "config.agent_execution.provider_changed" | "member.invited" | "member.role_changed" | "member.removed";
3775
+ ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.role_changed" | "member.removed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "readiness.scan_precheck_failed";
3607
3776
  ActivityLogActorDto: {
3608
3777
  /** Format: uuid */
3609
3778
  userId: string;
@@ -3688,18 +3857,30 @@ export interface components {
3688
3857
  };
3689
3858
  HrisTriggerSyncResultDto: {
3690
3859
  /** @enum {string} */
3691
- status: "ok" | "skipped" | "error";
3692
- /** @description Stable machine-readable code (e.g. 'no_personio_source', 'hris_sync_failed'). */
3860
+ status: "ok" | "skipped" | "error" | "partial";
3861
+ /** @description Stable machine-readable code (e.g. 'no_hris_source', 'hris_sync_failed'). */
3693
3862
  code?: string;
3694
- /** @description Number of employees synced (present when status = 'ok'). */
3863
+ /** @description Employees synced across successful providers (when status = ok or partial). */
3695
3864
  employeeCount?: number;
3696
- /** @description Number of absence records synced (present when status = 'ok'). */
3865
+ /** @description Absence rows synced across successful providers. */
3697
3866
  absenceCount?: number;
3698
- /** @description Wall-clock duration of the sync in milliseconds (present when status = 'ok'). */
3867
+ /** @description Wall-clock duration of the sync in milliseconds. */
3699
3868
  durationMs?: number;
3700
- /** @description Machine-readable reason for a skipped sync (e.g. 'no_personio_source'). */
3869
+ /** @description Machine-readable reason for a skipped sync (e.g. 'no_hris_source'). */
3701
3870
  reason?: string;
3702
- /** @description Error message when status = 'error'. */
3871
+ /** @description Error message when status = error, or first provider failure when partial. */
3872
+ error?: string;
3873
+ /** @description Per-provider sync outcomes when one or more HRIS sources are configured. */
3874
+ providers?: components["schemas"]["HrisProviderSyncResultDto"][];
3875
+ };
3876
+ HrisProviderSyncResultDto: {
3877
+ /** @description HRIS provider identifier (personio, zenhr, …). */
3878
+ provider: string;
3879
+ /** @enum {string} */
3880
+ status: "ok" | "error";
3881
+ employeeCount?: number;
3882
+ absenceCount?: number;
3883
+ durationMs?: number;
3703
3884
  error?: string;
3704
3885
  };
3705
3886
  ActivityLogPageDto: components["schemas"]["PageMetaDto"] & {
@@ -3962,9 +4143,15 @@ export type CreateWorkspaceBodyDto = components['schemas']['CreateWorkspaceBodyD
3962
4143
  export type CompanyProfileDto = components['schemas']['CompanyProfileDto'];
3963
4144
  export type GithubAccountDto = components['schemas']['GithubAccountDto'];
3964
4145
  export type GithubInstalledRepoDto = components['schemas']['GithubInstalledRepoDto'];
4146
+ export type RepoEligibilityConfigDto = components['schemas']['RepoEligibilityConfigDto'];
4147
+ export type RepoEligibilityOverridesDto = components['schemas']['RepoEligibilityOverridesDto'];
4148
+ export type WorkspaceRepoEligibilityDto = components['schemas']['WorkspaceRepoEligibilityDto'];
3965
4149
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
3966
4150
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
3967
4151
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
4152
+ export type GithubActionsWorkflowPreviewDto = components['schemas']['GithubActionsWorkflowPreviewDto'];
4153
+ export type GithubActionsIntegrationStatusDto = components['schemas']['GithubActionsIntegrationStatusDto'];
4154
+ export type GithubActionsEnableResponseDto = components['schemas']['GithubActionsEnableResponseDto'];
3968
4155
  export type GithubInstallationStatusDto = components['schemas']['GithubInstallationStatusDto'];
3969
4156
  export type GithubInstallUrlRequestDto = components['schemas']['GithubInstallUrlRequestDto'];
3970
4157
  export type GithubInstallUrlResponseDto = components['schemas']['GithubInstallUrlResponseDto'];
@@ -4067,6 +4254,7 @@ export type WorkspaceAbsenceListDto = components['schemas']['WorkspaceAbsenceLis
4067
4254
  export type HrisSyncStatusDto = components['schemas']['HrisSyncStatusDto'];
4068
4255
  export type HrisSyncStatusListDto = components['schemas']['HrisSyncStatusListDto'];
4069
4256
  export type HrisTriggerSyncResultDto = components['schemas']['HrisTriggerSyncResultDto'];
4257
+ export type HrisProviderSyncResultDto = components['schemas']['HrisProviderSyncResultDto'];
4070
4258
  export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
4071
4259
  export type ReadinessTokenUsageRowDto = components['schemas']['ReadinessTokenUsageRowDto'];
4072
4260
  export type ReadinessTokenUsageByDimensionRowDto = components['schemas']['ReadinessTokenUsageByDimensionRowDto'];
@@ -6314,6 +6502,112 @@ export interface operations {
6314
6502
  };
6315
6503
  };
6316
6504
  };
6505
+ getWorkspaceGithubActionsIntegrationStatus: {
6506
+ parameters: {
6507
+ query?: never;
6508
+ header?: never;
6509
+ path: {
6510
+ workspaceId: components["parameters"]["WorkspaceId"];
6511
+ };
6512
+ cookie?: never;
6513
+ };
6514
+ requestBody?: never;
6515
+ responses: {
6516
+ /** @description GitHub Actions integration status */
6517
+ 200: {
6518
+ headers: {
6519
+ [name: string]: unknown;
6520
+ };
6521
+ content: {
6522
+ "application/json": components["schemas"]["GithubActionsIntegrationStatusDto"];
6523
+ };
6524
+ };
6525
+ 401: components["responses"]["Unauthorized"];
6526
+ 403: components["responses"]["Forbidden"];
6527
+ /** @description Workspace does not exist or malformed workspaceId */
6528
+ 404: {
6529
+ headers: {
6530
+ [name: string]: unknown;
6531
+ };
6532
+ content: {
6533
+ "application/json": components["schemas"]["ErrorMessageDto"];
6534
+ };
6535
+ };
6536
+ };
6537
+ };
6538
+ deleteWorkspaceGithubActionsIntegration: {
6539
+ parameters: {
6540
+ query?: never;
6541
+ header?: never;
6542
+ path: {
6543
+ workspaceId: components["parameters"]["WorkspaceId"];
6544
+ };
6545
+ cookie?: never;
6546
+ };
6547
+ requestBody?: never;
6548
+ responses: {
6549
+ /** @description GitHub Actions integration disabled or was already absent */
6550
+ 204: {
6551
+ headers: {
6552
+ [name: string]: unknown;
6553
+ };
6554
+ content?: never;
6555
+ };
6556
+ 401: components["responses"]["Unauthorized"];
6557
+ 403: components["responses"]["Forbidden"];
6558
+ /** @description Workspace does not exist or malformed workspaceId */
6559
+ 404: {
6560
+ headers: {
6561
+ [name: string]: unknown;
6562
+ };
6563
+ content: {
6564
+ "application/json": components["schemas"]["ErrorMessageDto"];
6565
+ };
6566
+ };
6567
+ };
6568
+ };
6569
+ postWorkspaceGithubActionsIntegrationEnable: {
6570
+ parameters: {
6571
+ query?: never;
6572
+ header?: never;
6573
+ path: {
6574
+ workspaceId: components["parameters"]["WorkspaceId"];
6575
+ };
6576
+ cookie?: never;
6577
+ };
6578
+ requestBody?: never;
6579
+ responses: {
6580
+ /** @description Enable result */
6581
+ 200: {
6582
+ headers: {
6583
+ [name: string]: unknown;
6584
+ };
6585
+ content: {
6586
+ "application/json": components["schemas"]["GithubActionsEnableResponseDto"];
6587
+ };
6588
+ };
6589
+ 401: components["responses"]["Unauthorized"];
6590
+ 403: components["responses"]["Forbidden"];
6591
+ /** @description Workspace does not exist or malformed workspaceId */
6592
+ 404: {
6593
+ headers: {
6594
+ [name: string]: unknown;
6595
+ };
6596
+ content: {
6597
+ "application/json": components["schemas"]["ErrorMessageDto"];
6598
+ };
6599
+ };
6600
+ /** @description GitHub App not configured or smoke test failed */
6601
+ 503: {
6602
+ headers: {
6603
+ [name: string]: unknown;
6604
+ };
6605
+ content: {
6606
+ "application/json": components["schemas"]["ErrorMessageDto"];
6607
+ };
6608
+ };
6609
+ };
6610
+ };
6317
6611
  postGithubWebhook: {
6318
6612
  parameters: {
6319
6613
  query?: never;
@@ -7037,6 +7331,10 @@ export interface operations {
7037
7331
  offset?: components["parameters"]["PaginationOffset"];
7038
7332
  /** @description Sort direction. */
7039
7333
  order?: components["parameters"]["PaginationOrder"];
7334
+ /** @description Server-side sort column (the activity "5 W's"). Combined with `order` (asc/desc). Defaults to `when` (occurredAt). `occurredAt`/`id` is always the tiebreaker. */
7335
+ sort?: "when" | "who" | "what" | "why" | "where";
7336
+ /** @description Coarse product-area grouping filter (#156). `integration` = GitHub + AI-tool key events; `agentic_foundation` = repos, readiness scans, fixes; `workspace_team` = members + HRIS. Omit (or pass `all`) for every area. */
7337
+ productArea?: "integration" | "agentic_foundation" | "workspace_team" | "all";
7040
7338
  /** @description Filter to a specific event type. */
7041
7339
  eventType?: components["schemas"]["ActivityLogEventTypeDto"];
7042
7340
  /** @description Filter to events performed by a specific user (UUID). */
@@ -7925,6 +8223,80 @@ export interface operations {
7925
8223
  403: components["responses"]["Forbidden"];
7926
8224
  };
7927
8225
  };
8226
+ getWorkspaceRepoEligibility: {
8227
+ parameters: {
8228
+ query?: never;
8229
+ header?: never;
8230
+ path: {
8231
+ workspaceId: components["parameters"]["WorkspaceId"];
8232
+ };
8233
+ cookie?: never;
8234
+ };
8235
+ requestBody?: never;
8236
+ responses: {
8237
+ /** @description Effective repo-eligibility configuration */
8238
+ 200: {
8239
+ headers: {
8240
+ [name: string]: unknown;
8241
+ };
8242
+ content: {
8243
+ "application/json": components["schemas"]["WorkspaceRepoEligibilityDto"];
8244
+ };
8245
+ };
8246
+ 401: components["responses"]["Unauthorized"];
8247
+ 403: components["responses"]["Forbidden"];
8248
+ };
8249
+ };
8250
+ putWorkspaceRepoEligibility: {
8251
+ parameters: {
8252
+ query?: never;
8253
+ header?: never;
8254
+ path: {
8255
+ workspaceId: components["parameters"]["WorkspaceId"];
8256
+ };
8257
+ cookie?: never;
8258
+ };
8259
+ requestBody: {
8260
+ content: {
8261
+ "application/json": {
8262
+ overrides: components["schemas"]["RepoEligibilityOverridesDto"];
8263
+ };
8264
+ };
8265
+ };
8266
+ responses: {
8267
+ /** @description Overrides saved */
8268
+ 200: {
8269
+ headers: {
8270
+ [name: string]: unknown;
8271
+ };
8272
+ content: {
8273
+ "application/json": {
8274
+ overrides: components["schemas"]["RepoEligibilityOverridesDto"];
8275
+ effective: components["schemas"]["RepoEligibilityConfigDto"];
8276
+ };
8277
+ };
8278
+ };
8279
+ /** @description Invalid request body */
8280
+ 400: {
8281
+ headers: {
8282
+ [name: string]: unknown;
8283
+ };
8284
+ content: {
8285
+ "application/json": components["schemas"]["ErrorMessageDto"];
8286
+ };
8287
+ };
8288
+ 401: components["responses"]["Unauthorized"];
8289
+ /** @description Forbidden, or a workspace-admin value exceeds a platform limit (`repo_eligibility_bound_exceeded`) */
8290
+ 403: {
8291
+ headers: {
8292
+ [name: string]: unknown;
8293
+ };
8294
+ content: {
8295
+ "application/json": components["schemas"]["ErrorMessageDto"];
8296
+ };
8297
+ };
8298
+ };
8299
+ };
7928
8300
  getCursorKeyUsage: {
7929
8301
  parameters: {
7930
8302
  query?: never;
@@ -8765,7 +9137,7 @@ export interface operations {
8765
9137
  };
8766
9138
  requestBody?: never;
8767
9139
  responses: {
8768
- /** @description Sync completed successfully */
9140
+ /** @description Sync completed successfully for all configured HRIS providers */
8769
9141
  200: {
8770
9142
  headers: {
8771
9143
  [name: string]: unknown;
@@ -8776,7 +9148,16 @@ export interface operations {
8776
9148
  * "status": "ok",
8777
9149
  * "employeeCount": 42,
8778
9150
  * "absenceCount": 7,
8779
- * "durationMs": 1234
9151
+ * "durationMs": 1234,
9152
+ * "providers": [
9153
+ * {
9154
+ * "provider": "personio",
9155
+ * "status": "ok",
9156
+ * "employeeCount": 42,
9157
+ * "absenceCount": 7,
9158
+ * "durationMs": 1234
9159
+ * }
9160
+ * ]
8780
9161
  * }
8781
9162
  */
8782
9163
  "application/json": components["schemas"]["HrisTriggerSyncResultDto"];
@@ -8793,14 +9174,14 @@ export interface operations {
8793
9174
  /**
8794
9175
  * @example {
8795
9176
  * "status": "skipped",
8796
- * "code": "no_personio_source",
8797
- * "reason": "no_personio_source"
9177
+ * "code": "no_hris_source",
9178
+ * "reason": "no_hris_source"
8798
9179
  * }
8799
9180
  */
8800
9181
  "application/json": components["schemas"]["HrisTriggerSyncResultDto"];
8801
9182
  };
8802
9183
  };
8803
- /** @description Sync failed (Personio API error, decryption failure, etc.) */
9184
+ /** @description Sync failed for one or more HRIS providers */
8804
9185
  500: {
8805
9186
  headers: {
8806
9187
  [name: string]: unknown;
@@ -8810,7 +9191,7 @@ export interface operations {
8810
9191
  * @example {
8811
9192
  * "status": "error",
8812
9193
  * "code": "hris_sync_failed",
8813
- * "error": "Personio employees API 401"
9194
+ * "error": "ZenHR token refresh failed (401)"
8814
9195
  * }
8815
9196
  */
8816
9197
  "application/json": components["schemas"]["HrisTriggerSyncResultDto"];
package/src/index.ts CHANGED
@@ -1056,19 +1056,31 @@ export interface HrisSyncStatusListDto {
1056
1056
  statuses: HrisSyncStatusDto[];
1057
1057
  }
1058
1058
 
1059
+ /** Per-provider outcome when POST /workspaces/:id/hris/sync runs multiple HRIS sources. */
1060
+ export interface HrisProviderSyncResultDto {
1061
+ provider: string;
1062
+ status: "ok" | "error";
1063
+ employeeCount?: number;
1064
+ absenceCount?: number;
1065
+ durationMs?: number;
1066
+ error?: string;
1067
+ }
1068
+
1059
1069
  /** Response body for POST /workspaces/:id/hris/sync (manual trigger). */
1060
1070
  export interface HrisTriggerSyncResultDto {
1061
- status: "ok" | "skipped" | "error";
1062
- /** Stable machine-readable code (e.g. 'no_personio_source', 'hris_sync_failed'). */
1071
+ status: "ok" | "skipped" | "error" | "partial";
1072
+ /** Stable machine-readable code (e.g. 'no_hris_source', 'hris_sync_failed'). */
1063
1073
  code?: string;
1064
- /** Number of employees synced (present when status = 'ok'). */
1074
+ /** Number of employees synced across successful providers (present when status = 'ok' or 'partial'). */
1065
1075
  employeeCount?: number;
1066
- /** Number of absence records synced (present when status = 'ok'). */
1076
+ /** Number of absence records synced across successful providers. */
1067
1077
  absenceCount?: number;
1068
- /** Wall-clock duration of the sync in milliseconds (present when status = 'ok'). */
1078
+ /** Wall-clock duration of the sync in milliseconds. */
1069
1079
  durationMs?: number;
1070
- /** Machine-readable reason for a skipped sync (e.g. 'no_personio_source'). */
1080
+ /** Machine-readable reason for a skipped sync (e.g. 'no_hris_source'). */
1071
1081
  reason?: string;
1072
- /** Error message when status = 'error'. */
1082
+ /** Error message when status = 'error' or first failure when status = 'partial'. */
1073
1083
  error?: string;
1084
+ /** Per-provider results when one or more HRIS sources are configured. */
1085
+ providers?: HrisProviderSyncResultDto[];
1074
1086
  }