@thinkai/tai-api-contract 2.38.0 → 2.39.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 +83 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +66 -0
- package/package.json +1 -1
- package/src/generated/openapi.ts +83 -0
- package/src/index.ts +8 -0
|
@@ -2055,6 +2055,26 @@ export interface paths {
|
|
|
2055
2055
|
patch?: never;
|
|
2056
2056
|
trace?: never;
|
|
2057
2057
|
};
|
|
2058
|
+
"/workspaces/{workspaceId}/integrations/zenhr/reconnect": {
|
|
2059
|
+
parameters: {
|
|
2060
|
+
query?: never;
|
|
2061
|
+
header?: never;
|
|
2062
|
+
path?: never;
|
|
2063
|
+
cookie?: never;
|
|
2064
|
+
};
|
|
2065
|
+
get?: never;
|
|
2066
|
+
put?: never;
|
|
2067
|
+
/**
|
|
2068
|
+
* Attempt silent ZenHR reconnect
|
|
2069
|
+
* @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`).
|
|
2070
|
+
*/
|
|
2071
|
+
post: operations["reconnectWorkspaceZenHr"];
|
|
2072
|
+
delete?: never;
|
|
2073
|
+
options?: never;
|
|
2074
|
+
head?: never;
|
|
2075
|
+
patch?: never;
|
|
2076
|
+
trace?: never;
|
|
2077
|
+
};
|
|
2058
2078
|
"/workspaces/{workspaceId}/hris/status": {
|
|
2059
2079
|
parameters: {
|
|
2060
2080
|
query?: never;
|
|
@@ -4189,6 +4209,16 @@ export interface components {
|
|
|
4189
4209
|
HrisSyncStatusListDto: {
|
|
4190
4210
|
statuses: components["schemas"]["HrisSyncStatusDto"][];
|
|
4191
4211
|
};
|
|
4212
|
+
ZenHrReconnectResultDto: {
|
|
4213
|
+
ok: boolean;
|
|
4214
|
+
/** @description When true with ok=false, stored credentials exist but refresh failed with an OAuth re-authorization error; the SPA should start ZenHR OAuth next. */
|
|
4215
|
+
oauthRequired?: boolean;
|
|
4216
|
+
/**
|
|
4217
|
+
* @description Machine-readable code when ok=false and oauthRequired=true.
|
|
4218
|
+
* @enum {string}
|
|
4219
|
+
*/
|
|
4220
|
+
error?: "zenhr_oauth_required";
|
|
4221
|
+
};
|
|
4192
4222
|
HrisTriggerSyncResultDto: {
|
|
4193
4223
|
/** @enum {string} */
|
|
4194
4224
|
status: "ok" | "skipped" | "error" | "partial";
|
|
@@ -4600,6 +4630,7 @@ export type WorkspaceAbsenceDto = components['schemas']['WorkspaceAbsenceDto'];
|
|
|
4600
4630
|
export type WorkspaceAbsenceListDto = components['schemas']['WorkspaceAbsenceListDto'];
|
|
4601
4631
|
export type HrisSyncStatusDto = components['schemas']['HrisSyncStatusDto'];
|
|
4602
4632
|
export type HrisSyncStatusListDto = components['schemas']['HrisSyncStatusListDto'];
|
|
4633
|
+
export type ZenHrReconnectResultDto = components['schemas']['ZenHrReconnectResultDto'];
|
|
4603
4634
|
export type HrisTriggerSyncResultDto = components['schemas']['HrisTriggerSyncResultDto'];
|
|
4604
4635
|
export type HrisProviderSyncResultDto = components['schemas']['HrisProviderSyncResultDto'];
|
|
4605
4636
|
export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
|
|
@@ -9812,6 +9843,58 @@ export interface operations {
|
|
|
9812
9843
|
403: components["responses"]["Forbidden"];
|
|
9813
9844
|
};
|
|
9814
9845
|
};
|
|
9846
|
+
reconnectWorkspaceZenHr: {
|
|
9847
|
+
parameters: {
|
|
9848
|
+
query?: never;
|
|
9849
|
+
header?: never;
|
|
9850
|
+
path: {
|
|
9851
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
9852
|
+
};
|
|
9853
|
+
cookie?: never;
|
|
9854
|
+
};
|
|
9855
|
+
requestBody?: never;
|
|
9856
|
+
responses: {
|
|
9857
|
+
/** @description Silent reconnect succeeded or OAuth is required */
|
|
9858
|
+
200: {
|
|
9859
|
+
headers: {
|
|
9860
|
+
[name: string]: unknown;
|
|
9861
|
+
};
|
|
9862
|
+
content: {
|
|
9863
|
+
"application/json": components["schemas"]["ZenHrReconnectResultDto"];
|
|
9864
|
+
};
|
|
9865
|
+
};
|
|
9866
|
+
401: components["responses"]["Unauthorized"];
|
|
9867
|
+
403: components["responses"]["Forbidden"];
|
|
9868
|
+
/** @description ZenHR is not connected for this workspace */
|
|
9869
|
+
404: {
|
|
9870
|
+
headers: {
|
|
9871
|
+
[name: string]: unknown;
|
|
9872
|
+
};
|
|
9873
|
+
content: {
|
|
9874
|
+
/**
|
|
9875
|
+
* @example {
|
|
9876
|
+
* "error": "zenhr_not_connected"
|
|
9877
|
+
* }
|
|
9878
|
+
*/
|
|
9879
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
9880
|
+
};
|
|
9881
|
+
};
|
|
9882
|
+
/** @description ZenHR refresh or branch ping failed for a non-OAuth reason */
|
|
9883
|
+
502: {
|
|
9884
|
+
headers: {
|
|
9885
|
+
[name: string]: unknown;
|
|
9886
|
+
};
|
|
9887
|
+
content: {
|
|
9888
|
+
/**
|
|
9889
|
+
* @example {
|
|
9890
|
+
* "error": "zenhr_reconnect_failed"
|
|
9891
|
+
* }
|
|
9892
|
+
*/
|
|
9893
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
9894
|
+
};
|
|
9895
|
+
};
|
|
9896
|
+
};
|
|
9897
|
+
};
|
|
9815
9898
|
getHrisSyncStatus: {
|
|
9816
9899
|
parameters: {
|
|
9817
9900
|
query?: never;
|