@dsptch-work/api-client 0.9.0 → 0.11.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
  *
@@ -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',
@@ -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,7 +689,37 @@ export const zTimecodeResponseObject = z.object({
682
689
  'non_job',
683
690
  'job_with_timecode'
684
691
  ]),
685
- default_for_company_id: z.string().nullable(),
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(),
686
723
  valid_from: z.iso.datetime().nullable(),
687
724
  valid_to: z.iso.datetime().nullable(),
688
725
  transaction_from: z.iso.datetime(),
@@ -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,7 +749,7 @@ export const zTimecodeHistoryVersionObject = z.object({
712
749
  'non_job',
713
750
  'job_with_timecode'
714
751
  ]),
715
- default_for_company_id: z.string().nullable(),
752
+ default_for_company_id: z.string(),
716
753
  valid_from: z.iso.datetime().nullable(),
717
754
  valid_to: z.iso.datetime().nullable(),
718
755
  transaction_from: z.iso.datetime(),
@@ -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.
@@ -779,6 +816,9 @@ export const zTimecodeCorrectionParameters = z.object({
779
816
  export const zTimecodeGenesisParameters = z.object({
780
817
  effective_date: z.iso.datetime()
781
818
  });
819
+ /**
820
+ * 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`.
821
+ */
782
822
  export const zTimecodeScheduledTerminationParameters = z.object({
783
823
  effective_date: z.iso.datetime()
784
824
  });
@@ -831,7 +871,7 @@ export const zPerDiemResponseObject = z.object({
831
871
  export const zPerDiemParameters = z.object({
832
872
  name: z.string(),
833
873
  description: z.string().nullish(),
834
- rate_cents: z.string().nullable(),
874
+ rate_cents: z.string(),
835
875
  currency: z.string(),
836
876
  taxable: z.boolean().optional(),
837
877
  default: z.boolean().nullish(),
@@ -991,7 +1031,7 @@ export const zHolidayResponseObject = z.object({
991
1031
  export const zAttestationConfigResponseObject = z.object({
992
1032
  id: z.string(),
993
1033
  timekeeping_pay_period_config_id: z.string(),
994
- content: z.string().nullable(),
1034
+ content: z.string(),
995
1035
  expected_response: z.boolean(),
996
1036
  us_state_id: z.string().nullable(),
997
1037
  deleted_at: z.iso.datetime().nullable(),
@@ -1026,7 +1066,7 @@ export const zPayPeriodConfigResponseObject = z.object({
1026
1066
  'none',
1027
1067
  'base',
1028
1068
  'aggregate'
1029
- ]),
1069
+ ]).nullable(),
1030
1070
  time_mode: z.enum([
1031
1071
  'none',
1032
1072
  'base',
@@ -1037,7 +1077,44 @@ export const zPayPeriodConfigResponseObject = z.object({
1037
1077
  'quickbooks_online',
1038
1078
  'paychex',
1039
1079
  'gusto'
1080
+ ]).nullable(),
1081
+ actuals_enabled: z.boolean().nullable(),
1082
+ requires_external_map_contributor: z.boolean(),
1083
+ paid_after_holiday: z.boolean(),
1084
+ demo: z.boolean().nullable(),
1085
+ valid_from: z.iso.datetime().nullable(),
1086
+ valid_to: z.iso.datetime().nullable(),
1087
+ created_at: z.iso.datetime()
1088
+ });
1089
+ export const zPayPeriodConfigHistoryCorrectionObject = z.object({
1090
+ timekeeping_pay_period_config_id: z.string(),
1091
+ company_id: z.string(),
1092
+ name: z.string(),
1093
+ frequency: z.enum(['weekly', 'biweekly']),
1094
+ start_day_of_week: z.int(),
1095
+ tz_name: z.string(),
1096
+ currency: z.string(),
1097
+ status: z.enum([
1098
+ 'synced',
1099
+ 'pending',
1100
+ 'failed'
1040
1101
  ]),
1102
+ payroll_mode: z.enum([
1103
+ 'none',
1104
+ 'base',
1105
+ 'aggregate'
1106
+ ]).nullable(),
1107
+ time_mode: z.enum([
1108
+ 'none',
1109
+ 'base',
1110
+ 'aggregate'
1111
+ ]),
1112
+ payroll_system: z.enum([
1113
+ 'rippling',
1114
+ 'quickbooks_online',
1115
+ 'paychex',
1116
+ 'gusto'
1117
+ ]).nullable(),
1041
1118
  actuals_enabled: z.boolean().nullable(),
1042
1119
  requires_external_map_contributor: z.boolean(),
1043
1120
  paid_after_holiday: z.boolean(),
@@ -1047,7 +1124,7 @@ export const zPayPeriodConfigResponseObject = z.object({
1047
1124
  created_at: z.iso.datetime()
1048
1125
  });
1049
1126
  export const zPayPeriodConfigHistoryVersionObject = z.object({
1050
- id: z.string(),
1127
+ timekeeping_pay_period_config_id: z.string(),
1051
1128
  company_id: z.string(),
1052
1129
  name: z.string(),
1053
1130
  frequency: z.enum(['weekly', 'biweekly']),
@@ -1063,7 +1140,7 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1063
1140
  'none',
1064
1141
  'base',
1065
1142
  'aggregate'
1066
- ]),
1143
+ ]).nullable(),
1067
1144
  time_mode: z.enum([
1068
1145
  'none',
1069
1146
  'base',
@@ -1074,7 +1151,7 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1074
1151
  'quickbooks_online',
1075
1152
  'paychex',
1076
1153
  'gusto'
1077
- ]),
1154
+ ]).nullable(),
1078
1155
  actuals_enabled: z.boolean().nullable(),
1079
1156
  requires_external_map_contributor: z.boolean(),
1080
1157
  paid_after_holiday: z.boolean(),
@@ -1087,7 +1164,7 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1087
1164
  'current',
1088
1165
  'historical'
1089
1166
  ]),
1090
- corrections: z.array(zPayPeriodConfigResponseObject)
1167
+ corrections: z.array(zPayPeriodConfigHistoryCorrectionObject)
1091
1168
  });
1092
1169
  /**
1093
1170
  * 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 +1208,7 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1131
1208
  'male',
1132
1209
  'non_binary',
1133
1210
  'not_specified'
1134
- ]),
1211
+ ]).nullable(),
1135
1212
  local_business_license: z.string().nullable(),
1136
1213
  drivers_license_state: z.string().nullable(),
1137
1214
  drivers_license_number: z.string().nullable(),
@@ -1142,12 +1219,12 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1142
1219
  'reserves',
1143
1220
  'guard',
1144
1221
  'not_specified'
1145
- ]),
1222
+ ]).nullable(),
1146
1223
  hispanic_origin: z.enum([
1147
1224
  'yes',
1148
1225
  'no',
1149
1226
  'not_specified'
1150
- ]),
1227
+ ]).nullable(),
1151
1228
  ca_dir_withholding_exemptions: z.int().nullable(),
1152
1229
  disabled: z.boolean(),
1153
1230
  il_dol_race: z.enum([
@@ -1167,13 +1244,13 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1167
1244
  'other_asian',
1168
1245
  'other_pacific_islander',
1169
1246
  'other'
1170
- ]),
1247
+ ]).nullable(),
1171
1248
  il_shines_employment_type: z.enum([
1172
1249
  'part_time',
1173
1250
  'full_time',
1174
1251
  'seasonal_temporary',
1175
1252
  'independent_contract'
1176
- ]),
1253
+ ]).nullable(),
1177
1254
  il_shines_eep_qualifiers: z.array(z.enum([
1178
1255
  'eep_program_completed',
1179
1256
  'foster_care',
@@ -1190,7 +1267,7 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1190
1267
  'returning_residents_clean_jobs_training_program',
1191
1268
  'other'
1192
1269
  ])).nullable(),
1193
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']),
1270
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullable(),
1194
1271
  or_boli_race: z.array(z.enum([
1195
1272
  'american_indian_or_alaska_native',
1196
1273
  'asian',
@@ -1225,7 +1302,7 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1225
1302
  'male',
1226
1303
  'non_binary',
1227
1304
  'not_specified'
1228
- ]).optional(),
1305
+ ]).nullish(),
1229
1306
  local_business_license: z.string().nullish(),
1230
1307
  drivers_license_state: z.string().nullish(),
1231
1308
  drivers_license_number: z.string().nullish(),
@@ -1236,12 +1313,12 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1236
1313
  'reserves',
1237
1314
  'guard',
1238
1315
  'not_specified'
1239
- ]).optional(),
1316
+ ]).nullish(),
1240
1317
  hispanic_origin: z.enum([
1241
1318
  'yes',
1242
1319
  'no',
1243
1320
  'not_specified'
1244
- ]).optional(),
1321
+ ]).nullish(),
1245
1322
  ca_dir_withholding_exemptions: z.int().nullish(),
1246
1323
  disabled: z.boolean().optional(),
1247
1324
  il_dol_race: z.enum([
@@ -1261,13 +1338,13 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1261
1338
  'other_asian',
1262
1339
  'other_pacific_islander',
1263
1340
  'other'
1264
- ]).optional(),
1341
+ ]).nullish(),
1265
1342
  il_shines_employment_type: z.enum([
1266
1343
  'part_time',
1267
1344
  'full_time',
1268
1345
  'seasonal_temporary',
1269
1346
  'independent_contract'
1270
- ]).optional(),
1347
+ ]).nullish(),
1271
1348
  il_shines_eep_qualifiers: z.array(z.enum([
1272
1349
  'eep_program_completed',
1273
1350
  'foster_care',
@@ -1284,7 +1361,7 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1284
1361
  'returning_residents_clean_jobs_training_program',
1285
1362
  'other'
1286
1363
  ])).nullish(),
1287
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).optional(),
1364
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullish(),
1288
1365
  or_boli_race: z.array(z.enum([
1289
1366
  'american_indian_or_alaska_native',
1290
1367
  'asian',
@@ -1394,13 +1471,13 @@ export const zTimeEntryResponseObject = z.object({
1394
1471
  ]),
1395
1472
  hours_worked: z.number(),
1396
1473
  overtime_minutes_worked: z.object({
1397
- 1: z.number().optional(),
1398
- 1.5: z.number().optional(),
1399
- 2: z.number().optional()
1474
+ 1: z.number(),
1475
+ 1.5: z.number(),
1476
+ 2: z.number()
1400
1477
  }),
1401
1478
  incentive_pay_one_five_x_minutes_worked: z.int(),
1402
1479
  hourly_rate_cents: z.string().nullable(),
1403
- currency: z.string().nullable(),
1480
+ currency: z.string(),
1404
1481
  hourly_rate_src_type: z.string().nullable(),
1405
1482
  timekeeping_pay_period_id: z.string(),
1406
1483
  start_time: z.iso.datetime(),
@@ -1409,17 +1486,8 @@ export const zTimeEntryResponseObject = z.object({
1409
1486
  updated_at: z.iso.datetime(),
1410
1487
  feature_ids: z.array(z.string()),
1411
1488
  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()
1489
+ name: z.string()
1490
+ }))
1423
1491
  });
1424
1492
  /**
1425
1493
  * A record of a single approval or decline action taken against a time entry.
@@ -1448,27 +1516,38 @@ export const zManagerTimeEntryApprovalParameters = z.object({
1448
1516
  approver_user_id: z.string()
1449
1517
  });
1450
1518
  /**
1451
- * Request body for creating or updating a time entry; on create, timekeeping_time_card_id, start_time, and end_time are required.
1519
+ * The time-entry body fields shared by the create and update bodies; each of those declares its own requiredness.
1452
1520
  */
1453
1521
  export const zTimeEntryParameters = z.object({
1454
- timekeeping_time_card_id: z.string(),
1455
- start_time: z.iso.datetime(),
1456
- end_time: z.iso.datetime(),
1522
+ timekeeping_time_card_id: z.string().optional(),
1523
+ start_time: z.iso.datetime().optional(),
1524
+ end_time: z.iso.datetime().optional(),
1457
1525
  job_id: z.string().nullish(),
1458
1526
  timekeeping_timecode_id: z.string().nullish(),
1459
1527
  state: z.string().nullish(),
1460
1528
  description: z.string().nullish(),
1461
1529
  hourly_rate_cents: z.string().nullish(),
1462
- feature_ids: z.array(z.string()).nullish(),
1463
- feature_allocation_acknowledged: z.boolean().nullish()
1530
+ feature_ids: z.array(z.string()).nullish()
1464
1531
  });
1532
+ /**
1533
+ * Request body for creating a time entry — the time_entry_parameters fields, of which timekeeping_time_card_id, start_time, and end_time are required, plus the explicit "no feature" acknowledgement.
1534
+ */
1535
+ export const zTimeEntryCreateParameters = zTimeEntryParameters.and(z.object({
1536
+ feature_allocation_acknowledged: z.boolean().nullish()
1537
+ }));
1538
+ /**
1539
+ * Request body for updating a time entry — the time_entry_parameters fields, every one optional, plus the acknowledgement that clears an apprenticeship allocation conflict.
1540
+ */
1541
+ export const zTimeEntryUpdateParameters = zTimeEntryParameters.and(z.object({
1542
+ confirm_allocation_conflict: z.boolean().nullish()
1543
+ }));
1465
1544
  /**
1466
1545
  * A single form submission — a user's completed SurveyJS form with the resolved answers (the fuller show representation). Read-only; submissions are created in the app.
1467
1546
  */
1468
1547
  export const zFormSubmissionResponseObject = z.object({
1469
1548
  user: z.object({
1470
- id: z.string().optional(),
1471
- name: z.string().optional()
1549
+ id: z.string(),
1550
+ name: z.string()
1472
1551
  }),
1473
1552
  title: z.string().nullable(),
1474
1553
  json: z.record(z.string(), z.unknown()),
@@ -1485,7 +1564,7 @@ export const zFormSubmissionResponseObject = z.object({
1485
1564
  export const zUserCompanyScheduledChangesParameters = z.object({
1486
1565
  effective_date: z.string(),
1487
1566
  hourly_rate: z.string().nullish(),
1488
- compensation_type: z.string().optional(),
1567
+ compensation_type: z.enum(['hourly', 'salary']).optional(),
1489
1568
  overtime_eligible: z.boolean().optional(),
1490
1569
  training_annual_amount: z.string().nullish(),
1491
1570
  employer_combined_health_amount: z.string().nullish(),
@@ -1722,8 +1801,8 @@ export const zCustomFieldConfigParameters = z.object({
1722
1801
  * A user's membership in a group.
1723
1802
  */
1724
1803
  export const zUserGroupResponse = z.object({
1725
- id: z.string().optional(),
1726
- user_id: z.string().optional()
1804
+ id: z.string(),
1805
+ user_id: z.string()
1727
1806
  });
1728
1807
  /**
1729
1808
  * Request body for adding users to a group. The group is taken from the URL path.
@@ -1750,8 +1829,8 @@ export const zJobParameters = z.object({
1750
1829
  template_id: z.string().nullish(),
1751
1830
  name: z.string().nullish(),
1752
1831
  description: z.string().optional(),
1832
+ requested_by_company_id: z.string(),
1753
1833
  created_by_user_id: z.string(),
1754
- manager_user_id: z.string().nullish(),
1755
1834
  manager_user_ids: z.array(z.string()).nullish(),
1756
1835
  purchase_order_number: z.string().nullish(),
1757
1836
  project_id: z.string().nullish(),
@@ -1801,6 +1880,10 @@ export const zJobParameters = z.object({
1801
1880
  verified: z.boolean().nullish(),
1802
1881
  label: z.string().nullish()
1803
1882
  }).nullish(),
1883
+ custom_fields_attributes: z.array(z.object({
1884
+ custom_field_config_id: z.string(),
1885
+ value: z.string().nullish()
1886
+ })).nullish(),
1804
1887
  pwa_details: z.object({
1805
1888
  contractor_type: z.string().nullish(),
1806
1889
  pay_full_cash_fringe_by_default: z.boolean().nullish(),
@@ -1834,27 +1917,27 @@ export const zJobUpdateParameters = zJobParameters.and(z.object({
1834
1917
  * One version of a worker's compensation at your company, effective from its start date until the next version begins.
1835
1918
  */
1836
1919
  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()
1920
+ id: z.string(),
1921
+ start_date: z.string(),
1922
+ hourly_rate: z.string().nullable(),
1923
+ compensation_type: z.string(),
1924
+ overtime_eligible: z.boolean(),
1925
+ training_annual_amount: z.string().nullable(),
1926
+ employer_combined_health_amount: z.string().nullable(),
1927
+ employer_combined_savings: z.string().nullable(),
1928
+ worked_annual_minutes: z.int().nullable(),
1929
+ pto_annual_minutes: z.int().nullable(),
1930
+ holiday_annual_minutes: z.int().nullable(),
1931
+ training_annual_minutes: z.int().nullable(),
1932
+ companies_department_id: z.string().nullable()
1850
1933
  });
1851
1934
  /**
1852
1935
  * A worker's scheduled compensation timeline at your company — the version currently in effect plus any future-dated versions.
1853
1936
  */
1854
1937
  export const zUserCompanyScheduledChangesResponse = z.object({
1855
- user_id: z.string().optional(),
1856
- current_version: zUserCompanyScheduledChange.optional(),
1857
- scheduled_changes: z.array(zUserCompanyScheduledChange).optional()
1938
+ user_id: z.string(),
1939
+ current_version: zUserCompanyScheduledChange,
1940
+ scheduled_changes: z.array(zUserCompanyScheduledChange)
1858
1941
  });
1859
1942
  /**
1860
1943
  * 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 +1977,14 @@ export const zTimeCardResponseObject = z.object({
1894
1977
  rest_and_recovery_minutes_worked: z.int(),
1895
1978
  incentive_pay_eligible_minutes_worked: z.int(),
1896
1979
  overtime_minutes_worked: z.object({
1897
- 1: z.number().optional(),
1898
- 1.5: z.number().optional(),
1899
- 2: z.number().optional()
1980
+ 1: z.number(),
1981
+ 1.5: z.number(),
1982
+ 2: z.number()
1900
1983
  }),
1901
1984
  incentive_pay_overtime_minutes_worked: z.object({
1902
- 1: z.number().optional(),
1903
- 1.5: z.number().optional(),
1904
- 2: z.number().optional()
1985
+ 1: z.number(),
1986
+ 1.5: z.number(),
1987
+ 2: z.number()
1905
1988
  }),
1906
1989
  pay_cents: z.string(),
1907
1990
  base_wage_pay_cents: z.string(),
@@ -1930,14 +2013,14 @@ export const zJobTimeCardDayResponseObject = z.object({
1930
2013
  rest_and_recovery_minutes_worked: z.int(),
1931
2014
  incentive_pay_eligible_minutes_worked: z.int(),
1932
2015
  overtime_minutes_worked: z.object({
1933
- 1: z.number().optional(),
1934
- 1.5: z.number().optional(),
1935
- 2: z.number().optional()
2016
+ 1: z.number(),
2017
+ 1.5: z.number(),
2018
+ 2: z.number()
1936
2019
  }),
1937
2020
  incentive_pay_overtime_minutes_worked: z.object({
1938
- 1: z.number().optional(),
1939
- 1.5: z.number().optional(),
1940
- 2: z.number().optional()
2021
+ 1: z.number(),
2022
+ 1.5: z.number(),
2023
+ 2: z.number()
1941
2024
  }),
1942
2025
  pay_cents: z.string(),
1943
2026
  base_wage_pay_cents: z.string(),
@@ -1965,24 +2048,24 @@ export const zJobTimeCardDayResponseObject = z.object({
1965
2048
  consecutive_days_worked: z.int(),
1966
2049
  weekly_consecutive_days_worked: z.int(),
1967
2050
  cumulative_overtime_minutes_worked: z.object({
1968
- 1: z.number().optional(),
1969
- 1.5: z.number().optional(),
1970
- 2: z.number().optional()
2051
+ 1: z.number(),
2052
+ 1.5: z.number(),
2053
+ 2: z.number()
1971
2054
  }),
1972
2055
  weekly_cumulative_overtime_minutes_worked: z.object({
1973
- 1: z.number().optional(),
1974
- 1.5: z.number().optional(),
1975
- 2: z.number().optional()
2056
+ 1: z.number(),
2057
+ 1.5: z.number(),
2058
+ 2: z.number()
1976
2059
  }),
1977
2060
  cumulative_incentive_pay_overtime_minutes_worked: z.object({
1978
- 1: z.number().optional(),
1979
- 1.5: z.number().optional(),
1980
- 2: z.number().optional()
2061
+ 1: z.number(),
2062
+ 1.5: z.number(),
2063
+ 2: z.number()
1981
2064
  }),
1982
2065
  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()
2066
+ 1: z.number(),
2067
+ 1.5: z.number(),
2068
+ 2: z.number()
1986
2069
  }),
1987
2070
  cumulative_pay_cents: z.string(),
1988
2071
  weekly_cumulative_pay_cents: z.string(),
@@ -2097,7 +2180,7 @@ export const zPayrollFringeBenefitPlanResponseObject = z.object({
2097
2180
  'employer_combined_holiday_pto',
2098
2181
  'employer_training',
2099
2182
  'employer_other_contributions'
2100
- ]),
2183
+ ]).nullable(),
2101
2184
  il_jointly_managed: z.boolean(),
2102
2185
  il_fund_name: z.string().nullable(),
2103
2186
  il_fund_address1: z.string().nullable(),
@@ -2158,7 +2241,38 @@ export const zPayrollExternalMapResponseObject = z.object({
2158
2241
  'any',
2159
2242
  'employee',
2160
2243
  'employer'
2244
+ ]).nullable(),
2245
+ annual_periods: z.int(),
2246
+ created_by_user_id: z.string().nullable(),
2247
+ global: z.boolean(),
2248
+ valid_from: z.iso.datetime().nullable(),
2249
+ valid_to: z.iso.datetime().nullable(),
2250
+ transaction_from: z.iso.datetime(),
2251
+ transaction_to: z.iso.datetime().nullable(),
2252
+ created_at: z.iso.datetime(),
2253
+ updated_at: z.iso.datetime()
2254
+ });
2255
+ export const zPayrollExternalMapHistoryCorrectionObject = z.object({
2256
+ payrolls_external_map_id: z.string(),
2257
+ name: z.string(),
2258
+ payrolls_compensation_element_id: z.string(),
2259
+ compensation_element_name: z.string(),
2260
+ compensation_element_category: z.enum([
2261
+ 'tax',
2262
+ 'health',
2263
+ 'retirement',
2264
+ 'insurance',
2265
+ 'earning',
2266
+ 'garnishment',
2267
+ 'other'
2161
2268
  ]),
2269
+ timekeeping_pay_period_config_id: z.string().nullable(),
2270
+ payrolls_fringe_benefit_plan_id: z.string().nullable(),
2271
+ contributor: z.enum([
2272
+ 'any',
2273
+ 'employee',
2274
+ 'employer'
2275
+ ]).nullable(),
2162
2276
  annual_periods: z.int(),
2163
2277
  created_by_user_id: z.string().nullable(),
2164
2278
  global: z.boolean(),
@@ -2170,7 +2284,7 @@ export const zPayrollExternalMapResponseObject = z.object({
2170
2284
  updated_at: z.iso.datetime()
2171
2285
  });
2172
2286
  export const zPayrollExternalMapHistoryVersionObject = z.object({
2173
- id: z.string(),
2287
+ payrolls_external_map_id: z.string(),
2174
2288
  name: z.string(),
2175
2289
  payrolls_compensation_element_id: z.string(),
2176
2290
  compensation_element_name: z.string(),
@@ -2189,7 +2303,7 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
2189
2303
  'any',
2190
2304
  'employee',
2191
2305
  'employer'
2192
- ]),
2306
+ ]).nullable(),
2193
2307
  annual_periods: z.int(),
2194
2308
  created_by_user_id: z.string().nullable(),
2195
2309
  global: z.boolean(),
@@ -2204,7 +2318,7 @@ export const zPayrollExternalMapHistoryVersionObject = z.object({
2204
2318
  'current',
2205
2319
  'historical'
2206
2320
  ]),
2207
- corrections: z.array(zPayrollExternalMapResponseObject)
2321
+ corrections: z.array(zPayrollExternalMapHistoryCorrectionObject)
2208
2322
  });
2209
2323
  /**
2210
2324
  * 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.
@@ -2491,7 +2605,7 @@ export const zFeatureResponseObject = z.object({
2491
2605
  address_id: z.string().nullable(),
2492
2606
  created_by_user_id: z.string().nullable(),
2493
2607
  updated_by_user_id: z.string().nullable(),
2494
- geometry: z.record(z.string(), z.unknown()).nullable(),
2608
+ geometry: z.record(z.string(), z.unknown()),
2495
2609
  active_time_begin: z.iso.datetime().nullable(),
2496
2610
  active_time_end: z.iso.datetime().nullable(),
2497
2611
  created_at: z.iso.datetime(),
@@ -2536,7 +2650,7 @@ export const zComplianceCheckResponseObject = z.object({
2536
2650
  timekeeping_time_card_id: z.string().nullable(),
2537
2651
  timekeeping_pay_period_id: z.string().nullable(),
2538
2652
  user_id: z.string().nullable(),
2539
- user_company_uid: z.string().nullable(),
2653
+ employment_id: z.string().nullable(),
2540
2654
  title: z.string(),
2541
2655
  description: z.string(),
2542
2656
  category: z.enum([
@@ -2564,7 +2678,7 @@ export const zComplianceCheckResponseObject = z.object({
2564
2678
  'high',
2565
2679
  'medium',
2566
2680
  'low'
2567
- ]),
2681
+ ]).nullable(),
2568
2682
  checked_at: z.iso.datetime().nullable(),
2569
2683
  passed_at: z.iso.datetime().nullable(),
2570
2684
  time_due: z.iso.datetime().nullable(),
@@ -2689,10 +2803,10 @@ export const zPaystubLineItemResponseObject = z.object({
2689
2803
  timekeeping_pay_period_id: z.string().nullable(),
2690
2804
  user_id: z.string().nullable(),
2691
2805
  external_map: z.object({
2692
- name: z.string().optional(),
2806
+ name: z.string(),
2693
2807
  compensation_element: z.object({
2694
- name: z.string().optional(),
2695
- description: z.string().nullish(),
2808
+ name: z.string(),
2809
+ description: z.string().nullable(),
2696
2810
  category: z.enum([
2697
2811
  'tax',
2698
2812
  'health',
@@ -2701,8 +2815,8 @@ export const zPaystubLineItemResponseObject = z.object({
2701
2815
  'earning',
2702
2816
  'garnishment',
2703
2817
  'other'
2704
- ]).optional()
2705
- }).optional()
2818
+ ])
2819
+ })
2706
2820
  }),
2707
2821
  amount_cents: z.string(),
2708
2822
  contributor: z.enum(['employee', 'employer']),
@@ -2736,7 +2850,7 @@ export const zPositionParameters = z.object({
2736
2850
  wage_adder_rate_cents: z.number().nullish(),
2737
2851
  job_wage_determinations_positions_attributes: z.array(z.object({
2738
2852
  id: z.int().nullish(),
2739
- job_wage_determination_uid: z.string().nullish()
2853
+ job_wage_determination_id: z.string().nullish()
2740
2854
  })).optional(),
2741
2855
  pwa_details_attributes: z.object({
2742
2856
  skill_level: z.string().nullish()
@@ -2846,8 +2960,8 @@ export const zProductionCompletionResponseObject = z.discriminatedUnion('complet
2846
2960
  * 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.
2847
2961
  */
2848
2962
  export const zFormAssignmentTaskResponseObject = z.array(z.object({
2849
- id: z.string().optional(),
2850
- form_definition_id: z.string().optional(),
2963
+ id: z.string(),
2964
+ form_definition_id: z.string(),
2851
2965
  frequency: z.enum([
2852
2966
  'DAILY',
2853
2967
  'WORKDAILY',
@@ -2856,17 +2970,17 @@ export const zFormAssignmentTaskResponseObject = z.array(z.object({
2856
2970
  'BIWEEKLY',
2857
2971
  'MONTHLY',
2858
2972
  'QUARTERLY'
2859
- ]).optional(),
2860
- recurrence_end_time: z.iso.datetime().nullish(),
2861
- time_due: z.iso.datetime().optional(),
2862
- tz_name: z.string().optional(),
2863
- name: z.string().optional(),
2864
- description: z.string().nullish(),
2865
- task_assignee_user_ids: z.array(z.string()).optional(),
2973
+ ]).nullable(),
2974
+ recurrence_end_time: z.iso.datetime().nullable(),
2975
+ time_due: z.iso.datetime(),
2976
+ tz_name: z.string(),
2977
+ name: z.string(),
2978
+ description: z.string().nullable(),
2979
+ task_assignee_user_ids: z.array(z.string()),
2866
2980
  reminders: z.array(z.object({
2867
- offset: z.string().optional(),
2868
- remind_at: z.iso.datetime().optional()
2869
- })).optional()
2981
+ offset: z.string(),
2982
+ remind_at: z.iso.datetime()
2983
+ }))
2870
2984
  }));
2871
2985
  /**
2872
2986
  * 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.
@@ -2875,7 +2989,7 @@ export const zCertificationParameters = z.object({
2875
2989
  company_id: z.string(),
2876
2990
  name: z.string(),
2877
2991
  description: z.string().nullish(),
2878
- verified: z.boolean().nullish(),
2992
+ verified: z.boolean().optional(),
2879
2993
  duration: z.string().nullish()
2880
2994
  });
2881
2995
  /**
@@ -2925,7 +3039,7 @@ export const zUserCertificationParameters = z.object({
2925
3039
  name: z.string().max(255).regex(/^[\w\s.-]*\.[A-Za-z0-9]+$/),
2926
3040
  content: z.string()
2927
3041
  }).nullish(),
2928
- verified: z.boolean().nullish(),
3042
+ verified: z.boolean().optional(),
2929
3043
  expiration_date: z.iso.date().nullish(),
2930
3044
  credential_id: z.string().nullish(),
2931
3045
  approved_by_user_id: z.string().nullish(),
@@ -2956,9 +3070,9 @@ export const zUserCertificationResponseObject = z.object({
2956
3070
  * The function the worker performs in a position (e.g. "Electrician", "Foreman"); null when no function is assigned.
2957
3071
  */
2958
3072
  export const zPositionFunction = z.object({
2959
- id: z.string().optional(),
2960
- value: z.string().optional(),
2961
- description: z.string().optional()
3073
+ id: z.string(),
3074
+ value: z.string(),
3075
+ description: z.string()
2962
3076
  }).nullable();
2963
3077
  /**
2964
3078
  * 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.
@@ -3001,47 +3115,35 @@ export const zJobResponseObject = z.object({
3001
3115
  created_by_company_id: z.string(),
3002
3116
  requested_by_company_id: z.string().nullable(),
3003
3117
  project_id: z.string().nullable(),
3004
- created_by_company: z.object({
3005
- id: z.string().optional(),
3006
- name: z.string().optional()
3007
- }),
3008
- requested_by_company: z.object({
3009
- id: z.string().optional(),
3010
- name: z.string().optional()
3011
- }),
3012
- manager_user: z.object({
3013
- id: z.string().optional(),
3014
- name: z.string().optional()
3015
- }).nullable(),
3016
3118
  manager_users: z.array(z.object({
3017
3119
  id: z.string(),
3018
3120
  name: z.string()
3019
3121
  })),
3020
3122
  created_by_user: z.object({
3021
- id: z.string().optional(),
3022
- name: z.string().optional()
3123
+ id: z.string(),
3124
+ name: z.string()
3023
3125
  }),
3024
3126
  sites: z.array(z.object({
3025
- name: z.string().optional(),
3127
+ name: z.string(),
3026
3128
  features: z.array(z.object({
3027
- name: z.string().optional()
3028
- })).nullish()
3029
- })).nullable(),
3129
+ name: z.string()
3130
+ }))
3131
+ })),
3030
3132
  job_address: z.object({
3031
- label: z.string().optional()
3133
+ label: z.string()
3032
3134
  }).nullable(),
3033
3135
  positions: z.array(z.object({
3034
- position_function: zPositionFunction.optional(),
3035
- fulfilled_by_user_id: z.string().nullish()
3036
- })).nullable(),
3136
+ position_function: zPositionFunction,
3137
+ fulfilled_by_user_id: z.string().nullable()
3138
+ })),
3037
3139
  project: z.object({
3038
- name: z.string().optional()
3140
+ name: z.string()
3039
3141
  }).nullable(),
3040
3142
  pwa_details: zPwaJobDetailsResponseObject,
3041
3143
  work_types: z.array(z.object({
3042
- value: z.string().optional()
3043
- })).nullable(),
3044
- timekeeping_timecode_ids: z.array(z.string()).nullable(),
3144
+ value: z.string()
3145
+ })),
3146
+ timekeeping_timecode_ids: z.array(z.string()),
3045
3147
  tracks_feature_allocations: z.boolean(),
3046
3148
  requires_feature_allocation: z.boolean(),
3047
3149
  max_one_feature_allocation: z.boolean()
@@ -3065,11 +3167,11 @@ export const zPositionResponseObject = z.object({
3065
3167
  pwa_wage_pay_rate_src_type: z.string().nullable(),
3066
3168
  wage_adder_rate_cents: z.string().nullable(),
3067
3169
  pwa: z.boolean(),
3068
- federal_wage_determination_uids: z.array(z.string()),
3069
- regional_wage_determination_uids: z.array(z.string()),
3170
+ federal_wage_determination_ids: z.array(z.string()),
3171
+ regional_wage_determination_ids: z.array(z.string()),
3070
3172
  pwa_details: z.object({
3071
3173
  skill_level: z.string().nullable()
3072
- }).nullable(),
3174
+ }),
3073
3175
  start_time: z.iso.datetime().nullable(),
3074
3176
  end_time: z.iso.datetime().nullable(),
3075
3177
  created_at: z.iso.datetime(),
@@ -3093,21 +3195,21 @@ export const zUserRoleRequest = z.object({
3093
3195
  * 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.
3094
3196
  */
3095
3197
  export const zUserRoleResponse = z.object({
3096
- id: z.string().optional(),
3097
- user_id: z.string().optional(),
3098
- company_id: z.string().optional(),
3198
+ id: z.string(),
3199
+ user_id: z.string(),
3200
+ company_id: z.string(),
3099
3201
  role: z.enum([
3100
3202
  'TECHNICIAN',
3101
3203
  'FIELD_LEAD',
3102
3204
  'MANAGER',
3103
3205
  'SAFETY_MANAGER',
3104
3206
  'ADMIN'
3105
- ]).optional()
3207
+ ])
3106
3208
  });
3107
3209
  /**
3108
3210
  * Employment classification of a worker at a company: EMPLOYEE (W-2) or CONTRACTOR (1099). Null when unset.
3109
3211
  */
3110
- export const zUserCompanyType = z.enum(['EMPLOYEE', 'CONTRACTOR']);
3212
+ export const zUserCompanyType = z.enum(['EMPLOYEE', 'CONTRACTOR']).nullable();
3111
3213
  /**
3112
3214
  * 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.
3113
3215
  */
@@ -3130,6 +3232,7 @@ export const zUserResponseObject = z.object({
3130
3232
  updated_at: z.iso.datetime(),
3131
3233
  winda_id: z.string().nullable(),
3132
3234
  linkedin_url: z.string().nullable(),
3235
+ employment_id: z.string(),
3133
3236
  type: zUserCompanyType,
3134
3237
  title: z.string().nullable(),
3135
3238
  overtime_eligible: z.boolean(),
@@ -3153,22 +3256,22 @@ export const zUserResponseObject = z.object({
3153
3256
  manager_user_id: z.string().nullable(),
3154
3257
  roles: z.array(z.string()),
3155
3258
  company_user_pwa_info: z.object({
3156
- id: z.string().optional(),
3157
- address1: z.string().nullish(),
3158
- address2: z.string().nullish(),
3159
- city: z.string().nullish(),
3160
- state: z.string().nullish(),
3161
- zip: z.string().nullish(),
3162
- race: z.array(z.string()).nullish(),
3163
- sex: z.string().nullish(),
3164
- local_business_license: z.string().nullish(),
3165
- drivers_license_state: z.string().nullish(),
3166
- drivers_license_number: z.string().nullish(),
3167
- veteran_status: z.string().nullish(),
3168
- hispanic_origin: z.string().nullish(),
3169
- ssn: z.string().nullish(),
3170
- disabled: z.boolean().nullish(),
3171
- ca_dir_withholding_exemptions: z.int().nullish(),
3259
+ id: z.string(),
3260
+ address1: z.string().nullable(),
3261
+ address2: z.string().nullable(),
3262
+ city: z.string().nullable(),
3263
+ state: z.string().nullable(),
3264
+ zip: z.string().nullable(),
3265
+ race: z.array(z.string()).nullable(),
3266
+ sex: z.string().nullable(),
3267
+ local_business_license: z.string().nullable(),
3268
+ drivers_license_state: z.string().nullable(),
3269
+ drivers_license_number: z.string().nullable(),
3270
+ veteran_status: z.string().nullable(),
3271
+ hispanic_origin: z.string().nullable(),
3272
+ ssn: z.string().nullable(),
3273
+ disabled: z.boolean().nullable(),
3274
+ ca_dir_withholding_exemptions: z.int().nullable(),
3172
3275
  il_dol_race: z.enum([
3173
3276
  'white',
3174
3277
  'black',
@@ -3186,20 +3289,20 @@ export const zUserResponseObject = z.object({
3186
3289
  'other_asian',
3187
3290
  'other_pacific_islander',
3188
3291
  'other'
3189
- ]).optional(),
3292
+ ]).nullable(),
3190
3293
  il_shines_employment_type: z.enum([
3191
3294
  'part_time',
3192
3295
  'full_time',
3193
3296
  'seasonal_temporary',
3194
3297
  'independent_contract'
3195
- ]).optional(),
3298
+ ]).nullable(),
3196
3299
  il_shines_eep_qualifiers: z.array(z.enum([
3197
3300
  'eep_program_completed',
3198
3301
  'foster_care',
3199
3302
  'formerly_incarcerated',
3200
3303
  'equity_investment_eligible_community',
3201
3304
  'self_registered_or_unknown'
3202
- ])).nullish(),
3305
+ ])).nullable(),
3203
3306
  il_shines_other_programs: z.array(z.enum([
3204
3307
  'solar_training_pipeline_program',
3205
3308
  'craft_apprenticeship_program',
@@ -3208,8 +3311,8 @@ export const zUserResponseObject = z.object({
3208
3311
  'illinois_climate_works_prep_apprenticeship_program',
3209
3312
  'returning_residents_clean_jobs_training_program',
3210
3313
  'other'
3211
- ])).nullish(),
3212
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).optional(),
3314
+ ])).nullable(),
3315
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullable(),
3213
3316
  or_boli_race: z.array(z.enum([
3214
3317
  'american_indian_or_alaska_native',
3215
3318
  'asian',
@@ -3218,7 +3321,7 @@ export const zUserResponseObject = z.object({
3218
3321
  'native_hawaiian_or_pacific_islander',
3219
3322
  'white',
3220
3323
  'portuguese_or_brazilian'
3221
- ])).nullish()
3324
+ ])).nullable()
3222
3325
  }).nullable()
