@dsptch-work/api-client 0.31.0 → 0.33.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,12 +164,24 @@ 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**
170
176
  *
171
177
  * The resource's timeline already ends at a scheduled termination, and scheduling a second one would silently move it. Moving an end is two steps on purpose: cancel the standing termination, then schedule the one you want.
172
178
  *
179
+ * ### authorization_revoked
180
+ *
181
+ * **Authorization Revoked**
182
+ *
183
+ * The assessor grant is revoked. A revoked grant keeps its row as history and cannot be changed or revoked again. To make the user an assessor again, grant them anew.
184
+ *
173
185
  * ### import_in_progress
174
186
  *
175
187
  * **Import In Progress**
@@ -350,11 +362,17 @@ export const zProblem = z.object({
350
362
  *
351
363
  * ## 503
352
364
  *
365
+ * ### database_timeout
366
+ *
367
+ * **Database Timeout**
368
+ *
369
+ * A database statement behind the request ran past the server's time limit and was stopped before it finished. The request may be fine as sent — resend it after the `Retry-After` window, and if it keeps timing out, ask for less at once, such as a narrower filter or a smaller page.
370
+ *
353
371
  * ### write_contended
354
372
  *
355
373
  * **Write Contended**
356
374
  *
357
- * Another write to the same resource held it for longer than this request was willing to wait, so nothing was applied. The request itself is fine — resend it unchanged after the `Retry-After` window.
375
+ * Another write to the same resource held it for longer than this request was willing to wait, or collided with it, so nothing was applied. The request itself is fine — resend it unchanged after the `Retry-After` window.
358
376
  *
359
377
  */
360
378
  export const zProblemTypeCatalog = z.enum([
@@ -380,7 +398,9 @@ export const zProblemTypeCatalog = z.enum([
380
398
  'insufficient_api_key_scope',
381
399
  'user_scoped_key_required',
382
400
  'not_found',
401
+ 'already_subscribed',
383
402
  'already_terminated',
403
+ 'authorization_revoked',
384
404
  'import_in_progress',
385
405
  'pay_schedule_already_exists',
386
406
  'product_archived',
@@ -409,6 +429,7 @@ export const zProblemTypeCatalog = z.enum([
409
429
  'precondition_required',
410
430
  'too_many_requests',
411
431
  'internal_error',
432
+ 'database_timeout',
412
433
  'write_contended'
413
434
  ]);
414
435
  export const zApiKeyScopeResponseObject = z.object({
@@ -471,6 +492,42 @@ export const zDirectUploadResponseObject = z.object({
471
492
  headers: z.record(z.string(), z.string())
472
493
  })
473
494
  });
495
+ /**
496
+ * One assessor-registry grant for one standard. Department scope is informational. revoked_at is null while the grant is active.
497
+ */
498
+ export const zCompetencyAssessorAuthorizationResponseObject = z.object({
499
+ id: z.string(),
500
+ user_id: z.string(),
501
+ competencies_standard_id: z.string(),
502
+ companies_department_id: z.string().nullable(),
503
+ kind: z.enum(['authorized_assessor', 'qualified_assessor']),
504
+ granted_by_user_id: z.string(),
505
+ granted_at: z.iso.datetime(),
506
+ revoked_at: z.iso.datetime().nullable(),
507
+ state: z.enum(['active', 'revoked']),
508
+ created_at: z.iso.datetime(),
509
+ updated_at: z.iso.datetime()
510
+ });
511
+ /**
512
+ * Grant an assessor role for one standard. A user key grants as its user. A company key names the grantor. An active grant of the same kind for the same user and standard is unique.
513
+ */
514
+ export const zCompetencyAssessorAuthorizationParameters = z.object({
515
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
516
+ kind: z.enum(['authorized_assessor', 'qualified_assessor']),
517
+ competencies_standard_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
518
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
519
+ granted_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional()
520
+ });
521
+ /**
522
+ * Update the department note on an active grant. Kind, user, standard, and grantor are fixed. A revoked grant answers 409 authorization_revoked.
523
+ */
524
+ export const zCompetencyAssessorAuthorizationUpdateParameters = z.object({
525
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
526
+ });
527
+ /**
528
+ * Revoke an active grant. The body takes no fields; send an empty object or no body. Revocation sets revoked_at and keeps the row; revoking it again answers 409 authorization_revoked.
529
+ */
530
+ export const zCompetencyAssessorAuthorizationRevocationParameters = z.record(z.string(), z.never());
474
531
  /**
475
532
  * A durable standing. The candidate passed the standard at level_sort_order. There is no level id, so the standing survives the next revision. This API does not create or update qualifications.
476
533
  */
@@ -725,27 +782,27 @@ export const zApprenticeshipAllocationResponseObject = z.object({
725
782
  * 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
783
  */
727
784
  export const zApprenticeshipAllocationCreateParameters = z.object({
728
- apprenticeship_work_process_category_id: z.string().optional(),
729
- timekeeping_time_card_id: z.string().optional(),
785
+ timekeeping_time_card_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
786
+ apprenticeship_work_process_category_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
730
787
  minutes: z.int(),
731
- description: z.string().optional(),
732
- allocated_at: z.iso.datetime().optional()
788
+ description: z.string().nullish(),
789
+ allocated_at: z.string().optional()
733
790
  });
734
791
  /**
735
792
  * 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
793
  */
737
794
  export const zApprenticeshipAllocationUpdateParameters = z.object({
738
- apprenticeship_work_process_category_id: z.string().nullish(),
795
+ apprenticeship_work_process_category_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
739
796
  minutes: z.int().optional(),
740
797
  description: z.string().nullish(),
741
- allocated_at: z.iso.datetime().optional()
798
+ allocated_at: z.string().optional()
742
799
  });
743
800
  /**
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.
801
+ * 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
802
  */
746
803
  export const zApprenticeshipApprenticeParameters = z.object({
747
- apprenticeship_wage_schedule_id: z.string(),
748
- user_id: z.string(),
804
+ apprenticeship_wage_schedule_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
805
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
749
806
  status: z.enum([
750
807
  'active',
751
808
  'pending',
@@ -763,7 +820,7 @@ export const zApprenticeshipApprenticeParameters = z.object({
763
820
  operative_end_date: z.iso.date().nullish()
764
821
  });
765
822
  /**
766
- * Create an apprenticeship program sponsored by your company; the sponsor is always your company and is never taken from the request body.
823
+ * 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
824
  */
768
825
  export const zApprenticeshipProgramParameters = z.object({
769
826
  program_number: z.string(),
@@ -773,7 +830,7 @@ export const zApprenticeshipProgramParameters = z.object({
773
830
  registration_agency_type: z.enum(['federal', 'regional']).nullish()
774
831
  });
775
832
  /**
776
- * Update an apprenticeship program sponsored by your company. Send only the fields to change; the sponsor is fixed to your company.
833
+ * 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
834
  */
778
835
  export const zApprenticeshipProgramUpdateParameters = z.object({
779
836
  program_number: z.string().optional(),
@@ -783,7 +840,7 @@ export const zApprenticeshipProgramUpdateParameters = z.object({
783
840
  registration_agency_type: z.enum(['federal', 'regional']).nullish()
784
841
  });
785
842
  /**
786
- * Create an occupation (trade) within a sponsored program; the program is taken from the URL path.
843
+ * 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
844
  */
788
845
  export const zApprenticeshipOccupationParameters = z.object({
789
846
  rapids_code: z.string(),
@@ -801,7 +858,7 @@ export const zApprenticeshipOccupationParameters = z.object({
801
858
  num_journeyworkers: z.int()
802
859
  });
803
860
  /**
804
- * Update an occupation (trade) within a sponsored program. Send only the fields to change; the program is taken from the URL path.
861
+ * 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
862
  */
806
863
  export const zApprenticeshipOccupationUpdateParameters = z.object({
807
864
  rapids_code: z.string().optional(),
@@ -1039,17 +1096,17 @@ export const zPeopleEmploymentResponseObject = z.object({
1039
1096
  * 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
1097
  */
1041
1098
  export const zPeopleEmploymentCreateParameters = z.object({
1042
- user_id: z.string(),
1099
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1043
1100
  hire_date: z.iso.date(),
1044
1101
  type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
1045
1102
  title: z.string().nullish(),
1046
- manager_user_id: z.string().nullish(),
1103
+ manager_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1047
1104
  payroll_id: z.string().nullish(),
1048
1105
  enrolled_in_t_and_a: z.boolean().optional(),
1049
1106
  compensation_type: z.enum(['hourly', 'salary']).optional(),
1050
1107
  hourly_rate_cents: z.string().nullish(),
1051
1108
  overtime_eligible: z.boolean().nullish(),
1052
- overtime_package_id: z.string().nullish(),
1109
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1053
1110
  worked_annual_minutes: z.int().nullish(),
1054
1111
  pto_annual_minutes: z.int().nullish(),
1055
1112
  holiday_annual_minutes: z.int().nullish(),
@@ -1062,10 +1119,11 @@ export const zPeopleEmploymentCreateParameters = z.object({
1062
1119
  * 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
1120
  */
1064
1121
  export const zPeopleEmploymentScheduledChangeCreateParameters = z.object({
1122
+ effective_date: z.iso.date(),
1065
1123
  compensation_type: z.enum(['hourly', 'salary']).optional(),
1066
1124
  hourly_rate_cents: z.string().nullish(),
1067
1125
  overtime_eligible: z.boolean().nullish(),
1068
- overtime_package_id: z.string().nullish(),
1126
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1069
1127
  worked_annual_minutes: z.int().nullish(),
1070
1128
  pto_annual_minutes: z.int().nullish(),
1071
1129
  holiday_annual_minutes: z.int().nullish(),
@@ -1073,8 +1131,7 @@ export const zPeopleEmploymentScheduledChangeCreateParameters = z.object({
1073
1131
  training_annual_amount_cents: z.string().nullish(),
1074
1132
  employer_combined_health_amount_cents: z.string().nullish(),
1075
1133
  employer_combined_savings_cents: z.string().nullish(),
1076
- companies_department_id: z.string().nullish(),
1077
- effective_date: z.iso.date()
1134
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1078
1135
  });
1079
1136
  /**
1080
1137
  * 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 +1140,7 @@ export const zPeopleEmploymentScheduledChangeUpdateParameters = z.object({
1083
1140
  compensation_type: z.enum(['hourly', 'salary']).optional(),
1084
1141
  hourly_rate_cents: z.string().nullish(),
1085
1142
  overtime_eligible: z.boolean().nullish(),
1086
- overtime_package_id: z.string().nullish(),
1143
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1087
1144
  worked_annual_minutes: z.int().nullish(),
1088
1145
  pto_annual_minutes: z.int().nullish(),
1089
1146
  holiday_annual_minutes: z.int().nullish(),
@@ -1091,13 +1148,13 @@ export const zPeopleEmploymentScheduledChangeUpdateParameters = z.object({
1091
1148
  training_annual_amount_cents: z.string().nullish(),
1092
1149
  employer_combined_health_amount_cents: z.string().nullish(),
1093
1150
  employer_combined_savings_cents: z.string().nullish(),
1094
- companies_department_id: z.string().nullish()
1151
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1095
1152
  });
1096
1153
  /**
1097
1154
  * Parameters for moving where an employment stint's valid-time timeline begins.
1098
1155
  */
1099
1156
  export const zPeopleEmploymentGenesisParameters = z.object({
1100
- effective_date: z.iso.date().optional()
1157
+ effective_date: z.iso.date()
1101
1158
  });
1102
1159
  /**
1103
1160
  * Parameters for scheduling when an employment stint stops being valid.
@@ -1111,7 +1168,7 @@ export const zPeopleEmploymentScheduledTerminationParameters = z.object({
1111
1168
  export const zPeopleEmploymentUpdateParameters = z.object({
1112
1169
  type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
1113
1170
  title: z.string().nullish(),
1114
- manager_user_id: z.string().nullish(),
1171
+ manager_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
1115
1172
  payroll_id: z.string().nullish(),
1116
1173
  enrolled_in_t_and_a: z.boolean().optional()
1117
1174
  });
@@ -1356,14 +1413,14 @@ export const zPerDiemResponseObject = z.object({
1356
1413
  currency: z.string(),
1357
1414
  taxable: z.boolean(),
1358
1415
  default: z.boolean().nullable(),
1359
- active: z.boolean().nullable(),
1416
+ active: z.boolean(),
1360
1417
  work_type_ids: z.array(z.string()),
1361
1418
  timekeeping_timecode_ids: z.array(z.string()),
1362
1419
  created_at: z.iso.datetime(),
1363
1420
  updated_at: z.iso.datetime()
1364
1421
  });
1365
1422
  /**
1366
- * Request body for creating a per diem. name, currency, and rate_cents are required.
1423
+ * 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
1424
  */
1368
1425
  export const zPerDiemParameters = z.object({
1369
1426
  name: z.string(),
@@ -1371,13 +1428,13 @@ export const zPerDiemParameters = z.object({
1371
1428
  rate_cents: z.string(),
1372
1429
  currency: z.string(),
1373
1430
  taxable: z.boolean().optional(),
1374
- default: z.boolean().nullish(),
1375
- active: z.boolean().nullish(),
1376
- work_type_ids: z.array(z.string()).optional(),
1377
- timekeeping_timecode_ids: z.array(z.string()).optional()
1431
+ default: z.boolean().optional(),
1432
+ active: z.boolean().optional(),
1433
+ work_type_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
1434
+ timekeeping_timecode_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
1378
1435
  });
1379
1436
  /**
1380
- * Request body for updating a per diem. Send only the fields to change.
1437
+ * Request body for updating a per diem. Send only fields to change in JSON; omitted fields remain unchanged.
1381
1438
  */
1382
1439
  export const zPerDiemUpdateParameters = z.object({
1383
1440
  name: z.string().optional(),
@@ -1385,10 +1442,10 @@ export const zPerDiemUpdateParameters = z.object({
1385
1442
  rate_cents: z.string().optional(),
1386
1443
  currency: z.string().optional(),
1387
1444
  taxable: z.boolean().optional(),
1388
- default: z.boolean().nullish(),
1389
- active: z.boolean().nullish(),
1390
- work_type_ids: z.array(z.string()).optional(),
1391
- timekeeping_timecode_ids: z.array(z.string()).optional()
1445
+ default: z.boolean().optional(),
1446
+ active: z.boolean().optional(),
1447
+ work_type_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
1448
+ timekeeping_timecode_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
1392
1449
  });
1393
1450
  /**
1394
1451
  * The filled attribute values of a product or item — one entry per attribute its category makes fillable on that record.
@@ -1552,16 +1609,16 @@ export const zTimeCardPerDiemResponseObject = z.object({
1552
1609
  */
1553
1610
  export const zTimeCardPerDiemParameters = z.object({
1554
1611
  date: z.iso.date(),
1555
- approver_user_id: z.string(),
1556
- per_diem_id: z.string().optional()
1612
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1613
+ per_diem_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1557
1614
  });
1558
1615
  /**
1559
1616
  * 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
1617
  */
1561
1618
  export const zTimeCardPerDiemUpdateParameters = z.object({
1562
1619
  date: z.iso.date().optional(),
1563
- approver_user_id: z.string().optional(),
1564
- per_diem_id: z.string().optional()
1620
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1621
+ per_diem_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
1565
1622
  });
1566
1623
  /**
1567
1624
  * 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 +1678,15 @@ export const zPayPeriodConfigParameters = z.object({
1621
1678
  z.literal(6)
1622
1679
  ]),
1623
1680
  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),
1681
+ currency: z.string().optional(),
1682
+ rounding_interval: z.union([z.literal(1), z.literal(15)]).optional(),
1626
1683
  payroll_system: z.enum([
1627
1684
  'rippling',
1628
1685
  'quickbooks_online',
1629
1686
  'paychex',
1630
1687
  'gusto'
1631
1688
  ]).nullish(),
1632
- paid_after_holiday: z.boolean().optional().default(true),
1689
+ paid_after_holiday: z.boolean().optional(),
1633
1690
  arrear_days: z.int().gte(0),
1634
1691
  pay_run_deadline_days: z.int().gte(1),
1635
1692
  pay_run_deadline_clock_time: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/),
@@ -1758,13 +1815,13 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
1758
1815
  corrections: z.array(zPayPeriodConfigHistoryCorrectionObject)
1759
1816
  });
1760
1817
  /**
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.
1818
+ * 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
1819
  */
1763
1820
  export const zHolidayParameters = z.object({
1764
1821
  name: z.string(),
1765
1822
  date: z.iso.date().optional(),
1766
- holiday_type: z.enum(['fixed', 'floating']),
1767
- month: z.int(),
1823
+ holiday_type: z.enum(['fixed', 'floating']).optional(),
1824
+ month: z.int().optional(),
1768
1825
  mday: z.int().optional(),
1769
1826
  wday: z.int().optional(),
1770
1827
  week: z.int().optional(),
@@ -2099,7 +2156,7 @@ export const zPwaTradeUpdateParameters = z.object({
2099
2156
  * Parameters for merging one PWA trade (craft) into another in the same pool.
2100
2157
  */
2101
2158
  export const zPwaTradeMergeParameters = z.object({
2102
- target_trade_id: z.string()
2159
+ target_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
2103
2160
  });
2104
2161
  /**
2105
2162
  * 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 +2173,14 @@ export const zPwaTradeApprenticeshipOccupationResponseObject = z.object({
2116
2173
  * Parameters for recording an apprentice-scope decision on a trade.
2117
2174
  */
2118
2175
  export const zPwaTradeApprenticeshipOccupationCreateParameters = z.object({
2119
- apprenticeship_occupation_id: z.string(),
2120
- scope_status: z.enum(['in_scope', 'out_of_scope']).nullish()
2176
+ apprenticeship_occupation_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
2177
+ scope_status: z.enum(['in_scope', 'out_of_scope']).optional()
2121
2178
  });
2122
2179
  /**
2123
2180
  * Parameters for flipping an existing apprentice-scope decision's verdict.
2124
2181
  */
2125
2182
  export const zPwaTradeApprenticeshipOccupationUpdateParameters = z.object({
2126
- scope_status: z.enum(['in_scope', 'out_of_scope']).nullish()
2183
+ scope_status: z.enum(['in_scope', 'out_of_scope']).optional()
2127
2184
  });
2128
2185
  /**
2129
2186
  * 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 +2247,7 @@ export const zUserUpdateParameters = z.object({
2190
2247
  state: z.string().nullish(),
2191
2248
  birth_date: z.string().nullish(),
2192
2249
  dol_apprentice_no: z.string().nullish(),
2193
- avatar_signed_id: z.string().nullish()
2250
+ avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
2194
2251
  });
2195
2252
  /**
2196
2253
  * 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 +2311,7 @@ export const zManagerTimeEntryApprovalParameters = z.object({
2254
2311
  'approved',
2255
2312
  'declined'
2256
2313
  ]),
2257
- approver_user_id: z.string()
2314
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
2258
2315
  });
2259
2316
  /**
2260
2317
  * The time-entry body fields shared by the create and update bodies; each of those declares its own requiredness.
@@ -2323,7 +2380,7 @@ export const zFormSubmissionResponseObject = z.object({
2323
2380
  * 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
2381
  */
2325
2382
  export const zUserCompanyScheduledChangesParameters = z.object({
2326
- effective_date: z.string(),
2383
+ effective_date: z.iso.date(),
2327
2384
  hourly_rate: z.string().nullish(),
2328
2385
  compensation_type: z.enum(['hourly', 'salary']).optional(),
2329
2386
  overtime_eligible: z.boolean().optional(),
@@ -2334,7 +2391,7 @@ export const zUserCompanyScheduledChangesParameters = z.object({
2334
2391
  pto_annual_minutes: z.int().nullish(),
2335
2392
  holiday_annual_minutes: z.int().nullish(),
2336
2393
  training_annual_minutes: z.int().nullish(),
2337
- companies_department_id: z.string().nullish()
2394
+ companies_department_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
2338
2395
  });
2339
2396
  /**
2340
2397
  * 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 +2480,10 @@ export const zCompanyResponseObject = z.object({
2423
2480
  created_at: z.iso.datetime(),
2424
2481
  updated_at: z.iso.datetime()
2425
2482
  });
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({
2483
+ /**
2484
+ * 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.
2485
+ */
2486
+ export const zCompanyParameters = z.object({
2499
2487
  name: z.string().optional(),
2500
2488
  legal_name: z.string().nullish(),
2501
2489
  description: z.string().nullish(),
@@ -2537,7 +2525,7 @@ export const zCompanyParameters = z.intersection(z.union([
2537
2525
  ]).nullish(),
2538
2526
  naics_code: z.string().nullish(),
2539
2527
  linkedin_url: z.string().nullish()
2540
- }));
2528
+ });
2541
2529
  /**
2542
2530
  * A custom-field value stored on a record, addressed by the configuration it belongs to.
2543
2531
  */
@@ -2552,14 +2540,19 @@ export const zCustomFieldConfigsResponseObject = z.object({
2552
2540
  id: z.string(),
2553
2541
  name: z.string(),
2554
2542
  description: z.string().nullable(),
2555
- model_type: z.string(),
2543
+ model_type: z.enum([
2544
+ 'apprenticeship_apprentice',
2545
+ 'company',
2546
+ 'job',
2547
+ 'user_company'
2548
+ ]),
2556
2549
  visible: z.boolean(),
2557
2550
  company_id: z.string(),
2558
2551
  created_at: z.iso.datetime(),
2559
2552
  updated_at: z.iso.datetime()
2560
2553
  });
2561
2554
  /**
2562
- * Request body for creating a custom field definition. `name` and `model_type` are required.
2555
+ * 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
2556
  */
2564
2557
  export const zCustomFieldConfigParameters = z.object({
2565
2558
  name: z.string(),
@@ -2573,17 +2566,11 @@ export const zCustomFieldConfigParameters = z.object({
2573
2566
  visible: z.boolean().optional()
2574
2567
  });
2575
2568
  /**
2576
- * Request body for updating a custom field definition. Every field is optional; omit a field to preserve its current value. The resulting definition's name must remain unique for its company and model type.
2569
+ * Request body for updating a custom field definition. Every field is optional; omit a field to preserve its current value. `model_type` is fixed at creation, so sending it answers 400. The resulting definition's name must remain unique for its company and model type.
2577
2570
  */
2578
2571
  export const zCustomFieldConfigUpdateParameters = z.object({
2579
2572
  name: z.string().optional(),
2580
2573
  description: z.string().nullish(),
2581
- model_type: z.enum([
2582
- 'apprenticeship_apprentice',
2583
- 'company',
2584
- 'job',
2585
- 'user_company'
2586
- ]).optional(),
2587
2574
  visible: z.boolean().optional()
2588
2575
  });
2589
2576
  /**
@@ -2724,7 +2711,7 @@ export const zUserCompanyScheduledChange = z.object({
2724
2711
  id: z.string(),
2725
2712
  start_date: z.string(),
2726
2713
  hourly_rate: z.string().nullable(),
2727
- compensation_type: z.string(),
2714
+ compensation_type: z.enum(['hourly', 'salary']),
2728
2715
  overtime_eligible: z.boolean(),
2729
2716
  training_annual_amount: z.string().nullable(),
2730
2717
  employer_combined_health_amount: z.string().nullable(),
@@ -2747,7 +2734,7 @@ export const zUserCompanyScheduledChangesResponse = z.object({
2747
2734
  * 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
2735
  */
2749
2736
  export const zUserCompanyScheduledTerminationParameters = z.object({
2750
- termination_date: z.string()
2737
+ termination_date: z.iso.date()
2751
2738
  });
2752
2739
  /**
2753
2740
  * One problem found while processing an accepted import, whatever its type.
@@ -3067,13 +3054,17 @@ export const zManagerTimeCardApprovalParameters = z.object({
3067
3054
  'approved',
3068
3055
  'declined'
3069
3056
  ]),
3070
- approver_user_id: z.string()
3057
+ approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
3071
3058
  });
3072
3059
  /**
3073
3060
  * 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
3061
  */
3075
3062
  export const zWorkerTimeCardApprovalParameters = z.object({
3076
- status: z.enum(['pending', 'approved'])
3063
+ status: z.enum([
3064
+ 'pending',
3065
+ 'approved',
3066
+ 'declined'
3067
+ ])
3077
3068
  });
3078
3069
  /**
3079
3070
  * 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 +3196,7 @@ export const zPayrollFringeBenefitPlanResponseObject = z.object({
3205
3196
  * Request body for creating a fringe-benefit plan. timekeeping_pay_period_config_id, name, plan_number, and benefit_category are required.
3206
3197
  */
3207
3198
  export const zPayrollFringeBenefitPlanParameters = z.object({
3208
- timekeeping_pay_period_config_id: z.string(),
3199
+ timekeeping_pay_period_config_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3209
3200
  name: z.string(),
3210
3201
  plan_number: z.string(),
3211
3202
  funded: z.boolean().optional(),
@@ -3377,9 +3368,9 @@ export const zPayrollRunResponseObject = z.object({
3377
3368
  * 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
3369
  */
3379
3370
  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(),
3371
+ company_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3372
+ timekeeping_pay_period_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3373
+ payrolls_credential_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3383
3374
  run_type: z.enum([
3384
3375
  'CORRECTION',
3385
3376
  'ON_CYCLE',
@@ -3395,8 +3386,8 @@ export const zPayrollRunParameters = z.object({
3395
3386
  * 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
3387
  */
3397
3388
  export const zPayrollRunUpdateParameters = z.object({
3398
- timekeeping_pay_period_id: z.string().nullish(),
3399
- payrolls_credential_id: z.string().nullish(),
3389
+ timekeeping_pay_period_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3390
+ payrolls_credential_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3400
3391
  run_type: z.enum([
3401
3392
  'CORRECTION',
3402
3393
  'ON_CYCLE',
@@ -3532,14 +3523,14 @@ export const zProjectSiteResponseObject = z.object({
3532
3523
  * 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
3524
  */
3534
3525
  export const zProjectSiteParameters = z.object({
3535
- site_id: z.string(),
3536
- feature_ids: z.array(z.string()).optional()
3526
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3527
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
3537
3528
  });
3538
3529
  /**
3539
3530
  * 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
3531
  */
3541
3532
  export const zProjectSiteUpdateParameters = z.object({
3542
- feature_ids: z.array(z.string()).optional()
3533
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
3543
3534
  });
3544
3535
  export const zSiteCheckInResponseObject = z.object({
3545
3536
  id: z.string(),
@@ -3724,14 +3715,16 @@ export const zFeatureResponseObject = z.object({
3724
3715
  updated_at: z.iso.datetime()
3725
3716
  });
3726
3717
  /**
3727
- * A billing metric — the count of distinct prevailing-wage/apprenticeship (PWA) tracked workers on a project in a given month, aggregated for the billed company. One row per project per month.
3718
+ * A billing metric — the count of distinct prevailing-wage/apprenticeship (PWA) tracked workers on one billable unit in a given month, aggregated for the billed company. A billable unit is a project (one row per project per month, counting workers once across every job in the project tree) or a job outside any project (one row per job per month). Exactly one of `project_id` and `job_id` is set.
3728
3719
  */
3729
3720
  export const zBillingPwaUserCountByProjectByMonthResponseObject = z.object({
3730
3721
  year_month: z.string(),
3731
3722
  year: z.int(),
3732
3723
  month: z.int(),
3733
- project_id: z.string(),
3734
- project_name: z.string(),
3724
+ project_id: z.string().nullable(),
3725
+ project_name: z.string().nullable(),
3726
+ job_id: z.string().nullable(),
3727
+ job_name: z.string().nullable(),
3735
3728
  user_count: z.int()
3736
3729
  });
3737
3730
  /**
@@ -3882,7 +3875,7 @@ export const zComplianceCheckParameters = z.object({
3882
3875
  status: z.enum(['dismissed', 'pending']).optional(),
3883
3876
  time_due: z.iso.datetime().nullish(),
3884
3877
  assignee_user_ids: z.array(z.string()).optional(),
3885
- file_signed_id: z.string().optional()
3878
+ file_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional()
3886
3879
  });
3887
3880
  export const zRichTextObject = z.object({
3888
3881
  text: z.string(),
@@ -4057,9 +4050,9 @@ export const zPaystubResponseObject = z.object({
4057
4050
  * 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
4051
  */
4059
4052
  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(),
4053
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4054
+ payrolls_payroll_run_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4055
+ timekeeping_time_card_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4063
4056
  external_id: z.string().nullish(),
4064
4057
  check_number: z.string().nullish()
4065
4058
  });
@@ -4099,8 +4092,8 @@ export const zPriorPeriodAdjustmentResponseObject = z.object({
4099
4092
  * 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
4093
  */
4101
4094
  export const zPriorPeriodAdjustmentParameters = z.object({
4102
- payrolls_paystub_line_item_id: z.string(),
4103
- created_by_user_id: z.string(),
4095
+ payrolls_paystub_line_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4096
+ created_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4104
4097
  amount_cents: z.string(),
4105
4098
  rationale: z.enum([
4106
4099
  'hours_correction',
@@ -4108,7 +4101,7 @@ export const zPriorPeriodAdjustmentParameters = z.object({
4108
4101
  'pwa_compliance',
4109
4102
  'rate_correction'
4110
4103
  ]),
4111
- job_id: z.string().nullish(),
4104
+ job_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4112
4105
  notes: z.string().nullish(),
4113
4106
  pwa_compliance_eligible: z.boolean().optional()
4114
4107
  });
@@ -4123,7 +4116,7 @@ export const zPriorPeriodAdjustmentUpdateParameters = z.object({
4123
4116
  'pwa_compliance',
4124
4117
  'rate_correction'
4125
4118
  ]).optional(),
4126
- job_id: z.string().nullish(),
4119
+ job_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
4127
4120
  notes: z.string().nullish(),
4128
4121
  pwa_compliance_eligible: z.boolean().optional()
4129
4122
  });
@@ -4275,14 +4268,14 @@ export const zJobSiteResponseObject = z.object({
4275
4268
  * Request body for attaching a site to a job. `site_id` is required; `feature_ids` is optional and defaults to none.
4276
4269
  */
4277
4270
  export const zJobSiteParameters = z.object({
4278
- site_id: z.string(),
4279
- feature_ids: z.array(z.string()).optional()
4271
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4272
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
4280
4273
  });
4281
4274
  /**
4282
4275
  * 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
4276
  */
4284
4277
  export const zJobSiteUpdateParameters = z.object({
4285
- feature_ids: z.array(z.string()).optional()
4278
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
4286
4279
  });
4287
4280
  /**
4288
4281
  * 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.
@@ -4884,7 +4877,7 @@ export const zProductionCompletionUpdateParameters = z.object({
4884
4877
  * Fields shared by both completion payload kinds.
4885
4878
  */
4886
4879
  export const zProductionCompletionBaseParameters = z.object({
4887
- production_job_scope_price_id: z.string().optional(),
4880
+ production_job_scope_price_id: z.string(),
4888
4881
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4889
4882
  notes: z.string().nullish(),
4890
4883
  work_date: z.iso.date().optional(),
@@ -5224,18 +5217,18 @@ export const zPositionResponseObject = z.object({
5224
5217
  updated_at: z.iso.datetime()
5225
5218
  });
5226
5219
  /**
5227
- * Request body for granting a user a role in a company.
5220
+ * Request body for granting a user a role in a company. All three fields are required; omitting one answers 400.
5228
5221
  */
5229
5222
  export const zUserRoleRequest = z.object({
5230
- user_id: z.string().optional(),
5231
- company_id: z.string().optional(),
5223
+ company_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5224
+ user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5232
5225
  role: z.enum([
5233
5226
  'TECHNICIAN',
5234
5227
  'FIELD_LEAD',
5235
5228
  'MANAGER',
5236
5229
  'SAFETY_MANAGER',
5237
5230
  'ADMIN'
5238
- ]).optional()
5231
+ ])
5239
5232
  });
5240
5233
  /**
5241
5234
  * 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.
@@ -5290,7 +5283,7 @@ export const zUserResponseObject = z.object({
5290
5283
  overtime_eligible: z.boolean().nullable(),
5291
5284
  enrolled_in_t_and_a: z.boolean().nullable(),
5292
5285
  payroll_id: z.string().nullable(),
5293
- compensation_type: z.string().nullable(),
5286
+ compensation_type: z.enum(['hourly', 'salary']).nullable(),
5294
5287
  hourly_rate: z.string().nullish(),
5295
5288
  training_annual_amount: z.string().nullish(),
5296
5289
  employer_combined_health_amount: z.string().nullish(),
@@ -5402,7 +5395,7 @@ export const zUserParameters = z.intersection(z.union([
5402
5395
  winda_id: z.string().optional(),
5403
5396
  linkedin_url: z.string().optional(),
5404
5397
  roles: z.array(z.string()).nullish(),
5405
- avatar_signed_id: z.string().optional(),
5398
+ avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
5406
5399
  created_by_user_id: z.string().optional(),
5407
5400
  last_sent_by_user_id: z.string().nullish(),
5408
5401
  skip_notify: z.boolean().optional(),
@@ -6255,6 +6248,106 @@ export const zProjectWageDeterminationResponseObject = z.discriminatedUnion('typ
6255
6248
  zFederalProjectWageDeterminationResponseObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Federal') }),
6256
6249
  zRegionalProjectWageDeterminationResponseObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
6257
6250
  ]);
6251
+ export const zFederalProjectWageDeterminationHistoryCorrectionObject = z.object({
6252
+ project_wage_determination_id: z.string(),
6253
+ project_id: z.string(),
6254
+ pwa_trade_id: z.string(),
6255
+ overtime_package_id: z.string().nullable(),
6256
+ pay_rates_rule_package_id: z.string().nullable(),
6257
+ type: z.enum(['Pwa::ProjectWageDeterminations::Federal']),
6258
+ labor_classification: z.string(),
6259
+ hourly_rate_cents: z.string(),
6260
+ fringe_rate_cents: z.string(),
6261
+ class_code: z.string().nullable(),
6262
+ construction_category: z.enum([
6263
+ 'building',
6264
+ 'heavy',
6265
+ 'highway',
6266
+ 'residential'
6267
+ ]).nullable(),
6268
+ general_wage_determination: z.string().nullable(),
6269
+ valid_from: z.iso.datetime().nullable(),
6270
+ valid_to: z.iso.datetime().nullable(),
6271
+ created_at: z.iso.datetime(),
6272
+ updated_at: z.iso.datetime()
6273
+ });
6274
+ export const zRegionalProjectWageDeterminationHistoryCorrectionObject = z.object({
6275
+ project_wage_determination_id: z.string(),
6276
+ project_id: z.string(),
6277
+ pwa_trade_id: z.string(),
6278
+ overtime_package_id: z.string().nullable(),
6279
+ pay_rates_rule_package_id: z.string().nullable(),
6280
+ type: z.enum(['Pwa::ProjectWageDeterminations::Regional']),
6281
+ labor_classification: z.string(),
6282
+ hourly_rate_cents: z.string(),
6283
+ fringe_rate_cents: z.string(),
6284
+ general_wage_determination: z.string().nullable(),
6285
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
6286
+ valid_from: z.iso.datetime().nullable(),
6287
+ valid_to: z.iso.datetime().nullable(),
6288
+ created_at: z.iso.datetime(),
6289
+ updated_at: z.iso.datetime()
6290
+ });
6291
+ export const zProjectWageDeterminationHistoryCorrectionObject = z.discriminatedUnion('type', [
6292
+ zFederalProjectWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Federal') }),
6293
+ zRegionalProjectWageDeterminationHistoryCorrectionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
6294
+ ]);
6295
+ export const zFederalProjectWageDeterminationHistoryVersionObject = z.object({
6296
+ project_wage_determination_id: z.string(),
6297
+ project_id: z.string(),
6298
+ pwa_trade_id: z.string(),
6299
+ overtime_package_id: z.string().nullable(),
6300
+ pay_rates_rule_package_id: z.string().nullable(),
6301
+ type: z.enum(['Pwa::ProjectWageDeterminations::Federal']),
6302
+ labor_classification: z.string(),
6303
+ hourly_rate_cents: z.string(),
6304
+ fringe_rate_cents: z.string(),
6305
+ class_code: z.string().nullable(),
6306
+ construction_category: z.enum([
6307
+ 'building',
6308
+ 'heavy',
6309
+ 'highway',
6310
+ 'residential'
6311
+ ]).nullable(),
6312
+ general_wage_determination: z.string().nullable(),
6313
+ valid_from: z.iso.datetime().nullable(),
6314
+ valid_to: z.iso.datetime().nullable(),
6315
+ created_at: z.iso.datetime(),
6316
+ updated_at: z.iso.datetime(),
6317
+ version_status: z.enum([
6318
+ 'scheduled',
6319
+ 'current',
6320
+ 'historical'
6321
+ ]),
6322
+ corrections: z.array(zProjectWageDeterminationHistoryCorrectionObject)
6323
+ });
6324
+ export const zRegionalProjectWageDeterminationHistoryVersionObject = z.object({
6325
+ project_wage_determination_id: z.string(),
6326
+ project_id: z.string(),
6327
+ pwa_trade_id: z.string(),
6328
+ overtime_package_id: z.string().nullable(),
6329
+ pay_rates_rule_package_id: z.string().nullable(),
6330
+ type: z.enum(['Pwa::ProjectWageDeterminations::Regional']),
6331
+ labor_classification: z.string(),
6332
+ hourly_rate_cents: z.string(),
6333
+ fringe_rate_cents: z.string(),
6334
+ general_wage_determination: z.string().nullable(),
6335
+ regional_fields: zRegionalWageDeterminationFieldsResponse,
6336
+ valid_from: z.iso.datetime().nullable(),
6337
+ valid_to: z.iso.datetime().nullable(),
6338
+ created_at: z.iso.datetime(),
6339
+ updated_at: z.iso.datetime(),
6340
+ version_status: z.enum([
6341
+ 'scheduled',
6342
+ 'current',
6343
+ 'historical'
6344
+ ]),
6345
+ corrections: z.array(zProjectWageDeterminationHistoryCorrectionObject)
6346
+ });
6347
+ export const zProjectWageDeterminationHistoryVersionObject = z.discriminatedUnion('type', [
6348
+ zFederalProjectWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Federal') }),
6349
+ zRegionalProjectWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
6350
+ ]);
6258
6351
  /**
6259
6352
  * Parameters for creating a Federal (Davis-Bacon) wage determination on a project.
6260
6353
  */
@@ -6316,6 +6409,36 @@ export const zProjectWageDeterminationUpdateParameters = z.object({
6316
6409
  general_wage_determination: z.string().nullish(),
6317
6410
  regional_fields: zRegionalWageDeterminationFields.optional()
6318
6411
  });
6412
+ /**
6413
+ * 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.
6414
+ */
6415
+ export const zProjectWageDeterminationScheduledChangeParameters = z.object({
6416
+ effective_date: z.iso.date(),
6417
+ labor_classification: z.string().optional(),
6418
+ hourly_rate_cents: z.string().optional(),
6419
+ fringe_rate_cents: z.string().optional(),
6420
+ class_code: z.string().nullish(),
6421
+ construction_category: z.enum([
6422
+ 'building',
6423
+ 'heavy',
6424
+ 'highway',
6425
+ 'residential'
6426
+ ]).nullish(),
6427
+ general_wage_determination: z.string().nullish(),
6428
+ regional_fields: zRegionalWageDeterminationFields.optional()
6429
+ });
6430
+ /**
6431
+ * Parameters for moving where a project wage determination's timeline begins.
6432
+ */
6433
+ export const zProjectWageDeterminationGenesisParameters = z.object({
6434
+ effective_date: z.iso.date()
6435
+ });
6436
+ /**
6437
+ * Parameters for scheduling when a project wage determination stops being valid.
6438
+ */
6439
+ export const zProjectWageDeterminationScheduledTerminationParameters = z.object({
6440
+ effective_date: z.iso.date()
6441
+ });
6319
6442
  /**
6320
6443
  * The adjustment applied when a rule matches — an addition to the wage or fringe rate.
6321
6444
  */
@@ -6420,6 +6543,48 @@ export const zRateRuleHistoryVersionObject = z.object({
6420
6543
  ]),
6421
6544
  corrections: z.array(zRateRuleHistoryCorrectionObject)
6422
6545
  });
6546
+ /**
6547
+ * 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.
6548
+ */
6549
+ export const zProjectRateRuleResponseObject = z.object({
6550
+ id: z.string(),
6551
+ project_wage_determination_id: z.string(),
6552
+ pay_rates_rule_package_id: z.string(),
6553
+ effect: zRateRuleEffect,
6554
+ conditions: z.array(zRateRuleCondition),
6555
+ valid_from: z.iso.datetime().nullable(),
6556
+ valid_to: z.iso.datetime().nullable(),
6557
+ created_at: z.iso.datetime(),
6558
+ updated_at: z.iso.datetime()
6559
+ });
6560
+ export const zProjectRateRuleHistoryCorrectionObject = z.object({
6561
+ pay_rates_rule_id: z.string(),
6562
+ project_wage_determination_id: z.string(),
6563
+ pay_rates_rule_package_id: z.string(),
6564
+ effect: zRateRuleEffect,
6565
+ conditions: z.array(zRateRuleCondition),
6566
+ valid_from: z.iso.datetime().nullable(),
6567
+ valid_to: z.iso.datetime().nullable(),
6568
+ created_at: z.iso.datetime(),
6569
+ updated_at: z.iso.datetime()
6570
+ });
6571
+ export const zProjectRateRuleHistoryVersionObject = z.object({
6572
+ pay_rates_rule_id: z.string(),
6573
+ project_wage_determination_id: z.string(),
6574
+ pay_rates_rule_package_id: z.string(),
6575
+ effect: zRateRuleEffect,
6576
+ conditions: z.array(zRateRuleCondition),
6577
+ valid_from: z.iso.datetime().nullable(),
6578
+ valid_to: z.iso.datetime().nullable(),
6579
+ created_at: z.iso.datetime(),
6580
+ updated_at: z.iso.datetime(),
6581
+ version_status: z.enum([
6582
+ 'scheduled',
6583
+ 'current',
6584
+ 'historical'
6585
+ ]),
6586
+ corrections: z.array(zProjectRateRuleHistoryCorrectionObject)
6587
+ });
6423
6588
  /**
6424
6589
  * A conditional wage or fringe adjustment owned by a pay-rate rule package, with the selected version's valid-time window.
6425
6590
  */
@@ -6596,7 +6761,7 @@ export const zOvertimeRuleParameters = z.object({
6596
6761
  'one_five_x',
6597
6762
  'two_x'
6598
6763
  ]),
6599
- region_id: z.string().nullish(),
6764
+ region_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6600
6765
  eligible_hours_worked: z.int().nullish(),
6601
6766
  specific_day_of_week: z.enum([
6602
6767
  'sunday',
@@ -6620,7 +6785,7 @@ export const zOvertimeRuleUpdateParameters = z.object({
6620
6785
  'one_five_x',
6621
6786
  'two_x'
6622
6787
  ]).optional(),
6623
- region_id: z.string().nullish(),
6788
+ region_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6624
6789
  eligible_hours_worked: z.int().nullish(),
6625
6790
  specific_day_of_week: z.enum([
6626
6791
  'sunday',
@@ -6644,7 +6809,7 @@ export const zOvertimeRuleScheduledChangeParameters = z.object({
6644
6809
  'one_five_x',
6645
6810
  'two_x'
6646
6811
  ]).optional(),
6647
- region_id: z.string().nullish(),
6812
+ region_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6648
6813
  eligible_hours_worked: z.int().nullish(),
6649
6814
  specific_day_of_week: z.enum([
6650
6815
  'sunday',
@@ -6715,25 +6880,21 @@ export const zAssetsSiteResponseObject = z.object({
6715
6880
  created_at: z.iso.datetime(),
6716
6881
  updated_at: z.iso.datetime()
6717
6882
  });
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({
6883
+ /**
6884
+ * 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.
6885
+ */
6886
+ export const zAssetsSiteParameters = z.object({
6887
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6726
6888
  kind: z.enum(['warehouse', 'yard']),
6727
- site_id: z.string().nullish(),
6728
- name: z.string().nullish()
6729
- }));
6889
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6890
+ });
6730
6891
  /**
6731
6892
  * 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
6893
  */
6733
6894
  export const zAssetsSiteUpdateParameters = z.object({
6895
+ site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6734
6896
  kind: z.enum(['warehouse', 'yard']).optional(),
6735
- site_id: z.string().nullish(),
6736
- name: z.string().nullish()
6897
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6737
6898
  });
6738
6899
  /**
6739
6900
  * 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.
@@ -6776,7 +6937,8 @@ export const zAssetsFormAssignmentTriggerResponseObject = z.object({
6776
6937
  * Create or update a form-assignment trigger rule. form_definition_id, triggered_by, assign_to, first_due_by, tz_name, and time_of_day_due are required; the day fields depend on first_due_by, and assigned_user_ids applies only to the custom assign_to mode.
6777
6938
  */
6778
6939
  export const zAssetsFormAssignmentTriggerParameters = z.object({
6779
- form_definition_id: z.string(),
6940
+ form_definition_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6941
+ name: z.string().nullish(),
6780
6942
  triggered_by: z.enum(['assignment', 'unassignment']),
6781
6943
  assign_to: z.enum([
6782
6944
  'custom',
@@ -6788,9 +6950,6 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
6788
6950
  'day_of_week',
6789
6951
  'day_of_month'
6790
6952
  ]),
6791
- tz_name: z.string(),
6792
- time_of_day_due: z.string(),
6793
- name: z.string().nullish(),
6794
6953
  recurrence_frequency: z.enum([
6795
6954
  'DAILY',
6796
6955
  'WORKDAILY',
@@ -6800,16 +6959,19 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
6800
6959
  'MONTHLY',
6801
6960
  'QUARTERLY'
6802
6961
  ]).nullish(),
6803
- day_of_week_due: z.int().nullish(),
6804
- day_of_month_due: z.int().nullish(),
6805
- assigned_user_ids: z.array(z.string()).optional(),
6806
- assets_product_ids: z.array(z.string()).optional()
6962
+ day_of_week_due: z.int().gte(0).lte(6).nullish(),
6963
+ day_of_month_due: z.int().gte(1).lte(31).nullish(),
6964
+ tz_name: z.string(),
6965
+ time_of_day_due: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/),
6966
+ assigned_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
6967
+ assets_product_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
6807
6968
  });
6808
6969
  /**
6809
6970
  * Update a form-assignment trigger rule. All fields are optional — send only what changes. When changing first_due_by, include the matching day field when required; assigned_user_ids applies only to the custom assign_to mode.
6810
6971
  */
6811
6972
  export const zAssetsFormAssignmentTriggerUpdateParameters = z.object({
6812
- form_definition_id: z.string().optional(),
6973
+ form_definition_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
6974
+ name: z.string().nullish(),
6813
6975
  triggered_by: z.enum(['assignment', 'unassignment']).optional(),
6814
6976
  assign_to: z.enum([
6815
6977
  'custom',
@@ -6821,9 +6983,6 @@ export const zAssetsFormAssignmentTriggerUpdateParameters = z.object({
6821
6983
  'day_of_week',
6822
6984
  'day_of_month'
6823
6985
  ]).optional(),
6824
- tz_name: z.string().optional(),
6825
- time_of_day_due: z.string().optional(),
6826
- name: z.string().nullish(),
6827
6986
  recurrence_frequency: z.enum([
6828
6987
  'DAILY',
6829
6988
  'WORKDAILY',
@@ -6833,10 +6992,12 @@ export const zAssetsFormAssignmentTriggerUpdateParameters = z.object({
6833
6992
  'MONTHLY',
6834
6993
  'QUARTERLY'
6835
6994
  ]).nullish(),
6836
- day_of_week_due: z.int().nullish(),
6837
- day_of_month_due: z.int().nullish(),
6838
- assigned_user_ids: z.array(z.string()).optional(),
6839
- assets_product_ids: z.array(z.string()).optional()
6995
+ day_of_week_due: z.int().gte(0).lte(6).nullish(),
6996
+ day_of_month_due: z.int().gte(1).lte(31).nullish(),
6997
+ tz_name: z.string().optional(),
6998
+ time_of_day_due: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/).optional(),
6999
+ assigned_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
7000
+ assets_product_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
6840
7001
  });
6841
7002
  /**
6842
7003
  * A file attached to an asset — an item or product image, or a service-event attachment. Uploaded through the direct-upload flow; the response carries a URL to download it.
@@ -7040,16 +7201,16 @@ export const zAssetsDocumentResponseObject = z.object({
7040
7201
  * Attach a file to an asset item as a document. file is required and takes a signed_id from the direct-upload endpoint.
7041
7202
  */
7042
7203
  export const zAssetsDocumentParameters = z.object({
7043
- file: z.string(),
7204
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7044
7205
  filename: z.string().nullish(),
7045
7206
  description: z.string().nullish(),
7046
7207
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7047
7208
  });
7048
7209
  /**
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.
7210
+ * 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
7211
  */
7051
7212
  export const zAssetsDocumentUpdateParameters = z.object({
7052
- file: z.string().optional(),
7213
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
7053
7214
  filename: z.string().nullish(),
7054
7215
  description: z.string().nullish()
7055
7216
  });
@@ -7486,9 +7647,9 @@ export const zAssetsSubLocationResponseObject = z.object({
7486
7647
  * 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
7648
  */
7488
7649
  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(),
7650
+ assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7651
+ container_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7652
+ parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7492
7653
  kind: z.enum([
7493
7654
  'zone',
7494
7655
  'aisle',
@@ -7496,7 +7657,7 @@ export const zAssetsSubLocationParameters = z.object({
7496
7657
  'shelf',
7497
7658
  'bin',
7498
7659
  'drawer'
7499
- ]).optional(),
7660
+ ]).nullish(),
7500
7661
  name: z.string().min(1),
7501
7662
  code: z.string().min(1)
7502
7663
  });
@@ -7504,7 +7665,7 @@ export const zAssetsSubLocationParameters = z.object({
7504
7665
  * 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
7666
  */
7506
7667
  export const zAssetsSubLocationUpdateParameters = z.object({
7507
- parent_id: z.string().nullish(),
7668
+ parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7508
7669
  kind: z.enum([
7509
7670
  'zone',
7510
7671
  'aisle',
@@ -7512,7 +7673,7 @@ export const zAssetsSubLocationUpdateParameters = z.object({
7512
7673
  'shelf',
7513
7674
  'bin',
7514
7675
  'drawer'
7515
- ]).optional(),
7676
+ ]).nullish(),
7516
7677
  name: z.string().min(1).optional(),
7517
7678
  code: z.string().min(1).optional()
7518
7679
  });
@@ -7568,8 +7729,8 @@ export const zAssetsTransferParameters = z.object({
7568
7729
  * Add stock of a bulk product at a site, recording a receive transaction. Bulk products only.
7569
7730
  */
7570
7731
  export const zAssetsRestockParameters = z.object({
7571
- assets_site_id: z.string(),
7572
- assets_sub_location_id: z.string().optional(),
7732
+ assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7733
+ assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7573
7734
  quantity: z.int().gte(1),
7574
7735
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7575
7736
  });
@@ -7577,8 +7738,8 @@ export const zAssetsRestockParameters = z.object({
7577
7738
  * 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
7739
  */
7579
7740
  export const zAssetsAdjustmentParameters = z.object({
7580
- assets_site_id: z.string(),
7581
- assets_sub_location_id: z.string().optional(),
7741
+ assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7742
+ assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7582
7743
  new_quantity: z.int().gte(0),
7583
7744
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7584
7745
  });
@@ -7588,6 +7749,24 @@ export const zAssetsAdjustmentParameters = z.object({
7588
7749
  export const zAssetsArchiveParameters = z.object({
7589
7750
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7590
7751
  });
7752
+ /**
7753
+ * 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.
7754
+ */
7755
+ export const zAssetsServiceScheduleSeedParameters = z.object({
7756
+ assets_item_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).min(1).optional(),
7757
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7758
+ });
7759
+ /**
7760
+ * 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.
7761
+ */
7762
+ export const zAssetsServiceScheduleSyncParameters = z.object({
7763
+ schedule_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).min(1).optional(),
7764
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7765
+ });
7766
+ /**
7767
+ * Revoke an active grant. The body takes no fields; send an empty object or no body. Revocation sets revoked_at and keeps the row; revoking it again answers 409 authorization_revoked.
7768
+ */
7769
+ export const zCompetencyAssessorAuthorizationRevocationParametersWritable = z.record(z.string(), z.never());
7591
7770
  /**
7592
7771
  * A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
7593
7772
  */
@@ -8588,10 +8767,7 @@ export const zUpdateServiceScheduleTemplatePath = z.object({
8588
8767
  * Success
8589
8768
  */
8590
8769
  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
- });
8770
+ export const zSeedServiceScheduleTemplateBody = zAssetsServiceScheduleSeedParameters;
8595
8771
  export const zSeedServiceScheduleTemplatePath = z.object({
8596
8772
  product_id: z.string(),
8597
8773
  service_schedule_template_id: z.string()
@@ -8603,10 +8779,7 @@ export const zSeedServiceScheduleTemplateResponse = z.object({
8603
8779
  count: z.int(),
8604
8780
  data: z.array(zAssetsServiceScheduleResponseObject)
8605
8781
  });
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
- });
8782
+ export const zSyncServiceScheduleTemplateBody = zAssetsServiceScheduleSyncParameters;
8610
8783
  export const zSyncServiceScheduleTemplatePath = z.object({
8611
8784
  product_id: z.string(),
8612
8785
  service_schedule_template_id: z.string()
@@ -8848,6 +9021,7 @@ export const zGetAtlasSiteResponse = zSiteResponseObject;
8848
9021
  export const zListPwaUserCountsByProjectByMonthsQuery = z.object({
8849
9022
  'filter[year_month]': z.string().optional(),
8850
9023
  'filter[project_id]': z.string().optional(),
9024
+ 'filter[job_id]': z.string().optional(),
8851
9025
  filter: z.string().optional(),
8852
9026
  'filter[unexpected]': z.string().optional()
8853
9027
  });
@@ -9158,6 +9332,66 @@ export const zGetEvidenceItemPath = z.object({
9158
9332
  * Success
9159
9333
  */
9160
9334
  export const zGetEvidenceItemResponse = zCompetencyEvidenceItemResponseObject;
9335
+ export const zListAssessorAuthorizationsQuery = z.object({
9336
+ 'filter[user_id]': z.string().optional(),
9337
+ 'filter[companies_department_id]': z.string().optional(),
9338
+ 'filter[competencies_standard_id]': z.string().optional(),
9339
+ 'filter[kind]': z.array(z.enum(['authorized_assessor', 'qualified_assessor'])).optional(),
9340
+ 'filter[state]': z.enum([
9341
+ 'active',
9342
+ 'revoked',
9343
+ 'all'
9344
+ ]).optional(),
9345
+ 'filter[created_at][gte]': z.iso.datetime().optional(),
9346
+ 'filter[created_at][lte]': z.iso.datetime().optional(),
9347
+ 'filter[updated_at][gte]': z.iso.datetime().optional(),
9348
+ 'filter[updated_at][lte]': z.iso.datetime().optional(),
9349
+ 'filter[granted_at][gte]': z.iso.datetime().optional(),
9350
+ 'filter[granted_at][lte]': z.iso.datetime().optional(),
9351
+ 'filter[revoked_at][gte]': z.iso.datetime().optional(),
9352
+ 'filter[revoked_at][lte]': z.iso.datetime().optional(),
9353
+ filter: z.string().optional(),
9354
+ 'filter[unexpected]': z.string().optional(),
9355
+ 'page[cursor]': z.string().optional(),
9356
+ 'page[limit]': z.int().gte(1).optional().default(20),
9357
+ page: z.string().optional()
9358
+ });
9359
+ /**
9360
+ * Success
9361
+ */
9362
+ export const zListAssessorAuthorizationsResponse = z.object({
9363
+ meta: zMeta,
9364
+ links: zLinks,
9365
+ data: z.array(zCompetencyAssessorAuthorizationResponseObject)
9366
+ });
9367
+ export const zCreateAssessorAuthorizationBody = zCompetencyAssessorAuthorizationParameters;
9368
+ /**
9369
+ * Created
9370
+ */
9371
+ export const zCreateAssessorAuthorizationResponse = zCompetencyAssessorAuthorizationResponseObject;
9372
+ export const zGetAssessorAuthorizationPath = z.object({
9373
+ id: z.string()
9374
+ });
9375
+ /**
9376
+ * Success
9377
+ */
9378
+ export const zGetAssessorAuthorizationResponse = zCompetencyAssessorAuthorizationResponseObject;
9379
+ export const zUpdateAssessorAuthorizationBody = zCompetencyAssessorAuthorizationUpdateParameters;
9380
+ export const zUpdateAssessorAuthorizationPath = z.object({
9381
+ id: z.string()
9382
+ });
9383
+ /**
9384
+ * Success
9385
+ */
9386
+ export const zUpdateAssessorAuthorizationResponse = zCompetencyAssessorAuthorizationResponseObject;
9387
+ export const zRevokeAssessorAuthorizationBody = zCompetencyAssessorAuthorizationRevocationParametersWritable;
9388
+ export const zRevokeAssessorAuthorizationPath = z.object({
9389
+ assessor_authorization_id: z.string()
9390
+ });
9391
+ /**
9392
+ * Created
9393
+ */
9394
+ export const zRevokeAssessorAuthorizationResponse = zCompetencyAssessorAuthorizationResponseObject;
9161
9395
  export const zListQualificationsQuery = z.object({
9162
9396
  'filter[candidate_user_id]': z.string().optional(),
9163
9397
  'filter[competencies_standard_id]': z.string().optional(),
@@ -11179,6 +11413,62 @@ export const zCreateProjectTradePath = z.object({
11179
11413
  * Created
11180
11414
  */
11181
11415
  export const zCreateProjectTradeResponse = zPwaTradeResponseObject;
11416
+ export const zListProjectWageDeterminationRateRuleHistoryPath = z.object({
11417
+ project_id: z.string(),
11418
+ wage_determination_id: z.string(),
11419
+ rate_rule_id: z.string()
11420
+ });
11421
+ export const zListProjectWageDeterminationRateRuleHistoryQuery = z.object({
11422
+ 'as_of[valid]': z.string().optional()
11423
+ });
11424
+ /**
11425
+ * Success
11426
+ */
11427
+ export const zListProjectWageDeterminationRateRuleHistoryResponse = z.object({
11428
+ meta: zMeta,
11429
+ links: zLinks,
11430
+ data: z.array(zProjectRateRuleHistoryVersionObject)
11431
+ });
11432
+ export const zListProjectWageDeterminationRateRulesPath = z.object({
11433
+ project_id: z.string(),
11434
+ wage_determination_id: z.string()
11435
+ });
11436
+ export const zListProjectWageDeterminationRateRulesQuery = z.object({
11437
+ 'as_of[valid]': z.iso.datetime().optional(),
11438
+ as_of: z.string().optional(),
11439
+ 'as_of[bogus_axis]': z.string().optional(),
11440
+ 'as_of[valid][gte]': z.string().optional(),
11441
+ 'as_of[transaction]': z.string().optional()
11442
+ });
11443
+ /**
11444
+ * Success
11445
+ */
11446
+ export const zListProjectWageDeterminationRateRulesResponse = z.object({
11447
+ meta: zMeta,
11448
+ links: zLinks,
11449
+ data: z.array(zProjectRateRuleResponseObject)
11450
+ });
11451
+ export const zCreateProjectWageDeterminationRateRuleBody = zRateRuleParameters;
11452
+ export const zCreateProjectWageDeterminationRateRulePath = z.object({
11453
+ project_id: z.string(),
11454
+ wage_determination_id: z.string()
11455
+ });
11456
+ /**
11457
+ * Created
11458
+ */
11459
+ export const zCreateProjectWageDeterminationRateRuleResponse = zProjectRateRuleResponseObject;
11460
+ export const zGetProjectWageDeterminationRateRulePath = z.object({
11461
+ project_id: z.string(),
11462
+ wage_determination_id: z.string(),
11463
+ id: z.string()
11464
+ });
11465
+ export const zGetProjectWageDeterminationRateRuleQuery = z.object({
11466
+ 'as_of[valid]': z.iso.datetime().optional()
11467
+ });
11468
+ /**
11469
+ * Success
11470
+ */
11471
+ export const zGetProjectWageDeterminationRateRuleResponse = zProjectRateRuleResponseObject;
11182
11472
  export const zListProjectSitesPath = z.object({
11183
11473
  project_id: z.string()
11184
11474
  });
@@ -11228,6 +11518,87 @@ export const zUpdateProjectSitePath = z.object({
11228
11518
  * Success
11229
11519
  */
11230
11520
  export const zUpdateProjectSiteResponse = zProjectSiteResponseObject;
11521
+ export const zShiftProjectWageDeterminationGenesisBody = zProjectWageDeterminationGenesisParameters;
11522
+ export const zShiftProjectWageDeterminationGenesisHeaders = z.object({
11523
+ 'If-Match': z.string()
11524
+ });
11525
+ export const zShiftProjectWageDeterminationGenesisPath = z.object({
11526
+ project_id: z.string(),
11527
+ wage_determination_id: z.string()
11528
+ });
11529
+ /**
11530
+ * Success
11531
+ */
11532
+ export const zShiftProjectWageDeterminationGenesisResponse = zProjectWageDeterminationResponseObject;
11533
+ export const zListProjectWageDeterminationHistoryPath = z.object({
11534
+ project_id: z.string(),
11535
+ wage_determination_id: z.string()
11536
+ });
11537
+ export const zListProjectWageDeterminationHistoryQuery = z.object({
11538
+ 'as_of[valid]': z.string().optional()
11539
+ });
11540
+ /**
11541
+ * Success
11542
+ */
11543
+ export const zListProjectWageDeterminationHistoryResponse = z.object({
11544
+ meta: zMeta,
11545
+ links: zLinks,
11546
+ data: z.array(zProjectWageDeterminationHistoryVersionObject)
11547
+ });
11548
+ export const zCancelProjectWageDeterminationScheduledChangesHeaders = z.object({
11549
+ 'If-Match': z.string()
11550
+ });
11551
+ export const zCancelProjectWageDeterminationScheduledChangesPath = z.object({
11552
+ project_id: z.string(),
11553
+ wage_determination_id: z.string()
11554
+ });
11555
+ /**
11556
+ * Success
11557
+ */
11558
+ export const zCancelProjectWageDeterminationScheduledChangesResponse = zProjectWageDeterminationResponseObject;
11559
+ export const zListProjectWageDeterminationScheduledChangesPath = z.object({
11560
+ project_id: z.string(),
11561
+ wage_determination_id: z.string()
11562
+ });
11563
+ /**
11564
+ * Success with scheduled changes
11565
+ */
11566
+ export const zListProjectWageDeterminationScheduledChangesResponse = z.array(zProjectWageDeterminationResponseObject);
11567
+ export const zScheduleProjectWageDeterminationChangeBody = zProjectWageDeterminationScheduledChangeParameters;
11568
+ export const zScheduleProjectWageDeterminationChangeHeaders = z.object({
11569
+ 'If-Match': z.string()
11570
+ });
11571
+ export const zScheduleProjectWageDeterminationChangePath = z.object({
11572
+ project_id: z.string(),
11573
+ wage_determination_id: z.string()
11574
+ });
11575
+ /**
11576
+ * Created
11577
+ */
11578
+ export const zScheduleProjectWageDeterminationChangeResponse = zProjectWageDeterminationResponseObject;
11579
+ export const zCancelProjectWageDeterminationScheduledTerminationHeaders = z.object({
11580
+ 'If-Match': z.string()
11581
+ });
11582
+ export const zCancelProjectWageDeterminationScheduledTerminationPath = z.object({
11583
+ project_id: z.string(),
11584
+ wage_determination_id: z.string()
11585
+ });
11586
+ /**
11587
+ * Success
11588
+ */
11589
+ export const zCancelProjectWageDeterminationScheduledTerminationResponse = zProjectWageDeterminationResponseObject;
11590
+ export const zScheduleProjectWageDeterminationTerminationBody = zProjectWageDeterminationScheduledTerminationParameters;
11591
+ export const zScheduleProjectWageDeterminationTerminationHeaders = z.object({
11592
+ 'If-Match': z.string()
11593
+ });
11594
+ export const zScheduleProjectWageDeterminationTerminationPath = z.object({
11595
+ project_id: z.string(),
11596
+ wage_determination_id: z.string()
11597
+ });
11598
+ /**
11599
+ * Created
11600
+ */
11601
+ export const zScheduleProjectWageDeterminationTerminationResponse = zProjectWageDeterminationResponseObject;
11231
11602
  export const zListProjectWageDeterminationsPath = z.object({
11232
11603
  project_id: z.string()
11233
11604
  });
@@ -11303,6 +11674,9 @@ export const zListProjectsQuery = z.object({
11303
11674
  ]).optional(),
11304
11675
  'filter[external_id]': z.string().optional(),
11305
11676
  'filter[name]': z.string().optional(),
11677
+ 'filter[owned_by_company_id]': z.string().optional(),
11678
+ 'filter[job_id]': z.string().optional(),
11679
+ 'filter[site_id]': z.string().optional(),
11306
11680
  'filter[created_at][gte]': z.iso.datetime().optional(),
11307
11681
  'filter[created_at][lte]': z.iso.datetime().optional(),
11308
11682
  'filter[updated_at][gte]': z.iso.datetime().optional(),