@dsptch-work/api-client 0.18.0 → 0.20.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.
@@ -8,7 +8,11 @@ export const zProblem = z.object({
8
8
  title: z.string(),
9
9
  status: z.int(),
10
10
  detail: z.string(),
11
- instance: z.url().optional()
11
+ instance: z.url().optional(),
12
+ errors: z.array(z.object({
13
+ detail: z.string(),
14
+ pointer: z.string().optional()
15
+ })).min(1).optional()
12
16
  });
13
17
  /**
14
18
  * Error types
@@ -585,6 +589,26 @@ export const zApprenticeshipApprenticeResponseObject = z.object({
585
589
  created_at: z.iso.datetime(),
586
590
  updated_at: z.iso.datetime()
587
591
  });
592
+ export const zApprenticeshipAllocationResponseObject = z.object({
593
+ id: z.string(),
594
+ apprenticeship_apprentice_id: z.string(),
595
+ apprenticeship_work_process_category_id: z.string().nullable(),
596
+ allocated_by_user_id: z.string(),
597
+ timekeeping_time_card_id: z.string().nullable(),
598
+ minutes: z.int(),
599
+ description: z.string().nullable(),
600
+ allocated_at: z.iso.datetime(),
601
+ cumulative_minutes: z.int(),
602
+ apprenticeship_wage_schedule_period_id: z.string(),
603
+ created_at: z.iso.datetime(),
604
+ updated_at: z.iso.datetime()
605
+ });
606
+ /**
607
+ * Correct the effective timestamp of an existing standalone allocation. Time-card-linked allocations cannot be date-corrected. A changed timestamp rebuilds progression and requests historical wage repricing in the background, including locked time cards.
608
+ */
609
+ export const zApprenticeshipAllocationUpdateParameters = z.object({
610
+ allocated_at: z.iso.datetime().optional()
611
+ });
588
612
  /**
589
613
  * Enroll a user as an apprentice under an employer in a program; the employing program-employer record is derived from the enrolling company and the program in the URL path. Apprentices cannot be updated through the API, only created.
590
614
  */
@@ -608,7 +632,7 @@ export const zApprenticeshipApprenticeParameters = z.object({
608
632
  operative_end_date: z.iso.date().nullish()
609
633
  });
610
634
  /**
611
- * Create or update an apprenticeship program sponsored by your company; the sponsor is always your company and is never taken from the request body.
635
+ * Create an apprenticeship program sponsored by your company; the sponsor is always your company and is never taken from the request body.
612
636
  */
