@dsptch-work/api-client 0.8.0 → 0.10.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.
@@ -50,6 +50,12 @@ export const zProblem = z.object({
50
50
  *
51
51
  * A signed token in the request fails signature verification. Re-obtain the token from the endpoint that issued it.
52
52
  *
53
+ * ### malformed_body
54
+ *
55
+ * **Malformed Request Body**
56
+ *
57
+ * The request body could not be parsed in the declared content type — most commonly a body that is not valid JSON. Send a well-formed body matching the `Content-Type` header.
58
+ *
53
59
  * ### non_range_filter_value
54
60
  *
55
61
  * **Range Filter Needs Bounds**
@@ -78,7 +84,7 @@ export const zProblem = z.object({
78
84
  *
79
85
  * **Parameter Must Be An Object**
80
86
  *
81
- * A container query parameter — `filter`, `page`, or `as_of` — arrived as a scalar, array, or blank value instead of a nested object. Use the object syntax, for example `filter[key]=value`.
87
+ * Something that must be an object arrived as something else. Either a container query parameter — `filter`, `page`, or `as_of` — arrived as a scalar, array, or blank value, in which case use the object syntax, for example `filter[key]=value`; or the request body of a write that documents this failure parsed to `null`, an array, or a bare scalar, in which case send a JSON object. An absent or empty body is not this failure.
82
88
  *
83
89
  * ### unknown_axis
84
90
  *
@@ -88,9 +94,9 @@ export const zProblem = z.object({
88
94
  *
89
95
  * ### unknown_key
90
96
  *
91
- * **Unknown Query Parameter**
97
+ * **Unknown Key**
92
98
  *
93
- * The query string carries a top-level key outside the declared containers — typically a misspelled container. Remove or correct it; unknown keys are never silently ignored.
99
+ * The query string carries a top-level key outside the declared containers, or the request body carries a key the operation's contract does not declare — typically a misspelled container or field. Remove or correct the keys the detail names; unknown keys are never silently ignored.
94
100
  *
95
101
  * ### unsupported_axis
96
102
  *
@@ -200,6 +206,12 @@ export const zProblem = z.object({
200
206
  *
201
207
  * A deletion is refused by the record's guards — dependent records restrict removal. The message carries the specifics; remove or reassign the dependents first.
202
208
  *
209
+ * ### interval_too_wide
210
+ *
211
+ * **Interval Too Wide**
212
+ *
213
+ * A change feed was asked for a span of event time wider than one request may cover. Split it into consecutive windows no wider than the maximum stated in the feed's operation and read them in order; their pages concatenate without gaps. Both bounds are inclusive, so an event stamped exactly on a shared bound appears in both pages — deduplicate as usual.
214
+ *
203
215
  * ### invalid_date
204
216
  *
205
217
  * **Unparseable Date Value**
@@ -210,7 +222,7 @@ export const zProblem = z.object({
210
222
  *
211
223
  * **Invalid Filter Value**
212
224
  *
213
- * A declared filter key carries a value outside its accepted set — a non-boolean on a boolean key, or a token outside an enum key's vocabulary. Send an accepted value.
225
+ * A declared filter key carries a value outside its accepted set — a non-boolean on a boolean key, a token outside an enum key's vocabulary, or a range whose upper bound precedes its lower bound. Send an accepted value.
214
226
  *
215
227
  * ### invalid_iso8601_duration
216
228
  *
@@ -278,12 +290,6 @@ export const zProblem = z.object({
278
290
  *
279
291
  * The apprentice's wage schedule does not belong to the program in the URL. Use a schedule from that program.
280
292
  *
281
- * ### watermark_outside_retention
282
- *
283
- * **Watermark Outside Retention Window**
284
- *
285
- * A change feed was polled from a watermark older than the window it covers, so no page it could return would be complete. Resync instead: re-crawl the live index, diff it against your replica, and resume polling from the `meta.complete_through` of the first page you then read.
286
- *
287
293
  * ## 428
288
294
  *
289
295
  * ### precondition_required
@@ -323,6 +329,7 @@ export const zProblemTypeCatalog = z.enum([
323
329
  'invalid_filter_key',
324
330
  'invalid_limit',
325
331
  'invalid_signature',
332
+ 'malformed_body',
326
333
  'non_range_filter_value',
327
334
  'non_scalar_axis',
328
335
  'non_scalar_filter_value',
@@ -346,6 +353,7 @@ export const zProblemTypeCatalog = z.enum([
346
353
  'company_not_employer',
347
354
  'confirm_apprenticeship_conflict',
348
355
  'destroy_restricted',
356
+ 'interval_too_wide',
349
357
  'invalid_date',
350
358
  'invalid_filter_value',
351
359
  'invalid_iso8601_duration',
@@ -359,7 +367,6 @@ export const zProblemTypeCatalog = z.enum([
359
367
  'user_not_company_member',
360
368
  'validation_failed',
361
369
  'wage_schedule_outside_program',
362
- 'watermark_outside_retention',
363
370
  'precondition_required',
364
371
  'too_many_requests',
365
372
  'internal_error',
@@ -417,7 +424,7 @@ export const zApprenticeshipProgramResponseObject = z.object({
417
424
  program_name: z.string().nullable(),
418
425
  sponsor_name: z.string().nullable(),
419
426
  doing_business_as: z.string().nullable(),
420
- registration_agency_type: z.enum(['federal', 'regional']),
427
+ registration_agency_type: z.enum(['federal', 'regional']).nullable(),
421
428
  created_at: z.iso.datetime(),
422
429
  updated_at: z.iso.datetime()
423
430
  });
@@ -535,7 +542,7 @@ export const zApprenticeshipApprenticeResponseObject = z.object({
535
542
  'in_progress',
536
543
  'failed',
537
544
  'success'
538
- ]),
545
+ ]).nullable(),
539
546
  expected_start_date: z.iso.date(),
540
547
  expected_completion_date: z.iso.date(),
541
548
  operative_start_date: z.iso.date().nullable(),
@@ -574,7 +581,7 @@ export const zApprenticeshipProgramParameters = z.object({
574
581
  program_name: z.string().nullish(),
575
582
  sponsor_name: z.string().nullish(),
576
583
  doing_business_as: z.string().nullish(),
577
- registration_agency_type: z.enum(['federal', 'regional']).optional()
584
+ registration_agency_type: z.enum(['federal', 'regional']).nullish()
578
585
  });
579
586
  /**
580
587
  * Create or update an occupation (trade) within a sponsored program; the program is taken from the URL path.
@@ -682,8 +689,38 @@ export const zTimecodeResponseObject = z.object({
682
689
  'non_job',
683
690
  'job_with_timecode'
684
691
  ]),
685
- default_for_company_id: z.string().nullable(),
686
- valid_from: z.iso.datetime(),
692
+ default_for_company_id: z.string(),
693
+ valid_from: z.iso.datetime().nullable(),
694
+ valid_to: z.iso.datetime().nullable(),
695
+ transaction_from: z.iso.datetime(),
696
+ transaction_to: z.iso.datetime().nullable(),
697
+ created_at: z.iso.datetime(),
698
+ updated_at: z.iso.datetime()
699
+ });
700
+ export const zTimecodeHistoryCorrectionObject = z.object({
701
+ timekeeping_timecode_id: z.string(),
702
+ name: z.string(),
703
+ description: z.string().nullable(),
704
+ description_is_required: z.boolean(),
705
+ billable: z.boolean(),
706
+ overtime_eligible: z.boolean(),
707
+ unpaid: z.boolean(),
708
+ holiday: z.boolean(),
709
+ pto: z.boolean(),
710
+ safety: z.boolean(),
711
+ lunch_shortcut: z.boolean(),
712
+ break_shortcut: z.boolean(),
713
+ pwa: z.boolean(),
714
+ rest_and_recovery: z.boolean(),
715
+ incentive_pay_eligible: z.boolean(),
716
+ restricted_to: z.enum([
717
+ 'none',
718
+ 'job',
719
+ 'non_job',
720
+ 'job_with_timecode'
721
+ ]),
722
+ default_for_company_id: z.string(),
723
+ valid_from: z.iso.datetime().nullable(),
687
724
  valid_to: z.iso.datetime().nullable(),
688
725
  transaction_from: z.iso.datetime(),
689
726
  transaction_to: z.iso.datetime().nullable(),
@@ -691,7 +728,7 @@ export const zTimecodeResponseObject = z.object({
691
728
  updated_at: z.iso.datetime()
692
729
  });
693
730
  export const zTimecodeHistoryVersionObject = z.object({
694
- id: z.string(),
731
+ timekeeping_timecode_id: z.string(),
695
732
  name: z.string(),
696
733
  description: z.string().nullable(),
697
734
  description_is_required: z.boolean(),
@@ -712,8 +749,8 @@ export const zTimecodeHistoryVersionObject = z.object({
712
749
  'non_job',
713
750
  'job_with_timecode'
714
751
  ]),
715
- default_for_company_id: z.string().nullable(),
716
- valid_from: z.iso.datetime(),
752
+ default_for_company_id: z.string(),
753
+ valid_from: z.iso.datetime().nullable(),
717
754
  valid_to: z.iso.datetime().nullable(),
718
755
  transaction_from: z.iso.datetime(),
719
756
  transaction_to: z.iso.datetime().nullable(),
@@ -724,7 +761,7 @@ export const zTimecodeHistoryVersionObject = z.object({
724
761
  'current',
725
762
  'historical'
726
763
  ]),
727
- corrections: z.array(zTimecodeResponseObject)
764
+ corrections: z.array(zTimecodeHistoryCorrectionObject)
728
765
  });
729
766
  /**
730
767
  * 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.
@@ -969,7 +1006,7 @@ export const zTimeCardPerDiemParameters = z.object({
969
1006
  */
970
1007
  export const zHolidayResponseObject = z.object({
971
1008
  id: z.string(),
972
- pay_period_config_uid: z.string(),
1009
+ timekeeping_pay_period_config_id: z.string(),
973
1010
  date: z.iso.date(),
974
1011
  name: z.string(),
975
1012
  holiday_type: z.enum(['fixed', 'floating']),
@@ -990,8 +1027,8 @@ export const zHolidayResponseObject = z.object({
990
1027
  */
991
1028
  export const zAttestationConfigResponseObject = z.object({
992
1029
  id: z.string(),
993
- pay_period_config_uid: z.string(),
994
- content: z.string().nullable(),
1030
+ timekeeping_pay_period_config_id: z.string(),
1031
+ content: z.string(),
995
1032
  expected_response: z.boolean(),
996
1033
  us_state_id: z.string().nullable(),
997
1034
  deleted_at: z.iso.datetime().nullable(),
@@ -1007,10 +1044,10 @@ export const zAttestationConfigParameters = z.object({
1007
1044
  us_state_id: z.string().nullish()
1008
1045
  });
1009
1046
  /**
1010
- * A pay schedule (PayPeriodConfig) — the top-level timekeeping unit that sets a company's payroll cadence and tracking modes and generates its stream of pay periods. Read-only; only the currently-valid version is returned, keyed by its stable uid.
1047
+ * A pay schedule (PayPeriodConfig) — the top-level timekeeping unit that sets a company's payroll cadence and tracking modes and generates its stream of pay periods. Read-only; only the currently-valid version is returned, keyed by its stable id.
1011
1048
  */
1012
1049
  export const zPayPeriodConfigResponseObject = z.object({
1013
- uid: z.string(),
1050
+ id: z.string(),
1014
1051
  company_id: z.string(),
1015
1052
  name: z.string(),
1016
1053
  frequency: z.enum(['weekly', 'biweekly']),
@@ -1026,7 +1063,7 @@ export const zPayPeriodConfigResponseObject = z.object({
1026
1063
  'none',
1027
1064
  'base',
1028
1065
  'aggregate'
1029
- ]),
1066
+ ]).nullable(),
1030
1067
  time_mode: z.enum([
1031
1068
  'none',
1032
1069
  'base',
@@ -1037,17 +1074,54 @@ export const zPayPeriodConfigResponseObject = z.object({
1037
1074
  'quickbooks_online',
1038
1075
  'paychex',
1039
1076
  'gusto'
1077
+ ]).nullable(),
1078
+ actuals_enabled: z.boolean().nullable(),
1079
+ requires_external_map_contributor: z.boolean(),
1080
+ paid_after_holiday: z.boolean(),
1081
+ demo: z.boolean().nullable(),
1082
+ valid_from: z.iso.datetime().nullable(),
1083
+ valid_to: z.iso.datetime().nullable(),
1084
+ created_at: z.iso.datetime()
1085
+ });
1086
+ export const zPayPeriodConfigHistoryCorrectionObject = z.object({
1087
+ timekeeping_pay_period_config_id: z.string(),
1088
+ company_id: z.string(),
1089
+ name: z.string(),
1090
+ frequency: z.enum(['weekly', 'biweekly']),
1091
+ start_day_of_week: z.int(),
1092
+ tz_name: z.string(),
1093
+ currency: z.string(),
1094
+ status: z.enum([
1095
+ 'synced',
1096
+ 'pending',
1097
+ 'failed'
1040
1098
  ]),
1099
+ payroll_mode: z.enum([
1100
+ 'none',
1101
+ 'base',
1102
+ 'aggregate'
1103
+ ]).nullable(),
1104
+ time_mode: z.enum([
1105
+ 'none',
1106
+ 'base',
1107
+ 'aggregate'
1108
+ ]),
1109
+ payroll_system: z.enum([
1110
+ 'rippling',
1111
+ 'quickbooks_online',
1112
+ 'paychex',
1113
+ 'gusto'
1114
+ ]).nullable(),
1041
1115
  actuals_enabled: z.boolean().nullable(),
1042
1116
  requires_external_map_contributor: z.boolean(),
1043
1117
  paid_after_holiday: z.boolean(),
1044
1118
  demo: z.boolean().nullable(),
1045
- valid_from: z.iso.datetime(),
1119
+ valid_from: z.iso.datetime().nullable(),
1046
1120
  valid_to: z.iso.datetime().nullable(),
1047
1121
  created_at: z.iso.datetime()
1048
1122
  });
1049
1123
  export const zPayPeriodConfigHistoryVersionObject = z.object({
1050
- uid: z.string(),
1124
+ timekeeping_pay_period_config_id: z.string(),
1051
1125
  company_id: z.string(),
1052
1126
  name: z.string(),
1053
1127
  frequency: z.enum(['weekly', 'biweekly']),
@@ -1063,7 +1137,7 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1063
1137
  'none',
1064
1138
  'base',
1065
1139
  'aggregate'
1066
- ]),
1140
+ ]).nullable(),
1067
1141
  time_mode: z.enum([
1068
1142
  'none',
1069
1143
  'base',
@@ -1074,12 +1148,12 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1074
1148
  'quickbooks_online',
1075
1149
  'paychex',
1076
1150
  'gusto'
1077
- ]),
1151
+ ]).nullable(),
1078
1152
  actuals_enabled: z.boolean().nullable(),
1079
1153
  requires_external_map_contributor: z.boolean(),
1080
1154
  paid_after_holiday: z.boolean(),
1081
1155
  demo: z.boolean().nullable(),
1082
- valid_from: z.iso.datetime(),
1156
+ valid_from: z.iso.datetime().nullable(),
1083
1157
  valid_to: z.iso.datetime().nullable(),
1084
1158
  created_at: z.iso.datetime(),
1085
1159
  version_status: z.enum([
@@ -1087,7 +1161,7 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1087
1161
  'current',
1088
1162
  'historical'
1089
1163
  ]),
1090
- corrections: z.array(zPayPeriodConfigResponseObject)
1164
+ corrections: z.array(zPayPeriodConfigHistoryCorrectionObject)
1091
1165
  });
1092
1166
  /**
1093
1167
  * Create or update a holiday on a pay schedule. name, holiday_type, and month are required; mday is required for fixed holidays and wday + week for floating holidays (enforced by model validation).
@@ -1131,7 +1205,7 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1131
1205
  'male',
1132
1206
  'non_binary',
1133
1207
  'not_specified'
1134
- ]),
1208
+ ]).nullable(),
1135
1209
  local_business_license: z.string().nullable(),
1136
1210
  drivers_license_state: z.string().nullable(),
1137
1211
  drivers_license_number: z.string().nullable(),
@@ -1142,12 +1216,12 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1142
1216
  'reserves',
1143
1217
  'guard',
1144
1218
  'not_specified'
1145
- ]),
1219
+ ]).nullable(),
1146
1220
  hispanic_origin: z.enum([
1147
1221
  'yes',
1148
1222
  'no',
1149
1223
  'not_specified'
1150
- ]),
1224
+ ]).nullable(),
1151
1225
  ca_dir_withholding_exemptions: z.int().nullable(),
1152
1226
  disabled: z.boolean(),
1153
1227
  il_dol_race: z.enum([
@@ -1167,13 +1241,13 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1167
1241
  'other_asian',
1168
1242
  'other_pacific_islander',
1169
1243
  'other'
1170
- ]),
1244
+ ]).nullable(),
1171
1245
  il_shines_employment_type: z.enum([
1172
1246
  'part_time',
1173
1247
  'full_time',
1174
1248
  'seasonal_temporary',
1175
1249
  'independent_contract'
1176
- ]),
1250
+ ]).nullable(),
1177
1251
  il_shines_eep_qualifiers: z.array(z.enum([
1178
1252
  'eep_program_completed',
1179
1253
  'foster_care',
@@ -1190,7 +1264,7 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1190
1264
  'returning_residents_clean_jobs_training_program',
1191
1265
  'other'
1192
1266
  ])).nullable(),
1193
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']),
1267
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullable(),
1194
1268
  or_boli_race: z.array(z.enum([
1195
1269
  'american_indian_or_alaska_native',
1196
1270
  'asian',
@@ -1225,7 +1299,7 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1225
1299
  'male',
1226
1300
  'non_binary',
1227
1301
  'not_specified'
1228
- ]).optional(),
1302
+ ]).nullish(),
1229
1303
  local_business_license: z.string().nullish(),
1230
1304
  drivers_license_state: z.string().nullish(),
1231
1305
  drivers_license_number: z.string().nullish(),
@@ -1236,12 +1310,12 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1236
1310
  'reserves',
1237
1311
  'guard',
1238
1312
  'not_specified'
1239
- ]).optional(),
1313
+ ]).nullish(),
1240
1314
  hispanic_origin: z.enum([
1241
1315
  'yes',
1242
1316
  'no',
1243
1317
  'not_specified'
1244
- ]).optional(),
1318
+ ]).nullish(),
1245
1319
  ca_dir_withholding_exemptions: z.int().nullish(),
1246
1320
  disabled: z.boolean().optional(),
1247
1321
  il_dol_race: z.enum([
@@ -1261,13 +1335,13 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1261
1335
  'other_asian',
1262
1336
  'other_pacific_islander',
1263
1337
  'other'
1264
- ]).optional(),
1338
+ ]).nullish(),
1265
1339
  il_shines_employment_type: z.enum([
1266
1340
  'part_time',
1267
1341
  'full_time',
1268
1342
  'seasonal_temporary',
1269
1343
  'independent_contract'
1270
- ]).optional(),
1344
+ ]).nullish(),
1271
1345
  il_shines_eep_qualifiers: z.array(z.enum([
1272
1346
  'eep_program_completed',
1273
1347
  'foster_care',
@@ -1284,7 +1358,7 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1284
1358
  'returning_residents_clean_jobs_training_program',
1285
1359
  'other'
1286
1360
  ])).nullish(),
1287
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).optional(),
1361
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullish(),
1288
1362
  or_boli_race: z.array(z.enum([
1289
1363
  'american_indian_or_alaska_native',
1290
1364
  'asian',
@@ -1394,13 +1468,13 @@ export const zTimeEntryResponseObject = z.object({
1394
1468
  ]),
1395
1469
  hours_worked: z.number(),
1396
1470
  overtime_minutes_worked: z.object({
1397
- 1: z.number().optional(),
1398
- 1.5: z.number().optional(),
1399
- 2: z.number().optional()
1471
+ 1: z.number(),
1472
+ 1.5: z.number(),
1473
+ 2: z.number()
1400
1474
  }),
1401
1475
  incentive_pay_one_five_x_minutes_worked: z.int(),
1402
1476
  hourly_rate_cents: z.string().nullable(),
1403
- currency: z.string().nullable(),
1477
+ currency: z.string(),
1404
1478
  hourly_rate_src_type: z.string().nullable(),
1405
1479
  timekeeping_pay_period_id: z.string(),
1406
1480
  start_time: z.iso.datetime(),
@@ -1409,17 +1483,8 @@ export const zTimeEntryResponseObject = z.object({
1409
1483
  updated_at: z.iso.datetime(),
1410
1484
  feature_ids: z.array(z.string()),
1411
1485
  features: z.array(z.object({
1412
- name: z.string().optional()
1413
- })),
1414
- user: z.object({
1415
- id: z.string().optional(),
1416
- name: z.string().optional()
1417
- }),
1418
- timecode: z.object({
1419
- id: z.string().optional(),
1420
- name: z.string().optional()
1421
- }).nullable(),
1422
- total_hours: z.number()
1486
+ name: z.string()
1487
+ }))
1423
1488
  });
1424
1489
  /**
1425
1490
  * A record of a single approval or decline action taken against a time entry.
@@ -1467,8 +1532,8 @@ export const zTimeEntryParameters = z.object({
1467
1532
  */
1468
1533
  export const zFormSubmissionResponseObject = z.object({
1469
1534
  user: z.object({
1470
- id: z.string().optional(),
1471
- name: z.string().optional()
1535
+ id: z.string(),
1536
+ name: z.string()
1472
1537
  }),
1473
1538
  title: z.string().nullable(),
1474
1539
  json: z.record(z.string(), z.unknown()),
@@ -1722,8 +1787,8 @@ export const zCustomFieldConfigParameters = z.object({
1722
1787
  * A user's membership in a group.
1723
1788
  */
1724
1789
  export const zUserGroupResponse = z.object({
1725
- id: z.string().optional(),
1726
- user_id: z.string().optional()
1790
+ id: z.string(),
1791
+ user_id: z.string()
1727
1792
  });
1728
1793
  /**
1729
1794
  * Request body for adding users to a group. The group is taken from the URL path.
@@ -1750,8 +1815,8 @@ export const zJobParameters = z.object({
1750
1815
  template_id: z.string().nullish(),
1751
1816
  name: z.string().nullish(),
1752
1817
  description: z.string().optional(),
1818
+ requested_by_company_id: z.string(),
1753
1819
  created_by_user_id: z.string(),
1754
- manager_user_id: z.string().nullish(),
1755
1820
  manager_user_ids: z.array(z.string()).nullish(),
1756
1821
  purchase_order_number: z.string().nullish(),
1757
1822
  project_id: z.string().nullish(),
@@ -1834,27 +1899,27 @@ export const zJobUpdateParameters = zJobParameters.and(z.object({
1834
1899
  * One version of a worker's compensation at your company, effective from its start date until the next version begins.
1835
1900
  */
1836
1901
  export const zUserCompanyScheduledChange = z.object({
1837
- id: z.string().optional(),
1838
- start_date: z.string().optional(),
1839
- hourly_rate: z.string().nullish(),
1840
- compensation_type: z.string().optional(),
1841
- overtime_eligible: z.boolean().optional(),
1842
- training_annual_amount: z.string().nullish(),
1843
- employer_combined_health_amount: z.string().nullish(),
1844
- employer_combined_savings: z.string().nullish(),
1845
- worked_annual_minutes: z.int().nullish(),
1846
- pto_annual_minutes: z.int().nullish(),
1847
- holiday_annual_minutes: z.int().nullish(),
1848
- training_annual_minutes: z.int().nullish(),
1849
- companies_department_id: z.string().nullish()
1902
+ id: z.string(),
1903
+ start_date: z.string(),
1904
+ hourly_rate: z.string().nullable(),
1905
+ compensation_type: z.string(),
1906
+ overtime_eligible: z.boolean(),
1907
+ training_annual_amount: z.string().nullable(),
1908
+ employer_combined_health_amount: z.string().nullable(),
1909
+ employer_combined_savings: z.string().nullable(),
1910
+ worked_annual_minutes: z.int().nullable(),
1911
+ pto_annual_minutes: z.int().nullable(),
1912
+ holiday_annual_minutes: z.int().nullable(),
1913
+ training_annual_minutes: z.int().nullable(),
1914
+ companies_department_id: z.string().nullable()
1850
1915
  });
1851
1916
  /**
1852
1917
  * A worker's scheduled compensation timeline at your company — the version currently in effect plus any future-dated versions.
1853
1918
  */
1854
1919
  export const zUserCompanyScheduledChangesResponse = z.object({
1855
- user_id: z.string().optional(),
1856
- current_version: zUserCompanyScheduledChange.optional(),
1857
- scheduled_changes: z.array(zUserCompanyScheduledChange).optional()
1920
+ user_id: z.string(),
1921
+ current_version: zUserCompanyScheduledChange,
1922
+ scheduled_changes: z.array(zUserCompanyScheduledChange)
1858
1923
  });
1859
1924
  /**
1860
1925
  * Request body for scheduling the end of a worker's employment at your company. Sets the employment's end date; cancel the scheduled termination to restore open-ended employment. Deleting the employment record instead (DELETE on the membership) removes it entirely and is not reversible.
@@ -1894,14 +1959,14 @@ export const zTimeCardResponseObject = z.object({
1894
1959
  rest_and_recovery_minutes_worked: z.int(),
1895
1960
  incentive_pay_eligible_minutes_worked: z.int(),
1896
1961
  overtime_minutes_worked: z.object({
1897
- 1: z.number().optional(),
1898
- 1.5: z.number().optional(),
1899
- 2: z.number().optional()
1962
+ 1: z.number(),
1963
+ 1.5: z.number(),
1964
+ 2: z.number()
1900
1965
  }),
1901
1966
  incentive_pay_overtime_minutes_worked: z.object({
1902
- 1: z.number().optional(),
1903
- 1.5: z.number().optional(),
1904
- 2: z.number().optional()
1967
+ 1: z.number(),
1968
+ 1.5: z.number(),
1969
+ 2: z.number()
1905
1970
  }),
1906
1971
  pay_cents: z.string(),
1907
1972
  base_wage_pay_cents: z.string(),
@@ -1930,14 +1995,14 @@ export const zJobTimeCardDayResponseObject = z.object({
1930
1995
  rest_and_recovery_minutes_worked: z.int(),
1931
1996
  incentive_pay_eligible_minutes_worked: z.int(),
1932
1997
  overtime_minutes_worked: z.object({
1933
- 1: z.number().optional(),
1934
- 1.5: z.number().optional(),
1935
- 2: z.number().optional()
1998
+ 1: z.number(),
1999
+ 1.5: z.number(),
2000
+ 2: z.number()
1936
2001
  }),
1937
2002
  incentive_pay_overtime_minutes_worked: z.object({
1938
- 1: z.number().optional(),
1939
- 1.5: z.number().optional(),
1940
- 2: z.number().optional()
2003
+ 1: z.number(),
2004
+ 1.5: z.number(),
2005
+ 2: z.number()
1941
2006
  }),
1942
2007
  pay_cents: z.string(),
1943
2008
  base_wage_pay_cents: z.string(),
@@ -1965,24 +2030,24 @@ export const zJobTimeCardDayResponseObject = z.object({
1965
2030
  consecutive_days_worked: z.int(),
1966
2031
  weekly_consecutive_days_worked: z.int(),
1967
2032
  cumulative_overtime_minutes_worked: z.object({
1968
- 1: z.number().optional(),
1969
- 1.5: z.number().optional(),
1970
- 2: z.number().optional()
2033
+ 1: z.number(),
2034
+ 1.5: z.number(),
2035
+ 2: z.number()
1971
2036
  }),
1972
2037
  weekly_cumulative_overtime_minutes_worked: z.object({
1973
- 1: z.number().optional(),
1974
- 1.5: z.number().optional(),
1975
- 2: z.number().optional()
2038
+ 1: z.number(),
2039
+ 1.5: z.number(),
2040
+ 2: z.number()
1976
2041
  }),
1977
2042
  cumulative_incentive_pay_overtime_minutes_worked: z.object({
1978
- 1: z.number().optional(),
1979
- 1.5: z.number().optional(),
1980
- 2: z.number().optional()
2043
+ 1: z.number(),
2044
+ 1.5: z.number(),
2045
+ 2: z.number()
1981
2046
  }),
1982
2047
  weekly_cumulative_incentive_pay_overtime_minutes_worked: z.object({
1983
- 1: z.number().optional(),
1984
- 1.5: z.number().optional(),
1985
- 2: z.number().optional()
2048
+ 1: z.number(),
2049
+ 1.5: z.number(),
2050
+ 2: z.number()
1986
2051
  }),
1987
2052
  cumulative_pay_cents: z.string(),
1988
2053
  weekly_cumulative_pay_cents: z.string(),
@@ -2087,7 +2152,7 @@ export const zCompensationElementResponseObject = z.object({
2087
2152
  */
2088
2153
  export const zPayrollFringeBenefitPlanResponseObject = z.object({
2089
2154
  id: z.string(),
2090
- pay_period_config_uid: z.string(),
2155
+ timekeeping_pay_period_config_id: z.string(),
2091
2156
  name: z.string(),
2092
2157
  plan_number: z.string(),
2093
2158
  funded: z.boolean(),
@@ -2097,7 +2162,7 @@ export const zPayrollFringeBenefitPlanResponseObject = z.object({
2097
2162
  'employer_combined_holiday_pto',
2098
2163
  'employer_training',
2099
2164
  'employer_other_contributions'
2100
- ]),
2165
+ ]).nullable(),
2101
2166
  il_jointly_managed: z.boolean(),
2102
2167
  il_fund_name: z.string().nullable(),
2103
2168
  il_fund_address1: z.string().nullable(),
@@ -2111,10 +2176,10 @@ export const zPayrollFringeBenefitPlanResponseObject = z.object({
2111
2176
  updated_at: z.iso.datetime()
2112
2177
  });
2113
2178
  /**
2114
- * Request body for creating or updating a fringe-benefit plan. pay_period_config_uid, name, plan_number, and benefit_category are required.
2179
+ * Request body for creating or updating a fringe-benefit plan. timekeeping_pay_period_config_id, name, plan_number, and benefit_category are required.
2115
2180
  */
2116
2181
  export const zPayrollFringeBenefitPlanParameters = z.object({
2117
- pay_period_config_uid: z.string(),
2182
+ timekeeping_pay_period_config_id: z.string(),
2118
2183
  name: z.string(),
2119
2184
  plan_number: z.string(),
2120
2185
  funded: z.boolean().optional(),
@@ -2140,7 +2205,6 @@ export const zPayrollFringeBenefitPlanParameters = z.object({
2140
2205
  */
2141
2206
  export const zPayrollExternalMapResponseObject = z.object({
2142
2207
  id: z.string(),
2143
- bitemporal_id: z.string(),
2144
2208
  name: z.string(),
2145
2209
  payrolls_compensation_element_id: z.string(),
2146
2210
  compensation_element_name: z.string(),
@@ -2153,17 +2217,48 @@ export const zPayrollExternalMapResponseObject = z.object({
2153
2217
  'garnishment',
2154
2218
  'other'
2155
2219
  ]),
2156
- pay_period_config_uid: z.string().nullable(),
2220
+ timekeeping_pay_period_config_id: z.string().nullable(),
2157
2221
  payrolls_fringe_benefit_plan_id: z.string().nullable(),
2158
2222
  contributor: z.enum([
2159
2223
  'any',
2160
2224
  'employee',
2161
2225
  'employer'
2226
+ ]).nullable(),
2227
+ annual_periods: z.int(),
2228
+ created_by_user_id: z.string().nullable(),
2229
+ global: z.boolean(),
2230
+ valid_from: z.iso.datetime().nullable(),
2231
+ valid_to: z.iso.datetime().nullable(),
2232
+ transaction_from: z.iso.datetime(),
2233
+ transaction_to: z.iso.datetime().nullable(),
2234
+ created_at: z.iso.datetime(),
2235
+ updated_at: z.iso.datetime()
2236
+ });
2237
+ export const zPayrollExternalMapHistoryCorrectionObject = z.object({
2238
+ payrolls_external_map_id: z.string(),
2239
+ name: z.string(),
2240
+ payrolls_compensation_element_id: z.string(),
2241
+ compensation_element_name: z.string(),
2242
+ compensation_element_category: z.enum([
2243
+ 'tax',
2244
+ 'health',
2245
+ 'retirement',
2246
+ 'insurance',
2247
+ 'earning',
2248
+ 'garnishment',
2249
+ 'other'
2162
2250
  ]),
2251
+ timekeeping_pay_period_config_id: z.string().nullable(),
2252
+ payrolls_fringe_benefit_plan_id: z.string().nullable(),
2253
+ contributor: z.enum([
2254
+ 'any',
2255
+ 'employee',
2256
+ 'employer'
2257
+ ]).nullable(),
2163
2258
  annual_periods: z.int(),
2164
2259
  created_by_user_id: z.string().nullable(),
2165
2260
  global: z.boolean(),
2166
- valid_from: z.iso.datetime(),
2261
+ valid_from: z.iso.datetime().nullable(),
2167
2262
  valid_to: z.iso.datetime().nullable(),
2168
2263
  transaction_from: z.iso.datetime(),
2169
2264
  transaction_to: z.iso.datetime().nullable(),
@@ -2171,8 +2266,7 @@ export const zPayrollExternalMapResponseObject = z.object({
2171
2266
  updated_at: z.iso.datetime()
2172
2267
  });
2173
2268
  export const zPayrollExternalMapHistoryVersionObject = z.object({
2174
- id: z.string(),
2175
- bitemporal_id: z.string(),
2269
+ payrolls_external_map_id: z.string(),
2176
2270
  name: z.string(),
2177
2271
  payrolls_compensation_element_id: z.string(),
2178
2272
  compensation_element_name: z.string(),
@@ -2185,17 +2279,17 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
2185
2279
  'garnishment',
2186
2280
  'other'
2187
2281
  ]),
2188
- pay_period_config_uid: z.string().nullable(),
2282
+ timekeeping_pay_period_config_id: z.string().nullable(),
2189
2283
  payrolls_fringe_benefit_plan_id: z.string().nullable(),
2190
2284
  contributor: z.enum([
2191
2285
  'any',
2192
2286
  'employee',
2193
2287
  'employer'
2194
- ]),
2288
+ ]).nullable(),
2195
2289
  annual_periods: z.int(),
2196
2290
  created_by_user_id: z.string().nullable(),
2197
2291
  global: z.boolean(),
2198
- valid_from: z.iso.datetime(),
2292
+ valid_from: z.iso.datetime().nullable(),
2199
2293
  valid_to: z.iso.datetime().nullable(),
2200
2294
  transaction_from: z.iso.datetime(),
2201
2295
  transaction_to: z.iso.datetime().nullable(),
@@ -2206,7 +2300,7 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
2206
2300
  'current',
2207
2301
  'historical'
2208
2302
  ]),
2209
- corrections: z.array(zPayrollExternalMapResponseObject)
2303
+ corrections: z.array(zPayrollExternalMapHistoryCorrectionObject)
2210
2304
  });
2211
2305
  /**
2212
2306
  * A payroll run — a record of one payroll-processing event, synced from an external payroll system or reported to DSPTCH (never a run DSPTCH itself initiates). Paystubs belong to a run.
@@ -2493,7 +2587,7 @@ export const zFeatureResponseObject = z.object({
2493
2587
  address_id: z.string().nullable(),
2494
2588
  created_by_user_id: z.string().nullable(),
2495
2589
  updated_by_user_id: z.string().nullable(),
2496
- geometry: z.record(z.string(), z.unknown()).nullable(),
2590
+ geometry: z.record(z.string(), z.unknown()),
2497
2591
  active_time_begin: z.iso.datetime().nullable(),
2498
2592
  active_time_end: z.iso.datetime().nullable(),
2499
2593
  created_at: z.iso.datetime(),
@@ -2538,7 +2632,7 @@ export const zComplianceCheckResponseObject = z.object({
2538
2632
  timekeeping_time_card_id: z.string().nullable(),
2539
2633
  timekeeping_pay_period_id: z.string().nullable(),
2540
2634
  user_id: z.string().nullable(),
2541
- user_company_uid: z.string().nullable(),
2635
+ employment_id: z.string().nullable(),
2542
2636
  title: z.string(),
2543
2637
  description: z.string(),
2544
2638
  category: z.enum([
@@ -2566,7 +2660,7 @@ export const zComplianceCheckResponseObject = z.object({
2566
2660
  'high',
2567
2661
  'medium',
2568
2662
  'low'
2569
- ]),
2663
+ ]).nullable(),
2570
2664
  checked_at: z.iso.datetime().nullable(),
2571
2665
  passed_at: z.iso.datetime().nullable(),
2572
2666
  time_due: z.iso.datetime().nullable(),
@@ -2691,10 +2785,10 @@ export const zPaystubLineItemResponseObject = z.object({
2691
2785
  timekeeping_pay_period_id: z.string().nullable(),
2692
2786
  user_id: z.string().nullable(),
2693
2787
  external_map: z.object({
2694
- name: z.string().optional(),
2788
+ name: z.string(),
2695
2789
  compensation_element: z.object({
2696
- name: z.string().optional(),
2697
- description: z.string().nullish(),
2790
+ name: z.string(),
2791
+ description: z.string().nullable(),
2698
2792
  category: z.enum([
2699
2793
  'tax',
2700
2794
  'health',
@@ -2703,8 +2797,8 @@ export const zPaystubLineItemResponseObject = z.object({
2703
2797
  'earning',
2704
2798
  'garnishment',
2705
2799
  'other'
2706
- ]).optional()
2707
- }).optional()
2800
+ ])
2801
+ })
2708
2802
  }),
2709
2803
  amount_cents: z.string(),
2710
2804
  contributor: z.enum(['employee', 'employer']),
@@ -2738,7 +2832,7 @@ export const zPositionParameters = z.object({
2738
2832
  wage_adder_rate_cents: z.number().nullish(),
2739
2833
  job_wage_determinations_positions_attributes: z.array(z.object({
2740
2834
  id: z.int().nullish(),
2741
- job_wage_determination_uid: z.string().nullish()
2835
+ job_wage_determination_id: z.string().nullish()
2742
2836
  })).optional(),
2743
2837
  pwa_details_attributes: z.object({
2744
2838
  skill_level: z.string().nullish()
@@ -2848,8 +2942,8 @@ export const zProductionCompletionResponseObject = z.discriminatedUnion('complet
2848
2942
  * The form-assignment tasks created by one request — assigning a form to one or more users, each with a due time and optional recurrence and reminders. Returned as an array because a request can spread the assignment into one task per assignee.
2849
2943
  */
2850
2944
  export const zFormAssignmentTaskResponseObject = z.array(z.object({
2851
- id: z.string().optional(),
2852
- form_definition_id: z.string().optional(),
2945
+ id: z.string(),
2946
+ form_definition_id: z.string(),
2853
2947
  frequency: z.enum([
2854
2948
  'DAILY',
2855
2949
  'WORKDAILY',
@@ -2858,17 +2952,17 @@ export const zFormAssignmentTaskResponseObject = z.array(z.object({
2858
2952
  'BIWEEKLY',
2859
2953
  'MONTHLY',
2860
2954
  'QUARTERLY'
2861
- ]).optional(),
2862
- recurrence_end_time: z.iso.datetime().nullish(),
2863
- time_due: z.iso.datetime().optional(),
2864
- tz_name: z.string().optional(),
2865
- name: z.string().optional(),
2866
- description: z.string().nullish(),
2867
- task_assignee_user_ids: z.array(z.string()).optional(),
2955
+ ]).nullable(),
2956
+ recurrence_end_time: z.iso.datetime().nullable(),
2957
+ time_due: z.iso.datetime(),
2958
+ tz_name: z.string(),
2959
+ name: z.string(),
2960
+ description: z.string().nullable(),
2961
+ task_assignee_user_ids: z.array(z.string()),
2868
2962
  reminders: z.array(z.object({
2869
- offset: z.string().optional(),
2870
- remind_at: z.iso.datetime().optional()
2871
- })).optional()
2963
+ offset: z.string(),
2964
+ remind_at: z.iso.datetime()
2965
+ }))
2872
2966
  }));
2873
2967
  /**
2874
2968
  * Request body for creating or updating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only.
@@ -2958,9 +3052,9 @@ export const zUserCertificationResponseObject = z.object({
2958
3052
  * The function the worker performs in a position (e.g. "Electrician", "Foreman"); null when no function is assigned.
2959
3053
  */
2960
3054
  export const zPositionFunction = z.object({
2961
- id: z.string().optional(),
2962
- value: z.string().optional(),
2963
- description: z.string().optional()
3055
+ id: z.string(),
3056
+ value: z.string(),
3057
+ description: z.string()
2964
3058
  }).nullable();
2965
3059
  /**
2966
3060
  * A job — the primary unit of work in DSPTCH. Workers fill its positions and track time against it; it optionally tracks Prevailing Wage / Apprenticeship (PWA) compliance and optionally belongs to a project. There is no delete endpoint — cancel or complete a job through its status instead.
@@ -3003,47 +3097,35 @@ export const zJobResponseObject = z.object({
3003
3097
  created_by_company_id: z.string(),
3004
3098
  requested_by_company_id: z.string().nullable(),
3005
3099
  project_id: z.string().nullable(),
3006
- created_by_company: z.object({
3007
- id: z.string().optional(),
3008
- name: z.string().optional()
3009
- }),
3010
- requested_by_company: z.object({
3011
- id: z.string().optional(),
3012
- name: z.string().optional()
3013
- }),
3014
- manager_user: z.object({
3015
- id: z.string().optional(),
3016
- name: z.string().optional()
3017
- }).nullable(),
3018
3100
  manager_users: z.array(z.object({
3019
3101
  id: z.string(),
3020
3102
  name: z.string()
3021
3103
  })),
3022
3104
  created_by_user: z.object({
3023
- id: z.string().optional(),
3024
- name: z.string().optional()
3105
+ id: z.string(),
3106
+ name: z.string()
3025
3107
  }),
3026
3108
  sites: z.array(z.object({
3027
- name: z.string().optional(),
3109
+ name: z.string(),
3028
3110
  features: z.array(z.object({
3029
- name: z.string().optional()
3030
- })).nullish()
3031
- })).nullable(),
3111
+ name: z.string()
3112
+ }))
3113
+ })),
3032
3114
  job_address: z.object({
3033
- label: z.string().optional()
3115
+ label: z.string()
3034
3116
  }).nullable(),
3035
3117
  positions: z.array(z.object({
3036
- position_function: zPositionFunction.optional(),
3037
- fulfilled_by_user_id: z.string().nullish()
3038
- })).nullable(),
3118
+ position_function: zPositionFunction,
3119
+ fulfilled_by_user_id: z.string().nullable()
3120
+ })),
3039
3121
  project: z.object({
3040
- name: z.string().optional()
3122
+ name: z.string()
3041
3123
  }).nullable(),
3042
3124
  pwa_details: zPwaJobDetailsResponseObject,
3043
3125
  work_types: z.array(z.object({
3044
- value: z.string().optional()
3045
- })).nullable(),
3046
- timekeeping_timecode_ids: z.array(z.string()).nullable(),
3126
+ value: z.string()
3127
+ })),
3128
+ timekeeping_timecode_ids: z.array(z.string()),
3047
3129
  tracks_feature_allocations: z.boolean(),
3048
3130
  requires_feature_allocation: z.boolean(),
3049
3131
  max_one_feature_allocation: z.boolean()
@@ -3067,11 +3149,11 @@ export const zPositionResponseObject = z.object({
3067
3149
  pwa_wage_pay_rate_src_type: z.string().nullable(),
3068
3150
  wage_adder_rate_cents: z.string().nullable(),
3069
3151
  pwa: z.boolean(),
3070
- federal_wage_determination_uids: z.array(z.string()),
3071
- regional_wage_determination_uids: z.array(z.string()),
3152
+ federal_wage_determination_ids: z.array(z.string()),
3153
+ regional_wage_determination_ids: z.array(z.string()),
3072
3154
  pwa_details: z.object({
3073
3155
  skill_level: z.string().nullable()
3074
- }).nullable(),
3156
+ }),
3075
3157
  start_time: z.iso.datetime().nullable(),
3076
3158
  end_time: z.iso.datetime().nullable(),
3077
3159
  created_at: z.iso.datetime(),
@@ -3095,21 +3177,21 @@ export const zUserRoleRequest = z.object({
3095
3177
  * A role granted to a user within a company's scope — the permissions the user has there. A user can hold several distinct roles per company.
3096
3178
  */
3097
3179
  export const zUserRoleResponse = z.object({
3098
- id: z.string().optional(),
3099
- user_id: z.string().optional(),
3100
- company_id: z.string().optional(),
3180
+ id: z.string(),
3181
+ user_id: z.string(),
3182
+ company_id: z.string(),
3101
3183
  role: z.enum([
3102
3184
  'TECHNICIAN',
3103
3185
  'FIELD_LEAD',
3104
3186
  'MANAGER',
3105
3187
  'SAFETY_MANAGER',
3106
3188
  'ADMIN'
3107
- ]).optional()
3189
+ ])
3108
3190
  });
3109
3191
  /**
3110
3192
  * Employment classification of a worker at a company: EMPLOYEE (W-2) or CONTRACTOR (1099). Null when unset.
3111
3193
  */
3112
- export const zUserCompanyType = z.enum(['EMPLOYEE', 'CONTRACTOR']);
3194
+ export const zUserCompanyType = z.enum(['EMPLOYEE', 'CONTRACTOR']).nullable();
3113
3195
  /**
3114
3196
  * A worker as your company sees them: the cross-company person merged with their employment record at your company (title, pay, benefits, and accruals), their roles at your company, and optional prevailing-wage compliance details. There is no delete — removing a worker terminates their employment at the company (see the user-company endpoints), which sets termination_date and drops them from the default list.
3115
3197
  */
@@ -3132,6 +3214,7 @@ export const zUserResponseObject = z.object({
3132
3214
  updated_at: z.iso.datetime(),
3133
3215
  winda_id: z.string().nullable(),
3134
3216
  linkedin_url: z.string().nullable(),
3217
+ employment_id: z.string(),
3135
3218
  type: zUserCompanyType,
3136
3219
  title: z.string().nullable(),
3137
3220
  overtime_eligible: z.boolean(),
@@ -3149,28 +3232,28 @@ export const zUserResponseObject = z.object({
3149
3232
  hire_date: z.string().nullable(),
3150
3233
  termination_date: z.string().nullable(),
3151
3234
  employment_window: z.object({
3152
- valid_from: z.iso.datetime(),
3235
+ valid_from: z.iso.datetime().nullable(),
3153
3236
  valid_to: z.iso.datetime().nullable()
3154
3237
  }),
3155
3238
  manager_user_id: z.string().nullable(),
3156
3239
  roles: z.array(z.string()),
3157
3240
  company_user_pwa_info: z.object({
3158
- id: z.string().optional(),
3159
- address1: z.string().nullish(),
3160
- address2: z.string().nullish(),
3161
- city: z.string().nullish(),
3162
- state: z.string().nullish(),
3163
- zip: z.string().nullish(),
3164
- race: z.array(z.string()).nullish(),
3165
- sex: z.string().nullish(),
3166
- local_business_license: z.string().nullish(),
3167
- drivers_license_state: z.string().nullish(),
3168
- drivers_license_number: z.string().nullish(),
3169
- veteran_status: z.string().nullish(),
3170
- hispanic_origin: z.string().nullish(),
3171
- ssn: z.string().nullish(),
3172
- disabled: z.boolean().nullish(),
3173
- ca_dir_withholding_exemptions: z.int().nullish(),
3241
+ id: z.string(),
3242
+ address1: z.string().nullable(),
3243
+ address2: z.string().nullable(),
3244
+ city: z.string().nullable(),
3245
+ state: z.string().nullable(),
3246
+ zip: z.string().nullable(),
3247
+ race: z.array(z.string()).nullable(),
3248
+ sex: z.string().nullable(),
3249
+ local_business_license: z.string().nullable(),
3250
+ drivers_license_state: z.string().nullable(),
3251
+ drivers_license_number: z.string().nullable(),
3252
+ veteran_status: z.string().nullable(),
3253
+ hispanic_origin: z.string().nullable(),
3254
+ ssn: z.string().nullable(),
3255
+ disabled: z.boolean().nullable(),
3256
+ ca_dir_withholding_exemptions: z.int().nullable(),
3174
3257
  il_dol_race: z.enum([
3175
3258
  'white',
3176
3259
  'black',
@@ -3188,20 +3271,20 @@ export const zUserResponseObject = z.object({
3188
3271
  'other_asian',
3189
3272
  'other_pacific_islander',
3190
3273
  'other'
3191
- ]).optional(),
3274
+ ]).nullable(),
3192
3275
  il_shines_employment_type: z.enum([
3193
3276
  'part_time',
3194
3277
  'full_time',
3195
3278
  'seasonal_temporary',
3196
3279
  'independent_contract'
3197
- ]).optional(),
3280
+ ]).nullable(),
3198
3281
  il_shines_eep_qualifiers: z.array(z.enum([
3199
3282
  'eep_program_completed',
3200
3283
  'foster_care',
3201
3284
  'formerly_incarcerated',
3202
3285
  'equity_investment_eligible_community',
3203
3286
  'self_registered_or_unknown'
3204
- ])).nullish(),
3287
+ ])).nullable(),
3205
3288
  il_shines_other_programs: z.array(z.enum([
3206
3289
  'solar_training_pipeline_program',
3207
3290
  'craft_apprenticeship_program',
@@ -3210,8 +3293,8 @@ export const zUserResponseObject = z.object({
3210
3293
  'illinois_climate_works_prep_apprenticeship_program',
3211
3294
  'returning_residents_clean_jobs_training_program',
3212
3295
  'other'
3213
- ])).nullish(),
3214
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).optional(),
3296
+ ])).nullable(),
3297
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullable(),
3215
3298
  or_boli_race: z.array(z.enum([
3216
3299
  'american_indian_or_alaska_native',
3217
3300
  'asian',
@@ -3220,7 +3303,7 @@ export const zUserResponseObject = z.object({
3220
3303
  'native_hawaiian_or_pacific_islander',
3221
3304
  'white',
3222
3305
  'portuguese_or_brazilian'
3223
- ])).nullish()
3306
+ ])).nullable()
3224
3307
  }).nullable()
3225
3308
  });
3226
3309
  /**
@@ -3296,13 +3379,13 @@ export const zUserParameters = z.object({
3296
3379
  'other_asian',
3297
3380
  'other_pacific_islander',
3298
3381
  'other'
3299
- ]).optional(),
3382
+ ]).nullish(),
3300
3383
  il_shines_employment_type: z.enum([
3301
3384
  'part_time',
3302
3385
  'full_time',
3303
3386
  'seasonal_temporary',
3304
3387
  'independent_contract'
3305
- ]).optional(),
3388
+ ]).nullish(),
3306
3389
  il_shines_eep_qualifiers: z.array(z.enum([
3307
3390
  'eep_program_completed',
3308
3391
  'foster_care',
@@ -3319,7 +3402,7 @@ export const zUserParameters = z.object({
3319
3402
  'returning_residents_clean_jobs_training_program',
3320
3403
  'other'
3321
3404
  ])).nullish(),
3322
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).optional(),
3405
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullish(),
3323
3406
  or_boli_race: z.array(z.enum([
3324
3407
  'american_indian_or_alaska_native',
3325
3408
  'asian',
@@ -3367,14 +3450,14 @@ export const zUserCompanyCreateParameters = z.object({
3367
3450
  * Keyset pagination cursors for the collection.
3368
3451
  */
3369
3452
  export const zPage = z.object({
3370
- next_cursor: z.string().nullish(),
3371
- current_cursor: z.string().nullish()
3453
+ next_cursor: z.string().nullable(),
3454
+ current_cursor: z.string().nullable()
3372
3455
  });
3373
3456
  /**
3374
3457
  * Pagination metadata for a paged collection, holding the keyset cursors under `page`.
3375
3458
  */
3376
3459
  export const zMeta = z.object({
3377
- page: zPage.optional()
3460
+ page: zPage
3378
3461
  });
3379
3462
  /**
3380
3463
  * Pagination metadata for a change-feed page, with the feed's safe polling watermark.
@@ -3387,17 +3470,17 @@ export const zDeltaMeta = z.object({
3387
3470
  * Pagination links for navigating a paged collection.
3388
3471
  */
3389
3472
  export const zLinks = z.object({
3390
- self: z.string().optional(),
3391
- first: z.string().nullish(),
3392
- next: z.string().nullish()
3473
+ self: z.string(),
3474
+ first: z.string().nullable(),
3475
+ next: z.string().nullable()
3393
3476
  });
3394
3477
  /**
3395
3478
  * A page of time entries, with pagination metadata and navigation links.
3396
3479
  */
3397
3480
  export const zTimeEntryIndexObject = z.object({
3398
- meta: zMeta.optional(),
3399
- links: zLinks.optional(),
3400
- data: z.array(zTimeEntryResponseObject).optional()
3481
+ meta: zMeta,
3482
+ links: zLinks,
3483
+ data: z.array(zTimeEntryResponseObject)
3401
3484
  });
3402
3485
  /**
3403
3486
  * A page of form definitions. A form definition is a SurveyJS form template built and versioned in the web app's form builder, so this API is read-only.
@@ -3406,51 +3489,63 @@ export const zFormDefinitionResponseObject = z.object({
3406
3489
  meta: zMeta,
3407
3490
  links: zLinks,
3408
3491
  data: z.array(z.object({
3409
- id: z.string().optional(),
3410
- name: z.string().optional(),
3411
- description: z.string().optional(),
3412
- company_id: z.string().optional(),
3413
- modified_by_user_id: z.string().nullish(),
3414
- tags: z.array(z.string()).nullish(),
3415
- title_keys: z.array(z.string()).nullish(),
3416
- editable: z.boolean().optional(),
3417
- always_visible: z.boolean().optional(),
3418
- sensitive_form: z.boolean().optional(),
3419
- allow_carry_forward: z.boolean().optional(),
3420
- current_revision: z.int().optional(),
3421
- json: z.record(z.string(), z.unknown()).optional(),
3422
- created_at: z.iso.datetime().optional()
3492
+ id: z.string(),
3493
+ name: z.string(),
3494
+ description: z.string(),
3495
+ company_id: z.string(),
3496
+ modified_by_user_id: z.string().nullable(),
3497
+ tags: z.array(z.string()).nullable(),
3498
+ title_keys: z.array(z.string()).nullable(),
3499
+ editable: z.boolean(),
3500
+ always_visible: z.boolean(),
3501
+ sensitive_form: z.boolean(),
3502
+ allow_carry_forward: z.boolean(),
3503
+ current_revision: z.int().nullable(),
3504
+ json: z.record(z.string(), z.unknown()),
3505
+ created_at: z.iso.datetime()
3423
3506
  }))
3424
3507
  });
3425
3508
  /**
3426
3509
  * A page of form submissions — the lighter list representation. A submission is a user's completed form; submissions are created in the app, so this API is read-only.
3427
3510
  */
3428
3511
  export const zFormSubmissionIndexObject = z.object({
3429
- meta: zMeta.optional(),
3430
- links: zLinks.optional(),
3512
+ meta: zMeta,
3513
+ links: zLinks,
3431
3514
  data: z.array(z.object({
3432
- id: z.string().optional(),
3433
- user_id: z.string().optional(),
3434
- updated_by_user_id: z.string().optional(),
3435
- created_at: z.iso.datetime().optional(),
3436
- updated_at: z.iso.datetime().optional()
3437
- })).optional()
3515
+ id: z.string(),
3516
+ user_id: z.string(),
3517
+ updated_by_user_id: z.string(),
3518
+ created_at: z.iso.datetime(),
3519
+ updated_at: z.iso.datetime()
3520
+ }))
3521
+ });
3522
+ /**
3523
+ * A page of change events for form submissions, written at archival time; archiving hard-deletes the live row, so this feed is the deletion signal the main index cannot give. Visibility derives from metadata retained at archival time — a subset of the live submission index, never a superset.
3524
+ */
3525
+ export const zFormSubmissionDeltasResponse = z.object({
3526
+ meta: zDeltaMeta,
3527
+ links: zLinks,
3528
+ data: z.array(z.object({
3529
+ event: z.enum(['destroy']),
3530
+ id: z.uuid(),
3531
+ timestamp: z.iso.datetime()
3532
+ }))
3438
3533
  });
3439
3534
  /**
3440
3535
  * A page of change events (create, update, destroy) for time entries, drawn from version history; scoped by the surviving parent time card, so a destroyed entry's history stays visible.
3441
3536
  */
3442
3537
  export const zTimeEntryDeltasResponse = z.object({
3443
- meta: zDeltaMeta.optional(),
3444
- links: zLinks.optional(),
3538
+ meta: zDeltaMeta,
3539
+ links: zLinks,
3445
3540
  data: z.array(z.object({
3446
3541
  event: z.enum([
3447
3542
  'create',
3448
3543
  'update',
3449
3544
  'destroy'
3450
- ]).optional(),
3451
- id: z.string().optional(),
3452
- timestamp: z.iso.datetime().optional()
3453
- })).optional()
3545
+ ]),
3546
+ id: z.string(),
3547
+ timestamp: z.iso.datetime()
3548
+ }))
3454
3549
  });
3455
3550
  /**
3456
3551
  * A page of pay periods. A pay period is a bounded pay window generated automatically by its pay schedule (PayPeriodConfig), so this API is read-only.
@@ -3459,16 +3554,15 @@ export const zPayPeriodsResponseObject = z.object({
3459
3554
  meta: zMeta,
3460
3555
  links: zLinks,
3461
3556
  data: z.array(z.object({
3462
- id: z.string().optional(),
3463
- timekeeping_pay_period_config_id: z.string().optional(),
3464
- pay_period_config_uid: z.string().optional(),
3465
- pay_date: z.iso.date().optional(),
3466
- start_time: z.iso.datetime().optional(),
3467
- end_time: z.iso.datetime().optional(),
3468
- pay_run_deadline: z.iso.datetime().optional(),
3469
- approvals_deadline: z.iso.datetime().optional(),
3470
- created_at: z.iso.datetime().optional(),
3471
- updated_at: z.iso.datetime().optional()
3557
+ id: z.string(),
3558
+ timekeeping_pay_period_config_id: z.string(),
3559
+ pay_date: z.iso.date(),
3560
+ start_time: z.iso.datetime(),
3561
+ end_time: z.iso.datetime(),
3562
+ pay_run_deadline: z.iso.datetime(),
3563
+ approvals_deadline: z.iso.datetime(),
3564
+ created_at: z.iso.datetime(),
3565
+ updated_at: z.iso.datetime()
3472
3566
  }))
3473
3567
  });
3474
3568
  /**
@@ -3531,9 +3625,9 @@ export const zCertificationsResponseObject = z.object({
3531
3625
  * A page of certifications held by your company's workers.
3532
3626
  */
3533
3627
  export const zUserCertificationsResponseObj = z.object({
3534
- meta: zMeta.optional(),
3535
- links: zLinks.optional(),
3536
- data: z.array(zUserCertificationResponseObject).optional()
3628
+ meta: zMeta,
3629
+ links: zLinks,
3630
+ data: z.array(zUserCertificationResponseObject)
3537
3631
  });
3538
3632
  /**
3539
3633
  * A timestamp range filter on a date/time field, supplied as `filter[field][gte]` and/or `filter[field][lte]`; omit or null a bound for an open-ended range.
@@ -3547,7 +3641,6 @@ export const zDateTimeFilter = z.object({
3547
3641
  */
3548
3642
  export const zWageDeterminationResponseObject = z.object({
3549
3643
  id: z.string(),
3550
- uid: z.string(),
3551
3644
  general_decision_number: z.string(),
3552
3645
  modification_number: z.int(),
3553
3646
  superseded_by_wage_determination_id: z.string().nullable(),
@@ -3595,7 +3688,6 @@ export const zLaborRatesResponseObject = z.object({
3595
3688
  */
3596
3689
  export const zFederalJobWageDeterminationResponseObject = z.object({
3597
3690
  id: z.string(),
3598
- uid: z.string(),
3599
3691
  job_id: z.string(),
3600
3692
  pwa_trade_id: z.string(),
3601
3693
  type: z.enum(['Pwa::JobWageDeterminations::Federal']),
@@ -3608,17 +3700,67 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
3608
3700
  'heavy',
3609
3701
  'highway',
3610
3702
  'residential'
3611
- ]),
3703
+ ]).nullable(),
3612
3704
  general_wage_determination: z.string().nullable(),
3613
- valid_from: z.iso.datetime(),
3705
+ valid_from: z.iso.datetime().nullable(),
3706
+ valid_to: z.iso.datetime().nullable(),
3707
+ created_at: z.iso.datetime(),
3708
+ updated_at: z.iso.datetime()
3709
+ });
3710
+ export const zFederalJobWageDeterminationHistoryCorrectionObject = z.object({
3711
+ job_wage_determination_id: z.string(),
3712
+ job_id: z.string(),
3713
+ pwa_trade_id: z.string(),
3714
+ type: z.enum(['Pwa::JobWageDeterminations::Federal']),
3715
+ labor_classification: z.string(),
3716
+ hourly_rate_cents: z.string(),
3717
+ fringe_rate_cents: z.string(),
3718
+ class_code: z.string().nullable(),
3719
+ construction_category: z.enum([
3720
+ 'building',
3721
+ 'heavy',
3722
+ 'highway',
3723
+ 'residential'
3724
+ ]).nullable(),
3725
+ general_wage_determination: z.string().nullable(),
3726
+ valid_from: z.iso.datetime().nullable(),
3614
3727
  valid_to: z.iso.datetime().nullable(),
3615
3728
  created_at: z.iso.datetime(),
3616
3729
  updated_at: z.iso.datetime()
3617
3730
  });
3618
3731
  /**
3619
3732
  * State-specific rate fields for a Regional determination, as decimal-string money in cents
3620
- * (e.g. "538.0"). Which keys appear is set by the job's region, not the request, so this object is
3621
- * always a subset of the keys belownever a fixed shape:
3733
+ * (e.g. "538.0"). These nine properties are the whole write vocabulary, but which of them a
3734
+ * request may send is set by the job's region, not the request sending a key the job's
3735
+ * region does not allow returns a 422:
3736
+ *
3737
+ * - Categorized-fringe regions (currently IL) accept `combined_health_fringe_rate_cents`,
3738
+ * `combined_savings_fringe_rate_cents`, `combined_holiday_pto_fringe_rate_cents`,
3739
+ * `training_fringe_rate_cents`, and `other_fringe_rate_cents`.
3740
+ * - Overtime-adder regions (currently IL and NY) accept `one_five_x_adder_rate_cents`,
3741
+ * `two_x_adder_rate_cents`, `one_five_x_fringe_adder_rate_cents`, and
3742
+ * `two_x_fringe_adder_rate_cents`.
3743
+ *
3744
+ * In a categorized-fringe region the five fringe keys are required, not merely accepted —
3745
+ * omitting any of them returns a 422. Categorized-fringe values are non-null when present;
3746
+ * overtime-adder values may be null.
3747
+ *
3748
+ */
3749
+ export const zRegionalWageDeterminationFields = z.object({
3750
+ combined_health_fringe_rate_cents: z.string().optional(),
3751
+ combined_savings_fringe_rate_cents: z.string().optional(),
3752
+ combined_holiday_pto_fringe_rate_cents: z.string().optional(),
3753
+ training_fringe_rate_cents: z.string().optional(),
3754
+ other_fringe_rate_cents: z.string().optional(),
3755
+ one_five_x_adder_rate_cents: z.string().nullish(),
3756
+ two_x_adder_rate_cents: z.string().nullish(),
3757
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
3758
+ two_x_fringe_adder_rate_cents: z.string().nullish()
3759
+ });
3760
+ /**
3761
+ * State-specific rate fields recorded on a Regional determination, as decimal-string money in
3762
+ * cents (e.g. "538.0"). Which keys appear is set by the job's region, so this object is always
3763
+ * a region-determined subset of the nine keys the write side accepts — never a fixed shape:
3622
3764
  *
3623
3765
  * - Categorized-fringe regions (currently IL) carry `combined_health_fringe_rate_cents`,
3624
3766
  * `combined_savings_fringe_rate_cents`, `combined_holiday_pto_fringe_rate_cents`,
@@ -3628,18 +3770,15 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
3628
3770
  * `two_x_fringe_adder_rate_cents`.
3629
3771
  * - A region with neither returns an empty object.
3630
3772
  *
3631
- * On write the same applicability governs the request sending a key the job's region does not
3632
- * allow returns a 422. Categorized-fringe values are non-null when present; overtime-adder values
3633
- * may be null.
3773
+ * Categorized-fringe values are non-null when present; overtime-adder values may be null.
3634
3774
  *
3635
3775
  */
3636
- export const zRegionalWageDeterminationFields = z.record(z.string(), z.string().nullable());
3776
+ export const zRegionalWageDeterminationFieldsResponse = z.record(z.string(), z.string().nullable());
3637
3777
  /**
3638
3778
  * A Regional (state prevailing-wage) wage determination on a job.
3639
3779
  */
3640
3780
  export const zRegionalJobWageDeterminationResponseObject = z.object({
3641
3781
  id: z.string(),
3642
- uid: z.string(),
3643
3782
  job_id: z.string(),
3644
3783
  pwa_trade_id: z.string(),
3645
3784
  type: z.enum(['Pwa::JobWageDeterminations::Regional']),
@@ -3647,8 +3786,8 @@ export const zRegionalJobWageDeterminationResponseObject = z.object({
3647
3786
  hourly_rate_cents: z.string(),
3648
3787
  fringe_rate_cents: z.string(),
3649
3788
  general_wage_determination: z.string().nullable(),
3650
- regional_fields: zRegionalWageDeterminationFields,
3651
- valid_from: z.iso.datetime(),
3789
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
3790
+ valid_from: z.iso.datetime().nullable(),
3652
3791
  valid_to: z.iso.datetime().nullable(),
3653
3792
  created_at: z.iso.datetime(),
3654
3793
  updated_at: z.iso.datetime()
@@ -3660,9 +3799,27 @@ export const zJobWageDeterminationResponseObject = z.discriminatedUnion('type',
3660
3799
  zFederalJobWageDeterminationResponseObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
3661
3800
  zRegionalJobWageDeterminationResponseObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
3662
3801
  ]);
3802
+ export const zRegionalJobWageDeterminationHistoryCorrectionObject = z.object({
3803
+ job_wage_determination_id: z.string(),
3804
+ job_id: z.string(),
3805
+ pwa_trade_id: z.string(),
3806
+ type: z.enum(['Pwa::JobWageDeterminations::Regional']),
3807
+ labor_classification: z.string(),
3808
+ hourly_rate_cents: z.string(),
3809
+ fringe_rate_cents: z.string(),
3810
+ general_wage_determination: z.string().nullable(),
3811
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
3812
+ valid_from: z.iso.datetime().nullable(),
3813
+ valid_to: z.iso.datetime().nullable(),
3814
+ created_at: z.iso.datetime(),
3815
+ updated_at: z.iso.datetime()
3816
+ });
3817
+ export const zJobWageDeterminationHistoryCorrectionObject = z.discriminatedUnion('type', [
3818
+ zFederalJobWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
3819
+ zRegionalJobWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
3820
+ ]);
3663
3821
  export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
3664
- id: z.string(),
3665
- uid: z.string(),
3822
+ job_wage_determination_id: z.string(),
3666
3823
  job_id: z.string(),
3667
3824
  pwa_trade_id: z.string(),
3668
3825
  type: z.enum(['Pwa::JobWageDeterminations::Federal']),
@@ -3675,9 +3832,9 @@ export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
3675
3832
  'heavy',
3676
3833
  'highway',
3677
3834
  'residential'
3678
- ]),
3835
+ ]).nullable(),
3679
3836
  general_wage_determination: z.string().nullable(),
3680
- valid_from: z.iso.datetime(),
3837
+ valid_from: z.iso.datetime().nullable(),
3681
3838
  valid_to: z.iso.datetime().nullable(),
3682
3839
  created_at: z.iso.datetime(),
3683
3840
  updated_at: z.iso.datetime(),
@@ -3686,11 +3843,10 @@ export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
3686
3843
  'current',
3687
3844
  'historical'
3688
3845
  ]),