3223
3326
  });
3224
3327
  /**
@@ -3294,13 +3397,13 @@ export const zUserParameters = z.object({
3294
3397
  'other_asian',
3295
3398
  'other_pacific_islander',
3296
3399
  'other'
3297
- ]).optional(),
3400
+ ]).nullish(),
3298
3401
  il_shines_employment_type: z.enum([
3299
3402
  'part_time',
3300
3403
  'full_time',
3301
3404
  'seasonal_temporary',
3302
3405
  'independent_contract'
3303
- ]).optional(),
3406
+ ]).nullish(),
3304
3407
  il_shines_eep_qualifiers: z.array(z.enum([
3305
3408
  'eep_program_completed',
3306
3409
  'foster_care',
@@ -3317,7 +3420,7 @@ export const zUserParameters = z.object({
3317
3420
  'returning_residents_clean_jobs_training_program',
3318
3421
  'other'
3319
3422
  ])).nullish(),
3320
- or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).optional(),
3423
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullish(),
3321
3424
  or_boli_race: z.array(z.enum([
3322
3425
  'american_indian_or_alaska_native',
3323
3426
  'asian',
@@ -3348,7 +3451,7 @@ export const zUserCompanyCreateParameters = z.object({
3348
3451
  type: zUserCompanyType.optional(),
3349
3452
  title: z.string().nullish(),
3350
3453
  manager_user_id: z.string().nullish(),
3351
- compensation_type: z.string().nullish(),
3454
+ compensation_type: z.enum(['hourly', 'salary']).optional(),
3352
3455
  enrolled_in_t_and_a: z.boolean().optional(),
3353
3456
  payroll_id: z.string().nullish(),
3354
3457
  hourly_rate: z.string().nullish(),
@@ -3365,14 +3468,14 @@ export const zUserCompanyCreateParameters = z.object({
3365
3468
  * Keyset pagination cursors for the collection.
3366
3469
  */
