@thinkai/tai-api-contract 2.233.0 → 2.234.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.
@@ -6056,6 +6056,54 @@ export interface paths {
6056
6056
  patch?: never;
6057
6057
  trace?: never;
6058
6058
  };
6059
+ "/workspaces/{workspaceId}/hris/roster": {
6060
+ parameters: {
6061
+ query?: never;
6062
+ header?: never;
6063
+ path?: never;
6064
+ cookie?: never;
6065
+ };
6066
+ /**
6067
+ * List HRIS roster people
6068
+ * @description Returns the merge-safe HRIS roster (provider fields + user overlay + sync presence) for a provider. Lazy-bootstraps from `hris_spa_org_chart` when the roster blob is empty. Requires workspace membership.
6069
+ */
6070
+ get: operations["getHrisRoster"];
6071
+ put?: never;
6072
+ post?: never;
6073
+ delete?: never;
6074
+ options?: never;
6075
+ head?: never;
6076
+ /**
6077
+ * Patch HRIS roster overlay fields
6078
+ * @description Updates user overlay fields and/or presence actions (dismiss new, archive missing) by employeeId. Rematerializes the effective org chart when structure source is HRIS. Does not request a productivity remount. Requires workspace editor.
6079
+ */
6080
+ patch: operations["patchHrisRoster"];
6081
+ trace?: never;
6082
+ };
6083
+ "/workspaces/{workspaceId}/hris/roster.csv": {
6084
+ parameters: {
6085
+ query?: never;
6086
+ header?: never;
6087
+ path?: never;
6088
+ cookie?: never;
6089
+ };
6090
+ /**
6091
+ * Download HRIS roster as CSV
6092
+ * @description Exports effective roster rows (provider + overlay) as CSV using org-chart column headers. Requires workspace membership.
6093
+ */
6094
+ get: operations["downloadHrisRosterCsv"];
6095
+ put?: never;
6096
+ /**
6097
+ * Import HRIS roster overlay CSV
6098
+ * @description Parses CSV (org-chart headers) and merges overlay columns onto existing roster rows by employee_id (then email). Requires workspace editor.
6099
+ */
6100
+ post: operations["importHrisRosterCsv"];
6101
+ delete?: never;
6102
+ options?: never;
6103
+ head?: never;
6104
+ patch?: never;
6105
+ trace?: never;
6106
+ };
6059
6107
  "/workspaces/{workspaceId}/evals/packs": {
6060
6108
  parameters: {
6061
6109
  query?: never;
@@ -12681,6 +12729,10 @@ export interface components {
12681
12729
  error?: string;
12682
12730
  /** @description Per-provider sync outcomes when one or more HRIS sources are configured. */
12683
12731
  providers?: components["schemas"]["HrisProviderSyncResultDto"][];
12732
+ /** @description Sum of per-provider rosterAdded when status = ok or partial. */
12733
+ rosterAdded?: number;
12734
+ rosterUpdated?: number;
12735
+ rosterMissingFromSync?: number;
12684
12736
  };
12685
12737
  HrisProviderSyncResultDto: {
12686
12738
  /** @description HRIS provider identifier (personio, zenhr, …). */
@@ -12691,6 +12743,71 @@ export interface components {
12691
12743
  absenceCount?: number;
12692
12744
  durationMs?: number;
12693
12745
  error?: string;
12746
+ /** @description People newly inserted into the HRIS roster on this sync. */
12747
+ rosterAdded?: number;
12748
+ /** @description Existing roster people whose provider fields were refreshed. */
12749
+ rosterUpdated?: number;
12750
+ /** @description Roster people not present in this sync response (leavers / inactive). */
12751
+ rosterMissingFromSync?: number;
12752
+ };
12753
+ /** @enum {string} */
12754
+ HrisRosterSyncPresenceDto: "active" | "new" | "missing_from_sync" | "archived";
12755
+ HrisRosterPersonDto: {
12756
+ employeeId: string;
12757
+ email: string;
12758
+ name: string;
12759
+ title?: string;
12760
+ department?: string;
12761
+ /** @description Engineering team. When empty, department may be used as provisional team. */
12762
+ team?: string;
12763
+ managerId?: string;
12764
+ location?: string;
12765
+ githubUsername?: string;
12766
+ bitbucketNickname?: string;
12767
+ bitbucketUuid?: string;
12768
+ gitlabUsername?: string;
12769
+ alternateEmails?: string;
12770
+ syncPresence: components["schemas"]["HrisRosterSyncPresenceDto"];
12771
+ /** @description Which layer supplied each non-empty field on the effective row. */
12772
+ fieldSources?: {
12773
+ [key: string]: "provider" | "overlay";
12774
+ };
12775
+ /** @description Canonical required field keys that are still blank on the effective row. */
12776
+ incompleteFields: string[];
12777
+ };
12778
+ HrisRosterDto: {
12779
+ provider: string;
12780
+ /** Format: date-time */
12781
+ updatedAt: string | null;
12782
+ people: components["schemas"]["HrisRosterPersonDto"][];
12783
+ };
12784
+ HrisRosterPersonPatchDto: {
12785
+ employeeId: string;
12786
+ overlay?: {
12787
+ name?: string;
12788
+ email?: string;
12789
+ title?: string;
12790
+ department?: string;
12791
+ team?: string;
12792
+ managerId?: string;
12793
+ location?: string;
12794
+ githubUsername?: string;
12795
+ bitbucketNickname?: string;
12796
+ bitbucketUuid?: string;
12797
+ gitlabUsername?: string;
12798
+ alternateEmails?: string;
12799
+ };
12800
+ /** @description Clear syncPresence=new without archiving. */
12801
+ dismissNew?: boolean;
12802
+ /** @description Archive a missing_from_sync (or any) row. */
12803
+ archive?: boolean;
12804
+ };
12805
+ HrisRosterPatchDto: {
12806
+ people: components["schemas"]["HrisRosterPersonPatchDto"][];
12807
+ };
12808
+ HrisRosterCsvImportDto: {
12809
+ /** @description Full CSV text with org-chart headers. */
12810
+ csv: string;
12694
12811
  };
12695
12812
  ActivityLogPageDto: components["schemas"]["PageMetaDto"] & {
12696
12813
  items: components["schemas"]["ActivityLogEntryDto"][];
@@ -15686,6 +15803,12 @@ export type ZenHrBranchSelectionDto = components['schemas']['ZenHrBranchSelectio
15686
15803
  export type ZenHrBranchSelectionResultDto = components['schemas']['ZenHrBranchSelectionResultDto'];
15687
15804
  export type HrisTriggerSyncResultDto = components['schemas']['HrisTriggerSyncResultDto'];
15688
15805
  export type HrisProviderSyncResultDto = components['schemas']['HrisProviderSyncResultDto'];
15806
+ export type HrisRosterSyncPresenceDto = components['schemas']['HrisRosterSyncPresenceDto'];
15807
+ export type HrisRosterPersonDto = components['schemas']['HrisRosterPersonDto'];
15808
+ export type HrisRosterDto = components['schemas']['HrisRosterDto'];
15809
+ export type HrisRosterPersonPatchDto = components['schemas']['HrisRosterPersonPatchDto'];
15810
+ export type HrisRosterPatchDto = components['schemas']['HrisRosterPatchDto'];
15811
+ export type HrisRosterCsvImportDto = components['schemas']['HrisRosterCsvImportDto'];
15689
15812
  export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
15690
15813
  export type AutomationCostOperationDto = components['schemas']['AutomationCostOperationDto'];
15691
15814
  export type AutomationCostSummaryRowDto = components['schemas']['AutomationCostSummaryRowDto'];
@@ -31941,6 +32064,146 @@ export interface operations {
31941
32064
  };
31942
32065
  };
31943
32066
  };
32067
+ getHrisRoster: {
32068
+ parameters: {
32069
+ query: {
32070
+ /** @description HRIS provider whose roster to return. */
32071
+ provider: "hibob" | "personio" | "zenhr" | "zelt";
32072
+ };
32073
+ header?: never;
32074
+ path: {
32075
+ workspaceId: components["parameters"]["WorkspaceId"];
32076
+ };
32077
+ cookie?: never;
32078
+ };
32079
+ requestBody?: never;
32080
+ responses: {
32081
+ /** @description Roster document */
32082
+ 200: {
32083
+ headers: {
32084
+ [name: string]: unknown;
32085
+ };
32086
+ content: {
32087
+ "application/json": components["schemas"]["HrisRosterDto"];
32088
+ };
32089
+ };
32090
+ /** @description Missing or invalid provider */
32091
+ 400: {
32092
+ headers: {
32093
+ [name: string]: unknown;
32094
+ };
32095
+ content: {
32096
+ "application/json": components["schemas"]["ErrorMessageDto"];
32097
+ };
32098
+ };
32099
+ 401: components["responses"]["Unauthorized"];
32100
+ 403: components["responses"]["Forbidden"];
32101
+ };
32102
+ };
32103
+ patchHrisRoster: {
32104
+ parameters: {
32105
+ query: {
32106
+ provider: "hibob" | "personio" | "zenhr" | "zelt";
32107
+ };
32108
+ header?: never;
32109
+ path: {
32110
+ workspaceId: components["parameters"]["WorkspaceId"];
32111
+ };
32112
+ cookie?: never;
32113
+ };
32114
+ requestBody: {
32115
+ content: {
32116
+ "application/json": components["schemas"]["HrisRosterPatchDto"];
32117
+ };
32118
+ };
32119
+ responses: {
32120
+ /** @description Updated roster */
32121
+ 200: {
32122
+ headers: {
32123
+ [name: string]: unknown;
32124
+ };
32125
+ content: {
32126
+ "application/json": components["schemas"]["HrisRosterDto"];
32127
+ };
32128
+ };
32129
+ /** @description Invalid body */
32130
+ 400: {
32131
+ headers: {
32132
+ [name: string]: unknown;
32133
+ };
32134
+ content: {
32135
+ "application/json": components["schemas"]["ErrorMessageDto"];
32136
+ };
32137
+ };
32138
+ 401: components["responses"]["Unauthorized"];
32139
+ 403: components["responses"]["Forbidden"];
32140
+ };
32141
+ };
32142
+ downloadHrisRosterCsv: {
32143
+ parameters: {
32144
+ query: {
32145
+ provider: "hibob" | "personio" | "zenhr" | "zelt";
32146
+ };
32147
+ header?: never;
32148
+ path: {
32149
+ workspaceId: components["parameters"]["WorkspaceId"];
32150
+ };
32151
+ cookie?: never;
32152
+ };
32153
+ requestBody?: never;
32154
+ responses: {
32155
+ /** @description CSV file */
32156
+ 200: {
32157
+ headers: {
32158
+ [name: string]: unknown;
32159
+ };
32160
+ content: {
32161
+ "text/csv": string;
32162
+ };
32163
+ };
32164
+ 401: components["responses"]["Unauthorized"];
32165
+ 403: components["responses"]["Forbidden"];
32166
+ };
32167
+ };
32168
+ importHrisRosterCsv: {
32169
+ parameters: {
32170
+ query: {
32171
+ provider: "hibob" | "personio" | "zenhr" | "zelt";
32172
+ };
32173
+ header?: never;
32174
+ path: {
32175
+ workspaceId: components["parameters"]["WorkspaceId"];
32176
+ };
32177
+ cookie?: never;
32178
+ };
32179
+ requestBody: {
32180
+ content: {
32181
+ "application/json": components["schemas"]["HrisRosterCsvImportDto"];
32182
+ };
32183
+ };
32184
+ responses: {
32185
+ /** @description Updated roster after import */
32186
+ 200: {
32187
+ headers: {
32188
+ [name: string]: unknown;
32189
+ };
32190
+ content: {
32191
+ "application/json": components["schemas"]["HrisRosterDto"];
32192
+ };
32193
+ };
32194
+ /** @description Invalid CSV */
32195
+ 400: {
32196
+ headers: {
32197
+ [name: string]: unknown;
32198
+ };
32199
+ content: {
32200
+ "application/json": components["schemas"]["ErrorMessageDto"];
32201
+ };
32202
+ };
32203
+ 401: components["responses"]["Unauthorized"];
32204
+ 403: components["responses"]["Forbidden"];
32205
+ };
32206
+ };
31944
32207
  listEvalPacks: {
31945
32208
  parameters: {
31946
32209
  query?: never;
package/src/index.ts CHANGED
@@ -1820,6 +1820,9 @@ export interface HrisProviderSyncResultDto {
1820
1820
  absenceCount?: number;
1821
1821
  durationMs?: number;
1822
1822
  error?: string;
1823
+ rosterAdded?: number;
1824
+ rosterUpdated?: number;
1825
+ rosterMissingFromSync?: number;
1823
1826
  }
1824
1827
 
1825
1828
  /** Response body for POST /workspaces/:id/connectors/zenhr/reconnect. */
@@ -1847,6 +1850,64 @@ export interface HrisTriggerSyncResultDto {
1847
1850
  error?: string;
1848
1851
  /** Per-provider results when one or more HRIS sources are configured. */
1849
1852
  providers?: HrisProviderSyncResultDto[];
1853
+ rosterAdded?: number;
1854
+ rosterUpdated?: number;
1855
+ rosterMissingFromSync?: number;
1856
+ }
1857
+
1858
+ export type HrisRosterSyncPresenceDto = "active" | "new" | "missing_from_sync" | "archived";
1859
+
1860
+ export interface HrisRosterPersonDto {
1861
+ employeeId: string;
1862
+ email: string;
1863
+ name: string;
1864
+ title?: string;
1865
+ department?: string;
1866
+ team?: string;
1867
+ managerId?: string;
1868
+ location?: string;
1869
+ githubUsername?: string;
1870
+ bitbucketNickname?: string;
1871
+ bitbucketUuid?: string;
1872
+ gitlabUsername?: string;
1873
+ alternateEmails?: string;
1874
+ syncPresence: HrisRosterSyncPresenceDto;
1875
+ fieldSources?: Record<string, "provider" | "overlay">;
1876
+ incompleteFields: string[];
1877
+ }
1878
+
1879
+ export interface HrisRosterDto {
1880
+ provider: string;
1881
+ updatedAt: string | null;
1882
+ people: HrisRosterPersonDto[];
1883
+ }
1884
+
1885
+ export interface HrisRosterPersonPatchDto {
1886
+ employeeId: string;
1887
+ overlay?: {
1888
+ name?: string;
1889
+ email?: string;
1890
+ title?: string;
1891
+ department?: string;
1892
+ team?: string;
1893
+ managerId?: string;
1894
+ location?: string;
1895
+ githubUsername?: string;
1896
+ bitbucketNickname?: string;
1897
+ bitbucketUuid?: string;
1898
+ gitlabUsername?: string;
1899
+ alternateEmails?: string;
1900
+ };
1901
+ dismissNew?: boolean;
1902
+ archive?: boolean;
1903
+ }
1904
+
1905
+ export interface HrisRosterPatchDto {
1906
+ people: HrisRosterPersonPatchDto[];
1907
+ }
1908
+
1909
+ export interface HrisRosterCsvImportDto {
1910
+ csv: string;
1850
1911
  }
1851
1912
 
1852
1913
  /** Weekly bucket in GET .../connectors/ai-tool/:provider/summary */