@thinkai/tai-api-contract 2.12.0 → 2.14.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.
- package/dist/generated/openapi.d.ts +600 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -1
- package/openapi/openapi.yaml +502 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +600 -0
- package/src/index.ts +55 -0
package/src/index.ts
CHANGED
|
@@ -1019,3 +1019,58 @@ export interface YourAiJourneyAiSpendDto {
|
|
|
1019
1019
|
activeUsers: number;
|
|
1020
1020
|
}[];
|
|
1021
1021
|
}
|
|
1022
|
+
|
|
1023
|
+
// --- HRIS (Personio, ZenHR, …) ---
|
|
1024
|
+
|
|
1025
|
+
/** A single absence/leave record sourced from an HRIS provider. */
|
|
1026
|
+
export interface WorkspaceAbsenceDto {
|
|
1027
|
+
/** HRIS provider that sourced this record ('personio', 'zenhr', …). */
|
|
1028
|
+
source: string;
|
|
1029
|
+
employeeEmail: string;
|
|
1030
|
+
absenceType: string;
|
|
1031
|
+
/** ISO date YYYY-MM-DD */
|
|
1032
|
+
startDate: string;
|
|
1033
|
+
/** ISO date YYYY-MM-DD */
|
|
1034
|
+
endDate: string;
|
|
1035
|
+
halfDayStart: boolean;
|
|
1036
|
+
halfDayEnd: boolean;
|
|
1037
|
+
status: "approved" | "pending" | "rejected";
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/** Response body for GET /workspaces/:id/absences */
|
|
1041
|
+
export interface WorkspaceAbsenceListDto {
|
|
1042
|
+
absences: WorkspaceAbsenceDto[];
|
|
1043
|
+
/** ISO timestamp of the most recent successful sync, or null if never synced. */
|
|
1044
|
+
syncedAt: string | null;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/** Sync status for a single HRIS provider connected to a workspace. */
|
|
1048
|
+
export interface HrisSyncStatusDto {
|
|
1049
|
+
/** Provider identifier ('personio', 'zenhr', …). */
|
|
1050
|
+
provider: string;
|
|
1051
|
+
lastSyncAt: string | null;
|
|
1052
|
+
status: "ok" | "error" | "never";
|
|
1053
|
+
lastError?: string;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
/** Response body for GET /workspaces/:id/hris/status */
|
|
1057
|
+
export interface HrisSyncStatusListDto {
|
|
1058
|
+
statuses: HrisSyncStatusDto[];
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/** Response body for POST /workspaces/:id/hris/sync (manual trigger). */
|
|
1062
|
+
export interface HrisTriggerSyncResultDto {
|
|
1063
|
+
status: "ok" | "skipped" | "error";
|
|
1064
|
+
/** Stable machine-readable code (e.g. 'no_personio_source', 'hris_sync_failed'). */
|
|
1065
|
+
code?: string;
|
|
1066
|
+
/** Number of employees synced (present when status = 'ok'). */
|
|
1067
|
+
employeeCount?: number;
|
|
1068
|
+
/** Number of absence records synced (present when status = 'ok'). */
|
|
1069
|
+
absenceCount?: number;
|
|
1070
|
+
/** Wall-clock duration of the sync in milliseconds (present when status = 'ok'). */
|
|
1071
|
+
durationMs?: number;
|
|
1072
|
+
/** Machine-readable reason for a skipped sync (e.g. 'no_personio_source'). */
|
|
1073
|
+
reason?: string;
|
|
1074
|
+
/** Error message when status = 'error'. */
|
|
1075
|
+
error?: string;
|
|
1076
|
+
}
|