3689
- corrections: z.array(zJobWageDeterminationResponseObject)
3846
+ corrections: z.array(zJobWageDeterminationHistoryCorrectionObject)
3690
3847
  });
3691
3848
  export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
3692
- id: z.string(),
3693
- uid: z.string(),
3849
+ job_wage_determination_id: z.string(),
3694
3850
  job_id: z.string(),
3695
3851
  pwa_trade_id: z.string(),
3696
3852
  type: z.enum(['Pwa::JobWageDeterminations::Regional']),
@@ -3698,8 +3854,8 @@ export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
3698
3854
  hourly_rate_cents: z.string(),
3699
3855
  fringe_rate_cents: z.string(),
3700
3856
  general_wage_determination: z.string().nullable(),
3701
- regional_fields: zRegionalWageDeterminationFields,
3702
- valid_from: z.iso.datetime(),
3857
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
3858
+ valid_from: z.iso.datetime().nullable(),
3703
3859
  valid_to: z.iso.datetime().nullable(),
3704
3860
  created_at: z.iso.datetime(),
3705
3861
  updated_at: z.iso.datetime(),
@@ -3708,7 +3864,7 @@ export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
3708
3864
  'current',
3709
3865
  'historical'
3710
3866
  ]),
3711
- corrections: z.array(zJobWageDeterminationResponseObject)
3867
+ corrections: z.array(zJobWageDeterminationHistoryCorrectionObject)
3712
3868
  });