613
637
  export const zApprenticeshipProgramParameters = z.object({
614
638
  program_number: z.string(),
@@ -618,7 +642,17 @@ export const zApprenticeshipProgramParameters = z.object({
618
642
  registration_agency_type: z.enum(['federal', 'regional']).nullish()
619
643
  });
620
644
  /**
621
- * Create or update an occupation (trade) within a sponsored program; the program is taken from the URL path.
645
+ * Update an apprenticeship program sponsored by your company. Send only the fields to change; the sponsor is fixed to your company.
646
+ */
647
+ export const zApprenticeshipProgramUpdateParameters = z.object({
648
+ program_number: z.string().optional(),
649
+ program_name: z.string().nullish(),
650
+ sponsor_name: z.string().nullish(),
651
+ doing_business_as: z.string().nullish(),
652
+ registration_agency_type: z.enum(['federal', 'regional']).nullish()
653
+ });
654
+ /**
655
+ * Create an occupation (trade) within a sponsored program; the program is taken from the URL path.
622
656
  */
623
657
  export const zApprenticeshipOccupationParameters = z.object({
624
658
  rapids_code: z.string(),
@@ -636,14 +670,39 @@ export const zApprenticeshipOccupationParameters = z.object({
636
670
  num_journeyworkers: z.int()
637
671
  });
638
672
  /**
639
- * Authorize an employer to employ apprentices in a program; only the program's sponsor may manage this roster.
673
+ * Update an occupation (trade) within a sponsored program. Send only the fields to change; the program is taken from the URL path.
674
+ */
675
+ export const zApprenticeshipOccupationUpdateParameters = z.object({
676
+ rapids_code: z.string().optional(),
677
+ occupation_type: z.enum([
678
+ 'time_based',
679
+ 'competency_based',
680
+ 'hybrid'
681
+ ]).optional(),
682
+ title: z.string().optional(),
683
+ description: z.string().nullish(),
684
+ min_minutes: z.int().optional(),
685
+ max_minutes: z.int().optional(),
686
+ probation_minutes: z.int().optional(),
687
+ num_apprentices: z.int().optional(),
688
+ num_journeyworkers: z.int().optional()
689
+ });
690
+ /**
691
+ * Create an authorization for an employer to employ apprentices in a program; only the program's sponsor may manage this roster.
640
692
  */
641
693
  export const zApprenticeshipProgramEmployerParameters = z.object({
642
694
  company_id: z.string(),
643
695
  require_timecard_allocation: z.boolean().optional()
644
696
  });
645
697
  /**
646
- * Create or update a period on a wage schedule; the wage schedule is taken from the URL path. wage_cents is sent as integer cents.
698
+ * Update an employer authorization in a program. Send only the fields to change; only the program's sponsor may manage this roster.
699
+ */
700
+ export const zApprenticeshipProgramEmployerUpdateParameters = z.object({
701
+ company_id: z.string().optional(),
702
+ require_timecard_allocation: z.boolean().optional()
703
+ });
704
+ /**
705
+ * Create a period on a wage schedule; the wage schedule is taken from the URL path. wage_cents is sent as integer cents.
647
706
  */
648
707
  export const zApprenticeshipWageSchedulePeriodParameters = z.object({
649
708
  period_number: z.int(),
@@ -655,7 +714,19 @@ export const zApprenticeshipWageSchedulePeriodParameters = z.object({
655
714
  wage_cents: z.int()
656
715
  });
657
716
  /**
658
- * Create or update a wage schedule for an occupation; the occupation is taken from the URL path. Money is sent as integer cents; periods may be created, updated, or removed inline via periods_attributes.
717
+ * Update a period on a wage schedule. Send only the fields to change; the wage schedule is taken from the URL path and wage_cents is sent as integer cents.
718
+ */
719
+ export const zApprenticeshipWageSchedulePeriodUpdateParameters = z.object({
720
+ period_number: z.int().optional(),
721
+ min_minutes: z.int().nullish(),
722
+ max_minutes: z.int().nullish(),
723
+ num_competencies: z.int().nullish(),
724
+ description: z.string().nullish(),
725
+ wage_percent: z.number().optional(),
726
+ wage_cents: z.int().optional()
727
+ });
728
+ /**
729
+ * Create a wage schedule for an occupation; the occupation is taken from the URL path. Money is sent as integer cents; periods may be created inline via periods_attributes.
659
730
  */
660
731
  export const zApprenticeshipWageScheduleParameters = z.object({
661
732
  name: z.string(),
@@ -698,6 +769,66 @@ export const zApprenticeshipWageScheduleParameters = z.object({
698
769
  _destroy: z.boolean().optional()
699
770
  })).optional()
700
771
  });
772
+ /**
773
+ * Update a wage schedule for an occupation. Send only the fields to change; money is sent as integer cents and periods may be created, updated, or removed inline via periods_attributes.
774
+ */
775
+ export const zApprenticeshipWageScheduleUpdateParameters = z.object({
776
+ name: z.string().optional(),
777
+ description: z.string().nullish(),
778
+ wage_unit: z.enum([
779
+ 'hourly',
780
+ 'weekly',
781
+ 'monthly',
782
+ 'quarterly',
783
+ 'semi_annually',
784
+ 'annually'
785
+ ]).optional(),
786
+ journeyworker_wage_unit: z.enum([
787
+ 'hourly',
788
+ 'weekly',
789
+ 'monthly',
790
+ 'quarterly',
791
+ 'semi_annually',
792
+ 'annually'
793
+ ]).optional(),
794
+ period_unit: z.enum([
795
+ 'hours',
796
+ 'weeks',
797
+ 'months',
798
+ 'quarter',
799
+ 'semi_annual',
800
+ 'year'
801
+ ]).optional(),
802
+ journeyworker_wage_cents: z.int().optional(),
803
+ end_wage_cents: z.int().optional(),
804
+ periods_attributes: z.array(z.intersection(z.union([
805
+ z.unknown(),
806
+ z.union([
807
+ z.object({
808
+ min_minutes: z.int()
809
+ }),
810
+ z.object({
811
+ max_minutes: z.int()
812
+ }),
813
+ z.object({
814
+ num_competencies: z.int()
815
+ })
816
+ ]),
817
+ z.object({
818
+ _destroy: z.literal(true)
819
+ })
820
+ ]), z.object({
821
+ id: z.string().optional(),
822
+ period_number: z.int().optional(),
823
+ min_minutes: z.int().nullish(),
824
+ max_minutes: z.int().nullish(),
825
+ num_competencies: z.int().nullish(),
826
+ description: z.string().nullish(),
827
+ wage_percent: z.number().optional(),
828
+ wage_cents: z.int().optional(),
829
+ _destroy: z.boolean().optional()
830
+ }))).optional()
831
+ });
701
832
  /**
702
833
  * A work-type classification that determines how tracked time is treated — paid vs unpaid, overtime-eligible, billable, PWA/prevailing-wage-eligible, holiday, PTO, or rest-and-recovery — versioned bitemporally so each version carries its own validity window.
703
834
  */
@@ -731,6 +862,102 @@ export const zTimecodeResponseObject = z.object({
731
862
  created_at: z.iso.datetime(),
732
863
  updated_at: z.iso.datetime()
733
864
  });
865
+ /**
866
+ * An employment stint in the credential company. Its id is stable across valid-time versions; a rehire is a separate stint with a new id. A read returns only a version covering now or as_of[valid].
867
+ */
868
+ export const zPeopleEmploymentResponseObject = z.object({
869
+ id: z.string(),
870
+ user_id: z.string(),
871
+ company_id: z.string(),
872
+ type: z.enum(['EMPLOYEE', 'CONTRACTOR']),
873
+ title: z.string().nullable(),
874
+ compensation_type: z.enum(['hourly', 'salary']),
875
+ payroll_id: z.string().nullable(),
876
+ manager_user_id: z.string().nullable(),
877
+ companies_department_id: z.string().nullable(),
878
+ enrolled_in_t_and_a: z.boolean(),
879
+ overtime_eligible: z.boolean().nullable(),
880
+ overtime_package_id: z.string().nullable(),
881
+ pay_rates_rule_package_id: z.string().nullable(),
882
+ pay_rates_package_id: z.string().nullable(),
883
+ worked_annual_minutes: z.int().nullable(),
884
+ pto_annual_minutes: z.int().nullable(),
885
+ holiday_annual_minutes: z.int().nullable(),
886
+ training_annual_minutes: z.int().nullable(),
887
+ hourly_rate_cents: z.string().nullable(),
888
+ training_annual_amount_cents: z.string().nullable(),
889
+ employer_combined_health_amount_cents: z.string().nullable(),
890
+ employer_combined_savings_cents: z.string().nullable(),
891
+ currency: z.string(),
892
+ valid_from: z.iso.datetime().nullable(),
893
+ valid_to: z.iso.datetime().nullable(),
894
+ created_at: z.iso.datetime(),
895
+ updated_at: z.iso.datetime()
896
+ });
897
+ export const zPeopleEmploymentHistoryCorrectionObject = z.object({
898
+ people_employment_id: z.string(),
899
+ user_id: z.string(),
900
+ company_id: z.string(),
901
+ type: z.enum(['EMPLOYEE', 'CONTRACTOR']),
902
+ title: z.string().nullable(),
903
+ compensation_type: z.enum(['hourly', 'salary']),
904
+ payroll_id: z.string().nullable(),
905
+ manager_user_id: z.string().nullable(),
906
+ companies_department_id: z.string().nullable(),
907
+ enrolled_in_t_and_a: z.boolean(),
908
+ overtime_eligible: z.boolean().nullable(),
909
+ overtime_package_id: z.string().nullable(),
910
+ pay_rates_rule_package_id: z.string().nullable(),
911
+ pay_rates_package_id: z.string().nullable(),
912
+ worked_annual_minutes: z.int().nullable(),
913
+ pto_annual_minutes: z.int().nullable(),
914
+ holiday_annual_minutes: z.int().nullable(),
915
+ training_annual_minutes: z.int().nullable(),
916
+ hourly_rate_cents: z.string().nullable(),
917
+ training_annual_amount_cents: z.string().nullable(),
918
+ employer_combined_health_amount_cents: z.string().nullable(),
919
+ employer_combined_savings_cents: z.string().nullable(),
920
+ currency: z.string(),
921
+ valid_from: z.iso.datetime().nullable(),
922
+ valid_to: z.iso.datetime().nullable(),
923
+ created_at: z.iso.datetime(),
924
+ updated_at: z.iso.datetime()
925
+ });
926
+ export const zPeopleEmploymentHistoryVersionObject = z.object({
927
+ people_employment_id: z.string(),
928
+ user_id: z.string(),
929
+ company_id: z.string(),
930
+ type: z.enum(['EMPLOYEE', 'CONTRACTOR']),
931
+ title: z.string().nullable(),
932
+ compensation_type: z.enum(['hourly', 'salary']),
933
+ payroll_id: z.string().nullable(),
934
+ manager_user_id: z.string().nullable(),
935
+ companies_department_id: z.string().nullable(),
936
+ enrolled_in_t_and_a: z.boolean(),
937
+ overtime_eligible: z.boolean().nullable(),
938
+ overtime_package_id: z.string().nullable(),
939
+ pay_rates_rule_package_id: z.string().nullable(),
940
+ pay_rates_package_id: z.string().nullable(),
941
+ worked_annual_minutes: z.int().nullable(),
942
+ pto_annual_minutes: z.int().nullable(),
943
+ holiday_annual_minutes: z.int().nullable(),
944
+ training_annual_minutes: z.int().nullable(),
945
+ hourly_rate_cents: z.string().nullable(),
946
+ training_annual_amount_cents: z.string().nullable(),
947
+ employer_combined_health_amount_cents: z.string().nullable(),
948
+ employer_combined_savings_cents: z.string().nullable(),
949
+ currency: z.string(),
950
+ valid_from: z.iso.datetime().nullable(),
951
+ valid_to: z.iso.datetime().nullable(),
952
+ created_at: z.iso.datetime(),
953
+ updated_at: z.iso.datetime(),
954
+ version_status: z.enum([
955
+ 'scheduled',
956
+ 'current',
957
+ 'historical'
958
+ ]),
959
+ corrections: z.array(zPeopleEmploymentHistoryCorrectionObject)
960
+ });
734
961
  export const zTimecodeHistoryCorrectionObject = z.object({
735
962
  timekeeping_timecode_id: z.string(),
736
963
  name: z.string(),
@@ -801,7 +1028,7 @@ export const zTimecodeHistoryVersionObject = z.object({
801
1028
  * 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.
802
1029
  */
803
1030
  export const zTimecodeParameters = z.object({
804
- name: z.string(),
1031
+ name: z.string().min(1),
805
1032
  description: z.string().nullish(),
806
1033
  description_is_required: z.boolean().optional(),
807
1034
  billable: z.boolean().optional(),
@@ -823,10 +1050,13 @@ export const zTimecodeParameters = z.object({
823
1050
  ]).optional(),
824
1051
  effective_date: z.iso.datetime().optional()
825
1052
  });
1053
+ /**
1054
+ * Request body for correcting a timecode over a valid-time span. Send only the fields to change; omitted fields retain their current values. `effective_from` defaults to the addressed version's start, and `effective_to` is optional.
1055
+ */
826
1056
  export const zTimecodeCorrectionParameters = z.object({
827
1057
  effective_from: z.iso.datetime().optional(),
828
1058
  effective_to: z.iso.datetime().optional(),
829
- name: z.string(),
1059
+ name: z.string().min(1).optional(),
830
1060
  description: z.string().nullish(),
831
1061
  description_is_required: z.boolean().optional(),
832
1062
  billable: z.boolean().optional(),
@@ -847,6 +1077,9 @@ export const zTimecodeCorrectionParameters = z.object({
847
1077
  'job_with_timecode'
848
1078
  ]).optional()
849
1079
  });
1080
+ /**
1081
+ * Request body for moving the beginning of a timecode's valid-time timeline. Moving it earlier extends coverage; moving it later removes coverage before the new beginning.
1082
+ */
850
1083
  export const zTimecodeGenesisParameters = z.object({
851
1084
  effective_date: z.iso.datetime()
852
1085
  });
@@ -900,7 +1133,7 @@ export const zPerDiemResponseObject = z.object({
900
1133
  updated_at: z.iso.datetime()
901
1134
  });
902
1135
  /**
903
- * Fields for creating or updating a per diem.
1136
+ * Request body for creating a per diem. name, currency, and rate_cents are required.
904
1137
  */
905
1138
  export const zPerDiemParameters = z.object({
906
1139
  name: z.string(),
@@ -913,6 +1146,20 @@ export const zPerDiemParameters = z.object({
913
1146
  work_type_ids: z.array(z.string()).optional(),
914
1147
  timekeeping_timecode_ids: z.array(z.string()).optional()
915
1148
  });
1149
+ /**
1150
+ * Request body for updating a per diem. Send only the fields to change.
1151
+ */
1152
+ export const zPerDiemUpdateParameters = z.object({
1153
+ name: z.string().optional(),
1154
+ description: z.string().nullish(),
1155
+ rate_cents: z.string().optional(),
1156
+ currency: z.string().optional(),
1157
+ taxable: z.boolean().optional(),
1158
+ default: z.boolean().nullish(),
1159
+ active: z.boolean().nullish(),
1160
+ work_type_ids: z.array(z.string()).optional(),
1161
+ timekeeping_timecode_ids: z.array(z.string()).optional()
1162
+ });
916
1163
  /**
917
1164
  * The product's filled attribute values — one entry per attribute assigned to its category.
918
1165
  */
@@ -947,7 +1194,7 @@ export const zAssetsAttributeResponseObject = z.object({
947
1194
  * Create or update an attribute definition. Options apply only to a select attribute and are ignored otherwise; data_type cannot be changed once any value has been filled.
948
1195
  */
949
1196
  export const zAssetsAttributeParameters = z.object({
950
- name: z.string(),
1197
+ name: z.string().min(1),
951
1198
  data_type: z.enum([
952
1199
  'text',
953
1200
  'number',
@@ -962,6 +1209,25 @@ export const zAssetsAttributeParameters = z.object({
962
1209
  _destroy: z.boolean().optional()
963
1210
  })).optional()
964
1211
  });
1212
+ /**
1213
+ * Update an attribute definition. All fields are optional — send only what changes. Options apply only to a select attribute and are ignored otherwise; data_type cannot be changed once any value has been filled.
1214
+ */
1215
+ export const zAssetsAttributeUpdateParameters = z.object({
1216
+ name: z.string().min(1).optional(),
1217
+ data_type: z.enum([
1218
+ 'text',
1219
+ 'number',
1220
+ 'date',
1221
+ 'boolean',
1222
+ 'select'
1223
+ ]).optional(),
1224
+ options: z.array(z.object({
1225
+ id: z.string().optional(),
1226
+ value: z.string().optional(),
1227
+ position: z.int().optional(),
1228
+ _destroy: z.boolean().optional()
1229
+ })).optional()
1230
+ });
965
1231
  /**
966
1232
  * A node in the company's asset category tree. Categories classify products and, through their attribute assignments, set which custom fields those products and items carry.
967
1233
  */
@@ -985,7 +1251,22 @@ export const zAssetsCategoryResponseObject = z.object({
985
1251
  * Create or update a category; only name is required. `category_attributes` sets this category's direct attribute assignments.
986
1252
  */
987
1253
  export const zAssetsCategoryParameters = z.object({
988
- name: z.string(),
1254
+ name: z.string().min(1),
1255
+ parent_id: z.string().nullish(),
1256
+ category_attributes: z.array(z.object({
1257
+ id: z.string().optional(),
1258
+ assets_attribute_id: z.string(),
1259
+ fillable_on: z.enum(['product', 'item']),
1260
+ required: z.boolean().optional(),
1261
+ position: z.int().optional(),
1262
+ _destroy: z.boolean().optional()
1263
+ })).optional()
1264
+ });
1265
+ /**
1266
+ * Update a category. All fields are optional — send only what changes. `category_attributes` sets this category's direct attribute assignments.
1267
+ */
1268
+ export const zAssetsCategoryUpdateParameters = z.object({
1269
+ name: z.string().min(1).optional(),
989
1270
  parent_id: z.string().nullish(),
990
1271
  category_attributes: z.array(z.object({
991
1272
  id: z.string().optional(),
@@ -1008,10 +1289,17 @@ export const zDepartmentResponseObject = z.object({
1008
1289
  updated_at: z.iso.datetime()
1009
1290
  });
1010
1291
  /**
1011
- * Request body for creating or updating a department.
1292
+ * Request body for creating a department.
1012
1293
  */
1013
1294
  export const zDepartmentParameters = z.object({
1014
- name: z.string(),
1295
+ name: z.string().min(1),
1296
+ description: z.string().nullish()
1297
+ });
1298
+ /**
1299
+ * Request body for updating a department. Send only the fields to change.
1300
+ */
1301
+ export const zDepartmentUpdateParameters = z.object({
1302
+ name: z.string().min(1).optional(),
1015
1303
  description: z.string().nullish()
1016
1304
  });
1017
1305
  /**
@@ -1030,12 +1318,20 @@ export const zTimeCardPerDiemResponseObject = z.object({
1030
1318
  updated_at: z.iso.datetime()
1031
1319
  });
1032
1320
  /**
1033
- * Request body for recording or updating a per diem on a time card. The time card is taken from the URL path; the rate, currency, and taxable flag are copied from the referenced catalog per diem, not this body.
1321
+ * Request body for recording a per diem on a time card. The time card is taken from the URL path; the rate, currency, and taxable flag are copied from the referenced catalog per diem when one is supplied, not this body.
1034
1322
  */
1035
1323
  export const zTimeCardPerDiemParameters = z.object({
1036
1324
  date: z.iso.date(),
1037
1325
  approver_user_id: z.string(),
1038
- per_diem_id: z.string()
1326
+ per_diem_id: z.string().optional()
1327
+ });
1328
+ /**
1329
+ * Request body for updating a per diem recorded on a time card. Send only the fields to change; the time card comes from the URL path.
1330
+ */
1331
+ export const zTimeCardPerDiemUpdateParameters = z.object({
1332
+ date: z.iso.date().optional(),
1333
+ approver_user_id: z.string().optional(),
1334
+ per_diem_id: z.string().optional()
1039
1335
  });
1040
1336
  /**
1041
1337
  * A holiday on a pay schedule's holiday calendar — a fixed (month + day) or floating (nth weekday of a month) date that gets holiday-pay treatment when a time entry's timecode opts into holiday handling.
@@ -1200,7 +1496,7 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1200
1496
  corrections: z.array(zPayPeriodConfigHistoryCorrectionObject)
1201
1497
  });
1202
1498
  /**
1203
- * 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).
1499
+ * Create 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.
1204
1500
  */
1205
1501
  export const zHolidayParameters = z.object({
1206
1502
  name: z.string(),
@@ -1216,6 +1512,23 @@ export const zHolidayParameters = z.object({
1216
1512
  banking: z.boolean().optional(),
1217
1513
  count_hours_for_overtime: z.boolean().optional()
1218
1514
  });
1515
+ /**
1516
+ * Update a holiday on a pay schedule. Send only the fields to change; the resulting fixed or floating definition must remain complete.
1517
+ */
1518
+ export const zHolidayUpdateParameters = z.object({
1519
+ name: z.string().optional(),
1520
+ date: z.iso.date().optional(),
1521
+ holiday_type: z.enum(['fixed', 'floating']).optional(),
1522
+ month: z.int().optional(),
1523
+ mday: z.int().optional(),
1524
+ wday: z.int().optional(),
1525
+ week: z.int().optional(),
1526
+ year: z.int().optional(),
1527
+ move_to_weekday: z.boolean().optional(),
1528
+ overtime: z.boolean().optional(),
1529
+ banking: z.boolean().optional(),
1530
+ count_hours_for_overtime: z.boolean().optional()
1531
+ });
1219
1532
  /**
1220
1533
  * Prevailing-wage / apprenticeship (PWA) compliance details for a worker at a company — home address, demographics, and jurisdiction-specific fields used in certified-payroll and compliance exports. One record per company/user pair.
1221
1534
  */
@@ -1312,10 +1625,9 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
1312
1625
  ])).nullable()
1313
1626
  });
1314
1627
  /**
1315
- * Create or update a worker's PWA compliance details at a company. company_id and user_id identify the pair and are required on create; every other field is optional — send whichever your jurisdiction's certified-payroll export requires. On update, omitted fields are left unchanged.
1628
+ * Create a worker's PWA compliance details at a company. The company is taken from the API key. user_id names the worker and is required; every other field is optional — send whichever your jurisdiction's certified-payroll export requires. Only the keys listed here are accepted — any other key is rejected with 400 unknown_key.
1316
1629
  */
1317
1630
  export const zPwaCompanyUserDetailsParameters = z.object({
1318
- company_id: z.string(),
1319
1631
  user_id: z.string(),
1320
1632
  address1: z.string().nullish(),
1321
1633
  address2: z.string().nullish(),
@@ -1405,6 +1717,98 @@ export const zPwaCompanyUserDetailsParameters = z.object({
1405
1717
  'portuguese_or_brazilian'
1406
1718
  ])).nullish()
1407
1719
  });
1720
+ /**
1721
+ * Update a worker's PWA compliance details. The company is taken from the API key. Every field is optional — send only what changes, and omitted fields are left unchanged. user_id is absent by design — the company/user pair is fixed at creation, so sending the key is rejected with 400 unknown_key, as is any other key not listed here.
1722
+ */
1723
+ export const zPwaCompanyUserDetailsUpdateParameters = z.object({
1724
+ address1: z.string().nullish(),
1725
+ address2: z.string().nullish(),
1726
+ city: z.string().nullish(),
1727
+ state: z.string().nullish(),
1728
+ zip: z.string().nullish(),
1729
+ race: z.array(z.enum([
1730
+ 'AFRICAN_AMERICAN',
1731
+ 'ASIAN',
1732
+ 'CAUCASIAN',
1733
+ 'NATIVE_AMERICAN',
1734
+ 'NOT_SPECIFIED',
1735
+ 'OTHER'
1736
+ ])).nullish(),
1737
+ sex: z.enum([
1738
+ 'female',
1739
+ 'male',
1740
+ 'non_binary',
1741
+ 'not_specified'
1742
+ ]).nullish(),
1743
+ local_business_license: z.string().nullish(),
1744
+ drivers_license_state: z.string().nullish(),
1745
+ drivers_license_number: z.string().nullish(),
1746
+ ssn: z.string().nullish(),
1747
+ veteran_status: z.enum([
1748
+ 'protected_veteran',
1749
+ 'not_protected_veteran',
1750
+ 'reserves',
1751
+ 'guard',
1752
+ 'not_specified'
1753
+ ]).nullish(),
1754
+ hispanic_origin: z.enum([
1755
+ 'yes',
1756
+ 'no',
1757
+ 'not_specified'
1758
+ ]).nullish(),
1759
+ ca_dir_withholding_exemptions: z.int().nullish(),
1760
+ disabled: z.boolean().optional(),
1761
+ il_dol_race: z.enum([
1762
+ 'white',
1763
+ 'black',
1764
+ 'hispanic_or_latino',
1765
+ 'american_indian_or_alaska_native',
1766
+ 'chinese',
1767
+ 'filipino',
1768
+ 'asian_india',
1769
+ 'vietnamese',
1770
+ 'korean',
1771
+ 'japanese',
1772
+ 'native_hawaiian',
1773
+ 'samoan',
1774
+ 'chamorro',
1775
+ 'other_asian',
1776
+ 'other_pacific_islander',
1777
+ 'other'
1778
+ ]).nullish(),
1779
+ il_shines_employment_type: z.enum([
1780
+ 'part_time',
1781
+ 'full_time',
1782
+ 'seasonal_temporary',
1783
+ 'independent_contract'
1784
+ ]).nullish(),
1785
+ il_shines_eep_qualifiers: z.array(z.enum([
1786
+ 'eep_program_completed',
1787
+ 'foster_care',
1788
+ 'formerly_incarcerated',
1789
+ 'equity_investment_eligible_community',
1790
+ 'self_registered_or_unknown'
1791
+ ])).nullish(),
1792
+ il_shines_other_programs: z.array(z.enum([
1793
+ 'solar_training_pipeline_program',
1794
+ 'craft_apprenticeship_program',
1795
+ 'multi_cultural_jobs_program',
1796
+ 'clean_jobs_workforce_network_program',
1797
+ 'illinois_climate_works_prep_apprenticeship_program',
1798
+ 'returning_residents_clean_jobs_training_program',
1799
+ 'other'
1800
+ ])).nullish(),
1801
+ or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullish(),
1802
+ or_boli_race: z.array(z.enum([
1803
+ 'american_indian_or_alaska_native',
1804
+ 'asian',
1805
+ 'hispanic_or_latino',
1806
+ 'black_or_african_american',
1807
+ 'native_hawaiian_or_pacific_islander',
1808
+ 'white',
1809
+ 'portuguese_or_brazilian'
1810
+ ])).nullish()
1811
+ });
1408
1812
  /**
1409
1813
  * A craft grouping used for prevailing-wage / apprenticeship (PWA) compliance — the unit an apprenticeship ratio is measured against. Owned by either a project (pooling the craft across the project's jobs) or a standalone job, never both.
1410
1814
  */
@@ -1498,11 +1902,17 @@ export const zGroupResponseObject = z.object({
1498
1902
  updated_at: z.iso.datetime()
1499
1903
  });
1500
1904
  /**
1501
- * Request body for creating or updating a group.
1905
+ * Request body for creating a group.
1502
1906
  */
1503
1907
  export const zGroupParameters = z.object({
1504
1908
  name: z.string()
1505
1909
  });
1910
+ /**
1911
+ * Request body for updating a group. Send only the fields to change.
1912
+ */
1913
+ export const zGroupUpdateParameters = z.object({
1914
+ name: z.string().optional()
1915
+ });
1506
1916
  /**
1507
1917
  * Request body for updating a worker's profile. Limited to person-level identity fields; employment, roles, and compliance are managed through onboarding (create) and the user-company endpoints.
1508
1918
  */
@@ -1668,11 +2078,18 @@ export const zPositionFunctionResponseObject = z.object({
1668
2078
  updated_at: z.iso.datetime()
1669
2079
  });
1670
2080
  /**
1671
- * Request body for creating or updating a position function.
2081
+ * Request body for creating a position function.
1672
2082
  */
1673
2083
  export const zPositionFunctionParameters = z.object({
1674
- value: z.string(),
1675
- description: z.string()
2084
+ value: z.string().min(1),
2085
+ description: z.string().min(1)
2086
+ });
2087
+ /**
2088
+ * Request body for updating a position function. Send only the fields to change.
2089
+ */
2090
+ export const zPositionFunctionUpdateParameters = z.object({
2091
+ value: z.string().min(1).optional(),
2092
+ description: z.string().min(1).optional()
1676
2093
  });
1677
2094
  export const zCompanyResponseObject = z.object({
1678
2095
  id: z.string(),
@@ -1853,7 +2270,7 @@ export const zCustomFieldConfigsResponseObject = z.object({
1853
2270
  updated_at: z.iso.datetime()
1854
2271
  });
1855
2272
  /**
1856
- * Request body for creating or updating a custom field definition.
2273
+ * Request body for creating a custom field definition. `name` and `model_type` are required.
1857
2274
  */
1858
2275
  export const zCustomFieldConfigParameters = z.object({
1859
2276
  name: z.string(),
@@ -1866,6 +2283,20 @@ export const zCustomFieldConfigParameters = z.object({
1866
2283
  ]),
1867
2284
  visible: z.boolean().optional()
1868
2285
  });
2286
+ /**
2287
+ * Request body for updating a custom field definition. Every field is optional; omit a field to preserve its current value. The resulting definition's name must remain unique for its company and model type.
2288
+ */
2289
+ export const zCustomFieldConfigUpdateParameters = z.object({
2290
+ name: z.string().optional(),
2291
+ description: z.string().nullish(),
2292
+ model_type: z.enum([
2293
+ 'apprenticeship_apprentice',
2294
+ 'company',
2295
+ 'job',
2296
+ 'user_company'
2297
+ ]).optional(),
2298
+ visible: z.boolean().optional()
2299
+ });
1869
2300
  /**
1870
2301
  * A user's membership in a group.
1871
2302
  */
@@ -1892,14 +2323,14 @@ export const zTimeCardStartDay = z.union([
1892
2323
  z.literal(6)
1893
2324
  ]);
1894
2325
  /**
1895
- * Parameters for creating a job. Sets the job's schedule, work types, address, and optional Prevailing Wage / Apprenticeship (PWA) compliance. Extra keys are accepted, including custom fields.
2326
+ * Fields shared by job creation and updates. Updates may omit any field to preserve its current value. The resulting job must still satisfy its schedule and PWA validation rules. Extra keys are accepted, including custom fields.
1896
2327
  */
1897
2328
  export const zJobParameters = z.object({
1898
2329
  template_id: z.string().nullish(),
1899
2330
  name: z.string().nullish(),
1900
2331
  description: z.string().optional(),
1901
- requested_by_company_id: z.string(),
1902
- created_by_user_id: z.string(),
2332
+ requested_by_company_id: z.string().optional(),
2333
+ created_by_user_id: z.string().optional(),
1903
2334
  manager_user_ids: z.array(z.string()).nullish(),
1904
2335
  purchase_order_number: z.string().nullish(),
1905
2336
  project_id: z.string().nullish(),
@@ -1978,7 +2409,11 @@ export const zJobParameters = z.object({
1978
2409
  }).optional()
1979
2410
  });
1980
2411
  /**
1981
- * Parameters for updating an existing job. Accepts every job_parameters field, plus a directly settable status.
2412
+ * Parameters for creating a job. `requested_by_company_id` and `created_by_user_id` are required. Sets the job's schedule, work types, address, and optional Prevailing Wage / Apprenticeship (PWA) compliance.
2413
+ */
2414
+ export const zJobCreateParameters = zJobParameters.and(z.record(z.string(), z.unknown()));
2415
+ /**
2416
+ * Parameters for updating an existing job. Every field is optional; omit a field to preserve its current value. The resulting job must still satisfy schedule and PWA validation rules. Accepts every shared job field plus a directly settable status.
1982
2417
  */
1983
2418
  export const zJobUpdateParameters = zJobParameters.and(z.object({
1984
2419
  status: z.enum([
@@ -2404,7 +2839,7 @@ export const zPayrollFringeBenefitPlanResponseObject = z.object({
2404
2839
  updated_at: z.iso.datetime()
2405
2840
  });
2406
2841
  /**
2407
- * Request body for creating or updating a fringe-benefit plan. timekeeping_pay_period_config_id, name, plan_number, and benefit_category are required.
2842
+ * Request body for creating a fringe-benefit plan. timekeeping_pay_period_config_id, name, plan_number, and benefit_category are required.
2408
2843
  */
2409
2844
  export const zPayrollFringeBenefitPlanParameters = z.object({
2410
2845
  timekeeping_pay_period_config_id: z.string(),
@@ -2428,6 +2863,31 @@ export const zPayrollFringeBenefitPlanParameters = z.object({
2428
2863
  il_sponsor_name: z.string().nullish(),
2429
2864
  il_admin_name: z.string().nullish()
2430
2865
  });
2866
+ /**
2867
+ * Request body for updating a fringe-benefit plan. Send only the fields to change.
2868
+ */
2869
+ export const zPayrollFringeBenefitPlanUpdateParameters = z.object({
2870
+ timekeeping_pay_period_config_id: z.string().optional(),
2871
+ name: z.string().optional(),
2872
+ plan_number: z.string().optional(),
2873
+ funded: z.boolean().optional(),
2874
+ benefit_category: z.enum([
2875
+ 'employer_combined_health',
2876
+ 'employer_combined_savings',
2877
+ 'employer_combined_holiday_pto',
2878
+ 'employer_training',
2879
+ 'employer_other_contributions'
2880
+ ]).optional(),
2881
+ il_jointly_managed: z.boolean().optional(),
2882
+ il_fund_name: z.string().nullish(),
2883
+ il_fund_address1: z.string().nullish(),
2884
+ il_fund_address2: z.string().nullish(),
2885
+ il_fund_city: z.string().nullish(),
2886
+ il_fund_state: z.string().nullish(),
2887
+ il_fund_zip: z.string().nullish(),
2888
+ il_sponsor_name: z.string().nullish(),
2889
+ il_admin_name: z.string().nullish()
2890
+ });
2431
2891
  /**
2432
2892
  * A mapping from an external payroll or benefits system's field name to a DSPTCH compensation element, so imported paystub line items can be normalized. Bitemporal and read-only; a null pay schedule means the map is global (shared across companies).
2433
2893
  */
@@ -2552,7 +3012,7 @@ export const zPayrollRunResponseObject = z.object({
2552
3012
  updated_at: z.iso.datetime()
2553
3013
  });
2554
3014
  /**
2555
- * Request body for creating or updating a payroll run. company_id, run_type, and run_date are required; an on-cycle run additionally requires timekeeping_pay_period_id.
3015
+ * Create a payroll run. company_id, run_type, and run_date are required; an on-cycle run additionally requires timekeeping_pay_period_id. Only the keys listed here are accepted — any other key is rejected with 400 unknown_key.
2556
3016
  */
2557
3017
  export const zPayrollRunParameters = z.object({
2558
3018
  company_id: z.string(),
@@ -2569,6 +3029,23 @@ export const zPayrollRunParameters = z.object({
2569
3029
  run_date: z.iso.date(),
2570
3030
  external_id: z.string().nullish()
2571
3031
  });
3032
+ /**
3033
+ * Update a payroll run. Every field is optional — send only what changes. company_id is absent by design — the run's company is fixed at creation, so sending the key is rejected with 400 unknown_key, as is any other key not listed here.
3034
+ */
3035
+ export const zPayrollRunUpdateParameters = z.object({
3036
+ timekeeping_pay_period_id: z.string().nullish(),
3037
+ payrolls_credential_id: z.string().nullish(),
3038
+ run_type: z.enum([
3039
+ 'CORRECTION',
3040
+ 'ON_CYCLE',
3041
+ 'OFF_CYCLE',
3042
+ 'RECONCILIATION',
3043
+ 'SIGN_ON_BONUS',
3044
+ 'TERMINATION'
3045
+ ]).optional(),
3046
+ run_date: z.iso.date().optional(),
3047
+ external_id: z.string().nullish()
3048
+ });
2572
3049
  /**
2573
3050
  * A project: a top-level container that groups jobs into federal and regional PWA compliance scopes, carrying the compliance modes, regional scoping, schedule envelope, and administrator/budget metadata.
2574
3051
  */
@@ -2610,12 +3087,46 @@ export const zProjectResponseObject = z.object({
2610
3087
  updated_at: z.iso.datetime()
2611
3088
  });
2612
3089
  /**
2613
- * Request body for creating or updating a project. Only `name` is required by the schema; `created_by_user_id` is additionally required on create and must be a member of the owning company. The owning company is inferred from the API key and is not part of the body.
3090
+ * Request body for creating a project. `name` is required by the schema; `created_by_user_id` is additionally required on create and must be a member of the owning company. The owning company is inferred from the API key and is not part of the body.
2614
3091
  */
2615
3092
  export const zProjectParameters = z.object({
2616
3093
  external_id: z.string().nullish(),
2617
3094
  name: z.string(),
2618
3095
  description: z.string().nullish(),
3096
+ created_by_user_id: z.string(),
3097
+ start_date: z.iso.date().nullish(),
3098
+ end_date: z.iso.date().nullish(),
3099
+ tz_name: z.string().nullish(),
3100
+ billing_start_day: z.int().nullish(),
3101
+ federal_pwa_mode: z.enum([
3102
+ 'all',
3103
+ 'pw_only',
3104
+ 'ap_only',
3105
+ 'none'
3106
+ ]).optional(),
3107
+ regional_pwa_mode: z.enum([
3108
+ 'all',
3109
+ 'pw_only',
3110
+ 'ap_only',
3111
+ 'none'
3112
+ ]).optional(),
3113
+ region: z.string().nullish(),
3114
+ asset_owner: z.boolean().optional(),
3115
+ administrator_name: z.string().nullish(),
3116
+ administrator_email: z.string().nullish(),
3117
+ administrator_phone: z.string().nullish(),
3118
+ budget: z.string().optional(),
3119
+ prevailing_wage_lock_in_date: z.iso.date().nullish(),
3120
+ beginning_of_construction_date: z.iso.date().nullish(),
3121
+ placed_in_service_date: z.iso.date().nullish()
3122
+ });
3123
+ /**
3124
+ * Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only and an update that names it is rejected.
3125
+ */
3126
+ export const zProjectUpdateParameters = z.object({
3127
+ external_id: z.string().nullish(),
3128
+ name: z.string().optional(),
3129
+ description: z.string().nullish(),
2619
3130
  created_by_user_id: z.string().nullish(),
2620
3131
  start_date: z.iso.date().nullish(),
2621
3132
  end_date: z.iso.date().nullish(),
@@ -2655,7 +3166,11 @@ export const zSiteCheckInResponseObject = z.object({
2655
3166
  employer_name: z.string().nullable(),
2656
3167
  description: z.string().nullable(),
2657
3168
  rationale: z.string().nullable(),
2658
- source: z.enum(['manual', 'auto']),
3169
+ source: z.enum([
3170
+ 'manual',
3171
+ 'auto',
3172
+ 'public_form'
3173
+ ]),
2659
3174
  nerc_check_in: z.boolean(),
2660
3175
  cip_exceptional: z.boolean(),
2661
3176
  created_by_user_id: z.string().nullable(),
@@ -3152,7 +3667,7 @@ export const zPaystubResponseObject = z.object({
3152
3667
  updated_at: z.iso.datetime()
3153
3668
  });
3154
3669
  /**
3155
- * Request body for creating or updating a paystub. payrolls_payroll_run_id and user_id are required; timekeeping_time_card_id is required for an on-cycle run and disallowed for an off-cycle run.
3670
+ * Request body for creating a paystub. payrolls_payroll_run_id and user_id are required; timekeeping_time_card_id is required for an on-cycle run and disallowed for an off-cycle run.
3156
3671
  */
3157
3672
  export const zPaystubParameters = z.object({
3158
3673
  payrolls_payroll_run_id: z.string(),
@@ -3161,6 +3676,16 @@ export const zPaystubParameters = z.object({
3161
3676
  external_id: z.string().nullish(),
3162
3677
  check_number: z.string().nullish()
3163
3678
  });
3679
+ /**
3680
+ * Request body for updating a paystub. Send only the fields to change; the resulting paystub must still match its payroll run type.
3681
+ */
3682
+ export const zPaystubUpdateParameters = z.object({
3683
+ payrolls_payroll_run_id: z.string().optional(),
3684
+ user_id: z.string().optional(),
3685
+ timekeeping_time_card_id: z.string().nullish(),
3686
+ external_id: z.string().nullish(),
3687
+ check_number: z.string().nullish()
3688
+ });
3164
3689
  /**
3165
3690
  * An adjustment applied in the current pay period to correct a prior one, tied to the paystub line item it corrects.
3166
3691
  */
@@ -3320,7 +3845,7 @@ export const zPaystubLineItemResponseObject = z.object({
3320
3845
  updated_at: z.iso.datetime()
3321
3846
  });
3322
3847
  /**
3323
- * Request body for creating or updating a paystub line item. All four fields are required.
3848
+ * Request body for creating a paystub line item. All four fields are required.
3324
3849
  */
3325
3850
  export const zPaystubLineItemParameters = z.object({
3326
3851
  payrolls_paystub_id: z.string(),
@@ -3328,6 +3853,15 @@ export const zPaystubLineItemParameters = z.object({
3328
3853
  contributor: z.enum(['employee', 'employer']),
3329
3854
  payrolls_external_map_id: z.string()
3330
3855
  });
3856
+ /**
3857
+ * Request body for updating a paystub line item. Send only the fields to change.
3858
+ */
3859
+ export const zPaystubLineItemUpdateParameters = z.object({
3860
+ payrolls_paystub_id: z.string().optional(),
3861
+ amount_cents: z.string().optional(),
3862
+ contributor: z.enum(['employee', 'employer']).optional(),
3863
+ payrolls_external_map_id: z.string().optional()
3864
+ });
3331
3865
  /**
3332
3866
  * Request body for creating or updating a position on a job. The job is taken from the URL path.
3333
3867
  */
@@ -3350,7 +3884,7 @@ export const zPositionParameters = z.object({
3350
3884
  }).optional()
3351
3885
  });
3352
3886
  /**
3353
- * Parameters for creating or updating a per-unit scope price on a job.
3887
+ * Parameters for creating a per-unit scope price on a job. `scope_kind` and `unit_price` are required.
3354
3888
  */
3355
3889
  export const zProductionJobScopePriceParameters = z.object({
3356
3890
  scope_kind: z.string(),
@@ -3358,6 +3892,15 @@ export const zProductionJobScopePriceParameters = z.object({
3358
3892
  contracted_count: z.int().nullish(),
3359
3893
  unit_of_measure: z.string().optional()
3360
3894
  });
3895
+ /**
3896
+ * Parameters for updating a per-unit scope price on a job. Every field is optional; omit a field to preserve its current value. The resulting price must retain a scope kind and non-negative unit price.
3897
+ */
3898
+ export const zProductionJobScopePriceUpdateParameters = z.object({
3899
+ scope_kind: z.string().optional(),
3900
+ unit_price: z.string().optional(),
3901
+ contracted_count: z.int().nullish(),
3902
+ unit_of_measure: z.string().optional()
3903
+ });
3361
3904
  /**
3362
3905
  * A per-unit billing price for one scope of work on a job. Production completions bill against these prices.
3363
3906
  */
@@ -3476,7 +4019,7 @@ export const zFormAssignmentTaskResponseObject = z.array(z.object({
3476
4019
  }))
3477
4020
  }));
3478
4021
  /**
3479
- * 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.
4022
+ * Request body for creating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only.
3480
4023
  */
3481
4024
  export const zCertificationParameters = z.object({
3482
4025
  company_id: z.string(),
@@ -3485,6 +4028,16 @@ export const zCertificationParameters = z.object({
3485
4028
  verified: z.boolean().optional(),
3486
4029
  duration: z.string().nullish()
3487
4030
  });
4031
+ /**
4032
+ * Request body for updating a certification — a named qualification a worker can hold. Include only the fields to change. You can only manage your own company's certifications; global (platform) certifications are read-only.
4033
+ */
4034
+ export const zCertificationUpdateParameters = z.object({
4035
+ company_id: z.string().optional(),
4036
+ name: z.string().optional(),
4037
+ description: z.string().nullish(),
4038
+ verified: z.boolean().optional(),
4039
+ duration: z.string().nullish()
4040
+ });
3488
4041
  /**
3489
4042
  * A certification package — a named set of certifications your company requires together.
3490
4043
  */
@@ -3500,7 +4053,7 @@ export const zCertificationPackageResponseObject = z.object({
3500
4053
  updated_at: z.iso.datetime()
3501
4054
  });
3502
4055
  /**
3503
- * Request body for creating or updating a certification package — a named set of certifications a company requires together.
4056
+ * Request body for creating a certification package — a named set of certifications a company requires together.
3504
4057
  */
3505
4058
  export const zCertificationPackageParameters = z.object({
3506
4059
  name: z.string(),
@@ -3508,6 +4061,15 @@ export const zCertificationPackageParameters = z.object({
3508
4061
  certification_ids: z.array(z.string()).optional(),
3509
4062
  performed_by_user_id: z.string()
3510
4063
  });
4064
+ /**
4065
+ * Request body for updating a certification package — a named set of certifications a company requires together. Include only the fields to change.
4066
+ */
4067
+ export const zCertificationPackageUpdateParameters = z.object({
4068
+ name: z.string().optional(),
4069
+ description: z.string().nullish(),
4070
+ certification_ids: z.array(z.string()).optional(),
4071
+ performed_by_user_id: z.string()
4072
+ });
3511
4073
  /**
3512
4074
  * A certification — a named qualification a worker can hold, either owned by your company or a global (platform) credential type (company_id null).
3513
4075
  */
@@ -3522,7 +4084,7 @@ export const zCertificationResponseObject = z.object({
3522
4084
  updated_at: z.iso.datetime()
3523
4085
  });
3524
4086
  /**
3525
- * Request body for recording or updating a certification held by a worker — who holds it, which certification, when it was received, and optional proof, expiry, and verification details.
4087
+ * Request body for recording a certification held by a worker — who holds it, which certification, when it was received, and optional proof, expiry, and verification details.
3526
4088
  */
3527
4089
  export const zUserCertificationParameters = z.object({
3528
4090
  user_id: z.string(),
@@ -3539,6 +4101,24 @@ export const zUserCertificationParameters = z.object({
3539
4101
  archived_at: z.iso.datetime().nullish(),
3540
4102
  approved_at: z.iso.datetime().nullish()
3541
4103
  });
4104
+ /**
4105
+ * Request body for updating a certification held by a worker. Every field is optional; omit a field to preserve its current value. The resulting certification must still have a receipt date and verification state, and any expiry date must remain after its receipt date.
4106
+ */
4107
+ export const zUserCertificationUpdateParameters = z.object({
4108
+ user_id: z.string().optional(),
4109
+ certification_id: z.string().optional(),
4110
+ received_at: z.iso.datetime().optional(),
4111
+ file: z.object({
4112
+ name: z.string().max(255).regex(/^[\w\s.-]*\.[A-Za-z0-9]+$/),
4113
+ content: z.string()
4114
+ }).nullish(),
4115
+ verified: z.boolean().optional(),
4116
+ expiration_date: z.iso.date().nullish(),
4117
+ credential_id: z.string().nullish(),
4118
+ approved_by_user_id: z.string().nullish(),
4119
+ archived_at: z.iso.datetime().nullish(),
4120
+ approved_at: z.iso.datetime().nullish()
4121
+ });
3542
4122
  /**
3543
4123
  * A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
3544
4124
  */
@@ -4905,7 +5485,14 @@ export const zAssetsVendorResponseObject = z.object({
4905
5485
  * Create or update a vendor. Only name is required.
4906
5486
  */
4907
5487
  export const zAssetsVendorParameters = z.object({
4908
- name: z.string(),
5488
+ name: z.string().min(1),
5489
+ logo_signed_id: z.string().optional()
5490
+ });
5491
+ /**
5492
+ * Update a vendor. All fields are optional — send only what changes.
5493
+ */
5494
+ export const zAssetsVendorUpdateParameters = z.object({
5495
+ name: z.string().min(1).optional(),
4909
5496
  logo_signed_id: z.string().optional()
4910
5497
  });
4911
5498
  /**
@@ -4933,6 +5520,9 @@ export const zAssetsSiteParameters = z.intersection(z.union([
4933
5520
  site_id: z.string().nullish(),
4934
5521
  name: z.string().nullish()
4935
5522
  }));
5523
+ /**
5524
+ * Request body for updating an asset location. Every field is optional; send only the fields to change. The saved location must still have a name or a backing `site_id`.
5525
+ */
4936
5526
  export const zAssetsSiteUpdateParameters = z.object({
4937
5527
  kind: z.enum(['warehouse', 'yard']).optional(),
4938
5528
  site_id: z.string().nullish(),
@@ -5008,6 +5598,39 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
5008
5598
  assigned_user_ids: z.array(z.string()).optional(),
5009
5599
  assets_product_ids: z.array(z.string()).optional()
5010
5600
  });
5601
+ /**
5602
+ * Update a form-assignment trigger rule. All fields are optional — send only what changes. When changing first_due_by, include the matching day field when required; assigned_user_ids applies only to the custom assign_to mode.
5603
+ */
5604
+ export const zAssetsFormAssignmentTriggerUpdateParameters = z.object({
5605
+ form_definition_id: z.string().optional(),
5606
+ triggered_by: z.enum(['assignment', 'unassignment']).optional(),
5607
+ assign_to: z.enum([
5608
+ 'custom',
5609
+ 'asset_assignee',
5610
+ 'previous_asset_assignee'
5611
+ ]).optional(),
5612
+ first_due_by: z.enum([
5613
+ 'day_of_event',
5614
+ 'day_of_week',
5615
+ 'day_of_month'
5616
+ ]).optional(),
5617
+ tz_name: z.string().optional(),
5618
+ time_of_day_due: z.string().optional(),
5619
+ name: z.string().nullish(),
5620
+ recurrence_frequency: z.enum([
5621
+ 'DAILY',
5622
+ 'WORKDAILY',
5623
+ 'WORKDAILYSIX',
5624
+ 'WEEKLY',
5625
+ 'BIWEEKLY',
5626
+ 'MONTHLY',
5627
+ 'QUARTERLY'
5628
+ ]).nullish(),
5629
+ day_of_week_due: z.int().nullish(),
5630
+ day_of_month_due: z.int().nullish(),
5631
+ assigned_user_ids: z.array(z.string()).optional(),
5632
+ assets_product_ids: z.array(z.string()).optional()
5633
+ });
5011
5634
  /**
5012
5635
  * A file attached to an asset — an item or product image, or a service-event attachment. Uploaded through the direct-upload flow; the response carries a URL to download it.
5013
5636
  */
@@ -5092,7 +5715,7 @@ export const zAssetsAttachmentParameters = z.object({
5092
5715
  */
5093
5716
  export const zAssetsProductParameters = z.object({
5094
5717
  type: z.enum(['serial', 'bulk']),
5095
- name: z.string(),
5718
+ name: z.string().min(1),
5096
5719
  description: z.string().nullish(),
5097
5720
  assets_category_id: z.string().nullish(),
5098
5721
  upc: z.string().nullish(),
@@ -5118,7 +5741,7 @@ export const zAssetsProductParameters = z.object({
5118
5741
  * Update a catalog product. All fields are optional — send only what changes. `type` is immutable and `performed_by_user_id` is create-only, so neither is accepted here. `attribute_values` upserts the product's category-attribute values.
5119
5742
  */
5120
5743
  export const zAssetsProductUpdateParameters = z.object({
5121
- name: z.string().optional(),
5744
+ name: z.string().min(1).optional(),
5122
5745
  description: z.string().nullish(),
5123
5746
  assets_category_id: z.string().nullish(),
5124
5747
  upc: z.string().nullish(),
@@ -5140,10 +5763,10 @@ export const zAssetsProductUpdateParameters = z.object({
5140
5763
  images_attributes: z.array(zAssetsAttachmentParameters).optional()
5141
5764
  });
5142
5765
  /**
5143
- * Create or update an asset item. The write API creates serial items only; assets_product_id and serial_number are set on create and ignored on update. On create you may also place the item — assets_site_id to stock it at a site, or user_id to assign it to a user (the two are mutually exclusive). performed_by_user_id is required.
5766
+ * Create an asset item. The write API creates serial items only; assets_product_id and serial_number identify the product and serial number. On create you may also place the item — assets_site_id to stock it at a site, or user_id to assign it to a user (the two are mutually exclusive). performed_by_user_id is required.
5144
5767
  */
5145
5768
  export const zAssetsItemParameters = z.object({
5146
- name: z.string(),
5769
+ name: z.string().min(1),
5147
5770
  description: z.string().optional(),
5148
5771
  assets_product_id: z.string(),
5149
5772
  serial_number: z.string(),
@@ -5159,6 +5782,26 @@ export const zAssetsItemParameters = z.object({
5159
5782
  assets_sub_location_id: z.string().optional(),
5160
5783
  performed_by_user_id: z.string()
5161
5784
  });
5785
+ /**
5786
+ * Update an asset item. All item fields are optional — send only what changes — but performed_by_user_id is required to record the updater and any placement. Omitted attributes retain their existing values.
5787
+ */
5788
+ export const zAssetsItemUpdateParameters = z.object({
5789
+ name: z.string().min(1).optional(),
5790
+ description: z.string().optional(),
5791
+ assets_product_id: z.string().optional(),
5792
+ serial_number: z.string().optional(),
5793
+ status: z.enum(['available', 'assigned']).optional(),
5794
+ purchase_date: z.iso.datetime().optional(),
5795
+ purchase_price_cents: z.int().optional(),
5796
+ external_id: z.string().optional(),
5797
+ external_system_url: z.string().optional(),
5798
+ images_attributes: z.array(zAssetsAttachmentParameters).optional(),
5799
+ assets_site_id: z.string().optional(),
5800
+ user_id: z.string().optional(),
5801
+ container_item_id: z.string().optional(),
5802
+ assets_sub_location_id: z.string().optional(),
5803
+ performed_by_user_id: z.string()
5804
+ });
5162
5805
  /**
5163
5806
  * A file attached to an asset item — a document such as a manual, warranty, or certificate. Uploaded through the direct-upload flow and optionally marked as a certified copy.
5164
5807
  */
@@ -5187,6 +5830,14 @@ export const zAssetsDocumentParameters = z.object({
5187
5830
  filename: z.string().nullish(),
5188
5831
  description: z.string().nullish()
5189
5832
  });
5833
+ /**
5834
+ * Update an asset-item document. All fields are optional — send only what changes. Omit file to retain the existing attachment, or supply a new signed_id to replace it.
5835
+ */
5836
+ export const zAssetsDocumentUpdateParameters = z.object({
5837
+ file: z.string().optional(),
5838
+ filename: z.string().nullish(),
5839
+ description: z.string().nullish()
5840
+ });
5190
5841
  /**
5191
5842
  * One entry in an item document's change history, recorded whenever the document is created, updated, or deleted — including when only its attached file is replaced.
5192
5843
  */
@@ -5294,6 +5945,72 @@ export const zAssetsItemFormAssignmentParameters = z.object({
5294
5945
  })).optional()
5295
5946
  })
5296
5947
  });
5948
+ /**
5949
+ * Update an item form assignment. All fields are optional — send only what changes. recurring gates the recurrence fields, and task_attributes.reminders_attributes replaces the existing reminder set when supplied.
5950
+ */
5951
+ export const zAssetsItemFormAssignmentUpdateParameters = z.object({
5952
+ form_definition_id: z.string().optional(),
5953
+ recurring: z.boolean().optional(),
5954
+ task_attributes: z.object({
5955
+ name: z.string().nullish(),
5956
+ description: z.string().nullish(),
5957
+ created_by_user_id: z.string().optional(),
5958
+ updated_by_user_id: z.string().nullish(),
5959
+ time_due: z.iso.datetime().nullish(),
5960
+ tz_name: z.string().nullish(),
5961
+ frequency: z.enum([
5962
+ 'DAILY',
5963
+ 'WORKDAILY',
5964
+ 'WORKDAILYSIX',
5965
+ 'WEEKLY',
5966
+ 'BIWEEKLY',
5967
+ 'MONTHLY',
5968
+ 'QUARTERLY'
5969
+ ]).nullish(),
5970
+ recurrence_end_time: z.iso.datetime().nullish(),
5971
+ task_assignee_user_ids: z.array(z.string()).optional(),
5972
+ reminders_attributes: z.array(z.object({
5973
+ offset: z.enum([
5974
+ 'PT0S',
5975
+ 'PT-1M',
5976
+ 'PT-5M',
5977
+ 'PT-10M',
5978
+ 'PT-15M',
5979
+ 'PT-30M',
5980
+ 'PT-1H',
5981
+ 'PT-2H',
5982
+ 'P-1D',
5983
+ 'P-2D',
5984
+ 'P-3D',
5985
+ 'P-4D',
5986
+ 'P-5D',
5987
+ 'P-6D',
5988
+ 'P-1W',
5989
+ 'P-2W',
5990
+ 'P-1M',
5991
+ 'P-2M',
5992
+ 'P-3M',
5993
+ 'P-6M',
5994
+ 'P-1Y',
5995
+ 'PT5M',
5996
+ 'PT15M',
5997
+ 'PT30M',
5998
+ 'PT1H',
5999
+ 'PT6H',
6000
+ 'PT12H',
6001
+ 'P1D',
6002
+ 'P2D',
6003
+ 'P3D',
6004
+ 'P4D',
6005
+ 'P5D',
6006
+ 'P6D',
6007
+ 'P1W',
6008
+ 'P2W',
6009
+ 'P3W'
6010
+ ])
6011
+ })).optional()
6012
+ }).optional()
6013
+ });
5297
6014
  /**
5298
6015
  * On-hand stock of an item at a site — one row per item, site, and storage location. Read-only. A site with none of the item has no row at all, since a row is removed once its count reaches zero.
5299
6016
  */
@@ -5415,6 +6132,22 @@ export const zAssetsServiceScheduleParameters = z.object({
5415
6132
  last_serviced_on: z.iso.date().nullish(),
5416
6133
  performed_by_user_id: z.string()
5417
6134
  });
6135
+ /**
6136
+ * Update a service schedule. Cadence and last_serviced_on fields are optional — send only what changes — but performed_by_user_id is required to record the updater. next_due_date is recomputed.
6137
+ */
6138
+ export const zAssetsServiceScheduleUpdateParameters = z.object({
6139
+ kind: z.enum(['calibration', 'maintenance']).optional(),
6140
+ name: z.string().nullish(),
6141
+ interval_unit: z.enum([
6142
+ 'year',
6143
+ 'month',
6144
+ 'week',
6145
+ 'day'
6146
+ ]).optional(),
6147
+ interval_count: z.int().gte(1).optional(),
6148
+ last_serviced_on: z.iso.date().nullish(),
6149
+ performed_by_user_id: z.string()
6150
+ });
5418
6151
  /**
5419
6152
  * A service performed on a serial item — scheduled (satisfying a service schedule) or ad-hoc. Recording one advances the linked schedule's next_due_date.
5420
6153
  */
@@ -5450,6 +6183,21 @@ export const zAssetsServiceEventParameters = z.object({
5450
6183
  performed_by_user_id: z.string(),
5451
6184
  attachments_attributes: z.array(zAssetsAttachmentParameters).optional()
5452
6185
  });
6186
+ /**
6187
+ * Update a service event. Event fields are optional — send only what changes — but performed_by_user_id is required to record the updater. A linked schedule dictates kind, and changing or removing the link recomputes affected due dates.
6188
+ */
6189
+ export const zAssetsServiceEventUpdateParameters = z.object({
6190
+ kind: z.enum([
6191
+ 'calibration',
6192
+ 'maintenance',
6193
+ 'repair'
6194
+ ]).optional(),
6195
+ notes: z.string().nullish(),
6196
+ performed_on: z.iso.date().optional(),
6197
+ assets_service_schedule_id: z.string().nullish(),
6198
+ performed_by_user_id: z.string(),
6199
+ attachments_attributes: z.array(zAssetsAttachmentParameters).optional()
6200
+ });
5453
6201
  /**
5454
6202
  * A product-level service cadence that seeds and syncs the matching schedules on that product's items. Changing its defining fields (name, kind, interval) reconciles linked item schedules in the background.
5455
6203
  */
@@ -5484,6 +6232,21 @@ export const zAssetsServiceScheduleTemplateParameters = z.object({
5484
6232
  interval_count: z.int().gte(1),
5485
6233
  performed_by_user_id: z.string()
5486
6234
  });
6235
+ /**
6236
+ * Update a service schedule template. Cadence fields are optional — send only what changes — but performed_by_user_id is required to record the updater. Changing defining fields reconciles linked item schedules in the background.
6237
+ */
6238
+ export const zAssetsServiceScheduleTemplateUpdateParameters = z.object({
6239
+ kind: z.enum(['calibration', 'maintenance']).optional(),
6240
+ name: z.string().nullish(),
6241
+ interval_unit: z.enum([
6242
+ 'year',
6243
+ 'month',
6244
+ 'week',
6245
+ 'day'
6246
+ ]).optional(),
6247
+ interval_count: z.int().gte(1).optional(),
6248
+ performed_by_user_id: z.string()
6249
+ });
5487
6250
  /**
5488
6251
  * A node of fixed storage structure inside a site or a container item — a zone, aisle, rack, shelf, bin, or drawer. Nodes form a tree per holder, and each carries a scannable path_code composed from its ancestors' codes.
5489
6252
  */
@@ -5522,8 +6285,8 @@ export const zAssetsSubLocationParameters = z.object({
5522
6285
  'bin',
5523
6286
  'drawer'
5524
6287
  ]).optional(),
5525
- name: z.string(),
5526
- code: z.string()
6288
+ name: z.string().min(1),
6289
+ code: z.string().min(1)
5527
6290
  });
5528
6291
  /**
5529
6292
  * Update a storage location. All fields are optional — send only what changes. The holder fields cannot change after creation; renaming code cascades new path codes through the node's subtree.
@@ -5540,8 +6303,8 @@ export const zAssetsSubLocationUpdateParameters = z.object({
5540
6303
  'bin',
5541
6304
  'drawer'
5542
6305
  ]).optional(),
5543
- name: z.string().optional(),
5544
- code: z.string().optional()
6306
+ name: z.string().min(1).optional(),
6307
+ code: z.string().min(1).optional()
5545
6308
  });
5546
6309
  /**
5547
6310
  * A completed movement of item stock between two holders, each a site, a user, or a container. Each line moves one item; applying the transfer records paired outbound and inbound transactions and updates the on-hand, custody, and containment counts. Transfers created through this API are always completed. One-sided moves (placing or removing an item with only one endpoint) record transactions but no transfer, and so are not represented by this resource.
@@ -5621,6 +6384,47 @@ export const zAssetsArchiveParameters = z.object({
5621
6384
  export const zListApiKeyScopesResponse = z.object({
5622
6385
  data: z.array(zApiKeyScopeResponseObject)
5623
6386
  });
6387
+ export const zListAllocationsPath = z.object({
6388
+ apprentice_id: z.string()
6389
+ });
6390
+ export const zListAllocationsQuery = z.object({
6391
+ 'filter[allocated_at][gte]': z.iso.datetime().optional(),
6392
+ 'filter[allocated_at][lte]': z.iso.datetime().optional(),
6393
+ 'filter[created_at][gte]': z.iso.datetime().optional(),
6394
+ 'filter[created_at][lte]': z.iso.datetime().optional(),
6395
+ 'filter[updated_at][gte]': z.iso.datetime().optional(),
6396
+ 'filter[updated_at][lte]': z.iso.datetime().optional(),
6397
+ filter: z.string().optional(),
6398
+ 'filter[unexpected]': z.string().optional(),
6399
+ 'page[cursor]': z.string().optional(),
6400
+ 'page[limit]': z.int().gte(1).optional().default(20),
6401
+ page: z.string().optional()
6402
+ });
6403
+ /**
6404
+ * Success
6405
+ */
6406
+ export const zListAllocationsResponse = z.object({
6407
+ meta: zMeta,
6408
+ links: zLinks,
6409
+ data: z.array(zApprenticeshipAllocationResponseObject)
6410
+ });
6411
+ export const zGetAllocationPath = z.object({
6412
+ apprentice_id: z.string(),
6413
+ id: z.string()
6414
+ });
6415
+ /**
6416
+ * Success
6417
+ */
6418
+ export const zGetAllocationResponse = zApprenticeshipAllocationResponseObject;
6419
+ export const zUpdateAllocationBody = zApprenticeshipAllocationUpdateParameters;
6420
+ export const zUpdateAllocationPath = z.object({
6421
+ apprentice_id: z.string(),
6422
+ id: z.string()
6423
+ });
6424
+ /**
6425
+ * Success
6426
+ */
6427
+ export const zUpdateAllocationResponse = zApprenticeshipAllocationResponseObject;
5624
6428
  export const zListApprenticesPath = z.object({
5625
6429
  program_id: z.string()
5626
6430
  });
@@ -5683,7 +6487,7 @@ export const zCreateOccupationPath = z.object({
5683
6487
  * Created
5684
6488
  */
5685
6489
  export const zCreateOccupationResponse = zApprenticeshipOccupationResponseObject;
5686
- export const zUpdateOccupationBody = zApprenticeshipOccupationParameters;
6490
+ export const zUpdateOccupationBody = zApprenticeshipOccupationUpdateParameters;
5687
6491
  export const zUpdateOccupationPath = z.object({
5688
6492
  program_id: z.string(),
5689
6493
  id: z.string()
@@ -5730,7 +6534,7 @@ export const zDeleteEmployerPath = z.object({
5730
6534
  * Success
5731
6535
  */
5732
6536
  export const zDeleteEmployerResponse = zApprenticeshipProgramEmployerResponseObject;
5733
- export const zUpdateEmployerBody = zApprenticeshipProgramEmployerParameters;
6537
+ export const zUpdateEmployerBody = zApprenticeshipProgramEmployerUpdateParameters;
5734
6538
  export const zUpdateEmployerPath = z.object({
5735
6539
  program_id: z.string(),
5736
6540
  id: z.string()
@@ -5763,7 +6567,7 @@ export const zCreateProgramBody = zApprenticeshipProgramParameters;
5763
6567
  * Created
5764
6568
  */
5765
6569
  export const zCreateProgramResponse = zApprenticeshipProgramResponseObject;
5766
- export const zUpdateProgramBody = zApprenticeshipProgramParameters;
6570
+ export const zUpdateProgramBody = zApprenticeshipProgramUpdateParameters;
5767
6571
  export const zUpdateProgramPath = z.object({
5768
6572
  id: z.string()
5769
6573
  });
@@ -5801,7 +6605,7 @@ export const zCreatePeriodPath = z.object({
5801
6605
  * Created
5802
6606
  */
5803
6607
  export const zCreatePeriodResponse = zApprenticeshipWageSchedulePeriodResponseObject;
5804
- export const zUpdatePeriodBody = zApprenticeshipWageSchedulePeriodParameters;
6608
+ export const zUpdatePeriodBody = zApprenticeshipWageSchedulePeriodUpdateParameters;
5805
6609
  export const zUpdatePeriodPath = z.object({
5806
6610
  wage_schedule_id: z.string(),
5807
6611
  id: z.string()
@@ -5840,7 +6644,7 @@ export const zCreateWageSchedulePath = z.object({
5840
6644
  * Created
5841
6645
  */
5842
6646
  export const zCreateWageScheduleResponse = zApprenticeshipWageScheduleResponseObject;
5843
- export const zUpdateWageScheduleBody = zApprenticeshipWageScheduleParameters;
6647
+ export const zUpdateWageScheduleBody = zApprenticeshipWageScheduleUpdateParameters;
5844
6648
  export const zUpdateWageSchedulePath = z.object({
5845
6649
  occupation_id: z.string(),
5846
6650
  id: z.string()
@@ -5888,7 +6692,7 @@ export const zGetAttributePath = z.object({
5888
6692
  * Success
5889
6693
  */
5890
6694
  export const zGetAttributeResponse = zAssetsAttributeResponseObject;
5891
- export const zUpdateAttributeBody = zAssetsAttributeParameters;
6695
+ export const zUpdateAttributeBody = zAssetsAttributeUpdateParameters;
5892
6696
  export const zUpdateAttributePath = z.object({
5893
6697
  id: z.string()
5894
6698
  });
@@ -5934,7 +6738,7 @@ export const zGetCategoryPath = z.object({
5934
6738
  * Success
5935
6739
  */
5936
6740
  export const zGetCategoryResponse = zAssetsCategoryResponseObject;
5937
- export const zUpdateCategoryBody = zAssetsCategoryParameters;
6741
+ export const zUpdateCategoryBody = zAssetsCategoryUpdateParameters;
5938
6742
  export const zUpdateCategoryPath = z.object({
5939
6743
  id: z.string()
5940
6744
  });
@@ -6019,7 +6823,7 @@ export const zGetFormAssignmentTriggerPath = z.object({
6019
6823
  * Success
6020
6824
  */
6021
6825
  export const zGetFormAssignmentTriggerResponse = zAssetsFormAssignmentTriggerResponseObject;
6022
- export const zUpdateFormAssignmentTriggerBody = zAssetsFormAssignmentTriggerParameters;
6826
+ export const zUpdateFormAssignmentTriggerBody = zAssetsFormAssignmentTriggerUpdateParameters;
6023
6827
  export const zUpdateFormAssignmentTriggerPath = z.object({
6024
6828
  id: z.string()
6025
6829
  });
@@ -6088,7 +6892,7 @@ export const zGetItemPath = z.object({
6088
6892
  * Success
6089
6893
  */
6090
6894
  export const zGetItemResponse = zAssetsItemResponseObject;
6091
- export const zUpdateItemBody = zAssetsItemParameters;
6895
+ export const zUpdateItemBody = zAssetsItemUpdateParameters;
6092
6896
  export const zUpdateItemPath = z.object({
6093
6897
  id: z.string()
6094
6898
  });
@@ -6159,7 +6963,7 @@ export const zGetServiceSchedulePath = z.object({
6159
6963
  * Success
6160
6964
  */
6161
6965
  export const zGetServiceScheduleResponse = zAssetsServiceScheduleResponseObject;
6162
- export const zUpdateServiceScheduleBody = zAssetsServiceScheduleParameters;
6966
+ export const zUpdateServiceScheduleBody = zAssetsServiceScheduleUpdateParameters;
6163
6967
  export const zUpdateServiceSchedulePath = z.object({
6164
6968
  item_id: z.string(),
6165
6969
  id: z.string()
@@ -6215,7 +7019,7 @@ export const zGetServiceEventPath = z.object({
6215
7019
  * Success
6216
7020
  */
6217
7021
  export const zGetServiceEventResponse = zAssetsServiceEventFullResponseObject;
6218
- export const zUpdateServiceEventBody = zAssetsServiceEventParameters;
7022
+ export const zUpdateServiceEventBody = zAssetsServiceEventUpdateParameters;
6219
7023
  export const zUpdateServiceEventPath = z.object({
6220
7024
  item_id: z.string(),
6221
7025
  id: z.string()
@@ -6256,7 +7060,7 @@ export const zGetFormAssignmentTaskPath = z.object({
6256
7060
  * Success
6257
7061
  */
6258
7062
  export const zGetFormAssignmentTaskResponse = zAssetsItemFormAssignmentResponseObject;
6259
- export const zUpdateFormAssignmentTaskBody = zAssetsItemFormAssignmentParameters;
7063
+ export const zUpdateFormAssignmentTaskBody = zAssetsItemFormAssignmentUpdateParameters;
6260
7064
  export const zUpdateFormAssignmentTaskPath = z.object({
6261
7065
  item_id: z.string(),
6262
7066
  id: z.string()
@@ -6307,7 +7111,7 @@ export const zGetDocumentPath = z.object({
6307
7111
  * Success
6308
7112
  */
6309
7113
  export const zGetDocumentResponse = zAssetsDocumentResponseObject;
6310
- export const zUpdateDocumentBody = zAssetsDocumentParameters;
7114
+ export const zUpdateDocumentBody = zAssetsDocumentUpdateParameters;
6311
7115
  export const zUpdateDocumentPath = z.object({
6312
7116
  item_id: z.string(),
6313
7117
  id: z.string()
@@ -6451,7 +7255,7 @@ export const zGetServiceScheduleTemplatePath = z.object({
6451
7255
  * Success
6452
7256
  */
6453
7257
  export const zGetServiceScheduleTemplateResponse = zAssetsServiceScheduleTemplateResponseObject;
6454
- export const zUpdateServiceScheduleTemplateBody = zAssetsServiceScheduleTemplateParameters;
7258
+ export const zUpdateServiceScheduleTemplateBody = zAssetsServiceScheduleTemplateUpdateParameters;
6455
7259
  export const zUpdateServiceScheduleTemplatePath = z.object({
6456
7260
  product_id: z.string(),
6457
7261
  id: z.string()
@@ -6644,7 +7448,7 @@ export const zGetVendorPath = z.object({
6644
7448
  * Success
6645
7449
  */
6646
7450
  export const zGetVendorResponse = zAssetsVendorResponseObject;
6647
- export const zUpdateVendorBody = zAssetsVendorParameters;
7451
+ export const zUpdateVendorBody = zAssetsVendorUpdateParameters;
6648
7452
  export const zUpdateVendorPath = z.object({
6649
7453
  id: z.string()
6650
7454
  });
@@ -6766,7 +7570,7 @@ export const zGetPackagePath = z.object({
6766
7570
  * Success
6767
7571
  */
6768
7572
  export const zGetPackageResponse = zCertificationPackageResponseObject;
6769
- export const zUpdatePackageBody = zCertificationPackageParameters;
7573
+ export const zUpdatePackageBody = zCertificationPackageUpdateParameters;
6770
7574
  export const zUpdatePackagePath = z.object({
6771
7575
  id: z.string()
6772
7576
  });
@@ -6809,7 +7613,7 @@ export const zGetUserCertificationPath = z.object({
6809
7613
  * Success
6810
7614
  */
6811
7615
  export const zGetUserCertificationResponse = zUserCertificationResponseObject;
6812
- export const zUpdateUserCertificationBody = zUserCertificationParameters;
7616
+ export const zUpdateUserCertificationBody = zUserCertificationUpdateParameters;
6813
7617
  export const zUpdateUserCertificationPath = z.object({
6814
7618
  id: z.string()
6815
7619
  });
@@ -6845,7 +7649,7 @@ export const zGetCertificationPath = z.object({
6845
7649
  * Success
6846
7650
  */
6847
7651
  export const zGetCertificationResponse = zCertificationResponseObject;
6848
- export const zUpdateCertificationBody = zCertificationParameters;
7652
+ export const zUpdateCertificationBody = zCertificationUpdateParameters;
6849
7653
  export const zUpdateCertificationPath = z.object({
6850
7654
  id: z.string()
6851
7655
  });
@@ -6877,7 +7681,7 @@ export const zCreateDepartmentBody = zDepartmentParameters;
6877
7681
  * Created
6878
7682
  */
6879
7683
  export const zCreateDepartmentResponse = zDepartmentResponseObject;
6880
- export const zUpdateDepartmentBody = zDepartmentParameters;
7684
+ export const zUpdateDepartmentBody = zDepartmentUpdateParameters;
6881
7685
  export const zUpdateDepartmentPath = z.object({
6882
7686
  id: z.string()
6883
7687
  });
@@ -7015,7 +7819,7 @@ export const zGetCustomFieldConfigPath = z.object({
7015
7819
  * Success
7016
7820
  */
7017
7821
  export const zGetCustomFieldConfigResponse = zCustomFieldConfigsResponseObject;
7018
- export const zUpdateCustomFieldConfigBody = zCustomFieldConfigParameters;
7822
+ export const zUpdateCustomFieldConfigBody = zCustomFieldConfigUpdateParameters;
7019
7823
  export const zUpdateCustomFieldConfigPath = z.object({
7020
7824
  id: z.string()
7021
7825
  });
@@ -7153,7 +7957,7 @@ export const zGetGroupPath = z.object({
7153
7957
  * Success
7154
7958
  */
7155
7959
  export const zGetGroupResponse = zGroupResponseObject;
7156
- export const zUpdateGroupBody = zGroupParameters;
7960
+ export const zUpdateGroupBody = zGroupUpdateParameters;
7157
7961
  export const zUpdateGroupPath = z.object({
7158
7962
  id: z.string()
7159
7963
  });
@@ -7208,7 +8012,7 @@ export const zGetJobScopePricePath = z.object({
7208
8012
  * Success
7209
8013
  */
7210
8014
  export const zGetJobScopePriceResponse = zProductionJobScopePriceResponseObject;
7211
- export const zUpdateJobScopePriceBody = zProductionJobScopePriceParameters;
8015
+ export const zUpdateJobScopePriceBody = zProductionJobScopePriceUpdateParameters;
7212
8016
  export const zUpdateJobScopePricePath = z.object({
7213
8017
  job_id: z.string(),
7214
8018
  id: z.string()
@@ -7449,7 +8253,7 @@ export const zListJobsResponse = z.object({
7449
8253
  /**
7450
8254
  * Create a job
7451
8255
  */
7452
- export const zCreateJobBody = zJobParameters;
8256
+ export const zCreateJobBody = zJobCreateParameters;
7453
8257
  /**
7454
8258
  * Created
7455
8259
  */
@@ -7897,7 +8701,7 @@ export const zGetFringeBenefitPlanPath = z.object({
7897
8701
  * Success
7898
8702
  */
7899
8703
  export const zGetFringeBenefitPlanResponse = zPayrollFringeBenefitPlanResponseObject;
7900
- export const zUpdateFringeBenefitPlanBody = zPayrollFringeBenefitPlanParameters;
8704
+ export const zUpdateFringeBenefitPlanBody = zPayrollFringeBenefitPlanUpdateParameters;
7901
8705
  export const zUpdateFringeBenefitPlanPath = z.object({
7902
8706
  id: z.string()
7903
8707
  });
@@ -7984,7 +8788,7 @@ export const zGetPayrollRunPath = z.object({
7984
8788
  * Success
7985
8789
  */
7986
8790
  export const zGetPayrollRunResponse = zPayrollRunResponseObject;
7987
- export const zUpdatePayrollRunBody = zPayrollRunParameters;
8791
+ export const zUpdatePayrollRunBody = zPayrollRunUpdateParameters;
7988
8792
  export const zUpdatePayrollRunPath = z.object({
7989
8793
  id: z.string()
7990
8794
  });
@@ -8023,7 +8827,7 @@ export const zGetPaystubLineItemPath = z.object({
8023
8827
  * Success
8024
8828
  */
8025
8829
  export const zGetPaystubLineItemResponse = zPaystubLineItemResponseObject;
8026
- export const zUpdatePaystubLineItemBody = zPaystubLineItemParameters;
8830
+ export const zUpdatePaystubLineItemBody = zPaystubLineItemUpdateParameters;
8027
8831
  export const zUpdatePaystubLineItemPath = z.object({
8028
8832
  id: z.string()
8029
8833
  });
@@ -8064,7 +8868,7 @@ export const zGetPaystubPath = z.object({
8064
8868
  * Success
8065
8869
  */
8066
8870
  export const zGetPaystubResponse = zPaystubResponseObject;
8067
- export const zUpdatePaystubBody = zPaystubParameters;
8871
+ export const zUpdatePaystubBody = zPaystubUpdateParameters;
8068
8872
  export const zUpdatePaystubPath = z.object({
8069
8873
  id: z.string()
8070
8874
  });
@@ -8072,6 +8876,73 @@ export const zUpdatePaystubPath = z.object({
8072
8876
  * Success
8073
8877
  */
8074
8878
  export const zUpdatePaystubResponse = zPaystubResponseObject;
8879
+ export const zListEmploymentHistoryPath = z.object({
8880
+ employment_id: z.string()
8881
+ });
8882
+ export const zListEmploymentHistoryQuery = z.object({
8883
+ 'as_of[valid]': z.string().optional(),
8884
+ 'as_of[transaction]': z.string().optional(),
8885
+ 'page[cursor]': z.string().optional(),
8886
+ 'page[limit]': z.int().gte(1).optional().default(20),
8887
+ page: z.string().optional()
8888
+ });
8889
+ /**
8890
+ * Success
8891
+ */
8892
+ export const zListEmploymentHistoryResponse = z.object({
8893
+ meta: zMeta,
8894
+ links: zLinks,
8895
+ data: z.array(zPeopleEmploymentHistoryVersionObject)
8896
+ });
8897
+ export const zListEmploymentsHistoryQuery = z.object({
8898
+ 'filter[user_id]': z.string().optional(),
8899
+ 'as_of[valid]': z.string().optional(),
8900
+ 'as_of[transaction]': z.string().optional(),
8901
+ filter: z.string().optional(),
8902
+ 'filter[unexpected]': z.string().optional(),
8903
+ 'page[cursor]': z.string().optional(),
8904
+ 'page[limit]': z.int().gte(1).optional().default(20),
8905
+ page: z.string().optional()
8906
+ });
8907
+ /**
8908
+ * Success
8909
+ */
8910
+ export const zListEmploymentsHistoryResponse = z.object({
8911
+ meta: zMeta,
8912
+ links: zLinks,
8913
+ data: z.array(zPeopleEmploymentHistoryVersionObject)
8914
+ });
8915
+ export const zListEmploymentsQuery = z.object({
8916
+ 'filter[user_id]': z.string().optional(),
8917
+ filter: z.string().optional(),
8918
+ 'filter[unexpected]': z.string().optional(),
8919
+ 'as_of[valid]': z.iso.datetime().optional(),
8920
+ as_of: z.string().optional(),
8921
+ 'as_of[bogus_axis]': z.string().optional(),
8922
+ 'as_of[valid][gte]': z.string().optional(),
8923
+ 'as_of[transaction]': z.string().optional(),
8924
+ 'page[cursor]': z.string().optional(),
8925
+ 'page[limit]': z.int().gte(1).optional().default(20),
8926
+ page: z.string().optional()
8927
+ });
8928
+ /**
8929
+ * Success in a gap between employment stints
8930
+ */
8931
+ export const zListEmploymentsResponse = z.object({
8932
+ meta: zMeta,
8933
+ links: zLinks,
8934
+ data: z.array(zPeopleEmploymentResponseObject)
8935
+ });
8936
+ export const zGetEmploymentPath = z.object({
8937
+ id: z.string()
8938
+ });
8939
+ export const zGetEmploymentQuery = z.object({
8940
+ 'as_of[valid]': z.iso.datetime().optional()
8941
+ });
8942
+ /**
8943
+ * Success
8944
+ */
8945
+ export const zGetEmploymentResponse = zPeopleEmploymentResponseObject;
8075
8946
  export const zListPerDiemsQuery = z.object({
8076
8947
  'filter[default]': z.boolean().optional(),
8077
8948
  'filter[taxable]': z.boolean().optional(),
@@ -8117,7 +8988,7 @@ export const zGetPerDiemPath = z.object({
8117
8988
  * Success
8118
8989
  */
8119
8990
  export const zGetPerDiemResponse = zPerDiemResponseObject;
8120
- export const zUpdatePerDiemBody = zPerDiemParameters;
8991
+ export const zUpdatePerDiemBody = zPerDiemUpdateParameters;
8121
8992
  export const zUpdatePerDiemPath = z.object({
8122
8993
  id: z.string()
8123
8994
  });
@@ -8157,7 +9028,7 @@ export const zGetPositionFunctionPath = z.object({
8157
9028
  * Success
8158
9029
  */
8159
9030
  export const zGetPositionFunctionResponse = zPositionFunctionResponseObject;
8160
- export const zUpdatePositionFunctionBody = zPositionFunctionParameters;
9031
+ export const zUpdatePositionFunctionBody = zPositionFunctionUpdateParameters;
8161
9032
  export const zUpdatePositionFunctionPath = z.object({
8162
9033
  id: z.string()
8163
9034
  });
@@ -8269,7 +9140,7 @@ export const zGetProjectPath = z.object({
8269
9140
  * Success
8270
9141
  */
8271
9142
  export const zGetProjectResponse = zProjectResponseObject;
8272
- export const zUpdateProjectBody = zProjectParameters;
9143
+ export const zUpdateProjectBody = zProjectUpdateParameters;
8273
9144
  export const zUpdateProjectPath = z.object({
8274
9145
  id: z.string()
8275
9146
  });
@@ -8282,7 +9153,7 @@ export const zCreateCompanyUserDetailBody = zPwaCompanyUserDetailsParameters;
8282
9153
  * Created
8283
9154
  */
8284
9155
  export const zCreateCompanyUserDetailResponse = zPwaCompanyUserDetailsResponseObject;
8285
- export const zUpdateCompanyUserDetailBody = zPwaCompanyUserDetailsParameters;
9156
+ export const zUpdateCompanyUserDetailBody = zPwaCompanyUserDetailsUpdateParameters;
8286
9157
  export const zUpdateCompanyUserDetailPath = z.object({
8287
9158
  id: z.string()
8288
9159
  });
@@ -8571,7 +9442,7 @@ export const zDeleteTimeCardPerDiemPath = z.object({
8571
9442
  * Success
8572
9443
  */
8573
9444
  export const zDeleteTimeCardPerDiemResponse = zTimeCardPerDiemResponseObject;
8574
- export const zUpdateTimeCardPerDiemBody = zTimeCardPerDiemParameters;
9445
+ export const zUpdateTimeCardPerDiemBody = zTimeCardPerDiemUpdateParameters;
8575
9446
  export const zUpdateTimeCardPerDiemPath = z.object({
8576
9447
  time_card_id: z.string(),
8577
9448
  id: z.int()
@@ -8981,7 +9852,7 @@ export const zDeleteHolidayPath = z.object({
8981
9852
  * Success
8982
9853
  */
8983
9854
  export const zDeleteHolidayResponse = zHolidayResponseObject;
8984
- export const zUpdateHolidayBody = zHolidayParameters;
9855
+ export const zUpdateHolidayBody = zHolidayUpdateParameters;
8985
9856
  export const zUpdateHolidayPath = z.object({
8986
9857
  pay_period_config_id: z.string(),
8987
9858
  id: z.string()