3367
3470
  export const zPage = z.object({
3368
- next_cursor: z.string().nullish(),
3369
- current_cursor: z.string().nullish()
3471
+ next_cursor: z.string().nullable(),
3472
+ current_cursor: z.string().nullable()
3370
3473
  });
3371
3474
  /**
3372
3475
  * Pagination metadata for a paged collection, holding the keyset cursors under `page`.
3373
3476
  */
3374
3477
  export const zMeta = z.object({
3375
- page: zPage.optional()
3478
+ page: zPage
3376
3479
  });
3377
3480
  /**
3378
3481
  * Pagination metadata for a change-feed page, with the feed's safe polling watermark.
@@ -3385,17 +3488,17 @@ export const zDeltaMeta = z.object({
3385
3488
  * Pagination links for navigating a paged collection.
3386
3489
  */
3387
3490
  export const zLinks = z.object({
3388
- self: z.string().optional(),
3389
- first: z.string().nullish(),
3390
- next: z.string().nullish()
3491
+ self: z.string(),
3492
+ first: z.string().nullable(),
3493
+ next: z.string().nullable()
3391
3494
  });
3392
3495
  /**
3393
3496
  * A page of time entries, with pagination metadata and navigation links.
3394
3497
  */
3395
3498
  export const zTimeEntryIndexObject = z.object({
3396
- meta: zMeta.optional(),
3397
- links: zLinks.optional(),
3398
- data: z.array(zTimeEntryResponseObject).optional()
3499
+ meta: zMeta,
3500
+ links: zLinks,
3501
+ data: z.array(zTimeEntryResponseObject)
3399
3502
  });
