@dsptch-work/api-client 0.2.0 → 0.4.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 +105 -0
- package/dist/gen/client/index.d.ts +2 -0
- package/dist/gen/client/utils.gen.d.ts +1 -1
- package/dist/gen/client.gen.d.ts +2 -2
- package/dist/gen/core/auth.gen.d.ts +7 -0
- package/dist/gen/core/params.gen.d.ts +2 -2
- package/dist/gen/core/params.gen.js +20 -11
- package/dist/gen/core/queryKeySerializer.gen.d.ts +1 -1
- package/dist/gen/core/types.gen.d.ts +5 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +333 -304
- package/dist/gen/sdk.gen.js +78 -37
- package/dist/gen/types.gen.d.ts +1427 -861
- package/dist/gen/zod.gen.d.ts +1322 -544
- package/dist/gen/zod.gen.js +657 -154
- package/package.json +4 -4
package/dist/gen/zod.gen.js
CHANGED
|
@@ -1,14 +1,314 @@
|
|
|
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
11
|
});
|
|
12
|
+
/**
|
|
13
|
+
* Error types
|
|
14
|
+
*
|
|
15
|
+
* Every way a request can fail has a stable machine-readable identifier: the `type` URI of its
|
|
16
|
+
* `application/problem+json` response, whose fragment is the short form listed here.
|
|
17
|
+
* Identifiers are stable contract — messages (`detail`) may be reworded at any time. Entries
|
|
18
|
+
* are grouped by the HTTP status they render with.
|
|
19
|
+
*
|
|
20
|
+
* ## 400
|
|
21
|
+
*
|
|
22
|
+
* ### blank_axis
|
|
23
|
+
*
|
|
24
|
+
* **Blank Temporal Axis Value**
|
|
25
|
+
*
|
|
26
|
+
* 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.
|
|
27
|
+
*
|
|
28
|
+
* ### invalid_cursor
|
|
29
|
+
*
|
|
30
|
+
* **Invalid Pagination Cursor**
|
|
31
|
+
*
|
|
32
|
+
* 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.
|
|
33
|
+
*
|
|
34
|
+
* ### invalid_filter_key
|
|
35
|
+
*
|
|
36
|
+
* **Unknown Filter Key**
|
|
37
|
+
*
|
|
38
|
+
* 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.
|
|
39
|
+
*
|
|
40
|
+
* ### invalid_limit
|
|
41
|
+
*
|
|
42
|
+
* **Invalid Page Limit**
|
|
43
|
+
*
|
|
44
|
+
* 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.
|
|
45
|
+
*
|
|
46
|
+
* ### invalid_signature
|
|
47
|
+
*
|
|
48
|
+
* **Invalid Signed Token**
|
|
49
|
+
*
|
|
50
|
+
* A signed token in the request fails signature verification. Re-obtain the token from the endpoint that issued it.
|
|
51
|
+
*
|
|
52
|
+
* ### non_range_filter_value
|
|
53
|
+
*
|
|
54
|
+
* **Range Filter Needs Bounds**
|
|
55
|
+
*
|
|
56
|
+
* A range filter key carries a bare value instead of bounds. Send the object form with `gte` and/or `lte`.
|
|
57
|
+
*
|
|
58
|
+
* ### non_scalar_axis
|
|
59
|
+
*
|
|
60
|
+
* **Temporal Axis Not Scalar**
|
|
61
|
+
*
|
|
62
|
+
* An `as_of` axis value is an object or array rather than a single date-time. Send one scalar value per axis.
|
|
63
|
+
*
|
|
64
|
+
* ### non_scalar_filter_value
|
|
65
|
+
*
|
|
66
|
+
* **Filter Value Not Scalar**
|
|
67
|
+
*
|
|
68
|
+
* An equality filter key carries an array or object outside the supported `null` operator form. Send a single scalar value.
|
|
69
|
+
*
|
|
70
|
+
* ### parameter_missing
|
|
71
|
+
*
|
|
72
|
+
* **Required Parameter Missing**
|
|
73
|
+
*
|
|
74
|
+
* A required request parameter is absent or empty. The message names it; supply the parameter and retry.
|
|
75
|
+
*
|
|
76
|
+
* ### parameter_not_object
|
|
77
|
+
*
|
|
78
|
+
* **Parameter Must Be An Object**
|
|
79
|
+
*
|
|
80
|
+
* 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`.
|
|
81
|
+
*
|
|
82
|
+
* ### unknown_axis
|
|
83
|
+
*
|
|
84
|
+
* **Unknown Temporal Axis Key**
|
|
85
|
+
*
|
|
86
|
+
* The `as_of` parameter carries a sub-key that is not a temporal axis. Remove the unknown key.
|
|
87
|
+
*
|
|
88
|
+
* ### unknown_key
|
|
89
|
+
*
|
|
90
|
+
* **Unknown Query Parameter**
|
|
91
|
+
*
|
|
92
|
+
* 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.
|
|
93
|
+
*
|
|
94
|
+
* ### unsupported_axis
|
|
95
|
+
*
|
|
96
|
+
* **Axis Unsupported By Resource**
|
|
97
|
+
*
|
|
98
|
+
* The `as_of` parameter names a temporal axis this resource does not expose. Drop the axis.
|
|
99
|
+
*
|
|
100
|
+
* ### valid_axis_on_timeline
|
|
101
|
+
*
|
|
102
|
+
* **Valid-Time Pin On A Timeline**
|
|
103
|
+
*
|
|
104
|
+
* 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.
|
|
105
|
+
*
|
|
106
|
+
* ## 401
|
|
107
|
+
*
|
|
108
|
+
* ### unauthorized
|
|
109
|
+
*
|
|
110
|
+
* **Invalid Or Missing Credentials**
|
|
111
|
+
*
|
|
112
|
+
* The request presents no usable credential — the API key is missing or invalid. Supply a valid key in the `x-api-key` header.
|
|
113
|
+
*
|
|
114
|
+
* ## 403
|
|
115
|
+
*
|
|
116
|
+
* ### company_scoped_key_required
|
|
117
|
+
*
|
|
118
|
+
* **Company-Scoped Key Required**
|
|
119
|
+
*
|
|
120
|
+
* The endpoint must act within a company tenant, but the presented credential carries none. Retry with a company- or user-scoped API key.
|
|
121
|
+
*
|
|
122
|
+
* ### forbidden
|
|
123
|
+
*
|
|
124
|
+
* **Action Not Authorized**
|
|
125
|
+
*
|
|
126
|
+
* The credential is valid, but this action on this record is refused by policy. The operation is not available to this principal.
|
|
127
|
+
*
|
|
128
|
+
* ### insufficient_api_key_scope
|
|
129
|
+
*
|
|
130
|
+
* **Insufficient API Key Scope**
|
|
131
|
+
*
|
|
132
|
+
* The API key lacks the scope grant for this endpoint and verb. Grant the required scope to the key and retry.
|
|
133
|
+
*
|
|
134
|
+
* ## 404
|
|
135
|
+
*
|
|
136
|
+
* ### not_found
|
|
137
|
+
*
|
|
138
|
+
* **Resource Not Found**
|
|
139
|
+
*
|
|
140
|
+
* The identified record does not exist, or is outside what this credential can see. Verify the id and the key's access.
|
|
141
|
+
*
|
|
142
|
+
* ## 409
|
|
143
|
+
*
|
|
144
|
+
* ### recorded_since_termination
|
|
145
|
+
*
|
|
146
|
+
* **Timecode Changed Since Termination**
|
|
147
|
+
*
|
|
148
|
+
* Cancelling this timecode's scheduled termination would silently discard changes recorded since it was terminated. Re-read the timecode and reconcile before retrying.
|
|
149
|
+
*
|
|
150
|
+
* ## 422
|
|
151
|
+
*
|
|
152
|
+
* ### attachment_not_image
|
|
153
|
+
*
|
|
154
|
+
* **Attachment Not An Image**
|
|
155
|
+
*
|
|
156
|
+
* The upload behind an image attachment's signed id is not an image content type. Upload an image file.
|
|
157
|
+
*
|
|
158
|
+
* ### company_not_employer
|
|
159
|
+
*
|
|
160
|
+
* **Company Not Program Employer**
|
|
161
|
+
*
|
|
162
|
+
* 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.
|
|
163
|
+
*
|
|
164
|
+
* ### confirm_apprenticeship_conflict
|
|
165
|
+
*
|
|
166
|
+
* **Apprenticeship Allocation Conflict**
|
|
167
|
+
*
|
|
168
|
+
* 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.
|
|
169
|
+
*
|
|
170
|
+
* ### destroy_restricted
|
|
171
|
+
*
|
|
172
|
+
* **Deletion Blocked By Dependencies**
|
|
173
|
+
*
|
|
174
|
+
* A deletion is refused by the record's guards — dependent records restrict removal. The message carries the specifics; remove or reassign the dependents first.
|
|
175
|
+
*
|
|
176
|
+
* ### invalid_date
|
|
177
|
+
*
|
|
178
|
+
* **Unparseable Date Value**
|
|
179
|
+
*
|
|
180
|
+
* 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`).
|
|
181
|
+
*
|
|
182
|
+
* ### invalid_filter_value
|
|
183
|
+
*
|
|
184
|
+
* **Invalid Filter Value**
|
|
185
|
+
*
|
|
186
|
+
* 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.
|
|
187
|
+
*
|
|
188
|
+
* ### invalid_iso8601_duration
|
|
189
|
+
*
|
|
190
|
+
* **Invalid ISO 8601 Duration**
|
|
191
|
+
*
|
|
192
|
+
* A duration value is not a parseable ISO 8601 duration. Format it like `P2Y`, `P1D`, or `-PT15M`.
|
|
193
|
+
*
|
|
194
|
+
* ### invalid_placement_move
|
|
195
|
+
*
|
|
196
|
+
* **Move Conflicts With Placement**
|
|
197
|
+
*
|
|
198
|
+
* 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.
|
|
199
|
+
*
|
|
200
|
+
* ### invalid_signed_id
|
|
201
|
+
*
|
|
202
|
+
* **Invalid Attachment Signed Id**
|
|
203
|
+
*
|
|
204
|
+
* 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.
|
|
205
|
+
*
|
|
206
|
+
* ### non_numeric_cents
|
|
207
|
+
*
|
|
208
|
+
* **Non-Numeric Money Value**
|
|
209
|
+
*
|
|
210
|
+
* A money parameter is not a numeric value in cents. Send money as a numeric cents value.
|
|
211
|
+
*
|
|
212
|
+
* ### nothing_to_cancel
|
|
213
|
+
*
|
|
214
|
+
* **Nothing To Cancel**
|
|
215
|
+
*
|
|
216
|
+
* 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.
|
|
217
|
+
*
|
|
218
|
+
* ### pagination_failed
|
|
219
|
+
*
|
|
220
|
+
* **Pagination Failed**
|
|
221
|
+
*
|
|
222
|
+
* Pagination could not be applied to the request. Retry without the `page` parameter, or with a fresh cursor.
|
|
223
|
+
*
|
|
224
|
+
* ### subtype_foreign_keys
|
|
225
|
+
*
|
|
226
|
+
* **Foreign Subtype Attributes**
|
|
227
|
+
*
|
|
228
|
+
* 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.
|
|
229
|
+
*
|
|
230
|
+
* ### synced_determination
|
|
231
|
+
*
|
|
232
|
+
* **Determination Synced From Project**
|
|
233
|
+
*
|
|
234
|
+
* Rate rules cannot be written on a wage determination synced from a project. Manage the rules on the project instead.
|
|
235
|
+
*
|
|
236
|
+
* ### user_not_company_member
|
|
237
|
+
*
|
|
238
|
+
* **User Outside Company**
|
|
239
|
+
*
|
|
240
|
+
* 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.
|
|
241
|
+
*
|
|
242
|
+
* ### validation_failed
|
|
243
|
+
*
|
|
244
|
+
* **Validation Failed**
|
|
245
|
+
*
|
|
246
|
+
* 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.
|
|
247
|
+
*
|
|
248
|
+
* ### wage_schedule_outside_program
|
|
249
|
+
*
|
|
250
|
+
* **Wage Schedule Outside Program**
|
|
251
|
+
*
|
|
252
|
+
* The apprentice's wage schedule does not belong to the program in the URL. Use a schedule from that program.
|
|
253
|
+
*
|
|
254
|
+
* ## 429
|
|
255
|
+
*
|
|
256
|
+
* ### too_many_requests
|
|
257
|
+
*
|
|
258
|
+
* **Rate Limit Exceeded**
|
|
259
|
+
*
|
|
260
|
+
* The API key exceeded its request budget. Wait for the `Retry-After` window before retrying.
|
|
261
|
+
*
|
|
262
|
+
* ## 500
|
|
263
|
+
*
|
|
264
|
+
* ### internal_error
|
|
265
|
+
*
|
|
266
|
+
* **Internal Server Error**
|
|
267
|
+
*
|
|
268
|
+
* Something failed on the server; nothing in the request needs fixing. Retry later, or report the problem if it persists.
|
|
269
|
+
*
|
|
270
|
+
*/
|
|
271
|
+
export const zProblemTypeCatalog = z.enum([
|
|
272
|
+
'blank_axis',
|
|
273
|
+
'invalid_cursor',
|
|
274
|
+
'invalid_filter_key',
|
|
275
|
+
'invalid_limit',
|
|
276
|
+
'invalid_signature',
|
|
277
|
+
'non_range_filter_value',
|
|
278
|
+
'non_scalar_axis',
|
|
279
|
+
'non_scalar_filter_value',
|
|
280
|
+
'parameter_missing',
|
|
281
|
+
'parameter_not_object',
|
|
282
|
+
'unknown_axis',
|
|
283
|
+
'unknown_key',
|
|
284
|
+
'unsupported_axis',
|
|
285
|
+
'valid_axis_on_timeline',
|
|
286
|
+
'unauthorized',
|
|
287
|
+
'company_scoped_key_required',
|
|
288
|
+
'forbidden',
|
|
289
|
+
'insufficient_api_key_scope',
|
|
290
|
+
'not_found',
|
|
291
|
+
'recorded_since_termination',
|
|
292
|
+
'attachment_not_image',
|
|
293
|
+
'company_not_employer',
|
|
294
|
+
'confirm_apprenticeship_conflict',
|
|
295
|
+
'destroy_restricted',
|
|
296
|
+
'invalid_date',
|
|
297
|
+
'invalid_filter_value',
|
|
298
|
+
'invalid_iso8601_duration',
|
|
299
|
+
'invalid_placement_move',
|
|
300
|
+
'invalid_signed_id',
|
|
301
|
+
'non_numeric_cents',
|
|
302
|
+
'nothing_to_cancel',
|
|
303
|
+
'pagination_failed',
|
|
304
|
+
'subtype_foreign_keys',
|
|
305
|
+
'synced_determination',
|
|
306
|
+
'user_not_company_member',
|
|
307
|
+
'validation_failed',
|
|
308
|
+
'wage_schedule_outside_program',
|
|
309
|
+
'too_many_requests',
|
|
310
|
+
'internal_error'
|
|
311
|
+
]);
|
|
12
312
|
export const zApiKeyScopeResponseObject = z.object({
|
|
13
313
|
resource: z.string(),
|
|
14
314
|
action: z.enum([
|
|
@@ -396,12 +696,6 @@ export const zTimecodeParameters = z.object({
|
|
|
396
696
|
]).optional(),
|
|
397
697
|
effective_date: z.iso.datetime().optional()
|
|
398
698
|
});
|
|
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
699
|
/**
|
|
406
700
|
* 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
701
|
*/
|
|
@@ -438,10 +732,10 @@ export const zPerDiemResponseObject = z.object({
|
|
|
438
732
|
rate_cents: z.string().nullable(),
|
|
439
733
|
currency: z.string(),
|
|
440
734
|
taxable: z.boolean(),
|
|
441
|
-
|
|
442
|
-
|
|
735
|
+
default: z.boolean().nullable(),
|
|
736
|
+
active: z.boolean().nullable(),
|
|
443
737
|
work_type_ids: z.array(z.string()),
|
|
444
|
-
|
|
738
|
+
timekeeping_timecode_ids: z.array(z.string()),
|
|
445
739
|
created_at: z.iso.datetime(),
|
|
446
740
|
updated_at: z.iso.datetime()
|
|
447
741
|
});
|
|
@@ -454,18 +748,18 @@ export const zPerDiemParameters = z.object({
|
|
|
454
748
|
rate_cents: z.string().nullable(),
|
|
455
749
|
currency: z.string(),
|
|
456
750
|
taxable: z.boolean().optional(),
|
|
457
|
-
|
|
458
|
-
|
|
751
|
+
default: z.boolean().nullish(),
|
|
752
|
+
active: z.boolean().nullish(),
|
|
459
753
|
work_type_ids: z.array(z.string()).optional(),
|
|
460
|
-
|
|
754
|
+
timekeeping_timecode_ids: z.array(z.string()).optional()
|
|
461
755
|
});
|
|
462
756
|
/**
|
|
463
757
|
* The product's filled attribute values — one entry per attribute assigned to its category.
|
|
464
758
|
*/
|
|
465
759
|
export const zAssetsAttributeValueObjects = z.array(z.object({
|
|
466
|
-
|
|
760
|
+
assets_attribute_id: z.string(),
|
|
467
761
|
value: z.string().nullable(),
|
|
468
|
-
|
|
762
|
+
assets_attribute_option_id: z.string().nullable()
|
|
469
763
|
}));
|
|
470
764
|
/**
|
|
471
765
|
* A reusable custom-field definition (for example "Color" or "Voltage") that categories assign and products or items fill in.
|
|
@@ -519,7 +813,7 @@ export const zAssetsCategoryResponseObject = z.object({
|
|
|
519
813
|
full_name: z.string(),
|
|
520
814
|
attributes: z.array(z.object({
|
|
521
815
|
id: z.string(),
|
|
522
|
-
|
|
816
|
+
assets_attribute_id: z.string(),
|
|
523
817
|
fillable_on: z.enum(['product', 'item']),
|
|
524
818
|
required: z.boolean(),
|
|
525
819
|
position: z.int()
|
|
@@ -535,7 +829,7 @@ export const zAssetsCategoryParameters = z.object({
|
|
|
535
829
|
parent_id: z.string().nullish(),
|
|
536
830
|
category_attributes: z.array(z.object({
|
|
537
831
|
id: z.string().optional(),
|
|
538
|
-
|
|
832
|
+
assets_attribute_id: z.string(),
|
|
539
833
|
fillable_on: z.enum(['product', 'item']),
|
|
540
834
|
required: z.boolean().optional(),
|
|
541
835
|
position: z.int().optional(),
|
|
@@ -565,7 +859,7 @@ export const zDepartmentParameters = z.object({
|
|
|
565
859
|
*/
|
|
566
860
|
export const zTimeCardPerDiemResponseObject = z.object({
|
|
567
861
|
id: z.string(),
|
|
568
|
-
|
|
862
|
+
timekeeping_time_card_id: z.string(),
|
|
569
863
|
date: z.iso.date(),
|
|
570
864
|
approver_user_id: z.string(),
|
|
571
865
|
per_diem_id: z.string().nullable(),
|
|
@@ -660,8 +954,8 @@ export const zPayPeriodConfigResponseObject = z.object({
|
|
|
660
954
|
]),
|
|
661
955
|
actuals_enabled: z.boolean().nullable(),
|
|
662
956
|
requires_external_map_contributor: z.boolean(),
|
|
663
|
-
|
|
664
|
-
|
|
957
|
+
paid_after_holiday: z.boolean(),
|
|
958
|
+
demo: z.boolean().nullable(),
|
|
665
959
|
valid_from: z.iso.datetime(),
|
|
666
960
|
valid_to: z.iso.datetime().nullable(),
|
|
667
961
|
created_at: z.iso.datetime()
|
|
@@ -697,8 +991,8 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
|
|
|
697
991
|
]),
|
|
698
992
|
actuals_enabled: z.boolean().nullable(),
|
|
699
993
|
requires_external_map_contributor: z.boolean(),
|
|
700
|
-
|
|
701
|
-
|
|
994
|
+
paid_after_holiday: z.boolean(),
|
|
995
|
+
demo: z.boolean().nullable(),
|
|
702
996
|
valid_from: z.iso.datetime(),
|
|
703
997
|
valid_to: z.iso.datetime().nullable(),
|
|
704
998
|
created_at: z.iso.datetime(),
|
|
@@ -1000,9 +1294,9 @@ export const zUserUpdateParameters = z.object({
|
|
|
1000
1294
|
export const zTimeEntryResponseObject = z.object({
|
|
1001
1295
|
id: z.string(),
|
|
1002
1296
|
user_id: z.string(),
|
|
1003
|
-
|
|
1297
|
+
timekeeping_time_card_id: z.string(),
|
|
1004
1298
|
job_id: z.string().nullable(),
|
|
1005
|
-
|
|
1299
|
+
timekeeping_timecode_id: z.string().nullable(),
|
|
1006
1300
|
state: z.string().nullable(),
|
|
1007
1301
|
description: z.string().nullable(),
|
|
1008
1302
|
clock_punched: z.boolean(),
|
|
@@ -1022,7 +1316,7 @@ export const zTimeEntryResponseObject = z.object({
|
|
|
1022
1316
|
hourly_rate_cents: z.string().nullable(),
|
|
1023
1317
|
currency: z.string().nullable(),
|
|
1024
1318
|
hourly_rate_src_type: z.string().nullable(),
|
|
1025
|
-
|
|
1319
|
+
timekeeping_pay_period_id: z.string(),
|
|
1026
1320
|
start_time: z.iso.datetime(),
|
|
1027
1321
|
end_time: z.iso.datetime(),
|
|
1028
1322
|
created_at: z.iso.datetime(),
|
|
@@ -1046,7 +1340,7 @@ export const zTimeEntryResponseObject = z.object({
|
|
|
1046
1340
|
*/
|
|
1047
1341
|
export const zTimeEntryApprovalResponseObject = z.object({
|
|
1048
1342
|
id: z.string(),
|
|
1049
|
-
|
|
1343
|
+
timekeeping_time_entry_id: z.string(),
|
|
1050
1344
|
time_card_approval_id: z.string().nullable(),
|
|
1051
1345
|
status: z.enum([
|
|
1052
1346
|
'pending',
|
|
@@ -1068,14 +1362,14 @@ export const zManagerTimeEntryApprovalParameters = z.object({
|
|
|
1068
1362
|
approver_user_id: z.string()
|
|
1069
1363
|
});
|
|
1070
1364
|
/**
|
|
1071
|
-
* Request body for creating or updating a time entry; on create,
|
|
1365
|
+
* Request body for creating or updating a time entry; on create, timekeeping_time_card_id, start_time, and end_time are required.
|
|
1072
1366
|
*/
|
|
1073
1367
|
export const zTimeEntryParameters = z.object({
|
|
1074
|
-
|
|
1368
|
+
timekeeping_time_card_id: z.string(),
|
|
1075
1369
|
start_time: z.iso.datetime(),
|
|
1076
1370
|
end_time: z.iso.datetime(),
|
|
1077
1371
|
job_id: z.string().nullish(),
|
|
1078
|
-
|
|
1372
|
+
timekeeping_timecode_id: z.string().nullish(),
|
|
1079
1373
|
state: z.string().nullish(),
|
|
1080
1374
|
description: z.string().nullish(),
|
|
1081
1375
|
hourly_rate_cents: z.string().nullish(),
|
|
@@ -1114,7 +1408,7 @@ export const zUserCompanyScheduledChangesParameters = z.object({
|
|
|
1114
1408
|
pto_annual_minutes: z.int().nullish(),
|
|
1115
1409
|
holiday_annual_minutes: z.int().nullish(),
|
|
1116
1410
|
training_annual_minutes: z.int().nullish(),
|
|
1117
|
-
|
|
1411
|
+
companies_department_id: z.string().nullish()
|
|
1118
1412
|
});
|
|
1119
1413
|
/**
|
|
1120
1414
|
* 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.
|
|
@@ -1122,7 +1416,7 @@ export const zUserCompanyScheduledChangesParameters = z.object({
|
|
|
1122
1416
|
export const zWorkTypeResponseObject = z.object({
|
|
1123
1417
|
id: z.string(),
|
|
1124
1418
|
value: z.string(),
|
|
1125
|
-
|
|
1419
|
+
verified: z.boolean(),
|
|
1126
1420
|
scoped_to_company_id: z.string().nullable(),
|
|
1127
1421
|
specific_to_site_type: z.string().nullable(),
|
|
1128
1422
|
created_at: z.iso.datetime(),
|
|
@@ -1164,7 +1458,7 @@ export const zCompanyResponseObject = z.object({
|
|
|
1164
1458
|
'partnership',
|
|
1165
1459
|
'sole_proprietorship',
|
|
1166
1460
|
's_corporation'
|
|
1167
|
-
]),
|
|
1461
|
+
]).nullable(),
|
|
1168
1462
|
employee_count_range: z.enum([
|
|
1169
1463
|
'one_to_ten',
|
|
1170
1464
|
'eleven_to_fifty',
|
|
@@ -1174,7 +1468,7 @@ export const zCompanyResponseObject = z.object({
|
|
|
1174
1468
|
'one_thousand_one_to_five_thousand',
|
|
1175
1469
|
'five_thousand_one_to_ten_thousand',
|
|
1176
1470
|
'ten_thousand_one_plus'
|
|
1177
|
-
]),
|
|
1471
|
+
]).nullable(),
|
|
1178
1472
|
revenue_range: z.enum([
|
|
1179
1473
|
'zero_to_one_million',
|
|
1180
1474
|
'one_to_ten_million',
|
|
@@ -1186,12 +1480,131 @@ export const zCompanyResponseObject = z.object({
|
|
|
1186
1480
|
'five_hundred_to_one_billion',
|
|
1187
1481
|
'one_billion_to_ten_billion',
|
|
1188
1482
|
'ten_billion_plus'
|
|
1189
|
-
]),
|
|
1483
|
+
]).nullable(),
|
|
1190
1484
|
naics_code: z.string().nullable(),
|
|
1191
1485
|
linkedin_url: z.string().nullable(),
|
|
1486
|
+
industry: z.string().nullable(),
|
|
1487
|
+
stock_ticker: z.string().nullable(),
|
|
1488
|
+
stock_exchange: z.string().nullable(),
|
|
1489
|
+
logo_url: z.url().nullable(),
|
|
1192
1490
|
created_at: z.iso.datetime(),
|
|
1193
1491
|
updated_at: z.iso.datetime()
|
|
1194
1492
|
});
|
|
1493
|
+
export const zCompanyParameters = z.intersection(z.union([
|
|
1494
|
+
z.object({
|
|
1495
|
+
name: z.string()
|
|
1496
|
+
}),
|
|
1497
|
+
z.object({
|
|
1498
|
+
legal_name: z.string().nullable()
|
|
1499
|
+
}),
|
|
1500
|
+
z.object({
|
|
1501
|
+
description: z.string().nullable()
|
|
1502
|
+
}),
|
|
1503
|
+
z.object({
|
|
1504
|
+
address: z.string().nullable()
|
|
1505
|
+
}),
|
|
1506
|
+
z.object({
|
|
1507
|
+
website: z.string().nullable()
|
|
1508
|
+
}),
|
|
1509
|
+
z.object({
|
|
1510
|
+
phone_number: z.string().nullable()
|
|
1511
|
+
}),
|
|
1512
|
+
z.object({
|
|
1513
|
+
email: z.string().nullable()
|
|
1514
|
+
}),
|
|
1515
|
+
z.object({
|
|
1516
|
+
color_hex: z.string()
|
|
1517
|
+
}),
|
|
1518
|
+
z.object({
|
|
1519
|
+
tagline: z.string().nullable()
|
|
1520
|
+
}),
|
|
1521
|
+
z.object({
|
|
1522
|
+
founding_year: z.int().nullable()
|
|
1523
|
+
}),
|
|
1524
|
+
z.object({
|
|
1525
|
+
corporate_structure: z.enum([
|
|
1526
|
+
'corporation',
|
|
1527
|
+
'llc',
|
|
1528
|
+
'partnership',
|
|
1529
|
+
'sole_proprietorship',
|
|
1530
|
+
's_corporation'
|
|
1531
|
+
]).nullable()
|
|
1532
|
+
}),
|
|
1533
|
+
z.object({
|
|
1534
|
+
employee_count_range: z.enum([
|
|
1535
|
+
'one_to_ten',
|
|
1536
|
+
'eleven_to_fifty',
|
|
1537
|
+
'fifty_one_to_two_hundred',
|
|
1538
|
+
'two_hundred_one_to_five_hundred',
|
|
1539
|
+
'five_hundred_one_to_one_thousand',
|
|
1540
|
+
'one_thousand_one_to_five_thousand',
|
|
1541
|
+
'five_thousand_one_to_ten_thousand',
|
|
1542
|
+
'ten_thousand_one_plus'
|
|
1543
|
+
]).nullable()
|
|
1544
|
+
}),
|
|
1545
|
+
z.object({
|
|
1546
|
+
revenue_range: z.enum([
|
|
1547
|
+
'zero_to_one_million',
|
|
1548
|
+
'one_to_ten_million',
|
|
1549
|
+
'ten_to_twenty_five_million',
|
|
1550
|
+
'twenty_five_to_fifty_million',
|
|
1551
|
+
'fifty_to_one_hundred_million',
|
|
1552
|
+
'one_hundred_to_two_fifty_million',
|
|
1553
|
+
'two_fifty_to_five_hundred_million',
|
|
1554
|
+
'five_hundred_to_one_billion',
|
|
1555
|
+
'one_billion_to_ten_billion',
|
|
1556
|
+
'ten_billion_plus'
|
|
1557
|
+
]).nullable()
|
|
1558
|
+
}),
|
|
1559
|
+
z.object({
|
|
1560
|
+
naics_code: z.string().nullable()
|
|
1561
|
+
}),
|
|
1562
|
+
z.object({
|
|
1563
|
+
linkedin_url: z.string().nullable()
|
|
1564
|
+
})
|
|
1565
|
+
]), z.object({
|
|
1566
|
+
name: z.string().optional(),
|
|
1567
|
+
legal_name: z.string().nullish(),
|
|
1568
|
+
description: z.string().nullish(),
|
|
1569
|
+
address: z.string().nullish(),
|
|
1570
|
+
website: z.string().nullish(),
|
|
1571
|
+
phone_number: z.string().nullish(),
|
|
1572
|
+
email: z.string().nullish(),
|
|
1573
|
+
color_hex: z.string().optional(),
|
|
1574
|
+
tagline: z.string().nullish(),
|
|
1575
|
+
founding_year: z.int().nullish(),
|
|
1576
|
+
corporate_structure: z.enum([
|
|
1577
|
+
'corporation',
|
|
1578
|
+
'llc',
|
|
1579
|
+
'partnership',
|
|
1580
|
+
'sole_proprietorship',
|
|
1581
|
+
's_corporation'
|
|
1582
|
+
]).nullish(),
|
|
1583
|
+
employee_count_range: z.enum([
|
|
1584
|
+
'one_to_ten',
|
|
1585
|
+
'eleven_to_fifty',
|
|
1586
|
+
'fifty_one_to_two_hundred',
|
|
1587
|
+
'two_hundred_one_to_five_hundred',
|
|
1588
|
+
'five_hundred_one_to_one_thousand',
|
|
1589
|
+
'one_thousand_one_to_five_thousand',
|
|
1590
|
+
'five_thousand_one_to_ten_thousand',
|
|
1591
|
+
'ten_thousand_one_plus'
|
|
1592
|
+
]).nullish(),
|
|
1593
|
+
revenue_range: z.enum([
|
|
1594
|
+
'zero_to_one_million',
|
|
1595
|
+
'one_to_ten_million',
|
|
1596
|
+
'ten_to_twenty_five_million',
|
|
1597
|
+
'twenty_five_to_fifty_million',
|
|
1598
|
+
'fifty_to_one_hundred_million',
|
|
1599
|
+
'one_hundred_to_two_fifty_million',
|
|
1600
|
+
'two_fifty_to_five_hundred_million',
|
|
1601
|
+
'five_hundred_to_one_billion',
|
|
1602
|
+
'one_billion_to_ten_billion',
|
|
1603
|
+
'ten_billion_plus'
|
|
1604
|
+
]).nullish(),
|
|
1605
|
+
naics_code: z.string().nullish(),
|
|
1606
|
+
linkedin_url: z.string().nullish()
|
|
1607
|
+
}));
|
|
1195
1608
|
/**
|
|
1196
1609
|
* A custom field definition — a company-defined attribute attached to one kind of record (jobs, workers, apprentices, or the company itself). Deleting one is blocked while any record still holds a value for it.
|
|
1197
1610
|
*/
|
|
@@ -1200,7 +1613,7 @@ export const zCustomFieldConfigsResponseObject = z.object({
|
|
|
1200
1613
|
name: z.string(),
|
|
1201
1614
|
description: z.string().nullable(),
|
|
1202
1615
|
model_type: z.string(),
|
|
1203
|
-
|
|
1616
|
+
visible: z.boolean(),
|
|
1204
1617
|
company_id: z.string(),
|
|
1205
1618
|
created_at: z.iso.datetime(),
|
|
1206
1619
|
updated_at: z.iso.datetime()
|
|
@@ -1217,7 +1630,7 @@ export const zCustomFieldConfigParameters = z.object({
|
|
|
1217
1630
|
'job',
|
|
1218
1631
|
'user_company'
|
|
1219
1632
|
]),
|
|
1220
|
-
|
|
1633
|
+
visible: z.boolean().optional()
|
|
1221
1634
|
});
|
|
1222
1635
|
/**
|
|
1223
1636
|
* A user's membership in a group.
|
|
@@ -1276,12 +1689,12 @@ export const zJobParameters = z.object({
|
|
|
1276
1689
|
require_clock_in: z.boolean().nullish(),
|
|
1277
1690
|
send_geofence_reminders: z.boolean().nullish(),
|
|
1278
1691
|
allow_customer_access: z.boolean().optional(),
|
|
1279
|
-
|
|
1692
|
+
timekeeping_timecode_ids: z.array(z.string()).nullish(),
|
|
1280
1693
|
tracks_feature_allocations: z.boolean().nullish(),
|
|
1281
1694
|
requires_feature_allocation: z.boolean().nullish(),
|
|
1282
1695
|
max_one_feature_allocation: z.boolean().nullish(),
|
|
1283
1696
|
job_work_types_attributes: z.array(z.object({
|
|
1284
|
-
|
|
1697
|
+
primary: z.boolean().optional(),
|
|
1285
1698
|
work_type_id: z.string().optional()
|
|
1286
1699
|
})).nullish(),
|
|
1287
1700
|
job_address_attributes: z.object({
|
|
@@ -1343,7 +1756,7 @@ export const zUserCompanyScheduledChange = z.object({
|
|
|
1343
1756
|
pto_annual_minutes: z.int().nullish(),
|
|
1344
1757
|
holiday_annual_minutes: z.int().nullish(),
|
|
1345
1758
|
training_annual_minutes: z.int().nullish(),
|
|
1346
|
-
|
|
1759
|
+
companies_department_id: z.string().nullish()
|
|
1347
1760
|
});
|
|
1348
1761
|
/**
|
|
1349
1762
|
* A worker's scheduled compensation timeline at your company — the version currently in effect plus any future-dated versions.
|
|
@@ -1365,7 +1778,7 @@ export const zUserCompanyScheduledTerminationParameters = z.object({
|
|
|
1365
1778
|
export const zTimeCardResponseObject = z.object({
|
|
1366
1779
|
id: z.string(),
|
|
1367
1780
|
user_id: z.string(),
|
|
1368
|
-
|
|
1781
|
+
timekeeping_pay_period_id: z.string(),
|
|
1369
1782
|
locked: z.boolean(),
|
|
1370
1783
|
manager_time_card_approval_status: z.enum([
|
|
1371
1784
|
'pending',
|
|
@@ -1411,11 +1824,11 @@ export const zTimeCardResponseObject = z.object({
|
|
|
1411
1824
|
*/
|
|
1412
1825
|
export const zJobTimeCardDayResponseObject = z.object({
|
|
1413
1826
|
id: z.string(),
|
|
1414
|
-
|
|
1827
|
+
timekeeping_job_time_card_id: z.string(),
|
|
1415
1828
|
job_id: z.string(),
|
|
1416
|
-
|
|
1829
|
+
timekeeping_time_card_id: z.string(),
|
|
1417
1830
|
user_id: z.string(),
|
|
1418
|
-
|
|
1831
|
+
timekeeping_pay_period_id: z.string(),
|
|
1419
1832
|
date: z.iso.date(),
|
|
1420
1833
|
minutes_worked: z.int(),
|
|
1421
1834
|
paid_minutes_worked: z.int(),
|
|
@@ -1499,7 +1912,7 @@ export const zJobTimeCardDayResponseObject = z.object({
|
|
|
1499
1912
|
*/
|
|
1500
1913
|
export const zTimeCardApprovalResponseObject = z.object({
|
|
1501
1914
|
id: z.string(),
|
|
1502
|
-
|
|
1915
|
+
timekeeping_time_card_id: z.string(),
|
|
1503
1916
|
status: z.enum([
|
|
1504
1917
|
'pending',
|
|
1505
1918
|
'approved',
|
|
@@ -1639,7 +2052,7 @@ export const zPayrollExternalMapResponseObject = z.object({
|
|
|
1639
2052
|
id: z.string(),
|
|
1640
2053
|
bitemporal_id: z.string(),
|
|
1641
2054
|
name: z.string(),
|
|
1642
|
-
|
|
2055
|
+
payrolls_compensation_element_id: z.string(),
|
|
1643
2056
|
compensation_element_name: z.string(),
|
|
1644
2057
|
compensation_element_category: z.enum([
|
|
1645
2058
|
'tax',
|
|
@@ -1651,7 +2064,7 @@ export const zPayrollExternalMapResponseObject = z.object({
|
|
|
1651
2064
|
'other'
|
|
1652
2065
|
]),
|
|
1653
2066
|
pay_period_config_uid: z.string().nullable(),
|
|
1654
|
-
|
|
2067
|
+
payrolls_fringe_benefit_plan_id: z.string().nullable(),
|
|
1655
2068
|
contributor: z.enum([
|
|
1656
2069
|
'any',
|
|
1657
2070
|
'employee',
|
|
@@ -1671,7 +2084,7 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
|
|
|
1671
2084
|
id: z.string(),
|
|
1672
2085
|
bitemporal_id: z.string(),
|
|
1673
2086
|
name: z.string(),
|
|
1674
|
-
|
|
2087
|
+
payrolls_compensation_element_id: z.string(),
|
|
1675
2088
|
compensation_element_name: z.string(),
|
|
1676
2089
|
compensation_element_category: z.enum([
|
|
1677
2090
|
'tax',
|
|
@@ -1683,7 +2096,7 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
|
|
|
1683
2096
|
'other'
|
|
1684
2097
|
]),
|
|
1685
2098
|
pay_period_config_uid: z.string().nullable(),
|
|
1686
|
-
|
|
2099
|
+
payrolls_fringe_benefit_plan_id: z.string().nullable(),
|
|
1687
2100
|
contributor: z.enum([
|
|
1688
2101
|
'any',
|
|
1689
2102
|
'employee',
|
|
@@ -1711,8 +2124,8 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
|
|
|
1711
2124
|
export const zPayrollRunResponseObject = z.object({
|
|
1712
2125
|
id: z.string(),
|
|
1713
2126
|
company_id: z.string(),
|
|
1714
|
-
|
|
1715
|
-
|
|
2127
|
+
timekeeping_pay_period_id: z.string().nullable(),
|
|
2128
|
+
payrolls_credential_id: z.string().nullable(),
|
|
1716
2129
|
run_type: z.enum([
|
|
1717
2130
|
'CORRECTION',
|
|
1718
2131
|
'ON_CYCLE',
|
|
@@ -1727,12 +2140,12 @@ export const zPayrollRunResponseObject = z.object({
|
|
|
1727
2140
|
updated_at: z.iso.datetime()
|
|
1728
2141
|
});
|
|
1729
2142
|
/**
|
|
1730
|
-
* Request body for creating or updating a payroll run. company_id, run_type, and run_date are required; an on-cycle run additionally requires
|
|
2143
|
+
* 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.
|
|
1731
2144
|
*/
|
|
1732
2145
|
export const zPayrollRunParameters = z.object({
|
|
1733
2146
|
company_id: z.string(),
|
|
1734
|
-
|
|
1735
|
-
|
|
2147
|
+
timekeeping_pay_period_id: z.string().nullish(),
|
|
2148
|
+
payrolls_credential_id: z.string().nullish(),
|
|
1736
2149
|
run_type: z.enum([
|
|
1737
2150
|
'CORRECTION',
|
|
1738
2151
|
'ON_CYCLE',
|
|
@@ -1818,6 +2231,30 @@ export const zProjectParameters = z.object({
|
|
|
1818
2231
|
beginning_of_construction_date: z.iso.date().nullish(),
|
|
1819
2232
|
placed_in_service_date: z.iso.date().nullish()
|
|
1820
2233
|
});
|
|
2234
|
+
export const zSiteCheckInResponseObject = z.object({
|
|
2235
|
+
id: z.string(),
|
|
2236
|
+
site_id: z.string(),
|
|
2237
|
+
user_id: z.string().nullable(),
|
|
2238
|
+
first_name: z.string().nullable(),
|
|
2239
|
+
last_name: z.string().nullable(),
|
|
2240
|
+
site_contact_id: z.string().nullable(),
|
|
2241
|
+
site_contact_first_name: z.string().nullable(),
|
|
2242
|
+
site_contact_last_name: z.string().nullable(),
|
|
2243
|
+
employer_name: z.string().nullable(),
|
|
2244
|
+
description: z.string().nullable(),
|
|
2245
|
+
rationale: z.string().nullable(),
|
|
2246
|
+
source: z.enum(['manual', 'auto']),
|
|
2247
|
+
nerc_check_in: z.boolean(),
|
|
2248
|
+
cip_exceptional: z.boolean(),
|
|
2249
|
+
created_by_user_id: z.string().nullable(),
|
|
2250
|
+
latitude: z.number().nullable(),
|
|
2251
|
+
longitude: z.number().nullable(),
|
|
2252
|
+
start_time: z.iso.datetime(),
|
|
2253
|
+
end_time: z.iso.datetime().nullable(),
|
|
2254
|
+
verified_at: z.iso.datetime().nullable(),
|
|
2255
|
+
created_at: z.iso.datetime(),
|
|
2256
|
+
updated_at: z.iso.datetime()
|
|
2257
|
+
});
|
|
1821
2258
|
/**
|
|
1822
2259
|
* A geographic location where work is performed — a site on the Atlas map. Read-only through the API; sites are drawn on the map or imported from external sources, not created here.
|
|
1823
2260
|
*/
|
|
@@ -1962,7 +2399,7 @@ export const zFeatureResponseObject = z.object({
|
|
|
1962
2399
|
ext_source: z.string(),
|
|
1963
2400
|
scoped_to_company_id: z.string().nullable(),
|
|
1964
2401
|
created_by_company_id: z.string().nullable(),
|
|
1965
|
-
|
|
2402
|
+
scoped_to_user: z.boolean(),
|
|
1966
2403
|
address_id: z.string().nullable(),
|
|
1967
2404
|
created_by_user_id: z.string().nullable(),
|
|
1968
2405
|
updated_by_user_id: z.string().nullable(),
|
|
@@ -2004,12 +2441,12 @@ export const zComplianceCheckResponseObject = z.object({
|
|
|
2004
2441
|
'dismissed',
|
|
2005
2442
|
'pending'
|
|
2006
2443
|
]),
|
|
2007
|
-
|
|
2444
|
+
compliances_requirement_id: z.string(),
|
|
2008
2445
|
company_id: z.string().nullable(),
|
|
2009
2446
|
job_id: z.string().nullable(),
|
|
2010
2447
|
project_id: z.string().nullable(),
|
|
2011
|
-
|
|
2012
|
-
|
|
2448
|
+
timekeeping_time_card_id: z.string().nullable(),
|
|
2449
|
+
timekeeping_pay_period_id: z.string().nullable(),
|
|
2013
2450
|
user_id: z.string().nullable(),
|
|
2014
2451
|
user_company_uid: z.string().nullable(),
|
|
2015
2452
|
title: z.string(),
|
|
@@ -2061,18 +2498,18 @@ export const zPaystubResponseObject = z.object({
|
|
|
2061
2498
|
external_id: z.string().nullable(),
|
|
2062
2499
|
check_number: z.string().nullable(),
|
|
2063
2500
|
user_id: z.string(),
|
|
2064
|
-
|
|
2065
|
-
|
|
2501
|
+
timekeeping_time_card_id: z.string().nullable(),
|
|
2502
|
+
payrolls_payroll_run_id: z.string(),
|
|
2066
2503
|
created_at: z.iso.datetime(),
|
|
2067
2504
|
updated_at: z.iso.datetime()
|
|
2068
2505
|
});
|
|
2069
2506
|
/**
|
|
2070
|
-
* Request body for creating or updating a paystub.
|
|
2507
|
+
* 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.
|
|
2071
2508
|
*/
|
|
2072
2509
|
export const zPaystubParameters = z.object({
|
|
2073
|
-
|
|
2510
|
+
payrolls_payroll_run_id: z.string(),
|
|
2074
2511
|
user_id: z.string(),
|
|
2075
|
-
|
|
2512
|
+
timekeeping_time_card_id: z.string().nullish(),
|
|
2076
2513
|
external_id: z.string().nullish(),
|
|
2077
2514
|
check_number: z.string().nullish()
|
|
2078
2515
|
});
|
|
@@ -2081,8 +2518,8 @@ export const zPaystubParameters = z.object({
|
|
|
2081
2518
|
*/
|
|
2082
2519
|
export const zPriorPeriodAdjustmentResponseObject = z.object({
|
|
2083
2520
|
id: z.string(),
|
|
2084
|
-
|
|
2085
|
-
|
|
2521
|
+
timekeeping_time_card_id: z.string(),
|
|
2522
|
+
payrolls_paystub_line_item_id: z.string(),
|
|
2086
2523
|
job_id: z.string().nullable(),
|
|
2087
2524
|
created_by_user_id: z.string(),
|
|
2088
2525
|
adjustment_type: z.enum(['overpayment_recovery', 'retroactive_increase']),
|
|
@@ -2104,7 +2541,7 @@ export const zPriorPeriodAdjustmentResponseObject = z.object({
|
|
|
2104
2541
|
*/
|
|
2105
2542
|
export const zTimeCardActualsResponseObject = z.object({
|
|
2106
2543
|
id: z.string(),
|
|
2107
|
-
|
|
2544
|
+
timekeeping_time_card_id: z.string(),
|
|
2108
2545
|
gross_pay_cents: z.string().nullable(),
|
|
2109
2546
|
net_pay_cents: z.string().nullable(),
|
|
2110
2547
|
reimbursements_cents: z.string().nullable(),
|
|
@@ -2159,9 +2596,9 @@ export const zTimeCardActualsResponseObject = z.object({
|
|
|
2159
2596
|
*/
|
|
2160
2597
|
export const zPaystubLineItemResponseObject = z.object({
|
|
2161
2598
|
id: z.string(),
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2599
|
+
payrolls_external_map_id: z.string(),
|
|
2600
|
+
payrolls_paystub_id: z.string().nullable(),
|
|
2601
|
+
timekeeping_pay_period_id: z.string().nullable(),
|
|
2165
2602
|
user_id: z.string().nullable(),
|
|
2166
2603
|
external_map: z.object({
|
|
2167
2604
|
name: z.string().optional(),
|
|
@@ -2188,10 +2625,10 @@ export const zPaystubLineItemResponseObject = z.object({
|
|
|
2188
2625
|
* Request body for creating or updating a paystub line item. All four fields are required.
|
|
2189
2626
|
*/
|
|
2190
2627
|
export const zPaystubLineItemParameters = z.object({
|
|
2191
|
-
|
|
2628
|
+
payrolls_paystub_id: z.string(),
|
|
2192
2629
|
amount_cents: z.string(),
|
|
2193
2630
|
contributor: z.enum(['employee', 'employer']),
|
|
2194
|
-
|
|
2631
|
+
payrolls_external_map_id: z.string()
|
|
2195
2632
|
});
|
|
2196
2633
|
/**
|
|
2197
2634
|
* Request body for creating or updating a position on a job. The job is taken from the URL path.
|
|
@@ -2204,7 +2641,7 @@ export const zPositionParameters = z.object({
|
|
|
2204
2641
|
position_function_id: z.string().nullish(),
|
|
2205
2642
|
per_diem_id: z.string().nullish(),
|
|
2206
2643
|
per_diem_rate_cents: z.number().nullish(),
|
|
2207
|
-
|
|
2644
|
+
pwa: z.boolean().optional(),
|
|
2208
2645
|
cash_fringe_rate_cents: z.number().nullish(),
|
|
2209
2646
|
hourly_rate_cents: z.number().nullish(),
|
|
2210
2647
|
pwa_wage_pay_rate_cents: z.number().nullish(),
|
|
@@ -2395,12 +2832,12 @@ export const zCertificationResponseObject = z.object({
|
|
|
2395
2832
|
export const zUserCertificationParameters = z.object({
|
|
2396
2833
|
user_id: z.string(),
|
|
2397
2834
|
certification_id: z.string(),
|
|
2398
|
-
|
|
2835
|
+
received_at: z.iso.datetime(),
|
|
2399
2836
|
file: z.object({
|
|
2400
2837
|
name: z.string().optional(),
|
|
2401
2838
|
content: z.string().optional()
|
|
2402
2839
|
}).nullish(),
|
|
2403
|
-
|
|
2840
|
+
verified: z.boolean().nullish(),
|
|
2404
2841
|
expiration_date: z.iso.date().nullish(),
|
|
2405
2842
|
credential_id: z.string().nullish(),
|
|
2406
2843
|
approved_by_user_id: z.string().nullish(),
|
|
@@ -2414,8 +2851,8 @@ export const zUserCertificationResponseObject = z.object({
|
|
|
2414
2851
|
id: z.string(),
|
|
2415
2852
|
user_id: z.string(),
|
|
2416
2853
|
certification_id: z.string(),
|
|
2417
|
-
|
|
2418
|
-
|
|
2854
|
+
received_at: z.iso.datetime(),
|
|
2855
|
+
verified: z.boolean(),
|
|
2419
2856
|
issuer_company_id: z.string().nullable(),
|
|
2420
2857
|
expiration_date: z.iso.date().nullable(),
|
|
2421
2858
|
credential_id: z.string().nullable(),
|
|
@@ -2448,7 +2885,6 @@ export const zJobResponseObject = z.object({
|
|
|
2448
2885
|
status: z.string(),
|
|
2449
2886
|
start_time: z.string().nullable(),
|
|
2450
2887
|
end_time: z.string().nullable(),
|
|
2451
|
-
address: z.string().nullable(),
|
|
2452
2888
|
purchase_order_number: z.string().nullable(),
|
|
2453
2889
|
time_card_start_day: zTimeCardStartDay,
|
|
2454
2890
|
tz_name: z.string(),
|
|
@@ -2512,7 +2948,7 @@ export const zJobResponseObject = z.object({
|
|
|
2512
2948
|
work_types: z.array(z.object({
|
|
2513
2949
|
value: z.string().optional()
|
|
2514
2950
|
})).nullable(),
|
|
2515
|
-
|
|
2951
|
+
timekeeping_timecode_ids: z.array(z.string()).nullable(),
|
|
2516
2952
|
tracks_feature_allocations: z.boolean(),
|
|
2517
2953
|
requires_feature_allocation: z.boolean(),
|
|
2518
2954
|
max_one_feature_allocation: z.boolean()
|
|
@@ -2535,7 +2971,7 @@ export const zPositionResponseObject = z.object({
|
|
|
2535
2971
|
pwa_wage_pay_rate_cents: z.string().nullable(),
|
|
2536
2972
|
pwa_wage_pay_rate_src_type: z.string().nullable(),
|
|
2537
2973
|
wage_adder_rate_cents: z.string().nullable(),
|
|
2538
|
-
|
|
2974
|
+
pwa: z.boolean(),
|
|
2539
2975
|
federal_wage_determination_uids: z.array(z.string()),
|
|
2540
2976
|
regional_wage_determination_uids: z.array(z.string()),
|
|
2541
2977
|
pwa_details: z.object({
|
|
@@ -2617,6 +3053,10 @@ export const zUserResponseObject = z.object({
|
|
|
2617
3053
|
training_annual_minutes: z.int().nullable(),
|
|
2618
3054
|
hire_date: z.string().nullable(),
|
|
2619
3055
|
termination_date: z.string().nullable(),
|
|
3056
|
+
employment_window: z.object({
|
|
3057
|
+
valid_from: z.iso.datetime(),
|
|
3058
|
+
valid_to: z.iso.datetime().nullable()
|
|
3059
|
+
}),
|
|
2620
3060
|
manager_user_id: z.string().nullable(),
|
|
2621
3061
|
roles: z.array(z.string()),
|
|
2622
3062
|
company_user_pwa_info: z.object({
|
|
@@ -2703,7 +3143,6 @@ export const zUserParameters = z.object({
|
|
|
2703
3143
|
city: z.string().optional(),
|
|
2704
3144
|
state: z.string().optional(),
|
|
2705
3145
|
birth_date: z.string().optional(),
|
|
2706
|
-
external_id: z.string().optional(),
|
|
2707
3146
|
dol_apprentice_no: z.string().optional(),
|
|
2708
3147
|
winda_id: z.string().optional(),
|
|
2709
3148
|
linkedin_url: z.string().optional(),
|
|
@@ -2829,14 +3268,25 @@ export const zUserCompanyCreateParameters = z.object({
|
|
|
2829
3268
|
holiday_annual_minutes: z.int().nullish(),
|
|
2830
3269
|
training_annual_minutes: z.int().nullish()
|
|
2831
3270
|
});
|
|
3271
|
+
/**
|
|
3272
|
+
* Keyset pagination cursors for the collection.
|
|
3273
|
+
*/
|
|
3274
|
+
export const zPage = z.object({
|
|
3275
|
+
next_cursor: z.string().nullish(),
|
|
3276
|
+
current_cursor: z.string().nullish()
|
|
3277
|
+
});
|
|
2832
3278
|
/**
|
|
2833
3279
|
* Pagination metadata for a paged collection, holding the keyset cursors under `page`.
|
|
2834
3280
|
*/
|
|
2835
3281
|
export const zMeta = z.object({
|
|
2836
|
-
page:
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
3282
|
+
page: zPage.optional()
|
|
3283
|
+
});
|
|
3284
|
+
/**
|
|
3285
|
+
* Pagination metadata for a change-feed page, with the feed's safe polling watermark.
|
|
3286
|
+
*/
|
|
3287
|
+
export const zDeltaMeta = z.object({
|
|
3288
|
+
page: zPage,
|
|
3289
|
+
complete_through: z.iso.datetime()
|
|
2840
3290
|
});
|
|
2841
3291
|
/**
|
|
2842
3292
|
* Pagination links for navigating a paged collection.
|
|
@@ -2895,7 +3345,7 @@ export const zFormSubmissionIndexObject = z.object({
|
|
|
2895
3345
|
* 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.
|
|
2896
3346
|
*/
|
|
2897
3347
|
export const zTimeEntryDeltasResponse = z.object({
|
|
2898
|
-
meta:
|
|
3348
|
+
meta: zDeltaMeta.optional(),
|
|
2899
3349
|
links: zLinks.optional(),
|
|
2900
3350
|
data: z.array(z.object({
|
|
2901
3351
|
event: z.enum([
|
|
@@ -2915,7 +3365,7 @@ export const zPayPeriodsResponseObject = z.object({
|
|
|
2915
3365
|
links: zLinks,
|
|
2916
3366
|
data: z.array(z.object({
|
|
2917
3367
|
id: z.string().optional(),
|
|
2918
|
-
|
|
3368
|
+
timekeeping_pay_period_config_id: z.string().optional(),
|
|
2919
3369
|
pay_period_config_uid: z.string().optional(),
|
|
2920
3370
|
pay_date: z.iso.date().optional(),
|
|
2921
3371
|
start_time: z.iso.datetime().optional(),
|
|
@@ -3007,7 +3457,7 @@ export const zWageDeterminationResponseObject = z.object({
|
|
|
3007
3457
|
modification_number: z.int(),
|
|
3008
3458
|
superseded_by_wage_determination_id: z.string().nullable(),
|
|
3009
3459
|
publication_date: z.iso.date(),
|
|
3010
|
-
|
|
3460
|
+
boundaries_region_id: z.string(),
|
|
3011
3461
|
valid_from: z.iso.datetime(),
|
|
3012
3462
|
valid_to: z.iso.datetime().nullable(),
|
|
3013
3463
|
created_at: z.iso.datetime(),
|
|
@@ -3052,7 +3502,7 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
|
|
|
3052
3502
|
id: z.string(),
|
|
3053
3503
|
uid: z.string(),
|
|
3054
3504
|
job_id: z.string(),
|
|
3055
|
-
|
|
3505
|
+
pwa_trade_id: z.string(),
|
|
3056
3506
|
type: z.enum(['Pwa::JobWageDeterminations::Federal']),
|
|
3057
3507
|
labor_classification: z.string(),
|
|
3058
3508
|
hourly_rate_cents: z.string(),
|
|
@@ -3096,7 +3546,7 @@ export const zRegionalJobWageDeterminationResponseObject = z.object({
|
|
|
3096
3546
|
id: z.string(),
|
|
3097
3547
|
uid: z.string(),
|
|
3098
3548
|
job_id: z.string(),
|
|
3099
|
-
|
|
3549
|
+
pwa_trade_id: z.string(),
|
|
3100
3550
|
type: z.enum(['Pwa::JobWageDeterminations::Regional']),
|
|
3101
3551
|
labor_classification: z.string(),
|
|
3102
3552
|
hourly_rate_cents: z.string(),
|
|
@@ -3119,7 +3569,7 @@ export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
|
|
|
3119
3569
|
id: z.string(),
|
|
3120
3570
|
uid: z.string(),
|
|
3121
3571
|
job_id: z.string(),
|
|
3122
|
-
|
|
3572
|
+
pwa_trade_id: z.string(),
|
|
3123
3573
|
type: z.enum(['Pwa::JobWageDeterminations::Federal']),
|
|
3124
3574
|
labor_classification: z.string(),
|
|
3125
3575
|
hourly_rate_cents: z.string(),
|
|
@@ -3147,7 +3597,7 @@ export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
|
|
|
3147
3597
|
id: z.string(),
|
|
3148
3598
|
uid: z.string(),
|
|
3149
3599
|
job_id: z.string(),
|
|
3150
|
-
|
|
3600
|
+
pwa_trade_id: z.string(),
|
|
3151
3601
|
type: z.enum(['Pwa::JobWageDeterminations::Regional']),
|
|
3152
3602
|
labor_classification: z.string(),
|
|
3153
3603
|
hourly_rate_cents: z.string(),
|
|
@@ -3175,7 +3625,7 @@ export const zJobWageDeterminationHistoryVersionObject = z.discriminatedUnion('t
|
|
|
3175
3625
|
export const zFederalJobWageDeterminationParameters = z.object({
|
|
3176
3626
|
type: z.enum(['Pwa::JobWageDeterminations::Federal']),
|
|
3177
3627
|
labor_classification: z.string(),
|
|
3178
|
-
|
|
3628
|
+
pwa_trade_id: z.string(),
|
|
3179
3629
|
hourly_rate_cents: z.string(),
|
|
3180
3630
|
fringe_rate_cents: z.string(),
|
|
3181
3631
|
class_code: z.string().nullish(),
|
|
@@ -3193,7 +3643,7 @@ export const zFederalJobWageDeterminationParameters = z.object({
|
|
|
3193
3643
|
export const zRegionalJobWageDeterminationParameters = z.object({
|
|
3194
3644
|
type: z.enum(['Pwa::JobWageDeterminations::Regional']),
|
|
3195
3645
|
labor_classification: z.string(),
|
|
3196
|
-
|
|
3646
|
+
pwa_trade_id: z.string(),
|
|
3197
3647
|
hourly_rate_cents: z.string(),
|
|
3198
3648
|
fringe_rate_cents: z.string().optional(),
|
|
3199
3649
|
general_wage_determination: z.string().nullish(),
|
|
@@ -3406,7 +3856,7 @@ export const zAssetsFormAssignmentTriggerResponseObject = z.object({
|
|
|
3406
3856
|
tz_name: z.string(),
|
|
3407
3857
|
time_of_day_due: z.string(),
|
|
3408
3858
|
assigned_user_ids: z.array(z.string()),
|
|
3409
|
-
|
|
3859
|
+
assets_product_ids: z.array(z.string()),
|
|
3410
3860
|
created_at: z.iso.datetime(),
|
|
3411
3861
|
updated_at: z.iso.datetime()
|
|
3412
3862
|
});
|
|
@@ -3441,7 +3891,7 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
|
|
|
3441
3891
|
day_of_week_due: z.int().nullish(),
|
|
3442
3892
|
day_of_month_due: z.int().nullish(),
|
|
3443
3893
|
assigned_user_ids: z.array(z.string()).optional(),
|
|
3444
|
-
|
|
3894
|
+
assets_product_ids: z.array(z.string()).optional()
|
|
3445
3895
|
});
|
|
3446
3896
|
/**
|
|
3447
3897
|
* 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.
|
|
@@ -3474,8 +3924,9 @@ export const zAssetsProductResponseObject = z.object({
|
|
|
3474
3924
|
'pair',
|
|
3475
3925
|
'pack'
|
|
3476
3926
|
]),
|
|
3927
|
+
container: z.boolean(),
|
|
3477
3928
|
serialized: z.boolean(),
|
|
3478
|
-
|
|
3929
|
+
assets_category_id: z.string().nullable(),
|
|
3479
3930
|
attributes: zAssetsAttributeValueObjects,
|
|
3480
3931
|
images: z.array(zAssetsAttachmentResponseObject),
|
|
3481
3932
|
created_at: z.iso.datetime(),
|
|
@@ -3495,8 +3946,6 @@ export const zAssetsItemResponseObject = z.object({
|
|
|
3495
3946
|
status: z.enum([
|
|
3496
3947
|
'available',
|
|
3497
3948
|
'assigned',
|
|
3498
|
-
'transit',
|
|
3499
|
-
'maintenance',
|
|
3500
3949
|
'retired'
|
|
3501
3950
|
]),
|
|
3502
3951
|
purchase_date: z.iso.datetime().nullable(),
|
|
@@ -3504,6 +3953,15 @@ export const zAssetsItemResponseObject = z.object({
|
|
|
3504
3953
|
currency: z.string().nullable(),
|
|
3505
3954
|
external_id: z.string().nullable(),
|
|
3506
3955
|
external_system_url: z.string().nullable(),
|
|
3956
|
+
container: z.boolean(),
|
|
3957
|
+
contents: z.array(z.object({
|
|
3958
|
+
item_id: z.string(),
|
|
3959
|
+
quantity: z.int()
|
|
3960
|
+
})),
|
|
3961
|
+
containers: z.array(z.object({
|
|
3962
|
+
container_item_id: z.string(),
|
|
3963
|
+
quantity: z.int()
|
|
3964
|
+
})),
|
|
3507
3965
|
images: z.array(zAssetsAttachmentResponseObject),
|
|
3508
3966
|
created_at: z.iso.datetime(),
|
|
3509
3967
|
updated_at: z.iso.datetime()
|
|
@@ -3523,7 +3981,7 @@ export const zAssetsProductParameters = z.object({
|
|
|
3523
3981
|
type: z.enum(['serial', 'bulk']),
|
|
3524
3982
|
name: z.string(),
|
|
3525
3983
|
description: z.string().nullish(),
|
|
3526
|
-
|
|
3984
|
+
assets_category_id: z.string().nullish(),
|
|
3527
3985
|
upc: z.string().nullish(),
|
|
3528
3986
|
internal_sku: z.string().nullish(),
|
|
3529
3987
|
default_minimum_quantity: z.int().nullish(),
|
|
@@ -3534,10 +3992,11 @@ export const zAssetsProductParameters = z.object({
|
|
|
3534
3992
|
'pair',
|
|
3535
3993
|
'pack'
|
|
3536
3994
|
]).optional(),
|
|
3995
|
+
container: z.boolean().optional(),
|
|
3537
3996
|
attribute_values: z.array(z.object({
|
|
3538
|
-
|
|
3997
|
+
assets_attribute_id: z.string(),
|
|
3539
3998
|
value: z.string().nullish(),
|
|
3540
|
-
|
|
3999
|
+
assets_attribute_option_id: z.string().nullish()
|
|
3541
4000
|
})).optional(),
|
|
3542
4001
|
images_attributes: z.array(zAssetsAttachmentParameters).optional(),
|
|
3543
4002
|
performed_by_user_id: z.string()
|
|
@@ -3548,7 +4007,7 @@ export const zAssetsProductParameters = z.object({
|
|
|
3548
4007
|
export const zAssetsProductUpdateParameters = z.object({
|
|
3549
4008
|
name: z.string().optional(),
|
|
3550
4009
|
description: z.string().nullish(),
|
|
3551
|
-
|
|
4010
|
+
assets_category_id: z.string().nullish(),
|
|
3552
4011
|
upc: z.string().nullish(),
|
|
3553
4012
|
internal_sku: z.string().nullish(),
|
|
3554
4013
|
default_minimum_quantity: z.int().nullish(),
|
|
@@ -3559,10 +4018,11 @@ export const zAssetsProductUpdateParameters = z.object({
|
|
|
3559
4018
|
'pair',
|
|
3560
4019
|
'pack'
|
|
3561
4020
|
]).optional(),
|
|
4021
|
+
container: z.boolean().optional(),
|
|
3562
4022
|
attribute_values: z.array(z.object({
|
|
3563
|
-
|
|
4023
|
+
assets_attribute_id: z.string(),
|
|
3564
4024
|
value: z.string().nullish(),
|
|
3565
|
-
|
|
4025
|
+
assets_attribute_option_id: z.string().nullish()
|
|
3566
4026
|
})).optional(),
|
|
3567
4027
|
images_attributes: z.array(zAssetsAttachmentParameters).optional()
|
|
3568
4028
|
});
|
|
@@ -3577,8 +4037,6 @@ export const zAssetsItemParameters = z.object({
|
|
|
3577
4037
|
status: z.enum([
|
|
3578
4038
|
'available',
|
|
3579
4039
|
'assigned',
|
|
3580
|
-
'transit',
|
|
3581
|
-
'maintenance',
|
|
3582
4040
|
'retired'
|
|
3583
4041
|
]).optional(),
|
|
3584
4042
|
purchase_date: z.iso.datetime().optional(),
|
|
@@ -3588,6 +4046,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
3588
4046
|
images_attributes: z.array(zAssetsAttachmentParameters).optional(),
|
|
3589
4047
|
assets_site_id: z.string().optional(),
|
|
3590
4048
|
user_id: z.string().optional(),
|
|
4049
|
+
container_item_id: z.string().optional(),
|
|
3591
4050
|
performed_by_user_id: z.string()
|
|
3592
4051
|
});
|
|
3593
4052
|
/**
|
|
@@ -3595,7 +4054,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
3595
4054
|
*/
|
|
3596
4055
|
export const zAssetsDocumentResponseObject = z.object({
|
|
3597
4056
|
id: z.string(),
|
|
3598
|
-
|
|
4057
|
+
assets_item_id: z.string(),
|
|
3599
4058
|
name: z.string(),
|
|
3600
4059
|
filename: z.string().nullable(),
|
|
3601
4060
|
description: z.string().nullable(),
|
|
@@ -3637,7 +4096,7 @@ export const zAssetsDocumentVersionResponseObject = z.object({
|
|
|
3637
4096
|
*/
|
|
3638
4097
|
export const zAssetsItemFormAssignmentResponseObject = z.object({
|
|
3639
4098
|
id: z.string(),
|
|
3640
|
-
|
|
4099
|
+
assets_item_id: z.string(),
|
|
3641
4100
|
form_definition_id: z.string(),
|
|
3642
4101
|
name: z.string(),
|
|
3643
4102
|
description: z.string().nullable(),
|
|
@@ -3660,11 +4119,11 @@ export const zAssetsItemFormAssignmentResponseObject = z.object({
|
|
|
3660
4119
|
}))
|
|
3661
4120
|
});
|
|
3662
4121
|
/**
|
|
3663
|
-
* Create or update an item form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400).
|
|
4122
|
+
* Create or update an item form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400). recurring gates the recurrence fields.
|
|
3664
4123
|
*/
|
|
3665
4124
|
export const zAssetsItemFormAssignmentParameters = z.object({
|
|
3666
4125
|
form_definition_id: z.string(),
|
|
3667
|
-
|
|
4126
|
+
recurring: z.boolean().optional(),
|
|
3668
4127
|
task_attributes: z.object({
|
|
3669
4128
|
name: z.string().nullish(),
|
|
3670
4129
|
description: z.string().nullish(),
|
|
@@ -3693,7 +4152,7 @@ export const zAssetsItemFormAssignmentParameters = z.object({
|
|
|
3693
4152
|
*/
|
|
3694
4153
|
export const zAssetsInventoryResponseObject = z.object({
|
|
3695
4154
|
id: z.string(),
|
|
3696
|
-
|
|
4155
|
+
assets_item_id: z.string(),
|
|
3697
4156
|
assets_site_id: z.string(),
|
|
3698
4157
|
company_id: z.string(),
|
|
3699
4158
|
quantity_on_hand: z.int(),
|
|
@@ -3705,7 +4164,7 @@ export const zAssetsInventoryResponseObject = z.object({
|
|
|
3705
4164
|
*/
|
|
3706
4165
|
export const zAssetsCustodyResponseObject = z.object({
|
|
3707
4166
|
id: z.string(),
|
|
3708
|
-
|
|
4167
|
+
assets_item_id: z.string(),
|
|
3709
4168
|
user_id: z.string(),
|
|
3710
4169
|
company_id: z.string(),
|
|
3711
4170
|
quantity: z.int(),
|
|
@@ -3717,7 +4176,7 @@ export const zAssetsCustodyResponseObject = z.object({
|
|
|
3717
4176
|
*/
|
|
3718
4177
|
export const zAssetsTransactionEventResponseObject = z.object({
|
|
3719
4178
|
id: z.string(),
|
|
3720
|
-
|
|
4179
|
+
assets_item_id: z.string(),
|
|
3721
4180
|
company_id: z.string(),
|
|
3722
4181
|
event_type: z.enum(['Assets::Transaction']),
|
|
3723
4182
|
performed_at: z.iso.datetime(),
|
|
@@ -3725,7 +4184,8 @@ export const zAssetsTransactionEventResponseObject = z.object({
|
|
|
3725
4184
|
id: z.string(),
|
|
3726
4185
|
assets_site_id: z.string().nullable(),
|
|
3727
4186
|
assignee_id: z.string().nullable(),
|
|
3728
|
-
|
|
4187
|
+
container_item_id: z.string().nullable(),
|
|
4188
|
+
assets_transfer_id: z.string().nullable(),
|
|
3729
4189
|
performed_by_user_id: z.string(),
|
|
3730
4190
|
direction: z.enum(['inbound', 'outbound']),
|
|
3731
4191
|
kind: z.enum([
|
|
@@ -3743,7 +4203,7 @@ export const zAssetsTransactionEventResponseObject = z.object({
|
|
|
3743
4203
|
*/
|
|
3744
4204
|
export const zAssetsServiceEventResponseObject = z.object({
|
|
3745
4205
|
id: z.string(),
|
|
3746
|
-
|
|
4206
|
+
assets_item_id: z.string(),
|
|
3747
4207
|
company_id: z.string(),
|
|
3748
4208
|
event_type: z.enum(['Assets::ServiceEvent']),
|
|
3749
4209
|
performed_at: z.iso.datetime(),
|
|
@@ -3773,7 +4233,7 @@ export const zAssetsItemEventResponseObject = z.discriminatedUnion('event_type',
|
|
|
3773
4233
|
*/
|
|
3774
4234
|
export const zAssetsServiceScheduleResponseObject = z.object({
|
|
3775
4235
|
id: z.string(),
|
|
3776
|
-
|
|
4236
|
+
assets_item_id: z.string(),
|
|
3777
4237
|
company_id: z.string(),
|
|
3778
4238
|
assets_service_schedule_template_id: z.string().nullable(),
|
|
3779
4239
|
kind: z.enum(['calibration', 'maintenance']),
|
|
@@ -3811,7 +4271,7 @@ export const zAssetsServiceScheduleParameters = z.object({
|
|
|
3811
4271
|
*/
|
|
3812
4272
|
export const zAssetsServiceEventFullResponseObject = z.object({
|
|
3813
4273
|
id: z.string(),
|
|
3814
|
-
|
|
4274
|
+
assets_item_id: z.string(),
|
|
3815
4275
|
company_id: z.string(),
|
|
3816
4276
|
assets_service_schedule_id: z.string().nullable(),
|
|
3817
4277
|
performed_by_user_id: z.string(),
|
|
@@ -3876,7 +4336,7 @@ export const zAssetsServiceScheduleTemplateParameters = z.object({
|
|
|
3876
4336
|
performed_by_user_id: z.string()
|
|
3877
4337
|
});
|
|
3878
4338
|
/**
|
|
3879
|
-
* A completed movement of item stock between two holders
|
|
4339
|
+
* 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.
|
|
3880
4340
|
*/
|
|
3881
4341
|
export const zAssetsTransferResponseObject = z.object({
|
|
3882
4342
|
id: z.string(),
|
|
@@ -3889,29 +4349,33 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
3889
4349
|
]),
|
|
3890
4350
|
from_assets_site_id: z.string().nullable(),
|
|
3891
4351
|
from_user_id: z.string().nullable(),
|
|
4352
|
+
from_container_item_id: z.string().nullable(),
|
|
3892
4353
|
to_assets_site_id: z.string().nullable(),
|
|
3893
4354
|
to_user_id: z.string().nullable(),
|
|
4355
|
+
to_container_item_id: z.string().nullable(),
|
|
3894
4356
|
initiated_by_user_id: z.string(),
|
|
3895
4357
|
completed_at: z.iso.datetime().nullable(),
|
|
3896
4358
|
transfer_lines: z.array(z.object({
|
|
3897
4359
|
id: z.string(),
|
|
3898
|
-
|
|
4360
|
+
assets_item_id: z.string(),
|
|
3899
4361
|
quantity: z.int()
|
|
3900
4362
|
})),
|
|
3901
4363
|
created_at: z.iso.datetime(),
|
|
3902
4364
|
updated_at: z.iso.datetime()
|
|
3903
4365
|
});
|
|
3904
4366
|
/**
|
|
3905
|
-
*
|
|
4367
|
+
* 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.
|
|
3906
4368
|
*/
|
|
3907
4369
|
export const zAssetsTransferParameters = z.object({
|
|
3908
4370
|
from_assets_site_id: z.string().optional(),
|
|
3909
4371
|
from_user_id: z.string().optional(),
|
|
4372
|
+
from_container_item_id: z.string().optional(),
|
|
3910
4373
|
to_assets_site_id: z.string().optional(),
|
|
3911
4374
|
to_user_id: z.string().optional(),
|
|
4375
|
+
to_container_item_id: z.string().optional(),
|
|
3912
4376
|
performed_by_user_id: z.string(),
|
|
3913
4377
|
line_items: z.array(z.object({
|
|
3914
|
-
|
|
4378
|
+
assets_item_id: z.string(),
|
|
3915
4379
|
quantity: z.int().gte(1)
|
|
3916
4380
|
}))
|
|
3917
4381
|
});
|
|
@@ -4265,7 +4729,7 @@ export const zUpdateCategoryPath = z.object({
|
|
|
4265
4729
|
*/
|
|
4266
4730
|
export const zUpdateCategoryResponse = zAssetsCategoryResponseObject;
|
|
4267
4731
|
export const zListCustodiesQuery = z.object({
|
|
4268
|
-
'filter[
|
|
4732
|
+
'filter[assets_item_id]': z.string().optional(),
|
|
4269
4733
|
'filter[user_id]': z.string().optional(),
|
|
4270
4734
|
filter: z.string().optional(),
|
|
4271
4735
|
'filter[unexpected]': z.string().optional()
|
|
@@ -4286,7 +4750,7 @@ export const zGetCustodyPath = z.object({
|
|
|
4286
4750
|
*/
|
|
4287
4751
|
export const zGetCustodyResponse = zAssetsCustodyResponseObject;
|
|
4288
4752
|
export const zListEventsQuery = z.object({
|
|
4289
|
-
'filter[
|
|
4753
|
+
'filter[assets_item_id]': z.string().optional(),
|
|
4290
4754
|
'filter[eventable_type]': z.string().optional(),
|
|
4291
4755
|
filter: z.string().optional(),
|
|
4292
4756
|
'filter[unexpected]': z.string().optional()
|
|
@@ -4350,7 +4814,7 @@ export const zUpdateFormAssignmentTriggerPath = z.object({
|
|
|
4350
4814
|
*/
|
|
4351
4815
|
export const zUpdateFormAssignmentTriggerResponse = zAssetsFormAssignmentTriggerResponseObject;
|
|
4352
4816
|
export const zListInventoriesQuery = z.object({
|
|
4353
|
-
'filter[
|
|
4817
|
+
'filter[assets_item_id]': z.string().optional(),
|
|
4354
4818
|
'filter[assets_site_id]': z.string().optional(),
|
|
4355
4819
|
filter: z.string().optional(),
|
|
4356
4820
|
'filter[unexpected]': z.string().optional()
|
|
@@ -4373,6 +4837,12 @@ export const zGetInventoryResponse = zAssetsInventoryResponseObject;
|
|
|
4373
4837
|
export const zListItemsQuery = z.object({
|
|
4374
4838
|
'filter[assets_product_id]': z.string().optional(),
|
|
4375
4839
|
'filter[type]': z.string().optional(),
|
|
4840
|
+
'filter[assets_site_id]': z.string().optional(),
|
|
4841
|
+
'filter[user_id]': z.string().optional(),
|
|
4842
|
+
'filter[assets_category_id]': z.string().optional(),
|
|
4843
|
+
'filter[container_item_id]': z.string().optional(),
|
|
4844
|
+
'filter[status]': z.string().optional(),
|
|
4845
|
+
'filter[service]': z.string().optional(),
|
|
4376
4846
|
filter: z.string().optional(),
|
|
4377
4847
|
'filter[unexpected]': z.string().optional()
|
|
4378
4848
|
});
|
|
@@ -4643,7 +5113,7 @@ export const zListVersionsResponse = z.object({
|
|
|
4643
5113
|
data: z.array(zAssetsDocumentVersionResponseObject).optional()
|
|
4644
5114
|
});
|
|
4645
5115
|
export const zListProductsQuery = z.object({
|
|
4646
|
-
'filter[
|
|
5116
|
+
'filter[assets_category_id]': z.string().optional(),
|
|
4647
5117
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
4648
5118
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
4649
5119
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -4758,7 +5228,7 @@ export const zUpdateServiceScheduleTemplatePath = z.object({
|
|
|
4758
5228
|
*/
|
|
4759
5229
|
export const zUpdateServiceScheduleTemplateResponse = zAssetsServiceScheduleTemplateResponseObject;
|
|
4760
5230
|
export const zSeedServiceScheduleTemplateBody = z.object({
|
|
4761
|
-
|
|
5231
|
+
assets_item_ids: z.array(z.string()).optional(),
|
|
4762
5232
|
performed_by_user_id: z.string()
|
|
4763
5233
|
});
|
|
4764
5234
|
export const zSeedServiceScheduleTemplatePath = z.object({
|
|
@@ -4847,10 +5317,10 @@ export const zListTransfersResponse = z.object({
|
|
|
4847
5317
|
data: z.array(zAssetsTransferResponseObject).optional()
|
|
4848
5318
|
});
|
|
4849
5319
|
export const zCreateTransferBody = zAssetsTransferParameters;
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
5320
|
+
export const zCreateTransferResponse = z.union([
|
|
5321
|
+
zAssetsTransferResponseObject,
|
|
5322
|
+
z.void()
|
|
5323
|
+
]);
|
|
4854
5324
|
export const zGetTransferPath = z.object({
|
|
4855
5325
|
id: z.string()
|
|
4856
5326
|
});
|
|
@@ -5156,6 +5626,14 @@ export const zGetCompanyPath = z.object({
|
|
|
5156
5626
|
* Success
|
|
5157
5627
|
*/
|
|
5158
5628
|
export const zGetCompanyResponse = zCompanyResponseObject;
|
|
5629
|
+
export const zUpdateCompanyProfileBody = zCompanyParameters;
|
|
5630
|
+
export const zUpdateCompanyProfilePath = z.object({
|
|
5631
|
+
id: z.string()
|
|
5632
|
+
});
|
|
5633
|
+
/**
|
|
5634
|
+
* Success
|
|
5635
|
+
*/
|
|
5636
|
+
export const zUpdateCompanyProfileResponse = zCompanyResponseObject;
|
|
5159
5637
|
export const zListChecksQuery = z.object({
|
|
5160
5638
|
'filter[status]': z.enum([
|
|
5161
5639
|
'passed',
|
|
@@ -5168,7 +5646,7 @@ export const zListChecksQuery = z.object({
|
|
|
5168
5646
|
'filter[job_id]': z.string().optional(),
|
|
5169
5647
|
'filter[job_id][null]': z.boolean().optional(),
|
|
5170
5648
|
'filter[project_id]': z.string().optional(),
|
|
5171
|
-
'filter[
|
|
5649
|
+
'filter[compliances_requirement_id]': z.string().optional(),
|
|
5172
5650
|
'filter[time_due][gte]': z.iso.datetime().optional(),
|
|
5173
5651
|
'filter[time_due][lte]': z.iso.datetime().optional(),
|
|
5174
5652
|
filter: z.string().optional(),
|
|
@@ -5582,6 +6060,39 @@ export const zUpdateJobPath = z.object({
|
|
|
5582
6060
|
* Success
|
|
5583
6061
|
*/
|
|
5584
6062
|
export const zUpdateJobResponse = zJobResponseObject;
|
|
6063
|
+
export const zListSiteCheckInsPath = z.object({
|
|
6064
|
+
site_id: z.string()
|
|
6065
|
+
});
|
|
6066
|
+
export const zListSiteCheckInsQuery = z.object({
|
|
6067
|
+
'filter[user_id]': z.string().optional(),
|
|
6068
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
6069
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
6070
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
6071
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
6072
|
+
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
6073
|
+
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
6074
|
+
filter: z.string().optional(),
|
|
6075
|
+
'filter[unexpected]': z.string().optional(),
|
|
6076
|
+
'page[cursor]': z.string().optional(),
|
|
6077
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
6078
|
+
page: z.string().optional()
|
|
6079
|
+
});
|
|
6080
|
+
/**
|
|
6081
|
+
* Success
|
|
6082
|
+
*/
|
|
6083
|
+
export const zListSiteCheckInsResponse = z.object({
|
|
6084
|
+
meta: zMeta,
|
|
6085
|
+
links: zLinks,
|
|
6086
|
+
data: z.array(zSiteCheckInResponseObject)
|
|
6087
|
+
});
|
|
6088
|
+
export const zGetSiteCheckInPath = z.object({
|
|
6089
|
+
site_id: z.string(),
|
|
6090
|
+
id: z.string()
|
|
6091
|
+
});
|
|
6092
|
+
/**
|
|
6093
|
+
* Success
|
|
6094
|
+
*/
|
|
6095
|
+
export const zGetSiteCheckInResponse = zSiteCheckInResponseObject;
|
|
5585
6096
|
export const zListPayPeriodsQuery = z.object({
|
|
5586
6097
|
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
5587
6098
|
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
@@ -5705,7 +6216,7 @@ export const zUpdateFringeBenefitPlanPath = z.object({
|
|
|
5705
6216
|
export const zUpdateFringeBenefitPlanResponse = zPayrollFringeBenefitPlanResponseObject;
|
|
5706
6217
|
export const zListPayrollRunsQuery = z.object({
|
|
5707
6218
|
'filter[run_type]': z.string().optional(),
|
|
5708
|
-
'filter[
|
|
6219
|
+
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
5709
6220
|
'filter[run_date][gte]': z.iso.date().optional(),
|
|
5710
6221
|
'filter[run_date][lte]': z.iso.date().optional(),
|
|
5711
6222
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
@@ -5750,7 +6261,7 @@ export const zUpdatePayrollRunPath = z.object({
|
|
|
5750
6261
|
*/
|
|
5751
6262
|
export const zUpdatePayrollRunResponse = zPayrollRunResponseObject;
|
|
5752
6263
|
export const zListPaystubLineItemsQuery = z.object({
|
|
5753
|
-
'filter[
|
|
6264
|
+
'filter[payrolls_paystub_id]': z.string().optional(),
|
|
5754
6265
|
filter: z.string().optional(),
|
|
5755
6266
|
'filter[unexpected]': z.string().optional(),
|
|
5756
6267
|
'page[cursor]': z.string().optional(),
|
|
@@ -5789,9 +6300,9 @@ export const zUpdatePaystubLineItemPath = z.object({
|
|
|
5789
6300
|
*/
|
|
5790
6301
|
export const zUpdatePaystubLineItemResponse = zPaystubLineItemResponseObject;
|
|
5791
6302
|
export const zListPaystubsQuery = z.object({
|
|
5792
|
-
'filter[
|
|
6303
|
+
'filter[payrolls_payroll_run_id]': z.string().optional(),
|
|
5793
6304
|
'filter[user_id]': z.string().optional(),
|
|
5794
|
-
'filter[
|
|
6305
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
5795
6306
|
filter: z.string().optional(),
|
|
5796
6307
|
'filter[unexpected]': z.string().optional(),
|
|
5797
6308
|
'page[cursor]': z.string().optional(),
|
|
@@ -5830,7 +6341,7 @@ export const zUpdatePaystubPath = z.object({
|
|
|
5830
6341
|
*/
|
|
5831
6342
|
export const zUpdatePaystubResponse = zPaystubResponseObject;
|
|
5832
6343
|
export const zListPerDiemsQuery = z.object({
|
|
5833
|
-
'filter[
|
|
6344
|
+
'filter[default]': z.boolean().optional(),
|
|
5834
6345
|
'filter[taxable]': z.boolean().optional(),
|
|
5835
6346
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
5836
6347
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
@@ -6078,7 +6589,7 @@ export const zGetTradeResponse = zPwaTradeResponseObject;
|
|
|
6078
6589
|
export const zCreateFormAssignmentTaskBody = z.object({
|
|
6079
6590
|
form_definition_id: z.string(),
|
|
6080
6591
|
spread_assignees: z.boolean().optional(),
|
|
6081
|
-
|
|
6592
|
+
recurring: z.boolean().optional(),
|
|
6082
6593
|
task_attributes: z.object({
|
|
6083
6594
|
name: z.string(),
|
|
6084
6595
|
description: z.string().optional(),
|
|
@@ -6236,7 +6747,7 @@ export const zCreateWorkerTimeCardApprovalPath = z.object({
|
|
|
6236
6747
|
*/
|
|
6237
6748
|
export const zCreateWorkerTimeCardApprovalResponse = zTimeCardApprovalResponseObject;
|
|
6238
6749
|
export const zListTimeCardsQuery = z.object({
|
|
6239
|
-
'filter[
|
|
6750
|
+
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
6240
6751
|
'filter[user_id]': z.string().optional(),
|
|
6241
6752
|
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
6242
6753
|
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
@@ -6279,7 +6790,7 @@ export const zListTimeEntriesQuery = z.object({
|
|
|
6279
6790
|
'filter[user_id]': z.string().optional(),
|
|
6280
6791
|
'filter[job_id]': z.string().optional(),
|
|
6281
6792
|
'filter[job_id][null]': z.boolean().optional(),
|
|
6282
|
-
'filter[
|
|
6793
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
6283
6794
|
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
6284
6795
|
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
6285
6796
|
'filter[end_time][gte]': z.iso.datetime().optional(),
|
|
@@ -6391,14 +6902,6 @@ export const zCreateTimecodeBody = zTimecodeParameters;
|
|
|
6391
6902
|
* Created with effective_date
|
|
6392
6903
|
*/
|
|
6393
6904
|
export const zCreateTimecodeResponse = zTimecodeResponseObject;
|
|
6394
|
-
export const zTerminateTimecodeBody = zTimecodeTerminationParameters;
|
|
6395
|
-
export const zTerminateTimecodePath = z.object({
|
|
6396
|
-
id: z.string()
|
|
6397
|
-
});
|
|
6398
|
-
/**
|
|
6399
|
-
* Success
|
|
6400
|
-
*/
|
|
6401
|
-
export const zTerminateTimecodeResponse = zTimecodeResponseObject;
|
|
6402
6905
|
export const zGetTimecodePath = z.object({
|
|
6403
6906
|
id: z.string()
|
|
6404
6907
|
});
|
|
@@ -6419,9 +6922,9 @@ export const zUpdateTimecodePath = z.object({
|
|
|
6419
6922
|
*/
|
|
6420
6923
|
export const zUpdateTimecodeResponse = zTimecodeResponseObject;
|
|
6421
6924
|
export const zListJobTimeCardDaysQuery = z.object({
|
|
6422
|
-
'filter[
|
|
6925
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
6423
6926
|
'filter[job_id]': z.string().optional(),
|
|
6424
|
-
'filter[
|
|
6927
|
+
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
6425
6928
|
'filter[date][gte]': z.iso.date().optional(),
|
|
6426
6929
|
'filter[date][lte]': z.iso.date().optional(),
|
|
6427
6930
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
@@ -6580,7 +7083,7 @@ export const zGetPayPeriodConfigQuery = z.object({
|
|
|
6580
7083
|
*/
|
|
6581
7084
|
export const zGetPayPeriodConfigResponse = zPayPeriodConfigResponseObject;
|
|
6582
7085
|
export const zListTimeCardActualsQuery = z.object({
|
|
6583
|
-
'filter[
|
|
7086
|
+
'filter[timekeeping_time_card_id]': z.string().optional(),
|
|
6584
7087
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
6585
7088
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
6586
7089
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|