@dsptch-work/api-client 0.3.0 → 0.5.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/CHANGELOG.md +95 -0
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/sdk.gen.d.ts +13 -19
- package/dist/gen/sdk.gen.js +12 -28
- package/dist/gen/types.gen.d.ts +1197 -827
- package/dist/gen/zod.gen.d.ts +939 -408
- package/dist/gen/zod.gen.js +531 -130
- package/package.json +4 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -1,14 +1,322 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import * as z from 'zod';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* RFC 9457 problem-details body returned on every failed request, as `application/problem+json`.
|
|
5
5
|
*/
|
|
6
|
-
export const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export const zProblem = z.object({
|
|
7
|
+
type: z.url(),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
status: z.int(),
|
|
10
|
+
detail: z.string(),
|
|
11
|
+
instance: z.url().optional()
|
|
11
12
|
});
|
|
13
|
+
/**
|
|
14
|
+
* Error types
|
|
15
|
+
*
|
|
16
|
+
* Every way a request can fail has a stable machine-readable identifier: the `type` URI of its
|
|
17
|
+
* `application/problem+json` response, whose fragment is the short form listed here.
|
|
18
|
+
* Identifiers are stable contract — messages (`detail`) may be reworded at any time. Entries
|
|
19
|
+
* are grouped by the HTTP status they render with.
|
|
20
|
+
*
|
|
21
|
+
* ## 400
|
|
22
|
+
*
|
|
23
|
+
* ### blank_axis
|
|
24
|
+
*
|
|
25
|
+
* **Blank Temporal Axis Value**
|
|
26
|
+
*
|
|
27
|
+
* An `as_of` coordinate is present but blank. A coordinate must name a point in time; send a parseable date-time, or omit the axis to read at now.
|
|
28
|
+
*
|
|
29
|
+
* ### invalid_cursor
|
|
30
|
+
*
|
|
31
|
+
* **Invalid Pagination Cursor**
|
|
32
|
+
*
|
|
33
|
+
* The `page` cursor is not decodable. Resend a cursor exactly as returned in a prior response's pagination links, or omit it to start from the first page.
|
|
34
|
+
*
|
|
35
|
+
* ### invalid_filter_key
|
|
36
|
+
*
|
|
37
|
+
* **Unknown Filter Key**
|
|
38
|
+
*
|
|
39
|
+
* The `filter` object names a key the endpoint does not declare — an undeclared filter, an unknown range sub-key, or an unsupported operator. Remove or correct the key per the endpoint's documented filter set.
|
|
40
|
+
*
|
|
41
|
+
* ### invalid_limit
|
|
42
|
+
*
|
|
43
|
+
* **Invalid Page Limit**
|
|
44
|
+
*
|
|
45
|
+
* The `page` limit is not a positive integer. Send a positive integer or omit it for the default; values above the cap are clamped, never rejected.
|
|
46
|
+
*
|
|
47
|
+
* ### invalid_signature
|
|
48
|
+
*
|
|
49
|
+
* **Invalid Signed Token**
|
|
50
|
+
*
|
|
51
|
+
* A signed token in the request fails signature verification. Re-obtain the token from the endpoint that issued it.
|
|
52
|
+
*
|
|
53
|
+
* ### non_range_filter_value
|
|
54
|
+
*
|
|
55
|
+
* **Range Filter Needs Bounds**
|
|
56
|
+
*
|
|
57
|
+
* A range filter key carries a bare value instead of bounds. Send the object form with `gte` and/or `lte`.
|
|
58
|
+
*
|
|
59
|
+
* ### non_scalar_axis
|
|
60
|
+
*
|
|
61
|
+
* **Temporal Axis Not Scalar**
|
|
62
|
+
*
|
|
63
|
+
* An `as_of` axis value is an object or array rather than a single date-time. Send one scalar value per axis.
|
|
64
|
+
*
|
|
65
|
+
* ### non_scalar_filter_value
|
|
66
|
+
*
|
|
67
|
+
* **Filter Value Not Scalar**
|
|
68
|
+
*
|
|
69
|
+
* An equality filter key carries an array or object outside the supported `null` operator form. Send a single scalar value.
|
|
70
|
+
*
|
|
71
|
+
* ### parameter_missing
|
|
72
|
+
*
|
|
73
|
+
* **Required Parameter Missing**
|
|
74
|
+
*
|
|
75
|
+
* A required request parameter is absent or empty. The message names it; supply the parameter and retry.
|
|
76
|
+
*
|
|
77
|
+
* ### parameter_not_object
|
|
78
|
+
*
|
|
79
|
+
* **Parameter Must Be An Object**
|
|
80
|
+
*
|
|
81
|
+
* A container query parameter — `filter`, `page`, or `as_of` — arrived as a scalar, array, or blank value instead of a nested object. Use the object syntax, for example `filter[key]=value`.
|
|
82
|
+
*
|
|
83
|
+
* ### unknown_axis
|
|
84
|
+
*
|
|
85
|
+
* **Unknown Temporal Axis Key**
|
|
86
|
+
*
|
|
87
|
+
* The `as_of` parameter carries a sub-key that is not a temporal axis. Remove the unknown key.
|
|
88
|
+
*
|
|
89
|
+
* ### unknown_key
|
|
90
|
+
*
|
|
91
|
+
* **Unknown Query Parameter**
|
|
92
|
+
*
|
|
93
|
+
* The query string carries a top-level key outside the declared containers — typically a misspelled container. Remove or correct it; unknown keys are never silently ignored.
|
|
94
|
+
*
|
|
95
|
+
* ### unsupported_axis
|
|
96
|
+
*
|
|
97
|
+
* **Axis Unsupported By Resource**
|
|
98
|
+
*
|
|
99
|
+
* The `as_of` parameter names a temporal axis this resource does not expose. Drop the axis.
|
|
100
|
+
*
|
|
101
|
+
* ### valid_axis_on_timeline
|
|
102
|
+
*
|
|
103
|
+
* **Valid-Time Pin On A Timeline**
|
|
104
|
+
*
|
|
105
|
+
* A version-timeline endpoint received a valid-time pin, but the timeline ranges over all of valid time. Read the resource itself to get one version.
|
|
106
|
+
*
|
|
107
|
+
* ## 401
|
|
108
|
+
*
|
|
109
|
+
* ### unauthorized
|
|
110
|
+
*
|
|
111
|
+
* **Invalid Or Missing Credentials**
|
|
112
|
+
*
|
|
113
|
+
* The request presents no usable credential — the API key is missing or invalid. Supply a valid key in the `x-api-key` header.
|
|
114
|
+
*
|
|
115
|
+
* ## 403
|
|
116
|
+
*
|
|
117
|
+
* ### company_scoped_key_required
|
|
118
|
+
*
|
|
119
|
+
* **Company-Scoped Key Required**
|
|
120
|
+
*
|
|
121
|
+
* The endpoint must act within a company tenant, but the presented credential carries none. Retry with a company- or user-scoped API key.
|
|
122
|
+
*
|
|
123
|
+
* ### forbidden
|
|
124
|
+
*
|
|
125
|
+
* **Action Not Authorized**
|
|
126
|
+
*
|
|
127
|
+
* The credential is valid, but this action on this record is refused by policy. The operation is not available to this principal.
|
|
128
|
+
*
|
|
129
|
+
* ### insufficient_api_key_scope
|
|
130
|
+
*
|
|
131
|
+
* **Insufficient API Key Scope**
|
|
132
|
+
*
|
|
133
|
+
* The API key lacks the scope grant for this endpoint and verb. Grant the required scope to the key and retry.
|
|
134
|
+
*
|
|
135
|
+
* ## 404
|
|
136
|
+
*
|
|
137
|
+
* ### not_found
|
|
138
|
+
*
|
|
139
|
+
* **Resource Not Found**
|
|
140
|
+
*
|
|
141
|
+
* The identified record does not exist, or is outside what this credential can see. Verify the id and the key's access.
|
|
142
|
+
*
|
|
143
|
+
* ## 409
|
|
144
|
+
*
|
|
145
|
+
* ### recorded_since_termination
|
|
146
|
+
*
|
|
147
|
+
* **Timecode Changed Since Termination**
|
|
148
|
+
*
|
|
149
|
+
* Cancelling this timecode's scheduled termination would silently discard changes recorded since it was terminated. Re-read the timecode and reconcile before retrying.
|
|
150
|
+
*
|
|
151
|
+
* ### version_overlap
|
|
152
|
+
*
|
|
153
|
+
* **Version Overlap**
|
|
154
|
+
*
|
|
155
|
+
* The write conflicts with what is already recorded for the resource — another version occupies the same span, or the write contradicts the resource's recorded identity. Re-read the current state and retry on top of it.
|
|
156
|
+
*
|
|
157
|
+
* ## 422
|
|
158
|
+
*
|
|
159
|
+
* ### attachment_not_image
|
|
160
|
+
*
|
|
161
|
+
* **Attachment Not An Image**
|
|
162
|
+
*
|
|
163
|
+
* The upload behind an image attachment's signed id is not an image content type. Upload an image file.
|
|
164
|
+
*
|
|
165
|
+
* ### company_not_employer
|
|
166
|
+
*
|
|
167
|
+
* **Company Not Program Employer**
|
|
168
|
+
*
|
|
169
|
+
* Creating an apprentice requires the acting company to be registered as an employer in the apprenticeship program, and it is not. Register the company as a program employer first.
|
|
170
|
+
*
|
|
171
|
+
* ### confirm_apprenticeship_conflict
|
|
172
|
+
*
|
|
173
|
+
* **Apprenticeship Allocation Conflict**
|
|
174
|
+
*
|
|
175
|
+
* A time-entry update would invalidate the time card's apprenticeship hour allocations, and the request did not confirm that. Retry with `confirm_allocation_conflict` set to accept removing those allocations.
|
|
176
|
+
*
|
|
177
|
+
* ### destroy_restricted
|
|
178
|
+
*
|
|
179
|
+
* **Deletion Blocked By Dependencies**
|
|
180
|
+
*
|
|
181
|
+
* A deletion is refused by the record's guards — dependent records restrict removal. The message carries the specifics; remove or reassign the dependents first.
|
|
182
|
+
*
|
|
183
|
+
* ### invalid_date
|
|
184
|
+
*
|
|
185
|
+
* **Unparseable Date Value**
|
|
186
|
+
*
|
|
187
|
+
* A date-time value cannot be parsed, or falls outside the storable range. Format values as ISO 8601 (for example `2026-08-05` or `2026-08-05T14:30`).
|
|
188
|
+
*
|
|
189
|
+
* ### invalid_filter_value
|
|
190
|
+
*
|
|
191
|
+
* **Invalid Filter Value**
|
|
192
|
+
*
|
|
193
|
+
* A declared filter key carries a value outside its accepted set — a non-boolean on a boolean key, or a token outside an enum key's vocabulary. Send an accepted value.
|
|
194
|
+
*
|
|
195
|
+
* ### invalid_iso8601_duration
|
|
196
|
+
*
|
|
197
|
+
* **Invalid ISO 8601 Duration**
|
|
198
|
+
*
|
|
199
|
+
* A duration value is not a parseable ISO 8601 duration. Format it like `P2Y`, `P1D`, or `-PT15M`.
|
|
200
|
+
*
|
|
201
|
+
* ### invalid_placement_move
|
|
202
|
+
*
|
|
203
|
+
* **Move Conflicts With Placement**
|
|
204
|
+
*
|
|
205
|
+
* An inventory move does not fit the item's current placement. The message carries the reason; check the item's placement and adjust the move.
|
|
206
|
+
*
|
|
207
|
+
* ### invalid_signed_id
|
|
208
|
+
*
|
|
209
|
+
* **Invalid Attachment Signed Id**
|
|
210
|
+
*
|
|
211
|
+
* An attachment signed id — an avatar's, a logo's — is not a string or fails signature verification. Obtain a fresh signed id from the direct-uploads endpoint and retry.
|
|
212
|
+
*
|
|
213
|
+
* ### non_numeric_cents
|
|
214
|
+
*
|
|
215
|
+
* **Non-Numeric Money Value**
|
|
216
|
+
*
|
|
217
|
+
* A money parameter is not a numeric value in cents. Send money as a numeric cents value.
|
|
218
|
+
*
|
|
219
|
+
* ### nothing_to_cancel
|
|
220
|
+
*
|
|
221
|
+
* **Nothing To Cancel**
|
|
222
|
+
*
|
|
223
|
+
* A cancellation found nothing pending on the addressed resource — no future scheduled changes, or no scheduled termination. Re-read the resource to see what is actually scheduled.
|
|
224
|
+
*
|
|
225
|
+
* ### pagination_failed
|
|
226
|
+
*
|
|
227
|
+
* **Pagination Failed**
|
|
228
|
+
*
|
|
229
|
+
* Pagination could not be applied to the request. Retry without the `page` parameter, or with a fresh cursor.
|
|
230
|
+
*
|
|
231
|
+
* ### subtype_foreign_keys
|
|
232
|
+
*
|
|
233
|
+
* **Foreign Subtype Attributes**
|
|
234
|
+
*
|
|
235
|
+
* A nested-attributes write carries keys the record's resolved subtype does not accept. Send only the keys valid for that subtype; the message names the offending ones.
|
|
236
|
+
*
|
|
237
|
+
* ### synced_determination
|
|
238
|
+
*
|
|
239
|
+
* **Determination Synced From Project**
|
|
240
|
+
*
|
|
241
|
+
* Rate rules cannot be written on a wage determination synced from a project. Manage the rules on the project instead.
|
|
242
|
+
*
|
|
243
|
+
* ### user_not_company_member
|
|
244
|
+
*
|
|
245
|
+
* **User Outside Company**
|
|
246
|
+
*
|
|
247
|
+
* A user reference — an approver, a performing user — does not name a member of the acting company. The message names the field; use a user id belonging to the company.
|
|
248
|
+
*
|
|
249
|
+
* ### validation_failed
|
|
250
|
+
*
|
|
251
|
+
* **Validation Failed**
|
|
252
|
+
*
|
|
253
|
+
* A well-formed value violates a declared constraint — a value outside a field's documented set, a malformed or incomplete nested payload, a record validation refusal, or a reference to a record that does not exist. The message states the violated constraint; correct the value and retry.
|
|
254
|
+
*
|
|
255
|
+
* ### wage_schedule_outside_program
|
|
256
|
+
*
|
|
257
|
+
* **Wage Schedule Outside Program**
|
|
258
|
+
*
|
|
259
|
+
* The apprentice's wage schedule does not belong to the program in the URL. Use a schedule from that program.
|
|
260
|
+
*
|
|
261
|
+
* ## 429
|
|
262
|
+
*
|
|
263
|
+
* ### too_many_requests
|
|
264
|
+
*
|
|
265
|
+
* **Rate Limit Exceeded**
|
|
266
|
+
*
|
|
267
|
+
* The API key exceeded its request budget. Wait for the `Retry-After` window before retrying.
|
|
268
|
+
*
|
|
269
|
+
* ## 500
|
|
270
|
+
*
|
|
271
|
+
* ### internal_error
|
|
272
|
+
*
|
|
273
|
+
* **Internal Server Error**
|
|
274
|
+
*
|
|
275
|
+
* Something failed on the server; nothing in the request needs fixing. Retry later, or report the problem if it persists.
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
278
|
+
export const zProblemTypeCatalog = z.enum([
|
|
279
|
+
'blank_axis',
|
|
280
|
+
'invalid_cursor',
|
|
281
|
+
'invalid_filter_key',
|
|
282
|
+
'invalid_limit',
|
|
283
|
+
'invalid_signature',
|
|
284
|
+
'non_range_filter_value',
|
|
285
|
+
'non_scalar_axis',
|
|
286
|
+
'non_scalar_filter_value',
|
|
287
|
+
'parameter_missing',
|
|
288
|
+
'parameter_not_object',
|
|
289
|
+
'unknown_axis',
|
|
290
|
+
'unknown_key',
|
|
291
|
+
'unsupported_axis',
|
|
292
|
+
'valid_axis_on_timeline',
|
|
293
|
+
'unauthorized',
|
|
294
|
+
'company_scoped_key_required',
|
|
295
|
+
'forbidden',
|
|
296
|
+
'insufficient_api_key_scope',
|
|
297
|
+
'not_found',
|
|
298
|
+
'recorded_since_termination',
|
|
299
|
+
'version_overlap',
|
|
300
|
+
'attachment_not_image',
|
|
301
|
+
'company_not_employer',
|
|
302
|
+
'confirm_apprenticeship_conflict',
|
|
303
|
+
'destroy_restricted',
|
|
304
|
+
'invalid_date',
|
|
305
|
+
'invalid_filter_value',
|
|
306
|
+
'invalid_iso8601_duration',
|
|
307
|
+
'invalid_placement_move',
|
|
308
|
+
'invalid_signed_id',
|
|
309
|
+
'non_numeric_cents',
|
|
310
|
+
'nothing_to_cancel',
|
|
311
|
+
'pagination_failed',
|
|
312
|
+
'subtype_foreign_keys',
|
|
313
|
+
'synced_determination',
|
|
314
|
+
'user_not_company_member',
|
|
315
|
+
'validation_failed',
|
|
316
|
+
'wage_schedule_outside_program',
|
|
317
|
+
'too_many_requests',
|
|
318
|
+
'internal_error'
|
|
319
|
+
]);
|
|
12
320
|
export const zApiKeyScopeResponseObject = z.object({
|
|
13
321
|
resource: z.string(),
|
|
14
322
|
action: z.enum([
|
|
@@ -396,12 +704,6 @@ export const zTimecodeParameters = z.object({
|
|
|
396
704
|
]).optional(),
|
|
397
705
|
effective_date: z.iso.datetime().optional()
|
|
398
706
|
});
|
|
399
|
-
/**
|
|
400
|
-
* Optional request body for terminating a timecode; the whole body may be omitted to terminate as of today.
|
|
401
|
-
*/
|
|
402
|
-
export const zTimecodeTerminationParameters = z.object({
|
|
403
|
-
termination_date: z.iso.date().optional()
|
|
404
|
-
});
|
|
405
707
|
/**
|
|
406
708
|
* Request body for scheduling a future change to a timecode: an effective_date paired with the attribute values to apply from that date. `effective_date` and `name` are required; omitted attributes inherit the current version's values.
|
|
407
709
|
*/
|
|
@@ -441,7 +743,7 @@ export const zPerDiemResponseObject = z.object({
|
|
|
441
743
|
default: z.boolean().nullable(),
|
|
442
744
|
active: z.boolean().nullable(),
|
|
443
745
|
work_type_ids: z.array(z.string()),
|
|
444
|
-
|
|
746
|
+
timekeeping_timecode_ids: z.array(z.string()),
|
|
445
747
|
created_at: z.iso.datetime(),
|
|
446
748
|
updated_at: z.iso.datetime()
|
|
447
749
|
});
|
|
@@ -457,7 +759,7 @@ export const zPerDiemParameters = z.object({
|
|
|
457
759
|
default: z.boolean().nullish(),
|
|
458
760
|
active: z.boolean().nullish(),
|
|
459
761
|
work_type_ids: z.array(z.string()).optional(),
|
|
460
|
-
|
|
762
|
+
timekeeping_timecode_ids: z.array(z.string()).optional()
|
|
461
763
|
});
|
|
462
764
|
/**
|
|
463
765
|
* The product's filled attribute values — one entry per attribute assigned to its category.
|
|
@@ -565,7 +867,7 @@ export const zDepartmentParameters = z.object({
|
|
|
565
867
|
*/
|
|
566
868
|
export const zTimeCardPerDiemResponseObject = z.object({
|
|
567
869
|
id: z.string(),
|
|
568
|
-
|
|
870
|
+
timekeeping_time_card_id: z.string(),
|
|
569
871
|
date: z.iso.date(),
|
|
570
872
|
approver_user_id: z.string(),
|
|
571
873
|
per_diem_id: z.string().nullable(),
|
|
@@ -1000,9 +1302,9 @@ export const zUserUpdateParameters = z.object({
|
|
|
1000
1302
|
export const zTimeEntryResponseObject = z.object({
|
|
1001
1303
|
id: z.string(),
|
|
1002
1304
|
user_id: z.string(),
|
|
1003
|
-
|
|
1305
|
+
timekeeping_time_card_id: z.string(),
|
|
1004
1306
|
job_id: z.string().nullable(),
|
|
1005
|
-
|
|
1307
|
+
timekeeping_timecode_id: z.string().nullable(),
|
|
1006
1308
|
state: z.string().nullable(),
|
|
1007
1309
|
description: z.string().nullable(),
|
|
1008
1310
|
clock_punched: z.boolean(),
|
|
@@ -1022,7 +1324,7 @@ export const zTimeEntryResponseObject = z.object({
|
|
|
1022
1324
|
hourly_rate_cents: z.string().nullable(),
|
|
1023
1325
|
currency: z.string().nullable(),
|
|
1024
1326
|
hourly_rate_src_type: z.string().nullable(),
|
|
1025
|
-
|
|
1327
|
+
timekeeping_pay_period_id: z.string(),
|
|
1026
1328
|
start_time: z.iso.datetime(),
|
|
1027
1329
|
end_time: z.iso.datetime(),
|
|
1028
1330
|
created_at: z.iso.datetime(),
|
|
@@ -1046,7 +1348,7 @@ export const zTimeEntryResponseObject = z.object({
|
|
|
1046
1348
|
*/
|
|
1047
1349
|
export const zTimeEntryApprovalResponseObject = z.object({
|
|
1048
1350
|
id: z.string(),
|
|
1049
|
-
|
|
1351
|
+
timekeeping_time_entry_id: z.string(),
|
|
1050
1352
|
time_card_approval_id: z.string().nullable(),
|
|
1051
1353
|
status: z.enum([
|
|
1052
1354
|
'pending',
|
|
@@ -1068,14 +1370,14 @@ export const zManagerTimeEntryApprovalParameters = z.object({
|
|
|
1068
1370
|
approver_user_id: z.string()
|
|
1069
1371
|
});
|
|
1070
1372
|
/**
|
|
1071
|
-
* Request body for creating or updating a time entry; on create,
|
|
1373
|
+
* Request body for creating or updating a time entry; on create, timekeeping_time_card_id, start_time, and end_time are required.
|
|
1072
1374
|
*/
|
|
1073
1375
|
export const zTimeEntryParameters = z.object({
|
|
1074
|
-
|
|
1376
|
+
timekeeping_time_card_id: z.string(),
|
|
1075
1377
|
start_time: z.iso.datetime(),
|
|
1076
1378
|
end_time: z.iso.datetime(),
|
|
1077
1379
|
job_id: z.string().nullish(),
|
|
1078
|
-
|
|
1380
|
+
timekeeping_timecode_id: z.string().nullish(),
|
|
1079
1381
|
state: z.string().nullish(),
|
|
1080
1382
|
description: z.string().nullish(),
|
|
1081
1383
|
hourly_rate_cents: z.string().nullish(),
|
|
@@ -1114,7 +1416,7 @@ export const zUserCompanyScheduledChangesParameters = z.object({
|
|
|
1114
1416
|
pto_annual_minutes: z.int().nullish(),
|
|
1115
1417
|
holiday_annual_minutes: z.int().nullish(),
|
|
1116
1418
|
training_annual_minutes: z.int().nullish(),
|
|
1117
|
-
|
|
1419
|
+
companies_department_id: z.string().nullish()
|
|
1118
1420
|
});
|
|
1119
1421
|
/**
|
|
1120
1422
|
* A work type: a named category of job activity, either a shared global default (no owning company) or an entry scoped to a specific company.
|
|
@@ -1189,6 +1491,10 @@ export const zCompanyResponseObject = z.object({
|
|
|
1189
1491
|
]).nullable(),
|
|
1190
1492
|
naics_code: z.string().nullable(),
|
|
1191
1493
|
linkedin_url: z.string().nullable(),
|
|
1494
|
+
industry: z.string().nullable(),
|
|
1495
|
+
stock_ticker: z.string().nullable(),
|
|
1496
|
+
stock_exchange: z.string().nullable(),
|
|
1497
|
+
logo_url: z.url().nullable(),
|
|
1192
1498
|
created_at: z.iso.datetime(),
|
|
1193
1499
|
updated_at: z.iso.datetime()
|
|
1194
1500
|
});
|
|
@@ -1391,7 +1697,7 @@ export const zJobParameters = z.object({
|
|
|
1391
1697
|
require_clock_in: z.boolean().nullish(),
|
|
1392
1698
|
send_geofence_reminders: z.boolean().nullish(),
|
|
1393
1699
|
allow_customer_access: z.boolean().optional(),
|
|
1394
|
-
|
|
1700
|
+
timekeeping_timecode_ids: z.array(z.string()).nullish(),
|
|
1395
1701
|
tracks_feature_allocations: z.boolean().nullish(),
|
|
1396
1702
|
requires_feature_allocation: z.boolean().nullish(),
|
|
1397
1703
|
max_one_feature_allocation: z.boolean().nullish(),
|
|
@@ -1458,7 +1764,7 @@ export const zUserCompanyScheduledChange = z.object({
|
|
|
1458
1764
|
pto_annual_minutes: z.int().nullish(),
|
|
1459
1765
|
holiday_annual_minutes: z.int().nullish(),
|
|
1460
1766
|
training_annual_minutes: z.int().nullish(),
|
|
1461
|
-
|
|
1767
|
+
companies_department_id: z.string().nullish()
|
|
1462
1768
|
});
|
|
1463
1769
|
/**
|
|
1464
1770
|
* A worker's scheduled compensation timeline at your company — the version currently in effect plus any future-dated versions.
|
|
@@ -1480,7 +1786,7 @@ export const zUserCompanyScheduledTerminationParameters = z.object({
|
|
|
1480
1786
|
export const zTimeCardResponseObject = z.object({
|
|
1481
1787
|
id: z.string(),
|
|
1482
1788
|
user_id: z.string(),
|
|
1483
|
-
|
|
1789
|
+
timekeeping_pay_period_id: z.string(),
|
|
1484
1790
|
locked: z.boolean(),
|
|
1485
1791
|
manager_time_card_approval_status: z.enum([
|
|
1486
1792
|
'pending',
|
|
@@ -1526,11 +1832,11 @@ export const zTimeCardResponseObject = z.object({
|
|
|
1526
1832
|
*/
|
|
1527
1833
|
export const zJobTimeCardDayResponseObject = z.object({
|
|
1528
1834
|
id: z.string(),
|
|
1529
|
-
|
|
1835
|
+
timekeeping_job_time_card_id: z.string(),
|
|
1530
1836
|
job_id: z.string(),
|
|
1531
|
-
|
|
1837
|
+
timekeeping_time_card_id: z.string(),
|
|
1532
1838
|
user_id: z.string(),
|
|
1533
|
-
|
|
1839
|
+
timekeeping_pay_period_id: z.string(),
|
|
1534
1840
|
date: z.iso.date(),
|
|
1535
1841
|
minutes_worked: z.int(),
|
|
1536
1842
|
paid_minutes_worked: z.int(),
|
|
@@ -1614,7 +1920,7 @@ export const zJobTimeCardDayResponseObject = z.object({
|
|
|
1614
1920
|
*/
|
|
1615
1921
|
export const zTimeCardApprovalResponseObject = z.object({
|
|
1616
1922
|
id: z.string(),
|
|
1617
|
-
|
|
1923
|
+
timekeeping_time_card_id: z.string(),
|
|
1618
1924
|
status: z.enum([
|
|
1619
1925
|
'pending',
|
|
1620
1926
|
'approved',
|
|
@@ -1754,7 +2060,7 @@ export const zPayrollExternalMapResponseObject = z.object({
|
|
|
1754
2060
|
id: z.string(),
|
|
1755
2061
|
bitemporal_id: z.string(),
|
|
1756
2062
|
name: z.string(),
|
|
1757
|
-
|
|
2063
|
+
payrolls_compensation_element_id: z.string(),
|
|
1758
2064
|
compensation_element_name: z.string(),
|
|
1759
2065
|
compensation_element_category: z.enum([
|
|
1760
2066
|
'tax',
|
|
@@ -1766,7 +2072,7 @@ export const zPayrollExternalMapResponseObject = z.object({
|
|
|
1766
2072
|
'other'
|
|
1767
2073
|
]),
|
|
1768
2074
|
pay_period_config_uid: z.string().nullable(),
|
|
1769
|
-
|
|
2075
|
+
payrolls_fringe_benefit_plan_id: z.string().nullable(),
|
|
1770
2076
|
contributor: z.enum([
|
|
1771
2077
|
'any',
|
|
1772
2078
|
'employee',
|
|
@@ -1786,7 +2092,7 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
|
|
|
1786
2092
|
id: z.string(),
|
|
1787
2093
|
bitemporal_id: z.string(),
|
|
1788
2094
|
name: z.string(),
|
|
1789
|
-
|
|
2095
|
+
payrolls_compensation_element_id: z.string(),
|
|
1790
2096
|
compensation_element_name: z.string(),
|
|
1791
2097
|
compensation_element_category: z.enum([
|
|
1792
2098
|
'tax',
|
|
@@ -1798,7 +2104,7 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
|
|
|
1798
2104
|
'other'
|
|
1799
2105
|
]),
|
|
1800
2106
|
pay_period_config_uid: z.string().nullable(),
|
|
1801
|
-
|
|
2107
|
+
payrolls_fringe_benefit_plan_id: z.string().nullable(),
|
|
1802
2108
|
contributor: z.enum([
|
|
1803
2109
|
'any',
|
|
1804
2110
|
'employee',
|
|
@@ -1826,8 +2132,8 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
|
|
|
1826
2132
|
export const zPayrollRunResponseObject = z.object({
|
|
1827
2133
|
id: z.string(),
|
|
1828
2134
|
company_id: z.string(),
|
|
1829
|
-
|
|
1830
|
-
|
|
2135
|
+
timekeeping_pay_period_id: z.string().nullable(),
|
|
2136
|
+
payrolls_credential_id: z.string().nullable(),
|
|
1831
2137
|
run_type: z.enum([
|
|
1832
2138
|
'CORRECTION',
|
|
1833
2139
|
'ON_CYCLE',
|
|
@@ -1842,12 +2148,12 @@ export const zPayrollRunResponseObject = z.object({
|
|
|
1842
2148
|
updated_at: z.iso.datetime()
|
|
1843
2149
|
});
|
|
1844
2150
|
/**
|
|
1845
|
-
* Request body for creating or updating a payroll run. company_id, run_type, and run_date are required; an on-cycle run additionally requires
|
|
2151
|
+
* Request body for creating or updating a payroll run. company_id, run_type, and run_date are required; an on-cycle run additionally requires timekeeping_pay_period_id.
|
|
1846
2152
|
*/
|
|
1847
2153
|
export const zPayrollRunParameters = z.object({
|
|
1848
2154
|
company_id: z.string(),
|
|
1849
|
-
|
|
1850
|
-
|
|
2155
|
+
timekeeping_pay_period_id: z.string().nullish(),
|
|
2156
|
+
payrolls_credential_id: z.string().nullish(),
|
|
1851
2157
|
run_type: z.enum([
|
|
1852
2158
|
'CORRECTION',
|
|
1853
2159
|
'ON_CYCLE',
|
|
@@ -2143,12 +2449,12 @@ export const zComplianceCheckResponseObject = z.object({
|
|
|
2143
2449
|
'dismissed',
|
|
2144
2450
|
'pending'
|
|
2145
2451
|
]),
|
|
2146
|
-
|
|
2452
|
+
compliances_requirement_id: z.string(),
|
|
2147
2453
|
company_id: z.string().nullable(),
|
|
2148
2454
|
job_id: z.string().nullable(),
|
|
2149
2455
|
project_id: z.string().nullable(),
|
|
2150
|
-
|
|
2151
|
-
|
|
2456
|
+
timekeeping_time_card_id: z.string().nullable(),
|
|
2457
|
+
timekeeping_pay_period_id: z.string().nullable(),
|
|
2152
2458
|
user_id: z.string().nullable(),
|
|
2153
2459
|
user_company_uid: z.string().nullable(),
|
|
2154
2460
|
title: z.string(),
|
|
@@ -2200,18 +2506,18 @@ export const zPaystubResponseObject = z.object({
|
|
|
2200
2506
|
external_id: z.string().nullable(),
|
|
2201
2507
|
check_number: z.string().nullable(),
|
|
2202
2508
|
user_id: z.string(),
|
|
2203
|
-
|
|
2204
|
-
|
|
2509
|
+
timekeeping_time_card_id: z.string().nullable(),
|
|
2510
|
+
payrolls_payroll_run_id: z.string(),
|
|
2205
2511
|
created_at: z.iso.datetime(),
|
|
2206
2512
|
updated_at: z.iso.datetime()
|
|
2207
2513
|
});
|
|
2208
2514
|
/**
|
|
2209
|
-
* Request body for creating or updating a paystub.
|
|
2515
|
+
* Request body for creating or updating a paystub. payrolls_payroll_run_id and user_id are required; timekeeping_time_card_id is required for an on-cycle run and disallowed for an off-cycle run.
|
|
2210
2516
|
*/
|
|
2211
2517
|
export const zPaystubParameters = z.object({
|
|
2212
|
-
|
|
2518
|
+
payrolls_payroll_run_id: z.string(),
|
|
2213
2519
|
user_id: z.string(),
|
|
2214
|
-
|
|
2520
|
+
timekeeping_time_card_id: z.string().nullish(),
|
|
2215
2521
|
external_id: z.string().nullish(),
|
|
2216
2522
|
check_number: z.string().nullish()
|
|
2217
2523
|
});
|
|
@@ -2220,8 +2526,8 @@ export const zPaystubParameters = z.object({
|
|
|
2220
2526
|
*/
|
|
2221
2527
|
export const zPriorPeriodAdjustmentResponseObject = z.object({
|
|
2222
2528
|
id: z.string(),
|
|
2223
|
-
|
|
2224
|
-
|
|
2529
|
+
timekeeping_time_card_id: z.string(),
|
|
2530
|
+
payrolls_paystub_line_item_id: z.string(),
|
|
2225
2531
|
job_id: z.string().nullable(),
|
|
2226
2532
|
created_by_user_id: z.string(),
|
|
2227
2533
|
adjustment_type: z.enum(['overpayment_recovery', 'retroactive_increase']),
|
|
@@ -2243,7 +2549,7 @@ export const zPriorPeriodAdjustmentResponseObject = z.object({
|
|
|
2243
2549
|
*/
|
|
2244
2550
|
export const zTimeCardActualsResponseObject = z.object({
|
|
2245
2551
|
id: z.string(),
|
|
2246
|
-
|
|
2552
|
+
timekeeping_time_card_id: z.string(),
|
|
2247
2553
|
gross_pay_cents: z.string().nullable(),
|
|
2248
2554
|
net_pay_cents: z.string().nullable(),
|
|
2249
2555
|
reimbursements_cents: z.string().nullable(),
|
|
@@ -2298,9 +2604,9 @@ export const zTimeCardActualsResponseObject = z.object({
|
|
|
2298
2604
|
*/
|
|
2299
2605
|
export const zPaystubLineItemResponseObject = z.object({
|
|
2300
2606
|
id: z.string(),
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2607
|
+
payrolls_external_map_id: z.string(),
|
|
2608
|
+
payrolls_paystub_id: z.string().nullable(),
|
|
2609
|
+
timekeeping_pay_period_id: z.string().nullable(),
|
|
2304
2610
|
user_id: z.string().nullable(),
|
|
2305
2611
|
external_map: z.object({
|
|
2306
2612
|
name: z.string().optional(),
|
|
@@ -2327,10 +2633,10 @@ export const zPaystubLineItemResponseObject = z.object({
|
|
|
2327
2633
|
* Request body for creating or updating a paystub line item. All four fields are required.
|
|
2328
2634
|
*/
|
|
2329
2635
|
export const zPaystubLineItemParameters = z.object({
|
|
2330
|
-
|
|
2636
|
+
payrolls_paystub_id: z.string(),
|
|
2331
2637
|
amount_cents: z.string(),
|
|
2332
2638
|
contributor: z.enum(['employee', 'employer']),
|
|
2333
|
-
|
|
2639
|
+
payrolls_external_map_id: z.string()
|
|
2334
2640
|
});
|
|
2335
2641
|
/**
|
|
2336
2642
|
* Request body for creating or updating a position on a job. The job is taken from the URL path.
|
|
@@ -2536,8 +2842,8 @@ export const zUserCertificationParameters = z.object({
|
|
|
2536
2842
|
certification_id: z.string(),
|
|
2537
2843
|
received_at: z.iso.datetime(),
|
|
2538
2844
|
file: z.object({
|
|
2539
|
-
name: z.string().
|
|
2540
|
-
content: z.string()
|
|
2845
|
+
name: z.string().max(255).regex(/^[\w\s.-]*\.[A-Za-z0-9]+$/),
|
|
2846
|
+
content: z.string()
|
|
2541
2847
|
}).nullish(),
|
|
2542
2848
|
verified: z.boolean().nullish(),
|
|
2543
2849
|
expiration_date: z.iso.date().nullish(),
|
|
@@ -2587,7 +2893,6 @@ export const zJobResponseObject = z.object({
|
|
|
2587
2893
|
status: z.string(),
|
|
2588
2894
|
start_time: z.string().nullable(),
|
|
2589
2895
|
end_time: z.string().nullable(),
|
|
2590
|
-
address: z.string().nullable(),
|
|
2591
2896
|
purchase_order_number: z.string().nullable(),
|
|
2592
2897
|
time_card_start_day: zTimeCardStartDay,
|
|
2593
2898
|
tz_name: z.string(),
|
|
@@ -2651,7 +2956,7 @@ export const zJobResponseObject = z.object({
|
|
|
2651
2956
|
work_types: z.array(z.object({
|
|
2652
2957
|
value: z.string().optional()
|
|
2653
2958
|
})).nullable(),
|
|
2654
|
-
|
|
2959
|
+
timekeeping_timecode_ids: z.array(z.string()).nullable(),
|
|
2655
2960
|
tracks_feature_allocations: z.boolean(),
|
|
2656
2961
|
requires_feature_allocation: z.boolean(),
|
|
2657
2962
|
max_one_feature_allocation: z.boolean()
|
|
@@ -2756,6 +3061,10 @@ export const zUserResponseObject = z.object({
|
|
|
2756
3061
|
training_annual_minutes: z.int().nullable(),
|
|
2757
3062
|
hire_date: z.string().nullable(),
|
|
2758
3063
|
termination_date: z.string().nullable(),
|
|
3064
|
+
employment_window: z.object({
|
|
3065
|
+
valid_from: z.iso.datetime(),
|
|
3066
|
+
valid_to: z.iso.datetime().nullable()
|
|
3067
|
+
}),
|
|
2759
3068
|
manager_user_id: z.string().nullable(),
|
|
2760
3069
|
roles: z.array(z.string()),
|
|
2761
3070
|
company_user_pwa_info: z.object({
|
|
@@ -2842,7 +3151,6 @@ export const zUserParameters = z.object({
|
|
|
2842
3151
|
city: z.string().optional(),
|
|
2843
3152
|
state: z.string().optional(),
|
|
2844
3153
|
birth_date: z.string().optional(),
|
|
2845
|
-
external_id: z.string().optional(),
|
|
2846
3154
|
dol_apprentice_no: z.string().optional(),
|
|
2847
3155
|
winda_id: z.string().optional(),
|
|
2848
3156
|
linkedin_url: z.string().optional(),
|
|
@@ -2968,14 +3276,25 @@ export const zUserCompanyCreateParameters = z.object({
|
|
|
2968
3276
|
holiday_annual_minutes: z.int().nullish(),
|
|
2969
3277
|
training_annual_minutes: z.int().nullish()
|
|
2970
3278
|
});
|
|
3279
|
+
/**
|
|
3280
|
+
* Keyset pagination cursors for the collection.
|
|
3281
|
+
*/
|
|
3282
|
+
export const zPage = z.object({
|
|
3283
|
+
next_cursor: z.string().nullish(),
|
|
3284
|
+
current_cursor: z.string().nullish()
|
|
3285
|
+
});
|
|
2971
3286
|
/**
|
|
2972
3287
|
* Pagination metadata for a paged collection, holding the keyset cursors under `page`.
|
|
2973
3288
|
*/
|
|
2974
3289
|
export const zMeta = z.object({
|
|
2975
|
-
page:
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
3290
|
+
page: zPage.optional()
|
|
3291
|
+
});
|
|
3292
|
+
/**
|
|
3293
|
+
* Pagination metadata for a change-feed page, with the feed's safe polling watermark.
|
|
3294
|
+
*/
|
|
3295
|
+
export const zDeltaMeta = z.object({
|
|
3296
|
+
page: zPage,
|
|
3297
|
+
complete_through: z.iso.datetime()
|
|
2979
3298
|
});
|
|
2980
3299
|
/**
|
|
2981
3300
|
* Pagination links for navigating a paged collection.
|
|
@@ -3034,7 +3353,7 @@ export const zFormSubmissionIndexObject = z.object({
|
|
|
3034
3353
|
* A page of change events (create, update, destroy) for time entries, drawn from version history; scoped by the surviving parent time card, so a destroyed entry's history stays visible.
|
|
3035
3354
|
*/
|
|
3036
3355
|
export const zTimeEntryDeltasResponse = z.object({
|
|
3037
|
-
meta:
|
|
3356
|
+
meta: zDeltaMeta.optional(),
|
|
3038
3357
|
links: zLinks.optional(),
|
|
3039
3358
|
data: z.array(z.object({
|
|
3040
3359
|
event: z.enum([
|
|
@@ -3054,7 +3373,7 @@ export const zPayPeriodsResponseObject = z.object({
|
|
|
3054
3373
|
links: zLinks,
|
|
3055
3374
|
data: z.array(z.object({
|
|
3056
3375
|
id: z.string().optional(),
|
|
3057
|
-
|
|
3376
|
+
timekeeping_pay_period_config_id: z.string().optional(),
|
|
3058
3377
|
pay_period_config_uid: z.string().optional(),
|
|
3059
3378
|
pay_date: z.iso.date().optional(),
|
|
3060
3379
|
start_time: z.iso.datetime().optional(),
|
|
@@ -3146,7 +3465,7 @@ export const zWageDeterminationResponseObject = z.object({
|
|
|
3146
3465
|
modification_number: z.int(),
|
|
3147
3466
|
superseded_by_wage_determination_id: z.string().nullable(),
|
|
3148
3467
|
publication_date: z.iso.date(),
|
|
3149
|
-
|
|
3468
|
+
boundaries_region_id: z.string(),
|
|
3150
3469
|
valid_from: z.iso.datetime(),
|
|
3151
3470
|
valid_to: z.iso.datetime().nullable(),
|
|
3152
3471
|
created_at: z.iso.datetime(),
|
|
@@ -3191,7 +3510,7 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
|
|
|
3191
3510
|
id: z.string(),
|
|
3192
3511
|
uid: z.string(),
|
|
3193
3512
|
job_id: z.string(),
|
|
3194
|
-
|
|
3513
|
+
pwa_trade_id: z.string(),
|
|
3195
3514
|
type: z.enum(['Pwa::JobWageDeterminations::Federal']),
|
|
3196
3515
|
labor_classification: z.string(),
|
|
3197
3516
|
hourly_rate_cents: z.string(),
|
|
@@ -3235,7 +3554,7 @@ export const zRegionalJobWageDeterminationResponseObject = z.object({
|
|
|
3235
3554
|
id: z.string(),
|
|
3236
3555
|
uid: z.string(),
|
|
3237
3556
|
job_id: z.string(),
|
|
3238
|
-
|
|
3557
|
+
pwa_trade_id: z.string(),
|
|
3239
3558
|
type: z.enum(['Pwa::JobWageDeterminations::Regional']),
|
|
3240
3559
|
labor_classification: z.string(),
|
|
3241
3560
|
hourly_rate_cents: z.string(),
|
|
@@ -3258,7 +3577,7 @@ export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
|
|
|
3258
3577
|
id: z.string(),
|
|
3259
3578
|
uid: z.string(),
|
|
3260
3579
|
job_id: z.string(),
|
|
3261
|
-
|
|
3580
|
+
pwa_trade_id: z.string(),
|
|
3262
3581
|
type: z.enum(['Pwa::JobWageDeterminations::Federal']),
|
|
3263
3582
|
labor_classification: z.string(),
|
|
3264
3583
|
hourly_rate_cents: z.string(),
|
|
@@ -3286,7 +3605,7 @@ export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
|
|
|
3286
3605
|
id: z.string(),
|
|
3287
3606
|
uid: z.string(),
|
|
3288
3607
|
job_id: z.string(),
|
|
3289
|
-
|
|
3608
|
+
pwa_trade_id: z.string(),
|
|
3290
3609
|
type: z.enum(['Pwa::JobWageDeterminations::Regional']),
|
|
3291
3610
|
labor_classification: z.string(),
|
|
3292
3611
|
hourly_rate_cents: z.string(),
|
|
@@ -3314,7 +3633,7 @@ export const zJobWageDeterminationHistoryVersionObject = z.discriminatedUnion('t
|
|
|
3314
3633
|
export const zFederalJobWageDeterminationParameters = z.object({
|
|
3315
3634
|
type: z.enum(['Pwa::JobWageDeterminations::Federal']),
|
|
3316
3635
|
labor_classification: z.string(),
|
|
3317
|
-
|
|
3636
|
+
pwa_trade_id: z.string(),
|
|
3318
3637
|
hourly_rate_cents: z.string(),
|
|
3319
3638
|
fringe_rate_cents: z.string(),
|
|
3320
3639
|
class_code: z.string().nullish(),
|
|
@@ -3332,7 +3651,7 @@ export const zFederalJobWageDeterminationParameters = z.object({
|
|
|
3332
3651
|
export const zRegionalJobWageDeterminationParameters = z.object({
|
|
3333
3652
|
type: z.enum(['Pwa::JobWageDeterminations::Regional']),
|
|
3334
3653
|
labor_classification: z.string(),
|
|
3335
|
-
|
|
3654
|
+
pwa_trade_id: z.string(),
|
|
3336
3655
|
hourly_rate_cents: z.string(),
|
|
3337
3656
|
fringe_rate_cents: z.string().optional(),
|
|
3338
3657
|
general_wage_determination: z.string().nullish(),
|
|
@@ -3467,20 +3786,13 @@ export const zAssetsVendorParameters = z.object({
|
|
|
3467
3786
|
logo_signed_id: z.string().optional()
|
|
3468
3787
|
});
|
|
3469
3788
|
/**
|
|
3470
|
-
* A
|
|
3789
|
+
* A location that holds a company's assets and inventory — a warehouse or yard, optionally backed by a site on the Atlas map.
|
|
3471
3790
|
*/
|
|
3472
3791
|
export const zAssetsSiteResponseObject = z.object({
|
|
3473
3792
|
id: z.string(),
|
|
3474
3793
|
company_id: z.string(),
|
|
3475
3794
|
site_id: z.string().nullable(),
|
|
3476
|
-
kind: z.enum([
|
|
3477
|
-
'warehouse',
|
|
3478
|
-
'yard',
|
|
3479
|
-
'trailer',
|
|
3480
|
-
'truck',
|
|
3481
|
-
'van',
|
|
3482
|
-
'conex'
|
|
3483
|
-
]),
|
|
3795
|
+
kind: z.enum(['warehouse', 'yard']),
|
|
3484
3796
|
name: z.string(),
|
|
3485
3797
|
site_type: z.string().nullable(),
|
|
3486
3798
|
created_at: z.iso.datetime(),
|
|
@@ -3488,30 +3800,21 @@ export const zAssetsSiteResponseObject = z.object({
|
|
|
3488
3800
|
});
|
|
3489
3801
|
export const zAssetsSiteParameters = z.intersection(z.union([
|
|
3490
3802
|
z.object({
|
|
3491
|
-
|
|
3492
|
-
site_id: z.string()
|
|
3803
|
+
site_id: z.string().min(1)
|
|
3493
3804
|
}),
|
|
3494
3805
|
z.object({
|
|
3495
|
-
|
|
3496
|
-
'trailer',
|
|
3497
|
-
'truck',
|
|
3498
|
-
'van',
|
|
3499
|
-
'conex'
|
|
3500
|
-
]),
|
|
3501
|
-
name: z.string()
|
|
3806
|
+
name: z.string().min(1)
|
|
3502
3807
|
})
|
|
3503
3808
|
]), z.object({
|
|
3504
|
-
kind: z.enum([
|
|
3505
|
-
'warehouse',
|
|
3506
|
-
'yard',
|
|
3507
|
-
'trailer',
|
|
3508
|
-
'truck',
|
|
3509
|
-
'van',
|
|
3510
|
-
'conex'
|
|
3511
|
-
]),
|
|
3809
|
+
kind: z.enum(['warehouse', 'yard']),
|
|
3512
3810
|
site_id: z.string().nullish(),
|
|
3513
3811
|
name: z.string().nullish()
|
|
3514
3812
|
}));
|
|
3813
|
+
export const zAssetsSiteUpdateParameters = z.object({
|
|
3814
|
+
kind: z.enum(['warehouse', 'yard']).optional(),
|
|
3815
|
+
site_id: z.string().nullish(),
|
|
3816
|
+
name: z.string().nullish()
|
|
3817
|
+
});
|
|
3515
3818
|
/**
|
|
3516
3819
|
* A company-level rule that auto-generates asset form assignments. When an item of one of its products changes custody (an assignment or unassignment), the rule creates or refreshes a form task for the chosen users, due on the configured schedule.
|
|
3517
3820
|
*/
|
|
@@ -3545,7 +3848,7 @@ export const zAssetsFormAssignmentTriggerResponseObject = z.object({
|
|
|
3545
3848
|
tz_name: z.string(),
|
|
3546
3849
|
time_of_day_due: z.string(),
|
|
3547
3850
|
assigned_user_ids: z.array(z.string()),
|
|
3548
|
-
|
|
3851
|
+
assets_product_ids: z.array(z.string()),
|
|
3549
3852
|
created_at: z.iso.datetime(),
|
|
3550
3853
|
updated_at: z.iso.datetime()
|
|
3551
3854
|
});
|
|
@@ -3580,7 +3883,7 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
|
|
|
3580
3883
|
day_of_week_due: z.int().nullish(),
|
|
3581
3884
|
day_of_month_due: z.int().nullish(),
|
|
3582
3885
|
assigned_user_ids: z.array(z.string()).optional(),
|
|
3583
|
-
|
|
3886
|
+
assets_product_ids: z.array(z.string()).optional()
|
|
3584
3887
|
});
|
|
3585
3888
|
/**
|
|
3586
3889
|
* A file attached to an asset — an item or product image, or a service-event attachment. Uploaded through the direct-upload flow; the response carries a URL to download it.
|
|
@@ -3613,6 +3916,7 @@ export const zAssetsProductResponseObject = z.object({
|
|
|
3613
3916
|
'pair',
|
|
3614
3917
|
'pack'
|
|
3615
3918
|
]),
|
|
3919
|
+
container: z.boolean(),
|
|
3616
3920
|
serialized: z.boolean(),
|
|
3617
3921
|
assets_category_id: z.string().nullable(),
|
|
3618
3922
|
attributes: zAssetsAttributeValueObjects,
|
|
@@ -3641,6 +3945,15 @@ export const zAssetsItemResponseObject = z.object({
|
|
|
3641
3945
|
currency: z.string().nullable(),
|
|
3642
3946
|
external_id: z.string().nullable(),
|
|
3643
3947
|
external_system_url: z.string().nullable(),
|
|
3948
|
+
container: z.boolean(),
|
|
3949
|
+
contents: z.array(z.object({
|
|
3950
|
+
item_id: z.string(),
|
|
3951
|
+
quantity: z.int()
|
|
3952
|
+
})),
|
|
3953
|
+
containers: z.array(z.object({
|
|
3954
|
+
container_item_id: z.string(),
|
|
3955
|
+
quantity: z.int()
|
|
3956
|
+
})),
|
|
3644
3957
|
images: z.array(zAssetsAttachmentResponseObject),
|
|
3645
3958
|
created_at: z.iso.datetime(),
|
|
3646
3959
|
updated_at: z.iso.datetime()
|
|
@@ -3671,6 +3984,7 @@ export const zAssetsProductParameters = z.object({
|
|
|
3671
3984
|
'pair',
|
|
3672
3985
|
'pack'
|
|
3673
3986
|
]).optional(),
|
|
3987
|
+
container: z.boolean().optional(),
|
|
3674
3988
|
attribute_values: z.array(z.object({
|
|
3675
3989
|
assets_attribute_id: z.string(),
|
|
3676
3990
|
value: z.string().nullish(),
|
|
@@ -3696,6 +4010,7 @@ export const zAssetsProductUpdateParameters = z.object({
|
|
|
3696
4010
|
'pair',
|
|
3697
4011
|
'pack'
|
|
3698
4012
|
]).optional(),
|
|
4013
|
+
container: z.boolean().optional(),
|
|
3699
4014
|
attribute_values: z.array(z.object({
|
|
3700
4015
|
assets_attribute_id: z.string(),
|
|
3701
4016
|
value: z.string().nullish(),
|
|
@@ -3723,6 +4038,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
3723
4038
|
images_attributes: z.array(zAssetsAttachmentParameters).optional(),
|
|
3724
4039
|
assets_site_id: z.string().optional(),
|
|
3725
4040
|
user_id: z.string().optional(),
|
|
4041
|
+
container_item_id: z.string().optional(),
|
|
3726
4042
|
performed_by_user_id: z.string()
|
|
3727
4043
|
});
|
|
3728
4044
|
/**
|
|
@@ -3819,7 +4135,44 @@ export const zAssetsItemFormAssignmentParameters = z.object({
|
|
|
3819
4135
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
3820
4136
|
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
3821
4137
|
reminders_attributes: z.array(z.object({
|
|
3822
|
-
offset: z.
|
|
4138
|
+
offset: z.enum([
|
|
4139
|
+
'PT0S',
|
|
4140
|
+
'PT-1M',
|
|
4141
|
+
'PT-5M',
|
|
4142
|
+
'PT-10M',
|
|
4143
|
+
'PT-15M',
|
|
4144
|
+
'PT-30M',
|
|
4145
|
+
'PT-1H',
|
|
4146
|
+
'PT-2H',
|
|
4147
|
+
'P-1D',
|
|
4148
|
+
'P-2D',
|
|
4149
|
+
'P-3D',
|
|
4150
|
+
'P-4D',
|
|
4151
|
+
'P-5D',
|
|
4152
|
+
'P-6D',
|
|
4153
|
+
'P-1W',
|
|
4154
|
+
'P-2W',
|
|
4155
|
+
'P-1M',
|
|
4156
|
+
'P-2M',
|
|
4157
|
+
'P-3M',
|
|
4158
|
+
'P-6M',
|
|
4159
|
+
'P-1Y',
|
|
4160
|
+
'PT5M',
|
|
4161
|
+
'PT15M',
|
|
4162
|
+
'PT30M',
|
|
4163
|
+
'PT1H',
|
|
4164
|
+
'PT6H',
|
|
4165
|
+
'PT12H',
|
|
4166
|
+
'P1D',
|
|
4167
|
+
'P2D',
|
|
4168
|
+
'P3D',
|
|
4169
|
+
'P4D',
|
|
4170
|
+
'P5D',
|
|
4171
|
+
'P6D',
|
|
4172
|
+
'P1W',
|
|
4173
|
+
'P2W',
|
|
4174
|
+
'P3W'
|
|
4175
|
+
])
|
|
3823
4176
|
})).optional()
|
|
3824
4177
|
})
|
|
3825
4178
|
});
|
|
@@ -3860,7 +4213,8 @@ export const zAssetsTransactionEventResponseObject = z.object({
|
|
|
3860
4213
|
id: z.string(),
|
|
3861
4214
|
assets_site_id: z.string().nullable(),
|
|
3862
4215
|
assignee_id: z.string().nullable(),
|
|
3863
|
-
|
|
4216
|
+
container_item_id: z.string().nullable(),
|
|
4217
|
+
assets_transfer_id: z.string().nullable(),
|
|
3864
4218
|
performed_by_user_id: z.string(),
|
|
3865
4219
|
direction: z.enum(['inbound', 'outbound']),
|
|
3866
4220
|
kind: z.enum([
|
|
@@ -4011,7 +4365,7 @@ export const zAssetsServiceScheduleTemplateParameters = z.object({
|
|
|
4011
4365
|
performed_by_user_id: z.string()
|
|
4012
4366
|
});
|
|
4013
4367
|
/**
|
|
4014
|
-
* A completed movement of item stock between two holders
|
|
4368
|
+
* A completed movement of item stock between two holders, each a site, a user, or a container. Each line moves one item; applying the transfer records paired outbound and inbound transactions and updates the on-hand, custody, and containment counts. Transfers created through this API are always completed. One-sided moves (placing or removing an item with only one endpoint) record transactions but no transfer, and so are not represented by this resource.
|
|
4015
4369
|
*/
|
|
4016
4370
|
export const zAssetsTransferResponseObject = z.object({
|
|
4017
4371
|
id: z.string(),
|
|
@@ -4024,8 +4378,10 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
4024
4378
|
]),
|
|
4025
4379
|
from_assets_site_id: z.string().nullable(),
|
|
4026
4380
|
from_user_id: z.string().nullable(),
|
|
4381
|
+
from_container_item_id: z.string().nullable(),
|
|
4027
4382
|
to_assets_site_id: z.string().nullable(),
|
|
4028
4383
|
to_user_id: z.string().nullable(),
|
|
4384
|
+
to_container_item_id: z.string().nullable(),
|
|
4029
4385
|
initiated_by_user_id: z.string(),
|
|
4030
4386
|
completed_at: z.iso.datetime().nullable(),
|
|
4031
4387
|
transfer_lines: z.array(z.object({
|
|
@@ -4037,13 +4393,15 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
4037
4393
|
updated_at: z.iso.datetime()
|
|
4038
4394
|
});
|
|
4039
4395
|
/**
|
|
4040
|
-
*
|
|
4396
|
+
* Move item stock. Each endpoint is a site, a user, or a container — give at most one per side. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). With a single open end it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. Moves are applied immediately, so the source must hold enough of each item.
|
|
4041
4397
|
*/
|
|
4042
4398
|
export const zAssetsTransferParameters = z.object({
|
|
4043
4399
|
from_assets_site_id: z.string().optional(),
|
|
4044
4400
|
from_user_id: z.string().optional(),
|
|
4401
|
+
from_container_item_id: z.string().optional(),
|
|
4045
4402
|
to_assets_site_id: z.string().optional(),
|
|
4046
4403
|
to_user_id: z.string().optional(),
|
|
4404
|
+
to_container_item_id: z.string().optional(),
|
|
4047
4405
|
performed_by_user_id: z.string(),
|
|
4048
4406
|
line_items: z.array(z.object({
|
|
4049
4407
|
assets_item_id: z.string(),
|
|
@@ -4508,6 +4866,12 @@ export const zGetInventoryResponse = zAssetsInventoryResponseObject;
|
|
|
4508
4866
|
export const zListItemsQuery = z.object({
|
|
4509
4867
|
'filter[assets_product_id]': z.string().optional(),
|
|
4510
4868
|
'filter[type]': z.string().optional(),
|
|
4869
|
+
'filter[assets_site_id]': z.string().optional(),
|
|
4870
|
+
'filter[user_id]': z.string().optional(),
|
|
4871
|
+
'filter[assets_category_id]': z.string().optional(),
|
|
4872
|
+
'filter[container_item_id]': z.string().optional(),
|
|
4873
|
+
'filter[status]': z.string().optional(),
|
|
4874
|
+
'filter[service]': z.string().optional(),
|
|
4511
4875
|
filter: z.string().optional(),
|
|
4512
4876
|
'filter[unexpected]': z.string().optional()
|
|
4513
4877
|
});
|
|
@@ -4960,7 +5324,7 @@ export const zGetAssetsSitePath = z.object({
|
|
|
4960
5324
|
* Success
|
|
4961
5325
|
*/
|
|
4962
5326
|
export const zGetAssetsSiteResponse = zAssetsSiteResponseObject;
|
|
4963
|
-
export const zUpdateSiteBody =
|
|
5327
|
+
export const zUpdateSiteBody = zAssetsSiteUpdateParameters;
|
|
4964
5328
|
export const zUpdateSitePath = z.object({
|
|
4965
5329
|
id: z.string()
|
|
4966
5330
|
});
|
|
@@ -4982,10 +5346,10 @@ export const zListTransfersResponse = z.object({
|
|
|
4982
5346
|
data: z.array(zAssetsTransferResponseObject).optional()
|
|
4983
5347
|
});
|
|
4984
5348
|
export const zCreateTransferBody = zAssetsTransferParameters;
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
5349
|
+
export const zCreateTransferResponse = z.union([
|
|
5350
|
+
zAssetsTransferResponseObject,
|
|
5351
|
+
z.void()
|
|
5352
|
+
]);
|
|
4989
5353
|
export const zGetTransferPath = z.object({
|
|
4990
5354
|
id: z.string()
|
|
4991
5355
|
});
|
|
@@ -5311,7 +5675,7 @@ export const zListChecksQuery = z.object({
|
|
|
5311
5675
|
'filter[job_id]': z.string().optional(),
|
|
5312
5676
|
'filter[job_id][null]': z.boolean().optional(),
|
|
5313
5677
|
'filter[project_id]': z.string().optional(),
|
|
5314
|
-
'filter[
|
|
5678
|
+
'filter[compliances_requirement_id]': z.string().optional(),
|
|
5315
5679
|
'filter[time_due][gte]': z.iso.datetime().optional(),
|
|
5316
5680
|
'filter[time_due][lte]': z.iso.datetime().optional(),
|
|
5317
5681
|
filter: z.string().optional(),
|
|
@@ -5881,7 +6245,7 @@ export const zUpdateFringeBenefitPlanPath = z.object({
|
|
|
5881
6245
|
export const zUpdateFringeBenefitPlanResponse = zPayrollFringeBenefitPlanResponseObject;
|
|
5882
6246
|
export const zListPayrollRunsQuery = z.object({
|
|
5883
6247
|
'filter[run_type]': z.string().optional(),
|
|
5884
|
-
'filter[
|
|
6248
|
+
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
5885
6249
|
'filter[run_date][gte]': z.iso.date().optional(),
|
|
5886
6250
|
'filter[run_date][lte]': z.iso.date().optional(),
|
|
5887
6251
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
@@ -5926,7 +6290,7 @@ export const zUpdatePayrollRunPath = z.object({
|
|
|
5926
6290
|
*/
|
|
5927
6291
|
export const zUpdatePayrollRunResponse = zPayrollRunResponseObject;
|
|
5928
6292
|
export const zListPaystubLineItemsQuery = z.object({
|
|
5929
|
-
'filter[
|
|
6293
|
+
'filter[payrolls_paystub_id]': z.string().optional(),
|
|
5930
6294
|
filter: z.string().optional(),
|
|
5931
6295
|
'filter[unexpected]': z.string().optional(),
|
|
5932
6296
|
'page[cursor]': z.string().optional(),
|
|
@@ -5965,9 +6329,9 @@ export const zUpdatePaystubLineItemPath = z.object({
|
|
|
5965
6329
|
*/
|
|
5966
6330
|
export const zUpdatePaystubLineItemResponse = zPaystubLineItemResponseObject;
|
|
5967
6331
|
export const zListPaystubsQuery = z.object({
|
|
5968
|
-
'filter[
|
|
6332
|
+
'filter[payrolls_payroll_run_id]': z.string().optional(),
|
|
5969
6333
|
'filter[user_id]': z.string().optional(),
|
|
5970
|
-
'filter[
|
|
6334
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
5971
6335
|
filter: z.string().optional(),
|
|
5972
6336
|
'filter[unexpected]': z.string().optional(),
|
|
5973
6337
|
'page[cursor]': z.string().optional(),
|
|
@@ -6261,11 +6625,56 @@ export const zCreateFormAssignmentTaskBody = z.object({
|
|
|
6261
6625
|
created_by_user_id: z.string(),
|
|
6262
6626
|
time_due: z.string().optional(),
|
|
6263
6627
|
tz_name: z.string().optional(),
|
|
6264
|
-
frequency: z.
|
|
6628
|
+
frequency: z.enum([
|
|
6629
|
+
'DAILY',
|
|
6630
|
+
'WORKDAILY',
|
|
6631
|
+
'WORKDAILYSIX',
|
|
6632
|
+
'WEEKLY',
|
|
6633
|
+
'BIWEEKLY',
|
|
6634
|
+
'MONTHLY',
|
|
6635
|
+
'QUARTERLY'
|
|
6636
|
+
]).optional(),
|
|
6265
6637
|
recurrence_end_time: z.string().optional(),
|
|
6266
6638
|
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
6267
6639
|
reminders_attributes: z.array(z.object({
|
|
6268
|
-
offset: z.
|
|
6640
|
+
offset: z.enum([
|
|
6641
|
+
'PT0S',
|
|
6642
|
+
'PT-1M',
|
|
6643
|
+
'PT-5M',
|
|
6644
|
+
'PT-10M',
|
|
6645
|
+
'PT-15M',
|
|
6646
|
+
'PT-30M',
|
|
6647
|
+
'PT-1H',
|
|
6648
|
+
'PT-2H',
|
|
6649
|
+
'P-1D',
|
|
6650
|
+
'P-2D',
|
|
6651
|
+
'P-3D',
|
|
6652
|
+
'P-4D',
|
|
6653
|
+
'P-5D',
|
|
6654
|
+
'P-6D',
|
|
6655
|
+
'P-1W',
|
|
6656
|
+
'P-2W',
|
|
6657
|
+
'P-1M',
|
|
6658
|
+
'P-2M',
|
|
6659
|
+
'P-3M',
|
|
6660
|
+
'P-6M',
|
|
6661
|
+
'P-1Y',
|
|
6662
|
+
'PT5M',
|
|
6663
|
+
'PT15M',
|
|
6664
|
+
'PT30M',
|
|
6665
|
+
'PT1H',
|
|
6666
|
+
'PT6H',
|
|
6667
|
+
'PT12H',
|
|
6668
|
+
'P1D',
|
|
6669
|
+
'P2D',
|
|
6670
|
+
'P3D',
|
|
6671
|
+
'P4D',
|
|
6672
|
+
'P5D',
|
|
6673
|
+
'P6D',
|
|
6674
|
+
'P1W',
|
|
6675
|
+
'P2W',
|
|
6676
|
+
'P3W'
|
|
6677
|
+
])
|
|
6269
6678
|
})).optional()
|
|
6270
6679
|
})
|
|
6271
6680
|
});
|
|
@@ -6412,7 +6821,7 @@ export const zCreateWorkerTimeCardApprovalPath = z.object({
|
|
|
6412
6821
|
*/
|
|
6413
6822
|
export const zCreateWorkerTimeCardApprovalResponse = zTimeCardApprovalResponseObject;
|
|
6414
6823
|
export const zListTimeCardsQuery = z.object({
|
|
6415
|
-
'filter[
|
|
6824
|
+
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
6416
6825
|
'filter[user_id]': z.string().optional(),
|
|
6417
6826
|
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
6418
6827
|
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
@@ -6455,7 +6864,7 @@ export const zListTimeEntriesQuery = z.object({
|
|
|
6455
6864
|
'filter[user_id]': z.string().optional(),
|
|
6456
6865
|
'filter[job_id]': z.string().optional(),
|
|
6457
6866
|
'filter[job_id][null]': z.boolean().optional(),
|
|
6458
|
-
'filter[
|
|
6867
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
6459
6868
|
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
6460
6869
|
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
6461
6870
|
'filter[end_time][gte]': z.iso.datetime().optional(),
|
|
@@ -6567,14 +6976,6 @@ export const zCreateTimecodeBody = zTimecodeParameters;
|
|
|
6567
6976
|
* Created with effective_date
|
|
6568
6977
|
*/
|
|
6569
6978
|
export const zCreateTimecodeResponse = zTimecodeResponseObject;
|
|
6570
|
-
export const zTerminateTimecodeBody = zTimecodeTerminationParameters;
|
|
6571
|
-
export const zTerminateTimecodePath = z.object({
|
|
6572
|
-
id: z.string()
|
|
6573
|
-
});
|
|
6574
|
-
/**
|
|
6575
|
-
* Success
|
|
6576
|
-
*/
|
|
6577
|
-
export const zTerminateTimecodeResponse = zTimecodeResponseObject;
|
|
6578
6979
|
export const zGetTimecodePath = z.object({
|
|
6579
6980
|
id: z.string()
|
|
6580
6981
|
});
|
|
@@ -6595,9 +6996,9 @@ export const zUpdateTimecodePath = z.object({
|
|
|
6595
6996
|
*/
|
|
6596
6997
|
export const zUpdateTimecodeResponse = zTimecodeResponseObject;
|
|
6597
6998
|
export const zListJobTimeCardDaysQuery = z.object({
|
|
6598
|
-
'filter[
|
|
6999
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
6599
7000
|
'filter[job_id]': z.string().optional(),
|
|
6600
|
-
'filter[
|
|
7001
|
+
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
6601
7002
|
'filter[date][gte]': z.iso.date().optional(),
|
|
6602
7003
|
'filter[date][lte]': z.iso.date().optional(),
|
|
6603
7004
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
@@ -6756,7 +7157,7 @@ export const zGetPayPeriodConfigQuery = z.object({
|
|
|
6756
7157
|
*/
|
|
6757
7158
|
export const zGetPayPeriodConfigResponse = zPayPeriodConfigResponseObject;
|
|
6758
7159
|
export const zListTimeCardActualsQuery = z.object({
|
|
6759
|
-
'filter[
|
|
7160
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
6760
7161
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
6761
7162
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
6762
7163
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|