3400
3503
  /**
3401
3504
  * 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.
@@ -3404,35 +3507,35 @@ export const zFormDefinitionResponseObject = z.object({
3404
3507
  meta: zMeta,
3405
3508
  links: zLinks,
3406
3509
  data: z.array(z.object({
3407
- id: z.string().optional(),
3408
- name: z.string().optional(),
3409
- description: z.string().optional(),
3410
- company_id: z.string().optional(),
3411
- modified_by_user_id: z.string().nullish(),
3412
- tags: z.array(z.string()).nullish(),
3413
- title_keys: z.array(z.string()).nullish(),
3414
- editable: z.boolean().optional(),
3415
- always_visible: z.boolean().optional(),
3416
- sensitive_form: z.boolean().optional(),
3417
- allow_carry_forward: z.boolean().optional(),
3418
- current_revision: z.int().optional(),
3419
- json: z.record(z.string(), z.unknown()).optional(),
3420
- created_at: z.iso.datetime().optional()
3510
+ id: z.string(),
3511
+ name: z.string(),
3512
+ description: z.string(),
3513
+ company_id: z.string(),
3514
+ modified_by_user_id: z.string().nullable(),
3515
+ tags: z.array(z.string()).nullable(),
3516
+ title_keys: z.array(z.string()).nullable(),
3517
+ editable: z.boolean(),
3518
+ always_visible: z.boolean(),
3519
+ sensitive_form: z.boolean(),
3520
+ allow_carry_forward: z.boolean(),
3521
+ current_revision: z.int().nullable(),
3522
+ json: z.record(z.string(), z.unknown()),
3523
+ created_at: z.iso.datetime()
3421
3524
  }))
3422
3525
  });
3423
3526
  /**
3424
3527
  * 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.
3425
3528
  */
3426
3529
  export const zFormSubmissionIndexObject = z.object({
3427
- meta: zMeta.optional(),
3428
- links: zLinks.optional(),
3530
+ meta: zMeta,
3531
+ links: zLinks,
3429
3532
  data: z.array(z.object({
3430
- id: z.string().optional(),
3431
- user_id: z.string().optional(),
3432
- updated_by_user_id: z.string().optional(),
3433
- created_at: z.iso.datetime().optional(),
3434
- updated_at: z.iso.datetime().optional()
3435
- })).optional()
3533
+ id: z.string(),
3534
+ user_id: z.string(),
3535
+ updated_by_user_id: z.string(),
3536
+ created_at: z.iso.datetime(),
3537
+ updated_at: z.iso.datetime()
3538
+ }))
3436
3539
  });
3437
3540
  /**
3438
3541
  * 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.
@@ -3450,17 +3553,17 @@ export const zFormSubmissionDeltasResponse = z.object({
3450
3553
  * 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.
3451
3554
  */
3452
3555
  export const zTimeEntryDeltasResponse = z.object({
3453
- meta: zDeltaMeta.optional(),
3454
- links: zLinks.optional(),
3556
+ meta: zDeltaMeta,
3557
+ links: zLinks,
3455
3558
  data: z.array(z.object({
3456
3559
  event: z.enum([
3457
3560
  'create',
3458
3561
  'update',
3459
3562
  'destroy'
3460
- ]).optional(),
3461
- id: z.string().optional(),
3462
- timestamp: z.iso.datetime().optional()
3463
- })).optional()
3563
+ ]),
3564
+ id: z.string(),
3565
+ timestamp: z.iso.datetime()
3566
+ }))
3464
3567
  });
3465
3568
  /**
3466
3569
  * 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.
@@ -3469,15 +3572,15 @@ export const zPayPeriodsResponseObject = z.object({
3469
3572
  meta: zMeta,
3470
3573
  links: zLinks,
3471
3574
  data: z.array(z.object({
3472
- id: z.string().optional(),
3473
- timekeeping_pay_period_config_id: z.string().optional(),
3474
- pay_date: z.iso.date().optional(),
3475
- start_time: z.iso.datetime().optional(),
3476
- end_time: z.iso.datetime().optional(),
3477
- pay_run_deadline: z.iso.datetime().optional(),
3478
- approvals_deadline: z.iso.datetime().optional(),
3479
- created_at: z.iso.datetime().optional(),
3480
- updated_at: z.iso.datetime().optional()
3575
+ id: z.string(),
3576
+ timekeeping_pay_period_config_id: z.string(),
3577
+ pay_date: z.iso.date(),
3578
+ start_time: z.iso.datetime(),
3579
+ end_time: z.iso.datetime(),
3580
+ pay_run_deadline: z.iso.datetime(),
3581
+ approvals_deadline: z.iso.datetime(),
3582
+ created_at: z.iso.datetime(),
3583
+ updated_at: z.iso.datetime()
3481
3584
  }))
3482
3585
  });
3483
3586
  /**
@@ -3540,9 +3643,9 @@ export const zCertificationsResponseObject = z.object({
3540
3643
  * A page of certifications held by your company's workers.
3541
3644
  */
3542
3645
  export const zUserCertificationsResponseObj = z.object({
3543
- meta: zMeta.optional(),
3544
- links: zLinks.optional(),
3545
- data: z.array(zUserCertificationResponseObject).optional()
3646
+ meta: zMeta,
3647
+ links: zLinks,
3648
+ data: z.array(zUserCertificationResponseObject)
3546
3649
  });
3547
3650
  /**
3548
3651
  * 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.
@@ -3556,7 +3659,6 @@ export const zDateTimeFilter = z.object({
3556
3659
  */
3557
3660
  export const zWageDeterminationResponseObject = z.object({
3558
3661
  id: z.string(),
3559
- uid: z.string(),
3560
3662
  general_decision_number: z.string(),
3561
3663
  modification_number: z.int(),
3562
3664
  superseded_by_wage_determination_id: z.string().nullable(),
@@ -3604,7 +3706,6 @@ export const zLaborRatesResponseObject = z.object({
3604
3706
  */
3605
3707
  export const zFederalJobWageDeterminationResponseObject = z.object({
3606
3708
  id: z.string(),
3607
- uid: z.string(),
3608
3709
  job_id: z.string(),
3609
3710
  pwa_trade_id: z.string(),
3610
3711
  type: z.enum(['Pwa::JobWageDeterminations::Federal']),
@@ -3617,7 +3718,28 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
3617
3718
  'heavy',
3618
3719
  'highway',
3619
3720
  'residential'
3620
- ]),
3721
+ ]).nullable(),
3722
+ general_wage_determination: z.string().nullable(),
3723
+ valid_from: z.iso.datetime().nullable(),
3724
+ valid_to: z.iso.datetime().nullable(),
3725
+ created_at: z.iso.datetime(),
3726
+ updated_at: z.iso.datetime()
3727
+ });
3728
+ export const zFederalJobWageDeterminationHistoryCorrectionObject = z.object({
3729
+ job_wage_determination_id: z.string(),
3730
+ job_id: z.string(),
3731
+ pwa_trade_id: z.string(),
3732
+ type: z.enum(['Pwa::JobWageDeterminations::Federal']),
3733
+ labor_classification: z.string(),
3734
+ hourly_rate_cents: z.string(),
3735
+ fringe_rate_cents: z.string(),
3736
+ class_code: z.string().nullable(),
3737
+ construction_category: z.enum([
3738
+ 'building',
3739
+ 'heavy',
3740
+ 'highway',
3741
+ 'residential'
3742
+ ]).nullable(),
3621
3743
  general_wage_determination: z.string().nullable(),
3622
3744
  valid_from: z.iso.datetime().nullable(),
3623
3745
  valid_to: z.iso.datetime().nullable(),
@@ -3626,8 +3748,37 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
3626
3748
  });
3627
3749
  /**
3628
3750
  * State-specific rate fields for a Regional determination, as decimal-string money in cents
3629
- * (e.g. "538.0"). Which keys appear is set by the job's region, not the request, so this object is
3630
- * always a subset of the keys belownever a fixed shape:
3751
+ * (e.g. "538.0"). These nine properties are the whole write vocabulary, but which of them a
3752
+ * request may send is set by the job's region, not the request sending a key the job's
3753
+ * region does not allow returns a 422:
3754
+ *
3755
+ * - Categorized-fringe regions (currently IL) accept `combined_health_fringe_rate_cents`,
3756
+ * `combined_savings_fringe_rate_cents`, `combined_holiday_pto_fringe_rate_cents`,
3757
+ * `training_fringe_rate_cents`, and `other_fringe_rate_cents`.
3758
+ * - Overtime-adder regions (currently IL and NY) accept `one_five_x_adder_rate_cents`,
3759
+ * `two_x_adder_rate_cents`, `one_five_x_fringe_adder_rate_cents`, and
3760
+ * `two_x_fringe_adder_rate_cents`.
3761
+ *
3762
+ * In a categorized-fringe region the five fringe keys are required, not merely accepted —
3763
+ * omitting any of them returns a 422. Categorized-fringe values are non-null when present;
3764
+ * overtime-adder values may be null.
3765
+ *
3766
+ */
3767
+ export const zRegionalWageDeterminationFields = z.object({
3768
+ combined_health_fringe_rate_cents: z.string().optional(),
3769
+ combined_savings_fringe_rate_cents: z.string().optional(),
3770
+ combined_holiday_pto_fringe_rate_cents: z.string().optional(),
3771
+ training_fringe_rate_cents: z.string().optional(),
3772
+ other_fringe_rate_cents: z.string().optional(),
3773
+ one_five_x_adder_rate_cents: z.string().nullish(),
3774
+ two_x_adder_rate_cents: z.string().nullish(),
3775
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
3776
+ two_x_fringe_adder_rate_cents: z.string().nullish()
3777
+ });
3778
+ /**
3779
+ * State-specific rate fields recorded on a Regional determination, as decimal-string money in
3780
+ * cents (e.g. "538.0"). Which keys appear is set by the job's region, so this object is always
3781
+ * a region-determined subset of the nine keys the write side accepts — never a fixed shape:
3631
3782
  *
3632
3783
  * - Categorized-fringe regions (currently IL) carry `combined_health_fringe_rate_cents`,
3633
3784
  * `combined_savings_fringe_rate_cents`, `combined_holiday_pto_fringe_rate_cents`,
@@ -3637,18 +3788,15 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
3637
3788
  * `two_x_fringe_adder_rate_cents`.
3638
3789
  * - A region with neither returns an empty object.
3639
3790
  *
3640
- * On write the same applicability governs the request sending a key the job's region does not
3641
- * allow returns a 422. Categorized-fringe values are non-null when present; overtime-adder values
3642
- * may be null.
3791
+ * Categorized-fringe values are non-null when present; overtime-adder values may be null.
3643
3792
  *
3644
3793
  */
3645
- export const zRegionalWageDeterminationFields = z.record(z.string(), z.string().nullable());
3794
+ export const zRegionalWageDeterminationFieldsResponse = z.record(z.string(), z.string().nullable());
3646
3795
  /**
3647
3796
  * A Regional (state prevailing-wage) wage determination on a job.
3648
3797
  */
3649
3798
  export const zRegionalJobWageDeterminationResponseObject = z.object({
3650
3799
  id: z.string(),
3651
- uid: z.string(),
3652
3800
  job_id: z.string(),
3653
3801
  pwa_trade_id: z.string(),
3654
3802
  type: z.enum(['Pwa::JobWageDeterminations::Regional']),
@@ -3656,7 +3804,7 @@ export const zRegionalJobWageDeterminationResponseObject = z.object({
3656
3804
  hourly_rate_cents: z.string(),
3657
3805
  fringe_rate_cents: z.string(),
3658
3806
  general_wage_determination: z.string().nullable(),
3659
- regional_fields: zRegionalWageDeterminationFields,
3807
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
3660
3808
  valid_from: z.iso.datetime().nullable(),
3661
3809
  valid_to: z.iso.datetime().nullable(),
3662
3810
  created_at: z.iso.datetime(),
@@ -3669,9 +3817,27 @@ export const zJobWageDeterminationResponseObject = z.discriminatedUnion('type',
3669
3817
  zFederalJobWageDeterminationResponseObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
3670
3818
  zRegionalJobWageDeterminationResponseObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
3671
3819
  ]);
3820
+ export const zRegionalJobWageDeterminationHistoryCorrectionObject = z.object({
3821
+ job_wage_determination_id: z.string(),
3822
+ job_id: z.string(),
3823
+ pwa_trade_id: z.string(),
3824
+ type: z.enum(['Pwa::JobWageDeterminations::Regional']),
3825
+ labor_classification: z.string(),
3826
+ hourly_rate_cents: z.string(),
3827
+ fringe_rate_cents: z.string(),
3828
+ general_wage_determination: z.string().nullable(),
3829
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
3830
+ valid_from: z.iso.datetime().nullable(),
3831
+ valid_to: z.iso.datetime().nullable(),
3832
+ created_at: z.iso.datetime(),
3833
+ updated_at: z.iso.datetime()
3834
+ });
3835
+ export const zJobWageDeterminationHistoryCorrectionObject = z.discriminatedUnion('type', [
3836
+ zFederalJobWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
3837
+ zRegionalJobWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
3838
+ ]);
3672
3839
  export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
3673
- id: z.string(),
3674
- uid: z.string(),
3840
+ job_wage_determination_id: z.string(),
3675
3841
  job_id: z.string(),
3676
3842
  pwa_trade_id: z.string(),
3677
3843
  type: z.enum(['Pwa::JobWageDeterminations::Federal']),
@@ -3684,7 +3850,7 @@ export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
3684
3850
  'heavy',
3685
3851
  'highway',
3686
3852
  'residential'
3687
- ]),
3853
+ ]).nullable(),
3688
3854
  general_wage_determination: z.string().nullable(),
