@unified-api/typescript-sdk 2.83.27 → 2.83.29
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/README.md +8 -0
- package/dist/commonjs/funcs/groupListHrisGroups.js +1 -0
- package/dist/commonjs/funcs/groupListHrisGroups.js.map +1 -1
- package/dist/commonjs/funcs/hrisCreateHrisTimeoff.d.ts +15 -0
- package/dist/commonjs/funcs/hrisCreateHrisTimeoff.d.ts.map +1 -0
- package/dist/commonjs/funcs/hrisCreateHrisTimeoff.js +122 -0
- package/dist/commonjs/funcs/hrisCreateHrisTimeoff.js.map +1 -0
- package/dist/commonjs/funcs/hrisPatchHrisTimeoff.d.ts +15 -0
- package/dist/commonjs/funcs/hrisPatchHrisTimeoff.d.ts.map +1 -0
- package/dist/commonjs/funcs/hrisPatchHrisTimeoff.js +126 -0
- package/dist/commonjs/funcs/hrisPatchHrisTimeoff.js.map +1 -0
- package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.d.ts +14 -0
- package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.d.ts.map +1 -0
- package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.js +122 -0
- package/dist/commonjs/funcs/hrisRemoveHrisTimeoff.js.map +1 -0
- package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.d.ts +15 -0
- package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.d.ts.map +1 -0
- package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.js +126 -0
- package/dist/commonjs/funcs/hrisUpdateHrisTimeoff.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +19 -8
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/sdk/hris.d.ts +16 -0
- package/dist/commonjs/sdk/hris.d.ts.map +1 -1
- package/dist/commonjs/sdk/hris.js +28 -0
- package/dist/commonjs/sdk/hris.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/createhristimeoff.d.ts +48 -0
- package/dist/commonjs/sdk/models/operations/createhristimeoff.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/createhristimeoff.js +77 -0
- package/dist/commonjs/sdk/models/operations/createhristimeoff.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts +4 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +4 -0
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listhrisgroups.d.ts +5 -0
- package/dist/commonjs/sdk/models/operations/listhrisgroups.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/listhrisgroups.js +1 -0
- package/dist/commonjs/sdk/models/operations/listhrisgroups.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchhristimeoff.d.ts +53 -0
- package/dist/commonjs/sdk/models/operations/patchhristimeoff.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/patchhristimeoff.js +78 -0
- package/dist/commonjs/sdk/models/operations/patchhristimeoff.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/removehristimeoff.d.ts +30 -0
- package/dist/commonjs/sdk/models/operations/removehristimeoff.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/removehristimeoff.js +68 -0
- package/dist/commonjs/sdk/models/operations/removehristimeoff.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/updatehristimeoff.d.ts +53 -0
- package/dist/commonjs/sdk/models/operations/updatehristimeoff.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/updatehristimeoff.js +78 -0
- package/dist/commonjs/sdk/models/operations/updatehristimeoff.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/hristimeoff.d.ts +25 -1
- package/dist/commonjs/sdk/models/shared/hristimeoff.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/hristimeoff.js +38 -2
- package/dist/commonjs/sdk/models/shared/hristimeoff.js.map +1 -1
- package/dist/commonjs/sdk/timeoff.d.ts +16 -0
- package/dist/commonjs/sdk/timeoff.d.ts.map +1 -1
- package/dist/commonjs/sdk/timeoff.js +28 -0
- package/dist/commonjs/sdk/timeoff.js.map +1 -1
- package/dist/esm/funcs/groupListHrisGroups.js +1 -0
- package/dist/esm/funcs/groupListHrisGroups.js.map +1 -1
- package/dist/esm/funcs/hrisCreateHrisTimeoff.d.ts +15 -0
- package/dist/esm/funcs/hrisCreateHrisTimeoff.d.ts.map +1 -0
- package/dist/esm/funcs/hrisCreateHrisTimeoff.js +86 -0
- package/dist/esm/funcs/hrisCreateHrisTimeoff.js.map +1 -0
- package/dist/esm/funcs/hrisPatchHrisTimeoff.d.ts +15 -0
- package/dist/esm/funcs/hrisPatchHrisTimeoff.d.ts.map +1 -0
- package/dist/esm/funcs/hrisPatchHrisTimeoff.js +90 -0
- package/dist/esm/funcs/hrisPatchHrisTimeoff.js.map +1 -0
- package/dist/esm/funcs/hrisRemoveHrisTimeoff.d.ts +14 -0
- package/dist/esm/funcs/hrisRemoveHrisTimeoff.d.ts.map +1 -0
- package/dist/esm/funcs/hrisRemoveHrisTimeoff.js +86 -0
- package/dist/esm/funcs/hrisRemoveHrisTimeoff.js.map +1 -0
- package/dist/esm/funcs/hrisUpdateHrisTimeoff.d.ts +15 -0
- package/dist/esm/funcs/hrisUpdateHrisTimeoff.d.ts.map +1 -0
- package/dist/esm/funcs/hrisUpdateHrisTimeoff.js +90 -0
- package/dist/esm/funcs/hrisUpdateHrisTimeoff.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/security.d.ts +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +19 -8
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/sdk/hris.d.ts +16 -0
- package/dist/esm/sdk/hris.d.ts.map +1 -1
- package/dist/esm/sdk/hris.js +28 -0
- package/dist/esm/sdk/hris.js.map +1 -1
- package/dist/esm/sdk/models/operations/createhristimeoff.d.ts +48 -0
- package/dist/esm/sdk/models/operations/createhristimeoff.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/createhristimeoff.js +40 -0
- package/dist/esm/sdk/models/operations/createhristimeoff.js.map +1 -0
- package/dist/esm/sdk/models/operations/index.d.ts +4 -0
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +4 -0
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/listhrisgroups.d.ts +5 -0
- package/dist/esm/sdk/models/operations/listhrisgroups.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/listhrisgroups.js +1 -0
- package/dist/esm/sdk/models/operations/listhrisgroups.js.map +1 -1
- package/dist/esm/sdk/models/operations/patchhristimeoff.d.ts +53 -0
- package/dist/esm/sdk/models/operations/patchhristimeoff.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/patchhristimeoff.js +41 -0
- package/dist/esm/sdk/models/operations/patchhristimeoff.js.map +1 -0
- package/dist/esm/sdk/models/operations/removehristimeoff.d.ts +30 -0
- package/dist/esm/sdk/models/operations/removehristimeoff.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/removehristimeoff.js +30 -0
- package/dist/esm/sdk/models/operations/removehristimeoff.js.map +1 -0
- package/dist/esm/sdk/models/operations/updatehristimeoff.d.ts +53 -0
- package/dist/esm/sdk/models/operations/updatehristimeoff.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/updatehristimeoff.js +41 -0
- package/dist/esm/sdk/models/operations/updatehristimeoff.js.map +1 -0
- package/dist/esm/sdk/models/shared/hristimeoff.d.ts +25 -1
- package/dist/esm/sdk/models/shared/hristimeoff.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/hristimeoff.js +36 -1
- package/dist/esm/sdk/models/shared/hristimeoff.js.map +1 -1
- package/dist/esm/sdk/timeoff.d.ts +16 -0
- package/dist/esm/sdk/timeoff.d.ts.map +1 -1
- package/dist/esm/sdk/timeoff.js +28 -0
- package/dist/esm/sdk/timeoff.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/groupListHrisGroups.ts +1 -0
- package/src/funcs/hrisCreateHrisTimeoff.ts +169 -0
- package/src/funcs/hrisPatchHrisTimeoff.ts +173 -0
- package/src/funcs/hrisRemoveHrisTimeoff.ts +174 -0
- package/src/funcs/hrisUpdateHrisTimeoff.ts +173 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +14 -2
- package/src/sdk/hris.ts +60 -0
- package/src/sdk/models/operations/createhristimeoff.ts +82 -0
- package/src/sdk/models/operations/index.ts +4 -0
- package/src/sdk/models/operations/listhrisgroups.ts +6 -0
- package/src/sdk/models/operations/patchhristimeoff.ts +88 -0
- package/src/sdk/models/operations/removehristimeoff.ts +75 -0
- package/src/sdk/models/operations/updatehristimeoff.ts +88 -0
- package/src/sdk/models/shared/hristimeoff.ts +63 -2
- package/src/sdk/timeoff.ts +60 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
21
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
22
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
23
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
24
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
26
|
+
import { Result } from "../sdk/types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Update a timeoff
|
|
30
|
+
*/
|
|
31
|
+
export function hrisUpdateHrisTimeoff(
|
|
32
|
+
client: UnifiedToCore,
|
|
33
|
+
request: operations.UpdateHrisTimeoffRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
shared.HrisTimeoff,
|
|
38
|
+
| UnifiedToError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: UnifiedToCore,
|
|
57
|
+
request: operations.UpdateHrisTimeoffRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
shared.HrisTimeoff,
|
|
63
|
+
| UnifiedToError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const parsed = safeParse(
|
|
76
|
+
request,
|
|
77
|
+
(value) => operations.UpdateHrisTimeoffRequest$outboundSchema.parse(value),
|
|
78
|
+
"Input validation failed",
|
|
79
|
+
);
|
|
80
|
+
if (!parsed.ok) {
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const payload = parsed.value;
|
|
84
|
+
const body = encodeJSON("body", payload.HrisTimeoff, { explode: true });
|
|
85
|
+
|
|
86
|
+
const pathParams = {
|
|
87
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
88
|
+
explode: false,
|
|
89
|
+
charEncoding: "percent",
|
|
90
|
+
}),
|
|
91
|
+
id: encodeSimple("id", payload.id, {
|
|
92
|
+
explode: false,
|
|
93
|
+
charEncoding: "percent",
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
96
|
+
const path = pathToFunc("/hris/{connection_id}/timeoff/{id}")(pathParams);
|
|
97
|
+
|
|
98
|
+
const query = encodeFormQuery({
|
|
99
|
+
"fields": payload.fields,
|
|
100
|
+
"raw": payload.raw,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const headers = new Headers(compactMap({
|
|
104
|
+
"Content-Type": "application/json",
|
|
105
|
+
Accept: "application/json",
|
|
106
|
+
}));
|
|
107
|
+
|
|
108
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
109
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
110
|
+
|
|
111
|
+
const context = {
|
|
112
|
+
options: client._options,
|
|
113
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
114
|
+
operationID: "updateHrisTimeoff",
|
|
115
|
+
oAuth2Scopes: null,
|
|
116
|
+
|
|
117
|
+
resolvedSecurity: requestSecurity,
|
|
118
|
+
|
|
119
|
+
securitySource: client._options.security,
|
|
120
|
+
retryConfig: options?.retries
|
|
121
|
+
|| client._options.retryConfig
|
|
122
|
+
|| { strategy: "none" },
|
|
123
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const requestRes = client._createRequest(context, {
|
|
127
|
+
security: requestSecurity,
|
|
128
|
+
method: "PUT",
|
|
129
|
+
baseURL: options?.serverURL,
|
|
130
|
+
path: path,
|
|
131
|
+
headers: headers,
|
|
132
|
+
query: query,
|
|
133
|
+
body: body,
|
|
134
|
+
userAgent: client._options.userAgent,
|
|
135
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
136
|
+
}, options);
|
|
137
|
+
if (!requestRes.ok) {
|
|
138
|
+
return [requestRes, { status: "invalid" }];
|
|
139
|
+
}
|
|
140
|
+
const req = requestRes.value;
|
|
141
|
+
|
|
142
|
+
const doResult = await client._do(req, {
|
|
143
|
+
context,
|
|
144
|
+
errorCodes: ["4XX", "5XX"],
|
|
145
|
+
retryConfig: context.retryConfig,
|
|
146
|
+
retryCodes: context.retryCodes,
|
|
147
|
+
});
|
|
148
|
+
if (!doResult.ok) {
|
|
149
|
+
return [doResult, { status: "request-error", request: req }];
|
|
150
|
+
}
|
|
151
|
+
const response = doResult.value;
|
|
152
|
+
|
|
153
|
+
const [result] = await M.match<
|
|
154
|
+
shared.HrisTimeoff,
|
|
155
|
+
| UnifiedToError
|
|
156
|
+
| ResponseValidationError
|
|
157
|
+
| ConnectionError
|
|
158
|
+
| RequestAbortedError
|
|
159
|
+
| RequestTimeoutError
|
|
160
|
+
| InvalidRequestError
|
|
161
|
+
| UnexpectedClientError
|
|
162
|
+
| SDKValidationError
|
|
163
|
+
>(
|
|
164
|
+
M.json(200, shared.HrisTimeoff$inboundSchema),
|
|
165
|
+
M.fail("4XX"),
|
|
166
|
+
M.fail("5XX"),
|
|
167
|
+
)(response, req);
|
|
168
|
+
if (!result.ok) {
|
|
169
|
+
return [result, { status: "complete", request: req, response }];
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return [result, { status: "complete", request: req, response }];
|
|
173
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "1.0",
|
|
76
|
-
sdkVersion: "2.83.
|
|
77
|
-
genVersion: "2.
|
|
76
|
+
sdkVersion: "2.83.29",
|
|
77
|
+
genVersion: "2.873.1",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 2.83.
|
|
79
|
+
"speakeasy-sdk/typescript 2.83.29 2.873.1 1.0 @unified-api/typescript-sdk",
|
|
80
80
|
} as const;
|
package/src/lib/security.ts
CHANGED
|
@@ -239,8 +239,9 @@ function applyBearer(
|
|
|
239
239
|
|
|
240
240
|
export function resolveGlobalSecurity(
|
|
241
241
|
security: Partial<shared.Security> | null | undefined,
|
|
242
|
+
allowedFields?: number[],
|
|
242
243
|
): SecurityState | null {
|
|
243
|
-
|
|
244
|
+
let inputs: SecurityInput[][] = [
|
|
244
245
|
[
|
|
245
246
|
{
|
|
246
247
|
fieldName: "authorization",
|
|
@@ -248,7 +249,18 @@ export function resolveGlobalSecurity(
|
|
|
248
249
|
value: security?.jwt,
|
|
249
250
|
},
|
|
250
251
|
],
|
|
251
|
-
|
|
252
|
+
];
|
|
253
|
+
|
|
254
|
+
if (allowedFields) {
|
|
255
|
+
inputs = allowedFields.map((i) => {
|
|
256
|
+
if (i < 0 || i >= inputs.length) {
|
|
257
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
258
|
+
}
|
|
259
|
+
return inputs[i]!;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return resolveSecurity(...inputs);
|
|
252
264
|
}
|
|
253
265
|
|
|
254
266
|
export async function extractSecurity<
|
package/src/sdk/hris.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { hrisCreateHrisBenefit } from "../funcs/hrisCreateHrisBenefit.js";
|
|
|
19
19
|
import { hrisCreateHrisDeduction } from "../funcs/hrisCreateHrisDeduction.js";
|
|
20
20
|
import { hrisCreateHrisDevice } from "../funcs/hrisCreateHrisDevice.js";
|
|
21
21
|
import { hrisCreateHrisEmployee } from "../funcs/hrisCreateHrisEmployee.js";
|
|
22
|
+
import { hrisCreateHrisTimeoff } from "../funcs/hrisCreateHrisTimeoff.js";
|
|
22
23
|
import { hrisCreateHrisTimeshift } from "../funcs/hrisCreateHrisTimeshift.js";
|
|
23
24
|
import { hrisGetHrisBankaccount } from "../funcs/hrisGetHrisBankaccount.js";
|
|
24
25
|
import { hrisGetHrisBenefit } from "../funcs/hrisGetHrisBenefit.js";
|
|
@@ -41,18 +42,21 @@ import { hrisPatchHrisBenefit } from "../funcs/hrisPatchHrisBenefit.js";
|
|
|
41
42
|
import { hrisPatchHrisDeduction } from "../funcs/hrisPatchHrisDeduction.js";
|
|
42
43
|
import { hrisPatchHrisDevice } from "../funcs/hrisPatchHrisDevice.js";
|
|
43
44
|
import { hrisPatchHrisEmployee } from "../funcs/hrisPatchHrisEmployee.js";
|
|
45
|
+
import { hrisPatchHrisTimeoff } from "../funcs/hrisPatchHrisTimeoff.js";
|
|
44
46
|
import { hrisPatchHrisTimeshift } from "../funcs/hrisPatchHrisTimeshift.js";
|
|
45
47
|
import { hrisRemoveHrisBankaccount } from "../funcs/hrisRemoveHrisBankaccount.js";
|
|
46
48
|
import { hrisRemoveHrisBenefit } from "../funcs/hrisRemoveHrisBenefit.js";
|
|
47
49
|
import { hrisRemoveHrisDeduction } from "../funcs/hrisRemoveHrisDeduction.js";
|
|
48
50
|
import { hrisRemoveHrisDevice } from "../funcs/hrisRemoveHrisDevice.js";
|
|
49
51
|
import { hrisRemoveHrisEmployee } from "../funcs/hrisRemoveHrisEmployee.js";
|
|
52
|
+
import { hrisRemoveHrisTimeoff } from "../funcs/hrisRemoveHrisTimeoff.js";
|
|
50
53
|
import { hrisRemoveHrisTimeshift } from "../funcs/hrisRemoveHrisTimeshift.js";
|
|
51
54
|
import { hrisUpdateHrisBankaccount } from "../funcs/hrisUpdateHrisBankaccount.js";
|
|
52
55
|
import { hrisUpdateHrisBenefit } from "../funcs/hrisUpdateHrisBenefit.js";
|
|
53
56
|
import { hrisUpdateHrisDeduction } from "../funcs/hrisUpdateHrisDeduction.js";
|
|
54
57
|
import { hrisUpdateHrisDevice } from "../funcs/hrisUpdateHrisDevice.js";
|
|
55
58
|
import { hrisUpdateHrisEmployee } from "../funcs/hrisUpdateHrisEmployee.js";
|
|
59
|
+
import { hrisUpdateHrisTimeoff } from "../funcs/hrisUpdateHrisTimeoff.js";
|
|
56
60
|
import { hrisUpdateHrisTimeshift } from "../funcs/hrisUpdateHrisTimeshift.js";
|
|
57
61
|
import { locationCreateHrisLocation } from "../funcs/locationCreateHrisLocation.js";
|
|
58
62
|
import { locationGetHrisLocation } from "../funcs/locationGetHrisLocation.js";
|
|
@@ -178,6 +182,20 @@ export class Hris extends ClientSDK {
|
|
|
178
182
|
));
|
|
179
183
|
}
|
|
180
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Create a timeoff
|
|
187
|
+
*/
|
|
188
|
+
async createHrisTimeoff(
|
|
189
|
+
request: operations.CreateHrisTimeoffRequest,
|
|
190
|
+
options?: RequestOptions,
|
|
191
|
+
): Promise<shared.HrisTimeoff> {
|
|
192
|
+
return unwrapAsync(hrisCreateHrisTimeoff(
|
|
193
|
+
this,
|
|
194
|
+
request,
|
|
195
|
+
options,
|
|
196
|
+
));
|
|
197
|
+
}
|
|
198
|
+
|
|
181
199
|
/**
|
|
182
200
|
* Create a timeshift
|
|
183
201
|
*/
|
|
@@ -612,6 +630,20 @@ export class Hris extends ClientSDK {
|
|
|
612
630
|
));
|
|
613
631
|
}
|
|
614
632
|
|
|
633
|
+
/**
|
|
634
|
+
* Update a timeoff
|
|
635
|
+
*/
|
|
636
|
+
async patchHrisTimeoff(
|
|
637
|
+
request: operations.PatchHrisTimeoffRequest,
|
|
638
|
+
options?: RequestOptions,
|
|
639
|
+
): Promise<shared.HrisTimeoff> {
|
|
640
|
+
return unwrapAsync(hrisPatchHrisTimeoff(
|
|
641
|
+
this,
|
|
642
|
+
request,
|
|
643
|
+
options,
|
|
644
|
+
));
|
|
645
|
+
}
|
|
646
|
+
|
|
615
647
|
/**
|
|
616
648
|
* Update a timeshift
|
|
617
649
|
*/
|
|
@@ -738,6 +770,20 @@ export class Hris extends ClientSDK {
|
|
|
738
770
|
));
|
|
739
771
|
}
|
|
740
772
|
|
|
773
|
+
/**
|
|
774
|
+
* Remove a timeoff
|
|
775
|
+
*/
|
|
776
|
+
async removeHrisTimeoff(
|
|
777
|
+
request: operations.RemoveHrisTimeoffRequest,
|
|
778
|
+
options?: RequestOptions,
|
|
779
|
+
): Promise<operations.RemoveHrisTimeoffResponse | undefined> {
|
|
780
|
+
return unwrapAsync(hrisRemoveHrisTimeoff(
|
|
781
|
+
this,
|
|
782
|
+
request,
|
|
783
|
+
options,
|
|
784
|
+
));
|
|
785
|
+
}
|
|
786
|
+
|
|
741
787
|
/**
|
|
742
788
|
* Remove a timeshift
|
|
743
789
|
*/
|
|
@@ -864,6 +910,20 @@ export class Hris extends ClientSDK {
|
|
|
864
910
|
));
|
|
865
911
|
}
|
|
866
912
|
|
|
913
|
+
/**
|
|
914
|
+
* Update a timeoff
|
|
915
|
+
*/
|
|
916
|
+
async updateHrisTimeoff(
|
|
917
|
+
request: operations.UpdateHrisTimeoffRequest,
|
|
918
|
+
options?: RequestOptions,
|
|
919
|
+
): Promise<shared.HrisTimeoff> {
|
|
920
|
+
return unwrapAsync(hrisUpdateHrisTimeoff(
|
|
921
|
+
this,
|
|
922
|
+
request,
|
|
923
|
+
options,
|
|
924
|
+
));
|
|
925
|
+
}
|
|
926
|
+
|
|
867
927
|
/**
|
|
868
928
|
* Update a timeshift
|
|
869
929
|
*/
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import * as shared from "../shared/index.js";
|
|
9
|
+
|
|
10
|
+
export const CreateHrisTimeoffQueryParamFields = {
|
|
11
|
+
Id: "id",
|
|
12
|
+
CreatedAt: "created_at",
|
|
13
|
+
UpdatedAt: "updated_at",
|
|
14
|
+
UserId: "user_id",
|
|
15
|
+
CompanyId: "company_id",
|
|
16
|
+
StartAt: "start_at",
|
|
17
|
+
EndAt: "end_at",
|
|
18
|
+
IsPaid: "is_paid",
|
|
19
|
+
Status: "status",
|
|
20
|
+
ApproverUserId: "approver_user_id",
|
|
21
|
+
ApprovedAt: "approved_at",
|
|
22
|
+
Comments: "comments",
|
|
23
|
+
Raw: "raw",
|
|
24
|
+
Reason: "reason",
|
|
25
|
+
} as const;
|
|
26
|
+
export type CreateHrisTimeoffQueryParamFields = ClosedEnum<
|
|
27
|
+
typeof CreateHrisTimeoffQueryParamFields
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export type CreateHrisTimeoffRequest = {
|
|
31
|
+
hrisTimeoff: shared.HrisTimeoff;
|
|
32
|
+
/**
|
|
33
|
+
* ID of the connection
|
|
34
|
+
*/
|
|
35
|
+
connectionId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Fields to return
|
|
38
|
+
*/
|
|
39
|
+
fields?: Array<CreateHrisTimeoffQueryParamFields> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
42
|
+
*/
|
|
43
|
+
raw?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const CreateHrisTimeoffQueryParamFields$outboundSchema: z.ZodNativeEnum<
|
|
48
|
+
typeof CreateHrisTimeoffQueryParamFields
|
|
49
|
+
> = z.nativeEnum(CreateHrisTimeoffQueryParamFields);
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type CreateHrisTimeoffRequest$Outbound = {
|
|
53
|
+
HrisTimeoff: shared.HrisTimeoff$Outbound;
|
|
54
|
+
connection_id: string;
|
|
55
|
+
fields?: Array<string> | undefined;
|
|
56
|
+
raw?: string | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const CreateHrisTimeoffRequest$outboundSchema: z.ZodType<
|
|
61
|
+
CreateHrisTimeoffRequest$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
CreateHrisTimeoffRequest
|
|
64
|
+
> = z.object({
|
|
65
|
+
hrisTimeoff: shared.HrisTimeoff$outboundSchema,
|
|
66
|
+
connectionId: z.string(),
|
|
67
|
+
fields: z.array(CreateHrisTimeoffQueryParamFields$outboundSchema).optional(),
|
|
68
|
+
raw: z.string().optional(),
|
|
69
|
+
}).transform((v) => {
|
|
70
|
+
return remap$(v, {
|
|
71
|
+
hrisTimeoff: "HrisTimeoff",
|
|
72
|
+
connectionId: "connection_id",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function createHrisTimeoffRequestToJSON(
|
|
77
|
+
createHrisTimeoffRequest: CreateHrisTimeoffRequest,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
CreateHrisTimeoffRequest$outboundSchema.parse(createHrisTimeoffRequest),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -59,6 +59,7 @@ export * from "./createhrisdevice.js";
|
|
|
59
59
|
export * from "./createhrisemployee.js";
|
|
60
60
|
export * from "./createhrisgroup.js";
|
|
61
61
|
export * from "./createhrislocation.js";
|
|
62
|
+
export * from "./createhristimeoff.js";
|
|
62
63
|
export * from "./createhristimeshift.js";
|
|
63
64
|
export * from "./createkmscomment.js";
|
|
64
65
|
export * from "./createkmspage.js";
|
|
@@ -408,6 +409,7 @@ export * from "./patchhrisdevice.js";
|
|
|
408
409
|
export * from "./patchhrisemployee.js";
|
|
409
410
|
export * from "./patchhrisgroup.js";
|
|
410
411
|
export * from "./patchhrislocation.js";
|
|
412
|
+
export * from "./patchhristimeoff.js";
|
|
411
413
|
export * from "./patchhristimeshift.js";
|
|
412
414
|
export * from "./patchkmscomment.js";
|
|
413
415
|
export * from "./patchkmspage.js";
|
|
@@ -509,6 +511,7 @@ export * from "./removehrisdevice.js";
|
|
|
509
511
|
export * from "./removehrisemployee.js";
|
|
510
512
|
export * from "./removehrisgroup.js";
|
|
511
513
|
export * from "./removehrislocation.js";
|
|
514
|
+
export * from "./removehristimeoff.js";
|
|
512
515
|
export * from "./removehristimeshift.js";
|
|
513
516
|
export * from "./removekmscomment.js";
|
|
514
517
|
export * from "./removekmspage.js";
|
|
@@ -609,6 +612,7 @@ export * from "./updatehrisdevice.js";
|
|
|
609
612
|
export * from "./updatehrisemployee.js";
|
|
610
613
|
export * from "./updatehrisgroup.js";
|
|
611
614
|
export * from "./updatehrislocation.js";
|
|
615
|
+
export * from "./updatehristimeoff.js";
|
|
612
616
|
export * from "./updatehristimeshift.js";
|
|
613
617
|
export * from "./updatekmscomment.js";
|
|
614
618
|
export * from "./updatekmspage.js";
|
|
@@ -49,6 +49,10 @@ export type ListHrisGroupsRequest = {
|
|
|
49
49
|
*/
|
|
50
50
|
raw?: string | undefined;
|
|
51
51
|
sort?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The type to filter by
|
|
54
|
+
*/
|
|
55
|
+
type?: string | undefined;
|
|
52
56
|
/**
|
|
53
57
|
* Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
|
|
54
58
|
*/
|
|
@@ -71,6 +75,7 @@ export type ListHrisGroupsRequest$Outbound = {
|
|
|
71
75
|
query?: string | undefined;
|
|
72
76
|
raw?: string | undefined;
|
|
73
77
|
sort?: string | undefined;
|
|
78
|
+
type?: string | undefined;
|
|
74
79
|
updated_gte?: string | undefined;
|
|
75
80
|
};
|
|
76
81
|
|
|
@@ -89,6 +94,7 @@ export const ListHrisGroupsRequest$outboundSchema: z.ZodType<
|
|
|
89
94
|
query: z.string().optional(),
|
|
90
95
|
raw: z.string().optional(),
|
|
91
96
|
sort: z.string().optional(),
|
|
97
|
+
type: z.string().optional(),
|
|
92
98
|
updatedGte: z.string().optional(),
|
|
93
99
|
}).transform((v) => {
|
|
94
100
|
return remap$(v, {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import * as shared from "../shared/index.js";
|
|
9
|
+
|
|
10
|
+
export const PatchHrisTimeoffQueryParamFields = {
|
|
11
|
+
Id: "id",
|
|
12
|
+
CreatedAt: "created_at",
|
|
13
|
+
UpdatedAt: "updated_at",
|
|
14
|
+
UserId: "user_id",
|
|
15
|
+
CompanyId: "company_id",
|
|
16
|
+
StartAt: "start_at",
|
|
17
|
+
EndAt: "end_at",
|
|
18
|
+
IsPaid: "is_paid",
|
|
19
|
+
Status: "status",
|
|
20
|
+
ApproverUserId: "approver_user_id",
|
|
21
|
+
ApprovedAt: "approved_at",
|
|
22
|
+
Comments: "comments",
|
|
23
|
+
Raw: "raw",
|
|
24
|
+
Reason: "reason",
|
|
25
|
+
} as const;
|
|
26
|
+
export type PatchHrisTimeoffQueryParamFields = ClosedEnum<
|
|
27
|
+
typeof PatchHrisTimeoffQueryParamFields
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export type PatchHrisTimeoffRequest = {
|
|
31
|
+
hrisTimeoff: shared.HrisTimeoff;
|
|
32
|
+
/**
|
|
33
|
+
* ID of the connection
|
|
34
|
+
*/
|
|
35
|
+
connectionId: string;
|
|
36
|
+
/**
|
|
37
|
+
* Fields to return
|
|
38
|
+
*/
|
|
39
|
+
fields?: Array<PatchHrisTimeoffQueryParamFields> | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* ID of the Timeoff
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
46
|
+
*/
|
|
47
|
+
raw?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const PatchHrisTimeoffQueryParamFields$outboundSchema: z.ZodNativeEnum<
|
|
52
|
+
typeof PatchHrisTimeoffQueryParamFields
|
|
53
|
+
> = z.nativeEnum(PatchHrisTimeoffQueryParamFields);
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type PatchHrisTimeoffRequest$Outbound = {
|
|
57
|
+
HrisTimeoff: shared.HrisTimeoff$Outbound;
|
|
58
|
+
connection_id: string;
|
|
59
|
+
fields?: Array<string> | undefined;
|
|
60
|
+
id: string;
|
|
61
|
+
raw?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const PatchHrisTimeoffRequest$outboundSchema: z.ZodType<
|
|
66
|
+
PatchHrisTimeoffRequest$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
PatchHrisTimeoffRequest
|
|
69
|
+
> = z.object({
|
|
70
|
+
hrisTimeoff: shared.HrisTimeoff$outboundSchema,
|
|
71
|
+
connectionId: z.string(),
|
|
72
|
+
fields: z.array(PatchHrisTimeoffQueryParamFields$outboundSchema).optional(),
|
|
73
|
+
id: z.string(),
|
|
74
|
+
raw: z.string().optional(),
|
|
75
|
+
}).transform((v) => {
|
|
76
|
+
return remap$(v, {
|
|
77
|
+
hrisTimeoff: "HrisTimeoff",
|
|
78
|
+
connectionId: "connection_id",
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export function patchHrisTimeoffRequestToJSON(
|
|
83
|
+
patchHrisTimeoffRequest: PatchHrisTimeoffRequest,
|
|
84
|
+
): string {
|
|
85
|
+
return JSON.stringify(
|
|
86
|
+
PatchHrisTimeoffRequest$outboundSchema.parse(patchHrisTimeoffRequest),
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type RemoveHrisTimeoffRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the Timeoff
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type RemoveHrisTimeoffResponse = {
|
|
23
|
+
headers: { [k: string]: Array<string> };
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type RemoveHrisTimeoffRequest$Outbound = {
|
|
28
|
+
connection_id: string;
|
|
29
|
+
id: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const RemoveHrisTimeoffRequest$outboundSchema: z.ZodType<
|
|
34
|
+
RemoveHrisTimeoffRequest$Outbound,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
RemoveHrisTimeoffRequest
|
|
37
|
+
> = z.object({
|
|
38
|
+
connectionId: z.string(),
|
|
39
|
+
id: z.string(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
connectionId: "connection_id",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function removeHrisTimeoffRequestToJSON(
|
|
47
|
+
removeHrisTimeoffRequest: RemoveHrisTimeoffRequest,
|
|
48
|
+
): string {
|
|
49
|
+
return JSON.stringify(
|
|
50
|
+
RemoveHrisTimeoffRequest$outboundSchema.parse(removeHrisTimeoffRequest),
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const RemoveHrisTimeoffResponse$inboundSchema: z.ZodType<
|
|
56
|
+
RemoveHrisTimeoffResponse,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
"Headers": "headers",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export function removeHrisTimeoffResponseFromJSON(
|
|
68
|
+
jsonString: string,
|
|
69
|
+
): SafeParseResult<RemoveHrisTimeoffResponse, SDKValidationError> {
|
|
70
|
+
return safeParse(
|
|
71
|
+
jsonString,
|
|
72
|
+
(x) => RemoveHrisTimeoffResponse$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'RemoveHrisTimeoffResponse' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|