3713
3869
  export const zJobWageDeterminationHistoryVersionObject = z.discriminatedUnion('type', [
3714
3870
  zFederalJobWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
@@ -3729,7 +3885,7 @@ export const zFederalJobWageDeterminationParameters = z.object({
3729
3885
  'heavy',
3730
3886
  'highway',
3731
3887
  'residential'
3732
- ]).optional(),
3888
+ ]).nullish(),
3733
3889
  general_wage_determination: z.string().nullish()
3734
3890
  });
3735
3891
  /**
@@ -3818,24 +3974,33 @@ export const zRateRuleCondition = z.discriminatedUnion('type', [
3818
3974
  */
3819
3975
  export const zRateRuleResponseObject = z.object({
3820
3976
  id: z.string(),
3821
- uid: z.string(),
3822
3977
  job_wage_determination_id: z.string(),
3823
3978
  pay_rates_rule_package_id: z.string(),
3824
3979
  effect: zRateRuleEffect,
3825
3980
  conditions: z.array(zRateRuleCondition),
3826
- valid_from: z.iso.datetime(),
3981
+ valid_from: z.iso.datetime().nullable(),
3982
+ valid_to: z.iso.datetime().nullable(),
3983
+ created_at: z.iso.datetime(),
3984
+ updated_at: z.iso.datetime()
3985
+ });
3986
+ export const zRateRuleHistoryCorrectionObject = z.object({
3987
+ pay_rates_rule_id: z.string(),
3988
+ job_wage_determination_id: z.string(),
3989
+ pay_rates_rule_package_id: z.string(),
3990
+ effect: zRateRuleEffect,
3991
+ conditions: z.array(zRateRuleCondition),
3992
+ valid_from: z.iso.datetime().nullable(),
3827
3993
  valid_to: z.iso.datetime().nullable(),
3828
3994
  created_at: z.iso.datetime(),
3829
3995
  updated_at: z.iso.datetime()
3830
3996
  });
