@thinkai/tai-api-contract 2.60.0 → 2.61.0-pr.901.b553abc8

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.
@@ -1038,7 +1038,7 @@ export interface paths {
1038
1038
  put?: never;
1039
1039
  /**
1040
1040
  * Create GitHub App installation URL
1041
- * @description Creates a GitHub App installation URL scoped to the workspace and caller. Body is optional; when omitted, defaults to `/onboarding/integrations` return path. Optional `pickerSession` (from user OAuth org picker) recovers `returnPath` from the server-side picker snapshot when the multi-hop authorize→install flow should return to the page where OAuth started.
1041
+ * @description Creates a GitHub App installation URL scoped to the workspace and caller. Default intent `connect` installs ThinkAI Platform Insights (read). Intent `enable_fixes` installs ThinkAI Platform Automations (write) for the Insights installation identified by `installationId`. Body is optional; when omitted, defaults to `/onboarding/integrations` return path. Optional `pickerSession` (from user OAuth org picker) recovers `returnPath` from the server-side picker snapshot when the multi-hop authorize→install flow should return to the page where OAuth started.
1042
1042
  */
1043
1043
  post: operations["postGithubInstallUrl"];
1044
1044
  delete?: never;
@@ -1047,6 +1047,46 @@ export interface paths {
1047
1047
  patch?: never;
1048
1048
  trace?: never;
1049
1049
  };
1050
+ "/workspaces/{workspaceId}/integrations/github/installations/{installationId}/automated-fixes/enable": {
1051
+ parameters: {
1052
+ query?: never;
1053
+ header?: never;
1054
+ path?: never;
1055
+ cookie?: never;
1056
+ };
1057
+ get?: never;
1058
+ put?: never;
1059
+ /**
1060
+ * Enable automated fixes for a GitHub installation
1061
+ * @description Workspace-level enable for automated fixes on an Insights (read) installation. If an Automations (write) installation is already linked, flips `automatedFixesEnabled` without reinstalling. Otherwise returns `outcome: needs_install` so the client can call install-url with intent=enable_fixes.
1062
+ */
1063
+ post: operations["postGithubAutomatedFixesEnable"];
1064
+ delete?: never;
1065
+ options?: never;
1066
+ head?: never;
1067
+ patch?: never;
1068
+ trace?: never;
1069
+ };
1070
+ "/workspaces/{workspaceId}/integrations/github/installations/{installationId}/automated-fixes": {
1071
+ parameters: {
1072
+ query?: never;
1073
+ header?: never;
1074
+ path?: never;
1075
+ cookie?: never;
1076
+ };
1077
+ get?: never;
1078
+ put?: never;
1079
+ post?: never;
1080
+ /**
1081
+ * Disable automated fixes for a GitHub installation
1082
+ * @description Workspace-level disable. Clears `automatedFixesEnabled` but keeps the linked Automations write installation id so re-enable does not require reinstall. Does not uninstall the Automations app from GitHub.
1083
+ */
1084
+ delete: operations["deleteGithubAutomatedFixes"];
1085
+ options?: never;
1086
+ head?: never;
1087
+ patch?: never;
1088
+ trace?: never;
1089
+ };
1050
1090
  "/workspaces/{workspaceId}/integrations/github/user-authorize-url": {
1051
1091
  parameters: {
1052
1092
  query?: never;
@@ -2640,7 +2680,7 @@ export interface paths {
2640
2680
  put?: never;
2641
2681
  /**
2642
2682
  * Attempt silent ZenHR reconnect
2643
- * @description Attempts a silent token refresh and branch ping using stored ZenHR OAuth credentials. Returns `{ ok: true }` when the connection is restored without user interaction. Returns `{ ok: false, oauthRequired: true }` when stored credentials exist but refresh failed with an OAuth re-authorization error (e.g. `invalid_grant`); the SPA should start ZenHR OAuth next. Returns `502` for other upstream failures (same semantics as `GET .../integrations/zenhr/branches`).
2683
+ * @description Attempts a silent token refresh and branch ping using stored ZenHR OAuth credentials. Returns `{ ok: true }` when the connection is restored without user interaction. Returns `{ ok: false, oauthRequired: true }` when stored credentials exist but refresh failed with an OAuth re-authorization error (e.g. `invalid_grant`); the SPA should start ZenHR OAuth next. Returns `502` for other upstream failures (same semantics as `GET .../integrations/zenhr/branches`). Returns `503` with `zenhr_sync_in_progress` when an HRIS sync or OAuth refresh is already in progress for this workspace (retry shortly).
2644
2684
  */
2645
2685
  post: operations["reconnectWorkspaceZenHr"];
2646
2686
  delete?: never;
@@ -2649,6 +2689,46 @@ export interface paths {
2649
2689
  patch?: never;
2650
2690
  trace?: never;
2651
2691
  };
2692
+ "/workspaces/{workspaceId}/integrations/zenhr/branches": {
2693
+ parameters: {
2694
+ query?: never;
2695
+ header?: never;
2696
+ path?: never;
2697
+ cookie?: never;
2698
+ };
2699
+ /**
2700
+ * List ZenHR branches
2701
+ * @description Lists ZenHR branches for the connected OAuth app so a workspace admin can pick one. Requires workspace admin role. Returns `503` with `zenhr_sync_in_progress` when an HRIS sync or OAuth refresh is already in progress (retry shortly).
2702
+ */
2703
+ get: operations["listWorkspaceZenHrBranches"];
2704
+ put?: never;
2705
+ post?: never;
2706
+ delete?: never;
2707
+ options?: never;
2708
+ head?: never;
2709
+ patch?: never;
2710
+ trace?: never;
2711
+ };
2712
+ "/workspaces/{workspaceId}/integrations/zenhr/branch": {
2713
+ parameters: {
2714
+ query?: never;
2715
+ header?: never;
2716
+ path?: never;
2717
+ cookie?: never;
2718
+ };
2719
+ get?: never;
2720
+ put?: never;
2721
+ post?: never;
2722
+ delete?: never;
2723
+ options?: never;
2724
+ head?: never;
2725
+ /**
2726
+ * Save selected ZenHR branch
2727
+ * @description Validates and persists the admin-selected ZenHR branch id on the workspace source. Requires workspace admin role. Returns `503` with `zenhr_sync_in_progress` when an HRIS sync or OAuth refresh is already in progress (retry shortly).
2728
+ */
2729
+ patch: operations["patchWorkspaceZenHrBranch"];
2730
+ trace?: never;
2731
+ };
2652
2732
  "/workspaces/{workspaceId}/hris/status": {
2653
2733
  parameters: {
2654
2734
  query?: never;
@@ -3057,6 +3137,7 @@ export interface components {
3057
3137
  };
3058
3138
  TestConnectionResponseDto: {
3059
3139
  success: boolean;
3140
+ /** @description Machine-readable failure code when success=false (e.g. invalid_token, zenhr_sync_in_progress when ZenHR OAuth refresh is contended). */
3060
3141
  error?: string;
3061
3142
  /** @description Present when `executionToken` was included in the test request. `true` = key passed save-time validation (format + not-admin-key check). `false` = key failed validation (see `executionKeyError` for detail). `null` = `executionToken` was not provided. */
3062
3143
  executionKeyValid?: boolean | null;
@@ -4447,6 +4528,22 @@ export interface components {
4447
4528
  */
4448
4529
  granted?: "read" | "write" | "admin" | null;
4449
4530
  };
4531
+ GithubWritePermissionsRequiredErrorDto: {
4532
+ /** @enum {string} */
4533
+ error: "github_write_permissions_required";
4534
+ missingPermissions: components["schemas"]["GithubMissingPermissionDto"][];
4535
+ /** @description GitHub installation settings URL to approve write permissions. */
4536
+ manageUrl?: string | null;
4537
+ /** @description Human-readable summary of the write permission upgrade. */
4538
+ writeUpgradeMessage?: string | null;
4539
+ };
4540
+ GithubPermissionsCheckFailedErrorDto: {
4541
+ /**
4542
+ * @description GitHub installation permissions could not be verified (transient upstream failure).
4543
+ * @enum {string}
4544
+ */
4545
+ error: "github_permissions_check_failed";
4546
+ };
4450
4547
  GithubInstallationSummaryDto: {
4451
4548
  installationId: string;
4452
4549
  account: components["schemas"]["GithubAccountDto"];
@@ -4456,11 +4553,35 @@ export interface components {
4456
4553
  manageUrl?: string | null;
4457
4554
  /** Format: date-time */
4458
4555
  lastSyncedAt?: string | null;
4459
- /** @description True when this installation's granted permissions are below what the ThinkAI GitHub App currently requests. */
4556
+ /** @description True when this installation lacks core read permissions required for connect and analysis. Alias for `!corePermissionsOk`. */
4460
4557
  permissionsUpgradeRequired: boolean;
4558
+ /** @description True when installation grants read permissions for repository analysis (contents, metadata, pull requests, and members for org installs). */
4559
+ corePermissionsOk: boolean;
4560
+ /** @description True when automated fixes are enabled and the linked Automations (write) installation grants write permissions required for fix PRs. */
4561
+ writePermissionsOk: boolean;
4562
+ /** @description Alias for `!writePermissionsOk`. */
4563
+ writePermissionsUpgradeRequired: boolean;
4564
+ /** @description Core read permissions still needed for connect and analysis. */
4461
4565
  missingPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4462
- /** @description Human-readable summary for UI when permissionsUpgradeRequired is true. */
4566
+ /** @description Write permissions still needed for automated fix PRs. */
4567
+ missingWritePermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4568
+ /** @description Human-readable summary for UI when core permissions are missing. */
4463
4569
  upgradeMessage?: string | null;
4570
+ /** @description Human-readable summary for UI when write permissions are missing. */
4571
+ writeUpgradeMessage?: string | null;
4572
+ /** @description True when this workspace has enabled automated fixes for this Insights (read) installation and linked a ThinkAI Platform Automations (write) installation. */
4573
+ automatedFixesEnabled: boolean;
4574
+ /** @description True when an Automations (write) GitHub App installation is linked. */
4575
+ writeAppInstalled: boolean;
4576
+ /** @description GitHub installation id for the Automations (write) app, when linked. */
4577
+ writeInstallationId?: string | null;
4578
+ /**
4579
+ * Format: uri
4580
+ * @description GitHub settings URL for the Automations (write) installation.
4581
+ */
4582
+ writeManageUrl?: string | null;
4583
+ /** @description True when the Automations app is configured and automated fixes are not yet enabled for this installation (UI may show Enable automated fixes). */
4584
+ canEnableAutomatedFixes: boolean;
4464
4585
  };
4465
4586
  GithubPendingApprovalDto: {
4466
4587
  /**
@@ -4616,8 +4737,18 @@ export interface components {
4616
4737
  GithubInstallationStatusDto: {
4617
4738
  installed: boolean;
4618
4739
  installations: components["schemas"]["GithubInstallationSummaryDto"][];
4619
- /** @description True if any connected installation is under-permissioned. */
4740
+ /** @description True if any connected installation lacks core read permissions. Alias for `!corePermissionsOk`. */
4620
4741
  permissionsUpgradeRequired: boolean;
4742
+ /** @description True when every connected installation grants core read permissions. */
4743
+ corePermissionsOk: boolean;
4744
+ /** @description True when every connected installation grants write permissions for automated fixes. */
4745
+ writePermissionsOk: boolean;
4746
+ /** @description True when any connected installation lacks write permissions for automated fixes. */
4747
+ writePermissionsUpgradeRequired: boolean;
4748
+ /** @description Aggregated write permissions missing on installations that lack write access. */
4749
+ missingWritePermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4750
+ /** @description Human-readable summary when write permissions are missing. */
4751
+ writeUpgradeMessage?: string | null;
4621
4752
  /** @description Present when an org admin must approve the GitHub App install request. */
4622
4753
  pendingApproval?: components["schemas"]["GithubPendingApprovalDto"] | null;
4623
4754
  /** @description Present when GitHub connect was started but not completed (install OAuth state or account-picker session still active). Omitted when pendingApproval is set. */
@@ -4657,12 +4788,28 @@ export interface components {
4657
4788
  * @description SPA origin to redirect back to after OAuth; must match server spaOrigins allowlist.
4658
4789
  */
4659
4790
  spaOrigin?: string;
4791
+ /**
4792
+ * @description connect installs ThinkAI Platform Insights (read). enable_fixes installs ThinkAI Platform Automations (write) for the Insights installation identified by installationId.
4793
+ * @enum {string}
4794
+ */
4795
+ intent?: "connect" | "enable_fixes";
4796
+ /** @description Insights (read) installation id required when intent is enable_fixes. */
4797
+ installationId?: string;
4660
4798
  };
4661
4799
  GithubInstallUrlResponseDto: {
4662
4800
  /** Format: uri */
4663
4801
  url: string;
4664
4802
  state: string;
4665
4803
  };
4804
+ GithubAutomatedFixesEnableResponseDto: {
4805
+ /**
4806
+ * @description enabled — write app already linked and flag flipped; needs_install — client should call install-url with intent=enable_fixes.
4807
+ * @enum {string}
4808
+ */
4809
+ outcome: "enabled" | "needs_install";
4810
+ /** @description Present when outcome is enabled. */
4811
+ status?: components["schemas"]["GithubInstallationStatusDto"];
4812
+ };
4666
4813
  GithubUserAuthorizeUrlRequestDto: {
4667
4814
  returnPath?: string;
4668
4815
  /**
@@ -5781,6 +5928,19 @@ export interface components {
5781
5928
  */
5782
5929
  error?: "zenhr_oauth_required";
5783
5930
  };
5931
+ ZenHrBranchDto: {
5932
+ id: string;
5933
+ name: string;
5934
+ };
5935
+ ZenHrBranchesListDto: {
5936
+ branches: components["schemas"]["ZenHrBranchDto"][];
5937
+ };
5938
+ ZenHrBranchSelectionDto: {
5939
+ branchId: string;
5940
+ };
5941
+ ZenHrBranchSelectionResultDto: {
5942
+ branchId: string;
5943
+ };
5784
5944
  HrisTriggerSyncResultDto: {
5785
5945
  /** @enum {string} */
5786
5946
  status: "ok" | "skipped" | "error" | "partial";
@@ -5944,6 +6104,20 @@ export interface components {
5944
6104
  "application/json": components["schemas"]["ErrorMessageDto"];
5945
6105
  };
5946
6106
  };
6107
+ /** @description HRIS sync or ZenHR OAuth refresh already in progress for this workspace */
6108
+ ZenHrSyncInProgress: {
6109
+ headers: {
6110
+ [name: string]: unknown;
6111
+ };
6112
+ content: {
6113
+ /**
6114
+ * @example {
6115
+ * "error": "zenhr_sync_in_progress"
6116
+ * }
6117
+ */
6118
+ "application/json": components["schemas"]["ErrorMessageDto"];
6119
+ };
6120
+ };
5947
6121
  };
5948
6122
  parameters: {
5949
6123
  WorkspaceId: string;
@@ -6145,6 +6319,8 @@ export type RepoEligibilityOverridesDto = components['schemas']['RepoEligibility
6145
6319
  export type WorkspaceRepoEligibilityDto = components['schemas']['WorkspaceRepoEligibilityDto'];
6146
6320
  export type RepoEligibilityLimitsDto = components['schemas']['RepoEligibilityLimitsDto'];
6147
6321
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
6322
+ export type GithubWritePermissionsRequiredErrorDto = components['schemas']['GithubWritePermissionsRequiredErrorDto'];
6323
+ export type GithubPermissionsCheckFailedErrorDto = components['schemas']['GithubPermissionsCheckFailedErrorDto'];
6148
6324
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
6149
6325
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
6150
6326
  export type GithubSetupInProgressDto = components['schemas']['GithubSetupInProgressDto'];
@@ -6160,6 +6336,7 @@ export type GithubActionsEnableResponseDto = components['schemas']['GithubAction
6160
6336
  export type GithubInstallationStatusDto = components['schemas']['GithubInstallationStatusDto'];
6161
6337
  export type GithubInstallUrlRequestDto = components['schemas']['GithubInstallUrlRequestDto'];
6162
6338
  export type GithubInstallUrlResponseDto = components['schemas']['GithubInstallUrlResponseDto'];
6339
+ export type GithubAutomatedFixesEnableResponseDto = components['schemas']['GithubAutomatedFixesEnableResponseDto'];
6163
6340
  export type GithubUserAuthorizeUrlRequestDto = components['schemas']['GithubUserAuthorizeUrlRequestDto'];
6164
6341
  export type GithubUserAuthorizeUrlResponseDto = components['schemas']['GithubUserAuthorizeUrlResponseDto'];
6165
6342
  export type GithubConnectableAccountDto = components['schemas']['GithubConnectableAccountDto'];
@@ -6276,6 +6453,10 @@ export type WorkspaceAbsenceListDto = components['schemas']['WorkspaceAbsenceLis
6276
6453
  export type HrisSyncStatusDto = components['schemas']['HrisSyncStatusDto'];
6277
6454
  export type HrisSyncStatusListDto = components['schemas']['HrisSyncStatusListDto'];
6278
6455
  export type ZenHrReconnectResultDto = components['schemas']['ZenHrReconnectResultDto'];
6456
+ export type ZenHrBranchDto = components['schemas']['ZenHrBranchDto'];
6457
+ export type ZenHrBranchesListDto = components['schemas']['ZenHrBranchesListDto'];
6458
+ export type ZenHrBranchSelectionDto = components['schemas']['ZenHrBranchSelectionDto'];
6459
+ export type ZenHrBranchSelectionResultDto = components['schemas']['ZenHrBranchSelectionResultDto'];
6279
6460
  export type HrisTriggerSyncResultDto = components['schemas']['HrisTriggerSyncResultDto'];
6280
6461
  export type HrisProviderSyncResultDto = components['schemas']['HrisProviderSyncResultDto'];
6281
6462
  export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
@@ -6283,6 +6464,7 @@ export type ReadinessTokenUsageRowDto = components['schemas']['ReadinessTokenUsa
6283
6464
  export type ReadinessTokenUsageByDimensionRowDto = components['schemas']['ReadinessTokenUsageByDimensionRowDto'];
6284
6465
  export type ResponseUnauthorized = components['responses']['Unauthorized'];
6285
6466
  export type ResponseForbidden = components['responses']['Forbidden'];
6467
+ export type ResponseZenHrSyncInProgress = components['responses']['ZenHrSyncInProgress'];
6286
6468
  export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
6287
6469
  export type ParameterRepoId = components['parameters']['RepoId'];
6288
6470
  export type ParameterProviderSlug = components['parameters']['ProviderSlug'];
@@ -9258,6 +9440,90 @@ export interface operations {
9258
9440
  "application/json": components["schemas"]["ErrorMessageDto"];
9259
9441
  };
9260
9442
  };
9443
+ /** @description Requested GitHub App is not configured */
9444
+ 503: {
9445
+ headers: {
9446
+ [name: string]: unknown;
9447
+ };
9448
+ content: {
9449
+ "application/json": components["schemas"]["ErrorMessageDto"];
9450
+ };
9451
+ };
9452
+ };
9453
+ };
9454
+ postGithubAutomatedFixesEnable: {
9455
+ parameters: {
9456
+ query?: never;
9457
+ header?: never;
9458
+ path: {
9459
+ workspaceId: components["parameters"]["WorkspaceId"];
9460
+ installationId: string;
9461
+ };
9462
+ cookie?: never;
9463
+ };
9464
+ requestBody?: never;
9465
+ responses: {
9466
+ /** @description Enable result */
9467
+ 200: {
9468
+ headers: {
9469
+ [name: string]: unknown;
9470
+ };
9471
+ content: {
9472
+ "application/json": components["schemas"]["GithubAutomatedFixesEnableResponseDto"];
9473
+ };
9474
+ };
9475
+ 401: components["responses"]["Unauthorized"];
9476
+ 403: components["responses"]["Forbidden"];
9477
+ /** @description Workspace or installation not found */
9478
+ 404: {
9479
+ headers: {
9480
+ [name: string]: unknown;
9481
+ };
9482
+ content: {
9483
+ "application/json": components["schemas"]["ErrorMessageDto"];
9484
+ };
9485
+ };
9486
+ /** @description Automations GitHub App not configured */
9487
+ 503: {
9488
+ headers: {
9489
+ [name: string]: unknown;
9490
+ };
9491
+ content: {
9492
+ "application/json": components["schemas"]["ErrorMessageDto"];
9493
+ };
9494
+ };
9495
+ };
9496
+ };
9497
+ deleteGithubAutomatedFixes: {
9498
+ parameters: {
9499
+ query?: never;
9500
+ header?: never;
9501
+ path: {
9502
+ workspaceId: components["parameters"]["WorkspaceId"];
9503
+ installationId: string;
9504
+ };
9505
+ cookie?: never;
9506
+ };
9507
+ requestBody?: never;
9508
+ responses: {
9509
+ /** @description Automated fixes disabled (or already disabled) */
9510
+ 204: {
9511
+ headers: {
9512
+ [name: string]: unknown;
9513
+ };
9514
+ content?: never;
9515
+ };
9516
+ 401: components["responses"]["Unauthorized"];
9517
+ 403: components["responses"]["Forbidden"];
9518
+ /** @description Workspace or installation not found */
9519
+ 404: {
9520
+ headers: {
9521
+ [name: string]: unknown;
9522
+ };
9523
+ content: {
9524
+ "application/json": components["schemas"]["ErrorMessageDto"];
9525
+ };
9526
+ };
9261
9527
  };
9262
9528
  };
9263
9529
  postGithubUserAuthorizeUrl: {
@@ -11914,6 +12180,24 @@ export interface operations {
11914
12180
  "application/json": components["schemas"]["ErrorMessageDto"];
11915
12181
  };
11916
12182
  };
12183
+ /** @description GitHub installation lacks write permissions required for automated fix PRs */
12184
+ 422: {
12185
+ headers: {
12186
+ [name: string]: unknown;
12187
+ };
12188
+ content: {
12189
+ "application/json": components["schemas"]["GithubWritePermissionsRequiredErrorDto"];
12190
+ };
12191
+ };
12192
+ /** @description GitHub installation permissions could not be verified */
12193
+ 503: {
12194
+ headers: {
12195
+ [name: string]: unknown;
12196
+ };
12197
+ content: {
12198
+ "application/json": components["schemas"]["GithubPermissionsCheckFailedErrorDto"];
12199
+ };
12200
+ };
11917
12201
  };
11918
12202
  };
11919
12203
  postReadinessFixRetrigger: {
@@ -11957,6 +12241,24 @@ export interface operations {
11957
12241
  "application/json": components["schemas"]["ErrorMessageDto"];
11958
12242
  };
11959
12243
  };
12244
+ /** @description GitHub installation lacks write permissions required for automated fix PRs */
12245
+ 422: {
12246
+ headers: {
12247
+ [name: string]: unknown;
12248
+ };
12249
+ content: {
12250
+ "application/json": components["schemas"]["GithubWritePermissionsRequiredErrorDto"];
12251
+ };
12252
+ };
12253
+ /** @description GitHub installation permissions could not be verified */
12254
+ 503: {
12255
+ headers: {
12256
+ [name: string]: unknown;
12257
+ };
12258
+ content: {
12259
+ "application/json": components["schemas"]["GithubPermissionsCheckFailedErrorDto"];
12260
+ };
12261
+ };
11960
12262
  };
11961
12263
  };
11962
12264
  putCursorPlatformKeyConsent: {
@@ -13091,6 +13393,126 @@ export interface operations {
13091
13393
  "application/json": components["schemas"]["ErrorMessageDto"];
13092
13394
  };
13093
13395
  };
13396
+ 503: components["responses"]["ZenHrSyncInProgress"];
13397
+ };
13398
+ };
13399
+ listWorkspaceZenHrBranches: {
13400
+ parameters: {
13401
+ query?: never;
13402
+ header?: never;
13403
+ path: {
13404
+ workspaceId: components["parameters"]["WorkspaceId"];
13405
+ };
13406
+ cookie?: never;
13407
+ };
13408
+ requestBody?: never;
13409
+ responses: {
13410
+ /** @description Branch list */
13411
+ 200: {
13412
+ headers: {
13413
+ [name: string]: unknown;
13414
+ };
13415
+ content: {
13416
+ "application/json": components["schemas"]["ZenHrBranchesListDto"];
13417
+ };
13418
+ };
13419
+ 401: components["responses"]["Unauthorized"];
13420
+ 403: components["responses"]["Forbidden"];
13421
+ /** @description ZenHR is not connected for this workspace */
13422
+ 404: {
13423
+ headers: {
13424
+ [name: string]: unknown;
13425
+ };
13426
+ content: {
13427
+ /**
13428
+ * @example {
13429
+ * "error": "zenhr_not_connected"
13430
+ * }
13431
+ */
13432
+ "application/json": components["schemas"]["ErrorMessageDto"];
13433
+ };
13434
+ };
13435
+ /** @description ZenHR branch list unavailable */
13436
+ 502: {
13437
+ headers: {
13438
+ [name: string]: unknown;
13439
+ };
13440
+ content: {
13441
+ /**
13442
+ * @example {
13443
+ * "error": "zenhr_branches_unavailable"
13444
+ * }
13445
+ */
13446
+ "application/json": components["schemas"]["ErrorMessageDto"];
13447
+ };
13448
+ };
13449
+ 503: components["responses"]["ZenHrSyncInProgress"];
13450
+ };
13451
+ };
13452
+ patchWorkspaceZenHrBranch: {
13453
+ parameters: {
13454
+ query?: never;
13455
+ header?: never;
13456
+ path: {
13457
+ workspaceId: components["parameters"]["WorkspaceId"];
13458
+ };
13459
+ cookie?: never;
13460
+ };
13461
+ requestBody: {
13462
+ content: {
13463
+ "application/json": components["schemas"]["ZenHrBranchSelectionDto"];
13464
+ };
13465
+ };
13466
+ responses: {
13467
+ /** @description Branch saved */
13468
+ 200: {
13469
+ headers: {
13470
+ [name: string]: unknown;
13471
+ };
13472
+ content: {
13473
+ "application/json": components["schemas"]["ZenHrBranchSelectionResultDto"];
13474
+ };
13475
+ };
13476
+ /** @description Invalid body or unknown branch id */
13477
+ 400: {
13478
+ headers: {
13479
+ [name: string]: unknown;
13480
+ };
13481
+ content: {
13482
+ "application/json": components["schemas"]["ErrorMessageDto"];
13483
+ };
13484
+ };
13485
+ 401: components["responses"]["Unauthorized"];
13486
+ 403: components["responses"]["Forbidden"];
13487
+ /** @description ZenHR is not connected for this workspace */
13488
+ 404: {
13489
+ headers: {
13490
+ [name: string]: unknown;
13491
+ };
13492
+ content: {
13493
+ /**
13494
+ * @example {
13495
+ * "error": "zenhr_not_connected"
13496
+ * }
13497
+ */
13498
+ "application/json": components["schemas"]["ErrorMessageDto"];
13499
+ };
13500
+ };
13501
+ /** @description ZenHR branch validation unavailable */
13502
+ 502: {
13503
+ headers: {
13504
+ [name: string]: unknown;
13505
+ };
13506
+ content: {
13507
+ /**
13508
+ * @example {
13509
+ * "error": "zenhr_branches_unavailable"
13510
+ * }
13511
+ */
13512
+ "application/json": components["schemas"]["ErrorMessageDto"];
13513
+ };
13514
+ };
13515
+ 503: components["responses"]["ZenHrSyncInProgress"];
13094
13516
  };
13095
13517
  };
13096
13518
  getHrisSyncStatus: {