@thinkai/tai-api-contract 2.12.0 → 2.13.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 +261 -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 +211 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +261 -0
- package/src/index.ts +55 -0
|
@@ -1664,6 +1664,66 @@ export interface paths {
|
|
|
1664
1664
|
patch?: never;
|
|
1665
1665
|
trace?: never;
|
|
1666
1666
|
};
|
|
1667
|
+
"/workspaces/{workspaceId}/absences": {
|
|
1668
|
+
parameters: {
|
|
1669
|
+
query?: never;
|
|
1670
|
+
header?: never;
|
|
1671
|
+
path?: never;
|
|
1672
|
+
cookie?: never;
|
|
1673
|
+
};
|
|
1674
|
+
/**
|
|
1675
|
+
* List absence records
|
|
1676
|
+
* @description Returns time-off/absence records sourced from connected HRIS providers (e.g. Personio) for the given date window. Requires workspace membership.
|
|
1677
|
+
*/
|
|
1678
|
+
get: operations["listWorkspaceAbsences"];
|
|
1679
|
+
put?: never;
|
|
1680
|
+
post?: never;
|
|
1681
|
+
delete?: never;
|
|
1682
|
+
options?: never;
|
|
1683
|
+
head?: never;
|
|
1684
|
+
patch?: never;
|
|
1685
|
+
trace?: never;
|
|
1686
|
+
};
|
|
1687
|
+
"/workspaces/{workspaceId}/hris/status": {
|
|
1688
|
+
parameters: {
|
|
1689
|
+
query?: never;
|
|
1690
|
+
header?: never;
|
|
1691
|
+
path?: never;
|
|
1692
|
+
cookie?: never;
|
|
1693
|
+
};
|
|
1694
|
+
/**
|
|
1695
|
+
* HRIS sync status
|
|
1696
|
+
* @description Returns the last sync status for every HRIS provider connected to the workspace. Returns an empty `statuses` array when no HRIS source has been synced yet. Requires workspace membership.
|
|
1697
|
+
*/
|
|
1698
|
+
get: operations["getHrisSyncStatus"];
|
|
1699
|
+
put?: never;
|
|
1700
|
+
post?: never;
|
|
1701
|
+
delete?: never;
|
|
1702
|
+
options?: never;
|
|
1703
|
+
head?: never;
|
|
1704
|
+
patch?: never;
|
|
1705
|
+
trace?: never;
|
|
1706
|
+
};
|
|
1707
|
+
"/workspaces/{workspaceId}/hris/sync": {
|
|
1708
|
+
parameters: {
|
|
1709
|
+
query?: never;
|
|
1710
|
+
header?: never;
|
|
1711
|
+
path?: never;
|
|
1712
|
+
cookie?: never;
|
|
1713
|
+
};
|
|
1714
|
+
get?: never;
|
|
1715
|
+
put?: never;
|
|
1716
|
+
/**
|
|
1717
|
+
* Trigger manual HRIS sync
|
|
1718
|
+
* @description Manually triggers an HRIS sync for the workspace. Runs synchronously and returns the result. Requires editor role (same permission level as org-chart writes). Returns 422 when no HRIS source is configured.
|
|
1719
|
+
*/
|
|
1720
|
+
post: operations["triggerHrisSync"];
|
|
1721
|
+
delete?: never;
|
|
1722
|
+
options?: never;
|
|
1723
|
+
head?: never;
|
|
1724
|
+
patch?: never;
|
|
1725
|
+
trace?: never;
|
|
1726
|
+
};
|
|
1667
1727
|
}
|
|
1668
1728
|
export type webhooks = Record<string, never>;
|
|
1669
1729
|
export interface components {
|
|
@@ -3214,6 +3274,57 @@ export interface components {
|
|
|
3214
3274
|
[key: string]: unknown;
|
|
3215
3275
|
} | null;
|
|
3216
3276
|
};
|
|
3277
|
+
WorkspaceAbsenceDto: {
|
|
3278
|
+
/** @description HRIS provider that sourced this record (e.g. 'personio', 'zenhr'). */
|
|
3279
|
+
source: string;
|
|
3280
|
+
/** Format: email */
|
|
3281
|
+
employeeEmail: string;
|
|
3282
|
+
absenceType: string;
|
|
3283
|
+
/** Format: date */
|
|
3284
|
+
startDate: string;
|
|
3285
|
+
/** Format: date */
|
|
3286
|
+
endDate: string;
|
|
3287
|
+
halfDayStart: boolean;
|
|
3288
|
+
halfDayEnd: boolean;
|
|
3289
|
+
/** @enum {string} */
|
|
3290
|
+
status: "approved" | "pending" | "rejected";
|
|
3291
|
+
};
|
|
3292
|
+
WorkspaceAbsenceListDto: {
|
|
3293
|
+
absences: components["schemas"]["WorkspaceAbsenceDto"][];
|
|
3294
|
+
/**
|
|
3295
|
+
* Format: date-time
|
|
3296
|
+
* @description ISO timestamp of the most recent successful HRIS sync, or null if never synced.
|
|
3297
|
+
*/
|
|
3298
|
+
syncedAt: string | null;
|
|
3299
|
+
};
|
|
3300
|
+
HrisSyncStatusDto: {
|
|
3301
|
+
/** @description Provider identifier (e.g. 'personio', 'zenhr'). */
|
|
3302
|
+
provider: string;
|
|
3303
|
+
/** Format: date-time */
|
|
3304
|
+
lastSyncAt: string | null;
|
|
3305
|
+
/** @enum {string} */
|
|
3306
|
+
status: "ok" | "error" | "never";
|
|
3307
|
+
lastError?: string | null;
|
|
3308
|
+
};
|
|
3309
|
+
HrisSyncStatusListDto: {
|
|
3310
|
+
statuses: components["schemas"]["HrisSyncStatusDto"][];
|
|
3311
|
+
};
|
|
3312
|
+
HrisTriggerSyncResultDto: {
|
|
3313
|
+
/** @enum {string} */
|
|
3314
|
+
status: "ok" | "skipped" | "error";
|
|
3315
|
+
/** @description Stable machine-readable code (e.g. 'no_personio_source', 'hris_sync_failed'). */
|
|
3316
|
+
code?: string;
|
|
3317
|
+
/** @description Number of employees synced (present when status = 'ok'). */
|
|
3318
|
+
employeeCount?: number;
|
|
3319
|
+
/** @description Number of absence records synced (present when status = 'ok'). */
|
|
3320
|
+
absenceCount?: number;
|
|
3321
|
+
/** @description Wall-clock duration of the sync in milliseconds (present when status = 'ok'). */
|
|
3322
|
+
durationMs?: number;
|
|
3323
|
+
/** @description Machine-readable reason for a skipped sync (e.g. 'no_personio_source'). */
|
|
3324
|
+
reason?: string;
|
|
3325
|
+
/** @description Error message when status = 'error'. */
|
|
3326
|
+
error?: string;
|
|
3327
|
+
};
|
|
3217
3328
|
ActivityLogPageDto: components["schemas"]["PageMetaDto"] & {
|
|
3218
3329
|
items: components["schemas"]["ActivityLogEntryDto"][];
|
|
3219
3330
|
};
|
|
@@ -3443,6 +3554,11 @@ export type PatchRepoArchiveResponseDto = components['schemas']['PatchRepoArchiv
|
|
|
3443
3554
|
export type ActivityLogEventTypeDto = components['schemas']['ActivityLogEventTypeDto'];
|
|
3444
3555
|
export type ActivityLogActorDto = components['schemas']['ActivityLogActorDto'];
|
|
3445
3556
|
export type ActivityLogEntryDto = components['schemas']['ActivityLogEntryDto'];
|
|
3557
|
+
export type WorkspaceAbsenceDto = components['schemas']['WorkspaceAbsenceDto'];
|
|
3558
|
+
export type WorkspaceAbsenceListDto = components['schemas']['WorkspaceAbsenceListDto'];
|
|
3559
|
+
export type HrisSyncStatusDto = components['schemas']['HrisSyncStatusDto'];
|
|
3560
|
+
export type HrisSyncStatusListDto = components['schemas']['HrisSyncStatusListDto'];
|
|
3561
|
+
export type HrisTriggerSyncResultDto = components['schemas']['HrisTriggerSyncResultDto'];
|
|
3446
3562
|
export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
|
|
3447
3563
|
export type ResponseUnauthorized = components['responses']['Unauthorized'];
|
|
3448
3564
|
export type ResponseForbidden = components['responses']['Forbidden'];
|
|
@@ -7619,5 +7735,150 @@ export interface operations {
|
|
|
7619
7735
|
};
|
|
7620
7736
|
};
|
|
7621
7737
|
};
|
|
7738
|
+
listWorkspaceAbsences: {
|
|
7739
|
+
parameters: {
|
|
7740
|
+
query?: {
|
|
7741
|
+
/** @description Start of date window (ISO YYYY-MM-DD). Defaults to today. */
|
|
7742
|
+
from?: string;
|
|
7743
|
+
/** @description End of date window (ISO YYYY-MM-DD). Defaults to 90 days from today. */
|
|
7744
|
+
to?: string;
|
|
7745
|
+
};
|
|
7746
|
+
header?: never;
|
|
7747
|
+
path: {
|
|
7748
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
7749
|
+
};
|
|
7750
|
+
cookie?: never;
|
|
7751
|
+
};
|
|
7752
|
+
requestBody?: never;
|
|
7753
|
+
responses: {
|
|
7754
|
+
/** @description Absence list with last sync timestamp */
|
|
7755
|
+
200: {
|
|
7756
|
+
headers: {
|
|
7757
|
+
[name: string]: unknown;
|
|
7758
|
+
};
|
|
7759
|
+
content: {
|
|
7760
|
+
/**
|
|
7761
|
+
* @example {
|
|
7762
|
+
* "absences": [
|
|
7763
|
+
* {
|
|
7764
|
+
* "source": "personio",
|
|
7765
|
+
* "employeeEmail": "alice@example.com",
|
|
7766
|
+
* "absenceType": "Vacation",
|
|
7767
|
+
* "startDate": "2025-07-01",
|
|
7768
|
+
* "endDate": "2025-07-05",
|
|
7769
|
+
* "halfDayStart": false,
|
|
7770
|
+
* "halfDayEnd": false,
|
|
7771
|
+
* "status": "approved"
|
|
7772
|
+
* }
|
|
7773
|
+
* ],
|
|
7774
|
+
* "syncedAt": "2025-06-30T08:00:00.000Z"
|
|
7775
|
+
* }
|
|
7776
|
+
*/
|
|
7777
|
+
"application/json": components["schemas"]["WorkspaceAbsenceListDto"];
|
|
7778
|
+
};
|
|
7779
|
+
};
|
|
7780
|
+
401: components["responses"]["Unauthorized"];
|
|
7781
|
+
403: components["responses"]["Forbidden"];
|
|
7782
|
+
};
|
|
7783
|
+
};
|
|
7784
|
+
getHrisSyncStatus: {
|
|
7785
|
+
parameters: {
|
|
7786
|
+
query?: never;
|
|
7787
|
+
header?: never;
|
|
7788
|
+
path: {
|
|
7789
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
7790
|
+
};
|
|
7791
|
+
cookie?: never;
|
|
7792
|
+
};
|
|
7793
|
+
requestBody?: never;
|
|
7794
|
+
responses: {
|
|
7795
|
+
/** @description Sync status list */
|
|
7796
|
+
200: {
|
|
7797
|
+
headers: {
|
|
7798
|
+
[name: string]: unknown;
|
|
7799
|
+
};
|
|
7800
|
+
content: {
|
|
7801
|
+
/**
|
|
7802
|
+
* @example {
|
|
7803
|
+
* "statuses": [
|
|
7804
|
+
* {
|
|
7805
|
+
* "provider": "personio",
|
|
7806
|
+
* "lastSyncAt": "2025-06-30T08:00:00.000Z",
|
|
7807
|
+
* "status": "ok"
|
|
7808
|
+
* }
|
|
7809
|
+
* ]
|
|
7810
|
+
* }
|
|
7811
|
+
*/
|
|
7812
|
+
"application/json": components["schemas"]["HrisSyncStatusListDto"];
|
|
7813
|
+
};
|
|
7814
|
+
};
|
|
7815
|
+
401: components["responses"]["Unauthorized"];
|
|
7816
|
+
403: components["responses"]["Forbidden"];
|
|
7817
|
+
};
|
|
7818
|
+
};
|
|
7819
|
+
triggerHrisSync: {
|
|
7820
|
+
parameters: {
|
|
7821
|
+
query?: never;
|
|
7822
|
+
header?: never;
|
|
7823
|
+
path: {
|
|
7824
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
7825
|
+
};
|
|
7826
|
+
cookie?: never;
|
|
7827
|
+
};
|
|
7828
|
+
requestBody?: never;
|
|
7829
|
+
responses: {
|
|
7830
|
+
/** @description Sync completed successfully */
|
|
7831
|
+
200: {
|
|
7832
|
+
headers: {
|
|
7833
|
+
[name: string]: unknown;
|
|
7834
|
+
};
|
|
7835
|
+
content: {
|
|
7836
|
+
/**
|
|
7837
|
+
* @example {
|
|
7838
|
+
* "status": "ok",
|
|
7839
|
+
* "employeeCount": 42,
|
|
7840
|
+
* "absenceCount": 7,
|
|
7841
|
+
* "durationMs": 1234
|
|
7842
|
+
* }
|
|
7843
|
+
*/
|
|
7844
|
+
"application/json": components["schemas"]["HrisTriggerSyncResultDto"];
|
|
7845
|
+
};
|
|
7846
|
+
};
|
|
7847
|
+
401: components["responses"]["Unauthorized"];
|
|
7848
|
+
403: components["responses"]["Forbidden"];
|
|
7849
|
+
/** @description No HRIS source configured for this workspace */
|
|
7850
|
+
422: {
|
|
7851
|
+
headers: {
|
|
7852
|
+
[name: string]: unknown;
|
|
7853
|
+
};
|
|
7854
|
+
content: {
|
|
7855
|
+
/**
|
|
7856
|
+
* @example {
|
|
7857
|
+
* "status": "skipped",
|
|
7858
|
+
* "code": "no_personio_source",
|
|
7859
|
+
* "reason": "no_personio_source"
|
|
7860
|
+
* }
|
|
7861
|
+
*/
|
|
7862
|
+
"application/json": components["schemas"]["HrisTriggerSyncResultDto"];
|
|
7863
|
+
};
|
|
7864
|
+
};
|
|
7865
|
+
/** @description Sync failed (Personio API error, decryption failure, etc.) */
|
|
7866
|
+
500: {
|
|
7867
|
+
headers: {
|
|
7868
|
+
[name: string]: unknown;
|
|
7869
|
+
};
|
|
7870
|
+
content: {
|
|
7871
|
+
/**
|
|
7872
|
+
* @example {
|
|
7873
|
+
* "status": "error",
|
|
7874
|
+
* "code": "hris_sync_failed",
|
|
7875
|
+
* "error": "Personio employees API 401"
|
|
7876
|
+
* }
|
|
7877
|
+
*/
|
|
7878
|
+
"application/json": components["schemas"]["HrisTriggerSyncResultDto"];
|
|
7879
|
+
};
|
|
7880
|
+
};
|
|
7881
|
+
};
|
|
7882
|
+
};
|
|
7622
7883
|
}
|
|
7623
7884
|
//# sourceMappingURL=openapi.d.ts.map
|