3689
3855
  valid_from: z.iso.datetime().nullable(),
3690
3856
  valid_to: z.iso.datetime().nullable(),
@@ -3695,11 +3861,10 @@ export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
3695
3861
  'current',
3696
3862
  'historical'
3697
3863
  ]),
3698
- corrections: z.array(zJobWageDeterminationResponseObject)
3864
+ corrections: z.array(zJobWageDeterminationHistoryCorrectionObject)
3699
3865
  });
3700
3866
  export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
3701
- id: z.string(),
3702
- uid: z.string(),
3867
+ job_wage_determination_id: z.string(),
3703
3868
  job_id: z.string(),
3704
3869
  pwa_trade_id: z.string(),
3705
3870
  type: z.enum(['Pwa::JobWageDeterminations::Regional']),
@@ -3707,7 +3872,7 @@ export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
3707
3872
  hourly_rate_cents: z.string(),
3708
3873
  fringe_rate_cents: z.string(),
3709
3874
  general_wage_determination: z.string().nullable(),
3710
- regional_fields: zRegionalWageDeterminationFields,
3875
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
3711
3876
  valid_from: z.iso.datetime().nullable(),
3712
3877
  valid_to: z.iso.datetime().nullable(),
3713
3878
  created_at: z.iso.datetime(),
@@ -3717,7 +3882,7 @@ export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
3717
3882
  'current',
3718
3883
  'historical'
3719
3884
  ]),
3720
- corrections: z.array(zJobWageDeterminationResponseObject)
3885
+ corrections: z.array(zJobWageDeterminationHistoryCorrectionObject)
3721
3886
  });
3722
3887
  export const zJobWageDeterminationHistoryVersionObject = z.discriminatedUnion('type', [
3723
3888
  zFederalJobWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
@@ -3738,7 +3903,7 @@ export const zFederalJobWageDeterminationParameters = z.object({
3738
3903
  'heavy',
3739
3904
  'highway',
3740
3905
  'residential'
3741
- ]).optional(),
3906
+ ]).nullish(),
3742
3907
  general_wage_determination: z.string().nullish()
3743
3908
  });
3744
3909
  /**
@@ -3827,7 +3992,17 @@ export const zRateRuleCondition = z.discriminatedUnion('type', [
3827
3992
  */
