@dsptch-work/api-client 0.31.0 → 0.32.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.
@@ -164,6 +164,12 @@ export const zProblem = z.object({
164
164
  *
165
165
  * ## 409
166
166
  *
167
+ * ### already_subscribed
168
+ *
169
+ * **Already Subscribed**
170
+ *
171
+ * The user already holds this subscription, with other delivery methods than the request names. Subscribing again never changes a held subscription: delete it, then subscribe with the delivery methods you want.
172
+ *
167
173
  * ### already_terminated
168
174
  *
169
175
  * **Termination Already Scheduled**
@@ -380,6 +386,7 @@ export const zProblemTypeCatalog = z.enum([
380
386
  'insufficient_api_key_scope',
381
387
  'user_scoped_key_required',
382
388
  'not_found',
389
+ 'already_subscribed',
383
390
  'already_terminated',
384
391
  'import_in_progress',
385
392
  'pay_schedule_already_exists',
@@ -725,27 +732,27 @@ export const zApprenticeshipAllocationResponseObject = z.object({
725
732
  * Record hours toward an apprentice's wage progression. Creation requires a user-scoped API key, since the row attributes the hours to the person who recorded them. Omit timekeeping_time_card_id for a standalone allocation entered outside the time card system, or supply it to link the allocation to one of the apprentice's own time cards; the effective timestamp then derives from the card's pay period and cannot be overridden. Recording the allocation rebuilds progression and requests wage repricing in the background.
726
733
  */
727
734
  export const zApprenticeshipAllocationCreateParameters = z.object({
728
- apprenticeship_work_process_category_id: z.string().optional(),
729
- timekeeping_time_card_id: z.string().optional(),
735
+ timekeeping_time_card_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
736
+ apprenticeship_work_process_category_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
730
737
  minutes: z.int(),
731
- description: z.string().optional(),
732
- allocated_at: z.iso.datetime().optional()
738
+ description: z.string().nullish(),
739
+ allocated_at: z.string().optional()
733
740
  });
734
741
  /**
735
742
  * Correct an existing allocation's hours, work process category, description, or (for a standalone allocation) effective timestamp. The time card an allocation is linked to cannot be changed after creation. Any change that shifts progression rebuilds it and requests historical wage repricing in the background, including locked time cards.
736
743
  */
737
744
  export const zApprenticeshipAllocationUpdateParameters = z.object({
738
- apprenticeship_work_process_category_id: z.string().nullish(),
745
+ apprenticeship_work_process_category_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
739
746
  minutes: z.int().optional(),
740
747
  description: z.string().nullish(),
741
- allocated_at: z.iso.datetime().optional()
748
+ allocated_at: z.string().optional()
742
749
  });
743
750
  /**
744
- * 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.
751
+ * 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. Omitting a required field answers 400; a null for a non-nullable field, a blank ID, a wrong JSON type, an unlisted status, or a date that is not a YYYY-MM-DD calendar date answers 422.
745
752
  */
746
753
  export const zApprenticeshipApprenticeParameters = z.object({
747
- apprenticeship_wage_schedule_id: z.string(),
748
- user_id: z.string(),
754
+ apprenticeship_wage_schedule_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
755
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
749
756
  status: z.enum([
750
757
  'active',
751
758
  'pending',
@@ -763,7 +770,7 @@ export const zApprenticeshipApprenticeParameters = z.object({
763
770
  operative_end_date: z.iso.date().nullish()
764
771
  });
765
772
  /**
766
- * Create an apprenticeship program sponsored by your company; the sponsor is always your company and is never taken from the request body.
773
+ * Create an apprenticeship program sponsored by your company; the sponsor is always your company and is never taken from the request body. Omitting program_number answers 400; a null for a non-nullable field, a wrong JSON type, or an unlisted registration_agency_type answers 422.
767
774
  */
768
775
  export const zApprenticeshipProgramParameters = z.object({
769
776
  program_number: z.string(),
@@ -773,7 +780,7 @@ export const zApprenticeshipProgramParameters = z.object({
773
780
  registration_agency_type: z.enum(['federal', 'regional']).nullish()
774
781
  });
775
782
  /**
776
- * Update an apprenticeship program sponsored by your company. Send only the fields to change; the sponsor is fixed to your company.
783
+ * Update an apprenticeship program sponsored by your company. Send only the fields to change; the sponsor is fixed to your company. A null for a non-nullable field, a wrong JSON type, or an unlisted registration_agency_type answers 422.
777
784
  */
778
785
  export const zApprenticeshipProgramUpdateParameters = z.object({
779
786
  program_number: z.string().optional(),
@@ -783,7 +790,7 @@ export const zApprenticeshipProgramUpdateParameters = z.object({
783
790
  registration_agency_type: z.enum(['federal', 'regional']).nullish()
784
791
  });
785
792
  /**
786
- * Create an occupation (trade) within a sponsored program; the program is taken from the URL path.
793
+ * Create an occupation (trade) within a sponsored program; the program is taken from the URL path. Omitting a required field answers 400; a null for a non-nullable field, a wrong JSON type, or an unlisted occupation_type answers 422.
787
794
  */
788
795
  export const zApprenticeshipOccupationParameters = z.object({
789
796
  rapids_code: z.string(),
@@ -801,7 +808,7 @@ export const zApprenticeshipOccupationParameters = z.object({
801
808
  num_journeyworkers: z.int()
802
809
  });
803
810
  /**
804
- * Update an occupation (trade) within a sponsored program. Send only the fields to change; the program is taken from the URL path.
811
+ * Update an occupation (trade) within a sponsored program. Send only the fields to change; the program is taken from the URL path. A null for a non-nullable field, a wrong JSON type, or an unlisted occupation_type answers 422.
805
812
  */
806
813
  export const zApprenticeshipOccupationUpdateParameters = z.object({
807
814
  rapids_code: z.string().optional(),
@@ -1039,17 +1046,17 @@ export const zPeopleEmploymentResponseObject = z.object({
1039
1046
  * Create a distinct employment stint for an existing user in the credential company. Only user_id and hire_date are required; omitted optional fields use the defaults or null values described below. This does not create a user, invitation, role, group, or login identity.
1040
1047
  */
1041
1048
  export const zPeopleEmploymentCreateParameters = z.object({
1042
- user_id: z.string(),
1049
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1043
1050
  hire_date: z.iso.date(),
1044
1051
  type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
1045
1052
  title: z.string().nullish(),
1046
- manager_user_id: z.string().nullish(),
1053
+ manager_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1047
1054
  payroll_id: z.string().nullish(),
1048
1055
  enrolled_in_t_and_a: z.boolean().optional(),
1049
1056
  compensation_type: z.enum(['hourly', 'salary']).optional(),
1050
1057
  hourly_rate_cents: z.string().nullish(),
1051
1058
  overtime_eligible: z.boolean().nullish(),
1052
- overtime_package_id: z.string().nullish(),
1059
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1053
1060
  worked_annual_minutes: z.int().nullish(),
1054
1061
  pto_annual_minutes: z.int().nullish(),
1055
1062
  holiday_annual_minutes: z.int().nullish(),
@@ -1062,10 +1069,11 @@ export const zPeopleEmploymentCreateParameters = z.object({
1062
1069
  * Request body for creating one employment boundary. effective_date is required and is interpreted at midnight in the credential company's time zone. Today and past dates must fall inside the family's latest version, before its termination; future dates retain scheduling behavior. Send at least one value to change; omitted values carry forward from the version immediately before the new boundary.
1063
1070
  */
1064
1071
  export const zPeopleEmploymentScheduledChangeCreateParameters = z.object({
1072
+ effective_date: z.iso.date(),
1065
1073
  compensation_type: z.enum(['hourly', 'salary']).optional(),
1066
1074
  hourly_rate_cents: z.string().nullish(),
1067
1075
  overtime_eligible: z.boolean().nullish(),
1068
- overtime_package_id: z.string().nullish(),
1076
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1069
1077
  worked_annual_minutes: z.int().nullish(),
1070
1078
  pto_annual_minutes: z.int().nullish(),
1071
1079
  holiday_annual_minutes: z.int().nullish(),
@@ -1073,8 +1081,7 @@ export const zPeopleEmploymentScheduledChangeCreateParameters = z.object({
1073
1081
  training_annual_amount_cents: z.string().nullish(),
1074
1082
  employer_combined_health_amount_cents: z.string().nullish(),
1075
1083
  employer_combined_savings_cents: z.string().nullish(),
1076
- companies_department_id: z.string().nullish(),
1077
- effective_date: z.iso.date()
1084
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1078
1085
  });
1079
1086
  /**
1080
1087
  * Request body for changing values at one exact employment boundary. Today and past dates must name the latest version's start; future exact boundaries remain editable. Send only the fields to change; omitted values remain as recorded at that boundary. The boundary date cannot move.
@@ -1083,7 +1090,7 @@ export const zPeopleEmploymentScheduledChangeUpdateParameters = z.object({
1083
1090
  compensation_type: z.enum(['hourly', 'salary']).optional(),
1084
1091
  hourly_rate_cents: z.string().nullish(),
1085
1092
  overtime_eligible: z.boolean().nullish(),
1086
- overtime_package_id: z.string().nullish(),
1093
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1087
1094
  worked_annual_minutes: z.int().nullish(),
1088
1095
  pto_annual_minutes: z.int().nullish(),
1089
1096
  holiday_annual_minutes: z.int().nullish(),
@@ -1091,13 +1098,13 @@ export const zPeopleEmploymentScheduledChangeUpdateParameters = z.object({
1091
1098
  training_annual_amount_cents: z.string().nullish(),
1092
1099
  employer_combined_health_amount_cents: z.string().nullish(),
1093
1100
  employer_combined_savings_cents: z.string().nullish(),
1094
- companies_department_id: z.string().nullish()
1101
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1095
1102
  });
1096
1103
  /**
1097
1104
  * Parameters for moving where an employment stint's valid-time timeline begins.
1098
1105
  */
1099
1106
  export const zPeopleEmploymentGenesisParameters = z.object({
1100
- effective_date: z.iso.date().optional()
1107
+ effective_date: z.iso.date()
1101
1108
  });
1102
1109
  /**
1103
1110
  * Parameters for scheduling when an employment stint stops being valid.
@@ -1111,7 +1118,7 @@ export const zPeopleEmploymentScheduledTerminationParameters = z.object({
1111
1118
  export const zPeopleEmploymentUpdateParameters = z.object({
1112
1119
  type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
1113
1120
  title: z.string().nullish(),
1114
- manager_user_id: z.string().nullish(),
1121
+ manager_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1115
1122
  payroll_id: z.string().nullish(),
1116
1123
  enrolled_in_t_and_a: z.boolean().optional()
1117
1124
  });
@@ -1363,7 +1370,7 @@ export const zPerDiemResponseObject = z.object({
1363
1370
  updated_at: z.iso.datetime()
1364
1371
  });
1365
1372
  /**
1366
- * Request body for creating a per diem. name, currency, and rate_cents are required.
1373
+ * Request body for creating a per diem. Send fields in JSON; the per diem belongs to the company that owns the API key. name, currency, and rate_cents are required.
1367
1374
  */
1368
1375
  export const zPerDiemParameters = z.object({
1369
1376
  name: z.string(),
@@ -1373,11 +1380,11 @@ export const zPerDiemParameters = z.object({
1373
1380
  taxable: z.boolean().optional(),
1374
1381
  default: z.boolean().nullish(),
1375
1382
  active: z.boolean().nullish(),
1376
- work_type_ids: z.array(z.string()).optional(),
1377
- timekeeping_timecode_ids: z.array(z.string()).optional()
1383
+ work_type_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
1384
+ timekeeping_timecode_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
1378
1385
  });
1379
1386
  /**
1380
- * Request body for updating a per diem. Send only the fields to change.
1387
+ * Request body for updating a per diem. Send only fields to change in JSON; omitted fields remain unchanged.
1381
1388
  */
1382
1389
  export const zPerDiemUpdateParameters = z.object({
1383
1390
  name: z.string().optional(),
@@ -1387,8 +1394,8 @@ export const zPerDiemUpdateParameters = z.object({
1387
1394
  taxable: z.boolean().optional(),
1388
1395
  default: z.boolean().nullish(),
1389
1396
  active: z.boolean().nullish(),
1390
- work_type_ids: z.array(z.string()).optional(),
1391
- timekeeping_timecode_ids: z.array(z.string()).optional()
1397
+ work_type_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
1398
+ timekeeping_timecode_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
1392
1399
  });
1393
1400
  /**
1394
1401
  * The filled attribute values of a product or item — one entry per attribute its category makes fillable on that record.
@@ -1552,16 +1559,16 @@ export const zTimeCardPerDiemResponseObject = z.object({
1552
1559
  */
1553
1560
  export const zTimeCardPerDiemParameters = z.object({
1554
1561
  date: z.iso.date(),
1555
- approver_user_id: z.string(),
1556
- per_diem_id: z.string().optional()
1562
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1563
+ per_diem_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1557
1564
  });
1558
1565
  /**
1559
1566
  * 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.
1560
1567
  */
1561
1568
  export const zTimeCardPerDiemUpdateParameters = z.object({
1562
1569
  date: z.iso.date().optional(),
1563
- approver_user_id: z.string().optional(),
1564
- per_diem_id: z.string().optional()
1570
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1571
+ per_diem_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1565
1572
  });
1566
1573
  /**
1567
1574
  * 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.
@@ -1621,15 +1628,15 @@ export const zPayPeriodConfigParameters = z.object({
1621
1628
  z.literal(6)
1622
1629
  ]),
1623
1630
  tz_name: z.string(),
1624
- currency: z.string().optional().default('USD'),
1625
- rounding_interval: z.union([z.literal(1), z.literal(15)]).optional().default(1),
1631
+ currency: z.string().optional(),
1632
+ rounding_interval: z.union([z.literal(1), z.literal(15)]).optional(),
1626
1633
  payroll_system: z.enum([
1627
1634
  'rippling',
1628
1635
  'quickbooks_online',
1629
1636
  'paychex',
1630
1637
  'gusto'
1631
1638
  ]).nullish(),
1632
- paid_after_holiday: z.boolean().optional().default(true),
1639
+ paid_after_holiday: z.boolean().optional(),
1633
1640
  arrear_days: z.int().gte(0),
1634
1641
  pay_run_deadline_days: z.int().gte(1),
1635
1642
  pay_run_deadline_clock_time: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/),
@@ -1758,13 +1765,13 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1758
1765
  corrections: z.array(zPayPeriodConfigHistoryCorrectionObject)
1759
1766
  });
1760
1767
  /**
1761
- * 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.
1768
+ * Create a holiday on a pay schedule. name is required. Send date alone for a fixed holiday on that date, or holiday_type and month with mday (fixed) or wday + week (floating).
1762
1769
  */
1763
1770
  export const zHolidayParameters = z.object({
1764
1771
  name: z.string(),
1765
1772
  date: z.iso.date().optional(),
1766
- holiday_type: z.enum(['fixed', 'floating']),
1767
- month: z.int(),
1773
+ holiday_type: z.enum(['fixed', 'floating']).optional(),
1774
+ month: z.int().optional(),
1768
1775
  mday: z.int().optional(),
1769
1776
  wday: z.int().optional(),
1770
1777
  week: z.int().optional(),
@@ -2099,7 +2106,7 @@ export const zPwaTradeUpdateParameters = z.object({
2099
2106
  * Parameters for merging one PWA trade (craft) into another in the same pool.
2100
2107
  */
2101
2108
  export const zPwaTradeMergeParameters = z.object({
2102
- target_trade_id: z.string()
2109
+ target_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
2103
2110
  });
2104
2111
  /**
2105
2112
  * A reviewed apprentice-scope decision pairing a registered apprenticeship occupation with a craft (trade). The row's existence means the pair was reviewed; scope_status carries the verdict. A pair with no row is undecided and denies apprentice treatment.
@@ -2116,14 +2123,14 @@ export const zPwaTradeApprenticeshipOccupationResponseObject = z.object({
2116
2123
  * Parameters for recording an apprentice-scope decision on a trade.
2117
2124
  */
2118
2125
  export const zPwaTradeApprenticeshipOccupationCreateParameters = z.object({
2119
- apprenticeship_occupation_id: z.string(),
2120
- scope_status: z.enum(['in_scope', 'out_of_scope']).nullish()
2126
+ apprenticeship_occupation_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
2127
+ scope_status: z.enum(['in_scope', 'out_of_scope']).optional()
2121
2128
  });
2122
2129
  /**
2123
2130
  * Parameters for flipping an existing apprentice-scope decision's verdict.
2124
2131
  */
2125
2132
  export const zPwaTradeApprenticeshipOccupationUpdateParameters = z.object({
2126
- scope_status: z.enum(['in_scope', 'out_of_scope']).nullish()
2133
+ scope_status: z.enum(['in_scope', 'out_of_scope']).optional()
2127
2134
  });
2128
2135
  /**
2129
2136
  * Prevailing-wage / apprenticeship (PWA) compliance details for a job, used in certified-payroll reporting. Common fields are always present when this object exists; regional fields appear only when applicable to the job's region and regional PWA mode. The property is null when no PWA details have been configured; PWA tracking modes alone do not materialize it.
@@ -2190,7 +2197,7 @@ export const zUserUpdateParameters = z.object({
2190
2197
  state: z.string().nullish(),
2191
2198
  birth_date: z.string().nullish(),
2192
2199
  dol_apprentice_no: z.string().nullish(),
2193
- avatar_signed_id: z.string().nullish()
2200
+ avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
2194
2201
  });
2195
2202
  /**
2196
2203
  * A single time entry: one atomic block of tracked work with its start/end times, optional timecode classification, optional job, pay rate, and manager approval status.
@@ -2254,7 +2261,7 @@ export const zManagerTimeEntryApprovalParameters = z.object({
2254
2261
  'approved',
2255
2262
  'declined'
2256
2263
  ]),
2257
- approver_user_id: z.string()
2264
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
2258
2265
  });
2259
2266
  /**
2260
2267
  * The time-entry body fields shared by the create and update bodies; each of those declares its own requiredness.
@@ -2323,7 +2330,7 @@ export const zFormSubmissionResponseObject = z.object({
2323
2330
  * Request body for scheduling a future-dated compensation change. effective_date sets when the new values take effect; earlier history is preserved as its own version. Covers the pay, benefit, accrual, and department fields.
2324
2331
  */
2325
2332
  export const zUserCompanyScheduledChangesParameters = z.object({
2326
- effective_date: z.string(),
2333
+ effective_date: z.iso.date(),
2327
2334
  hourly_rate: z.string().nullish(),
2328
2335
  compensation_type: z.enum(['hourly', 'salary']).optional(),
2329
2336
  overtime_eligible: z.boolean().optional(),
@@ -2334,7 +2341,7 @@ export const zUserCompanyScheduledChangesParameters = z.object({
2334
2341
  pto_annual_minutes: z.int().nullish(),
2335
2342
  holiday_annual_minutes: z.int().nullish(),
2336
2343
  training_annual_minutes: z.int().nullish(),
2337
- companies_department_id: z.string().nullish()
2344
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
2338
2345
  });
2339
2346
  /**
2340
2347
  * A work type: a named category of job activity, either a shared global default (no owning company) or an entry scoped to a specific company.
@@ -2423,79 +2430,10 @@ export const zCompanyResponseObject = z.object({
2423
2430
  created_at: z.iso.datetime(),
2424
2431
  updated_at: z.iso.datetime()
2425
2432
  });
2426
- export const zCompanyParameters = z.intersection(z.union([
2427
- z.object({
2428
- name: z.string()
2429
- }),
2430
- z.object({
2431
- legal_name: z.string().nullable()
2432
- }),
2433
- z.object({
2434
- description: z.string().nullable()
2435
- }),
2436
- z.object({
2437
- address: z.string().nullable()
2438
- }),
2439
- z.object({
2440
- website: z.string().nullable()
2441
- }),
2442
- z.object({
2443
- phone_number: z.string().nullable()
2444
- }),
2445
- z.object({
2446
- email: z.string().nullable()
2447
- }),
2448
- z.object({
2449
- color_hex: z.string()
2450
- }),
2451
- z.object({
2452
- tagline: z.string().nullable()
2453
- }),
2454
- z.object({
2455
- founding_year: z.int().nullable()
2456
- }),
2457
- z.object({
2458
- corporate_structure: z.enum([
2459
- 'corporation',
2460
- 'llc',
2461
- 'partnership',
2462
- 'sole_proprietorship',
2463
- 's_corporation'
2464
- ]).nullable()
2465
- }),
2466
- z.object({
2467
- employee_count_range: z.enum([
2468
- 'one_to_ten',
2469
- 'eleven_to_fifty',
2470
- 'fifty_one_to_two_hundred',
2471
- 'two_hundred_one_to_five_hundred',
2472
- 'five_hundred_one_to_one_thousand',
2473
- 'one_thousand_one_to_five_thousand',
2474
- 'five_thousand_one_to_ten_thousand',
2475
- 'ten_thousand_one_plus'
2476
- ]).nullable()
2477
- }),
2478
- z.object({
2479
- revenue_range: z.enum([
2480
- 'zero_to_one_million',
2481
- 'one_to_ten_million',
2482
- 'ten_to_twenty_five_million',
2483
- 'twenty_five_to_fifty_million',
2484
- 'fifty_to_one_hundred_million',
2485
- 'one_hundred_to_two_fifty_million',
2486
- 'two_fifty_to_five_hundred_million',
2487
- 'five_hundred_to_one_billion',
2488
- 'one_billion_to_ten_billion',
2489
- 'ten_billion_plus'
2490
- ]).nullable()
2491
- }),
2492
- z.object({
2493
- naics_code: z.string().nullable()
2494
- }),
2495
- z.object({
2496
- linkedin_url: z.string().nullable()
2497
- })
2498
- ]), z.object({
2433
+ /**
2434
+ * Request body for updating your own company's public profile. Send only fields to change in JSON; omitted fields remain unchanged. A value of the wrong JSON type, or null for a field that does not take it, answers 422. Other company settings are edited in the web app.
2435
+ */
2436
+ export const zCompanyParameters = z.object({
2499
2437
  name: z.string().optional(),
2500
2438
  legal_name: z.string().nullish(),
2501
2439
  description: z.string().nullish(),
@@ -2537,7 +2475,7 @@ export const zCompanyParameters = z.intersection(z.union([
2537
2475
  ]).nullish(),
2538
2476
  naics_code: z.string().nullish(),
2539
2477
  linkedin_url: z.string().nullish()
2540
- }));
2478
+ });
2541
2479
  /**
2542
2480
  * A custom-field value stored on a record, addressed by the configuration it belongs to.
2543
2481
  */
@@ -2559,7 +2497,7 @@ export const zCustomFieldConfigsResponseObject = z.object({
2559
2497
  updated_at: z.iso.datetime()
2560
2498
  });
2561
2499
  /**
2562
- * Request body for creating a custom field definition. `name` and `model_type` are required.
2500
+ * Request body for creating a custom field definition; it belongs to the company that owns the API key. `name` and `model_type` are required, and omitting either answers 400.
2563
2501
  */
2564
2502
  export const zCustomFieldConfigParameters = z.object({
2565
2503
  name: z.string(),
@@ -2747,7 +2685,7 @@ export const zUserCompanyScheduledChangesResponse = z.object({
2747
2685
  * Request body for scheduling the end of a worker's employment at your company. Sets the employment's end date; cancel the scheduled termination to restore open-ended employment. Deleting the employment record instead (DELETE on the membership) removes it entirely and is not reversible.
2748
2686
  */
2749
2687
  export const zUserCompanyScheduledTerminationParameters = z.object({
2750
- termination_date: z.string()
2688
+ termination_date: z.iso.date()
2751
2689
  });
2752
2690
  /**
2753
2691
  * One problem found while processing an accepted import, whatever its type.
@@ -3067,13 +3005,17 @@ export const zManagerTimeCardApprovalParameters = z.object({
3067
3005
  'approved',
3068
3006
  'declined'
3069
3007
  ]),
3070
- approver_user_id: z.string()
3008
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
3071
3009
  });
3072
3010
  /**
3073
3011
  * Request body for a worker's self-attestation of their own time card. The approver is always the card's own worker, so it is not supplied here.
3074
3012
  */
3075
3013
  export const zWorkerTimeCardApprovalParameters = z.object({
3076
- status: z.enum(['pending', 'approved'])
3014
+ status: z.enum([
3015
+ 'pending',
3016
+ 'approved',
3017
+ 'declined'
3018
+ ])
3077
3019
  });
3078
3020
  /**
3079
3021
  * One clock-in by a worker — open (`active`) from clock-in until clock-out, and retained afterwards as the record that the session happened. A worker holds at most one active session at a time.
@@ -3205,7 +3147,7 @@ export const zPayrollFringeBenefitPlanResponseObject = z.object({
3205
3147
  * Request body for creating a fringe-benefit plan. timekeeping_pay_period_config_id, name, plan_number, and benefit_category are required.
3206
3148
  */
3207
3149
  export const zPayrollFringeBenefitPlanParameters = z.object({
3208
- timekeeping_pay_period_config_id: z.string(),
3150
+ timekeeping_pay_period_config_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3209
3151
  name: z.string(),
3210
3152
  plan_number: z.string(),
3211
3153
  funded: z.boolean().optional(),
@@ -3377,9 +3319,9 @@ export const zPayrollRunResponseObject = z.object({
3377
3319
  * Create a payroll run. Company-scoped keys and company-admin user-scoped keys accept the same fields. Manager and technician user keys cannot create runs. company_id, run_type, and run_date are required; an on-cycle run additionally requires timekeeping_pay_period_id.
3378
3320
  */
3379
3321
  export const zPayrollRunParameters = z.object({
3380
- company_id: z.string(),
3381
- timekeeping_pay_period_id: z.string().nullish(),
3382
- payrolls_credential_id: z.string().nullish(),
3322
+ company_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3323
+ timekeeping_pay_period_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3324
+ payrolls_credential_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3383
3325
  run_type: z.enum([
3384
3326
  'CORRECTION',
3385
3327
  'ON_CYCLE',
@@ -3395,8 +3337,8 @@ export const zPayrollRunParameters = z.object({
3395
3337
  * Update a payroll run. Company-scoped keys and company-admin user-scoped keys accept the same fields. Manager and technician user keys cannot update runs. Every field is optional — send only what changes. The run's company is fixed at creation.
3396
3338
  */
3397
3339
  export const zPayrollRunUpdateParameters = z.object({
3398
- timekeeping_pay_period_id: z.string().nullish(),
3399
- payrolls_credential_id: z.string().nullish(),
3340
+ timekeeping_pay_period_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3341
+ payrolls_credential_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3400
3342
  run_type: z.enum([
3401
3343
  'CORRECTION',
3402
3344
  'ON_CYCLE',
@@ -3532,14 +3474,14 @@ export const zProjectSiteResponseObject = z.object({
3532
3474
  * Request body for attaching a site to a project. `site_id` is required; `feature_ids` is optional. The project is taken from the path and is not part of the body.
3533
3475
  */
3534
3476
  export const zProjectSiteParameters = z.object({
3535
- site_id: z.string(),
3536
- feature_ids: z.array(z.string()).optional()
3477
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3478
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
3537
3479
  });
3538
3480
  /**
3539
3481
  * Request body for replacing which of the site's features apply to this project. Every field is optional; omit a field to preserve its current value. `site_id` is create-only and an update that names it is rejected.
3540
3482
  */
3541
3483
  export const zProjectSiteUpdateParameters = z.object({
3542
- feature_ids: z.array(z.string()).optional()
3484
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
3543
3485
  });
3544
3486
  export const zSiteCheckInResponseObject = z.object({
3545
3487
  id: z.string(),
@@ -3882,7 +3824,7 @@ export const zComplianceCheckParameters = z.object({
3882
3824
  status: z.enum(['dismissed', 'pending']).optional(),
3883
3825
  time_due: z.iso.datetime().nullish(),
3884
3826
  assignee_user_ids: z.array(z.string()).optional(),
3885
- file_signed_id: z.string().optional()
3827
+ file_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional()
3886
3828
  });
3887
3829
  export const zRichTextObject = z.object({
3888
3830
  text: z.string(),
@@ -4057,9 +3999,9 @@ export const zPaystubResponseObject = z.object({
4057
3999
  * 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.
4058
4000
  */
4059
4001
  export const zPaystubParameters = z.object({
4060
- user_id: z.string(),
4061
- payrolls_payroll_run_id: z.string(),
4062
- timekeeping_time_card_id: z.string().nullish(),
4002
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4003
+ payrolls_payroll_run_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4004
+ timekeeping_time_card_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4063
4005
  external_id: z.string().nullish(),
4064
4006
  check_number: z.string().nullish()
4065
4007
  });
@@ -4099,8 +4041,8 @@ export const zPriorPeriodAdjustmentResponseObject = z.object({
4099
4041
  * Request body for allocating part of a retroactive-pay line item to an earlier time card. The time card comes from the path; the adjustment is always a retroactive increase.
4100
4042
  */
4101
4043
  export const zPriorPeriodAdjustmentParameters = z.object({
4102
- payrolls_paystub_line_item_id: z.string(),
4103
- created_by_user_id: z.string(),
4044
+ payrolls_paystub_line_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4045
+ created_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4104
4046
  amount_cents: z.string(),
4105
4047
  rationale: z.enum([
4106
4048
  'hours_correction',
@@ -4108,7 +4050,7 @@ export const zPriorPeriodAdjustmentParameters = z.object({
4108
4050
  'pwa_compliance',
4109
4051
  'rate_correction'
4110
4052
  ]),
4111
- job_id: z.string().nullish(),
4053
+ job_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4112
4054
  notes: z.string().nullish(),
4113
4055
  pwa_compliance_eligible: z.boolean().optional()
4114
4056
  });
@@ -4123,7 +4065,7 @@ export const zPriorPeriodAdjustmentUpdateParameters = z.object({
4123
4065
  'pwa_compliance',
4124
4066
  'rate_correction'
4125
4067
  ]).optional(),
4126
- job_id: z.string().nullish(),
4068
+ job_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4127
4069
  notes: z.string().nullish(),
4128
4070
  pwa_compliance_eligible: z.boolean().optional()
4129
4071
  });
@@ -4275,14 +4217,14 @@ export const zJobSiteResponseObject = z.object({
4275
4217
  * Request body for attaching a site to a job. `site_id` is required; `feature_ids` is optional and defaults to none.
4276
4218
  */
4277
4219
  export const zJobSiteParameters = z.object({
4278
- site_id: z.string(),
4279
- feature_ids: z.array(z.string()).optional()
4220
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4221
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
4280
4222
  });
4281
4223
  /**
4282
4224
  * Request body for replacing the features on an existing job-site join. `site_id` cannot be changed; send a new join to attach a different site.
4283
4225
  */
4284
4226
  export const zJobSiteUpdateParameters = z.object({
4285
- feature_ids: z.array(z.string()).optional()
4227
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
4286
4228
  });
4287
4229
  /**
4288
4230
  * A good-faith-effort exception on a job — a record that the employer requested apprentices from a registered program and did not receive the full request, or that no qualifying program existed. Read-only. Does not include supporting document slots.
@@ -5224,18 +5166,18 @@ export const zPositionResponseObject = z.object({
5224
5166
  updated_at: z.iso.datetime()
5225
5167
  });
5226
5168
  /**
5227
- * Request body for granting a user a role in a company.
5169
+ * Request body for granting a user a role in a company. All three fields are required; omitting one answers 400.
5228
5170
  */
5229
5171
  export const zUserRoleRequest = z.object({
5230
- user_id: z.string().optional(),
5231
- company_id: z.string().optional(),
5172
+ company_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5173
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5232
5174
  role: z.enum([
5233
5175
  'TECHNICIAN',
5234
5176
  'FIELD_LEAD',
5235
5177
  'MANAGER',
5236
5178
  'SAFETY_MANAGER',
5237
5179
  'ADMIN'
5238
- ]).optional()
5180
+ ])
5239
5181
  });
5240
5182
  /**
5241
5183
  * A role granted to a user within a company's scope — the permissions the user has there. A user can hold several distinct roles per company.
@@ -5402,7 +5344,7 @@ export const zUserParameters = z.intersection(z.union([
5402
5344
  winda_id: z.string().optional(),
5403
5345
  linkedin_url: z.string().optional(),
5404
5346
  roles: z.array(z.string()).nullish(),
5405
- avatar_signed_id: z.string().optional(),
5347
+ avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
5406
5348
  created_by_user_id: z.string().optional(),
5407
5349
  last_sent_by_user_id: z.string().nullish(),
5408
5350
  skip_notify: z.boolean().optional(),
@@ -6255,6 +6197,106 @@ export const zProjectWageDeterminationResponseObject = z.discriminatedUnion('typ
6255
6197
  zFederalProjectWageDeterminationResponseObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Federal') }),
6256
6198
  zRegionalProjectWageDeterminationResponseObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
6257
6199
  ]);
6200
+ export const zFederalProjectWageDeterminationHistoryCorrectionObject = z.object({
6201
+ project_wage_determination_id: z.string(),
6202
+ project_id: z.string(),
6203
+ pwa_trade_id: z.string(),
6204
+ overtime_package_id: z.string().nullable(),
6205
+ pay_rates_rule_package_id: z.string().nullable(),
6206
+ type: z.enum(['Pwa::ProjectWageDeterminations::Federal']),
6207
+ labor_classification: z.string(),
6208
+ hourly_rate_cents: z.string(),
6209
+ fringe_rate_cents: z.string(),
6210
+ class_code: z.string().nullable(),
6211
+ construction_category: z.enum([
6212
+ 'building',
6213
+ 'heavy',
6214
+ 'highway',
6215
+ 'residential'
6216
+ ]).nullable(),
6217
+ general_wage_determination: z.string().nullable(),
6218
+ valid_from: z.iso.datetime().nullable(),
6219
+ valid_to: z.iso.datetime().nullable(),
6220
+ created_at: z.iso.datetime(),
6221
+ updated_at: z.iso.datetime()
6222
+ });
6223
+ export const zRegionalProjectWageDeterminationHistoryCorrectionObject = z.object({
6224
+ project_wage_determination_id: z.string(),
6225
+ project_id: z.string(),
6226
+ pwa_trade_id: z.string(),
6227
+ overtime_package_id: z.string().nullable(),
6228
+ pay_rates_rule_package_id: z.string().nullable(),
6229
+ type: z.enum(['Pwa::ProjectWageDeterminations::Regional']),
6230
+ labor_classification: z.string(),
6231
+ hourly_rate_cents: z.string(),
6232
+ fringe_rate_cents: z.string(),
6233
+ general_wage_determination: z.string().nullable(),
6234
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
6235
+ valid_from: z.iso.datetime().nullable(),
6236
+ valid_to: z.iso.datetime().nullable(),
6237
+ created_at: z.iso.datetime(),
6238
+ updated_at: z.iso.datetime()
6239
+ });
6240
+ export const zProjectWageDeterminationHistoryCorrectionObject = z.discriminatedUnion('type', [
6241
+ zFederalProjectWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Federal') }),
6242
+ zRegionalProjectWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
6243
+ ]);
6244
+ export const zFederalProjectWageDeterminationHistoryVersionObject = z.object({
6245
+ project_wage_determination_id: z.string(),
6246
+ project_id: z.string(),
6247
+ pwa_trade_id: z.string(),
6248
+ overtime_package_id: z.string().nullable(),
6249
+ pay_rates_rule_package_id: z.string().nullable(),
6250
+ type: z.enum(['Pwa::ProjectWageDeterminations::Federal']),
6251
+ labor_classification: z.string(),
6252
+ hourly_rate_cents: z.string(),
6253
+ fringe_rate_cents: z.string(),
6254
+ class_code: z.string().nullable(),
6255
+ construction_category: z.enum([
6256
+ 'building',
6257
+ 'heavy',
6258
+ 'highway',
6259
+ 'residential'
6260
+ ]).nullable(),
6261
+ general_wage_determination: z.string().nullable(),
6262
+ valid_from: z.iso.datetime().nullable(),
6263
+ valid_to: z.iso.datetime().nullable(),
6264
+ created_at: z.iso.datetime(),
6265
+ updated_at: z.iso.datetime(),
6266
+ version_status: z.enum([
6267
+ 'scheduled',
6268
+ 'current',
6269
+ 'historical'
6270
+ ]),
6271
+ corrections: z.array(zProjectWageDeterminationHistoryCorrectionObject)
6272
+ });
6273
+ export const zRegionalProjectWageDeterminationHistoryVersionObject = z.object({
6274
+ project_wage_determination_id: z.string(),
6275
+ project_id: z.string(),
6276
+ pwa_trade_id: z.string(),
6277
+ overtime_package_id: z.string().nullable(),
6278
+ pay_rates_rule_package_id: z.string().nullable(),
6279
+ type: z.enum(['Pwa::ProjectWageDeterminations::Regional']),
6280
+ labor_classification: z.string(),
6281
+ hourly_rate_cents: z.string(),
6282
+ fringe_rate_cents: z.string(),
6283
+ general_wage_determination: z.string().nullable(),
6284
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
6285
+ valid_from: z.iso.datetime().nullable(),
6286
+ valid_to: z.iso.datetime().nullable(),
6287
+ created_at: z.iso.datetime(),
6288
+ updated_at: z.iso.datetime(),
6289
+ version_status: z.enum([
6290
+ 'scheduled',
6291
+ 'current',
6292
+ 'historical'
6293
+ ]),
6294
+ corrections: z.array(zProjectWageDeterminationHistoryCorrectionObject)
6295
+ });
6296
+ export const zProjectWageDeterminationHistoryVersionObject = z.discriminatedUnion('type', [
6297
+ zFederalProjectWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Federal') }),
6298
+ zRegionalProjectWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
6299
+ ]);
6258
6300
  /**
6259
6301
  * Parameters for creating a Federal (Davis-Bacon) wage determination on a project.
6260
6302
  */
@@ -6316,6 +6358,36 @@ export const zProjectWageDeterminationUpdateParameters = z.object({
6316
6358
  general_wage_determination: z.string().nullish(),
6317
6359
  regional_fields: zRegionalWageDeterminationFields.optional()
6318
6360
  });
6361
+ /**
6362
+ * Parameters for an effective-dated change to a project wage determination, applying from a calendar date forward. The type is fixed by the determination the id names and is not sent.
6363
+ */
6364
+ export const zProjectWageDeterminationScheduledChangeParameters = z.object({
6365
+ effective_date: z.iso.date(),
6366
+ labor_classification: z.string().optional(),
6367
+ hourly_rate_cents: z.string().optional(),
6368
+ fringe_rate_cents: z.string().optional(),
6369
+ class_code: z.string().nullish(),
6370
+ construction_category: z.enum([
6371
+ 'building',
6372
+ 'heavy',
6373
+ 'highway',
6374
+ 'residential'
6375
+ ]).nullish(),
6376
+ general_wage_determination: z.string().nullish(),
6377
+ regional_fields: zRegionalWageDeterminationFields.optional()
6378
+ });
6379
+ /**
6380
+ * Parameters for moving where a project wage determination's timeline begins.
6381
+ */
6382
+ export const zProjectWageDeterminationGenesisParameters = z.object({
6383
+ effective_date: z.iso.date()
6384
+ });
6385
+ /**
6386
+ * Parameters for scheduling when a project wage determination stops being valid.
6387
+ */
6388
+ export const zProjectWageDeterminationScheduledTerminationParameters = z.object({
6389
+ effective_date: z.iso.date()
6390
+ });
6319
6391
  /**
6320
6392
  * The adjustment applied when a rule matches — an addition to the wage or fringe rate.
6321
6393
  */
@@ -6420,6 +6492,48 @@ export const zRateRuleHistoryVersionObject = z.object({
6420
6492
  ]),
6421
6493
  corrections: z.array(zRateRuleHistoryCorrectionObject)
6422
6494
  });
6495
+ /**
6496
+ * A conditional rate-modification rule on a project wage determination — it adds wage or fringe cents when its conditions match. `valid_from` and `valid_to` bound the window over which this version of the rule is in effect.
6497
+ */
6498
+ export const zProjectRateRuleResponseObject = z.object({
6499
+ id: z.string(),
6500
+ project_wage_determination_id: z.string(),
6501
+ pay_rates_rule_package_id: z.string(),
6502
+ effect: zRateRuleEffect,
6503
+ conditions: z.array(zRateRuleCondition),
6504
+ valid_from: z.iso.datetime().nullable(),
6505
+ valid_to: z.iso.datetime().nullable(),
6506
+ created_at: z.iso.datetime(),
6507
+ updated_at: z.iso.datetime()
6508
+ });
6509
+ export const zProjectRateRuleHistoryCorrectionObject = z.object({
6510
+ pay_rates_rule_id: z.string(),
6511
+ project_wage_determination_id: z.string(),
6512
+ pay_rates_rule_package_id: z.string(),
6513
+ effect: zRateRuleEffect,
6514
+ conditions: z.array(zRateRuleCondition),
6515
+ valid_from: z.iso.datetime().nullable(),
6516
+ valid_to: z.iso.datetime().nullable(),
6517
+ created_at: z.iso.datetime(),
6518
+ updated_at: z.iso.datetime()
6519
+ });
6520
+ export const zProjectRateRuleHistoryVersionObject = z.object({
6521
+ pay_rates_rule_id: z.string(),
6522
+ project_wage_determination_id: z.string(),
6523
+ pay_rates_rule_package_id: z.string(),
6524
+ effect: zRateRuleEffect,
6525
+ conditions: z.array(zRateRuleCondition),
6526
+ valid_from: z.iso.datetime().nullable(),
6527
+ valid_to: z.iso.datetime().nullable(),
6528
+ created_at: z.iso.datetime(),
6529
+ updated_at: z.iso.datetime(),
6530
+ version_status: z.enum([
6531
+ 'scheduled',
6532
+ 'current',
6533
+ 'historical'
6534
+ ]),
6535
+ corrections: z.array(zProjectRateRuleHistoryCorrectionObject)
6536
+ });
6423
6537
  /**
6424
6538
  * A conditional wage or fringe adjustment owned by a pay-rate rule package, with the selected version's valid-time window.
6425
6539
  */
@@ -6596,7 +6710,7 @@ export const zOvertimeRuleParameters = z.object({
6596
6710
  'one_five_x',
6597
6711
  'two_x'
6598
6712
  ]),
6599
- region_id: z.string().nullish(),
6713
+ region_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6600
6714
  eligible_hours_worked: z.int().nullish(),
6601
6715
  specific_day_of_week: z.enum([
6602
6716
  'sunday',
@@ -6620,7 +6734,7 @@ export const zOvertimeRuleUpdateParameters = z.object({
6620
6734
  'one_five_x',
6621
6735
  'two_x'
6622
6736
  ]).optional(),
6623
- region_id: z.string().nullish(),
6737
+ region_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6624
6738
  eligible_hours_worked: z.int().nullish(),
6625
6739
  specific_day_of_week: z.enum([
6626
6740
  'sunday',
@@ -6644,7 +6758,7 @@ export const zOvertimeRuleScheduledChangeParameters = z.object({
6644
6758
  'one_five_x',
6645
6759
  'two_x'
6646
6760
  ]).optional(),
6647
- region_id: z.string().nullish(),
6761
+ region_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6648
6762
  eligible_hours_worked: z.int().nullish(),
6649
6763
  specific_day_of_week: z.enum([
6650
6764
  'sunday',
@@ -6715,25 +6829,21 @@ export const zAssetsSiteResponseObject = z.object({
6715
6829
  created_at: z.iso.datetime(),
6716
6830
  updated_at: z.iso.datetime()
6717
6831
  });
6718
- export const zAssetsSiteParameters = z.intersection(z.union([
6719
- z.object({
6720
- site_id: z.string().min(1)
6721
- }),
6722
- z.object({
6723
- name: z.string().min(1)
6724
- })
6725
- ]), z.object({
6832
+ /**
6833
+ * Create a site. kind is required; provide a site_id to back the location with a site on the Atlas map, or a name for a standalone location. At least one of site_id or name is required.
6834
+ */
6835
+ export const zAssetsSiteParameters = z.object({
6836
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6726
6837
  kind: z.enum(['warehouse', 'yard']),
6727
- site_id: z.string().nullish(),
6728
- name: z.string().nullish()
6729
- }));
6838
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6839
+ });
6730
6840
  /**
6731
6841
  * 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`.
6732
6842
  */
6733
6843
  export const zAssetsSiteUpdateParameters = z.object({
6844
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6734
6845
  kind: z.enum(['warehouse', 'yard']).optional(),
6735
- site_id: z.string().nullish(),
6736
- name: z.string().nullish()
6846
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6737
6847
  });
6738
6848
  /**
6739
6849
  * A company-level rule that auto-generates asset form assignments. When an item of one of its products changes custody (an assignment or unassignment), the rule creates or refreshes a form task for the chosen users, due on the configured schedule.
@@ -7040,16 +7150,16 @@ export const zAssetsDocumentResponseObject = z.object({
7040
7150
  * Attach a file to an asset item as a document. file is required and takes a signed_id from the direct-upload endpoint.
7041
7151
  */
7042
7152
  export const zAssetsDocumentParameters = z.object({
7043
- file: z.string(),
7153
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7044
7154
  filename: z.string().nullish(),
7045
7155
  description: z.string().nullish(),
7046
7156
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7047
7157
  });
7048
7158
  /**
7049
- * 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.
7159
+ * 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. A document always holds a file, so null answers 422, as does a blank string.
7050
7160
  */
7051
7161
  export const zAssetsDocumentUpdateParameters = z.object({
7052
- file: z.string().optional(),
7162
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
7053
7163
  filename: z.string().nullish(),
7054
7164
  description: z.string().nullish()
7055
7165
  });
@@ -7486,9 +7596,9 @@ export const zAssetsSubLocationResponseObject = z.object({
7486
7596
  * Create a storage location. name and code are required. A top-level node names its holder (assets_site_id or container_item_id, exactly one); a nested node names parent_id and inherits the parent's holder. The holder cannot change after creation.
7487
7597
  */
7488
7598
  export const zAssetsSubLocationParameters = z.object({
7489
- assets_site_id: z.string().optional(),
7490
- container_item_id: z.string().optional(),
7491
- parent_id: z.string().nullish(),
7599
+ assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7600
+ container_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7601
+ parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7492
7602
  kind: z.enum([
7493
7603
  'zone',
7494
7604
  'aisle',
@@ -7496,7 +7606,7 @@ export const zAssetsSubLocationParameters = z.object({
7496
7606
  'shelf',
7497
7607
  'bin',
7498
7608
  'drawer'
7499
- ]).optional(),
7609
+ ]).nullish(),
7500
7610
  name: z.string().min(1),
7501
7611
  code: z.string().min(1)
7502
7612
  });
@@ -7504,7 +7614,7 @@ export const zAssetsSubLocationParameters = z.object({
7504
7614
  * Update a storage location. All fields are optional — send only what changes. Sending assets_site_id or container_item_id on update returns 400 unknown_key. Holder fields are accepted only on create; renaming code cascades new path codes through the node's subtree.
7505
7615
  */
7506
7616
  export const zAssetsSubLocationUpdateParameters = z.object({
7507
- parent_id: z.string().nullish(),
7617
+ parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7508
7618
  kind: z.enum([
7509
7619
  'zone',
7510
7620
  'aisle',
@@ -7512,7 +7622,7 @@ export const zAssetsSubLocationUpdateParameters = z.object({
7512
7622
  'shelf',
7513
7623
  'bin',
7514
7624
  'drawer'
7515
- ]).optional(),
7625
+ ]).nullish(),
7516
7626
  name: z.string().min(1).optional(),
7517
7627
  code: z.string().min(1).optional()
7518
7628
  });
@@ -7568,8 +7678,8 @@ export const zAssetsTransferParameters = z.object({
7568
7678
  * Add stock of a bulk product at a site, recording a receive transaction. Bulk products only.
7569
7679
  */
7570
7680
  export const zAssetsRestockParameters = z.object({
7571
- assets_site_id: z.string(),
7572
- assets_sub_location_id: z.string().optional(),
7681
+ assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7682
+ assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7573
7683
  quantity: z.int().gte(1),
7574
7684
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7575
7685
  });
@@ -7577,8 +7687,8 @@ export const zAssetsRestockParameters = z.object({
7577
7687
  * Set the on-hand count of a bulk product at a site to a specific number, recording the difference as an adjustment transaction. The site must already stock the product. Bulk products only.
7578
7688
  */
7579
7689
  export const zAssetsAdjustmentParameters = z.object({
7580
- assets_site_id: z.string(),
7581
- assets_sub_location_id: z.string().optional(),
7690
+ assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7691
+ assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7582
7692
  new_quantity: z.int().gte(0),
7583
7693
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7584
7694
  });
@@ -7588,6 +7698,20 @@ export const zAssetsAdjustmentParameters = z.object({
7588
7698
  export const zAssetsArchiveParameters = z.object({
7589
7699
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7590
7700
  });
7701
+ /**
7702
+ * Create the template's schedule on the product's serial items that don't have one yet. Items whose matching schedule has a different cadence are blocked and never seeded.
7703
+ */
7704
+ export const zAssetsServiceScheduleSeedParameters = z.object({
7705
+ assets_item_ids: z.array(z.string()).min(1).optional(),
7706
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7707
+ });
7708
+ /**
7709
+ * Rewrite blocked schedules — those sharing the template's name and kind with a different interval — to the template's cadence, which links them to it.
7710
+ */
7711
+ export const zAssetsServiceScheduleSyncParameters = z.object({
7712
+ schedule_ids: z.array(z.string()).min(1).optional(),
7713
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7714
+ });
7591
7715
  /**
7592
7716
  * A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
7593
7717
  */
@@ -8588,10 +8712,7 @@ export const zUpdateServiceScheduleTemplatePath = z.object({
8588
8712
  * Success
8589
8713
  */
8590
8714
  export const zUpdateServiceScheduleTemplateResponse = zAssetsServiceScheduleTemplateResponseObject;
8591
- export const zSeedServiceScheduleTemplateBody = z.object({
8592
- assets_item_ids: z.array(z.string()).optional(),
8593
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
8594
- });
8715
+ export const zSeedServiceScheduleTemplateBody = zAssetsServiceScheduleSeedParameters;
8595
8716
  export const zSeedServiceScheduleTemplatePath = z.object({
8596
8717
  product_id: z.string(),
8597
8718
  service_schedule_template_id: z.string()
@@ -8603,10 +8724,7 @@ export const zSeedServiceScheduleTemplateResponse = z.object({
8603
8724
  count: z.int(),
8604
8725
  data: z.array(zAssetsServiceScheduleResponseObject)
8605
8726
  });
8606
- export const zSyncServiceScheduleTemplateBody = z.object({
8607
- schedule_ids: z.array(z.string()).optional(),
8608
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
8609
- });
8727
+ export const zSyncServiceScheduleTemplateBody = zAssetsServiceScheduleSyncParameters;
8610
8728
  export const zSyncServiceScheduleTemplatePath = z.object({
8611
8729
  product_id: z.string(),
8612
8730
  service_schedule_template_id: z.string()
@@ -11179,6 +11297,62 @@ export const zCreateProjectTradePath = z.object({
11179
11297
  * Created
11180
11298
  */
11181
11299
  export const zCreateProjectTradeResponse = zPwaTradeResponseObject;
11300
+ export const zListProjectWageDeterminationRateRuleHistoryPath = z.object({
11301
+ project_id: z.string(),
11302
+ wage_determination_id: z.string(),
11303
+ rate_rule_id: z.string()
11304
+ });
11305
+ export const zListProjectWageDeterminationRateRuleHistoryQuery = z.object({
11306
+ 'as_of[valid]': z.string().optional()
11307
+ });
11308
+ /**
11309
+ * Success
11310
+ */
11311
+ export const zListProjectWageDeterminationRateRuleHistoryResponse = z.object({
11312
+ meta: zMeta,
11313
+ links: zLinks,
11314
+ data: z.array(zProjectRateRuleHistoryVersionObject)
11315
+ });
11316
+ export const zListProjectWageDeterminationRateRulesPath = z.object({
11317
+ project_id: z.string(),
11318
+ wage_determination_id: z.string()
11319
+ });
11320
+ export const zListProjectWageDeterminationRateRulesQuery = z.object({
11321
+ 'as_of[valid]': z.iso.datetime().optional(),
11322
+ as_of: z.string().optional(),
11323
+ 'as_of[bogus_axis]': z.string().optional(),
11324
+ 'as_of[valid][gte]': z.string().optional(),
11325
+ 'as_of[transaction]': z.string().optional()
11326
+ });
11327
+ /**
11328
+ * Success
11329
+ */
11330
+ export const zListProjectWageDeterminationRateRulesResponse = z.object({
11331
+ meta: zMeta,
11332
+ links: zLinks,
11333
+ data: z.array(zProjectRateRuleResponseObject)
11334
+ });
11335
+ export const zCreateProjectWageDeterminationRateRuleBody = zRateRuleParameters;
11336
+ export const zCreateProjectWageDeterminationRateRulePath = z.object({
11337
+ project_id: z.string(),
11338
+ wage_determination_id: z.string()
11339
+ });
11340
+ /**
11341
+ * Created
11342
+ */
11343
+ export const zCreateProjectWageDeterminationRateRuleResponse = zProjectRateRuleResponseObject;
11344
+ export const zGetProjectWageDeterminationRateRulePath = z.object({
11345
+ project_id: z.string(),
11346
+ wage_determination_id: z.string(),
11347
+ id: z.string()
11348
+ });
11349
+ export const zGetProjectWageDeterminationRateRuleQuery = z.object({
11350
+ 'as_of[valid]': z.iso.datetime().optional()
11351
+ });
11352
+ /**
11353
+ * Success
11354
+ */
11355
+ export const zGetProjectWageDeterminationRateRuleResponse = zProjectRateRuleResponseObject;
11182
11356
  export const zListProjectSitesPath = z.object({
11183
11357
  project_id: z.string()
11184
11358
  });
@@ -11228,6 +11402,87 @@ export const zUpdateProjectSitePath = z.object({
11228
11402
  * Success
11229
11403
  */
11230
11404
  export const zUpdateProjectSiteResponse = zProjectSiteResponseObject;
11405
+ export const zShiftProjectWageDeterminationGenesisBody = zProjectWageDeterminationGenesisParameters;
11406
+ export const zShiftProjectWageDeterminationGenesisHeaders = z.object({
11407
+ 'If-Match': z.string()
11408
+ });
11409
+ export const zShiftProjectWageDeterminationGenesisPath = z.object({
11410
+ project_id: z.string(),
11411
+ wage_determination_id: z.string()
11412
+ });
11413
+ /**
11414
+ * Success
11415
+ */
11416
+ export const zShiftProjectWageDeterminationGenesisResponse = zProjectWageDeterminationResponseObject;
11417
+ export const zListProjectWageDeterminationHistoryPath = z.object({
11418
+ project_id: z.string(),
11419
+ wage_determination_id: z.string()
11420
+ });
11421
+ export const zListProjectWageDeterminationHistoryQuery = z.object({
11422
+ 'as_of[valid]': z.string().optional()
11423
+ });
11424
+ /**
11425
+ * Success
11426
+ */
11427
+ export const zListProjectWageDeterminationHistoryResponse = z.object({
11428
+ meta: zMeta,
11429
+ links: zLinks,
11430
+ data: z.array(zProjectWageDeterminationHistoryVersionObject)
11431
+ });
11432
+ export const zCancelProjectWageDeterminationScheduledChangesHeaders = z.object({
11433
+ 'If-Match': z.string()
11434
+ });
11435
+ export const zCancelProjectWageDeterminationScheduledChangesPath = z.object({
11436
+ project_id: z.string(),
11437
+ wage_determination_id: z.string()
11438
+ });
11439
+ /**
11440
+ * Success
11441
+ */
11442
+ export const zCancelProjectWageDeterminationScheduledChangesResponse = zProjectWageDeterminationResponseObject;
11443
+ export const zListProjectWageDeterminationScheduledChangesPath = z.object({
11444
+ project_id: z.string(),
11445
+ wage_determination_id: z.string()
11446
+ });
11447
+ /**
11448
+ * Success with scheduled changes
11449
+ */
11450
+ export const zListProjectWageDeterminationScheduledChangesResponse = z.array(zProjectWageDeterminationResponseObject);
11451
+ export const zScheduleProjectWageDeterminationChangeBody = zProjectWageDeterminationScheduledChangeParameters;
11452
+ export const zScheduleProjectWageDeterminationChangeHeaders = z.object({
11453
+ 'If-Match': z.string()
11454
+ });
11455
+ export const zScheduleProjectWageDeterminationChangePath = z.object({
11456
+ project_id: z.string(),
11457
+ wage_determination_id: z.string()
11458
+ });
11459
+ /**
11460
+ * Created
11461
+ */
11462
+ export const zScheduleProjectWageDeterminationChangeResponse = zProjectWageDeterminationResponseObject;
11463
+ export const zCancelProjectWageDeterminationScheduledTerminationHeaders = z.object({
11464
+ 'If-Match': z.string()
11465
+ });
11466
+ export const zCancelProjectWageDeterminationScheduledTerminationPath = z.object({
11467
+ project_id: z.string(),
11468
+ wage_determination_id: z.string()
11469
+ });
11470
+ /**
11471
+ * Success
11472
+ */
11473
+ export const zCancelProjectWageDeterminationScheduledTerminationResponse = zProjectWageDeterminationResponseObject;
11474
+ export const zScheduleProjectWageDeterminationTerminationBody = zProjectWageDeterminationScheduledTerminationParameters;
11475
+ export const zScheduleProjectWageDeterminationTerminationHeaders = z.object({
11476
+ 'If-Match': z.string()
11477
+ });
11478
+ export const zScheduleProjectWageDeterminationTerminationPath = z.object({
11479
+ project_id: z.string(),
11480
+ wage_determination_id: z.string()
11481
+ });
11482
+ /**
11483
+ * Created
11484
+ */
11485
+ export const zScheduleProjectWageDeterminationTerminationResponse = zProjectWageDeterminationResponseObject;
11231
11486
  export const zListProjectWageDeterminationsPath = z.object({
11232
11487
  project_id: z.string()
11233
11488
  });
@@ -11303,6 +11558,9 @@ export const zListProjectsQuery = z.object({
11303
11558
  ]).optional(),
11304
11559
  'filter[external_id]': z.string().optional(),
11305
11560
  'filter[name]': z.string().optional(),
11561
+ 'filter[owned_by_company_id]': z.string().optional(),
11562
+ 'filter[job_id]': z.string().optional(),
11563
+ 'filter[site_id]': z.string().optional(),
11306
11564
  'filter[created_at][gte]': z.iso.datetime().optional(),
11307
11565
  'filter[created_at][lte]': z.iso.datetime().optional(),
11308
11566
  'filter[updated_at][gte]': z.iso.datetime().optional(),