3831
3997
  export const zRateRuleHistoryVersionObject = z.object({
3832
- id: z.string(),
3833
- uid: z.string(),
3998
+ pay_rates_rule_id: z.string(),
3834
3999
  job_wage_determination_id: z.string(),
3835
4000
  pay_rates_rule_package_id: z.string(),
3836
4001
  effect: zRateRuleEffect,
3837
4002
  conditions: z.array(zRateRuleCondition),
3838
- valid_from: z.iso.datetime(),
4003
+ valid_from: z.iso.datetime().nullable(),
3839
4004
  valid_to: z.iso.datetime().nullable(),
3840
4005
  created_at: z.iso.datetime(),
3841
4006
  updated_at: z.iso.datetime(),
@@ -3844,7 +4009,7 @@ export const zRateRuleHistoryVersionObject = z.object({
3844
4009
  'current',
3845
4010
  'historical'
3846
4011
  ]),
3847
- corrections: z.array(zRateRuleResponseObject)
4012
+ corrections: z.array(zRateRuleHistoryCorrectionObject)
3848
4013
  });
3849
4014
  /**
3850
4015
  * Create a rate rule on a job wage determination. `effect` is required. `conditions` is optional — an omitted or empty list makes the rule always apply. `effective_date` (YYYY-MM-DD) sets when the rule takes effect; it defaults to today and cannot predate the earliest applicable wage determination.
@@ -3924,7 +4089,7 @@ export const zAssetsFormAssignmentTriggerResponseObject = z.object({
3924
4089
  'BIWEEKLY',
3925
4090
  'MONTHLY',
3926
4091
  'QUARTERLY'
3927
- ]),
4092
+ ]).nullable(),
3928
4093
  first_due_by: z.enum([
3929
4094
  'day_of_event',
3930
4095
  'day_of_week',
@@ -3966,7 +4131,7 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
3966
4131
  'BIWEEKLY',
3967
4132
  'MONTHLY',
3968
4133
  'QUARTERLY'
3969
- ]).optional(),
4134
+ ]).nullish(),
3970
4135
  day_of_week_due: z.int().nullish(),
3971
4136
  day_of_month_due: z.int().nullish(),
3972
4137
  assigned_user_ids: z.array(z.string()).optional(),
@@ -3979,7 +4144,7 @@ export const zAssetsAttachmentResponseObject = z.object({
3979
4144
  id: z.string(),
3980
4145
  file: z.object({
3981
4146
  filename: z.string(),
3982
- content_type: z.string().nullish(),
4147
+ content_type: z.string().nullable(),
3983
4148
  byte_size: z.int(),
3984
4149
  url: z.string()
3985
4150
  }).nullable(),
@@ -4026,7 +4191,7 @@ export const zAssetsItemResponseObject = z.object({
4026
4191
  'available',
4027
4192
  'assigned',
4028
4193
  'retired'
4029
- ]),
4194
+ ]).nullable(),
4030
4195
  purchase_date: z.iso.datetime().nullable(),
4031
4196
  purchase_price_cents: z.string().nullable(),
4032
4197
  currency: z.string().nullable(),
@@ -4141,7 +4306,7 @@ export const zAssetsDocumentResponseObject = z.object({
4141
4306
  created_by_user_id: z.string(),
4142
4307
  file: z.object({
4143
4308
  filename: z.string(),
4144
- content_type: z.string().nullish(),
4309
+ content_type: z.string().nullable(),
4145
4310
  byte_size: z.int(),
4146
4311
  url: z.string()
4147
4312
  }).nullable(),
@@ -4179,7 +4344,7 @@ export const zAssetsItemFormAssignmentResponseObject = z.object({
4179
4344
  form_definition_id: z.string(),
4180
4345
  name: z.string(),
4181
4346
  description: z.string().nullable(),
4182
- tz_name: z.string().nullable(),
4347
+ tz_name: z.string(),
4183
4348
  time_due: z.iso.datetime().nullable(),
4184
4349
  frequency: z.enum([
4185
4350
  'DAILY',
@@ -4189,12 +4354,12 @@ export const zAssetsItemFormAssignmentResponseObject = z.object({
4189
4354
  'BIWEEKLY',
4190
4355
  'MONTHLY',
4191
4356
  'QUARTERLY'
4192
- ]),
4357
+ ]).nullable(),
4193
4358
  recurrence_end_time: z.iso.datetime().nullable(),
4194
4359
  task_assignee_user_ids: z.array(z.string()),
4195
4360
  reminders: z.array(z.object({
4196
- offset: z.string().optional(),
4197
- remind_at: z.iso.datetime().nullish()
4361
+ offset: z.string(),
4362
+ remind_at: z.iso.datetime()
4198
4363
  }))
4199
4364
  });
4200
4365
  /**
@@ -4218,7 +4383,7 @@ export const zAssetsItemFormAssignmentParameters = z.object({
4218
4383
  'BIWEEKLY',
4219
4384
  'MONTHLY',
4220
4385
  'QUARTERLY'
4221
- ]).optional(),
4386
+ ]).nullish(),
4222
4387
  recurrence_end_time: z.iso.datetime().nullish(),
4223
4388
  task_assignee_user_ids: z.array(z.string()).optional(),
4224
4389
  reminders_attributes: z.array(z.object({
@@ -5859,6 +6024,24 @@ export const zListFormDefinitionsQuery = z.object({
5859
6024
  * Success
5860
6025
  */