3828
3993
  export const zRateRuleResponseObject = z.object({
3829
3994
  id: z.string(),
3830
- uid: z.string(),
3995
+ job_wage_determination_id: z.string(),
3996
+ pay_rates_rule_package_id: z.string(),
3997
+ effect: zRateRuleEffect,
3998
+ conditions: z.array(zRateRuleCondition),
3999
+ valid_from: z.iso.datetime().nullable(),
4000
+ valid_to: z.iso.datetime().nullable(),
4001
+ created_at: z.iso.datetime(),
4002
+ updated_at: z.iso.datetime()
4003
+ });
4004
+ export const zRateRuleHistoryCorrectionObject = z.object({
4005
+ pay_rates_rule_id: z.string(),
3831
4006
  job_wage_determination_id: z.string(),
3832
4007
  pay_rates_rule_package_id: z.string(),
3833
4008
  effect: zRateRuleEffect,
@@ -3838,8 +4013,7 @@ export const zRateRuleResponseObject = z.object({
3838
4013
  updated_at: z.iso.datetime()
3839
4014
  });
3840
4015
  export const zRateRuleHistoryVersionObject = z.object({
3841
- id: z.string(),
3842
- uid: z.string(),
4016
+ pay_rates_rule_id: z.string(),
3843
4017
  job_wage_determination_id: z.string(),
3844
4018
  pay_rates_rule_package_id: z.string(),
3845
4019
  effect: zRateRuleEffect,
@@ -3853,7 +4027,7 @@ export const zRateRuleHistoryVersionObject = z.object({
3853
4027
  'current',
3854
4028
  'historical'
3855
4029
  ]),
3856
- corrections: z.array(zRateRuleResponseObject)
4030
+ corrections: z.array(zRateRuleHistoryCorrectionObject)
3857
4031
  });
3858
4032
  /**
3859
4033
  * 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.
@@ -3933,7 +4107,7 @@ export const zAssetsFormAssignmentTriggerResponseObject = z.object({
3933
4107
  'BIWEEKLY',
3934
4108
  'MONTHLY',
3935
4109
  'QUARTERLY'
3936
- ]),
4110
+ ]).nullable(),
3937
4111
  first_due_by: z.enum([
3938
4112
  'day_of_event',
3939
4113
  'day_of_week',
@@ -3975,7 +4149,7 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
3975
4149
  'BIWEEKLY',
3976
4150
  'MONTHLY',
3977
4151
  'QUARTERLY'
3978
- ]).optional(),
4152
+ ]).nullish(),
3979
4153
  day_of_week_due: z.int().nullish(),
3980
4154
  day_of_month_due: z.int().nullish(),
3981
4155
  assigned_user_ids: z.array(z.string()).optional(),
@@ -3988,7 +4162,7 @@ export const zAssetsAttachmentResponseObject = z.object({
3988
4162
  id: z.string(),
3989
4163
  file: z.object({
3990
4164
  filename: z.string(),
3991
- content_type: z.string().nullish(),
4165
+ content_type: z.string().nullable(),
3992
4166
  byte_size: z.int(),
3993
4167
  url: z.string()
3994
4168
  }).nullable(),
@@ -4017,6 +4191,7 @@ export const zAssetsProductResponseObject = z.object({
4017
4191
  assets_category_id: z.string().nullable(),
4018
4192
  attributes: zAssetsAttributeValueObjects,
4019
4193
  images: z.array(zAssetsAttachmentResponseObject),
4194
+ archived_at: z.iso.datetime().nullable(),
4020
4195
  created_at: z.iso.datetime(),
4021
4196
  updated_at: z.iso.datetime()
4022
4197
  });
@@ -4031,11 +4206,7 @@ export const zAssetsItemResponseObject = z.object({
4031
4206
  company_id: z.string(),
4032
4207
  type: z.enum(['serial', 'bulk']),
4033
4208
  serial_number: z.string().nullable(),
4034
- status: z.enum([
4035
- 'available',
4036
- 'assigned',
4037
- 'retired'
4038
- ]),
4209
+ status: z.enum(['available', 'assigned']).nullable(),
4039
4210
  purchase_date: z.iso.datetime().nullable(),
4040
4211
  purchase_price_cents: z.string().nullable(),
4041
4212
  currency: z.string().nullable(),
@@ -4051,6 +4222,7 @@ export const zAssetsItemResponseObject = z.object({
4051
4222
  quantity: z.int()
4052
4223
  })),
4053
4224
  images: z.array(zAssetsAttachmentResponseObject),
4225
+ archived_at: z.iso.datetime().nullable(),
4054
4226
  created_at: z.iso.datetime(),
4055
4227
  updated_at: z.iso.datetime()
4056
4228
  });
@@ -4122,11 +4294,7 @@ export const zAssetsItemParameters = z.object({
4122
4294
  description: z.string().optional(),
4123
4295
  assets_product_id: z.string(),
4124
4296
  serial_number: z.string(),
4125
- status: z.enum([
4126
- 'available',
4127
- 'assigned',
4128
- 'retired'
4129
- ]).optional(),
4297
+ status: z.enum(['available', 'assigned']).optional(),
4130
4298
  purchase_date: z.iso.datetime().optional(),
4131
4299
  purchase_price_cents: z.int().optional(),
4132
4300
  external_id: z.string().optional(),
@@ -4150,7 +4318,7 @@ export const zAssetsDocumentResponseObject = z.object({
4150
4318
  created_by_user_id: z.string(),
4151
4319
  file: z.object({
4152
4320
  filename: z.string(),
4153
- content_type: z.string().nullish(),
4321
+ content_type: z.string().nullable(),
4154
4322
  byte_size: z.int(),
4155
4323
  url: z.string()
4156
4324
  }).nullable(),
@@ -4188,7 +4356,7 @@ export const zAssetsItemFormAssignmentResponseObject = z.object({
4188
4356
  form_definition_id: z.string(),
4189
4357
  name: z.string(),
4190
4358
  description: z.string().nullable(),
4191
- tz_name: z.string().nullable(),
4359
+ tz_name: z.string(),
4192
4360
  time_due: z.iso.datetime().nullable(),
4193
4361
  frequency: z.enum([
4194
4362
  'DAILY',
@@ -4198,12 +4366,12 @@ export const zAssetsItemFormAssignmentResponseObject = z.object({
4198
4366
  'BIWEEKLY',
4199
4367
  'MONTHLY',
4200
4368
  'QUARTERLY'
4201
- ]),
4369
+ ]).nullable(),
4202
4370
  recurrence_end_time: z.iso.datetime().nullable(),
4203
4371
  task_assignee_user_ids: z.array(z.string()),
4204
4372
  reminders: z.array(z.object({
4205
- offset: z.string().optional(),
4206
- remind_at: z.iso.datetime().nullish()
4373
+ offset: z.string(),
4374
+ remind_at: z.iso.datetime()
4207
4375
  }))
4208
4376
  });
4209
4377
  /**
@@ -4227,7 +4395,7 @@ export const zAssetsItemFormAssignmentParameters = z.object({
4227
4395
  'BIWEEKLY',
4228
4396
  'MONTHLY',
4229
4397
  'QUARTERLY'
4230
- ]).optional(),
4398
+ ]).nullish(),
4231
4399
  recurrence_end_time: z.iso.datetime().nullish(),
4232
4400
  task_assignee_user_ids: z.array(z.string()).optional(),
4233
4401
  reminders_attributes: z.array(z.object({
@@ -4520,17 +4688,11 @@ export const zAssetsAdjustmentParameters = z.object({
4520
4688
  new_quantity: z.int().gte(0),
4521
4689
  performed_by_user_id: z.string()
4522
4690
  });
4523
- /**
4524
- * Retire an item, taking it out of service. A serial item is removed from its site or user (recording the removal) and marked retired; a bulk item is flagged retired without changing its stock. Delete this resource to un-retire.
4525
- */
4526
- export const zAssetsRetirementParameters = z.object({
4527
- performed_by_user_id: z.string()
4528
- });
4529
4691
  /**
4530
4692
  * Success
4531
4693
  */
4532
4694
  export const zListApiKeyScopesResponse = z.object({
4533
- data: z.array(zApiKeyScopeResponseObject).optional()
4695
+ data: z.array(zApiKeyScopeResponseObject)
4534
4696
  });
4535
4697
  export const zListApprenticesPath = z.object({
4536
4698
  program_id: z.string()
@@ -4552,9 +4714,9 @@ export const zListApprenticesQuery = z.object({
4552
4714
  * Success
4553
4715
  */
4554
4716
  export const zListApprenticesResponse = z.object({
4555
- meta: zMeta.optional(),
4556
- links: zLinks.optional(),
4557
- data: z.array(zApprenticeshipApprenticeResponseObject).optional()
4717
+ meta: zMeta,
4718
+ links: zLinks,
4719
+ data: z.array(zApprenticeshipApprenticeResponseObject)
4558
4720
  });
4559
4721
  export const zCreateApprenticeBody = zApprenticeshipApprenticeParameters;
4560
4722
  export const zCreateApprenticePath = z.object({
@@ -4582,9 +4744,9 @@ export const zListOccupationsQuery = z.object({
4582
4744
  * Success
4583
4745
  */
4584
4746
  export const zListOccupationsResponse = z.object({
4585
- meta: zMeta.optional(),
4586
- links: zLinks.optional(),
4587
- data: z.array(zApprenticeshipOccupationResponseObject).optional()
4747
+ meta: zMeta,
4748
+ links: zLinks,
4749
+ data: z.array(zApprenticeshipOccupationResponseObject)
4588
4750
  });
4589
4751
  export const zCreateOccupationBody = zApprenticeshipOccupationParameters;
4590
4752
  export const zCreateOccupationPath = z.object({
@@ -4621,9 +4783,9 @@ export const zListEmployersQuery = z.object({
4621
4783
  * Success
4622
4784
  */
4623
4785
  export const zListEmployersResponse = z.object({
4624
- meta: zMeta.optional(),
4625
- links: zLinks.optional(),
4626
- data: z.array(zApprenticeshipProgramEmployerResponseObject).optional()
4786
+ meta: zMeta,
4787
+ links: zLinks,
4788
+ data: z.array(zApprenticeshipProgramEmployerResponseObject)
4627
4789
  });
4628
4790
  export const zCreateEmployerBody = zApprenticeshipProgramEmployerParameters;
4629
4791
  export const zCreateEmployerPath = z.object({
@@ -4665,9 +4827,9 @@ export const zListProgramsQuery = z.object({
4665
4827
  * Success
4666
4828
  */
4667
4829
  export const zListProgramsResponse = z.object({
4668
- meta: zMeta.optional(),
4669
- links: zLinks.optional(),
4670
- data: z.array(zApprenticeshipProgramResponseObject).optional()
4830
+ meta: zMeta,
4831
+ links: zLinks,
4832
+ data: z.array(zApprenticeshipProgramResponseObject)
4671
4833
  });
4672
4834
  export const zCreateProgramBody = zApprenticeshipProgramParameters;
4673
4835
  /**
@@ -4700,9 +4862,9 @@ export const zListPeriodsQuery = z.object({
4700
4862
  * Success
4701
4863
  */
4702
4864
  export const zListPeriodsResponse = z.object({
4703
- meta: zMeta.optional(),
4704
- links: zLinks.optional(),
4705
- data: z.array(zApprenticeshipWageSchedulePeriodResponseObject).optional()
4865
+ meta: zMeta,
4866
+ links: zLinks,
4867
+ data: z.array(zApprenticeshipWageSchedulePeriodResponseObject)
4706
4868
  });
4707
4869
  export const zCreatePeriodBody = zApprenticeshipWageSchedulePeriodParameters;
4708
4870
  export const zCreatePeriodPath = z.object({
@@ -4739,9 +4901,9 @@ export const zListWageSchedulesQuery = z.object({
4739
4901
  * Success
4740
4902
  */
4741
4903
  export const zListWageSchedulesResponse = z.object({
4742
- meta: zMeta.optional(),
4743
- links: zLinks.optional(),
4744
- data: z.array(zApprenticeshipWageScheduleResponseObject).optional()
4904
+ meta: zMeta,
4905
+ links: zLinks,
4906
+ data: z.array(zApprenticeshipWageScheduleResponseObject)
4745
4907
  });
4746
4908
  export const zCreateWageScheduleBody = zApprenticeshipWageScheduleParameters;
4747
4909
  export const zCreateWageSchedulePath = z.object({
@@ -4776,9 +4938,9 @@ export const zListAttributesQuery = z.object({
4776
4938
  * Success
4777
4939
  */
4778
4940
  export const zListAttributesResponse = z.object({
4779
- meta: zMeta.optional(),
4780
- links: zLinks.optional(),
4781
- data: z.array(zAssetsAttributeResponseObject).optional()
4941
+ meta: zMeta,
4942
+ links: zLinks,
4943
+ data: z.array(zAssetsAttributeResponseObject)
4782
4944
  });
4783
4945
  export const zCreateAttributeBody = zAssetsAttributeParameters;
4784
4946
  /**
@@ -4822,9 +4984,9 @@ export const zListCategoriesQuery = z.object({
4822
4984
  * Success
4823
4985
  */
4824
4986
  export const zListCategoriesResponse = z.object({
4825
- meta: zMeta.optional(),
4826
- links: zLinks.optional(),
4827
- data: z.array(zAssetsCategoryResponseObject).optional()
4987
+ meta: zMeta,
4988
+ links: zLinks,
4989
+ data: z.array(zAssetsCategoryResponseObject)
4828
4990
  });
4829
4991
  export const zCreateCategoryBody = zAssetsCategoryParameters;
4830
4992
  /**
@@ -4863,9 +5025,9 @@ export const zListCustodiesQuery = z.object({
4863
5025
  * Success
4864
5026
  */
4865
5027
  export const zListCustodiesResponse = z.object({
4866
- meta: zMeta.optional(),
4867
- links: zLinks.optional(),
4868
- data: z.array(zAssetsCustodyResponseObject).optional()
5028
+ meta: zMeta,
5029
+ links: zLinks,
5030
+ data: z.array(zAssetsCustodyResponseObject)
4869
5031
  });
4870
5032
  export const zGetCustodyPath = z.object({
4871
5033
  id: z.string()
@@ -4884,9 +5046,9 @@ export const zListEventsQuery = z.object({
4884
5046
  * Success
4885
5047
  */
4886
5048
  export const zListEventsResponse = z.object({
4887
- meta: zMeta.optional(),
4888
- links: zLinks.optional(),
4889
- data: z.array(zAssetsItemEventResponseObject).optional()
5049
+ meta: zMeta,
5050
+ links: zLinks,
5051
+ data: z.array(zAssetsItemEventResponseObject)
4890
5052
  });
4891
5053
  export const zGetEventPath = z.object({
4892
5054
  id: z.string()
@@ -4907,9 +5069,9 @@ export const zListFormAssignmentTriggersQuery = z.object({
4907
5069
  * Success
4908
5070
  */
4909
5071
  export const zListFormAssignmentTriggersResponse = z.object({
4910
- meta: zMeta.optional(),
4911
- links: zLinks.optional(),
4912
- data: z.array(zAssetsFormAssignmentTriggerResponseObject).optional()
5072
+ meta: zMeta,
5073
+ links: zLinks,
5074
+ data: z.array(zAssetsFormAssignmentTriggerResponseObject)
4913
5075
  });
4914
5076
  export const zCreateFormAssignmentTriggerBody = zAssetsFormAssignmentTriggerParameters;
4915
5077
  /**
@@ -4948,9 +5110,9 @@ export const zListInventoriesQuery = z.object({
4948
5110
  * Success
4949
5111
  */
4950
5112
  export const zListInventoriesResponse = z.object({
4951
- meta: zMeta.optional(),
4952
- links: zLinks.optional(),
4953
- data: z.array(zAssetsInventoryResponseObject).optional()
5113
+ meta: zMeta,
5114
+ links: zLinks,
5115
+ data: z.array(zAssetsInventoryResponseObject)
4954
5116
  });
4955
5117
  export const zGetInventoryPath = z.object({
4956
5118
  id: z.string()
@@ -4968,6 +5130,7 @@ export const zListItemsQuery = z.object({
4968
5130
  'filter[container_item_id]': z.string().optional(),
4969
5131
  'filter[status]': z.string().optional(),
4970
5132
  'filter[service]': z.string().optional(),
5133
+ 'filter[state]': z.string().optional(),
4971
5134
  filter: z.string().optional(),
4972
5135
  'filter[unexpected]': z.string().optional()
4973
5136
  });
@@ -4975,9 +5138,9 @@ export const zListItemsQuery = z.object({
4975
5138
  * Success
4976
5139
  */
4977
5140
  export const zListItemsResponse = z.object({
4978
- meta: zMeta.optional(),
4979
- links: zLinks.optional(),
4980
- data: z.array(zAssetsItemResponseObject).optional()
5141
+ meta: zMeta,
5142
+ links: zLinks,
5143
+ data: z.array(zAssetsItemResponseObject)
4981
5144
  });
4982
5145
  export const zCreateItemBody = zAssetsItemParameters;
4983
5146
  /**
@@ -5006,21 +5169,6 @@ export const zUpdateItemPath = z.object({
5006
5169
  * Removes an image
5007
5170
  */
5008
5171
  export const zUpdateItemResponse = zAssetsItemResponseObject;
5009
- export const zUnretireItemPath = z.object({
5010
- item_id: z.string()
5011
- });
5012
- /**
5013
- * Success
5014
- */
5015
- export const zUnretireItemResponse = zAssetsItemResponseObject;
5016
- export const zRetireItemBody = zAssetsRetirementParameters;
5017
- export const zRetireItemPath = z.object({
5018
- item_id: z.string()
5019
- });
5020
- /**
5021
- * Created
5022
- */
5023
- export const zRetireItemResponse = zAssetsItemResponseObject;
5024
5172
  export const zListServiceSchedulesPath = z.object({
5025
5173
  item_id: z.string()
5026
5174
  });
@@ -5040,9 +5188,9 @@ export const zListServiceSchedulesQuery = z.object({
5040
5188
  * Success
5041
5189
  */
5042
5190
  export const zListServiceSchedulesResponse = z.object({
5043
- meta: zMeta.optional(),
5044
- links: zLinks.optional(),
5045
- data: z.array(zAssetsServiceScheduleResponseObject).optional()
5191
+ meta: zMeta,
5192
+ links: zLinks,
5193
+ data: z.array(zAssetsServiceScheduleResponseObject)
5046
5194
  });
5047
5195
  export const zCreateServiceScheduleBody = zAssetsServiceScheduleParameters;
5048
5196
  export const zCreateServiceSchedulePath = z.object({
@@ -5096,9 +5244,9 @@ export const zListServiceEventsQuery = z.object({
5096
5244
  * Success
5097
5245
  */
5098
5246
  export const zListServiceEventsResponse = z.object({
5099
- meta: zMeta.optional(),
5100
- links: zLinks.optional(),
5101
- data: z.array(zAssetsServiceEventFullResponseObject).optional()
5247
+ meta: zMeta,
5248
+ links: zLinks,
5249
+ data: z.array(zAssetsServiceEventFullResponseObject)
5102
5250
  });
5103
5251
  export const zCreateServiceEventBody = zAssetsServiceEventParameters;
5104
5252
  export const zCreateServiceEventPath = z.object({
@@ -5145,9 +5293,9 @@ export const zListFormAssignmentTasksQuery = z.object({
5145
5293
  * Success
5146
5294
  */
5147
5295
  export const zListFormAssignmentTasksResponse = z.object({
5148
- meta: zMeta.optional(),
5149
- links: zLinks.optional(),
5150
- data: z.array(zAssetsItemFormAssignmentResponseObject).optional()
5296
+ meta: zMeta,
5297
+ links: zLinks,
5298
+ data: z.array(zAssetsItemFormAssignmentResponseObject)
5151
5299
  });
5152
5300
  export const zCreateItemFormAssignmentTaskBody = zAssetsItemFormAssignmentParameters;
5153
5301
  export const zCreateItemFormAssignmentTaskPath = z.object({
@@ -5188,9 +5336,9 @@ export const zListDocumentsQuery = z.object({
5188
5336
  * Success
5189
5337
  */
5190
5338
  export const zListDocumentsResponse = z.object({
5191
- meta: zMeta.optional(),
5192
- links: zLinks.optional(),
5193
- data: z.array(zAssetsDocumentResponseObject).optional()
5339
+ meta: zMeta,
5340
+ links: zLinks,
5341
+ data: z.array(zAssetsDocumentResponseObject)
5194
5342
  });
5195
5343
  export const zCreateDocumentBody = zAssetsDocumentParameters;
5196
5344
  export const zCreateDocumentPath = z.object({
@@ -5233,12 +5381,13 @@ export const zListVersionsPath = z.object({
5233
5381
  * Success
5234
5382
  */
5235
5383
  export const zListVersionsResponse = z.object({
5236
- meta: zMeta.optional(),
5237
- links: zLinks.optional(),
5238
- data: z.array(zAssetsDocumentVersionResponseObject).optional()
5384
+ meta: zMeta,
5385
+ links: zLinks,
5386
+ data: z.array(zAssetsDocumentVersionResponseObject)
5239
5387
  });
5240
5388
  export const zListProductsQuery = z.object({
5241
5389
  'filter[assets_category_id]': z.string().optional(),
5390
+ 'filter[state]': z.string().optional(),
5242
5391
  'filter[created_at][gte]': z.iso.datetime().optional(),
5243
5392
  'filter[created_at][lte]': z.iso.datetime().optional(),
5244
5393
  'filter[updated_at][gte]': z.iso.datetime().optional(),
@@ -5253,9 +5402,9 @@ export const zListProductsQuery = z.object({
5253
5402
  * Success
5254
5403
  */
5255
5404
  export const zListProductsResponse = z.object({
5256
- meta: zMeta.optional(),
5257
- links: zLinks.optional(),
5258
- data: z.array(zAssetsProductResponseObject).optional()
5405
+ meta: zMeta,
5406
+ links: zLinks,
5407
+ data: z.array(zAssetsProductResponseObject)
5259
5408
  });
5260
5409
  export const zCreateProductBody = zAssetsProductParameters;
5261
5410
  /**
@@ -5315,9 +5464,9 @@ export const zListServiceScheduleTemplatesQuery = z.object({
5315
5464
  * Success
5316
5465
  */
5317
5466
  export const zListServiceScheduleTemplatesResponse = z.object({
5318
- meta: zMeta.optional(),
5319
- links: zLinks.optional(),
5320
- data: z.array(zAssetsServiceScheduleTemplateResponseObject).optional()
5467
+ meta: zMeta,
5468
+ links: zLinks,
5469
+ data: z.array(zAssetsServiceScheduleTemplateResponseObject)
5321
5470
  });
5322
5471
  export const zCreateServiceScheduleTemplateBody = zAssetsServiceScheduleTemplateParameters;
5323
5472
  export const zCreateServiceScheduleTemplatePath = z.object({
@@ -5397,9 +5546,9 @@ export const zListAssetsSitesQuery = z.object({
5397
5546
  * Success
5398
5547
  */
5399
5548
  export const zListAssetsSitesResponse = z.object({
5400
- meta: zMeta.optional(),
5401
- links: zLinks.optional(),
5402
- data: z.array(zAssetsSiteResponseObject).optional()
5549
+ meta: zMeta,
5550
+ links: zLinks,
5551
+ data: z.array(zAssetsSiteResponseObject)
5403
5552
  });
5404
5553
  export const zCreateSiteBody = zAssetsSiteParameters;
5405
5554
  /**
@@ -5437,9 +5586,9 @@ export const zListTransfersQuery = z.object({
5437
5586
  * Success
5438
5587
  */
5439
5588
  export const zListTransfersResponse = z.object({
5440
- meta: zMeta.optional(),
5441
- links: zLinks.optional(),
5442
- data: z.array(zAssetsTransferResponseObject).optional()
5589
+ meta: zMeta,
5590
+ links: zLinks,
5591
+ data: z.array(zAssetsTransferResponseObject)
5443
5592
  });
5444
5593
  export const zCreateTransferBody = zAssetsTransferParameters;
5445
5594
  export const zCreateTransferResponse = z.union([
@@ -5464,9 +5613,9 @@ export const zListVendorsQuery = z.object({
5464
5613
  * Success
5465
5614
  */
5466
5615
  export const zListVendorsResponse = z.object({
5467
- meta: zMeta.optional(),
5468
- links: zLinks.optional(),
5469
- data: z.array(zAssetsVendorResponseObject).optional()
5616
+ meta: zMeta,
5617
+ links: zLinks,
5618
+ data: z.array(zAssetsVendorResponseObject)
5470
5619
  });
5471
5620
  export const zCreateVendorBody = zAssetsVendorParameters;
5472
5621
  /**
@@ -5517,9 +5666,9 @@ export const zListFeaturesQuery = z.object({
5517
5666
  * Success
5518
5667
  */
5519
5668
  export const zListFeaturesResponse = z.object({
5520
- meta: zMeta.optional(),
5521
- links: zLinks.optional(),
5522
- data: z.array(zFeatureResponseObject).optional()
5669
+ meta: zMeta,
5670
+ links: zLinks,
5671
+ data: z.array(zFeatureResponseObject)
5523
5672
  });
5524
5673
  export const zGetFeaturePath = z.object({
5525
5674
  id: z.string()
@@ -5549,9 +5698,9 @@ export const zListAtlasSitesQuery = z.object({
5549
5698
  * Success
5550
5699
  */
5551
5700
  export const zListAtlasSitesResponse = z.object({
5552
- meta: zMeta.optional(),
5553
- links: zLinks.optional(),
5554
- data: z.array(zSiteResponseObject).optional()
5701
+ meta: zMeta,
5702
+ links: zLinks,
5703
+ data: z.array(zSiteResponseObject)
5555
5704
  });
5556
5705
  export const zGetAtlasSitePath = z.object({
5557
5706
  id: z.string()
@@ -5586,9 +5735,9 @@ export const zListPackagesQuery = z.object({
5586
5735
  * Success
5587
5736
  */
5588
5737
  export const zListPackagesResponse = z.object({
5589
- meta: zMeta.optional(),
5590
- links: zLinks.optional(),
5591
- data: z.array(zCertificationPackageResponseObject).optional()
5738
+ meta: zMeta,
5739
+ links: zLinks,
5740
+ data: z.array(zCertificationPackageResponseObject)
5592
5741
  });
5593
5742
  export const zCreatePackageBody = zCertificationPackageParameters;
5594
5743
  /**
@@ -5711,9 +5860,9 @@ export const zListDepartmentsQuery = z.object({
5711
5860
  * Success
5712
5861
  */
5713
5862
  export const zListDepartmentsResponse = z.object({
5714
- meta: zMeta.optional(),
5715
- links: zLinks.optional(),
5716
- data: z.array(zDepartmentResponseObject).optional()
5863
+ meta: zMeta,
5864
+ links: zLinks,
5865
+ data: z.array(zDepartmentResponseObject)
5717
5866
  });
5718
5867
  export const zCreateDepartmentBody = zDepartmentParameters;
5719
5868
  /**
@@ -5740,9 +5889,9 @@ export const zListCompaniesQuery = z.object({
5740
5889
  * Success
5741
5890
  */
5742
5891
  export const zListCompaniesResponse = z.object({
5743
- meta: zMeta.optional(),
5744
- links: zLinks.optional(),
5745
- data: z.array(zCompanyResponseObject).optional()
5892
+ meta: zMeta,
5893
+ links: zLinks,
5894
+ data: z.array(zCompanyResponseObject)
5746
5895
  });
5747
5896
  export const zGetCompanyPath = z.object({
5748
5897
  id: z.string()
@@ -5784,9 +5933,9 @@ export const zListChecksQuery = z.object({
5784
5933
  * Success
5785
5934
  */
5786
5935
  export const zListChecksResponse = z.object({
5787
- meta: zMeta.optional(),
5788
- links: zLinks.optional(),
5789
- data: z.array(zComplianceCheckResponseObject).optional()
5936
+ meta: zMeta,
5937
+ links: zLinks,
5938
+ data: z.array(zComplianceCheckResponseObject)
5790
5939
  });
5791
5940
  export const zGetCheckPath = z.object({
5792
5941
  id: z.string()
@@ -5812,9 +5961,9 @@ export const zListCustomFieldConfigsQuery = z.object({
5812
5961
  * Success
5813
5962
  */
5814
5963
  export const zListCustomFieldConfigsResponse = z.object({
5815
- meta: zMeta.optional(),
5816
- links: zLinks.optional(),
5817
- data: z.array(zCustomFieldConfigsResponseObject).optional()
5964
+ meta: zMeta,
5965
+ links: zLinks,
5966
+ data: z.array(zCustomFieldConfigsResponseObject)
5818
5967
  });
5819
5968
  export const zCreateCustomFieldConfigBody = zCustomFieldConfigParameters;
5820
5969
  /**
@@ -5921,9 +6070,9 @@ export const zListGroupUsersQuery = z.object({
5921
6070
  * Success
5922
6071
  */
5923
6072
  export const zListGroupUsersResponse = z.object({
5924
- meta: zMeta.optional(),
5925
- links: zLinks.optional(),
5926
- data: z.array(zUserGroupResponse).optional()
6073
+ meta: zMeta,
6074
+ links: zLinks,
6075
+ data: z.array(zUserGroupResponse)
5927
6076
  });
5928
6077
  export const zAddUsersToGroupBody = zUserGroupParameters;
5929
6078
  export const zAddUsersToGroupPath = z.object({
@@ -5950,9 +6099,9 @@ export const zListGroupsQuery = z.object({
5950
6099
  * Success
5951
6100
  */
5952
6101
  export const zListGroupsResponse = z.object({
5953
- meta: zMeta.optional(),
5954
- links: zLinks.optional(),
5955
- data: z.array(zGroupResponseObject).optional()
6102
+ meta: zMeta,
6103
+ links: zLinks,
6104
+ data: z.array(zGroupResponseObject)
5956
6105
  });
5957
6106
  export const zCreateGroupBody = zGroupParameters;
5958
6107
  /**
@@ -6000,9 +6149,9 @@ export const zListJobScopePricesQuery = z.object({
6000
6149
  * Success
6001
6150
  */
6002
6151
  export const zListJobScopePricesResponse = z.object({
6003
- meta: zMeta.optional(),
6004
- links: zLinks.optional(),
6005
- data: z.array(zProductionJobScopePriceResponseObject).optional()
6152
+ meta: zMeta,
6153
+ links: zLinks,
6154
+ data: z.array(zProductionJobScopePriceResponseObject)
6006
6155
  });
6007
6156
  export const zCreateJobScopePriceBody = zProductionJobScopePriceParameters;
6008
6157
  export const zCreateJobScopePricePath = z.object({
@@ -6047,8 +6196,8 @@ export const zCreateJobTradePath = z.object({
6047
6196
  export const zCreateJobTradeResponse = zPwaTradeResponseObject;
6048
6197
  export const zListRateRuleHistoryPath = z.object({
6049
6198
  job_id: z.string(),
6050
- wage_determination_uid: z.string(),
6051
- rate_rule_uid: z.string()
6199
+ wage_determination_id: z.string(),
6200
+ rate_rule_id: z.string()
6052
6201
  });
6053
6202
  export const zListRateRuleHistoryQuery = z.object({
6054
6203
  'as_of[valid]': z.string().optional()
@@ -6057,13 +6206,13 @@ export const zListRateRuleHistoryQuery = z.object({
6057
6206
  * Success
6058
6207
  */
6059
6208
  export const zListRateRuleHistoryResponse = z.object({
6060
- meta: zMeta.optional(),
6061
- links: zLinks.optional(),
6062
- data: z.array(zRateRuleHistoryVersionObject).optional()
6209
+ meta: zMeta,
6210
+ links: zLinks,
6211
+ data: z.array(zRateRuleHistoryVersionObject)
6063
6212
  });
6064
6213
  export const zListRateRulesPath = z.object({
6065
6214
  job_id: z.string(),
6066
- wage_determination_uid: z.string()
6215
+ wage_determination_id: z.string()
6067
6216
  });
6068
6217
  export const zListRateRulesQuery = z.object({
6069
6218
  'as_of[valid]': z.iso.datetime().optional(),
@@ -6076,14 +6225,14 @@ export const zListRateRulesQuery = z.object({
6076
6225
  * Success
6077
6226
  */
6078
6227
  export const zListRateRulesResponse = z.object({
6079
- meta: zMeta.optional(),
6080
- links: zLinks.optional(),
6081
- data: z.array(zRateRuleResponseObject).optional()
6228
+ meta: zMeta,
6229
+ links: zLinks,
6230
+ data: z.array(zRateRuleResponseObject)
6082
6231
  });
6083
6232
  export const zCreateRateRuleBody = zRateRuleParameters;
6084
6233
  export const zCreateRateRulePath = z.object({
6085
6234
  job_id: z.string(),
6086
- wage_determination_uid: z.string()
6235
+ wage_determination_id: z.string()
6087
6236
  });
6088
6237
  /**
6089
6238
  * Created
@@ -6091,8 +6240,8 @@ export const zCreateRateRulePath = z.object({
6091
6240
  export const zCreateRateRuleResponse = zRateRuleResponseObject;
6092
6241
  export const zGetRateRulePath = z.object({
6093
6242
  job_id: z.string(),
6094
- wage_determination_uid: z.string(),
6095
- uid: z.string()
6243
+ wage_determination_id: z.string(),
6244
+ id: z.string()
6096
6245
  });
6097
6246
  export const zGetRateRuleQuery = z.object({
6098
6247
  'as_of[valid]': z.iso.datetime().optional()
@@ -6103,7 +6252,7 @@ export const zGetRateRuleQuery = z.object({
6103
6252
  export const zGetRateRuleResponse = zRateRuleResponseObject;
6104
6253
  export const zListJobWageDeterminationHistoryPath = z.object({
6105
6254
  job_id: z.string(),
6106
- wage_determination_uid: z.string()
6255
+ wage_determination_id: z.string()
6107
6256
  });
6108
6257
  export const zListJobWageDeterminationHistoryQuery = z.object({
6109
6258
  'as_of[valid]': z.string().optional()
@@ -6112,9 +6261,9 @@ export const zListJobWageDeterminationHistoryQuery = z.object({
6112
6261
  * Success
6113
6262
  */
6114
6263
  export const zListJobWageDeterminationHistoryResponse = z.object({
6115
- meta: zMeta.optional(),
6116
- links: zLinks.optional(),
6117
- data: z.array(zJobWageDeterminationHistoryVersionObject).optional()
6264
+ meta: zMeta,
6265
+ links: zLinks,
6266
+ data: z.array(zJobWageDeterminationHistoryVersionObject)
6118
6267
  });
6119
6268
  export const zListJobWageDeterminationsPath = z.object({
6120
6269
  job_id: z.string()
@@ -6130,9 +6279,9 @@ export const zListJobWageDeterminationsQuery = z.object({
6130
6279
  * Success
6131
6280
  */
6132
6281
  export const zListJobWageDeterminationsResponse = z.object({
6133
- meta: zMeta.optional(),
6134
- links: zLinks.optional(),
6135
- data: z.array(zJobWageDeterminationResponseObject).optional()
6282
+ meta: zMeta,
6283
+ links: zLinks,
6284
+ data: z.array(zJobWageDeterminationResponseObject)
6136
6285
  });
6137
6286
  export const zCreateWageDeterminationBody = zJobWageDeterminationParameters;
6138
6287
  export const zCreateWageDeterminationPath = z.object({
@@ -6147,7 +6296,7 @@ export const zDeleteWageDeterminationHeaders = z.object({
6147
6296
  });
6148
6297
  export const zDeleteWageDeterminationPath = z.object({
6149
6298
  job_id: z.string(),
6150
- uid: z.string()
6299
+ id: z.string()
6151
6300
  });
6152
6301
  /**
6153
6302
  * Success
@@ -6155,7 +6304,7 @@ export const zDeleteWageDeterminationPath = z.object({
6155
6304
  export const zDeleteWageDeterminationResponse = zJobWageDeterminationResponseObject;
6156
6305
  export const zGetJobWageDeterminationPath = z.object({
6157
6306
  job_id: z.string(),
6158
- uid: z.string()
6307
+ id: z.string()
6159
6308
  });
6160
6309
  export const zGetJobWageDeterminationQuery = z.object({
6161
6310
  'as_of[valid]': z.iso.datetime().optional()
@@ -6179,9 +6328,9 @@ export const zListJobsQuery = z.object({
6179
6328
  * Success
6180
6329
  */
6181
6330
  export const zListJobsResponse = z.object({
6182
- meta: zMeta.optional(),
6183
- links: zLinks.optional(),
6184
- data: z.array(zJobResponseObject).optional()
6331
+ meta: zMeta,
6332
+ links: zLinks,
6333
+ data: z.array(zJobResponseObject)
6185
6334
  });
6186
6335
  /**
6187
6336
  * Create a job
@@ -6256,9 +6405,9 @@ export const zListPayPeriodsResponse = zPayPeriodsResponseObject;
6256
6405
  * Success
6257
6406
  */
6258
6407
  export const zListCompensationElementsResponse = z.object({
6259
- meta: zMeta.optional(),
6260
- links: zLinks.optional(),
6261
- data: z.array(zCompensationElementResponseObject).optional()
6408
+ meta: zMeta,
6409
+ links: zLinks,
6410
+ data: z.array(zCompensationElementResponseObject)
6262
6411
  });
6263
6412
  export const zGetCompensationElementPath = z.object({
6264
6413
  id: z.string()
@@ -6278,9 +6427,9 @@ export const zListExternalMapHistoryQuery = z.object({
6278
6427
  * Success
6279
6428
  */
6280
6429
  export const zListExternalMapHistoryResponse = z.object({
6281
- meta: zMeta.optional(),
6282
- links: zLinks.optional(),
6283
- data: z.array(zPayrollExternalMapHistoryVersionObject).optional()
6430
+ meta: zMeta,
6431
+ links: zLinks,
6432
+ data: z.array(zPayrollExternalMapHistoryVersionObject)
6284
6433
  });
6285
6434
  export const zListExternalMapsQuery = z.object({
6286
6435
  'filter[name]': z.string().optional(),
@@ -6301,9 +6450,9 @@ export const zListExternalMapsQuery = z.object({
6301
6450
  * Success
6302
6451
  */
6303
6452
  export const zListExternalMapsResponse = z.object({
6304
- meta: zMeta.optional(),
6305
- links: zLinks.optional(),
6306
- data: z.array(zPayrollExternalMapResponseObject).optional()
6453
+ meta: zMeta,
6454
+ links: zLinks,
6455
+ data: z.array(zPayrollExternalMapResponseObject)
6307
6456
  });
6308
6457
  export const zGetExternalMapPath = z.object({
6309
6458
  id: z.string()
@@ -6329,9 +6478,9 @@ export const zListFringeBenefitPlansQuery = z.object({
6329
6478
  * Success
6330
6479
  */
6331
6480
  export const zListFringeBenefitPlansResponse = z.object({
6332
- meta: zMeta.optional(),
6333
- links: zLinks.optional(),
6334
- data: z.array(zPayrollFringeBenefitPlanResponseObject).optional()
6481
+ meta: zMeta,
6482
+ links: zLinks,
6483
+ data: z.array(zPayrollFringeBenefitPlanResponseObject)
6335
6484
  });
6336
6485
  export const zCreateFringeBenefitPlanBody = zPayrollFringeBenefitPlanParameters;
6337
6486
  /**
@@ -6508,9 +6657,9 @@ export const zListPerDiemsQuery = z.object({
6508
6657
  * Success
6509
6658
  */
6510
6659
  export const zListPerDiemsResponse = z.object({
6511
- meta: zMeta.optional(),
6512
- links: zLinks.optional(),
6513
- data: z.array(zPerDiemResponseObject).optional()
6660
+ meta: zMeta,
6661
+ links: zLinks,
6662
+ data: z.array(zPerDiemResponseObject)
6514
6663
  });
6515
6664
  export const zCreatePerDiemBody = zPerDiemParameters;
6516
6665
  /**
@@ -6548,9 +6697,9 @@ export const zListPositionFunctionsQuery = z.object({
6548
6697
  * Success
6549
6698
  */
6550
6699
  export const zListPositionFunctionsResponse = z.object({
6551
- meta: zMeta.optional(),
6552
- links: zLinks.optional(),
6553
- data: z.array(zPositionFunctionResponseObject).optional()
6700
+ meta: zMeta,
6701
+ links: zLinks,
6702
+ data: z.array(zPositionFunctionResponseObject)
6554
6703
  });
6555
6704
  export const zCreatePositionFunctionBody = zPositionFunctionParameters;
6556
6705
  /**
@@ -6600,9 +6749,9 @@ export const zListCompletionsQuery = z.object({
6600
6749
  * Success
6601
6750
  */
6602
6751
  export const zListCompletionsResponse = z.object({
6603
- meta: zMeta.optional(),
6604
- links: zLinks.optional(),
6605
- data: z.array(zProductionCompletionResponseObject).optional()
6752
+ meta: zMeta,
6753
+ links: zLinks,
6754
+ data: z.array(zProductionCompletionResponseObject)
6606
6755
  });
6607
6756
  export const zCreateCompletionBody = zProductionCompletionParameters;
6608
6757
  /**
@@ -6667,9 +6816,9 @@ export const zListProjectsQuery = z.object({
6667
6816
  * Success
6668
6817
  */
6669
6818
  export const zListProjectsResponse = z.object({
6670
- meta: zMeta.optional(),
6671
- links: zLinks.optional(),
6672
- data: z.array(zProjectResponseObject).optional()
6819
+ meta: zMeta,
6820
+ links: zLinks,
6821
+ data: z.array(zProjectResponseObject)
6673
6822
  });
6674
6823
  export const zCreateProjectBody = zProjectParameters;
6675
6824
  /**
@@ -6721,9 +6870,9 @@ export const zListTradesQuery = z.object({
6721
6870
  * Success
6722
6871
  */
6723
6872
  export const zListTradesResponse = z.object({
6724
- meta: zMeta.optional(),
6725
- links: zLinks.optional(),
6726
- data: z.array(zPwaTradeResponseObject).optional()
6873
+ meta: zMeta,
6874
+ links: zLinks,
6875
+ data: z.array(zPwaTradeResponseObject)
6727
6876
  });
6728
6877
  export const zGetTradePath = z.object({
6729
6878
  id: z.string()
@@ -6843,9 +6992,9 @@ export const zListTemplatesQuery = z.object({
6843
6992
  * Success
6844
6993
  */
6845
6994
  export const zListTemplatesResponse = z.object({
6846
- meta: zMeta.optional(),
6847
- links: zLinks.optional(),
6848
- data: z.array(zJobTemplateResponseObject).optional()
6995
+ meta: zMeta,
6996
+ links: zLinks,
6997
+ data: z.array(zJobTemplateResponseObject)
6849
6998
  });
6850
6999
  export const zSetTimeCardLockBody = zTimeCardLockParameters;
6851
7000
  export const zSetTimeCardLockPath = z.object({
@@ -6875,9 +7024,9 @@ export const zListTimeCardPerDiemsQuery = z.object({
6875
7024
  * Success
6876
7025
  */
6877
7026
  export const zListTimeCardPerDiemsResponse = z.object({
6878
- meta: zMeta.optional(),
6879
- links: zLinks.optional(),
6880
- data: z.array(zTimeCardPerDiemResponseObject).optional()
7027
+ meta: zMeta,
7028
+ links: zLinks,
7029
+ data: z.array(zTimeCardPerDiemResponseObject)
6881
7030
  });
6882
7031
  export const zCreateTimeCardPerDiemBody = zTimeCardPerDiemParameters;
6883
7032
  export const zCreateTimeCardPerDiemPath = z.object({
@@ -6917,9 +7066,9 @@ export const zListPriorPeriodAdjustmentsQuery = z.object({
6917
7066
  * Success
6918
7067
  */
6919
7068
  export const zListPriorPeriodAdjustmentsResponse = z.object({
6920
- meta: zMeta.optional(),
6921
- links: zLinks.optional(),
6922
- data: z.array(zPriorPeriodAdjustmentResponseObject).optional()
7069
+ meta: zMeta,
7070
+ links: zLinks,
7071
+ data: z.array(zPriorPeriodAdjustmentResponseObject)
6923
7072
  });
6924
7073
  export const zGetPriorPeriodAdjustmentPath = z.object({
6925
7074
  time_card_id: z.string(),
@@ -7000,7 +7149,7 @@ export const zListTimeEntriesQuery = z.object({
7000
7149
  * Success
7001
7150
  */
7002
7151
  export const zListTimeEntriesResponse = zTimeEntryIndexObject;
7003
- export const zCreateTimeEntryBody = zTimeEntryParameters;
7152
+ export const zCreateTimeEntryBody = zTimeEntryCreateParameters;
7004
7153
  /**
7005
7154
  * Created
7006
7155
  */
@@ -7012,7 +7161,7 @@ export const zDeleteTimeEntryPath = z.object({
7012
7161
  * Success
7013
7162
  */
7014
7163
  export const zDeleteTimeEntryResponse = zTimeEntryResponseObject;
7015
- export const zUpdateTimeEntryBody = zTimeEntryParameters;
7164
+ export const zUpdateTimeEntryBody = zTimeEntryUpdateParameters;
7016
7165
  export const zUpdateTimeEntryPath = z.object({
7017
7166
  id: z.string()
7018
7167
  });
@@ -7042,9 +7191,9 @@ export const zListTimecodeHistoryQuery = z.object({
7042
7191
  * Success
7043
7192
  */
7044
7193
  export const zListTimecodeHistoryResponse = z.object({
7045
- meta: zMeta.optional(),
7046
- links: zLinks.optional(),
7047
- data: z.array(zTimecodeHistoryVersionObject).optional()
7194
+ meta: zMeta,
7195
+ links: zLinks,
7196
+ data: z.array(zTimecodeHistoryVersionObject)
7048
7197
  });
7049
7198
  export const zCancelTimecodeScheduledChangesHeaders = z.object({
7050
7199
  'If-Match': z.string()
@@ -7115,9 +7264,9 @@ export const zListTimecodesQuery = z.object({
7115
7264
  * Success
7116
7265
  */
7117
7266
  export const zListTimecodesResponse = z.object({
7118
- meta: zMeta.optional(),
7119
- links: zLinks.optional(),
7120
- data: z.array(zTimecodeResponseObject).optional()
7267
+ meta: zMeta,
7268
+ links: zLinks,
7269
+ data: z.array(zTimecodeResponseObject)
7121
7270
  });
7122
7271
  export const zCreateTimecodeBody = zTimecodeParameters;
7123
7272
  /**
@@ -7188,9 +7337,9 @@ export const zListAttestationConfigsPath = z.object({
7188
7337
  * Success
7189
7338
  */
7190
7339
  export const zListAttestationConfigsResponse = z.object({
7191
- meta: zMeta.optional(),
7192
- links: zLinks.optional(),
7193
- data: z.array(zAttestationConfigResponseObject).optional()
7340
+ meta: zMeta,
7341
+ links: zLinks,
7342
+ data: z.array(zAttestationConfigResponseObject)
7194
7343
  });
7195
7344
  export const zCreateAttestationConfigBody = zAttestationConfigParameters;
7196
7345
  export const zCreateAttestationConfigPath = z.object({
@@ -7226,9 +7375,9 @@ export const zListPayPeriodConfigHistoryQuery = z.object({
7226
7375
  * Success
7227
7376
  */
7228
7377
  export const zListPayPeriodConfigHistoryResponse = z.object({
7229
- meta: zMeta.optional(),
7230
- links: zLinks.optional(),
7231
- data: z.array(zPayPeriodConfigHistoryVersionObject).optional()
7378
+ meta: zMeta,
7379
+ links: zLinks,
7380
+ data: z.array(zPayPeriodConfigHistoryVersionObject)
7232
7381
  });
7233
7382
  export const zListHolidaysPath = z.object({
7234
7383
  pay_period_config_id: z.string()
@@ -7250,9 +7399,9 @@ export const zListHolidaysQuery = z.object({
7250
7399
  * Success
7251
7400
  */
7252
7401
  export const zListHolidaysResponse = z.object({
7253
- meta: zMeta.optional(),
7254
- links: zLinks.optional(),
7255
- data: z.array(zHolidayResponseObject).optional()
7402
+ meta: zMeta,
7403
+ links: zLinks,
7404
+ data: z.array(zHolidayResponseObject)
7256
7405
  });
7257
7406
  export const zCreateHolidayBody = zHolidayParameters;
7258
7407
  export const zCreateHolidayPath = z.object({
@@ -7293,9 +7442,9 @@ export const zListPayPeriodConfigsQuery = z.object({
7293
7442
  * Success
7294
7443
  */
7295
7444
  export const zListPayPeriodConfigsResponse = z.object({
7296
- meta: zMeta.optional(),
7297
- links: zLinks.optional(),
7298
- data: z.array(zPayPeriodConfigResponseObject).optional()
7445
+ meta: zMeta,
7446
+ links: zLinks,
7447
+ data: z.array(zPayPeriodConfigResponseObject)
7299
7448
  });
7300
7449
  export const zGetPayPeriodConfigPath = z.object({
7301
7450
  id: z.string()
@@ -7323,9 +7472,9 @@ export const zListTimeCardActualsQuery = z.object({
7323
7472
  * Success
7324
7473
  */
7325
7474
  export const zListTimeCardActualsResponse = z.object({
7326
- meta: zMeta.optional(),
7327
- links: zLinks.optional(),
7328
- data: z.array(zTimeCardActualsResponseObject).optional()
7475
+ meta: zMeta,
7476
+ links: zLinks,
7477
+ data: z.array(zTimeCardActualsResponseObject)
7329
7478
  });
7330
7479
  export const zGetTimeCardActualPath = z.object({
7331
7480
  id: z.string()
@@ -7347,9 +7496,9 @@ export const zListUserRolesQuery = z.object({
7347
7496
  * Success
7348
7497
  */
7349
7498
  export const zListUserRolesResponse = z.object({
7350
- meta: zMeta.optional(),
7351
- links: zLinks.optional(),
7352
- data: z.array(zUserRoleResponse).optional()
7499
+ meta: zMeta,
7500
+ links: zLinks,
7501
+ data: z.array(zUserRoleResponse)
7353
7502
  });
7354
7503
  export const zAddUserRolesBody = zUserRoleRequest;
7355
7504
  /**
@@ -7465,9 +7614,9 @@ export const zListUsersQuery = z.object({
7465
7614
  * Success
7466
7615
  */
7467
7616
  export const zListUsersResponse = z.object({
7468
- meta: zMeta.optional(),
7469
- links: zLinks.optional(),
7470
- data: z.array(zUserResponseObject).optional()
7617
+ meta: zMeta,
7618
+ links: zLinks,
7619
+ data: z.array(zUserResponseObject)
7471
7620
  });
7472
7621
  /**
7473
7622
  * Create a user
@@ -7538,7 +7687,7 @@ export const zListWorkTypesQuery = z.object({
7538
7687
  * Success
7539
7688
  */
7540
7689
  export const zListWorkTypesResponse = z.object({
7541
- meta: zMeta.optional(),
7542
- links: zLinks.optional(),
7543
- data: z.array(zWorkTypeResponseObject).optional()
7690
+ meta: zMeta,
7691
+ links: zLinks,
7692
+ data: z.array(zWorkTypeResponseObject)
7544
7693
  });