@dsptch-work/api-client 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +91 -7
- package/dist/gen/sdk.gen.js +136 -6
- package/dist/gen/types.gen.d.ts +1377 -96
- package/dist/gen/zod.gen.d.ts +1087 -117
- package/dist/gen/zod.gen.js +658 -43
- package/package.json +1 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -585,6 +585,26 @@ export const zApprenticeshipApprenticeResponseObject = z.object({
|
|
|
585
585
|
created_at: z.iso.datetime(),
|
|
586
586
|
updated_at: z.iso.datetime()
|
|
587
587
|
});
|
|
588
|
+
export const zApprenticeshipAllocationResponseObject = z.object({
|
|
589
|
+
id: z.string(),
|
|
590
|
+
apprenticeship_apprentice_id: z.string(),
|
|
591
|
+
apprenticeship_work_process_category_id: z.string().nullable(),
|
|
592
|
+
allocated_by_user_id: z.string(),
|
|
593
|
+
timekeeping_time_card_id: z.string().nullable(),
|
|
594
|
+
minutes: z.int(),
|
|
595
|
+
description: z.string().nullable(),
|
|
596
|
+
allocated_at: z.iso.datetime(),
|
|
597
|
+
cumulative_minutes: z.int(),
|
|
598
|
+
apprenticeship_wage_schedule_period_id: z.string(),
|
|
599
|
+
created_at: z.iso.datetime(),
|
|
600
|
+
updated_at: z.iso.datetime()
|
|
601
|
+
});
|
|
602
|
+
/**
|
|
603
|
+
* 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.
|
|
604
|
+
*/
|
|
605
|
+
export const zApprenticeshipAllocationUpdateParameters = z.object({
|
|
606
|
+
allocated_at: z.iso.datetime().optional()
|
|
607
|
+
});
|
|
588
608
|
/**
|
|
589
609
|
* 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
610
|
*/
|
|
@@ -608,7 +628,7 @@ export const zApprenticeshipApprenticeParameters = z.object({
|
|
|
608
628
|
operative_end_date: z.iso.date().nullish()
|
|
609
629
|
});
|
|
610
630
|
/**
|
|
611
|
-
* Create
|
|
631
|
+
* Create an apprenticeship program sponsored by your company; the sponsor is always your company and is never taken from the request body.
|
|
612
632
|
*/
|
|
613
633
|
export const zApprenticeshipProgramParameters = z.object({
|
|
614
634
|
program_number: z.string(),
|
|
@@ -618,7 +638,17 @@ export const zApprenticeshipProgramParameters = z.object({
|
|
|
618
638
|
registration_agency_type: z.enum(['federal', 'regional']).nullish()
|
|
619
639
|
});
|
|
620
640
|
/**
|
|
621
|
-
*
|
|
641
|
+
* Update an apprenticeship program sponsored by your company. Send only the fields to change; the sponsor is fixed to your company.
|
|
642
|
+
*/
|
|
643
|
+
export const zApprenticeshipProgramUpdateParameters = z.object({
|
|
644
|
+
program_number: z.string().optional(),
|
|
645
|
+
program_name: z.string().nullish(),
|
|
646
|
+
sponsor_name: z.string().nullish(),
|
|
647
|
+
doing_business_as: z.string().nullish(),
|
|
648
|
+
registration_agency_type: z.enum(['federal', 'regional']).nullish()
|
|
649
|
+
});
|
|
650
|
+
/**
|
|
651
|
+
* Create an occupation (trade) within a sponsored program; the program is taken from the URL path.
|
|
622
652
|
*/
|
|
623
653
|
export const zApprenticeshipOccupationParameters = z.object({
|
|
624
654
|
rapids_code: z.string(),
|
|
@@ -636,14 +666,39 @@ export const zApprenticeshipOccupationParameters = z.object({
|
|
|
636
666
|
num_journeyworkers: z.int()
|
|
637
667
|
});
|
|
638
668
|
/**
|
|
639
|
-
*
|
|
669
|
+
* Update an occupation (trade) within a sponsored program. Send only the fields to change; the program is taken from the URL path.
|
|
670
|
+
*/
|
|
671
|
+
export const zApprenticeshipOccupationUpdateParameters = z.object({
|
|
672
|
+
rapids_code: z.string().optional(),
|
|
673
|
+
occupation_type: z.enum([
|
|
674
|
+
'time_based',
|
|
675
|
+
'competency_based',
|
|
676
|
+
'hybrid'
|
|
677
|
+
]).optional(),
|
|
678
|
+
title: z.string().optional(),
|
|
679
|
+
description: z.string().nullish(),
|
|
680
|
+
min_minutes: z.int().optional(),
|
|
681
|
+
max_minutes: z.int().optional(),
|
|
682
|
+
probation_minutes: z.int().optional(),
|
|
683
|
+
num_apprentices: z.int().optional(),
|
|
684
|
+
num_journeyworkers: z.int().optional()
|
|
685
|
+
});
|
|
686
|
+
/**
|
|
687
|
+
* Create an authorization for an employer to employ apprentices in a program; only the program's sponsor may manage this roster.
|
|
640
688
|
*/
|
|
641
689
|
export const zApprenticeshipProgramEmployerParameters = z.object({
|
|
642
690
|
company_id: z.string(),
|
|
643
691
|
require_timecard_allocation: z.boolean().optional()
|
|
644
692
|
});
|
|
645
693
|
/**
|
|
646
|
-
*
|
|
694
|
+
* Update an employer authorization in a program. Send only the fields to change; only the program's sponsor may manage this roster.
|
|
695
|
+
*/
|
|
696
|
+
export const zApprenticeshipProgramEmployerUpdateParameters = z.object({
|
|
697
|
+
company_id: z.string().optional(),
|
|
698
|
+
require_timecard_allocation: z.boolean().optional()
|
|
699
|
+
});
|
|
700
|
+
/**
|
|
701
|
+
* Create a period on a wage schedule; the wage schedule is taken from the URL path. wage_cents is sent as integer cents.
|
|
647
702
|
*/
|
|
648
703
|
export const zApprenticeshipWageSchedulePeriodParameters = z.object({
|
|
649
704
|
period_number: z.int(),
|
|
@@ -655,7 +710,19 @@ export const zApprenticeshipWageSchedulePeriodParameters = z.object({
|
|
|
655
710
|
wage_cents: z.int()
|
|
656
711
|
});
|
|
657
712
|
/**
|
|
658
|
-
*
|
|
713
|
+
* 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.
|
|
714
|
+
*/
|
|
715
|
+
export const zApprenticeshipWageSchedulePeriodUpdateParameters = z.object({
|
|
716
|
+
period_number: z.int().optional(),
|
|
717
|
+
min_minutes: z.int().nullish(),
|
|
718
|
+
max_minutes: z.int().nullish(),
|
|
719
|
+
num_competencies: z.int().nullish(),
|
|
720
|
+
description: z.string().nullish(),
|
|
721
|
+
wage_percent: z.number().optional(),
|
|
722
|
+
wage_cents: z.int().optional()
|
|
723
|
+
});
|
|
724
|
+
/**
|
|
725
|
+
* 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
726
|
*/
|
|
660
727
|
export const zApprenticeshipWageScheduleParameters = z.object({
|
|
661
728
|
name: z.string(),
|
|
@@ -698,6 +765,66 @@ export const zApprenticeshipWageScheduleParameters = z.object({
|
|
|
698
765
|
_destroy: z.boolean().optional()
|
|
699
766
|
})).optional()
|
|
700
767
|
});
|
|
768
|
+
/**
|
|
769
|
+
* 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.
|
|
770
|
+
*/
|
|
771
|
+
export const zApprenticeshipWageScheduleUpdateParameters = z.object({
|
|
772
|
+
name: z.string().optional(),
|
|
773
|
+
description: z.string().nullish(),
|
|
774
|
+
wage_unit: z.enum([
|
|
775
|
+
'hourly',
|
|
776
|
+
'weekly',
|
|
777
|
+
'monthly',
|
|
778
|
+
'quarterly',
|
|
779
|
+
'semi_annually',
|
|
780
|
+
'annually'
|
|
781
|
+
]).optional(),
|
|
782
|
+
journeyworker_wage_unit: z.enum([
|
|
783
|
+
'hourly',
|
|
784
|
+
'weekly',
|
|
785
|
+
'monthly',
|
|
786
|
+
'quarterly',
|
|
787
|
+
'semi_annually',
|
|
788
|
+
'annually'
|
|
789
|
+
]).optional(),
|
|
790
|
+
period_unit: z.enum([
|
|
791
|
+
'hours',
|
|
792
|
+
'weeks',
|
|
793
|
+
'months',
|
|
794
|
+
'quarter',
|
|
795
|
+
'semi_annual',
|
|
796
|
+
'year'
|
|
797
|
+
]).optional(),
|
|
798
|
+
journeyworker_wage_cents: z.int().optional(),
|
|
799
|
+
end_wage_cents: z.int().optional(),
|
|
800
|
+
periods_attributes: z.array(z.intersection(z.union([
|
|
801
|
+
z.unknown(),
|
|
802
|
+
z.union([
|
|
803
|
+
z.object({
|
|
804
|
+
min_minutes: z.int()
|
|
805
|
+
}),
|
|
806
|
+
z.object({
|
|
807
|
+
max_minutes: z.int()
|
|
808
|
+
}),
|
|
809
|
+
z.object({
|
|
810
|
+
num_competencies: z.int()
|
|
811
|
+
})
|
|
812
|
+
]),
|
|
813
|
+
z.object({
|
|
814
|
+
_destroy: z.literal(true)
|
|
815
|
+
})
|
|
816
|
+
]), z.object({
|
|
817
|
+
id: z.string().optional(),
|
|
818
|
+
period_number: z.int().optional(),
|
|
819
|
+
min_minutes: z.int().nullish(),
|
|
820
|
+
max_minutes: z.int().nullish(),
|
|
821
|
+
num_competencies: z.int().nullish(),
|
|
822
|
+
description: z.string().nullish(),
|
|
823
|
+
wage_percent: z.number().optional(),
|
|
824
|
+
wage_cents: z.int().optional(),
|
|
825
|
+
_destroy: z.boolean().optional()
|
|
826
|
+
}))).optional()
|
|
827
|
+
});
|
|
701
828
|
/**
|
|
702
829
|
* 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
830
|
*/
|
|
@@ -731,6 +858,102 @@ export const zTimecodeResponseObject = z.object({
|
|
|
731
858
|
created_at: z.iso.datetime(),
|
|
732
859
|
updated_at: z.iso.datetime()
|
|
733
860
|
});
|
|
861
|
+
/**
|
|
862
|
+
* 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].
|
|
863
|
+
*/
|
|
864
|
+
export const zPeopleEmploymentResponseObject = z.object({
|
|
865
|
+
id: z.string(),
|
|
866
|
+
user_id: z.string(),
|
|
867
|
+
company_id: z.string(),
|
|
868
|
+
type: z.enum(['EMPLOYEE', 'CONTRACTOR']),
|
|
869
|
+
title: z.string().nullable(),
|
|
870
|
+
compensation_type: z.enum(['hourly', 'salary']),
|
|
871
|
+
payroll_id: z.string().nullable(),
|
|
872
|
+
manager_user_id: z.string().nullable(),
|
|
873
|
+
companies_department_id: z.string().nullable(),
|
|
874
|
+
enrolled_in_t_and_a: z.boolean(),
|
|
875
|
+
overtime_eligible: z.boolean().nullable(),
|
|
876
|
+
overtime_package_id: z.string().nullable(),
|
|
877
|
+
pay_rates_rule_package_id: z.string().nullable(),
|
|
878
|
+
pay_rates_package_id: z.string().nullable(),
|
|
879
|
+
worked_annual_minutes: z.int().nullable(),
|
|
880
|
+
pto_annual_minutes: z.int().nullable(),
|
|
881
|
+
holiday_annual_minutes: z.int().nullable(),
|
|
882
|
+
training_annual_minutes: z.int().nullable(),
|
|
883
|
+
hourly_rate_cents: z.string().nullable(),
|
|
884
|
+
training_annual_amount_cents: z.string().nullable(),
|
|
885
|
+
employer_combined_health_amount_cents: z.string().nullable(),
|
|
886
|
+
employer_combined_savings_cents: z.string().nullable(),
|
|
887
|
+
currency: z.string(),
|
|
888
|
+
valid_from: z.iso.datetime().nullable(),
|
|
889
|
+
valid_to: z.iso.datetime().nullable(),
|
|
890
|
+
created_at: z.iso.datetime(),
|
|
891
|
+
updated_at: z.iso.datetime()
|
|
892
|
+
});
|
|
893
|
+
export const zPeopleEmploymentHistoryCorrectionObject = z.object({
|
|
894
|
+
people_employment_id: z.string(),
|
|
895
|
+
user_id: z.string(),
|
|
896
|
+
company_id: z.string(),
|
|
897
|
+
type: z.enum(['EMPLOYEE', 'CONTRACTOR']),
|
|
898
|
+
title: z.string().nullable(),
|
|
899
|
+
compensation_type: z.enum(['hourly', 'salary']),
|
|
900
|
+
payroll_id: z.string().nullable(),
|
|
901
|
+
manager_user_id: z.string().nullable(),
|
|
902
|
+
companies_department_id: z.string().nullable(),
|
|
903
|
+
enrolled_in_t_and_a: z.boolean(),
|
|
904
|
+
overtime_eligible: z.boolean().nullable(),
|
|
905
|
+
overtime_package_id: z.string().nullable(),
|
|
906
|
+
pay_rates_rule_package_id: z.string().nullable(),
|
|
907
|
+
pay_rates_package_id: z.string().nullable(),
|
|
908
|
+
worked_annual_minutes: z.int().nullable(),
|
|
909
|
+
pto_annual_minutes: z.int().nullable(),
|
|
910
|
+
holiday_annual_minutes: z.int().nullable(),
|
|
911
|
+
training_annual_minutes: z.int().nullable(),
|
|
912
|
+
hourly_rate_cents: z.string().nullable(),
|
|
913
|
+
training_annual_amount_cents: z.string().nullable(),
|
|
914
|
+
employer_combined_health_amount_cents: z.string().nullable(),
|
|
915
|
+
employer_combined_savings_cents: z.string().nullable(),
|
|
916
|
+
currency: z.string(),
|
|
917
|
+
valid_from: z.iso.datetime().nullable(),
|
|
918
|
+
valid_to: z.iso.datetime().nullable(),
|
|
919
|
+
created_at: z.iso.datetime(),
|
|
920
|
+
updated_at: z.iso.datetime()
|
|
921
|
+
});
|
|
922
|
+
export const zPeopleEmploymentHistoryVersionObject = z.object({
|
|
923
|
+
people_employment_id: z.string(),
|
|
924
|
+
user_id: z.string(),
|
|
925
|
+
company_id: z.string(),
|
|
926
|
+
type: z.enum(['EMPLOYEE', 'CONTRACTOR']),
|
|
927
|
+
title: z.string().nullable(),
|
|
928
|
+
compensation_type: z.enum(['hourly', 'salary']),
|
|
929
|
+
payroll_id: z.string().nullable(),
|
|
930
|
+
manager_user_id: z.string().nullable(),
|
|
931
|
+
companies_department_id: z.string().nullable(),
|
|
932
|
+
enrolled_in_t_and_a: z.boolean(),
|
|
933
|
+
overtime_eligible: z.boolean().nullable(),
|
|
934
|
+
overtime_package_id: z.string().nullable(),
|
|
935
|
+
pay_rates_rule_package_id: z.string().nullable(),
|
|
936
|
+
pay_rates_package_id: z.string().nullable(),
|
|
937
|
+
worked_annual_minutes: z.int().nullable(),
|
|
938
|
+
pto_annual_minutes: z.int().nullable(),
|
|
939
|
+
holiday_annual_minutes: z.int().nullable(),
|
|
940
|
+
training_annual_minutes: z.int().nullable(),
|
|
941
|
+
hourly_rate_cents: z.string().nullable(),
|
|
942
|
+
training_annual_amount_cents: z.string().nullable(),
|
|
943
|
+
employer_combined_health_amount_cents: z.string().nullable(),
|
|
944
|
+
employer_combined_savings_cents: z.string().nullable(),
|
|
945
|
+
currency: z.string(),
|
|
946
|
+
valid_from: z.iso.datetime().nullable(),
|
|
947
|
+
valid_to: z.iso.datetime().nullable(),
|
|
948
|
+
created_at: z.iso.datetime(),
|
|
949
|
+
updated_at: z.iso.datetime(),
|
|
950
|
+
version_status: z.enum([
|
|
951
|
+
'scheduled',
|
|
952
|
+
'current',
|
|
953
|
+
'historical'
|
|
954
|
+
]),
|
|
955
|
+
corrections: z.array(zPeopleEmploymentHistoryCorrectionObject)
|
|
956
|
+
});
|
|
734
957
|
export const zTimecodeHistoryCorrectionObject = z.object({
|
|
735
958
|
timekeeping_timecode_id: z.string(),
|
|
736
959
|
name: z.string(),
|
|
@@ -823,10 +1046,13 @@ export const zTimecodeParameters = z.object({
|
|
|
823
1046
|
]).optional(),
|
|
824
1047
|
effective_date: z.iso.datetime().optional()
|
|
825
1048
|
});
|
|
1049
|
+
/**
|
|
1050
|
+
* 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.
|
|
1051
|
+
*/
|
|
826
1052
|
export const zTimecodeCorrectionParameters = z.object({
|
|
827
1053
|
effective_from: z.iso.datetime().optional(),
|
|
828
1054
|
effective_to: z.iso.datetime().optional(),
|
|
829
|
-
name: z.string(),
|
|
1055
|
+
name: z.string().optional(),
|
|
830
1056
|
description: z.string().nullish(),
|
|
831
1057
|
description_is_required: z.boolean().optional(),
|
|
832
1058
|
billable: z.boolean().optional(),
|
|
@@ -847,6 +1073,9 @@ export const zTimecodeCorrectionParameters = z.object({
|
|
|
847
1073
|
'job_with_timecode'
|
|
848
1074
|
]).optional()
|
|
849
1075
|
});
|
|
1076
|
+
/**
|
|
1077
|
+
* 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.
|
|
1078
|
+
*/
|
|
850
1079
|
export const zTimecodeGenesisParameters = z.object({
|
|
851
1080
|
effective_date: z.iso.datetime()
|
|
852
1081
|
});
|
|
@@ -900,7 +1129,7 @@ export const zPerDiemResponseObject = z.object({
|
|
|
900
1129
|
updated_at: z.iso.datetime()
|
|
901
1130
|
});
|
|
902
1131
|
/**
|
|
903
|
-
*
|
|
1132
|
+
* Request body for creating a per diem. name, currency, and rate_cents are required.
|
|
904
1133
|
*/
|
|
905
1134
|
export const zPerDiemParameters = z.object({
|
|
906
1135
|
name: z.string(),
|
|
@@ -913,6 +1142,20 @@ export const zPerDiemParameters = z.object({
|
|
|
913
1142
|
work_type_ids: z.array(z.string()).optional(),
|
|
914
1143
|
timekeeping_timecode_ids: z.array(z.string()).optional()
|
|
915
1144
|
});
|
|
1145
|
+
/**
|
|
1146
|
+
* Request body for updating a per diem. Send only the fields to change.
|
|
1147
|
+
*/
|
|
1148
|
+
export const zPerDiemUpdateParameters = z.object({
|
|
1149
|
+
name: z.string().optional(),
|
|
1150
|
+
description: z.string().nullish(),
|
|
1151
|
+
rate_cents: z.string().optional(),
|
|
1152
|
+
currency: z.string().optional(),
|
|
1153
|
+
taxable: z.boolean().optional(),
|
|
1154
|
+
default: z.boolean().nullish(),
|
|
1155
|
+
active: z.boolean().nullish(),
|
|
1156
|
+
work_type_ids: z.array(z.string()).optional(),
|
|
1157
|
+
timekeeping_timecode_ids: z.array(z.string()).optional()
|
|
1158
|
+
});
|
|
916
1159
|
/**
|
|
917
1160
|
* The product's filled attribute values — one entry per attribute assigned to its category.
|
|
918
1161
|
*/
|
|
@@ -962,6 +1205,25 @@ export const zAssetsAttributeParameters = z.object({
|
|
|
962
1205
|
_destroy: z.boolean().optional()
|
|
963
1206
|
})).optional()
|
|
964
1207
|
});
|
|
1208
|
+
/**
|
|
1209
|
+
* 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.
|
|
1210
|
+
*/
|
|
1211
|
+
export const zAssetsAttributeUpdateParameters = z.object({
|
|
1212
|
+
name: z.string().optional(),
|
|
1213
|
+
data_type: z.enum([
|
|
1214
|
+
'text',
|
|
1215
|
+
'number',
|
|
1216
|
+
'date',
|
|
1217
|
+
'boolean',
|
|
1218
|
+
'select'
|
|
1219
|
+
]).optional(),
|
|
1220
|
+
options: z.array(z.object({
|
|
1221
|
+
id: z.string().optional(),
|
|
1222
|
+
value: z.string().optional(),
|
|
1223
|
+
position: z.int().optional(),
|
|
1224
|
+
_destroy: z.boolean().optional()
|
|
1225
|
+
})).optional()
|
|
1226
|
+
});
|
|
965
1227
|
/**
|
|
966
1228
|
* 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
1229
|
*/
|
|
@@ -996,6 +1258,21 @@ export const zAssetsCategoryParameters = z.object({
|
|
|
996
1258
|
_destroy: z.boolean().optional()
|
|
997
1259
|
})).optional()
|
|
998
1260
|
});
|
|
1261
|
+
/**
|
|
1262
|
+
* Update a category. All fields are optional — send only what changes. `category_attributes` sets this category's direct attribute assignments.
|
|
1263
|
+
*/
|
|
1264
|
+
export const zAssetsCategoryUpdateParameters = z.object({
|
|
1265
|
+
name: z.string().optional(),
|
|
1266
|
+
parent_id: z.string().nullish(),
|
|
1267
|
+
category_attributes: z.array(z.object({
|
|
1268
|
+
id: z.string().optional(),
|
|
1269
|
+
assets_attribute_id: z.string(),
|
|
1270
|
+
fillable_on: z.enum(['product', 'item']),
|
|
1271
|
+
required: z.boolean().optional(),
|
|
1272
|
+
position: z.int().optional(),
|
|
1273
|
+
_destroy: z.boolean().optional()
|
|
1274
|
+
})).optional()
|
|
1275
|
+
});
|
|
999
1276
|
/**
|
|
1000
1277
|
* A company department that workers can be assigned to.
|
|
1001
1278
|
*/
|
|
@@ -1008,12 +1285,19 @@ export const zDepartmentResponseObject = z.object({
|
|
|
1008
1285
|
updated_at: z.iso.datetime()
|
|
1009
1286
|
});
|
|
1010
1287
|
/**
|
|
1011
|
-
* Request body for creating
|
|
1288
|
+
* Request body for creating a department.
|
|
1012
1289
|
*/
|
|
1013
1290
|
export const zDepartmentParameters = z.object({
|
|
1014
1291
|
name: z.string(),
|
|
1015
1292
|
description: z.string().nullish()
|
|
1016
1293
|
});
|
|
1294
|
+
/**
|
|
1295
|
+
* Request body for updating a department. Send only the fields to change.
|
|
1296
|
+
*/
|
|
1297
|
+
export const zDepartmentUpdateParameters = z.object({
|
|
1298
|
+
name: z.string().optional(),
|
|
1299
|
+
description: z.string().nullish()
|
|
1300
|
+
});
|
|
1017
1301
|
/**
|
|
1018
1302
|
* A per-diem allowance recorded on a time card for a specific date. Its rate, currency, and taxable flag are snapshotted from the referenced catalog per diem when saved.
|
|
1019
1303
|
*/
|
|
@@ -1030,12 +1314,20 @@ export const zTimeCardPerDiemResponseObject = z.object({
|
|
|
1030
1314
|
updated_at: z.iso.datetime()
|
|
1031
1315
|
});
|
|
1032
1316
|
/**
|
|
1033
|
-
* Request body for recording
|
|
1317
|
+
* 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
1318
|
*/
|
|
1035
1319
|
export const zTimeCardPerDiemParameters = z.object({
|
|
1036
1320
|
date: z.iso.date(),
|
|
1037
1321
|
approver_user_id: z.string(),
|
|
1038
|
-
per_diem_id: z.string()
|
|
1322
|
+
per_diem_id: z.string().optional()
|
|
1323
|
+
});
|
|
1324
|
+
/**
|
|
1325
|
+
* 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.
|
|
1326
|
+
*/
|
|
1327
|
+
export const zTimeCardPerDiemUpdateParameters = z.object({
|
|
1328
|
+
date: z.iso.date().optional(),
|
|
1329
|
+
approver_user_id: z.string().optional(),
|
|
1330
|
+
per_diem_id: z.string().optional()
|
|
1039
1331
|
});
|
|
1040
1332
|
/**
|
|
1041
1333
|
* 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 +1492,7 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
|
|
|
1200
1492
|
corrections: z.array(zPayPeriodConfigHistoryCorrectionObject)
|
|
1201
1493
|
});
|
|
1202
1494
|
/**
|
|
1203
|
-
* Create
|
|
1495
|
+
* 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
1496
|
*/
|
|
1205
1497
|
export const zHolidayParameters = z.object({
|
|
1206
1498
|
name: z.string(),
|
|
@@ -1216,6 +1508,23 @@ export const zHolidayParameters = z.object({
|
|
|
1216
1508
|
banking: z.boolean().optional(),
|
|
1217
1509
|
count_hours_for_overtime: z.boolean().optional()
|
|
1218
1510
|
});
|
|
1511
|
+
/**
|
|
1512
|
+
* Update a holiday on a pay schedule. Send only the fields to change; the resulting fixed or floating definition must remain complete.
|
|
1513
|
+
*/
|
|
1514
|
+
export const zHolidayUpdateParameters = z.object({
|
|
1515
|
+
name: z.string().optional(),
|
|
1516
|
+
date: z.iso.date().optional(),
|
|
1517
|
+
holiday_type: z.enum(['fixed', 'floating']).optional(),
|
|
1518
|
+
month: z.int().optional(),
|
|
1519
|
+
mday: z.int().optional(),
|
|
1520
|
+
wday: z.int().optional(),
|
|
1521
|
+
week: z.int().optional(),
|
|
1522
|
+
year: z.int().optional(),
|
|
1523
|
+
move_to_weekday: z.boolean().optional(),
|
|
1524
|
+
overtime: z.boolean().optional(),
|
|
1525
|
+
banking: z.boolean().optional(),
|
|
1526
|
+
count_hours_for_overtime: z.boolean().optional()
|
|
1527
|
+
});
|
|
1219
1528
|
/**
|
|
1220
1529
|
* 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
1530
|
*/
|
|
@@ -1312,10 +1621,9 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
|
|
|
1312
1621
|
])).nullable()
|
|
1313
1622
|
});
|
|
1314
1623
|
/**
|
|
1315
|
-
* Create
|
|
1624
|
+
* 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
1625
|
*/
|
|
1317
1626
|
export const zPwaCompanyUserDetailsParameters = z.object({
|
|
1318
|
-
company_id: z.string(),
|
|
1319
1627
|
user_id: z.string(),
|
|
1320
1628
|
address1: z.string().nullish(),
|
|
1321
1629
|
address2: z.string().nullish(),
|
|
@@ -1405,6 +1713,98 @@ export const zPwaCompanyUserDetailsParameters = z.object({
|
|
|
1405
1713
|
'portuguese_or_brazilian'
|
|
1406
1714
|
])).nullish()
|
|
1407
1715
|
});
|
|
1716
|
+
/**
|
|
1717
|
+
* 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.
|
|
1718
|
+
*/
|
|
1719
|
+
export const zPwaCompanyUserDetailsUpdateParameters = z.object({
|
|
1720
|
+
address1: z.string().nullish(),
|
|
1721
|
+
address2: z.string().nullish(),
|
|
1722
|
+
city: z.string().nullish(),
|
|
1723
|
+
state: z.string().nullish(),
|
|
1724
|
+
zip: z.string().nullish(),
|
|
1725
|
+
race: z.array(z.enum([
|
|
1726
|
+
'AFRICAN_AMERICAN',
|
|
1727
|
+
'ASIAN',
|
|
1728
|
+
'CAUCASIAN',
|
|
1729
|
+
'NATIVE_AMERICAN',
|
|
1730
|
+
'NOT_SPECIFIED',
|
|
1731
|
+
'OTHER'
|
|
1732
|
+
])).nullish(),
|
|
1733
|
+
sex: z.enum([
|
|
1734
|
+
'female',
|
|
1735
|
+
'male',
|
|
1736
|
+
'non_binary',
|
|
1737
|
+
'not_specified'
|
|
1738
|
+
]).nullish(),
|
|
1739
|
+
local_business_license: z.string().nullish(),
|
|
1740
|
+
drivers_license_state: z.string().nullish(),
|
|
1741
|
+
drivers_license_number: z.string().nullish(),
|
|
1742
|
+
ssn: z.string().nullish(),
|
|
1743
|
+
veteran_status: z.enum([
|
|
1744
|
+
'protected_veteran',
|
|
1745
|
+
'not_protected_veteran',
|
|
1746
|
+
'reserves',
|
|
1747
|
+
'guard',
|
|
1748
|
+
'not_specified'
|
|
1749
|
+
]).nullish(),
|
|
1750
|
+
hispanic_origin: z.enum([
|
|
1751
|
+
'yes',
|
|
1752
|
+
'no',
|
|
1753
|
+
'not_specified'
|
|
1754
|
+
]).nullish(),
|
|
1755
|
+
ca_dir_withholding_exemptions: z.int().nullish(),
|
|
1756
|
+
disabled: z.boolean().optional(),
|
|
1757
|
+
il_dol_race: z.enum([
|
|
1758
|
+
'white',
|
|
1759
|
+
'black',
|
|
1760
|
+
'hispanic_or_latino',
|
|
1761
|
+
'american_indian_or_alaska_native',
|
|
1762
|
+
'chinese',
|
|
1763
|
+
'filipino',
|
|
1764
|
+
'asian_india',
|
|
1765
|
+
'vietnamese',
|
|
1766
|
+
'korean',
|
|
1767
|
+
'japanese',
|
|
1768
|
+
'native_hawaiian',
|
|
1769
|
+
'samoan',
|
|
1770
|
+
'chamorro',
|
|
1771
|
+
'other_asian',
|
|
1772
|
+
'other_pacific_islander',
|
|
1773
|
+
'other'
|
|
1774
|
+
]).nullish(),
|
|
1775
|
+
il_shines_employment_type: z.enum([
|
|
1776
|
+
'part_time',
|
|
1777
|
+
'full_time',
|
|
1778
|
+
'seasonal_temporary',
|
|
1779
|
+
'independent_contract'
|
|
1780
|
+
]).nullish(),
|
|
1781
|
+
il_shines_eep_qualifiers: z.array(z.enum([
|
|
1782
|
+
'eep_program_completed',
|
|
1783
|
+
'foster_care',
|
|
1784
|
+
'formerly_incarcerated',
|
|
1785
|
+
'equity_investment_eligible_community',
|
|
1786
|
+
'self_registered_or_unknown'
|
|
1787
|
+
])).nullish(),
|
|
1788
|
+
il_shines_other_programs: z.array(z.enum([
|
|
1789
|
+
'solar_training_pipeline_program',
|
|
1790
|
+
'craft_apprenticeship_program',
|
|
1791
|
+
'multi_cultural_jobs_program',
|
|
1792
|
+
'clean_jobs_workforce_network_program',
|
|
1793
|
+
'illinois_climate_works_prep_apprenticeship_program',
|
|
1794
|
+
'returning_residents_clean_jobs_training_program',
|
|
1795
|
+
'other'
|
|
1796
|
+
])).nullish(),
|
|
1797
|
+
or_boli_schedule_type: z.enum(['five_eight', 'four_ten']).nullish(),
|
|
1798
|
+
or_boli_race: z.array(z.enum([
|
|
1799
|
+
'american_indian_or_alaska_native',
|
|
1800
|
+
'asian',
|
|
1801
|
+
'hispanic_or_latino',
|
|
1802
|
+
'black_or_african_american',
|
|
1803
|
+
'native_hawaiian_or_pacific_islander',
|
|
1804
|
+
'white',
|
|
1805
|
+
'portuguese_or_brazilian'
|
|
1806
|
+
])).nullish()
|
|
1807
|
+
});
|
|
1408
1808
|
/**
|
|
1409
1809
|
* 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
1810
|
*/
|
|
@@ -1498,11 +1898,17 @@ export const zGroupResponseObject = z.object({
|
|
|
1498
1898
|
updated_at: z.iso.datetime()
|
|
1499
1899
|
});
|
|
1500
1900
|
/**
|
|
1501
|
-
* Request body for creating
|
|
1901
|
+
* Request body for creating a group.
|
|
1502
1902
|
*/
|
|
1503
1903
|
export const zGroupParameters = z.object({
|
|
1504
1904
|
name: z.string()
|
|
1505
1905
|
});
|
|
1906
|
+
/**
|
|
1907
|
+
* Request body for updating a group. Send only the fields to change.
|
|
1908
|
+
*/
|
|
1909
|
+
export const zGroupUpdateParameters = z.object({
|
|
1910
|
+
name: z.string().optional()
|
|
1911
|
+
});
|
|
1506
1912
|
/**
|
|
1507
1913
|
* 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
1914
|
*/
|
|
@@ -1668,12 +2074,19 @@ export const zPositionFunctionResponseObject = z.object({
|
|
|
1668
2074
|
updated_at: z.iso.datetime()
|
|
1669
2075
|
});
|
|
1670
2076
|
/**
|
|
1671
|
-
* Request body for creating
|
|
2077
|
+
* Request body for creating a position function.
|
|
1672
2078
|
*/
|
|
1673
2079
|
export const zPositionFunctionParameters = z.object({
|
|
1674
2080
|
value: z.string(),
|
|
1675
2081
|
description: z.string()
|
|
1676
2082
|
});
|
|
2083
|
+
/**
|
|
2084
|
+
* Request body for updating a position function. Send only the fields to change.
|
|
2085
|
+
*/
|
|
2086
|
+
export const zPositionFunctionUpdateParameters = z.object({
|
|
2087
|
+
value: z.string().optional(),
|
|
2088
|
+
description: z.string().optional()
|
|
2089
|
+
});
|
|
1677
2090
|
export const zCompanyResponseObject = z.object({
|
|
1678
2091
|
id: z.string(),
|
|
1679
2092
|
name: z.string(),
|
|
@@ -2404,7 +2817,7 @@ export const zPayrollFringeBenefitPlanResponseObject = z.object({
|
|
|
2404
2817
|
updated_at: z.iso.datetime()
|
|
2405
2818
|
});
|
|
2406
2819
|
/**
|
|
2407
|
-
* Request body for creating
|
|
2820
|
+
* Request body for creating a fringe-benefit plan. timekeeping_pay_period_config_id, name, plan_number, and benefit_category are required.
|
|
2408
2821
|
*/
|
|
2409
2822
|
export const zPayrollFringeBenefitPlanParameters = z.object({
|
|
2410
2823
|
timekeeping_pay_period_config_id: z.string(),
|
|
@@ -2428,6 +2841,31 @@ export const zPayrollFringeBenefitPlanParameters = z.object({
|
|
|
2428
2841
|
il_sponsor_name: z.string().nullish(),
|
|
2429
2842
|
il_admin_name: z.string().nullish()
|
|
2430
2843
|
});
|
|
2844
|
+
/**
|
|
2845
|
+
* Request body for updating a fringe-benefit plan. Send only the fields to change.
|
|
2846
|
+
*/
|
|
2847
|
+
export const zPayrollFringeBenefitPlanUpdateParameters = z.object({
|
|
2848
|
+
timekeeping_pay_period_config_id: z.string().optional(),
|
|
2849
|
+
name: z.string().optional(),
|
|
2850
|
+
plan_number: z.string().optional(),
|
|
2851
|
+
funded: z.boolean().optional(),
|
|
2852
|
+
benefit_category: z.enum([
|
|
2853
|
+
'employer_combined_health',
|
|
2854
|
+
'employer_combined_savings',
|
|
2855
|
+
'employer_combined_holiday_pto',
|
|
2856
|
+
'employer_training',
|
|
2857
|
+
'employer_other_contributions'
|
|
2858
|
+
]).optional(),
|
|
2859
|
+
il_jointly_managed: z.boolean().optional(),
|
|
2860
|
+
il_fund_name: z.string().nullish(),
|
|
2861
|
+
il_fund_address1: z.string().nullish(),
|
|
2862
|
+
il_fund_address2: z.string().nullish(),
|
|
2863
|
+
il_fund_city: z.string().nullish(),
|
|
2864
|
+
il_fund_state: z.string().nullish(),
|
|
2865
|
+
il_fund_zip: z.string().nullish(),
|
|
2866
|
+
il_sponsor_name: z.string().nullish(),
|
|
2867
|
+
il_admin_name: z.string().nullish()
|
|
2868
|
+
});
|
|
2431
2869
|
/**
|
|
2432
2870
|
* 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
2871
|
*/
|
|
@@ -2552,7 +2990,7 @@ export const zPayrollRunResponseObject = z.object({
|
|
|
2552
2990
|
updated_at: z.iso.datetime()
|
|
2553
2991
|
});
|
|
2554
2992
|
/**
|
|
2555
|
-
*
|
|
2993
|
+
* 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
2994
|
*/
|
|
2557
2995
|
export const zPayrollRunParameters = z.object({
|
|
2558
2996
|
company_id: z.string(),
|
|
@@ -2569,6 +3007,23 @@ export const zPayrollRunParameters = z.object({
|
|
|
2569
3007
|
run_date: z.iso.date(),
|
|
2570
3008
|
external_id: z.string().nullish()
|
|
2571
3009
|
});
|
|
3010
|
+
/**
|
|
3011
|
+
* 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.
|
|
3012
|
+
*/
|
|
3013
|
+
export const zPayrollRunUpdateParameters = z.object({
|
|
3014
|
+
timekeeping_pay_period_id: z.string().nullish(),
|
|
3015
|
+
payrolls_credential_id: z.string().nullish(),
|
|
3016
|
+
run_type: z.enum([
|
|
3017
|
+
'CORRECTION',
|
|
3018
|
+
'ON_CYCLE',
|
|
3019
|
+
'OFF_CYCLE',
|
|
3020
|
+
'RECONCILIATION',
|
|
3021
|
+
'SIGN_ON_BONUS',
|
|
3022
|
+
'TERMINATION'
|
|
3023
|
+
]).optional(),
|
|
3024
|
+
run_date: z.iso.date().optional(),
|
|
3025
|
+
external_id: z.string().nullish()
|
|
3026
|
+
});
|
|
2572
3027
|
/**
|
|
2573
3028
|
* 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
3029
|
*/
|
|
@@ -2655,7 +3110,11 @@ export const zSiteCheckInResponseObject = z.object({
|
|
|
2655
3110
|
employer_name: z.string().nullable(),
|
|
2656
3111
|
description: z.string().nullable(),
|
|
2657
3112
|
rationale: z.string().nullable(),
|
|
2658
|
-
source: z.enum([
|
|
3113
|
+
source: z.enum([
|
|
3114
|
+
'manual',
|
|
3115
|
+
'auto',
|
|
3116
|
+
'public_form'
|
|
3117
|
+
]),
|
|
2659
3118
|
nerc_check_in: z.boolean(),
|
|
2660
3119
|
cip_exceptional: z.boolean(),
|
|
2661
3120
|
created_by_user_id: z.string().nullable(),
|
|
@@ -3152,7 +3611,7 @@ export const zPaystubResponseObject = z.object({
|
|
|
3152
3611
|
updated_at: z.iso.datetime()
|
|
3153
3612
|
});
|
|
3154
3613
|
/**
|
|
3155
|
-
* Request body for creating
|
|
3614
|
+
* 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
3615
|
*/
|
|
3157
3616
|
export const zPaystubParameters = z.object({
|
|
3158
3617
|
payrolls_payroll_run_id: z.string(),
|
|
@@ -3161,6 +3620,16 @@ export const zPaystubParameters = z.object({
|
|
|
3161
3620
|
external_id: z.string().nullish(),
|
|
3162
3621
|
check_number: z.string().nullish()
|
|
3163
3622
|
});
|
|
3623
|
+
/**
|
|
3624
|
+
* Request body for updating a paystub. Send only the fields to change; the resulting paystub must still match its payroll run type.
|
|
3625
|
+
*/
|
|
3626
|
+
export const zPaystubUpdateParameters = z.object({
|
|
3627
|
+
payrolls_payroll_run_id: z.string().optional(),
|
|
3628
|
+
user_id: z.string().optional(),
|
|
3629
|
+
timekeeping_time_card_id: z.string().nullish(),
|
|
3630
|
+
external_id: z.string().nullish(),
|
|
3631
|
+
check_number: z.string().nullish()
|
|
3632
|
+
});
|
|
3164
3633
|
/**
|
|
3165
3634
|
* An adjustment applied in the current pay period to correct a prior one, tied to the paystub line item it corrects.
|
|
3166
3635
|
*/
|
|
@@ -3320,7 +3789,7 @@ export const zPaystubLineItemResponseObject = z.object({
|
|
|
3320
3789
|
updated_at: z.iso.datetime()
|
|
3321
3790
|
});
|
|
3322
3791
|
/**
|
|
3323
|
-
* Request body for creating
|
|
3792
|
+
* Request body for creating a paystub line item. All four fields are required.
|
|
3324
3793
|
*/
|
|
3325
3794
|
export const zPaystubLineItemParameters = z.object({
|
|
3326
3795
|
payrolls_paystub_id: z.string(),
|
|
@@ -3328,6 +3797,15 @@ export const zPaystubLineItemParameters = z.object({
|
|
|
3328
3797
|
contributor: z.enum(['employee', 'employer']),
|
|
3329
3798
|
payrolls_external_map_id: z.string()
|
|
3330
3799
|
});
|
|
3800
|
+
/**
|
|
3801
|
+
* Request body for updating a paystub line item. Send only the fields to change.
|
|
3802
|
+
*/
|
|
3803
|
+
export const zPaystubLineItemUpdateParameters = z.object({
|
|
3804
|
+
payrolls_paystub_id: z.string().optional(),
|
|
3805
|
+
amount_cents: z.string().optional(),
|
|
3806
|
+
contributor: z.enum(['employee', 'employer']).optional(),
|
|
3807
|
+
payrolls_external_map_id: z.string().optional()
|
|
3808
|
+
});
|
|
3331
3809
|
/**
|
|
3332
3810
|
* Request body for creating or updating a position on a job. The job is taken from the URL path.
|
|
3333
3811
|
*/
|
|
@@ -3476,7 +3954,7 @@ export const zFormAssignmentTaskResponseObject = z.array(z.object({
|
|
|
3476
3954
|
}))
|
|
3477
3955
|
}));
|
|
3478
3956
|
/**
|
|
3479
|
-
* Request body for creating
|
|
3957
|
+
* 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
3958
|
*/
|
|
3481
3959
|
export const zCertificationParameters = z.object({
|
|
3482
3960
|
company_id: z.string(),
|
|
@@ -3485,6 +3963,16 @@ export const zCertificationParameters = z.object({
|
|
|
3485
3963
|
verified: z.boolean().optional(),
|
|
3486
3964
|
duration: z.string().nullish()
|
|
3487
3965
|
});
|
|
3966
|
+
/**
|
|
3967
|
+
* 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.
|
|
3968
|
+
*/
|
|
3969
|
+
export const zCertificationUpdateParameters = z.object({
|
|
3970
|
+
company_id: z.string().optional(),
|
|
3971
|
+
name: z.string().optional(),
|
|
3972
|
+
description: z.string().nullish(),
|
|
3973
|
+
verified: z.boolean().optional(),
|
|
3974
|
+
duration: z.string().nullish()
|
|
3975
|
+
});
|
|
3488
3976
|
/**
|
|
3489
3977
|
* A certification package — a named set of certifications your company requires together.
|
|
3490
3978
|
*/
|
|
@@ -3500,7 +3988,7 @@ export const zCertificationPackageResponseObject = z.object({
|
|
|
3500
3988
|
updated_at: z.iso.datetime()
|
|
3501
3989
|
});
|
|
3502
3990
|
/**
|
|
3503
|
-
* Request body for creating
|
|
3991
|
+
* Request body for creating a certification package — a named set of certifications a company requires together.
|
|
3504
3992
|
*/
|
|
3505
3993
|
export const zCertificationPackageParameters = z.object({
|
|
3506
3994
|
name: z.string(),
|
|
@@ -3508,6 +3996,15 @@ export const zCertificationPackageParameters = z.object({
|
|
|
3508
3996
|
certification_ids: z.array(z.string()).optional(),
|
|
3509
3997
|
performed_by_user_id: z.string()
|
|
3510
3998
|
});
|
|
3999
|
+
/**
|
|
4000
|
+
* Request body for updating a certification package — a named set of certifications a company requires together. Include only the fields to change.
|
|
4001
|
+
*/
|
|
4002
|
+
export const zCertificationPackageUpdateParameters = z.object({
|
|
4003
|
+
name: z.string().optional(),
|
|
4004
|
+
description: z.string().nullish(),
|
|
4005
|
+
certification_ids: z.array(z.string()).optional(),
|
|
4006
|
+
performed_by_user_id: z.string()
|
|
4007
|
+
});
|
|
3511
4008
|
/**
|
|
3512
4009
|
* A certification — a named qualification a worker can hold, either owned by your company or a global (platform) credential type (company_id null).
|
|
3513
4010
|
*/
|
|
@@ -4908,6 +5405,13 @@ export const zAssetsVendorParameters = z.object({
|
|
|
4908
5405
|
name: z.string(),
|
|
4909
5406
|
logo_signed_id: z.string().optional()
|
|
4910
5407
|
});
|
|
5408
|
+
/**
|
|
5409
|
+
* Update a vendor. All fields are optional — send only what changes.
|
|
5410
|
+
*/
|
|
5411
|
+
export const zAssetsVendorUpdateParameters = z.object({
|
|
5412
|
+
name: z.string().optional(),
|
|
5413
|
+
logo_signed_id: z.string().optional()
|
|
5414
|
+
});
|
|
4911
5415
|
/**
|
|
4912
5416
|
* A location that holds a company's assets and inventory — a warehouse or yard, optionally backed by a site on the Atlas map.
|
|
4913
5417
|
*/
|
|
@@ -4933,6 +5437,9 @@ export const zAssetsSiteParameters = z.intersection(z.union([
|
|
|
4933
5437
|
site_id: z.string().nullish(),
|
|
4934
5438
|
name: z.string().nullish()
|
|
4935
5439
|
}));
|
|
5440
|
+
/**
|
|
5441
|
+
* 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`.
|
|
5442
|
+
*/
|
|
4936
5443
|
export const zAssetsSiteUpdateParameters = z.object({
|
|
4937
5444
|
kind: z.enum(['warehouse', 'yard']).optional(),
|
|
4938
5445
|
site_id: z.string().nullish(),
|
|
@@ -5621,6 +6128,47 @@ export const zAssetsArchiveParameters = z.object({
|
|
|
5621
6128
|
export const zListApiKeyScopesResponse = z.object({
|
|
5622
6129
|
data: z.array(zApiKeyScopeResponseObject)
|
|
5623
6130
|
});
|
|
6131
|
+
export const zListAllocationsPath = z.object({
|
|
6132
|
+
apprentice_id: z.string()
|
|
6133
|
+
});
|
|
6134
|
+
export const zListAllocationsQuery = z.object({
|
|
6135
|
+
'filter[allocated_at][gte]': z.iso.datetime().optional(),
|
|
6136
|
+
'filter[allocated_at][lte]': z.iso.datetime().optional(),
|
|
6137
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
6138
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
6139
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
6140
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
6141
|
+
filter: z.string().optional(),
|
|
6142
|
+
'filter[unexpected]': z.string().optional(),
|
|
6143
|
+
'page[cursor]': z.string().optional(),
|
|
6144
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
6145
|
+
page: z.string().optional()
|
|
6146
|
+
});
|
|
6147
|
+
/**
|
|
6148
|
+
* Success
|
|
6149
|
+
*/
|
|
6150
|
+
export const zListAllocationsResponse = z.object({
|
|
6151
|
+
meta: zMeta,
|
|
6152
|
+
links: zLinks,
|
|
6153
|
+
data: z.array(zApprenticeshipAllocationResponseObject)
|
|
6154
|
+
});
|
|
6155
|
+
export const zGetAllocationPath = z.object({
|
|
6156
|
+
apprentice_id: z.string(),
|
|
6157
|
+
id: z.string()
|
|
6158
|
+
});
|
|
6159
|
+
/**
|
|
6160
|
+
* Success
|
|
6161
|
+
*/
|
|
6162
|
+
export const zGetAllocationResponse = zApprenticeshipAllocationResponseObject;
|
|
6163
|
+
export const zUpdateAllocationBody = zApprenticeshipAllocationUpdateParameters;
|
|
6164
|
+
export const zUpdateAllocationPath = z.object({
|
|
6165
|
+
apprentice_id: z.string(),
|
|
6166
|
+
id: z.string()
|
|
6167
|
+
});
|
|
6168
|
+
/**
|
|
6169
|
+
* Success
|
|
6170
|
+
*/
|
|
6171
|
+
export const zUpdateAllocationResponse = zApprenticeshipAllocationResponseObject;
|
|
5624
6172
|
export const zListApprenticesPath = z.object({
|
|
5625
6173
|
program_id: z.string()
|
|
5626
6174
|
});
|
|
@@ -5683,7 +6231,7 @@ export const zCreateOccupationPath = z.object({
|
|
|
5683
6231
|
* Created
|
|
5684
6232
|
*/
|
|
5685
6233
|
export const zCreateOccupationResponse = zApprenticeshipOccupationResponseObject;
|
|
5686
|
-
export const zUpdateOccupationBody =
|
|
6234
|
+
export const zUpdateOccupationBody = zApprenticeshipOccupationUpdateParameters;
|
|
5687
6235
|
export const zUpdateOccupationPath = z.object({
|
|
5688
6236
|
program_id: z.string(),
|
|
5689
6237
|
id: z.string()
|
|
@@ -5730,7 +6278,7 @@ export const zDeleteEmployerPath = z.object({
|
|
|
5730
6278
|
* Success
|
|
5731
6279
|
*/
|
|
5732
6280
|
export const zDeleteEmployerResponse = zApprenticeshipProgramEmployerResponseObject;
|
|
5733
|
-
export const zUpdateEmployerBody =
|
|
6281
|
+
export const zUpdateEmployerBody = zApprenticeshipProgramEmployerUpdateParameters;
|
|
5734
6282
|
export const zUpdateEmployerPath = z.object({
|
|
5735
6283
|
program_id: z.string(),
|
|
5736
6284
|
id: z.string()
|
|
@@ -5763,7 +6311,7 @@ export const zCreateProgramBody = zApprenticeshipProgramParameters;
|
|
|
5763
6311
|
* Created
|
|
5764
6312
|
*/
|
|
5765
6313
|
export const zCreateProgramResponse = zApprenticeshipProgramResponseObject;
|
|
5766
|
-
export const zUpdateProgramBody =
|
|
6314
|
+
export const zUpdateProgramBody = zApprenticeshipProgramUpdateParameters;
|
|
5767
6315
|
export const zUpdateProgramPath = z.object({
|
|
5768
6316
|
id: z.string()
|
|
5769
6317
|
});
|
|
@@ -5801,7 +6349,7 @@ export const zCreatePeriodPath = z.object({
|
|
|
5801
6349
|
* Created
|
|
5802
6350
|
*/
|
|
5803
6351
|
export const zCreatePeriodResponse = zApprenticeshipWageSchedulePeriodResponseObject;
|
|
5804
|
-
export const zUpdatePeriodBody =
|
|
6352
|
+
export const zUpdatePeriodBody = zApprenticeshipWageSchedulePeriodUpdateParameters;
|
|
5805
6353
|
export const zUpdatePeriodPath = z.object({
|
|
5806
6354
|
wage_schedule_id: z.string(),
|
|
5807
6355
|
id: z.string()
|
|
@@ -5840,7 +6388,7 @@ export const zCreateWageSchedulePath = z.object({
|
|
|
5840
6388
|
* Created
|
|
5841
6389
|
*/
|
|
5842
6390
|
export const zCreateWageScheduleResponse = zApprenticeshipWageScheduleResponseObject;
|
|
5843
|
-
export const zUpdateWageScheduleBody =
|
|
6391
|
+
export const zUpdateWageScheduleBody = zApprenticeshipWageScheduleUpdateParameters;
|
|
5844
6392
|
export const zUpdateWageSchedulePath = z.object({
|
|
5845
6393
|
occupation_id: z.string(),
|
|
5846
6394
|
id: z.string()
|
|
@@ -5888,7 +6436,7 @@ export const zGetAttributePath = z.object({
|
|
|
5888
6436
|
* Success
|
|
5889
6437
|
*/
|
|
5890
6438
|
export const zGetAttributeResponse = zAssetsAttributeResponseObject;
|
|
5891
|
-
export const zUpdateAttributeBody =
|
|
6439
|
+
export const zUpdateAttributeBody = zAssetsAttributeUpdateParameters;
|
|
5892
6440
|
export const zUpdateAttributePath = z.object({
|
|
5893
6441
|
id: z.string()
|
|
5894
6442
|
});
|
|
@@ -5934,7 +6482,7 @@ export const zGetCategoryPath = z.object({
|
|
|
5934
6482
|
* Success
|
|
5935
6483
|
*/
|
|
5936
6484
|
export const zGetCategoryResponse = zAssetsCategoryResponseObject;
|
|
5937
|
-
export const zUpdateCategoryBody =
|
|
6485
|
+
export const zUpdateCategoryBody = zAssetsCategoryUpdateParameters;
|
|
5938
6486
|
export const zUpdateCategoryPath = z.object({
|
|
5939
6487
|
id: z.string()
|
|
5940
6488
|
});
|
|
@@ -6644,7 +7192,7 @@ export const zGetVendorPath = z.object({
|
|
|
6644
7192
|
* Success
|
|
6645
7193
|
*/
|
|
6646
7194
|
export const zGetVendorResponse = zAssetsVendorResponseObject;
|
|
6647
|
-
export const zUpdateVendorBody =
|
|
7195
|
+
export const zUpdateVendorBody = zAssetsVendorUpdateParameters;
|
|
6648
7196
|
export const zUpdateVendorPath = z.object({
|
|
6649
7197
|
id: z.string()
|
|
6650
7198
|
});
|
|
@@ -6766,7 +7314,7 @@ export const zGetPackagePath = z.object({
|
|
|
6766
7314
|
* Success
|
|
6767
7315
|
*/
|
|
6768
7316
|
export const zGetPackageResponse = zCertificationPackageResponseObject;
|
|
6769
|
-
export const zUpdatePackageBody =
|
|
7317
|
+
export const zUpdatePackageBody = zCertificationPackageUpdateParameters;
|
|
6770
7318
|
export const zUpdatePackagePath = z.object({
|
|
6771
7319
|
id: z.string()
|
|
6772
7320
|
});
|
|
@@ -6845,7 +7393,7 @@ export const zGetCertificationPath = z.object({
|
|
|
6845
7393
|
* Success
|
|
6846
7394
|
*/
|
|
6847
7395
|
export const zGetCertificationResponse = zCertificationResponseObject;
|
|
6848
|
-
export const zUpdateCertificationBody =
|
|
7396
|
+
export const zUpdateCertificationBody = zCertificationUpdateParameters;
|
|
6849
7397
|
export const zUpdateCertificationPath = z.object({
|
|
6850
7398
|
id: z.string()
|
|
6851
7399
|
});
|
|
@@ -6877,7 +7425,7 @@ export const zCreateDepartmentBody = zDepartmentParameters;
|
|
|
6877
7425
|
* Created
|
|
6878
7426
|
*/
|
|
6879
7427
|
export const zCreateDepartmentResponse = zDepartmentResponseObject;
|
|
6880
|
-
export const zUpdateDepartmentBody =
|
|
7428
|
+
export const zUpdateDepartmentBody = zDepartmentUpdateParameters;
|
|
6881
7429
|
export const zUpdateDepartmentPath = z.object({
|
|
6882
7430
|
id: z.string()
|
|
6883
7431
|
});
|
|
@@ -7153,7 +7701,7 @@ export const zGetGroupPath = z.object({
|
|
|
7153
7701
|
* Success
|
|
7154
7702
|
*/
|
|
7155
7703
|
export const zGetGroupResponse = zGroupResponseObject;
|
|
7156
|
-
export const zUpdateGroupBody =
|
|
7704
|
+
export const zUpdateGroupBody = zGroupUpdateParameters;
|
|
7157
7705
|
export const zUpdateGroupPath = z.object({
|
|
7158
7706
|
id: z.string()
|
|
7159
7707
|
});
|
|
@@ -7897,7 +8445,7 @@ export const zGetFringeBenefitPlanPath = z.object({
|
|
|
7897
8445
|
* Success
|
|
7898
8446
|
*/
|
|
7899
8447
|
export const zGetFringeBenefitPlanResponse = zPayrollFringeBenefitPlanResponseObject;
|
|
7900
|
-
export const zUpdateFringeBenefitPlanBody =
|
|
8448
|
+
export const zUpdateFringeBenefitPlanBody = zPayrollFringeBenefitPlanUpdateParameters;
|
|
7901
8449
|
export const zUpdateFringeBenefitPlanPath = z.object({
|
|
7902
8450
|
id: z.string()
|
|
7903
8451
|
});
|
|
@@ -7984,7 +8532,7 @@ export const zGetPayrollRunPath = z.object({
|
|
|
7984
8532
|
* Success
|
|
7985
8533
|
*/
|
|
7986
8534
|
export const zGetPayrollRunResponse = zPayrollRunResponseObject;
|
|
7987
|
-
export const zUpdatePayrollRunBody =
|
|
8535
|
+
export const zUpdatePayrollRunBody = zPayrollRunUpdateParameters;
|
|
7988
8536
|
export const zUpdatePayrollRunPath = z.object({
|
|
7989
8537
|
id: z.string()
|
|
7990
8538
|
});
|
|
@@ -8023,7 +8571,7 @@ export const zGetPaystubLineItemPath = z.object({
|
|
|
8023
8571
|
* Success
|
|
8024
8572
|
*/
|
|
8025
8573
|
export const zGetPaystubLineItemResponse = zPaystubLineItemResponseObject;
|
|
8026
|
-
export const zUpdatePaystubLineItemBody =
|
|
8574
|
+
export const zUpdatePaystubLineItemBody = zPaystubLineItemUpdateParameters;
|
|
8027
8575
|
export const zUpdatePaystubLineItemPath = z.object({
|
|
8028
8576
|
id: z.string()
|
|
8029
8577
|
});
|
|
@@ -8064,7 +8612,7 @@ export const zGetPaystubPath = z.object({
|
|
|
8064
8612
|
* Success
|
|
8065
8613
|
*/
|
|
8066
8614
|
export const zGetPaystubResponse = zPaystubResponseObject;
|
|
8067
|
-
export const zUpdatePaystubBody =
|
|
8615
|
+
export const zUpdatePaystubBody = zPaystubUpdateParameters;
|
|
8068
8616
|
export const zUpdatePaystubPath = z.object({
|
|
8069
8617
|
id: z.string()
|
|
8070
8618
|
});
|
|
@@ -8072,6 +8620,73 @@ export const zUpdatePaystubPath = z.object({
|
|
|
8072
8620
|
* Success
|
|
8073
8621
|
*/
|
|
8074
8622
|
export const zUpdatePaystubResponse = zPaystubResponseObject;
|
|
8623
|
+
export const zListEmploymentHistoryPath = z.object({
|
|
8624
|
+
employment_id: z.string()
|
|
8625
|
+
});
|
|
8626
|
+
export const zListEmploymentHistoryQuery = z.object({
|
|
8627
|
+
'as_of[valid]': z.string().optional(),
|
|
8628
|
+
'as_of[transaction]': z.string().optional(),
|
|
8629
|
+
'page[cursor]': z.string().optional(),
|
|
8630
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
8631
|
+
page: z.string().optional()
|
|
8632
|
+
});
|
|
8633
|
+
/**
|
|
8634
|
+
* Success
|
|
8635
|
+
*/
|
|
8636
|
+
export const zListEmploymentHistoryResponse = z.object({
|
|
8637
|
+
meta: zMeta,
|
|
8638
|
+
links: zLinks,
|
|
8639
|
+
data: z.array(zPeopleEmploymentHistoryVersionObject)
|
|
8640
|
+
});
|
|
8641
|
+
export const zListEmploymentsHistoryQuery = z.object({
|
|
8642
|
+
'filter[user_id]': z.string().optional(),
|
|
8643
|
+
'as_of[valid]': z.string().optional(),
|
|
8644
|
+
'as_of[transaction]': z.string().optional(),
|
|
8645
|
+
filter: z.string().optional(),
|
|
8646
|
+
'filter[unexpected]': z.string().optional(),
|
|
8647
|
+
'page[cursor]': z.string().optional(),
|
|
8648
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
8649
|
+
page: z.string().optional()
|
|
8650
|
+
});
|
|
8651
|
+
/**
|
|
8652
|
+
* Success
|
|
8653
|
+
*/
|
|
8654
|
+
export const zListEmploymentsHistoryResponse = z.object({
|
|
8655
|
+
meta: zMeta,
|
|
8656
|
+
links: zLinks,
|
|
8657
|
+
data: z.array(zPeopleEmploymentHistoryVersionObject)
|
|
8658
|
+
});
|
|
8659
|
+
export const zListEmploymentsQuery = z.object({
|
|
8660
|
+
'filter[user_id]': z.string().optional(),
|
|
8661
|
+
filter: z.string().optional(),
|
|
8662
|
+
'filter[unexpected]': z.string().optional(),
|
|
8663
|
+
'as_of[valid]': z.iso.datetime().optional(),
|
|
8664
|
+
as_of: z.string().optional(),
|
|
8665
|
+
'as_of[bogus_axis]': z.string().optional(),
|
|
8666
|
+
'as_of[valid][gte]': z.string().optional(),
|
|
8667
|
+
'as_of[transaction]': z.string().optional(),
|
|
8668
|
+
'page[cursor]': z.string().optional(),
|
|
8669
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
8670
|
+
page: z.string().optional()
|
|
8671
|
+
});
|
|
8672
|
+
/**
|
|
8673
|
+
* Success in a gap between employment stints
|
|
8674
|
+
*/
|
|
8675
|
+
export const zListEmploymentsResponse = z.object({
|
|
8676
|
+
meta: zMeta,
|
|
8677
|
+
links: zLinks,
|
|
8678
|
+
data: z.array(zPeopleEmploymentResponseObject)
|
|
8679
|
+
});
|
|
8680
|
+
export const zGetEmploymentPath = z.object({
|
|
8681
|
+
id: z.string()
|
|
8682
|
+
});
|
|
8683
|
+
export const zGetEmploymentQuery = z.object({
|
|
8684
|
+
'as_of[valid]': z.iso.datetime().optional()
|
|
8685
|
+
});
|
|
8686
|
+
/**
|
|
8687
|
+
* Success
|
|
8688
|
+
*/
|
|
8689
|
+
export const zGetEmploymentResponse = zPeopleEmploymentResponseObject;
|
|
8075
8690
|
export const zListPerDiemsQuery = z.object({
|
|
8076
8691
|
'filter[default]': z.boolean().optional(),
|
|
8077
8692
|
'filter[taxable]': z.boolean().optional(),
|
|
@@ -8117,7 +8732,7 @@ export const zGetPerDiemPath = z.object({
|
|
|
8117
8732
|
* Success
|
|
8118
8733
|
*/
|
|
8119
8734
|
export const zGetPerDiemResponse = zPerDiemResponseObject;
|
|
8120
|
-
export const zUpdatePerDiemBody =
|
|
8735
|
+
export const zUpdatePerDiemBody = zPerDiemUpdateParameters;
|
|
8121
8736
|
export const zUpdatePerDiemPath = z.object({
|
|
8122
8737
|
id: z.string()
|
|
8123
8738
|
});
|
|
@@ -8157,7 +8772,7 @@ export const zGetPositionFunctionPath = z.object({
|
|
|
8157
8772
|
* Success
|
|
8158
8773
|
*/
|
|
8159
8774
|
export const zGetPositionFunctionResponse = zPositionFunctionResponseObject;
|
|
8160
|
-
export const zUpdatePositionFunctionBody =
|
|
8775
|
+
export const zUpdatePositionFunctionBody = zPositionFunctionUpdateParameters;
|
|
8161
8776
|
export const zUpdatePositionFunctionPath = z.object({
|
|
8162
8777
|
id: z.string()
|
|
8163
8778
|
});
|
|
@@ -8282,7 +8897,7 @@ export const zCreateCompanyUserDetailBody = zPwaCompanyUserDetailsParameters;
|
|
|
8282
8897
|
* Created
|
|
8283
8898
|
*/
|
|
8284
8899
|
export const zCreateCompanyUserDetailResponse = zPwaCompanyUserDetailsResponseObject;
|
|
8285
|
-
export const zUpdateCompanyUserDetailBody =
|
|
8900
|
+
export const zUpdateCompanyUserDetailBody = zPwaCompanyUserDetailsUpdateParameters;
|
|
8286
8901
|
export const zUpdateCompanyUserDetailPath = z.object({
|
|
8287
8902
|
id: z.string()
|
|
8288
8903
|
});
|
|
@@ -8571,7 +9186,7 @@ export const zDeleteTimeCardPerDiemPath = z.object({
|
|
|
8571
9186
|
* Success
|
|
8572
9187
|
*/
|
|
8573
9188
|
export const zDeleteTimeCardPerDiemResponse = zTimeCardPerDiemResponseObject;
|
|
8574
|
-
export const zUpdateTimeCardPerDiemBody =
|
|
9189
|
+
export const zUpdateTimeCardPerDiemBody = zTimeCardPerDiemUpdateParameters;
|
|
8575
9190
|
export const zUpdateTimeCardPerDiemPath = z.object({
|
|
8576
9191
|
time_card_id: z.string(),
|
|
8577
9192
|
id: z.int()
|
|
@@ -8981,7 +9596,7 @@ export const zDeleteHolidayPath = z.object({
|
|
|
8981
9596
|
* Success
|
|
8982
9597
|
*/
|
|
8983
9598
|
export const zDeleteHolidayResponse = zHolidayResponseObject;
|
|
8984
|
-
export const zUpdateHolidayBody =
|
|
9599
|
+
export const zUpdateHolidayBody = zHolidayUpdateParameters;
|
|
8985
9600
|
export const zUpdateHolidayPath = z.object({
|
|
8986
9601
|
pay_period_config_id: z.string(),
|
|
8987
9602
|
id: z.string()
|