5861
6026
  export const zListFormDefinitionsResponse = zFormDefinitionResponseObject;
6027
+ export const zListFormSubmissionDeltasQuery = z.object({
6028
+ 'filter[event]': z.enum([
6029
+ 'create',
6030
+ 'update',
6031
+ 'destroy'
6032
+ ]).optional(),
6033
+ 'filter[created_at][gte]': z.iso.datetime().optional(),
6034
+ 'filter[created_at][lte]': z.iso.datetime().optional(),
6035
+ filter: z.string().optional(),
6036
+ 'filter[unexpected]': z.string().optional(),
6037
+ 'page[cursor]': z.string().optional(),
6038
+ 'page[limit]': z.int().gte(1).optional().default(20),
6039
+ page: z.string().optional()
6040
+ });
6041
+ /**
6042
+ * Success
6043
+ */
6044
+ export const zListFormSubmissionDeltasResponse = zFormSubmissionDeltasResponse;
5862
6045
  export const zListFormSubmissionsQuery = z.object({
5863
6046
  'filter[form_definition_id]': z.string().optional(),
5864
6047
  'filter[created_at][gte]': z.iso.datetime().optional(),
@@ -6020,8 +6203,8 @@ export const zCreateJobTradePath = z.object({
6020
6203
  export const zCreateJobTradeResponse = zPwaTradeResponseObject;
6021
6204
  export const zListRateRuleHistoryPath = z.object({
6022
6205
  job_id: z.string(),
6023
- wage_determination_uid: z.string(),
6024
- rate_rule_uid: z.string()
6206
+ wage_determination_id: z.string(),
6207
+ rate_rule_id: z.string()
6025
6208
  });
6026
6209
  export const zListRateRuleHistoryQuery = z.object({
6027
6210
  'as_of[valid]': z.string().optional()
@@ -6036,7 +6219,7 @@ export const zListRateRuleHistoryResponse = z.object({
6036
6219
  });
6037
6220
  export const zListRateRulesPath = z.object({
6038
6221
  job_id: z.string(),
6039
- wage_determination_uid: z.string()
6222
+ wage_determination_id: z.string()
6040
6223
  });
6041
6224
  export const zListRateRulesQuery = z.object({
6042
6225
  'as_of[valid]': z.iso.datetime().optional(),
@@ -6056,7 +6239,7 @@ export const zListRateRulesResponse = z.object({
6056
6239
  export const zCreateRateRuleBody = zRateRuleParameters;
6057
6240
  export const zCreateRateRulePath = z.object({
6058
6241
  job_id: z.string(),
6059
- wage_determination_uid: z.string()
6242
+ wage_determination_id: z.string()
6060
6243
  });
6061
6244
  /**
6062
6245
  * Created
@@ -6064,8 +6247,8 @@ export const zCreateRateRulePath = z.object({
6064
6247
  export const zCreateRateRuleResponse = zRateRuleResponseObject;
6065
6248
  export const zGetRateRulePath = z.object({
6066
6249
  job_id: z.string(),
6067
- wage_determination_uid: z.string(),
6068
- uid: z.string()
6250
+ wage_determination_id: z.string(),
6251
+ id: z.string()
6069
6252
  });
6070
6253
  export const zGetRateRuleQuery = z.object({
6071
6254
  'as_of[valid]': z.iso.datetime().optional()
@@ -6076,7 +6259,7 @@ export const zGetRateRuleQuery = z.object({
6076
6259
  export const zGetRateRuleResponse = zRateRuleResponseObject;
6077
6260
  export const zListJobWageDeterminationHistoryPath = z.object({
6078
6261
  job_id: z.string(),
6079
- wage_determination_uid: z.string()
6262
+ wage_determination_id: z.string()
6080
6263
  });
6081
6264
  export const zListJobWageDeterminationHistoryQuery = z.object({
6082
6265
  'as_of[valid]': z.string().optional()
@@ -6120,7 +6303,7 @@ export const zDeleteWageDeterminationHeaders = z.object({
6120
6303
  });
6121
6304
  export const zDeleteWageDeterminationPath = z.object({
6122
6305
  job_id: z.string(),
6123
- uid: z.string()
6306
+ id: z.string()
6124
6307
  });
6125
6308
  /**
6126
6309
  * Success
@@ -6128,7 +6311,7 @@ export const zDeleteWageDeterminationPath = z.object({
6128
6311
  export const zDeleteWageDeterminationResponse = zJobWageDeterminationResponseObject;
6129
6312
  export const zGetJobWageDeterminationPath = z.object({
6130
6313
  job_id: z.string(),
6131
- uid: z.string()
6314
+ id: z.string()
6132
6315
  });
6133
6316
  export const zGetJobWageDeterminationQuery = z.object({
6134
6317
  'as_of[valid]': z.iso.datetime().optional()
@@ -6257,7 +6440,7 @@ export const zListExternalMapHistoryResponse = z.object({
6257
6440
  });
6258
6441
  export const zListExternalMapsQuery = z.object({
6259
6442
  'filter[name]': z.string().optional(),
6260
- 'filter[pay_period_config_uid]': z.string().optional(),
6443
+ 'filter[timekeeping_pay_period_config_id]': z.string().optional(),
6261
6444
  'filter[global]': z.boolean().optional(),
6262
6445
  filter: z.string().optional(),
6263
6446
  'filter[unexpected]': z.string().optional(),
@@ -6291,7 +6474,7 @@ export const zGetExternalMapQuery = z.object({
6291
6474
  export const zGetExternalMapResponse = zPayrollExternalMapResponseObject;
6292
6475
  export const zListFringeBenefitPlansQuery = z.object({
6293
6476
  'filter[name]': z.string().optional(),
6294
- 'filter[pay_period_config_uid]': z.string().optional(),
6477
+ 'filter[timekeeping_pay_period_config_id]': z.string().optional(),
6295
6478
  filter: z.string().optional(),
6296
6479
  'filter[unexpected]': z.string().optional(),
6297
6480
  'page[cursor]': z.string().optional(),
@@ -7155,7 +7338,7 @@ export const zCreateManagerTimeEntryApprovalPath = z.object({
7155
7338
  */
7156
7339
  export const zCreateManagerTimeEntryApprovalResponse = zTimeEntryApprovalResponseObject;
7157
7340
  export const zListAttestationConfigsPath = z.object({
7158
- pay_period_config_uid: z.string()
7341
+ pay_period_config_id: z.string()
7159
7342
  });
7160
7343
  /**
7161
7344
  * Success
@@ -7167,14 +7350,14 @@ export const zListAttestationConfigsResponse = z.object({
7167
7350
  });
7168
7351
  export const zCreateAttestationConfigBody = zAttestationConfigParameters;
7169
7352
  export const zCreateAttestationConfigPath = z.object({
7170
- pay_period_config_uid: z.string()
7353
+ pay_period_config_id: z.string()
7171
7354
  });
7172
7355
  /**
7173
7356
  * Created
7174
7357
  */
7175
7358
  export const zCreateAttestationConfigResponse = zAttestationConfigResponseObject;
7176
7359
  export const zDeleteAttestationConfigPath = z.object({
7177
- pay_period_config_uid: z.string(),
7360
+ pay_period_config_id: z.string(),
7178
7361
  id: z.string()
7179
7362
  });
7180
7363
  /**
@@ -7182,7 +7365,7 @@ export const zDeleteAttestationConfigPath = z.object({
7182
7365
  */
7183
7366
  export const zDeleteAttestationConfigResponse = zAttestationConfigResponseObject;
7184
7367
  export const zGetAttestationConfigPath = z.object({
7185
- pay_period_config_uid: z.string(),
7368
+ pay_period_config_id: z.string(),
7186
7369
  id: z.string()
7187
7370
  });
7188
7371
  /**
@@ -7190,7 +7373,7 @@ export const zGetAttestationConfigPath = z.object({
7190
7373
  */
7191
7374
  export const zGetAttestationConfigResponse = zAttestationConfigResponseObject;
7192
7375
  export const zListPayPeriodConfigHistoryPath = z.object({
7193
- pay_period_config_uid: z.string()
7376
+ pay_period_config_id: z.string()
7194
7377
  });
7195
7378
  export const zListPayPeriodConfigHistoryQuery = z.object({
7196
7379
  'as_of[valid]': z.string().optional()
@@ -7204,7 +7387,7 @@ export const zListPayPeriodConfigHistoryResponse = z.object({
7204
7387
  data: z.array(zPayPeriodConfigHistoryVersionObject).optional()
7205
7388
  });
7206
7389
  export const zListHolidaysPath = z.object({
7207
- pay_period_config_uid: z.string()
7390
+ pay_period_config_id: z.string()
7208
7391
  });
7209
7392
  export const zListHolidaysQuery = z.object({
7210
7393
  'filter[overtime]': z.boolean().optional(),
@@ -7229,14 +7412,14 @@ export const zListHolidaysResponse = z.object({
7229
7412
  });
7230
7413
  export const zCreateHolidayBody = zHolidayParameters;
7231
7414
  export const zCreateHolidayPath = z.object({
7232
- pay_period_config_uid: z.string()
7415
+ pay_period_config_id: z.string()
7233
7416
  });
7234
7417
  /**
7235
7418
  * Created
7236
7419
  */
7237
7420
  export const zCreateHolidayResponse = zHolidayResponseObject;
7238
7421
  export const zDeleteHolidayPath = z.object({
7239
- pay_period_config_uid: z.string(),
7422
+ pay_period_config_id: z.string(),
7240
7423
  id: z.string()
7241
7424
  });
7242
7425
  /**
@@ -7245,7 +7428,7 @@ export const zDeleteHolidayPath = z.object({
7245
7428
  export const zDeleteHolidayResponse = zHolidayResponseObject;
7246
7429
  export const zUpdateHolidayBody = zHolidayParameters;
7247
7430
  export const zUpdateHolidayPath = z.object({
7248
- pay_period_config_uid: z.string(),
7431
+ pay_period_config_id: z.string(),
7249
7432
  id: z.string()
7250
7433
  });
7251
7434
  /**
@@ -7271,7 +7454,7 @@ export const zListPayPeriodConfigsResponse = z.object({
7271
7454
  data: z.array(zPayPeriodConfigResponseObject).optional()
7272
7455
  });
7273
7456
  export const zGetPayPeriodConfigPath = z.object({
7274
- uid: z.string()
7457
+ id: z.string()
7275
7458
  });
7276
7459
  export const zGetPayPeriodConfigQuery = z.object({
7277
7460
  'as_of[valid]': z.iso.datetime().optional()