@dsptch-work/api-client 0.35.0 → 0.37.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 +329 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +202 -24
- package/dist/gen/sdk.gen.js +296 -29
- package/dist/gen/types.gen.d.ts +1799 -688
- package/dist/gen/zod.gen.d.ts +1669 -1178
- package/dist/gen/zod.gen.js +1087 -718
- package/package.json +1 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -288,12 +288,6 @@ export const zProblem = z.object({
|
|
|
288
288
|
*
|
|
289
289
|
* An attachment signed id names no upload this endpoint can read. A signed id is issued for one `resource` and verifies only there, so an id for a different resource is indistinguishable from one that is malformed, expired, or tampered with, and all of them answer alike. The message names the resource the upload needed; upload the file again to the direct-uploads endpoint naming it, and pass the signed id that call returns.
|
|
290
290
|
*
|
|
291
|
-
* ### non_numeric_cents
|
|
292
|
-
*
|
|
293
|
-
* **Non-Numeric Money Value**
|
|
294
|
-
*
|
|
295
|
-
* A money parameter is not a numeric value in cents. Send money as a numeric cents value.
|
|
296
|
-
*
|
|
297
291
|
* ### nothing_to_cancel
|
|
298
292
|
*
|
|
299
293
|
* **Nothing To Cancel**
|
|
@@ -418,7 +412,6 @@ export const zProblemTypeCatalog = z.enum([
|
|
|
418
412
|
'invalid_iso8601_duration',
|
|
419
413
|
'invalid_placement_move',
|
|
420
414
|
'invalid_signed_id',
|
|
421
|
-
'non_numeric_cents',
|
|
422
415
|
'nothing_to_cancel',
|
|
423
416
|
'pagination_failed',
|
|
424
417
|
'subtype_foreign_keys',
|
|
@@ -457,11 +450,13 @@ export const zDirectUploadParameters = z.object({
|
|
|
457
450
|
'internal.company_todos',
|
|
458
451
|
'internal.job_todos',
|
|
459
452
|
'internal.project_todos',
|
|
453
|
+
'jobs.documents',
|
|
460
454
|
'pay_periods.imports.aggregate_times',
|
|
461
455
|
'pay_periods.imports.dsptch_cprs',
|
|
462
456
|
'pay_periods.imports.time_entries',
|
|
463
457
|
'payrolls.payroll_runs.imports.paystubs',
|
|
464
458
|
'payrolls.payroll_runs.imports.wide_paystubs',
|
|
459
|
+
'projects.documents',
|
|
465
460
|
'users'
|
|
466
461
|
]),
|
|
467
462
|
blob: z.object({
|
|
@@ -604,7 +599,7 @@ export const zCompetencyCriterionResponseObject = z.object({
|
|
|
604
599
|
number: z.string().nullable(),
|
|
605
600
|
body: z.string().nullable(),
|
|
606
601
|
evidence_note: z.string().nullable(),
|
|
607
|
-
|
|
602
|
+
assessment_methods: z.array(z.enum([
|
|
608
603
|
'direct_observation',
|
|
609
604
|
'simulation',
|
|
610
605
|
'oral_questioning',
|
|
@@ -613,7 +608,7 @@ export const zCompetencyCriterionResponseObject = z.object({
|
|
|
613
608
|
'recognized_prior_learning',
|
|
614
609
|
'witness_testimony',
|
|
615
610
|
'other'
|
|
616
|
-
])
|
|
611
|
+
])),
|
|
617
612
|
created_at: z.iso.datetime(),
|
|
618
613
|
updated_at: z.iso.datetime()
|
|
619
614
|
});
|
|
@@ -624,7 +619,7 @@ export const zCompetencyCriterionParameters = z.object({
|
|
|
624
619
|
number: z.string().nullish(),
|
|
625
620
|
body: z.string().nullish(),
|
|
626
621
|
evidence_note: z.string().nullish(),
|
|
627
|
-
|
|
622
|
+
assessment_methods: z.array(z.enum([
|
|
628
623
|
'direct_observation',
|
|
629
624
|
'simulation',
|
|
630
625
|
'oral_questioning',
|
|
@@ -633,7 +628,7 @@ export const zCompetencyCriterionParameters = z.object({
|
|
|
633
628
|
'recognized_prior_learning',
|
|
634
629
|
'witness_testimony',
|
|
635
630
|
'other'
|
|
636
|
-
]).
|
|
631
|
+
])).optional()
|
|
637
632
|
});
|
|
638
633
|
/**
|
|
639
634
|
* Swap a draft catalog row with its neighbor. The row cannot move past either end of the list.
|
|
@@ -720,12 +715,12 @@ export const zCompetencyAssessmentResponseObject = z.object({
|
|
|
720
715
|
updated_at: z.iso.datetime()
|
|
721
716
|
});
|
|
722
717
|
/**
|
|
723
|
-
* One
|
|
718
|
+
* One criterion line on an assessment. decision and qa_feedback are omitted, not null, when the caller is the candidate and the package is not yet decided.
|
|
724
719
|
*/
|
|
725
|
-
export const
|
|
720
|
+
export const zCompetencyAssessmentCriterionResponseObject = z.object({
|
|
726
721
|
id: z.string(),
|
|
727
722
|
competencies_assessment_id: z.string(),
|
|
728
|
-
|
|
723
|
+
competencies_criterion_id: z.string(),
|
|
729
724
|
assessment_methods: z.array(z.enum([
|
|
730
725
|
'direct_observation',
|
|
731
726
|
'simulation',
|
|
@@ -756,7 +751,7 @@ export const zCompetencyAssessmentKeyActivityResponseObject = z.object({
|
|
|
756
751
|
*/
|
|
757
752
|
export const zCompetencyEvidenceItemResponseObject = z.object({
|
|
758
753
|
id: z.string(),
|
|
759
|
-
|
|
754
|
+
competencies_assessment_criterion_id: z.string(),
|
|
760
755
|
kind: z.enum([
|
|
761
756
|
'upload',
|
|
762
757
|
'form_submission',
|
|
@@ -1039,38 +1034,38 @@ export const zApprenticeshipProgramEmployerUpdateParameters = z.object({
|
|
|
1039
1034
|
require_timecard_allocation: z.boolean().optional()
|
|
1040
1035
|
});
|
|
1041
1036
|
/**
|
|
1042
|
-
* Create a period on a wage schedule; the wage schedule is taken from the URL path.
|
|
1037
|
+
* Create a period on a wage schedule; the wage schedule is taken from the URL path. wage_percent and fringe_percent are sent as decimal strings (e.g. "62.5"), and wage_cents and fringe_cents as cents in a decimal string (e.g. "2800" or "2800.0"). Omitting period_number, wage_percent, or wage_cents answers 400. A wrong JSON type, a negative number, or a null for any field but min_minutes, max_minutes, num_competencies, description, fringe_percent, and fringe_cents answers 422 at that field; a null in one of those leaves it unset, but a period with none of min_minutes, max_minutes, or num_competencies answers 422.
|
|
1043
1038
|
*/
|
|
1044
1039
|
export const zApprenticeshipWageSchedulePeriodParameters = z.object({
|
|
1045
|
-
period_number: z.int(),
|
|
1046
|
-
min_minutes: z.int().nullish(),
|
|
1047
|
-
max_minutes: z.int().nullish(),
|
|
1048
|
-
num_competencies: z.int().nullish(),
|
|
1040
|
+
period_number: z.int().gte(0),
|
|
1041
|
+
min_minutes: z.int().gte(0).nullish(),
|
|
1042
|
+
max_minutes: z.int().gte(0).nullish(),
|
|
1043
|
+
num_competencies: z.int().gte(0).nullish(),
|
|
1049
1044
|
description: z.string().nullish(),
|
|
1050
|
-
wage_percent: z.
|
|
1051
|
-
wage_cents: z.
|
|
1052
|
-
fringe_percent: z.
|
|
1053
|
-
fringe_cents: z.
|
|
1045
|
+
wage_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
1046
|
+
wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
1047
|
+
fringe_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1048
|
+
fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
1054
1049
|
});
|
|
1055
1050
|
/**
|
|
1056
|
-
* Update a period on a wage schedule. Send only the fields to change; the wage schedule is taken from the URL path, and wage_cents and fringe_cents
|
|
1051
|
+
* Update a period on a wage schedule. Send only the fields to change; the wage schedule is taken from the URL path, wage_percent and fringe_percent are sent as decimal strings (e.g. "62.5"), and wage_cents and fringe_cents as cents in a decimal string (e.g. "2800" or "2800.0"). A wrong JSON type, a negative number, or a null for any field but min_minutes, max_minutes, num_competencies, description, fringe_percent, and fringe_cents answers 422 at that field; a null in one of those clears it, but a period left with none of min_minutes, max_minutes, or num_competencies answers 422.
|
|
1057
1052
|
*/
|
|
1058
1053
|
export const zApprenticeshipWageSchedulePeriodUpdateParameters = z.object({
|
|
1059
|
-
period_number: z.int().optional(),
|
|
1060
|
-
min_minutes: z.int().nullish(),
|
|
1061
|
-
max_minutes: z.int().nullish(),
|
|
1062
|
-
num_competencies: z.int().nullish(),
|
|
1054
|
+
period_number: z.int().gte(0).optional(),
|
|
1055
|
+
min_minutes: z.int().gte(0).nullish(),
|
|
1056
|
+
max_minutes: z.int().gte(0).nullish(),
|
|
1057
|
+
num_competencies: z.int().gte(0).nullish(),
|
|
1063
1058
|
description: z.string().nullish(),
|
|
1064
|
-
wage_percent: z.
|
|
1065
|
-
wage_cents: z.
|
|
1066
|
-
fringe_percent: z.
|
|
1067
|
-
fringe_cents: z.
|
|
1059
|
+
wage_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1060
|
+
wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1061
|
+
fringe_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1062
|
+
fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
1068
1063
|
});
|
|
1069
1064
|
/**
|
|
1070
|
-
* Create a wage schedule for an occupation; the occupation is taken from the URL path. Money is sent as
|
|
1065
|
+
* Create a wage schedule for an occupation; the occupation is taken from the URL path. Money is sent as cents in a decimal string (e.g. "2800" or "2800.0"); periods may be created inline via periods_attributes. Omitting name, wage_unit, journeyworker_wage_unit, or period_unit answers 400. A blank name, a unit outside its listed values, a wrong JSON type, or a null for any field but description and journeyworker_fringe_cents answers 422; a null in either of those leaves the field unset.
|
|
1071
1066
|
*/
|
|
1072
1067
|
export const zApprenticeshipWageScheduleParameters = z.object({
|
|
1073
|
-
name: z.string(),
|
|
1068
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
1074
1069
|
description: z.string().nullish(),
|
|
1075
1070
|
wage_unit: z.enum([
|
|
1076
1071
|
'hourly',
|
|
@@ -1096,28 +1091,28 @@ export const zApprenticeshipWageScheduleParameters = z.object({
|
|
|
1096
1091
|
'semi_annual',
|
|
1097
1092
|
'year'
|
|
1098
1093
|
]),
|
|
1099
|
-
journeyworker_wage_cents: z.
|
|
1100
|
-
journeyworker_fringe_cents: z.
|
|
1101
|
-
end_wage_cents: z.
|
|
1094
|
+
journeyworker_wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1095
|
+
journeyworker_fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1096
|
+
end_wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1102
1097
|
periods_attributes: z.array(z.object({
|
|
1103
1098
|
id: z.string().optional(),
|
|
1104
|
-
period_number: z.int(),
|
|
1105
|
-
min_minutes: z.int().nullish(),
|
|
1106
|
-
max_minutes: z.int().nullish(),
|
|
1107
|
-
num_competencies: z.int().nullish(),
|
|
1099
|
+
period_number: z.int().gte(0).optional(),
|
|
1100
|
+
min_minutes: z.int().gte(0).nullish(),
|
|
1101
|
+
max_minutes: z.int().gte(0).nullish(),
|
|
1102
|
+
num_competencies: z.int().gte(0).nullish(),
|
|
1108
1103
|
description: z.string().nullish(),
|
|
1109
|
-
wage_percent: z.
|
|
1110
|
-
wage_cents: z.
|
|
1111
|
-
fringe_percent: z.
|
|
1112
|
-
fringe_cents: z.
|
|
1104
|
+
wage_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1105
|
+
wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1106
|
+
fringe_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1107
|
+
fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1113
1108
|
_destroy: z.boolean().optional()
|
|
1114
1109
|
})).optional()
|
|
1115
1110
|
});
|
|
1116
1111
|
/**
|
|
1117
|
-
* Update a wage schedule for an occupation. Send only the fields to change; money is sent as
|
|
1112
|
+
* Update a wage schedule for an occupation. Send only the fields to change; money is sent as cents in a decimal string (e.g. "2800" or "2800.0") and periods may be created, updated, or removed inline via periods_attributes. A blank name, a unit outside its listed values, a wrong JSON type, or a null for any field but description and journeyworker_fringe_cents answers 422; a null in either of those clears the field.
|
|
1118
1113
|
*/
|
|
1119
1114
|
export const zApprenticeshipWageScheduleUpdateParameters = z.object({
|
|
1120
|
-
name: z.string().optional(),
|
|
1115
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1121
1116
|
description: z.string().nullish(),
|
|
1122
1117
|
wage_unit: z.enum([
|
|
1123
1118
|
'hourly',
|
|
@@ -1143,38 +1138,22 @@ export const zApprenticeshipWageScheduleUpdateParameters = z.object({
|
|
|
1143
1138
|
'semi_annual',
|
|
1144
1139
|
'year'
|
|
1145
1140
|
]).optional(),
|
|
1146
|
-
journeyworker_wage_cents: z.
|
|
1147
|
-
journeyworker_fringe_cents: z.
|
|
1148
|
-
end_wage_cents: z.
|
|
1149
|
-
periods_attributes: z.array(z.
|
|
1150
|
-
z.unknown(),
|
|
1151
|
-
z.union([
|
|
1152
|
-
z.object({
|
|
1153
|
-
min_minutes: z.int()
|
|
1154
|
-
}),
|
|
1155
|
-
z.object({
|
|
1156
|
-
max_minutes: z.int()
|
|
1157
|
-
}),
|
|
1158
|
-
z.object({
|
|
1159
|
-
num_competencies: z.int()
|
|
1160
|
-
})
|
|
1161
|
-
]),
|
|
1162
|
-
z.object({
|
|
1163
|
-
_destroy: z.literal(true)
|
|
1164
|
-
})
|
|
1165
|
-
]), z.object({
|
|
1141
|
+
journeyworker_wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1142
|
+
journeyworker_fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1143
|
+
end_wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1144
|
+
periods_attributes: z.array(z.object({
|
|
1166
1145
|
id: z.string().optional(),
|
|
1167
|
-
period_number: z.int().optional(),
|
|
1168
|
-
min_minutes: z.int().nullish(),
|
|
1169
|
-
max_minutes: z.int().nullish(),
|
|
1170
|
-
num_competencies: z.int().nullish(),
|
|
1146
|
+
period_number: z.int().gte(0).optional(),
|
|
1147
|
+
min_minutes: z.int().gte(0).nullish(),
|
|
1148
|
+
max_minutes: z.int().gte(0).nullish(),
|
|
1149
|
+
num_competencies: z.int().gte(0).nullish(),
|
|
1171
1150
|
description: z.string().nullish(),
|
|
1172
|
-
wage_percent: z.
|
|
1173
|
-
wage_cents: z.
|
|
1174
|
-
fringe_percent: z.
|
|
1175
|
-
fringe_cents: z.
|
|
1151
|
+
wage_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1152
|
+
wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1153
|
+
fringe_percent: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1154
|
+
fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1176
1155
|
_destroy: z.boolean().optional()
|
|
1177
|
-
}))
|
|
1156
|
+
})).optional()
|
|
1178
1157
|
});
|
|
1179
1158
|
/**
|
|
1180
1159
|
* A work-type classification that determines how tracked time is treated — paid vs unpaid, overtime-eligible, billable, PWA/prevailing-wage-eligible, holiday, PTO, or rest-and-recovery — versioned bitemporally so each version carries its own validity window.
|
|
@@ -1253,16 +1232,16 @@ export const zPeopleEmploymentCreateParameters = z.object({
|
|
|
1253
1232
|
payroll_id: z.string().nullish(),
|
|
1254
1233
|
enrolled_in_t_and_a: z.boolean().optional(),
|
|
1255
1234
|
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
1256
|
-
hourly_rate_cents: z.string().nullish(),
|
|
1235
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1257
1236
|
overtime_eligible: z.boolean().nullish(),
|
|
1258
1237
|
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
1259
1238
|
worked_annual_minutes: z.int().nullish(),
|
|
1260
1239
|
pto_annual_minutes: z.int().nullish(),
|
|
1261
1240
|
holiday_annual_minutes: z.int().nullish(),
|
|
1262
1241
|
training_annual_minutes: z.int().nullish(),
|
|
1263
|
-
training_annual_amount_cents: z.string().nullish(),
|
|
1264
|
-
employer_combined_health_amount_cents: z.string().nullish(),
|
|
1265
|
-
employer_combined_savings_cents: z.string().nullish()
|
|
1242
|
+
training_annual_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1243
|
+
employer_combined_health_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1244
|
+
employer_combined_savings_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
1266
1245
|
});
|
|
1267
1246
|
/**
|
|
1268
1247
|
* Request body for creating one employment boundary. effective_date is required and is interpreted at midnight in the credential company's time zone. Today and past dates must fall inside the family's latest version, before its termination; future dates retain scheduling behavior. Send at least one value to change; omitted values carry forward from the version immediately before the new boundary.
|
|
@@ -1270,16 +1249,16 @@ export const zPeopleEmploymentCreateParameters = z.object({
|
|
|
1270
1249
|
export const zPeopleEmploymentScheduledChangeCreateParameters = z.object({
|
|
1271
1250
|
effective_date: z.iso.date(),
|
|
1272
1251
|
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
1273
|
-
hourly_rate_cents: z.string().nullish(),
|
|
1252
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1274
1253
|
overtime_eligible: z.boolean().nullish(),
|
|
1275
1254
|
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
1276
1255
|
worked_annual_minutes: z.int().nullish(),
|
|
1277
1256
|
pto_annual_minutes: z.int().nullish(),
|
|
1278
1257
|
holiday_annual_minutes: z.int().nullish(),
|
|
1279
1258
|
training_annual_minutes: z.int().nullish(),
|
|
1280
|
-
training_annual_amount_cents: z.string().nullish(),
|
|
1281
|
-
employer_combined_health_amount_cents: z.string().nullish(),
|
|
1282
|
-
employer_combined_savings_cents: z.string().nullish(),
|
|
1259
|
+
training_annual_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1260
|
+
employer_combined_health_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1261
|
+
employer_combined_savings_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1283
1262
|
companies_department_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
1284
1263
|
});
|
|
1285
1264
|
/**
|
|
@@ -1287,16 +1266,16 @@ export const zPeopleEmploymentScheduledChangeCreateParameters = z.object({
|
|
|
1287
1266
|
*/
|
|
1288
1267
|
export const zPeopleEmploymentScheduledChangeUpdateParameters = z.object({
|
|
1289
1268
|
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
1290
|
-
hourly_rate_cents: z.string().nullish(),
|
|
1269
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1291
1270
|
overtime_eligible: z.boolean().nullish(),
|
|
1292
1271
|
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
1293
1272
|
worked_annual_minutes: z.int().nullish(),
|
|
1294
1273
|
pto_annual_minutes: z.int().nullish(),
|
|
1295
1274
|
holiday_annual_minutes: z.int().nullish(),
|
|
1296
1275
|
training_annual_minutes: z.int().nullish(),
|
|
1297
|
-
training_annual_amount_cents: z.string().nullish(),
|
|
1298
|
-
employer_combined_health_amount_cents: z.string().nullish(),
|
|
1299
|
-
employer_combined_savings_cents: z.string().nullish(),
|
|
1276
|
+
training_annual_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1277
|
+
employer_combined_health_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1278
|
+
employer_combined_savings_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1300
1279
|
companies_department_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
1301
1280
|
});
|
|
1302
1281
|
/**
|
|
@@ -1326,7 +1305,7 @@ export const zPeopleEmploymentUpdateParameters = z.object({
|
|
|
1326
1305
|
*/
|
|
1327
1306
|
export const zPeopleEmploymentCustomFieldsUpdateParameters = z.object({
|
|
1328
1307
|
custom_fields: z.array(z.object({
|
|
1329
|
-
custom_field_config_id: z.string(),
|
|
1308
|
+
custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
1330
1309
|
value: z.string().nullable()
|
|
1331
1310
|
})).min(1)
|
|
1332
1311
|
});
|
|
@@ -1464,7 +1443,8 @@ export const zTimecodeHistoryVersionObject = z.object({
|
|
|
1464
1443
|
* Request body for creating or updating a timecode; only `name` is required. On create, omitted fields take their model/DB defaults (noted per field). On update the request applies a bitemporal correction, so omitted fields keep the current version's values rather than reverting to defaults.
|
|
1465
1444
|
*/
|
|
1466
1445
|
export const zTimecodeParameters = z.object({
|
|
1467
|
-
|
|
1446
|
+
effective_date: z.string().optional(),
|
|
1447
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
1468
1448
|
description: z.string().nullish(),
|
|
1469
1449
|
description_is_required: z.boolean().optional(),
|
|
1470
1450
|
billable: z.boolean().optional(),
|
|
@@ -1483,16 +1463,15 @@ export const zTimecodeParameters = z.object({
|
|
|
1483
1463
|
'job',
|
|
1484
1464
|
'non_job',
|
|
1485
1465
|
'job_with_timecode'
|
|
1486
|
-
]).optional()
|
|
1487
|
-
effective_date: z.iso.datetime().optional()
|
|
1466
|
+
]).optional()
|
|
1488
1467
|
});
|
|
1489
1468
|
/**
|
|
1490
1469
|
* Request body for correcting a timecode over a valid-time span. Send only the fields to change; omitted fields retain their current values. `effective_from` defaults to the addressed version's start, and `effective_to` is optional.
|
|
1491
1470
|
*/
|
|
1492
1471
|
export const zTimecodeCorrectionParameters = z.object({
|
|
1493
|
-
effective_from: z.
|
|
1494
|
-
effective_to: z.
|
|
1495
|
-
name: z.string().
|
|
1472
|
+
effective_from: z.string().optional(),
|
|
1473
|
+
effective_to: z.string().optional(),
|
|
1474
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1496
1475
|
description: z.string().nullish(),
|
|
1497
1476
|
description_is_required: z.boolean().optional(),
|
|
1498
1477
|
billable: z.boolean().optional(),
|
|
@@ -1517,7 +1496,7 @@ export const zTimecodeCorrectionParameters = z.object({
|
|
|
1517
1496
|
* Request body for moving the beginning of a timecode's valid-time timeline. Moving it earlier extends coverage; moving it later removes coverage before the new beginning.
|
|
1518
1497
|
*/
|
|
1519
1498
|
export const zTimecodeGenesisParameters = z.object({
|
|
1520
|
-
effective_date: z.
|
|
1499
|
+
effective_date: z.string()
|
|
1521
1500
|
});
|
|
1522
1501
|
/**
|
|
1523
1502
|
* Request body for scheduling a timecode's termination: the date from which it stops being valid. The body is required — the endpoint reads effective_date with `params.expect`, so a request omitting it is refused with `400`.
|
|
@@ -1526,11 +1505,11 @@ export const zTimecodeScheduledTerminationParameters = z.object({
|
|
|
1526
1505
|
effective_date: z.iso.datetime()
|
|
1527
1506
|
});
|
|
1528
1507
|
/**
|
|
1529
|
-
* 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`
|
|
1508
|
+
* Request body for scheduling a future change to a timecode: an effective_date paired with the attribute values to apply from that date. Only `effective_date` is required; omitted attributes inherit the current version's values.
|
|
1530
1509
|
*/
|
|
1531
1510
|
export const zTimecodeScheduledChangeParameters = z.object({
|
|
1532
|
-
effective_date: z.
|
|
1533
|
-
name: z.string(),
|
|
1511
|
+
effective_date: z.string(),
|
|
1512
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1534
1513
|
description: z.string().nullish(),
|
|
1535
1514
|
description_is_required: z.boolean().optional(),
|
|
1536
1515
|
billable: z.boolean().optional(),
|
|
@@ -1634,7 +1613,7 @@ export const zPerDiemResponseObject = z.object({
|
|
|
1634
1613
|
export const zPerDiemParameters = z.object({
|
|
1635
1614
|
name: z.string(),
|
|
1636
1615
|
description: z.string().nullish(),
|
|
1637
|
-
rate_cents: z.string(),
|
|
1616
|
+
rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
1638
1617
|
currency: z.string(),
|
|
1639
1618
|
taxable: z.boolean().optional(),
|
|
1640
1619
|
default: z.boolean().optional(),
|
|
@@ -1648,7 +1627,7 @@ export const zPerDiemParameters = z.object({
|
|
|
1648
1627
|
export const zPerDiemUpdateParameters = z.object({
|
|
1649
1628
|
name: z.string().optional(),
|
|
1650
1629
|
description: z.string().nullish(),
|
|
1651
|
-
rate_cents: z.string().optional(),
|
|
1630
|
+
rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1652
1631
|
currency: z.string().optional(),
|
|
1653
1632
|
taxable: z.boolean().optional(),
|
|
1654
1633
|
default: z.boolean().optional(),
|
|
@@ -1687,10 +1666,10 @@ export const zAssetsAttributeResponseObject = z.object({
|
|
|
1687
1666
|
updated_at: z.iso.datetime()
|
|
1688
1667
|
});
|
|
1689
1668
|
/**
|
|
1690
|
-
* Create
|
|
1669
|
+
* Create an attribute definition. Omitting name or data_type answers 400, and a blank or null name or any wrong-typed value answers 422. Options apply only to a select attribute and are ignored otherwise.
|
|
1691
1670
|
*/
|
|
1692
1671
|
export const zAssetsAttributeParameters = z.object({
|
|
1693
|
-
name: z.string().
|
|
1672
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
1694
1673
|
data_type: z.enum([
|
|
1695
1674
|
'text',
|
|
1696
1675
|
'number',
|
|
@@ -1706,10 +1685,10 @@ export const zAssetsAttributeParameters = z.object({
|
|
|
1706
1685
|
})).optional()
|
|
1707
1686
|
});
|
|
1708
1687
|
/**
|
|
1709
|
-
* Update an attribute definition. All fields are optional — send only what changes. Options apply only to a select attribute and are ignored otherwise; data_type cannot be changed once any value has been filled.
|
|
1688
|
+
* Update an attribute definition. All fields are optional — send only what changes. A blank or null name or any wrong-typed value answers 422. Options apply only to a select attribute and are ignored otherwise; data_type cannot be changed once any value has been filled.
|
|
1710
1689
|
*/
|
|
1711
1690
|
export const zAssetsAttributeUpdateParameters = z.object({
|
|
1712
|
-
name: z.string().
|
|
1691
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1713
1692
|
data_type: z.enum([
|
|
1714
1693
|
'text',
|
|
1715
1694
|
'number',
|
|
@@ -2412,6 +2391,183 @@ export const zPwaJobDetailsResponseObject = z.object({
|
|
|
2412
2391
|
il_shines_project_id: z.string().nullish(),
|
|
2413
2392
|
ny_dol_prc_number: z.string().nullish()
|
|
2414
2393
|
}).nullable();
|
|
2394
|
+
/**
|
|
2395
|
+
* Parameters for creating a job. Sets the job's schedule, work types, address, custom-field values, and optional Prevailing Wage / Apprenticeship (PWA) compliance. `requested_by_company_id` and `created_by_user_id` are required unless `template_id` names a template, whose copy keeps both. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any job or relationship is saved.
|
|
2396
|
+
*/
|
|
2397
|
+
export const zJobCreateParameters = z.object({
|
|
2398
|
+
created_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
2399
|
+
template_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2400
|
+
name: z.string().nullish(),
|
|
2401
|
+
description: z.string().optional(),
|
|
2402
|
+
requested_by_company_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
2403
|
+
purchase_order_number: z.string().nullish(),
|
|
2404
|
+
project_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2405
|
+
companies_department_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2406
|
+
federal_pwa_mode: z.enum([
|
|
2407
|
+
'all',
|
|
2408
|
+
'pw_only',
|
|
2409
|
+
'ap_only',
|
|
2410
|
+
'none'
|
|
2411
|
+
]).optional(),
|
|
2412
|
+
regional_pwa_mode: z.enum([
|
|
2413
|
+
'all',
|
|
2414
|
+
'pw_only',
|
|
2415
|
+
'ap_only',
|
|
2416
|
+
'none'
|
|
2417
|
+
]).optional(),
|
|
2418
|
+
region: z.string().nullish(),
|
|
2419
|
+
start_time: z.string().nullish(),
|
|
2420
|
+
end_time: z.string().nullish(),
|
|
2421
|
+
tz_name: z.string().optional(),
|
|
2422
|
+
time_card_start_day: z.int().gte(0).lte(6).optional(),
|
|
2423
|
+
clock_in_requirement: z.enum([
|
|
2424
|
+
'none',
|
|
2425
|
+
'warning',
|
|
2426
|
+
'required'
|
|
2427
|
+
]).optional(),
|
|
2428
|
+
send_geofence_reminders: z.boolean().nullish(),
|
|
2429
|
+
allow_customer_access: z.boolean().optional(),
|
|
2430
|
+
tracks_feature_allocations: z.boolean().optional(),
|
|
2431
|
+
requires_feature_allocation: z.boolean().optional(),
|
|
2432
|
+
max_one_feature_allocation: z.boolean().optional(),
|
|
2433
|
+
production_tracking_kind: z.enum([
|
|
2434
|
+
'none',
|
|
2435
|
+
'feature',
|
|
2436
|
+
'quantity'
|
|
2437
|
+
]).optional(),
|
|
2438
|
+
manager_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2439
|
+
timekeeping_timecode_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2440
|
+
job_work_types_attributes: z.array(z.object({
|
|
2441
|
+
primary: z.boolean().optional(),
|
|
2442
|
+
work_type_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
2443
|
+
})).optional(),
|
|
2444
|
+
job_address_attributes: z.object({
|
|
2445
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2446
|
+
sub_address_number: z.string().nullish(),
|
|
2447
|
+
address_number: z.string().nullish(),
|
|
2448
|
+
neighborhood: z.string().nullish(),
|
|
2449
|
+
municipality: z.string().nullish(),
|
|
2450
|
+
sub_region: z.string().nullish(),
|
|
2451
|
+
region: z.string().nullish(),
|
|
2452
|
+
postal_code: z.string().nullish(),
|
|
2453
|
+
country: z.string().nullish(),
|
|
2454
|
+
timezone: z.string().nullish(),
|
|
2455
|
+
verified: z.boolean().optional(),
|
|
2456
|
+
label: z.string().nullish()
|
|
2457
|
+
}).optional(),
|
|
2458
|
+
custom_fields: z.array(z.object({
|
|
2459
|
+
custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2460
|
+
value: z.string().nullable()
|
|
2461
|
+
})).optional(),
|
|
2462
|
+
pwa_details: z.object({
|
|
2463
|
+
contractor_type: z.enum(['prime_contractor', 'sub_contractor']).nullish(),
|
|
2464
|
+
pay_full_cash_fringe_by_default: z.boolean().optional(),
|
|
2465
|
+
dir_awarding_body_id: z.string().nullish(),
|
|
2466
|
+
dir_project_id: z.string().nullish(),
|
|
2467
|
+
dir_project_name: z.string().nullish(),
|
|
2468
|
+
dir_contract_id: z.string().nullish(),
|
|
2469
|
+
dir_project_awarding_body_name: z.string().nullish(),
|
|
2470
|
+
dir_project_number: z.string().nullish(),
|
|
2471
|
+
il_dol_project_id: z.string().nullish(),
|
|
2472
|
+
il_dol_state_capital_funds: z.boolean().nullish(),
|
|
2473
|
+
il_dol_public_body_name: z.string().nullish(),
|
|
2474
|
+
il_dol_public_body_contact_id: z.string().nullish(),
|
|
2475
|
+
il_dol_public_body_address_id: z.string().nullish(),
|
|
2476
|
+
il_dol_contract_number: z.string().nullish(),
|
|
2477
|
+
il_shines_project_id: z.string().nullish(),
|
|
2478
|
+
ny_dol_prc_number: z.string().nullish()
|
|
2479
|
+
}).optional()
|
|
2480
|
+
});
|
|
2481
|
+
/**
|
|
2482
|
+
* Parameters for updating an existing job. Every field is optional; omit a field to preserve its current value. The resulting job must still satisfy schedule and PWA validation rules. Accepts every shared job field plus a directly settable status and custom-field changes. Sending `created_by_user_id` returns 400 unknown_key, including when it matches the existing creator or is null. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any job or relationship changes.
|
|
2483
|
+
*/
|
|
2484
|
+
export const zJobUpdateParameters = z.object({
|
|
2485
|
+
name: z.string().nullish(),
|
|
2486
|
+
description: z.string().optional(),
|
|
2487
|
+
requested_by_company_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
2488
|
+
purchase_order_number: z.string().nullish(),
|
|
2489
|
+
project_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2490
|
+
companies_department_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2491
|
+
federal_pwa_mode: z.enum([
|
|
2492
|
+
'all',
|
|
2493
|
+
'pw_only',
|
|
2494
|
+
'ap_only',
|
|
2495
|
+
'none'
|
|
2496
|
+
]).optional(),
|
|
2497
|
+
regional_pwa_mode: z.enum([
|
|
2498
|
+
'all',
|
|
2499
|
+
'pw_only',
|
|
2500
|
+
'ap_only',
|
|
2501
|
+
'none'
|
|
2502
|
+
]).optional(),
|
|
2503
|
+
region: z.string().nullish(),
|
|
2504
|
+
start_time: z.string().nullish(),
|
|
2505
|
+
end_time: z.string().nullish(),
|
|
2506
|
+
tz_name: z.string().optional(),
|
|
2507
|
+
time_card_start_day: z.int().gte(0).lte(6).optional(),
|
|
2508
|
+
clock_in_requirement: z.enum([
|
|
2509
|
+
'none',
|
|
2510
|
+
'warning',
|
|
2511
|
+
'required'
|
|
2512
|
+
]).optional(),
|
|
2513
|
+
send_geofence_reminders: z.boolean().nullish(),
|
|
2514
|
+
allow_customer_access: z.boolean().optional(),
|
|
2515
|
+
tracks_feature_allocations: z.boolean().optional(),
|
|
2516
|
+
requires_feature_allocation: z.boolean().optional(),
|
|
2517
|
+
max_one_feature_allocation: z.boolean().optional(),
|
|
2518
|
+
production_tracking_kind: z.enum([
|
|
2519
|
+
'none',
|
|
2520
|
+
'feature',
|
|
2521
|
+
'quantity'
|
|
2522
|
+
]).optional(),
|
|
2523
|
+
manager_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2524
|
+
timekeeping_timecode_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2525
|
+
job_work_types_attributes: z.array(z.object({
|
|
2526
|
+
primary: z.boolean().optional(),
|
|
2527
|
+
work_type_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
2528
|
+
})).optional(),
|
|
2529
|
+
job_address_attributes: z.object({
|
|
2530
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2531
|
+
sub_address_number: z.string().nullish(),
|
|
2532
|
+
address_number: z.string().nullish(),
|
|
2533
|
+
neighborhood: z.string().nullish(),
|
|
2534
|
+
municipality: z.string().nullish(),
|
|
2535
|
+
sub_region: z.string().nullish(),
|
|
2536
|
+
region: z.string().nullish(),
|
|
2537
|
+
postal_code: z.string().nullish(),
|
|
2538
|
+
country: z.string().nullish(),
|
|
2539
|
+
timezone: z.string().nullish(),
|
|
2540
|
+
verified: z.boolean().optional(),
|
|
2541
|
+
label: z.string().nullish()
|
|
2542
|
+
}).optional(),
|
|
2543
|
+
custom_fields: z.array(z.object({
|
|
2544
|
+
custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2545
|
+
value: z.string().nullable()
|
|
2546
|
+
})).optional(),
|
|
2547
|
+
pwa_details: z.object({
|
|
2548
|
+
contractor_type: z.enum(['prime_contractor', 'sub_contractor']).nullish(),
|
|
2549
|
+
pay_full_cash_fringe_by_default: z.boolean().optional(),
|
|
2550
|
+
dir_awarding_body_id: z.string().nullish(),
|
|
2551
|
+
dir_project_id: z.string().nullish(),
|
|
2552
|
+
dir_project_name: z.string().nullish(),
|
|
2553
|
+
dir_contract_id: z.string().nullish(),
|
|
2554
|
+
dir_project_awarding_body_name: z.string().nullish(),
|
|
2555
|
+
dir_project_number: z.string().nullish(),
|
|
2556
|
+
il_dol_project_id: z.string().nullish(),
|
|
2557
|
+
il_dol_state_capital_funds: z.boolean().nullish(),
|
|
2558
|
+
il_dol_public_body_name: z.string().nullish(),
|
|
2559
|
+
il_dol_public_body_contact_id: z.string().nullish(),
|
|
2560
|
+
il_dol_public_body_address_id: z.string().nullish(),
|
|
2561
|
+
il_dol_contract_number: z.string().nullish(),
|
|
2562
|
+
il_shines_project_id: z.string().nullish(),
|
|
2563
|
+
ny_dol_prc_number: z.string().nullish()
|
|
2564
|
+
}).optional(),
|
|
2565
|
+
status: z.enum([
|
|
2566
|
+
'completed',
|
|
2567
|
+
'cancelled',
|
|
2568
|
+
'disputed'
|
|
2569
|
+
]).optional()
|
|
2570
|
+
});
|
|
2415
2571
|
/**
|
|
2416
2572
|
* A reusable job template — a saved job pattern for quickly creating new jobs with the same setup. Read-only through the API (listing only).
|
|
2417
2573
|
*/
|
|
@@ -2442,112 +2598,249 @@ export const zGroupUpdateParameters = z.object({
|
|
|
2442
2598
|
name: z.string().optional()
|
|
2443
2599
|
});
|
|
2444
2600
|
/**
|
|
2445
|
-
* Request body for updating a worker's profile. Limited to person-level identity fields; employment, roles, and compliance are managed through onboarding (create) and the user-company endpoints.
|
|
2601
|
+
* Request body for updating a worker's profile. Limited to person-level identity fields; employment, roles, and compliance are managed through onboarding (create) and the user-company endpoints. Include only the fields to change. A null or blank legal name, or any wrong-typed value, answers 422.
|
|
2446
2602
|
*/
|
|
2447
2603
|
export const zUserUpdateParameters = z.object({
|
|
2448
2604
|
email: z.string().nullish(),
|
|
2449
2605
|
personal_email: z.string().nullish(),
|
|
2450
2606
|
phone_number: z.string().nullish(),
|
|
2451
|
-
first_name: z.string().optional(),
|
|
2452
|
-
last_name: z.string().optional(),
|
|
2607
|
+
first_name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
2608
|
+
last_name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
2453
2609
|
preferred_first_name: z.string().nullish(),
|
|
2454
2610
|
preferred_last_name: z.string().nullish(),
|
|
2455
2611
|
city: z.string().nullish(),
|
|
2456
2612
|
state: z.string().nullish(),
|
|
2457
|
-
birth_date: z.
|
|
2613
|
+
birth_date: z.iso.date().nullish(),
|
|
2458
2614
|
dol_apprentice_no: z.string().nullish(),
|
|
2459
2615
|
avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
2460
2616
|
});
|
|
2461
2617
|
/**
|
|
2462
|
-
*
|
|
2463
|
-
*/
|
|
2464
|
-
export const zTimeEntryResponseObject = z.object({
|
|
2465
|
-
id: z.string(),
|
|
2466
|
-
user_id: z.string(),
|
|
2467
|
-
timekeeping_time_card_id: z.string(),
|
|
2468
|
-
job_id: z.string().nullable(),
|
|
2469
|
-
timekeeping_timecode_id: z.string().nullable(),
|
|
2470
|
-
state: z.string().nullable(),
|
|
2471
|
-
description: z.string().nullable(),
|
|
2472
|
-
clock_punched: z.boolean(),
|
|
2473
|
-
worker_approved: z.boolean(),
|
|
2474
|
-
manager_approval_status: z.enum([
|
|
2475
|
-
'PENDING',
|
|
2476
|
-
'APPROVED',
|
|
2477
|
-
'DECLINED'
|
|
2478
|
-
]),
|
|
2479
|
-
hours_worked: z.number(),
|
|
2480
|
-
overtime_minutes_worked: z.object({
|
|
2481
|
-
1: z.number(),
|
|
2482
|
-
1.5: z.number(),
|
|
2483
|
-
2: z.number()
|
|
2484
|
-
}),
|
|
2485
|
-
incentive_pay_one_five_x_minutes_worked: z.int(),
|
|
2486
|
-
hourly_rate_cents: z.string().nullable(),
|
|
2487
|
-
currency: z.string(),
|
|
2488
|
-
hourly_rate_src_type: z.string().nullable(),
|
|
2489
|
-
timekeeping_pay_period_id: z.string(),
|
|
2490
|
-
start_time: z.iso.datetime(),
|
|
2491
|
-
end_time: z.iso.datetime(),
|
|
2492
|
-
created_at: z.iso.datetime(),
|
|
2493
|
-
updated_at: z.iso.datetime(),
|
|
2494
|
-
feature_ids: z.array(z.string()),
|
|
2495
|
-
features: z.array(z.object({
|
|
2496
|
-
name: z.string()
|
|
2497
|
-
}))
|
|
2498
|
-
});
|
|
2499
|
-
/**
|
|
2500
|
-
* A record of a single approval or decline action taken against a time entry.
|
|
2501
|
-
*/
|
|
2502
|
-
export const zTimeEntryApprovalResponseObject = z.object({
|
|
2503
|
-
id: z.string(),
|
|
2504
|
-
timekeeping_time_entry_id: z.string(),
|
|
2505
|
-
time_card_approval_id: z.string().nullable(),
|
|
2506
|
-
status: z.enum([
|
|
2507
|
-
'pending',
|
|
2508
|
-
'approved',
|
|
2509
|
-
'declined'
|
|
2510
|
-
]),
|
|
2511
|
-
approver_user_id: z.string().nullable(),
|
|
2512
|
-
created_at: z.iso.datetime()
|
|
2513
|
-
});
|
|
2514
|
-
/**
|
|
2515
|
-
* A manager's approval or decline of a single time entry — the per-entry counterpart to a manager time-card approval. Rejected while the entry's time card is locked.
|
|
2618
|
+
* Request body for onboarding a worker into your company. In one call it creates the person (if new), their employment record and its custom-field values, roles, group memberships, an optional invite, and optional compliance details. first_name and last_name are required, and omitting either answers 400. Unless skip_invite is true, the invite needs a work email or a phone number, and a request with neither answers 422 at both fields. An unlisted key answers 400. A value of the wrong JSON type, a null for a field that is not nullable, or a value outside a listed set answers 422 at its pointer, and nothing is written.
|
|
2516
2619
|
*/
|
|
2517
|
-
export const
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
]),
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
* The time-entry body fields shared by the create and update bodies; each of those declares its own requiredness.
|
|
2527
|
-
*/
|
|
2528
|
-
export const zTimeEntryParameters = z.object({
|
|
2529
|
-
start_time: z.iso.datetime().optional(),
|
|
2530
|
-
end_time: z.iso.datetime().optional(),
|
|
2531
|
-
job_id: z.string().nullish(),
|
|
2532
|
-
timekeeping_timecode_id: z.string().nullish(),
|
|
2620
|
+
export const zUserParameters = z.object({
|
|
2621
|
+
email: z.string().nullish(),
|
|
2622
|
+
personal_email: z.string().nullish(),
|
|
2623
|
+
phone_number: z.string().nullish(),
|
|
2624
|
+
first_name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2625
|
+
last_name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2626
|
+
preferred_first_name: z.string().nullish(),
|
|
2627
|
+
preferred_last_name: z.string().nullish(),
|
|
2628
|
+
city: z.string().nullish(),
|
|
2533
2629
|
state: z.string().nullish(),
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2630
|
+
birth_date: z.iso.date().nullish(),
|
|
2631
|
+
dol_apprentice_no: z.string().nullish(),
|
|
2632
|
+
winda_id: z.string().nullish(),
|
|
2633
|
+
linkedin_url: z.string().nullish(),
|
|
2634
|
+
roles: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2635
|
+
avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2636
|
+
created_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2637
|
+
last_sent_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2638
|
+
skip_notify: z.boolean().optional(),
|
|
2639
|
+
skip_invite: z.boolean().optional(),
|
|
2640
|
+
hire_date: z.string().optional(),
|
|
2641
|
+
type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
|
|
2642
|
+
title: z.string().nullish(),
|
|
2643
|
+
manager_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2644
|
+
payroll_id: z.string().nullish(),
|
|
2645
|
+
enrolled_in_t_and_a: z.boolean().optional(),
|
|
2646
|
+
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
2647
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2648
|
+
training_annual_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2649
|
+
employer_combined_health_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2650
|
+
employer_combined_savings_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2651
|
+
overtime_eligible: z.boolean().optional(),
|
|
2652
|
+
worked_annual_minutes: z.int().nullish(),
|
|
2653
|
+
pto_annual_minutes: z.int().nullish(),
|
|
2654
|
+
holiday_annual_minutes: z.int().nullish(),
|
|
2655
|
+
training_annual_minutes: z.int().nullish(),
|
|
2656
|
+
custom_fields: z.array(z.object({
|
|
2657
|
+
custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2658
|
+
value: z.string().nullable()
|
|
2659
|
+
})).optional(),
|
|
2660
|
+
group_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2661
|
+
company_user_pwa_info: z.object({
|
|
2662
|
+
address1: z.string().nullish(),
|
|
2663
|
+
address2: z.string().nullish(),
|
|
2664
|
+
city: z.string().nullish(),
|
|
2665
|
+
state: z.string().nullish(),
|
|
2666
|
+
zip: z.string().nullish(),
|
|
2667
|
+
race: z.array(z.enum([
|
|
2668
|
+
'AFRICAN_AMERICAN',
|
|
2669
|
+
'ASIAN',
|
|
2670
|
+
'CAUCASIAN',
|
|
2671
|
+
'NATIVE_AMERICAN',
|
|
2672
|
+
'NOT_SPECIFIED',
|
|
2673
|
+
'OTHER'
|
|
2674
|
+
])).optional(),
|
|
2675
|
+
sex: z.enum([
|
|
2676
|
+
'female',
|
|
2677
|
+
'male',
|
|
2678
|
+
'non_binary',
|
|
2679
|
+
'not_specified'
|
|
2680
|
+
]).nullish(),
|
|
2681
|
+
local_business_license: z.string().nullish(),
|
|
2682
|
+
drivers_license_state: z.string().nullish(),
|
|
2683
|
+
drivers_license_number: z.string().nullish(),
|
|
2684
|
+
ssn: z.string().nullish(),
|
|
2685
|
+
veteran_status: z.enum([
|
|
2686
|
+
'protected_veteran',
|
|
2687
|
+
'not_protected_veteran',
|
|
2688
|
+
'reserves',
|
|
2689
|
+
'guard',
|
|
2690
|
+
'not_specified'
|
|
2691
|
+
]).nullish(),
|
|
2692
|
+
hispanic_origin: z.enum([
|
|
2693
|
+
'yes',
|
|
2694
|
+
'no',
|
|
2695
|
+
'not_specified'
|
|
2696
|
+
]).nullish(),
|
|
2697
|
+
ca_dir_withholding_exemptions: z.int().nullish(),
|
|
2698
|
+
disabled: z.boolean().optional(),
|
|
2699
|
+
il_dol_race: z.enum([
|
|
2700
|
+
'white',
|
|
2701
|
+
'black',
|
|
2702
|
+
'hispanic_or_latino',
|
|
2703
|
+
'american_indian_or_alaska_native',
|
|
2704
|
+
'chinese',
|
|
2705
|
+
'filipino',
|
|
2706
|
+
'asian_india',
|
|
2707
|
+
'vietnamese',
|
|
2708
|
+
'korean',
|
|
2709
|
+
'japanese',
|
|
2710
|
+
'native_hawaiian',
|
|
2711
|
+
'samoan',
|
|
2712
|
+
'chamorro',
|
|
2713
|
+
'other_asian',
|
|
2714
|
+
'other_pacific_islander',
|
|
2715
|
+
'other'
|
|
2716
|
+
]).nullish(),
|
|
2717
|
+
il_shines_employment_type: z.enum([
|
|
2718
|
+
'part_time',
|
|
2719
|
+
'full_time',
|
|
2720
|
+
'seasonal_temporary',
|
|
2721
|
+
'independent_contract'
|
|
2722
|
+
]).nullish(),
|
|
2723
|
+
il_shines_eep_qualifiers: z.array(z.enum([
|
|
2724
|
+
'eep_program_completed',
|
|
2725
|
+
'foster_care',
|
|
2726
|
+
'formerly_incarcerated',
|
|
2727
|
+
'equity_investment_eligible_community',
|
|
2728
|
+
'self_registered_or_unknown'
|
|
2729
|
+
])).optional(),
|
|
2730
|
+
il_shines_other_programs: z.array(z.enum([
|
|
2731
|
+
'solar_training_pipeline_program',
|
|
2732
|
+
'craft_apprenticeship_program',
|
|
2733
|
+
'multi_cultural_jobs_program',
|
|
2734
|
+
'clean_jobs_workforce_network_program',
|
|
2735
|
+
'illinois_climate_works_prep_apprenticeship_program',
|
|
2736
|
+
'returning_residents_clean_jobs_training_program',
|
|
2737
|
+
'other'
|
|
2738
|
+
])).optional(),
|
|
2739
|
+
or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullish(),
|
|
2740
|
+
or_boli_race: z.array(z.enum([
|
|
2741
|
+
'american_indian_or_alaska_native',
|
|
2742
|
+
'asian',
|
|
2743
|
+
'hispanic_or_latino',
|
|
2744
|
+
'black_or_african_american',
|
|
2745
|
+
'native_hawaiian_or_pacific_islander',
|
|
2746
|
+
'white',
|
|
2747
|
+
'portuguese_or_brazilian'
|
|
2748
|
+
])).optional()
|
|
2749
|
+
}).optional()
|
|
2537
2750
|
});
|
|
2538
2751
|
/**
|
|
2539
|
-
*
|
|
2752
|
+
* A single time entry: one atomic block of tracked work with its start/end times, optional timecode classification, optional job, pay rate, and manager approval status.
|
|
2540
2753
|
*/
|
|
2541
|
-
export const
|
|
2754
|
+
export const zTimeEntryResponseObject = z.object({
|
|
2755
|
+
id: z.string(),
|
|
2756
|
+
user_id: z.string(),
|
|
2542
2757
|
timekeeping_time_card_id: z.string(),
|
|
2543
|
-
|
|
2544
|
-
|
|
2758
|
+
job_id: z.string().nullable(),
|
|
2759
|
+
timekeeping_timecode_id: z.string().nullable(),
|
|
2760
|
+
state: z.string().nullable(),
|
|
2761
|
+
description: z.string().nullable(),
|
|
2762
|
+
clock_punched: z.boolean(),
|
|
2763
|
+
worker_approved: z.boolean(),
|
|
2764
|
+
manager_approval_status: z.enum([
|
|
2765
|
+
'PENDING',
|
|
2766
|
+
'APPROVED',
|
|
2767
|
+
'DECLINED'
|
|
2768
|
+
]),
|
|
2769
|
+
hours_worked: z.number(),
|
|
2770
|
+
overtime_minutes_worked: z.object({
|
|
2771
|
+
1: z.number(),
|
|
2772
|
+
1.5: z.number(),
|
|
2773
|
+
2: z.number()
|
|
2774
|
+
}),
|
|
2775
|
+
incentive_pay_one_five_x_minutes_worked: z.int(),
|
|
2776
|
+
hourly_rate_cents: z.string().nullable(),
|
|
2777
|
+
currency: z.string(),
|
|
2778
|
+
hourly_rate_src_type: z.string().nullable(),
|
|
2779
|
+
timekeeping_pay_period_id: z.string(),
|
|
2780
|
+
start_time: z.iso.datetime(),
|
|
2781
|
+
end_time: z.iso.datetime(),
|
|
2782
|
+
created_at: z.iso.datetime(),
|
|
2783
|
+
updated_at: z.iso.datetime(),
|
|
2784
|
+
feature_ids: z.array(z.string()),
|
|
2785
|
+
features: z.array(z.object({
|
|
2786
|
+
name: z.string()
|
|
2787
|
+
}))
|
|
2788
|
+
});
|
|
2545
2789
|
/**
|
|
2546
|
-
*
|
|
2790
|
+
* A record of a single approval or decline action taken against a time entry.
|
|
2547
2791
|
*/
|
|
2548
|
-
export const
|
|
2549
|
-
|
|
2550
|
-
|
|
2792
|
+
export const zTimeEntryApprovalResponseObject = z.object({
|
|
2793
|
+
id: z.string(),
|
|
2794
|
+
timekeeping_time_entry_id: z.string(),
|
|
2795
|
+
time_card_approval_id: z.string().nullable(),
|
|
2796
|
+
status: z.enum([
|
|
2797
|
+
'pending',
|
|
2798
|
+
'approved',
|
|
2799
|
+
'declined'
|
|
2800
|
+
]),
|
|
2801
|
+
approver_user_id: z.string().nullable(),
|
|
2802
|
+
created_at: z.iso.datetime()
|
|
2803
|
+
});
|
|
2804
|
+
/**
|
|
2805
|
+
* A manager's approval or decline of a single time entry — the per-entry counterpart to a manager time-card approval. Rejected while the entry's time card is locked.
|
|
2806
|
+
*/
|
|
2807
|
+
export const zManagerTimeEntryApprovalParameters = z.object({
|
|
2808
|
+
status: z.enum([
|
|
2809
|
+
'pending',
|
|
2810
|
+
'approved',
|
|
2811
|
+
'declined'
|
|
2812
|
+
]),
|
|
2813
|
+
approver_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)
|
|
2814
|
+
});
|
|
2815
|
+
/**
|
|
2816
|
+
* Request body for creating a time entry. timekeeping_time_card_id, start_time, and end_time are required, and omitting one answers 400.
|
|
2817
|
+
*/
|
|
2818
|
+
export const zTimeEntryCreateParameters = z.object({
|
|
2819
|
+
timekeeping_time_card_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2820
|
+
start_time: z.string(),
|
|
2821
|
+
end_time: z.string(),
|
|
2822
|
+
job_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2823
|
+
timekeeping_timecode_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2824
|
+
state: z.string().nullish(),
|
|
2825
|
+
description: z.string().nullish(),
|
|
2826
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2827
|
+
feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2828
|
+
feature_allocation_acknowledged: z.boolean().optional()
|
|
2829
|
+
});
|
|
2830
|
+
/**
|
|
2831
|
+
* Request body for updating a time entry. Every field is optional, and an omitted field keeps its value.
|
|
2832
|
+
*/
|
|
2833
|
+
export const zTimeEntryUpdateParameters = z.object({
|
|
2834
|
+
start_time: z.string().optional(),
|
|
2835
|
+
end_time: z.string().optional(),
|
|
2836
|
+
job_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2837
|
+
timekeeping_timecode_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2838
|
+
state: z.string().nullish(),
|
|
2839
|
+
description: z.string().nullish(),
|
|
2840
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2841
|
+
feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2842
|
+
confirm_allocation_conflict: z.boolean().optional()
|
|
2843
|
+
});
|
|
2551
2844
|
/**
|
|
2552
2845
|
* A form definition — a SurveyJS form template built and versioned in the web app's form builder. The same object the list door serializes. Read-only.
|
|
2553
2846
|
*/
|
|
@@ -2585,17 +2878,57 @@ export const zFormSubmissionResponseObject = z.object({
|
|
|
2585
2878
|
created_at: z.iso.datetime(),
|
|
2586
2879
|
updated_at: z.iso.datetime()
|
|
2587
2880
|
});
|
|
2881
|
+
/**
|
|
2882
|
+
* Request body for updating a worker's employment at your company. Corrects administrative fields (employment type, title, manager, payroll id, hire date, and time-and-attendance enrollment) across the whole employment history, and changes the custom-field values it lists. For time-effective pay changes, use the scheduled-changes endpoints instead. A value of the wrong JSON type, a null for a field that is not nullable, or a value outside a listed set answers 422 at its pointer, and nothing is written.
|
|
2883
|
+
*/
|
|
2884
|
+
export const zUserCompanyParameters = z.object({
|
|
2885
|
+
type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
|
|
2886
|
+
title: z.string().nullish(),
|
|
2887
|
+
manager_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2888
|
+
payroll_id: z.string().nullish(),
|
|
2889
|
+
enrolled_in_t_and_a: z.boolean().optional(),
|
|
2890
|
+
hire_date: z.string().nullish(),
|
|
2891
|
+
custom_fields: z.array(z.object({
|
|
2892
|
+
custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2893
|
+
value: z.string().nullable()
|
|
2894
|
+
})).optional()
|
|
2895
|
+
});
|
|
2896
|
+
/**
|
|
2897
|
+
* Request body for adding a worker to your company, creating their employment record and its custom-field values. hire_date is required and sets when employment begins; the remaining fields seed the initial title, pay, benefits, and accruals. Returns the worker with the new employment flattened onto it. Omitting hire_date answers 400. A value of the wrong JSON type, a null for a field that is not nullable, or a value outside a listed set answers 422 at its pointer, and nothing is written.
|
|
2898
|
+
*/
|
|
2899
|
+
export const zUserCompanyCreateParameters = z.object({
|
|
2900
|
+
hire_date: z.string(),
|
|
2901
|
+
type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
|
|
2902
|
+
title: z.string().nullish(),
|
|
2903
|
+
manager_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2904
|
+
payroll_id: z.string().nullish(),
|
|
2905
|
+
enrolled_in_t_and_a: z.boolean().optional(),
|
|
2906
|
+
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
2907
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2908
|
+
training_annual_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2909
|
+
employer_combined_health_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2910
|
+
employer_combined_savings_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2911
|
+
overtime_eligible: z.boolean().optional(),
|
|
2912
|
+
worked_annual_minutes: z.int().nullish(),
|
|
2913
|
+
pto_annual_minutes: z.int().nullish(),
|
|
2914
|
+
holiday_annual_minutes: z.int().nullish(),
|
|
2915
|
+
training_annual_minutes: z.int().nullish(),
|
|
2916
|
+
custom_fields: z.array(z.object({
|
|
2917
|
+
custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2918
|
+
value: z.string().nullable()
|
|
2919
|
+
})).optional()
|
|
2920
|
+
});
|
|
2588
2921
|
/**
|
|
2589
2922
|
* Request body for scheduling a future-dated compensation change. effective_date sets when the new values take effect; earlier history is preserved as its own version. Covers the pay, benefit, accrual, and department fields.
|
|
2590
2923
|
*/
|
|
2591
2924
|
export const zUserCompanyScheduledChangesParameters = z.object({
|
|
2592
2925
|
effective_date: z.iso.date(),
|
|
2593
|
-
|
|
2926
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2927
|
+
training_annual_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2928
|
+
employer_combined_health_amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2929
|
+
employer_combined_savings_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
2594
2930
|
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
2595
2931
|
overtime_eligible: z.boolean().optional(),
|
|
2596
|
-
training_annual_amount: z.string().nullish(),
|
|
2597
|
-
employer_combined_health_amount: z.string().nullish(),
|
|
2598
|
-
employer_combined_savings: z.string().nullish(),
|
|
2599
2932
|
worked_annual_minutes: z.int().nullish(),
|
|
2600
2933
|
pto_annual_minutes: z.int().nullish(),
|
|
2601
2934
|
holiday_annual_minutes: z.int().nullish(),
|
|
@@ -2793,7 +3126,7 @@ export const zUserGroupResponse = z.object({
|
|
|
2793
3126
|
* Request body for adding users to a group. The group is taken from the URL path.
|
|
2794
3127
|
*/
|
|
2795
3128
|
export const zUserGroupParameters = z.object({
|
|
2796
|
-
user_ids: z.array(z.string())
|
|
3129
|
+
user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).min(1)
|
|
2797
3130
|
});
|
|
2798
3131
|
/**
|
|
2799
3132
|
* Day of the week a job's workweek and time cards start on: 0 (Sunday) through 6 (Saturday).
|
|
@@ -2807,124 +3140,18 @@ export const zTimeCardStartDay = z.union([
|
|
|
2807
3140
|
z.literal(5),
|
|
2808
3141
|
z.literal(6)
|
|
2809
3142
|
]);
|
|
2810
|
-
/**
|
|
2811
|
-
* Fields shared by job creation and updates. Updates may omit any field to preserve its current value. The resulting job must still satisfy its schedule and PWA validation rules.
|
|
2812
|
-
*/
|
|
2813
|
-
export const zJobParameters = z.object({
|
|
2814
|
-
name: z.string().nullish(),
|
|
2815
|
-
description: z.string().optional(),
|
|
2816
|
-
requested_by_company_id: z.string().optional(),
|
|
2817
|
-
manager_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2818
|
-
purchase_order_number: z.string().nullish(),
|
|
2819
|
-
project_id: z.string().nullish(),
|
|
2820
|
-
companies_department_id: z.string().nullish(),
|
|
2821
|
-
federal_pwa_mode: z.enum([
|
|
2822
|
-
'all',
|
|
2823
|
-
'pw_only',
|
|
2824
|
-
'ap_only',
|
|
2825
|
-
'none'
|
|
2826
|
-
]).optional(),
|
|
2827
|
-
regional_pwa_mode: z.enum([
|
|
2828
|
-
'all',
|
|
2829
|
-
'pw_only',
|
|
2830
|
-
'ap_only',
|
|
2831
|
-
'none'
|
|
2832
|
-
]).optional(),
|
|
2833
|
-
region: z.string().optional(),
|
|
2834
|
-
start_time: z.string().nullish(),
|
|
2835
|
-
end_time: z.string().nullish(),
|
|
2836
|
-
tz_name: z.string().optional(),
|
|
2837
|
-
time_card_start_day: zTimeCardStartDay.optional(),
|
|
2838
|
-
clock_in_requirement: z.enum([
|
|
2839
|
-
'none',
|
|
2840
|
-
'warning',
|
|
2841
|
-
'required'
|
|
2842
|
-
]).optional(),
|
|
2843
|
-
send_geofence_reminders: z.boolean().nullish(),
|
|
2844
|
-
allow_customer_access: z.boolean().optional(),
|
|
2845
|
-
timekeeping_timecode_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
2846
|
-
tracks_feature_allocations: z.boolean().nullish(),
|
|
2847
|
-
requires_feature_allocation: z.boolean().nullish(),
|
|
2848
|
-
max_one_feature_allocation: z.boolean().nullish(),
|
|
2849
|
-
production_tracking_kind: z.enum([
|
|
2850
|
-
'none',
|
|
2851
|
-
'feature',
|
|
2852
|
-
'quantity'
|
|
2853
|
-
]).optional(),
|
|
2854
|
-
job_work_types_attributes: z.array(z.object({
|
|
2855
|
-
primary: z.boolean().optional(),
|
|
2856
|
-
work_type_id: z.string().optional()
|
|
2857
|
-
})).nullish(),
|
|
2858
|
-
job_address_attributes: z.object({
|
|
2859
|
-
id: z.string().nullish(),
|
|
2860
|
-
sub_address_number: z.string().nullish(),
|
|
2861
|
-
address_number: z.string().nullish(),
|
|
2862
|
-
neighborhood: z.string().nullish(),
|
|
2863
|
-
municipality: z.string().nullish(),
|
|
2864
|
-
sub_region: z.string().nullish(),
|
|
2865
|
-
region: z.string().nullish(),
|
|
2866
|
-
postal_code: z.string().nullish(),
|
|
2867
|
-
country: z.string().nullish(),
|
|
2868
|
-
timezone: z.string().nullish(),
|
|
2869
|
-
verified: z.boolean().nullish(),
|
|
2870
|
-
label: z.string().nullish()
|
|
2871
|
-
}).nullish(),
|
|
2872
|
-
pwa_details: z.object({
|
|
2873
|
-
contractor_type: z.enum(['prime_contractor', 'sub_contractor']).nullish(),
|
|
2874
|
-
pay_full_cash_fringe_by_default: z.boolean().optional(),
|
|
2875
|
-
dir_awarding_body_id: z.string().nullish(),
|
|
2876
|
-
dir_project_id: z.string().nullish(),
|
|
2877
|
-
dir_project_name: z.string().nullish(),
|
|
2878
|
-
dir_contract_id: z.string().nullish(),
|
|
2879
|
-
dir_project_awarding_body_name: z.string().nullish(),
|
|
2880
|
-
dir_project_number: z.string().nullish(),
|
|
2881
|
-
il_dol_project_id: z.string().nullish(),
|
|
2882
|
-
il_dol_state_capital_funds: z.boolean().nullish(),
|
|
2883
|
-
il_dol_public_body_name: z.string().nullish(),
|
|
2884
|
-
il_dol_public_body_contact_id: z.string().nullish(),
|
|
2885
|
-
il_dol_public_body_address_id: z.string().nullish(),
|
|
2886
|
-
il_dol_contract_number: z.string().nullish(),
|
|
2887
|
-
il_shines_project_id: z.string().nullish(),
|
|
2888
|
-
ny_dol_prc_number: z.string().nullish()
|
|
2889
|
-
}).optional()
|
|
2890
|
-
});
|
|
2891
|
-
/**
|
|
2892
|
-
* Parameters for creating a job. `requested_by_company_id` and `created_by_user_id` are required. Sets the job's schedule, work types, address, custom-field values, and optional Prevailing Wage / Apprenticeship (PWA) compliance.
|
|
2893
|
-
*/
|
|
2894
|
-
export const zJobCreateParameters = zJobParameters.and(z.object({
|
|
2895
|
-
created_by_user_id: z.string(),
|
|
2896
|
-
template_id: z.string().nullish(),
|
|
2897
|
-
custom_fields: z.array(z.object({
|
|
2898
|
-
custom_field_config_id: z.string(),
|
|
2899
|
-
value: z.string().nullable()
|
|
2900
|
-
})).optional()
|
|
2901
|
-
}));
|
|
2902
|
-
/**
|
|
2903
|
-
* Parameters for updating an existing job. Every field is optional; omit a field to preserve its current value. The resulting job must still satisfy schedule and PWA validation rules. Accepts every shared job field plus a directly settable status and custom-field changes. Sending `created_by_user_id` returns 400 unknown_key, including when it matches the existing creator or is null.
|
|
2904
|
-
*/
|
|
2905
|
-
export const zJobUpdateParameters = zJobParameters.and(z.object({
|
|
2906
|
-
status: z.enum([
|
|
2907
|
-
'completed',
|
|
2908
|
-
'cancelled',
|
|
2909
|
-
'disputed'
|
|
2910
|
-
]).optional(),
|
|
2911
|
-
custom_fields: z.array(z.object({
|
|
2912
|
-
custom_field_config_id: z.string(),
|
|
2913
|
-
value: z.string().nullable()
|
|
2914
|
-
})).optional()
|
|
2915
|
-
}));
|
|
2916
3143
|
/**
|
|
2917
3144
|
* One version of a worker's compensation at your company, effective from its start date until the next version begins.
|
|
2918
3145
|
*/
|
|
2919
3146
|
export const zUserCompanyScheduledChange = z.object({
|
|
2920
3147
|
id: z.string(),
|
|
2921
3148
|
start_date: z.string(),
|
|
2922
|
-
|
|
3149
|
+
hourly_rate_cents: z.string().nullable(),
|
|
2923
3150
|
compensation_type: z.enum(['hourly', 'salary']),
|
|
2924
3151
|
overtime_eligible: z.boolean(),
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
3152
|
+
training_annual_amount_cents: z.string().nullable(),
|
|
3153
|
+
employer_combined_health_amount_cents: z.string().nullable(),
|
|
3154
|
+
employer_combined_savings_cents: z.string().nullable(),
|
|
2928
3155
|
worked_annual_minutes: z.int().nullable(),
|
|
2929
3156
|
pto_annual_minutes: z.int().nullable(),
|
|
2930
3157
|
holiday_annual_minutes: z.int().nullable(),
|
|
@@ -2945,6 +3172,20 @@ export const zUserCompanyScheduledChangesResponse = z.object({
|
|
|
2945
3172
|
export const zUserCompanyScheduledTerminationParameters = z.object({
|
|
2946
3173
|
termination_date: z.iso.date()
|
|
2947
3174
|
});
|
|
3175
|
+
/**
|
|
3176
|
+
* A pay period — a bounded pay window generated automatically by its pay schedule (PayPeriodConfig).
|
|
3177
|
+
*/
|
|
3178
|
+
export const zPayPeriodResponseObject = z.object({
|
|
3179
|
+
id: z.string(),
|
|
3180
|
+
timekeeping_pay_period_config_id: z.string(),
|
|
3181
|
+
pay_date: z.iso.date(),
|
|
3182
|
+
start_time: z.iso.datetime(),
|
|
3183
|
+
end_time: z.iso.datetime(),
|
|
3184
|
+
pay_run_deadline: z.iso.datetime(),
|
|
3185
|
+
approvals_deadline: z.iso.datetime(),
|
|
3186
|
+
created_at: z.iso.datetime(),
|
|
3187
|
+
updated_at: z.iso.datetime()
|
|
3188
|
+
});
|
|
2948
3189
|
/**
|
|
2949
3190
|
* One problem found while processing an accepted import, whatever its type.
|
|
2950
3191
|
*/
|
|
@@ -3098,7 +3339,7 @@ export const zTimeEntryImportResponseObject = z.object({
|
|
|
3098
3339
|
updated_at: z.iso.datetime()
|
|
3099
3340
|
});
|
|
3100
3341
|
/**
|
|
3101
|
-
* Submit a spreadsheet of time entries for a pay period. All
|
|
3342
|
+
* Submit a spreadsheet of time entries for a pay period. All six of payroll_id, start_time, end_time, timecode, job_id and description must be present as column headers, or the file is refused naming the ones missing. The payroll_id, start_time, end_time and timecode columns must carry a value on every row. The state column may be omitted, or its cells left blank, when the row's Job resolves a recognized state through its operating region, address, then oldest qualifying Site address. A valid explicit state overrides this fallback; an invalid supplied state fails. Missing or blank state without a Job, unresolved geography, or an unrecognized address region rejects the whole file with row-specific errors. The original file retains omissions and blank values, so background processing resolves current Job geography again. features, federal_labor_classification and regional_labor_classification are read when present. Header matching ignores case and treats spaces as underscores, and column order does not matter. Any other column is refused: a name this import does not read would be dropped without trace, so the file is rejected naming it rather than applied in part.
|
|
3102
3343
|
*
|
|
3103
3344
|
* Because acceptance is synchronous but the write happens in the background, only one import at a time is accepted for a pay period: while an earlier one is still `pending` or `processing`, a second answers 409 naming `import_in_progress`, and nothing is written. Poll the earlier import until it reports, then submit again.
|
|
3104
3345
|
*/
|
|
@@ -3639,8 +3880,8 @@ export const zProjectResponseObject = z.object({
|
|
|
3639
3880
|
administrator_name: z.string().nullable(),
|
|
3640
3881
|
administrator_email: z.string().nullable(),
|
|
3641
3882
|
administrator_phone: z.string().nullable(),
|
|
3642
|
-
budget_cents: z.string().
|
|
3643
|
-
budget_currency: z.string().
|
|
3883
|
+
budget_cents: z.string().nullish(),
|
|
3884
|
+
budget_currency: z.string().nullish(),
|
|
3644
3885
|
start_date: z.iso.date().nullable(),
|
|
3645
3886
|
end_date: z.iso.date().nullable(),
|
|
3646
3887
|
prevailing_wage_lock_in_date: z.iso.date().nullable(),
|
|
@@ -3650,19 +3891,18 @@ export const zProjectResponseObject = z.object({
|
|
|
3650
3891
|
updated_at: z.iso.datetime()
|
|
3651
3892
|
});
|
|
3652
3893
|
/**
|
|
3653
|
-
* Request body for creating a project. `name` and `created_by_user_id` are required; the creator must be a member of the owning company. The owning company is inferred from the API key and is not part of the body. Undeclared body keys return 400 before any project or relationship is saved.
|
|
3894
|
+
* Request body for creating a project. `name` and `created_by_user_id` are required, and omitting either returns 400; the creator must be a member of the owning company. The owning company is inferred from the API key and is not part of the body. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship is saved.
|
|
3654
3895
|
*/
|
|
3655
3896
|
export const zProjectParameters = z.object({
|
|
3656
3897
|
external_id: z.string().nullish(),
|
|
3657
|
-
name: z.string(),
|
|
3898
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
3658
3899
|
description: z.string().nullish(),
|
|
3659
|
-
|
|
3660
|
-
parent_id: z.string().nullish(),
|
|
3900
|
+
parent_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
3661
3901
|
participating_company_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
3662
3902
|
start_date: z.iso.date().nullish(),
|
|
3663
3903
|
end_date: z.iso.date().nullish(),
|
|
3664
3904
|
tz_name: z.string().nullish(),
|
|
3665
|
-
billing_start_day: z.int().nullish(),
|
|
3905
|
+
billing_start_day: z.int().gte(0).lte(6).nullish(),
|
|
3666
3906
|
federal_pwa_mode: z.enum([
|
|
3667
3907
|
'all',
|
|
3668
3908
|
'pw_only',
|
|
@@ -3680,24 +3920,25 @@ export const zProjectParameters = z.object({
|
|
|
3680
3920
|
administrator_name: z.string().nullish(),
|
|
3681
3921
|
administrator_email: z.string().nullish(),
|
|
3682
3922
|
administrator_phone: z.string().nullish(),
|
|
3683
|
-
|
|
3923
|
+
budget_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
3684
3924
|
prevailing_wage_lock_in_date: z.iso.date().nullish(),
|
|
3685
3925
|
beginning_of_construction_date: z.iso.date().nullish(),
|
|
3686
|
-
placed_in_service_date: z.iso.date().nullish()
|
|
3926
|
+
placed_in_service_date: z.iso.date().nullish(),
|
|
3927
|
+
created_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)
|
|
3687
3928
|
});
|
|
3688
3929
|
/**
|
|
3689
|
-
* Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. Undeclared body keys return 400 before any project or relationship changes.
|
|
3930
|
+
* Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship changes.
|
|
3690
3931
|
*/
|
|
3691
3932
|
export const zProjectUpdateParameters = z.object({
|
|
3692
3933
|
external_id: z.string().nullish(),
|
|
3693
|
-
name: z.string().optional(),
|
|
3934
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
3694
3935
|
description: z.string().nullish(),
|
|
3695
|
-
parent_id: z.string().nullish(),
|
|
3936
|
+
parent_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
3696
3937
|
participating_company_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
3697
3938
|
start_date: z.iso.date().nullish(),
|
|
3698
3939
|
end_date: z.iso.date().nullish(),
|
|
3699
3940
|
tz_name: z.string().nullish(),
|
|
3700
|
-
billing_start_day: z.int().nullish(),
|
|
3941
|
+
billing_start_day: z.int().gte(0).lte(6).nullish(),
|
|
3701
3942
|
federal_pwa_mode: z.enum([
|
|
3702
3943
|
'all',
|
|
3703
3944
|
'pw_only',
|
|
@@ -3715,7 +3956,7 @@ export const zProjectUpdateParameters = z.object({
|
|
|
3715
3956
|
administrator_name: z.string().nullish(),
|
|
3716
3957
|
administrator_email: z.string().nullish(),
|
|
3717
3958
|
administrator_phone: z.string().nullish(),
|
|
3718
|
-
|
|
3959
|
+
budget_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
3719
3960
|
prevailing_wage_lock_in_date: z.iso.date().nullish(),
|
|
3720
3961
|
beginning_of_construction_date: z.iso.date().nullish(),
|
|
3721
3962
|
placed_in_service_date: z.iso.date().nullish()
|
|
@@ -3741,6 +3982,56 @@ export const zProjectSiteParameters = z.object({
|
|
|
3741
3982
|
export const zProjectSiteUpdateParameters = z.object({
|
|
3742
3983
|
feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional()
|
|
3743
3984
|
});
|
|
3985
|
+
/**
|
|
3986
|
+
* A file attached to a project. Uploaded through the direct-upload flow. `name` is always "document" and is not client-writable.
|
|
3987
|
+
*/
|
|
3988
|
+
export const zProjectDocumentResponseObject = z.object({
|
|
3989
|
+
id: z.string(),
|
|
3990
|
+
project_id: z.string(),
|
|
3991
|
+
name: z.string(),
|
|
3992
|
+
filename: z.string().nullable(),
|
|
3993
|
+
description: z.string().nullable(),
|
|
3994
|
+
created_by_user_id: z.string(),
|
|
3995
|
+
file: z.object({
|
|
3996
|
+
filename: z.string(),
|
|
3997
|
+
content_type: z.string().nullable(),
|
|
3998
|
+
byte_size: z.int(),
|
|
3999
|
+
url: z.string()
|
|
4000
|
+
}).nullable(),
|
|
4001
|
+
created_at: z.iso.datetime(),
|
|
4002
|
+
updated_at: z.iso.datetime()
|
|
4003
|
+
});
|
|
4004
|
+
/**
|
|
4005
|
+
* Attach a file to a project as a document. file is required and takes a signed_id from the direct-upload endpoint.
|
|
4006
|
+
*/
|
|
4007
|
+
export const zProjectDocumentParameters = z.object({
|
|
4008
|
+
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
4009
|
+
filename: z.string().nullish(),
|
|
4010
|
+
description: z.string().nullish(),
|
|
4011
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)
|
|
4012
|
+
});
|
|
4013
|
+
/**
|
|
4014
|
+
* Update a project document. All fields are optional — send only what changes. Omit file to retain the existing attachment, or supply a new signed_id to replace it. A document always holds a file, so null answers 422, as does a blank string. `name` is read-only; sending it answers 400.
|
|
4015
|
+
*/
|
|
4016
|
+
export const zProjectDocumentUpdateParameters = z.object({
|
|
4017
|
+
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4018
|
+
filename: z.string().nullish(),
|
|
4019
|
+
description: z.string().nullish()
|
|
4020
|
+
});
|
|
4021
|
+
/**
|
|
4022
|
+
* One entry in a project document's PaperTrail change history, recorded whenever the document is created, updated, or deleted — including when only its attached file is replaced. This is transaction-time audit data, not a temporal valid-time version.
|
|
4023
|
+
*/
|
|
4024
|
+
export const zProjectDocumentVersionResponseObject = z.object({
|
|
4025
|
+
id: z.int(),
|
|
4026
|
+
document_id: z.string(),
|
|
4027
|
+
event: z.enum([
|
|
4028
|
+
'create',
|
|
4029
|
+
'update',
|
|
4030
|
+
'destroy'
|
|
4031
|
+
]),
|
|
4032
|
+
whodunnit: z.string().nullable(),
|
|
4033
|
+
created_at: z.iso.datetime()
|
|
4034
|
+
});
|
|
3744
4035
|
export const zSiteCheckInResponseObject = z.object({
|
|
3745
4036
|
id: z.string(),
|
|
3746
4037
|
site_id: z.string(),
|
|
@@ -3765,6 +4056,7 @@ export const zSiteCheckInResponseObject = z.object({
|
|
|
3765
4056
|
longitude: z.number().nullable(),
|
|
3766
4057
|
start_time: z.iso.datetime(),
|
|
3767
4058
|
end_time: z.iso.datetime().nullable(),
|
|
4059
|
+
duration_minutes: z.int().nullable(),
|
|
3768
4060
|
verified_at: z.iso.datetime().nullable(),
|
|
3769
4061
|
created_at: z.iso.datetime(),
|
|
3770
4062
|
updated_at: z.iso.datetime()
|
|
@@ -4078,12 +4370,12 @@ export const zComplianceCheckDetailResponseObject = z.object({
|
|
|
4078
4370
|
documents: z.array(zComplianceCheckDocumentObject)
|
|
4079
4371
|
});
|
|
4080
4372
|
/**
|
|
4081
|
-
* Update a compliance check. Every field is optional.
|
|
4373
|
+
* Update a compliance check. Every field is optional. Undeclared body keys return 400, and a wrong-typed value, a null for a field that is not nullable, or a status outside the list returns 422 at its pointer before anything is written.
|
|
4082
4374
|
*/
|
|
4083
4375
|
export const zComplianceCheckParameters = z.object({
|
|
4084
4376
|
status: z.enum(['dismissed', 'pending']).optional(),
|
|
4085
|
-
time_due: z.
|
|
4086
|
-
assignee_user_ids: z.array(z.string()).optional(),
|
|
4377
|
+
time_due: z.string().nullish(),
|
|
4378
|
+
assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4087
4379
|
file_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
4088
4380
|
});
|
|
4089
4381
|
export const zRichTextObject = z.object({
|
|
@@ -4110,6 +4402,24 @@ export const zTodoInboxTodoResponseObject = z.object({
|
|
|
4110
4402
|
created_by_user_id: z.string(),
|
|
4111
4403
|
updated_by_user_id: z.string(),
|
|
4112
4404
|
completed: z.boolean(),
|
|
4405
|
+
priority: z.enum([
|
|
4406
|
+
'critical',
|
|
4407
|
+
'high',
|
|
4408
|
+
'medium',
|
|
4409
|
+
'low'
|
|
4410
|
+
]).nullable(),
|
|
4411
|
+
category: z.enum([
|
|
4412
|
+
'apprenticeship',
|
|
4413
|
+
'certified_payroll',
|
|
4414
|
+
'company',
|
|
4415
|
+
'job',
|
|
4416
|
+
'payroll',
|
|
4417
|
+
'project',
|
|
4418
|
+
'regional',
|
|
4419
|
+
'tax_credit',
|
|
4420
|
+
'timekeeping',
|
|
4421
|
+
'worker'
|
|
4422
|
+
]),
|
|
4113
4423
|
task_assignee_user_ids: z.array(z.string()),
|
|
4114
4424
|
description: zRichTextObject,
|
|
4115
4425
|
time_due: z.iso.datetime().nullable(),
|
|
@@ -4303,7 +4613,7 @@ export const zPriorPeriodAdjustmentResponseObject = z.object({
|
|
|
4303
4613
|
export const zPriorPeriodAdjustmentParameters = z.object({
|
|
4304
4614
|
payrolls_paystub_line_item_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
4305
4615
|
created_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
4306
|
-
amount_cents: z.string(),
|
|
4616
|
+
amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
4307
4617
|
rationale: z.enum([
|
|
4308
4618
|
'hours_correction',
|
|
4309
4619
|
'other',
|
|
@@ -4318,7 +4628,7 @@ export const zPriorPeriodAdjustmentParameters = z.object({
|
|
|
4318
4628
|
* Request body for updating a prior period adjustment. Send only the fields to change. The time card is the path parent; payrolls_paystub_line_item_id, created_by_user_id, time_card_id, and adjustment_type are rejected.
|
|
4319
4629
|
*/
|
|
4320
4630
|
export const zPriorPeriodAdjustmentUpdateParameters = z.object({
|
|
4321
|
-
amount_cents: z.string().optional(),
|
|
4631
|
+
amount_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
4322
4632
|
rationale: z.enum([
|
|
4323
4633
|
'hours_correction',
|
|
4324
4634
|
'other',
|
|
@@ -4448,22 +4758,22 @@ export const zPaystubLineItemResponseObject = z.object({
|
|
|
4448
4758
|
updated_at: z.iso.datetime()
|
|
4449
4759
|
});
|
|
4450
4760
|
/**
|
|
4451
|
-
* Request body for creating a paystub line item. All four fields are required. Undeclared body keys
|
|
4761
|
+
* Request body for creating a paystub line item. All four fields are required. Undeclared body keys or an omitted field answer 400; a null or blank value, or any wrong-typed value, answers 422; references outside the authenticated company return 404.
|
|
4452
4762
|
*/
|
|
4453
4763
|
export const zPaystubLineItemParameters = z.object({
|
|
4454
|
-
payrolls_paystub_id: z.string(),
|
|
4455
|
-
amount_cents: z.string(),
|
|
4764
|
+
payrolls_paystub_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
4765
|
+
amount_cents: z.string().regex(/^-?[0-9]+(\.[0-9]+)?$/),
|
|
4456
4766
|
contributor: z.enum(['employee', 'employer']),
|
|
4457
|
-
payrolls_external_map_id: z.string()
|
|
4767
|
+
payrolls_external_map_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)
|
|
4458
4768
|
});
|
|
4459
4769
|
/**
|
|
4460
|
-
* Request body for updating a paystub line item. Send only the fields to change. Undeclared body keys are rejected with 400; newly supplied references outside the authenticated company return 404.
|
|
4770
|
+
* Request body for updating a paystub line item. Send only the fields to change. Undeclared body keys are rejected with 400; a null or blank value, or any wrong-typed value, answers 422; newly supplied references outside the authenticated company return 404.
|
|
4461
4771
|
*/
|
|
4462
4772
|
export const zPaystubLineItemUpdateParameters = z.object({
|
|
4463
|
-
payrolls_paystub_id: z.string().optional(),
|
|
4464
|
-
amount_cents: z.string().optional(),
|
|
4773
|
+
payrolls_paystub_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4774
|
+
amount_cents: z.string().regex(/^-?[0-9]+(\.[0-9]+)?$/).optional(),
|
|
4465
4775
|
contributor: z.enum(['employee', 'employer']).optional(),
|
|
4466
|
-
payrolls_external_map_id: z.string().optional()
|
|
4776
|
+
payrolls_external_map_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
4467
4777
|
});
|
|
4468
4778
|
/**
|
|
4469
4779
|
* A job-site join — the Site attached to a Job, plus the subset of that site's features the job is working on. `{id}` is the join row, not the Site.
|
|
@@ -4486,6 +4796,61 @@ export const zJobSiteParameters = z.object({
|
|
|
4486
4796
|
export const zJobSiteUpdateParameters = z.object({
|
|
4487
4797
|
feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional()
|
|
4488
4798
|
});
|
|
4799
|
+
/**
|
|
4800
|
+
* A document attached to a job — either an uploaded file or an external URL, never both. Includes PWA documentation when the caller may see it.
|
|
4801
|
+
*/
|
|
4802
|
+
export const zJobDocumentResponseObject = z.object({
|
|
4803
|
+
id: z.string(),
|
|
4804
|
+
job_id: z.string(),
|
|
4805
|
+
name: z.string(),
|
|
4806
|
+
type: z.enum([
|
|
4807
|
+
'CERTIFICATIONS',
|
|
4808
|
+
'CHECKLIST',
|
|
4809
|
+
'MAP',
|
|
4810
|
+
'MSA',
|
|
4811
|
+
'ONSITE_POSTER',
|
|
4812
|
+
'OTHER',
|
|
4813
|
+
'PARTS_INSTRUCTIONS',
|
|
4814
|
+
'PHOTO',
|
|
4815
|
+
'PO',
|
|
4816
|
+
'PWA_DOCUMENTATION',
|
|
4817
|
+
'RESUME',
|
|
4818
|
+
'WO'
|
|
4819
|
+
]),
|
|
4820
|
+
description: z.string().nullable(),
|
|
4821
|
+
admin_only: z.boolean(),
|
|
4822
|
+
url: z.string().nullable(),
|
|
4823
|
+
file: z.object({
|
|
4824
|
+
filename: z.string(),
|
|
4825
|
+
content_type: z.string().nullable(),
|
|
4826
|
+
byte_size: z.int(),
|
|
4827
|
+
url: z.string()
|
|
4828
|
+
}).nullable(),
|
|
4829
|
+
created_at: z.iso.datetime(),
|
|
4830
|
+
updated_at: z.iso.datetime()
|
|
4831
|
+
});
|
|
4832
|
+
/**
|
|
4833
|
+
* Request body for creating a job document. The job is taken from the path and is not part of the body. Supply exactly one of `url` or `file`.
|
|
4834
|
+
*/
|
|
4835
|
+
export const zJobDocumentParameters = z.object({
|
|
4836
|
+
type: z.string().optional(),
|
|
4837
|
+
name: z.string().optional(),
|
|
4838
|
+
description: z.string().nullish(),
|
|
4839
|
+
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4840
|
+
admin_only: z.boolean().optional(),
|
|
4841
|
+
url: z.string().nullish()
|
|
4842
|
+
});
|
|
4843
|
+
/**
|
|
4844
|
+
* Request body for updating a job document. Every field is optional; omit a field to preserve its current value. The resulting document must still be exactly one of `url` or `file`.
|
|
4845
|
+
*/
|
|
4846
|
+
export const zJobDocumentUpdateParameters = z.object({
|
|
4847
|
+
type: z.string().optional(),
|
|
4848
|
+
name: z.string().optional(),
|
|
4849
|
+
description: z.string().nullish(),
|
|
4850
|
+
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
4851
|
+
admin_only: z.boolean().optional(),
|
|
4852
|
+
url: z.string().nullish()
|
|
4853
|
+
});
|
|
4489
4854
|
/**
|
|
4490
4855
|
* A good-faith-effort exception on a job — a record that the employer requested apprentices from a registered program and did not receive the full request, or that no qualifying program existed. Read-only. Does not include supporting document slots.
|
|
4491
4856
|
*/
|
|
@@ -4601,7 +4966,7 @@ export const zSiteFormAssignmentParameters = z.object({
|
|
|
4601
4966
|
'QUARTERLY'
|
|
4602
4967
|
]).nullish(),
|
|
4603
4968
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4604
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
4969
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4605
4970
|
reminders_attributes: z.array(z.object({
|
|
4606
4971
|
offset: z.enum([
|
|
4607
4972
|
'PT0S',
|
|
@@ -4665,7 +5030,7 @@ export const zSiteFormAssignmentUpdateParameters = z.object({
|
|
|
4665
5030
|
'QUARTERLY'
|
|
4666
5031
|
]).nullish(),
|
|
4667
5032
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4668
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
5033
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4669
5034
|
reminders_attributes: z.array(z.object({
|
|
4670
5035
|
offset: z.enum([
|
|
4671
5036
|
'PT0S',
|
|
@@ -4757,7 +5122,7 @@ export const zFeatureFormAssignmentParameters = z.object({
|
|
|
4757
5122
|
'QUARTERLY'
|
|
4758
5123
|
]).nullish(),
|
|
4759
5124
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4760
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
5125
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4761
5126
|
reminders_attributes: z.array(z.object({
|
|
4762
5127
|
offset: z.enum([
|
|
4763
5128
|
'PT0S',
|
|
@@ -4821,7 +5186,7 @@ export const zFeatureFormAssignmentUpdateParameters = z.object({
|
|
|
4821
5186
|
'QUARTERLY'
|
|
4822
5187
|
]).nullish(),
|
|
4823
5188
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4824
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
5189
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4825
5190
|
reminders_attributes: z.array(z.object({
|
|
4826
5191
|
offset: z.enum([
|
|
4827
5192
|
'PT0S',
|
|
@@ -4886,7 +5251,7 @@ export const zJobFormAssignmentParameters = z.object({
|
|
|
4886
5251
|
'QUARTERLY'
|
|
4887
5252
|
]).nullish(),
|
|
4888
5253
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4889
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
5254
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4890
5255
|
reminders_attributes: z.array(z.object({
|
|
4891
5256
|
offset: z.enum([
|
|
4892
5257
|
'PT0S',
|
|
@@ -4950,7 +5315,7 @@ export const zJobFormAssignmentUpdateParameters = z.object({
|
|
|
4950
5315
|
'QUARTERLY'
|
|
4951
5316
|
]).nullish(),
|
|
4952
5317
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4953
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
5318
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4954
5319
|
reminders_attributes: z.array(z.object({
|
|
4955
5320
|
offset: z.enum([
|
|
4956
5321
|
'PT0S',
|
|
@@ -5021,23 +5386,23 @@ export const zPayRatesRulePackageUpdateParameters = z.object({
|
|
|
5021
5386
|
description: z.string().nullish()
|
|
5022
5387
|
});
|
|
5023
5388
|
/**
|
|
5024
|
-
* Request body for creating or updating a position on a job. The job is taken from the URL path.
|
|
5389
|
+
* Request body for creating or updating a position on a job. The job is taken from the URL path. Send only the fields to set; omitted fields keep their stored values. An undeclared key answers 400; a wrong type, null where it is not accepted, or a blank ID answers 422 at the field's pointer.
|
|
5025
5390
|
*/
|
|
5026
5391
|
export const zPositionParameters = z.object({
|
|
5027
|
-
fulfilled_by_user_id: z.string().nullish(),
|
|
5028
|
-
start_time: z.iso.date().
|
|
5029
|
-
end_time: z.iso.date().
|
|
5030
|
-
position_function_id: z.string().nullish(),
|
|
5031
|
-
per_diem_id: z.string().nullish(),
|
|
5032
|
-
|
|
5392
|
+
fulfilled_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
5393
|
+
start_time: z.iso.date().optional(),
|
|
5394
|
+
end_time: z.iso.date().optional(),
|
|
5395
|
+
position_function_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
5396
|
+
per_diem_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
5397
|
+
pay_rates_rule_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
5033
5398
|
pwa: z.boolean().optional(),
|
|
5034
|
-
cash_fringe_rate_cents: z.
|
|
5035
|
-
hourly_rate_cents: z.
|
|
5036
|
-
pwa_wage_pay_rate_cents: z.
|
|
5037
|
-
wage_adder_rate_cents: z.
|
|
5399
|
+
cash_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
5400
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
5401
|
+
pwa_wage_pay_rate_cents: z.string().regex(/^-?[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
5402
|
+
wage_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
5038
5403
|
job_wage_determination_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
5039
5404
|
pwa_details_attributes: z.object({
|
|
5040
|
-
skill_level: z.
|
|
5405
|
+
skill_level: z.enum(['journeyman', 'foreman']).nullable()
|
|
5041
5406
|
}).optional()
|
|
5042
5407
|
});
|
|
5043
5408
|
/**
|
|
@@ -5045,7 +5410,7 @@ export const zPositionParameters = z.object({
|
|
|
5045
5410
|
*/
|
|
5046
5411
|
export const zProductionJobScopePriceParameters = z.object({
|
|
5047
5412
|
scope_kind: z.string(),
|
|
5048
|
-
unit_price: z.string(),
|
|
5413
|
+
unit_price: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
5049
5414
|
contracted_count: z.int().nullish(),
|
|
5050
5415
|
unit_of_measure: z.string().optional()
|
|
5051
5416
|
});
|
|
@@ -5054,7 +5419,7 @@ export const zProductionJobScopePriceParameters = z.object({
|
|
|
5054
5419
|
*/
|
|
5055
5420
|
export const zProductionJobScopePriceUpdateParameters = z.object({
|
|
5056
5421
|
scope_kind: z.string().optional(),
|
|
5057
|
-
unit_price: z.string().optional(),
|
|
5422
|
+
unit_price: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
5058
5423
|
contracted_count: z.int().nullish(),
|
|
5059
5424
|
unit_of_measure: z.string().optional()
|
|
5060
5425
|
});
|
|
@@ -5168,20 +5533,20 @@ export const zFormAssignmentTaskResponseObject = z.array(z.object({
|
|
|
5168
5533
|
}))
|
|
5169
5534
|
}));
|
|
5170
5535
|
/**
|
|
5171
|
-
* Request body for creating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only.
|
|
5536
|
+
* Request body for creating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only. Omitting company_id or name answers 400, and a null or blank one, or any wrong-typed value, answers 422.
|
|
5172
5537
|
*/
|
|
5173
5538
|
export const zCertificationParameters = z.object({
|
|
5174
|
-
company_id: z.string(),
|
|
5175
|
-
name: z.string(),
|
|
5539
|
+
company_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
5540
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
5176
5541
|
description: z.string().nullish(),
|
|
5177
5542
|
verified: z.boolean().optional(),
|
|
5178
5543
|
duration: z.string().nullish()
|
|
5179
5544
|
});
|
|
5180
5545
|
/**
|
|
5181
|
-
* Request body for updating a certification — a named qualification a worker can hold. Include only the fields to change. You can only manage your own company's certifications; global (platform) certifications are read-only. The certification's company is fixed at creation.
|
|
5546
|
+
* Request body for updating a certification — a named qualification a worker can hold. Include only the fields to change. You can only manage your own company's certifications; global (platform) certifications are read-only. The certification's company is fixed at creation. A null or blank name, or any wrong-typed value, answers 422.
|
|
5182
5547
|
*/
|
|
5183
5548
|
export const zCertificationUpdateParameters = z.object({
|
|
5184
|
-
name: z.string().optional(),
|
|
5549
|
+
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5185
5550
|
description: z.string().nullish(),
|
|
5186
5551
|
verified: z.boolean().optional(),
|
|
5187
5552
|
duration: z.string().nullish()
|
|
@@ -5262,10 +5627,10 @@ export const zUserCertificationUpdateParameters = z.object({
|
|
|
5262
5627
|
archived_at: z.iso.datetime().nullish()
|
|
5263
5628
|
});
|
|
5264
5629
|
/**
|
|
5265
|
-
* Request body for approving a certification held by a worker. A user key approves in its own user's name and
|
|
5630
|
+
* Request body for approving a certification held by a worker. A user key approves in its own user's name and must omit approved_by_user_id. A company key must name the approver.
|
|
5266
5631
|
*/
|
|
5267
5632
|
export const zUserCertificationApprovalParameters = z.object({
|
|
5268
|
-
approved_by_user_id: z.string().optional()
|
|
5633
|
+
approved_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
5269
5634
|
});
|
|
5270
5635
|
/**
|
|
5271
5636
|
* A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
|
|
@@ -5456,199 +5821,58 @@ export const zUserResponseObject = z.object({
|
|
|
5456
5821
|
state: z.string().nullable(),
|
|
5457
5822
|
birth_date: z.string().nullable(),
|
|
5458
5823
|
dol_apprentice_no: z.string().nullable(),
|
|
5459
|
-
avatar_url: z.string().nullable(),
|
|
5460
|
-
created_at: z.iso.datetime(),
|
|
5461
|
-
updated_at: z.iso.datetime(),
|
|
5462
|
-
winda_id: z.string().nullable(),
|
|
5463
|
-
linkedin_url: z.string().nullable(),
|
|
5464
|
-
employment_state: z.enum([
|
|
5465
|
-
'active',
|
|
5466
|
-
'scheduled',
|
|
5467
|
-
'terminated',
|
|
5468
|
-
'none'
|
|
5469
|
-
]),
|
|
5470
|
-
employment_id: z.string().nullable(),
|
|
5471
|
-
type: zUserCompanyType,
|
|
5472
|
-
title: z.string().nullable(),
|
|
5473
|
-
overtime_eligible: z.boolean().nullable(),
|
|
5474
|
-
enrolled_in_t_and_a: z.boolean().nullable(),
|
|
5475
|
-
payroll_id: z.string().nullable(),
|
|
5476
|
-
compensation_type: z.enum(['hourly', 'salary']).nullable(),
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
worked_annual_minutes: z.int().nullable(),
|
|
5482
|
-
pto_annual_minutes: z.int().nullable(),
|
|
5483
|
-
holiday_annual_minutes: z.int().nullable(),
|
|
5484
|
-
training_annual_minutes: z.int().nullable(),
|
|
5485
|
-
hire_date: z.string().nullable(),
|
|
5486
|
-
termination_date: z.string().nullable(),
|
|
5487
|
-
employment_window: z.object({
|
|
5488
|
-
valid_from: z.iso.datetime().nullable(),
|
|
5489
|
-
valid_to: z.iso.datetime().nullable()
|
|
5490
|
-
}).nullable(),
|
|
5491
|
-
manager_user_id: z.string().nullable(),
|
|
5492
|
-
custom_fields: z.array(zCustomFieldResponseObject).nullable(),
|
|
5493
|
-
roles: z.array(z.string()),
|
|
5494
|
-
company_user_pwa_info: z.object({
|
|
5495
|
-
id: z.string(),
|
|
5496
|
-
address1: z.string().nullable(),
|
|
5497
|
-
address2: z.string().nullable(),
|
|
5498
|
-
city: z.string().nullable(),
|
|
5499
|
-
state: z.string().nullable(),
|
|
5500
|
-
zip: z.string().nullable(),
|
|
5501
|
-
race: z.array(z.string()).nullable(),
|
|
5502
|
-
sex: z.string().nullable(),
|
|
5503
|
-
local_business_license: z.string().nullable(),
|
|
5504
|
-
drivers_license_state: z.string().nullable(),
|
|
5505
|
-
drivers_license_number: z.string().nullable(),
|
|
5506
|
-
veteran_status: z.string().nullable(),
|
|
5507
|
-
hispanic_origin: z.string().nullable(),
|
|
5508
|
-
ssn: z.string().nullable(),
|
|
5509
|
-
disabled: z.boolean().nullable(),
|
|
5510
|
-
ca_dir_withholding_exemptions: z.int().nullable(),
|
|
5511
|
-
il_dol_race: z.enum([
|
|
5512
|
-
'white',
|
|
5513
|
-
'black',
|
|
5514
|
-
'hispanic_or_latino',
|
|
5515
|
-
'american_indian_or_alaska_native',
|
|
5516
|
-
'chinese',
|
|
5517
|
-
'filipino',
|
|
5518
|
-
'asian_india',
|
|
5519
|
-
'vietnamese',
|
|
5520
|
-
'korean',
|
|
5521
|
-
'japanese',
|
|
5522
|
-
'native_hawaiian',
|
|
5523
|
-
'samoan',
|
|
5524
|
-
'chamorro',
|
|
5525
|
-
'other_asian',
|
|
5526
|
-
'other_pacific_islander',
|
|
5527
|
-
'other'
|
|
5528
|
-
]).nullable(),
|
|
5529
|
-
il_shines_employment_type: z.enum([
|
|
5530
|
-
'part_time',
|
|
5531
|
-
'full_time',
|
|
5532
|
-
'seasonal_temporary',
|
|
5533
|
-
'independent_contract'
|
|
5534
|
-
]).nullable(),
|
|
5535
|
-
il_shines_eep_qualifiers: z.array(z.enum([
|
|
5536
|
-
'eep_program_completed',
|
|
5537
|
-
'foster_care',
|
|
5538
|
-
'formerly_incarcerated',
|
|
5539
|
-
'equity_investment_eligible_community',
|
|
5540
|
-
'self_registered_or_unknown'
|
|
5541
|
-
])).nullable(),
|
|
5542
|
-
il_shines_other_programs: z.array(z.enum([
|
|
5543
|
-
'solar_training_pipeline_program',
|
|
5544
|
-
'craft_apprenticeship_program',
|
|
5545
|
-
'multi_cultural_jobs_program',
|
|
5546
|
-
'clean_jobs_workforce_network_program',
|
|
5547
|
-
'illinois_climate_works_prep_apprenticeship_program',
|
|
5548
|
-
'returning_residents_clean_jobs_training_program',
|
|
5549
|
-
'other'
|
|
5550
|
-
])).nullable(),
|
|
5551
|
-
or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullable(),
|
|
5552
|
-
or_boli_race: z.array(z.enum([
|
|
5553
|
-
'american_indian_or_alaska_native',
|
|
5554
|
-
'asian',
|
|
5555
|
-
'hispanic_or_latino',
|
|
5556
|
-
'black_or_african_american',
|
|
5557
|
-
'native_hawaiian_or_pacific_islander',
|
|
5558
|
-
'white',
|
|
5559
|
-
'portuguese_or_brazilian'
|
|
5560
|
-
])).nullable()
|
|
5561
|
-
}).nullable()
|
|
5562
|
-
});
|
|
5563
|
-
export const zUserParameters = z.intersection(z.union([
|
|
5564
|
-
z.object({
|
|
5565
|
-
email: z.string().min(1)
|
|
5566
|
-
}),
|
|
5567
|
-
z.object({
|
|
5568
|
-
phone_number: z.string().min(1)
|
|
5569
|
-
}),
|
|
5570
|
-
z.object({
|
|
5571
|
-
skip_invite: z.literal(true)
|
|
5572
|
-
})
|
|
5573
|
-
]), z.object({
|
|
5574
|
-
email: z.string().nullish(),
|
|
5575
|
-
personal_email: z.string().nullish(),
|
|
5576
|
-
phone_number: z.string().nullish(),
|
|
5577
|
-
first_name: z.string(),
|
|
5578
|
-
last_name: z.string(),
|
|
5579
|
-
preferred_first_name: z.string().nullish(),
|
|
5580
|
-
preferred_last_name: z.string().nullish(),
|
|
5581
|
-
city: z.string().optional(),
|
|
5582
|
-
state: z.string().optional(),
|
|
5583
|
-
birth_date: z.string().optional(),
|
|
5584
|
-
dol_apprentice_no: z.string().optional(),
|
|
5585
|
-
winda_id: z.string().optional(),
|
|
5586
|
-
linkedin_url: z.string().optional(),
|
|
5587
|
-
roles: z.array(z.string()).nullish(),
|
|
5588
|
-
avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
5589
|
-
created_by_user_id: z.string().optional(),
|
|
5590
|
-
last_sent_by_user_id: z.string().nullish(),
|
|
5591
|
-
skip_notify: z.boolean().optional(),
|
|
5592
|
-
skip_invite: z.boolean().optional(),
|
|
5593
|
-
type: zUserCompanyType.optional(),
|
|
5594
|
-
title: z.string().optional(),
|
|
5595
|
-
manager_user_id: z.string().optional(),
|
|
5596
|
-
payroll_id: z.string().optional(),
|
|
5597
|
-
hourly_rate: z.string().optional(),
|
|
5598
|
-
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
5599
|
-
overtime_eligible: z.string().optional(),
|
|
5600
|
-
enrolled_in_t_and_a: z.string().optional(),
|
|
5601
|
-
training_annual_amount: z.string().optional(),
|
|
5602
|
-
employer_combined_health_amount: z.string().nullish(),
|
|
5603
|
-
employer_combined_savings: z.string().nullish(),
|
|
5604
|
-
worked_annual_minutes: z.string().optional(),
|
|
5605
|
-
pto_annual_minutes: z.string().optional(),
|
|
5606
|
-
holiday_annual_minutes: z.string().optional(),
|
|
5607
|
-
training_annual_minutes: z.string().optional(),
|
|
5608
|
-
hire_date: z.string().optional(),
|
|
5609
|
-
group_ids: z.array(z.uuid()).nullish(),
|
|
5610
|
-
custom_fields: z.array(z.object({
|
|
5611
|
-
custom_field_config_id: z.string(),
|
|
5612
|
-
value: z.string().nullable()
|
|
5613
|
-
})).optional(),
|
|
5614
|
-
company_user_pwa_info: z.object({
|
|
5615
|
-
address1: z.string().nullish(),
|
|
5616
|
-
address2: z.string().nullish(),
|
|
5617
|
-
city: z.string().nullish(),
|
|
5618
|
-
state: z.string().nullish(),
|
|
5619
|
-
zip: z.string().nullish(),
|
|
5620
|
-
race: z.array(z.enum([
|
|
5621
|
-
'AFRICAN_AMERICAN',
|
|
5622
|
-
'ASIAN',
|
|
5623
|
-
'CAUCASIAN',
|
|
5624
|
-
'NATIVE_AMERICAN',
|
|
5625
|
-
'NOT_SPECIFIED',
|
|
5626
|
-
'OTHER'
|
|
5627
|
-
])).optional(),
|
|
5628
|
-
sex: z.enum([
|
|
5629
|
-
'female',
|
|
5630
|
-
'male',
|
|
5631
|
-
'non_binary',
|
|
5632
|
-
'not_specified'
|
|
5633
|
-
]).nullish(),
|
|
5634
|
-
local_business_license: z.string().nullish(),
|
|
5635
|
-
drivers_license_state: z.string().nullish(),
|
|
5636
|
-
drivers_license_number: z.string().nullish(),
|
|
5637
|
-
ssn: z.string().nullish(),
|
|
5638
|
-
veteran_status: z.enum([
|
|
5639
|
-
'protected_veteran',
|
|
5640
|
-
'not_protected_veteran',
|
|
5641
|
-
'reserves',
|
|
5642
|
-
'guard',
|
|
5643
|
-
'not_specified'
|
|
5644
|
-
]).nullish(),
|
|
5645
|
-
hispanic_origin: z.enum([
|
|
5646
|
-
'yes',
|
|
5647
|
-
'no',
|
|
5648
|
-
'not_specified'
|
|
5649
|
-
]).nullish(),
|
|
5650
|
-
ca_dir_withholding_exemptions: z.int().nullish(),
|
|
5651
|
-
disabled: z.boolean().optional(),
|
|
5824
|
+
avatar_url: z.string().nullable(),
|
|
5825
|
+
created_at: z.iso.datetime(),
|
|
5826
|
+
updated_at: z.iso.datetime(),
|
|
5827
|
+
winda_id: z.string().nullable(),
|
|
5828
|
+
linkedin_url: z.string().nullable(),
|
|
5829
|
+
employment_state: z.enum([
|
|
5830
|
+
'active',
|
|
5831
|
+
'scheduled',
|
|
5832
|
+
'terminated',
|
|
5833
|
+
'none'
|
|
5834
|
+
]),
|
|
5835
|
+
employment_id: z.string().nullable(),
|
|
5836
|
+
type: zUserCompanyType,
|
|
5837
|
+
title: z.string().nullable(),
|
|
5838
|
+
overtime_eligible: z.boolean().nullable(),
|
|
5839
|
+
enrolled_in_t_and_a: z.boolean().nullable(),
|
|
5840
|
+
payroll_id: z.string().nullable(),
|
|
5841
|
+
compensation_type: z.enum(['hourly', 'salary']).nullable(),
|
|
5842
|
+
hourly_rate_cents: z.string().nullish(),
|
|
5843
|
+
training_annual_amount_cents: z.string().nullish(),
|
|
5844
|
+
employer_combined_health_amount_cents: z.string().nullish(),
|
|
5845
|
+
employer_combined_savings_cents: z.string().nullish(),
|
|
5846
|
+
worked_annual_minutes: z.int().nullable(),
|
|
5847
|
+
pto_annual_minutes: z.int().nullable(),
|
|
5848
|
+
holiday_annual_minutes: z.int().nullable(),
|
|
5849
|
+
training_annual_minutes: z.int().nullable(),
|
|
5850
|
+
hire_date: z.string().nullable(),
|
|
5851
|
+
termination_date: z.string().nullable(),
|
|
5852
|
+
employment_window: z.object({
|
|
5853
|
+
valid_from: z.iso.datetime().nullable(),
|
|
5854
|
+
valid_to: z.iso.datetime().nullable()
|
|
5855
|
+
}).nullable(),
|
|
5856
|
+
manager_user_id: z.string().nullable(),
|
|
5857
|
+
custom_fields: z.array(zCustomFieldResponseObject).nullable(),
|
|
5858
|
+
roles: z.array(z.string()),
|
|
5859
|
+
company_user_pwa_info: z.object({
|
|
5860
|
+
id: z.string(),
|
|
5861
|
+
address1: z.string().nullable(),
|
|
5862
|
+
address2: z.string().nullable(),
|
|
5863
|
+
city: z.string().nullable(),
|
|
5864
|
+
state: z.string().nullable(),
|
|
5865
|
+
zip: z.string().nullable(),
|
|
5866
|
+
race: z.array(z.string()).nullable(),
|
|
5867
|
+
sex: z.string().nullable(),
|
|
5868
|
+
local_business_license: z.string().nullable(),
|
|
5869
|
+
drivers_license_state: z.string().nullable(),
|
|
5870
|
+
drivers_license_number: z.string().nullable(),
|
|
5871
|
+
veteran_status: z.string().nullable(),
|
|
5872
|
+
hispanic_origin: z.string().nullable(),
|
|
5873
|
+
ssn: z.string().nullable(),
|
|
5874
|
+
disabled: z.boolean().nullable(),
|
|
5875
|
+
ca_dir_withholding_exemptions: z.int().nullable(),
|
|
5652
5876
|
il_dol_race: z.enum([
|
|
5653
5877
|
'white',
|
|
5654
5878
|
'black',
|
|
@@ -5666,20 +5890,20 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
5666
5890
|
'other_asian',
|
|
5667
5891
|
'other_pacific_islander',
|
|
5668
5892
|
'other'
|
|
5669
|
-
]).
|
|
5893
|
+
]).nullable(),
|
|
5670
5894
|
il_shines_employment_type: z.enum([
|
|
5671
5895
|
'part_time',
|
|
5672
5896
|
'full_time',
|
|
5673
5897
|
'seasonal_temporary',
|
|
5674
5898
|
'independent_contract'
|
|
5675
|
-
]).
|
|
5899
|
+
]).nullable(),
|
|
5676
5900
|
il_shines_eep_qualifiers: z.array(z.enum([
|
|
5677
5901
|
'eep_program_completed',
|
|
5678
5902
|
'foster_care',
|
|
5679
5903
|
'formerly_incarcerated',
|
|
5680
5904
|
'equity_investment_eligible_community',
|
|
5681
5905
|
'self_registered_or_unknown'
|
|
5682
|
-
])).
|
|
5906
|
+
])).nullable(),
|
|
5683
5907
|
il_shines_other_programs: z.array(z.enum([
|
|
5684
5908
|
'solar_training_pipeline_program',
|
|
5685
5909
|
'craft_apprenticeship_program',
|
|
@@ -5688,8 +5912,8 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
5688
5912
|
'illinois_climate_works_prep_apprenticeship_program',
|
|
5689
5913
|
'returning_residents_clean_jobs_training_program',
|
|
5690
5914
|
'other'
|
|
5691
|
-
])).
|
|
5692
|
-
or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).
|
|
5915
|
+
])).nullable(),
|
|
5916
|
+
or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullable(),
|
|
5693
5917
|
or_boli_race: z.array(z.enum([
|
|
5694
5918
|
'american_indian_or_alaska_native',
|
|
5695
5919
|
'asian',
|
|
@@ -5698,48 +5922,8 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
5698
5922
|
'native_hawaiian_or_pacific_islander',
|
|
5699
5923
|
'white',
|
|
5700
5924
|
'portuguese_or_brazilian'
|
|
5701
|
-
])).
|
|
5702
|
-
}).
|
|
5703
|
-
}));
|
|
5704
|
-
/**
|
|
5705
|
-
* Request body for updating a worker's employment at your company. Corrects administrative fields (employment type, title, manager, payroll id, hire date, and time-and-attendance enrollment) across the whole employment history, and changes the custom-field values it lists. For time-effective pay changes, use the scheduled-changes endpoints instead.
|
|
5706
|
-
*/
|
|
5707
|
-
export const zUserCompanyParameters = z.object({
|
|
5708
|
-
type: zUserCompanyType.optional(),
|
|
5709
|
-
title: z.string().nullish(),
|
|
5710
|
-
manager_user_id: z.string().nullish(),
|
|
5711
|
-
payroll_id: z.string().nullish(),
|
|
5712
|
-
hire_date: z.string().nullish(),
|
|
5713
|
-
enrolled_in_t_and_a: z.boolean().optional(),
|
|
5714
|
-
custom_fields: z.array(z.object({
|
|
5715
|
-
custom_field_config_id: z.string(),
|
|
5716
|
-
value: z.string().nullable()
|
|
5717
|
-
})).optional()
|
|
5718
|
-
});
|
|
5719
|
-
/**
|
|
5720
|
-
* Request body for adding a worker to your company, creating their employment record and its custom-field values. hire_date is required and sets when employment begins; the remaining fields seed the initial title, pay, benefits, and accruals. Returns the worker with the new employment flattened onto it.
|
|
5721
|
-
*/
|
|
5722
|
-
export const zUserCompanyCreateParameters = z.object({
|
|
5723
|
-
hire_date: z.string(),
|
|
5724
|
-
type: zUserCompanyType.optional(),
|
|
5725
|
-
title: z.string().nullish(),
|
|
5726
|
-
manager_user_id: z.string().nullish(),
|
|
5727
|
-
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
5728
|
-
enrolled_in_t_and_a: z.boolean().optional(),
|
|
5729
|
-
payroll_id: z.string().nullish(),
|
|
5730
|
-
hourly_rate: z.string().nullish(),
|
|
5731
|
-
overtime_eligible: z.boolean().optional(),
|
|
5732
|
-
training_annual_amount: z.string().nullish(),
|
|
5733
|
-
employer_combined_health_amount: z.string().nullish(),
|
|
5734
|
-
employer_combined_savings: z.string().nullish(),
|
|
5735
|
-
worked_annual_minutes: z.int().nullish(),
|
|
5736
|
-
pto_annual_minutes: z.int().nullish(),
|
|
5737
|
-
holiday_annual_minutes: z.int().nullish(),
|
|
5738
|
-
training_annual_minutes: z.int().nullish(),
|
|
5739
|
-
custom_fields: z.array(z.object({
|
|
5740
|
-
custom_field_config_id: z.string(),
|
|
5741
|
-
value: z.string().nullable()
|
|
5742
|
-
})).optional()
|
|
5925
|
+
])).nullable()
|
|
5926
|
+
}).nullable()
|
|
5743
5927
|
});
|
|
5744
5928
|
/**
|
|
5745
5929
|
* Keyset pagination cursors for the collection.
|
|
@@ -5833,17 +6017,7 @@ export const zTimeEntryDeltasResponse = z.object({
|
|
|
5833
6017
|
export const zPayPeriodsResponseObject = z.object({
|
|
5834
6018
|
meta: zMeta,
|
|
5835
6019
|
links: zLinks,
|
|
5836
|
-
data: z.array(
|
|
5837
|
-
id: z.string(),
|
|
5838
|
-
timekeeping_pay_period_config_id: z.string(),
|
|
5839
|
-
pay_date: z.iso.date(),
|
|
5840
|
-
start_time: z.iso.datetime(),
|
|
5841
|
-
end_time: z.iso.datetime(),
|
|
5842
|
-
pay_run_deadline: z.iso.datetime(),
|
|
5843
|
-
approvals_deadline: z.iso.datetime(),
|
|
5844
|
-
created_at: z.iso.datetime(),
|
|
5845
|
-
updated_at: z.iso.datetime()
|
|
5846
|
-
}))
|
|
6020
|
+
data: z.array(zPayPeriodResponseObject)
|
|
5847
6021
|
});
|
|
5848
6022
|
/**
|
|
5849
6023
|
* A page of job time card days, with pagination metadata and navigation links.
|
|
@@ -5909,6 +6083,14 @@ export const zJobSitesResponseObject = z.object({
|
|
|
5909
6083
|
links: zLinks,
|
|
5910
6084
|
data: z.array(zJobSiteResponseObject)
|
|
5911
6085
|
});
|
|
6086
|
+
/**
|
|
6087
|
+
* A page of a job's documents, with pagination metadata and navigation links.
|
|
6088
|
+
*/
|
|
6089
|
+
export const zJobDocumentsResponseObject = z.object({
|
|
6090
|
+
meta: zMeta,
|
|
6091
|
+
links: zLinks,
|
|
6092
|
+
data: z.array(zJobDocumentResponseObject)
|
|
6093
|
+
});
|
|
5912
6094
|
/**
|
|
5913
6095
|
* A page of a job's good-faith-effort exceptions, with pagination metadata and navigation links.
|
|
5914
6096
|
*/
|
|
@@ -6166,35 +6348,6 @@ export const zFederalJobWageDeterminationHistoryCorrectionObject = z.object({
|
|
|
6166
6348
|
created_at: z.iso.datetime(),
|
|
6167
6349
|
updated_at: z.iso.datetime()
|
|
6168
6350
|
});
|
|
6169
|
-
/**
|
|
6170
|
-
* State-specific rate fields for a Regional determination, as decimal-string money in cents
|
|
6171
|
-
* (e.g. "538.0"). These nine properties are the whole write vocabulary, but which of them a
|
|
6172
|
-
* request may send is set by the job's region, not the request — sending a key the job's
|
|
6173
|
-
* region does not allow returns a 422:
|
|
6174
|
-
*
|
|
6175
|
-
* - Categorized-fringe regions (currently IL) accept `combined_health_fringe_rate_cents`,
|
|
6176
|
-
* `combined_savings_fringe_rate_cents`, `combined_holiday_pto_fringe_rate_cents`,
|
|
6177
|
-
* `training_fringe_rate_cents`, and `other_fringe_rate_cents`.
|
|
6178
|
-
* - Overtime-adder regions (currently IL and NY) accept `one_five_x_adder_rate_cents`,
|
|
6179
|
-
* `two_x_adder_rate_cents`, `one_five_x_fringe_adder_rate_cents`, and
|
|
6180
|
-
* `two_x_fringe_adder_rate_cents`.
|
|
6181
|
-
*
|
|
6182
|
-
* In a categorized-fringe region the five fringe keys are required, not merely accepted —
|
|
6183
|
-
* omitting any of them returns a 422. Categorized-fringe values are non-null when present;
|
|
6184
|
-
* overtime-adder values may be null.
|
|
6185
|
-
*
|
|
6186
|
-
*/
|
|
6187
|
-
export const zRegionalWageDeterminationFields = z.object({
|
|
6188
|
-
combined_health_fringe_rate_cents: z.string().optional(),
|
|
6189
|
-
combined_savings_fringe_rate_cents: z.string().optional(),
|
|
6190
|
-
combined_holiday_pto_fringe_rate_cents: z.string().optional(),
|
|
6191
|
-
training_fringe_rate_cents: z.string().optional(),
|
|
6192
|
-
other_fringe_rate_cents: z.string().optional(),
|
|
6193
|
-
one_five_x_adder_rate_cents: z.string().nullish(),
|
|
6194
|
-
two_x_adder_rate_cents: z.string().nullish(),
|
|
6195
|
-
one_five_x_fringe_adder_rate_cents: z.string().nullish(),
|
|
6196
|
-
two_x_fringe_adder_rate_cents: z.string().nullish()
|
|
6197
|
-
});
|
|
6198
6351
|
/**
|
|
6199
6352
|
* State-specific rate fields recorded on a Regional determination, as decimal-string money in
|
|
6200
6353
|
* cents (e.g. "538.0"). Which keys appear is set by the job's region, so this object is always
|
|
@@ -6317,14 +6470,14 @@ export const zJobWageDeterminationHistoryVersionObject = z.discriminatedUnion('t
|
|
|
6317
6470
|
zRegionalJobWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
|
|
6318
6471
|
]);
|
|
6319
6472
|
/**
|
|
6320
|
-
* Parameters for creating a Federal (Davis-Bacon) wage determination on a job.
|
|
6473
|
+
* Parameters for creating a Federal (Davis-Bacon) wage determination on a job. A Federal determination holds no regional rates, so a body sending `regional_fields` returns a 422.
|
|
6321
6474
|
*/
|
|
6322
6475
|
export const zFederalJobWageDeterminationParameters = z.object({
|
|
6323
6476
|
type: z.enum(['Pwa::JobWageDeterminations::Federal']),
|
|
6324
|
-
labor_classification: z.string(),
|
|
6325
|
-
pwa_trade_id: z.string(),
|
|
6326
|
-
hourly_rate_cents: z.string(),
|
|
6327
|
-
fringe_rate_cents: z.string(),
|
|
6477
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6478
|
+
pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6479
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
6480
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
6328
6481
|
class_code: z.string().nullish(),
|
|
6329
6482
|
construction_category: z.enum([
|
|
6330
6483
|
'building',
|
|
@@ -6332,20 +6485,38 @@ export const zFederalJobWageDeterminationParameters = z.object({
|
|
|
6332
6485
|
'highway',
|
|
6333
6486
|
'residential'
|
|
6334
6487
|
]).nullish(),
|
|
6335
|
-
general_wage_determination: z.string().nullish()
|
|
6488
|
+
general_wage_determination: z.string().nullish(),
|
|
6489
|
+
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
6336
6490
|
});
|
|
6337
6491
|
/**
|
|
6338
6492
|
* Parameters for creating a Regional (state prevailing-wage) wage determination on a job.
|
|
6339
6493
|
*/
|
|
6340
6494
|
export const zRegionalJobWageDeterminationParameters = z.object({
|
|
6341
6495
|
type: z.enum(['Pwa::JobWageDeterminations::Regional']),
|
|
6342
|
-
labor_classification: z.string(),
|
|
6343
|
-
pwa_trade_id: z.string(),
|
|
6344
|
-
hourly_rate_cents: z.string(),
|
|
6345
|
-
fringe_rate_cents: z.string().optional(),
|
|
6496
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6497
|
+
pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6498
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
6499
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6500
|
+
class_code: z.string().nullish(),
|
|
6501
|
+
construction_category: z.enum([
|
|
6502
|
+
'building',
|
|
6503
|
+
'heavy',
|
|
6504
|
+
'highway',
|
|
6505
|
+
'residential'
|
|
6506
|
+
]).nullish(),
|
|
6346
6507
|
general_wage_determination: z.string().nullish(),
|
|
6347
|
-
|
|
6348
|
-
|
|
6508
|
+
regional_fields: z.object({
|
|
6509
|
+
combined_health_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6510
|
+
combined_savings_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6511
|
+
combined_holiday_pto_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6512
|
+
training_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6513
|
+
other_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6514
|
+
one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6515
|
+
two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6516
|
+
one_five_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6517
|
+
two_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
6518
|
+
}).optional(),
|
|
6519
|
+
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
6349
6520
|
});
|
|
6350
6521
|
/**
|
|
6351
6522
|
* Parameters for creating a job wage determination. Provide the Federal or Regional shape; the type discriminator selects which. Editing an existing determination uses the update parameters, which take an `effective_from` instead of a type.
|
|
@@ -6359,11 +6530,11 @@ export const zJobWageDeterminationParameters = z.discriminatedUnion('type', [
|
|
|
6359
6530
|
*/
|
|
6360
6531
|
export const zJobWageDeterminationUpdateParameters = z.object({
|
|
6361
6532
|
effective_from: z.iso.date().optional(),
|
|
6362
|
-
overtime_package_id: z.string().nullish(),
|
|
6363
|
-
labor_classification: z.string().optional(),
|
|
6364
|
-
pwa_trade_id: z.string().optional(),
|
|
6365
|
-
hourly_rate_cents: z.string().optional(),
|
|
6366
|
-
fringe_rate_cents: z.string().optional(),
|
|
6533
|
+
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
6534
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
6535
|
+
pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
6536
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6537
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6367
6538
|
class_code: z.string().nullish(),
|
|
6368
6539
|
construction_category: z.enum([
|
|
6369
6540
|
'building',
|
|
@@ -6372,16 +6543,26 @@ export const zJobWageDeterminationUpdateParameters = z.object({
|
|
|
6372
6543
|
'residential'
|
|
6373
6544
|
]).nullish(),
|
|
6374
6545
|
general_wage_determination: z.string().nullish(),
|
|
6375
|
-
regional_fields:
|
|
6546
|
+
regional_fields: z.object({
|
|
6547
|
+
combined_health_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6548
|
+
combined_savings_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6549
|
+
combined_holiday_pto_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6550
|
+
training_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6551
|
+
other_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6552
|
+
one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6553
|
+
two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6554
|
+
one_five_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6555
|
+
two_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
6556
|
+
}).optional()
|
|
6376
6557
|
});
|
|
6377
6558
|
/**
|
|
6378
6559
|
* Parameters for an effective-dated change to a job wage determination, applying from a calendar date forward. The type is fixed by the determination the id names and is not sent.
|
|
6379
6560
|
*/
|
|
6380
6561
|
export const zJobWageDeterminationScheduledChangeParameters = z.object({
|
|
6381
6562
|
effective_date: z.iso.date(),
|
|
6382
|
-
labor_classification: z.string().optional(),
|
|
6383
|
-
hourly_rate_cents: z.string().optional(),
|
|
6384
|
-
fringe_rate_cents: z.string().optional(),
|
|
6563
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
6564
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6565
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6385
6566
|
class_code: z.string().nullish(),
|
|
6386
6567
|
construction_category: z.enum([
|
|
6387
6568
|
'building',
|
|
@@ -6390,7 +6571,17 @@ export const zJobWageDeterminationScheduledChangeParameters = z.object({
|
|
|
6390
6571
|
'residential'
|
|
6391
6572
|
]).nullish(),
|
|
6392
6573
|
general_wage_determination: z.string().nullish(),
|
|
6393
|
-
regional_fields:
|
|
6574
|
+
regional_fields: z.object({
|
|
6575
|
+
combined_health_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6576
|
+
combined_savings_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6577
|
+
combined_holiday_pto_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6578
|
+
training_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6579
|
+
other_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6580
|
+
one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6581
|
+
two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6582
|
+
one_five_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6583
|
+
two_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
6584
|
+
}).optional()
|
|
6394
6585
|
});
|
|
6395
6586
|
/**
|
|
6396
6587
|
* Parameters for moving where a job wage determination's timeline begins.
|
|
@@ -6558,14 +6749,14 @@ export const zProjectWageDeterminationHistoryVersionObject = z.discriminatedUnio
|
|
|
6558
6749
|
zRegionalProjectWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
|
|
6559
6750
|
]);
|
|
6560
6751
|
/**
|
|
6561
|
-
* Parameters for creating a Federal (Davis-Bacon) wage determination on a project.
|
|
6752
|
+
* Parameters for creating a Federal (Davis-Bacon) wage determination on a project. A Federal determination holds no regional rates, so a body sending `regional_fields` returns a 422.
|
|
6562
6753
|
*/
|
|
6563
6754
|
export const zFederalProjectWageDeterminationParameters = z.object({
|
|
6564
6755
|
type: z.enum(['Pwa::ProjectWageDeterminations::Federal']),
|
|
6565
|
-
labor_classification: z.string(),
|
|
6566
|
-
pwa_trade_id: z.string(),
|
|
6567
|
-
hourly_rate_cents: z.string(),
|
|
6568
|
-
fringe_rate_cents: z.string(),
|
|
6756
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6757
|
+
pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6758
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
6759
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
6569
6760
|
class_code: z.string().nullish(),
|
|
6570
6761
|
construction_category: z.enum([
|
|
6571
6762
|
'building',
|
|
@@ -6573,20 +6764,38 @@ export const zFederalProjectWageDeterminationParameters = z.object({
|
|
|
6573
6764
|
'highway',
|
|
6574
6765
|
'residential'
|
|
6575
6766
|
]).nullish(),
|
|
6576
|
-
general_wage_determination: z.string().nullish()
|
|
6767
|
+
general_wage_determination: z.string().nullish(),
|
|
6768
|
+
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
6577
6769
|
});
|
|
6578
6770
|
/**
|
|
6579
6771
|
* Parameters for creating a Regional (state prevailing-wage) wage determination on a project.
|
|
6580
6772
|
*/
|
|
6581
6773
|
export const zRegionalProjectWageDeterminationParameters = z.object({
|
|
6582
6774
|
type: z.enum(['Pwa::ProjectWageDeterminations::Regional']),
|
|
6583
|
-
labor_classification: z.string(),
|
|
6584
|
-
pwa_trade_id: z.string(),
|
|
6585
|
-
hourly_rate_cents: z.string(),
|
|
6586
|
-
fringe_rate_cents: z.string().optional(),
|
|
6775
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6776
|
+
pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
6777
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
6778
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6779
|
+
class_code: z.string().nullish(),
|
|
6780
|
+
construction_category: z.enum([
|
|
6781
|
+
'building',
|
|
6782
|
+
'heavy',
|
|
6783
|
+
'highway',
|
|
6784
|
+
'residential'
|
|
6785
|
+
]).nullish(),
|
|
6587
6786
|
general_wage_determination: z.string().nullish(),
|
|
6588
|
-
|
|
6589
|
-
|
|
6787
|
+
regional_fields: z.object({
|
|
6788
|
+
combined_health_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6789
|
+
combined_savings_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6790
|
+
combined_holiday_pto_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6791
|
+
training_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6792
|
+
other_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6793
|
+
one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6794
|
+
two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6795
|
+
one_five_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6796
|
+
two_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
6797
|
+
}).optional(),
|
|
6798
|
+
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
6590
6799
|
});
|
|
6591
6800
|
/**
|
|
6592
6801
|
* Parameters for creating a project wage determination. Provide the Federal or Regional shape; the type discriminator selects which. Editing an existing determination uses the update parameters, which take an `effective_from` instead of a type.
|
|
@@ -6600,11 +6809,11 @@ export const zProjectWageDeterminationParameters = z.discriminatedUnion('type',
|
|
|
6600
6809
|
*/
|
|
6601
6810
|
export const zProjectWageDeterminationUpdateParameters = z.object({
|
|
6602
6811
|
effective_from: z.iso.date().optional(),
|
|
6603
|
-
overtime_package_id: z.string().nullish(),
|
|
6604
|
-
labor_classification: z.string().optional(),
|
|
6605
|
-
pwa_trade_id: z.string().optional(),
|
|
6606
|
-
hourly_rate_cents: z.string().optional(),
|
|
6607
|
-
fringe_rate_cents: z.string().optional(),
|
|
6812
|
+
overtime_package_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
6813
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
6814
|
+
pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
6815
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6816
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6608
6817
|
class_code: z.string().nullish(),
|
|
6609
6818
|
construction_category: z.enum([
|
|
6610
6819
|
'building',
|
|
@@ -6613,16 +6822,26 @@ export const zProjectWageDeterminationUpdateParameters = z.object({
|
|
|
6613
6822
|
'residential'
|
|
6614
6823
|
]).nullish(),
|
|
6615
6824
|
general_wage_determination: z.string().nullish(),
|
|
6616
|
-
regional_fields:
|
|
6825
|
+
regional_fields: z.object({
|
|
6826
|
+
combined_health_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6827
|
+
combined_savings_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6828
|
+
combined_holiday_pto_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6829
|
+
training_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6830
|
+
other_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6831
|
+
one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6832
|
+
two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6833
|
+
one_five_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6834
|
+
two_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
6835
|
+
}).optional()
|
|
6617
6836
|
});
|
|
6618
6837
|
/**
|
|
6619
6838
|
* Parameters for an effective-dated change to a project wage determination, applying from a calendar date forward. The type is fixed by the determination the id names and is not sent.
|
|
6620
6839
|
*/
|
|
6621
6840
|
export const zProjectWageDeterminationScheduledChangeParameters = z.object({
|
|
6622
6841
|
effective_date: z.iso.date(),
|
|
6623
|
-
labor_classification: z.string().optional(),
|
|
6624
|
-
hourly_rate_cents: z.string().optional(),
|
|
6625
|
-
fringe_rate_cents: z.string().optional(),
|
|
6842
|
+
labor_classification: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
6843
|
+
hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6844
|
+
fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
6626
6845
|
class_code: z.string().nullish(),
|
|
6627
6846
|
construction_category: z.enum([
|
|
6628
6847
|
'building',
|
|
@@ -6631,7 +6850,17 @@ export const zProjectWageDeterminationScheduledChangeParameters = z.object({
|
|
|
6631
6850
|
'residential'
|
|
6632
6851
|
]).nullish(),
|
|
6633
6852
|
general_wage_determination: z.string().nullish(),
|
|
6634
|
-
regional_fields:
|
|
6853
|
+
regional_fields: z.object({
|
|
6854
|
+
combined_health_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6855
|
+
combined_savings_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6856
|
+
combined_holiday_pto_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6857
|
+
training_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6858
|
+
other_fringe_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6859
|
+
one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6860
|
+
two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6861
|
+
one_five_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
6862
|
+
two_x_fringe_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish()
|
|
6863
|
+
}).optional()
|
|
6635
6864
|
});
|
|
6636
6865
|
/**
|
|
6637
6866
|
* Parameters for moving where a project wage determination's timeline begins.
|
|
@@ -6650,7 +6879,7 @@ export const zProjectWageDeterminationScheduledTerminationParameters = z.object(
|
|
|
6650
6879
|
*/
|
|
6651
6880
|
export const zRateRuleEffect = z.object({
|
|
6652
6881
|
type: z.enum(['wage_increment', 'fringe_increment']),
|
|
6653
|
-
amount_cents: z.string()
|
|
6882
|
+
amount_cents: z.string().regex(/^[0-9]+$/)
|
|
6654
6883
|
});
|
|
6655
6884
|
/**
|
|
6656
6885
|
* Restricts the rule to a time-of-day window.
|
|
@@ -6812,7 +7041,7 @@ export const zPayRatesRuleParameters = z.object({
|
|
|
6812
7041
|
effective_date: z.iso.date().optional(),
|
|
6813
7042
|
effect: z.object({
|
|
6814
7043
|
type: z.enum(['wage_increment', 'fringe_increment']),
|
|
6815
|
-
amount_cents: z.string()
|
|
7044
|
+
amount_cents: z.string().regex(/^[0-9]+$/)
|
|
6816
7045
|
}),
|
|
6817
7046
|
conditions: z.array(z.union([
|
|
6818
7047
|
zRateRuleTimeRangeCondition,
|
|
@@ -6830,7 +7059,7 @@ export const zPayRatesRuleUpdateParameters = z.object({
|
|
|
6830
7059
|
effective_from: z.iso.date().optional(),
|
|
6831
7060
|
effect: z.object({
|
|
6832
7061
|
type: z.enum(['wage_increment', 'fringe_increment']),
|
|
6833
|
-
amount_cents: z.string()
|
|
7062
|
+
amount_cents: z.string().regex(/^[0-9]+$/)
|
|
6834
7063
|
}).optional(),
|
|
6835
7064
|
conditions: z.array(z.union([
|
|
6836
7065
|
zRateRuleTimeRangeCondition,
|
|
@@ -6860,7 +7089,7 @@ export const zPayRatesRuleScheduledChangeParameters = z.object({
|
|
|
6860
7089
|
effective_date: z.iso.date(),
|
|
6861
7090
|
effect: z.object({
|
|
6862
7091
|
type: z.enum(['wage_increment', 'fringe_increment']),
|
|
6863
|
-
amount_cents: z.string()
|
|
7092
|
+
amount_cents: z.string().regex(/^[0-9]+$/)
|
|
6864
7093
|
}).optional(),
|
|
6865
7094
|
conditions: z.array(z.union([
|
|
6866
7095
|
zRateRuleTimeRangeCondition,
|
|
@@ -7077,7 +7306,7 @@ export const zRateRuleParameters = z.object({
|
|
|
7077
7306
|
effective_date: z.iso.date().nullish(),
|
|
7078
7307
|
effect: z.object({
|
|
7079
7308
|
type: z.enum(['wage_increment', 'fringe_increment']),
|
|
7080
|
-
amount_cents: z.string()
|
|
7309
|
+
amount_cents: z.string().regex(/^[0-9]+$/)
|
|
7081
7310
|
}),
|
|
7082
7311
|
conditions: z.array(z.union([
|
|
7083
7312
|
zRateRuleTimeRangeCondition,
|
|
@@ -7098,7 +7327,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
7098
7327
|
serial_number: z.string().nullish(),
|
|
7099
7328
|
status: z.enum(['available', 'assigned']).optional(),
|
|
7100
7329
|
purchase_date: z.string().nullish(),
|
|
7101
|
-
purchase_price_cents: z.
|
|
7330
|
+
purchase_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
7102
7331
|
external_id: z.string().nullish(),
|
|
7103
7332
|
external_system_url: z.string().nullish(),
|
|
7104
7333
|
attribute_values: z.array(z.object({
|
|
@@ -7127,7 +7356,7 @@ export const zAssetsItemUpdateParameters = z.object({
|
|
|
7127
7356
|
serial_number: z.string().nullish(),
|
|
7128
7357
|
status: z.enum(['available', 'assigned']).optional(),
|
|
7129
7358
|
purchase_date: z.string().nullish(),
|
|
7130
|
-
purchase_price_cents: z.
|
|
7359
|
+
purchase_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
7131
7360
|
external_id: z.string().nullish(),
|
|
7132
7361
|
external_system_url: z.string().nullish(),
|
|
7133
7362
|
attribute_values: z.array(z.object({
|
|
@@ -7471,7 +7700,7 @@ export const zAssetsItemFormAssignmentParameters = z.object({
|
|
|
7471
7700
|
'QUARTERLY'
|
|
7472
7701
|
]).nullish(),
|
|
7473
7702
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
7474
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
7703
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
7475
7704
|
reminders_attributes: z.array(z.object({
|
|
7476
7705
|
offset: z.enum([
|
|
7477
7706
|
'PT0S',
|
|
@@ -7535,7 +7764,7 @@ export const zAssetsItemFormAssignmentUpdateParameters = z.object({
|
|
|
7535
7764
|
'QUARTERLY'
|
|
7536
7765
|
]).nullish(),
|
|
7537
7766
|
recurrence_end_time: z.iso.datetime().nullish(),
|
|
7538
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
7767
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
7539
7768
|
reminders_attributes: z.array(z.object({
|
|
7540
7769
|
offset: z.enum([
|
|
7541
7770
|
'PT0S',
|
|
@@ -7910,22 +8139,22 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
7910
8139
|
updated_at: z.iso.datetime()
|
|
7911
8140
|
});
|
|
7912
8141
|
/**
|
|
7913
|
-
* 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.
|
|
8142
|
+
* Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. 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.
|
|
7914
8143
|
*/
|
|
7915
8144
|
export const zAssetsTransferParameters = z.object({
|
|
7916
|
-
from_assets_site_id: z.string().optional(),
|
|
7917
|
-
from_user_id: z.string().optional(),
|
|
7918
|
-
from_container_item_id: z.string().optional(),
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
to_assets_sub_location_id: z.string().
|
|
8145
|
+
from_assets_site_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8146
|
+
from_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8147
|
+
from_container_item_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8148
|
+
from_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
8149
|
+
to_assets_site_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8150
|
+
to_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8151
|
+
to_container_item_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8152
|
+
to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
7924
8153
|
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
7925
8154
|
line_items: z.array(z.object({
|
|
7926
|
-
assets_item_id: z.string(),
|
|
8155
|
+
assets_item_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
7927
8156
|
quantity: z.int().gte(1)
|
|
7928
|
-
}))
|
|
8157
|
+
})).min(1)
|
|
7929
8158
|
});
|
|
7930
8159
|
/**
|
|
7931
8160
|
* Add stock of a bulk product at a site, recording a receive transaction. Bulk products only.
|
|
@@ -8809,9 +9038,9 @@ export const zDeleteDocumentPath = z.object({
|
|
|
8809
9038
|
id: z.string()
|
|
8810
9039
|
});
|
|
8811
9040
|
/**
|
|
8812
|
-
*
|
|
9041
|
+
* No Content
|
|
8813
9042
|
*/
|
|
8814
|
-
export const zDeleteDocumentResponse =
|
|
9043
|
+
export const zDeleteDocumentResponse = z.void();
|
|
8815
9044
|
export const zGetDocumentPath = z.object({
|
|
8816
9045
|
item_id: z.string(),
|
|
8817
9046
|
id: z.string()
|
|
@@ -9485,32 +9714,32 @@ export const zGetAssessmentPath = z.object({
|
|
|
9485
9714
|
* Success
|
|
9486
9715
|
*/
|
|
9487
9716
|
export const zGetAssessmentResponse = zCompetencyAssessmentResponseObject;
|
|
9488
|
-
export const
|
|
9717
|
+
export const zListAssessmentCriteriaPath = z.object({
|
|
9489
9718
|
assessment_id: z.string()
|
|
9490
9719
|
});
|
|
9491
|
-
export const
|
|
9720
|
+
export const zListAssessmentCriteriaQuery = z.object({
|
|
9492
9721
|
filter: z.string().optional(),
|
|
9493
9722
|
'filter[unexpected]': z.string().optional()
|
|
9494
9723
|
});
|
|
9495
9724
|
/**
|
|
9496
9725
|
* Candidate sees a decided review
|
|
9497
9726
|
*/
|
|
9498
|
-
export const
|
|
9727
|
+
export const zListAssessmentCriteriaResponse = z.object({
|
|
9499
9728
|
meta: zMeta,
|
|
9500
9729
|
links: zLinks,
|
|
9501
|
-
data: z.array(
|
|
9730
|
+
data: z.array(zCompetencyAssessmentCriterionResponseObject)
|
|
9502
9731
|
});
|
|
9503
|
-
export const
|
|
9732
|
+
export const zGetAssessmentCriterionPath = z.object({
|
|
9504
9733
|
assessment_id: z.string(),
|
|
9505
9734
|
id: z.string()
|
|
9506
9735
|
});
|
|
9507
9736
|
/**
|
|
9508
9737
|
* Candidate sees a decided review
|
|
9509
9738
|
*/
|
|
9510
|
-
export const
|
|
9739
|
+
export const zGetAssessmentCriterionResponse = zCompetencyAssessmentCriterionResponseObject;
|
|
9511
9740
|
export const zListEvidenceItemsPath = z.object({
|
|
9512
9741
|
assessment_id: z.string(),
|
|
9513
|
-
|
|
9742
|
+
criterion_id: z.string()
|
|
9514
9743
|
});
|
|
9515
9744
|
export const zListEvidenceItemsQuery = z.object({
|
|
9516
9745
|
'filter[kind]': z.enum([
|
|
@@ -9531,7 +9760,7 @@ export const zListEvidenceItemsResponse = z.object({
|
|
|
9531
9760
|
});
|
|
9532
9761
|
export const zGetEvidenceItemPath = z.object({
|
|
9533
9762
|
assessment_id: z.string(),
|
|
9534
|
-
|
|
9763
|
+
criterion_id: z.string(),
|
|
9535
9764
|
id: z.string()
|
|
9536
9765
|
});
|
|
9537
9766
|
/**
|
|
@@ -10217,6 +10446,62 @@ export const zUpdateGroupPath = z.object({
|
|
|
10217
10446
|
* Success
|
|
10218
10447
|
*/
|
|
10219
10448
|
export const zUpdateGroupResponse = zGroupResponseObject;
|
|
10449
|
+
export const zListJobDocumentsPath = z.object({
|
|
10450
|
+
job_id: z.string()
|
|
10451
|
+
});
|
|
10452
|
+
export const zListJobDocumentsQuery = z.object({
|
|
10453
|
+
'filter[type]': z.array(z.enum([
|
|
10454
|
+
'CERTIFICATIONS',
|
|
10455
|
+
'CHECKLIST',
|
|
10456
|
+
'MAP',
|
|
10457
|
+
'MSA',
|
|
10458
|
+
'ONSITE_POSTER',
|
|
10459
|
+
'OTHER',
|
|
10460
|
+
'PARTS_INSTRUCTIONS',
|
|
10461
|
+
'PHOTO',
|
|
10462
|
+
'PO',
|
|
10463
|
+
'PWA_DOCUMENTATION',
|
|
10464
|
+
'RESUME',
|
|
10465
|
+
'WO'
|
|
10466
|
+
])).optional()
|
|
10467
|
+
});
|
|
10468
|
+
/**
|
|
10469
|
+
* Success
|
|
10470
|
+
*/
|
|
10471
|
+
export const zListJobDocumentsResponse = zJobDocumentsResponseObject;
|
|
10472
|
+
export const zCreateJobDocumentBody = zJobDocumentParameters;
|
|
10473
|
+
export const zCreateJobDocumentPath = z.object({
|
|
10474
|
+
job_id: z.string()
|
|
10475
|
+
});
|
|
10476
|
+
/**
|
|
10477
|
+
* Created
|
|
10478
|
+
*/
|
|
10479
|
+
export const zCreateJobDocumentResponse = zJobDocumentResponseObject;
|
|
10480
|
+
export const zDeleteJobDocumentPath = z.object({
|
|
10481
|
+
job_id: z.string(),
|
|
10482
|
+
id: z.string()
|
|
10483
|
+
});
|
|
10484
|
+
/**
|
|
10485
|
+
* No Content
|
|
10486
|
+
*/
|
|
10487
|
+
export const zDeleteJobDocumentResponse = z.void();
|
|
10488
|
+
export const zGetJobDocumentPath = z.object({
|
|
10489
|
+
job_id: z.string(),
|
|
10490
|
+
id: z.string()
|
|
10491
|
+
});
|
|
10492
|
+
/**
|
|
10493
|
+
* Success
|
|
10494
|
+
*/
|
|
10495
|
+
export const zGetJobDocumentResponse = zJobDocumentResponseObject;
|
|
10496
|
+
export const zUpdateJobDocumentBody = zJobDocumentUpdateParameters;
|
|
10497
|
+
export const zUpdateJobDocumentPath = z.object({
|
|
10498
|
+
job_id: z.string(),
|
|
10499
|
+
id: z.string()
|
|
10500
|
+
});
|
|
10501
|
+
/**
|
|
10502
|
+
* Success
|
|
10503
|
+
*/
|
|
10504
|
+
export const zUpdateJobDocumentResponse = zJobDocumentResponseObject;
|
|
10220
10505
|
export const zListJobFormAssignmentTasksPath = z.object({
|
|
10221
10506
|
job_id: z.string()
|
|
10222
10507
|
});
|
|
@@ -11288,6 +11573,7 @@ export const zGetTimeEntryImportPath = z.object({
|
|
|
11288
11573
|
*/
|
|
11289
11574
|
export const zGetTimeEntryImportResponse = zTimeEntryImportResponseObject;
|
|
11290
11575
|
export const zListPayPeriodsQuery = z.object({
|
|
11576
|
+
'filter[timekeeping_pay_period_config_id]': z.string().optional(),
|
|
11291
11577
|
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
11292
11578
|
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
11293
11579
|
filter: z.string().optional(),
|
|
@@ -11300,6 +11586,13 @@ export const zListPayPeriodsQuery = z.object({
|
|
|
11300
11586
|
* Success
|
|
11301
11587
|
*/
|
|
11302
11588
|
export const zListPayPeriodsResponse = zPayPeriodsResponseObject;
|
|
11589
|
+
export const zGetPayPeriodPath = z.object({
|
|
11590
|
+
id: z.string()
|
|
11591
|
+
});
|
|
11592
|
+
/**
|
|
11593
|
+
* Success
|
|
11594
|
+
*/
|
|
11595
|
+
export const zGetPayPeriodResponse = zPayPeriodResponseObject;
|
|
11303
11596
|
/**
|
|
11304
11597
|
* Success
|
|
11305
11598
|
*/
|
|
@@ -11743,6 +12036,7 @@ export const zCreateEmploymentScheduledTerminationPath = z.object({
|
|
|
11743
12036
|
export const zCreateEmploymentScheduledTerminationResponse = zPeopleEmploymentResponseObject;
|
|
11744
12037
|
export const zListEmploymentsQuery = z.object({
|
|
11745
12038
|
'filter[user_id]': z.string().optional(),
|
|
12039
|
+
'filter[companies_department_id]': z.string().optional(),
|
|
11746
12040
|
filter: z.string().optional(),
|
|
11747
12041
|
'filter[unexpected]': z.string().optional(),
|
|
11748
12042
|
'as_of[valid]': z.iso.datetime().optional(),
|
|
@@ -11948,6 +12242,78 @@ export const zUpdateCompletionPath = z.object({
|
|
|
11948
12242
|
* Success
|
|
11949
12243
|
*/
|
|
11950
12244
|
export const zUpdateCompletionResponse = zProductionCompletionResponseObject;
|
|
12245
|
+
export const zListProjectDocumentVersionsPath = z.object({
|
|
12246
|
+
project_id: z.string(),
|
|
12247
|
+
document_id: z.string()
|
|
12248
|
+
});
|
|
12249
|
+
export const zListProjectDocumentVersionsQuery = z.object({
|
|
12250
|
+
'page[cursor]': z.string().optional(),
|
|
12251
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
12252
|
+
page: z.string().optional()
|
|
12253
|
+
});
|
|
12254
|
+
/**
|
|
12255
|
+
* Success
|
|
12256
|
+
*/
|
|
12257
|
+
export const zListProjectDocumentVersionsResponse = z.object({
|
|
12258
|
+
meta: zMeta,
|
|
12259
|
+
links: zLinks,
|
|
12260
|
+
data: z.array(zProjectDocumentVersionResponseObject)
|
|
12261
|
+
});
|
|
12262
|
+
export const zListProjectDocumentsPath = z.object({
|
|
12263
|
+
project_id: z.string()
|
|
12264
|
+
});
|
|
12265
|
+
export const zListProjectDocumentsQuery = z.object({
|
|
12266
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
12267
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
12268
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
12269
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
12270
|
+
'page[cursor]': z.string().optional(),
|
|
12271
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
12272
|
+
page: z.string().optional(),
|
|
12273
|
+
filter: z.string().optional(),
|
|
12274
|
+
'filter[unexpected]': z.string().optional()
|
|
12275
|
+
});
|
|
12276
|
+
/**
|
|
12277
|
+
* Success
|
|
12278
|
+
*/
|
|
12279
|
+
export const zListProjectDocumentsResponse = z.object({
|
|
12280
|
+
meta: zMeta,
|
|
12281
|
+
links: zLinks,
|
|
12282
|
+
data: z.array(zProjectDocumentResponseObject)
|
|
12283
|
+
});
|
|
12284
|
+
export const zCreateProjectDocumentBody = zProjectDocumentParameters;
|
|
12285
|
+
export const zCreateProjectDocumentPath = z.object({
|
|
12286
|
+
project_id: z.string()
|
|
12287
|
+
});
|
|
12288
|
+
/**
|
|
12289
|
+
* Created
|
|
12290
|
+
*/
|
|
12291
|
+
export const zCreateProjectDocumentResponse = zProjectDocumentResponseObject;
|
|
12292
|
+
export const zDeleteProjectDocumentPath = z.object({
|
|
12293
|
+
project_id: z.string(),
|
|
12294
|
+
id: z.string()
|
|
12295
|
+
});
|
|
12296
|
+
/**
|
|
12297
|
+
* No Content
|
|
12298
|
+
*/
|
|
12299
|
+
export const zDeleteProjectDocumentResponse = z.void();
|
|
12300
|
+
export const zGetProjectDocumentPath = z.object({
|
|
12301
|
+
project_id: z.string(),
|
|
12302
|
+
id: z.string()
|
|
12303
|
+
});
|
|
12304
|
+
/**
|
|
12305
|
+
* Success
|
|
12306
|
+
*/
|
|
12307
|
+
export const zGetProjectDocumentResponse = zProjectDocumentResponseObject;
|
|
12308
|
+
export const zUpdateProjectDocumentBody = zProjectDocumentUpdateParameters;
|
|
12309
|
+
export const zUpdateProjectDocumentPath = z.object({
|
|
12310
|
+
project_id: z.string(),
|
|
12311
|
+
id: z.string()
|
|
12312
|
+
});
|
|
12313
|
+
/**
|
|
12314
|
+
* Success
|
|
12315
|
+
*/
|
|
12316
|
+
export const zUpdateProjectDocumentResponse = zProjectDocumentResponseObject;
|
|
11951
12317
|
export const zCreateProjectTradeBody = zPwaTradeParameters;
|
|
11952
12318
|
export const zCreateProjectTradePath = z.object({
|
|
11953
12319
|
project_id: z.string()
|
|
@@ -12405,7 +12771,7 @@ export const zCreateFormAssignmentTaskBody = z.object({
|
|
|
12405
12771
|
'QUARTERLY'
|
|
12406
12772
|
]).optional(),
|
|
12407
12773
|
recurrence_end_time: z.string().optional(),
|
|
12408
|
-
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
12774
|
+
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
12409
12775
|
reminders_attributes: z.array(z.object({
|
|
12410
12776
|
offset: z.enum([
|
|
12411
12777
|
'PT0S',
|
|
@@ -13247,9 +13613,12 @@ export const zCreateCompanyPath = z.object({
|
|
|
13247
13613
|
* Created
|
|
13248
13614
|
*/
|
|
13249
13615
|
export const zCreateCompanyResponse = zUserResponseObject;
|
|
13616
|
+
export const zRemoveUserFromCompanyHeaders = z.object({
|
|
13617
|
+
'If-Match': z.string()
|
|
13618
|
+
});
|
|
13250
13619
|
export const zRemoveUserFromCompanyPath = z.object({
|
|
13251
13620
|
user_id: z.string(),
|
|
13252
|
-
|
|
13621
|
+
id: z.string()
|
|
13253
13622
|
});
|
|
13254
13623
|
/**
|
|
13255
13624
|
* Success
|
|
@@ -13261,7 +13630,7 @@ export const zRemoveUserFromCompanyResponse = zUserResponseObject;
|
|
|
13261
13630
|
export const zUpdateCompanyBody = zUserCompanyParameters;
|
|
13262
13631
|
export const zUpdateCompanyPath = z.object({
|
|
13263
13632
|
user_id: z.string(),
|
|
13264
|
-
|
|
13633
|
+
id: z.string()
|
|
13265
13634
|
});
|
|
13266
13635
|
/**
|
|
13267
13636
|
* Success
|