@dsptch-work/api-client 0.34.0 → 0.36.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.
@@ -310,7 +310,7 @@ export const zProblem = z.object({
310
310
  *
311
311
  * **Foreign Subtype Attributes**
312
312
  *
313
- * A nested-attributes write carries keys the record's resolved subtype does not accept. Send only the keys valid for that subtype; the message names the offending ones.
313
+ * A write carries keys the record's resolved subtype does not accept, whether nested or beside the record's own fields (a serial item's fields sent for a bulk item). Send only the keys valid for that subtype; the message names the offending ones, and each one's entry in `errors` points at it. Nothing is written.
314
314
  *
315
315
  * ### synced_determination
316
316
  *
@@ -462,6 +462,7 @@ export const zDirectUploadParameters = z.object({
462
462
  'pay_periods.imports.time_entries',
463
463
  'payrolls.payroll_runs.imports.paystubs',
464
464
  'payrolls.payroll_runs.imports.wide_paystubs',
465
+ 'projects.documents',
465
466
  'users'
466
467
  ]),
467
468
  blob: z.object({
@@ -604,6 +605,16 @@ export const zCompetencyCriterionResponseObject = z.object({
604
605
  number: z.string().nullable(),
605
606
  body: z.string().nullable(),
606
607
  evidence_note: z.string().nullable(),
608
+ assessment_method: z.enum([
609
+ 'direct_observation',
610
+ 'simulation',
611
+ 'oral_questioning',
612
+ 'written_questioning',
613
+ 'products_of_work',
614
+ 'recognized_prior_learning',
615
+ 'witness_testimony',
616
+ 'other'
617
+ ]).nullable(),
607
618
  created_at: z.iso.datetime(),
608
619
  updated_at: z.iso.datetime()
609
620
  });
@@ -613,7 +624,17 @@ export const zCompetencyCriterionResponseObject = z.object({
613
624
  export const zCompetencyCriterionParameters = z.object({
614
625
  number: z.string().nullish(),
615
626
  body: z.string().nullish(),
616
- evidence_note: z.string().nullish()
627
+ evidence_note: z.string().nullish(),
628
+ assessment_method: z.enum([
629
+ 'direct_observation',
630
+ 'simulation',
631
+ 'oral_questioning',
632
+ 'written_questioning',
633
+ 'products_of_work',
634
+ 'recognized_prior_learning',
635
+ 'witness_testimony',
636
+ 'other'
637
+ ]).nullish()
617
638
  });
618
639
  /**
619
640
  * Swap a draft catalog row with its neighbor. The row cannot move past either end of the list.
@@ -1019,38 +1040,38 @@ export const zApprenticeshipProgramEmployerUpdateParameters = z.object({
1019
1040
  require_timecard_allocation: z.boolean().optional()
1020
1041
  });
1021
1042
  /**
1022
- * Create a period on a wage schedule; the wage schedule is taken from the URL path. wage_cents and fringe_cents are sent as integer cents.
1043
+ * Create a period on a wage schedule; the wage schedule is taken from the URL path. wage_cents and fringe_cents are sent as integer cents. Omitting period_number, wage_percent, or wage_cents answers 400. A wrong JSON type, a negative number, or a null for any field but min_minutes, max_minutes, num_competencies, description, fringe_percent, and fringe_cents answers 422 at that field; a null in one of those leaves it unset, but a period with none of min_minutes, max_minutes, or num_competencies answers 422.
1023
1044
  */
1024
1045
  export const zApprenticeshipWageSchedulePeriodParameters = z.object({
1025
- period_number: z.int(),
1026
- min_minutes: z.int().nullish(),
1027
- max_minutes: z.int().nullish(),
1028
- num_competencies: z.int().nullish(),
1046
+ period_number: z.int().gte(0),
1047
+ min_minutes: z.int().gte(0).nullish(),
1048
+ max_minutes: z.int().gte(0).nullish(),
1049
+ num_competencies: z.int().gte(0).nullish(),
1029
1050
  description: z.string().nullish(),
1030
- wage_percent: z.number(),
1031
- wage_cents: z.int(),
1032
- fringe_percent: z.number().nullish(),
1033
- fringe_cents: z.int().nullish()
1051
+ wage_percent: z.number().gte(0),
1052
+ wage_cents: z.int().gte(0),
1053
+ fringe_percent: z.number().gte(0).nullish(),
1054
+ fringe_cents: z.int().gte(0).nullish()
1034
1055
  });
1035
1056
  /**
1036
- * Update a period on a wage schedule. Send only the fields to change; the wage schedule is taken from the URL path, and wage_cents and fringe_cents are sent as integer cents.
1057
+ * Update a period on a wage schedule. Send only the fields to change; the wage schedule is taken from the URL path, and wage_cents and fringe_cents are sent as integer cents. A wrong JSON type, a negative number, or a null for any field but min_minutes, max_minutes, num_competencies, description, fringe_percent, and fringe_cents answers 422 at that field; a null in one of those clears it, but a period left with none of min_minutes, max_minutes, or num_competencies answers 422.
1037
1058
  */
1038
1059
  export const zApprenticeshipWageSchedulePeriodUpdateParameters = z.object({
1039
- period_number: z.int().optional(),
1040
- min_minutes: z.int().nullish(),
1041
- max_minutes: z.int().nullish(),
1042
- num_competencies: z.int().nullish(),
1060
+ period_number: z.int().gte(0).optional(),
1061
+ min_minutes: z.int().gte(0).nullish(),
1062
+ max_minutes: z.int().gte(0).nullish(),
1063
+ num_competencies: z.int().gte(0).nullish(),
1043
1064
  description: z.string().nullish(),
1044
- wage_percent: z.number().optional(),
1045
- wage_cents: z.int().optional(),
1046
- fringe_percent: z.number().nullish(),
1047
- fringe_cents: z.int().nullish()
1065
+ wage_percent: z.number().gte(0).optional(),
1066
+ wage_cents: z.int().gte(0).optional(),
1067
+ fringe_percent: z.number().gte(0).nullish(),
1068
+ fringe_cents: z.int().gte(0).nullish()
1048
1069
  });
1049
1070
  /**
1050
- * Create a wage schedule for an occupation; the occupation is taken from the URL path. Money is sent as integer cents; periods may be created inline via periods_attributes.
1071
+ * Create a wage schedule for an occupation; the occupation is taken from the URL path. Money is sent as integer cents; periods may be created inline via periods_attributes. Omitting name, wage_unit, journeyworker_wage_unit, or period_unit answers 400. A blank name, a unit outside its listed values, a wrong JSON type, or a null for any field but description and journeyworker_fringe_cents answers 422; a null in either of those leaves the field unset.
1051
1072
  */
1052
1073
  export const zApprenticeshipWageScheduleParameters = z.object({
1053
- name: z.string(),
1074
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1054
1075
  description: z.string().nullish(),
1055
1076
  wage_unit: z.enum([
1056
1077
  'hourly',
@@ -1081,23 +1102,23 @@ export const zApprenticeshipWageScheduleParameters = z.object({
1081
1102
  end_wage_cents: z.int().optional(),
1082
1103
  periods_attributes: z.array(z.object({
1083
1104
  id: z.string().optional(),
1084
- period_number: z.int(),
1085
- min_minutes: z.int().nullish(),
1086
- max_minutes: z.int().nullish(),
1087
- num_competencies: z.int().nullish(),
1105
+ period_number: z.int().gte(0).optional(),
1106
+ min_minutes: z.int().gte(0).nullish(),
1107
+ max_minutes: z.int().gte(0).nullish(),
1108
+ num_competencies: z.int().gte(0).nullish(),
1088
1109
  description: z.string().nullish(),
1089
- wage_percent: z.number(),
1090
- wage_cents: z.int(),
1091
- fringe_percent: z.number().nullish(),
1092
- fringe_cents: z.int().nullish(),
1110
+ wage_percent: z.number().gte(0).optional(),
1111
+ wage_cents: z.int().gte(0).optional(),
1112
+ fringe_percent: z.number().gte(0).nullish(),
1113
+ fringe_cents: z.int().gte(0).nullish(),
1093
1114
  _destroy: z.boolean().optional()
1094
1115
  })).optional()
1095
1116
  });
1096
1117
  /**
1097
- * Update a wage schedule for an occupation. Send only the fields to change; money is sent as integer cents and periods may be created, updated, or removed inline via periods_attributes.
1118
+ * Update a wage schedule for an occupation. Send only the fields to change; money is sent as integer cents and periods may be created, updated, or removed inline via periods_attributes. A blank name, a unit outside its listed values, a wrong JSON type, or a null for any field but description and journeyworker_fringe_cents answers 422; a null in either of those clears the field.
1098
1119
  */
1099
1120
  export const zApprenticeshipWageScheduleUpdateParameters = z.object({
1100
- name: z.string().optional(),
1121
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1101
1122
  description: z.string().nullish(),
1102
1123
  wage_unit: z.enum([
1103
1124
  'hourly',
@@ -1126,35 +1147,19 @@ export const zApprenticeshipWageScheduleUpdateParameters = z.object({
1126
1147
  journeyworker_wage_cents: z.int().optional(),
1127
1148
  journeyworker_fringe_cents: z.int().nullish(),
1128
1149
  end_wage_cents: z.int().optional(),
1129
- periods_attributes: z.array(z.intersection(z.union([
1130
- z.unknown(),
1131
- z.union([
1132
- z.object({
1133
- min_minutes: z.int()
1134
- }),
1135
- z.object({
1136
- max_minutes: z.int()
1137
- }),
1138
- z.object({
1139
- num_competencies: z.int()
1140
- })
1141
- ]),
1142
- z.object({
1143
- _destroy: z.literal(true)
1144
- })
1145
- ]), z.object({
1150
+ periods_attributes: z.array(z.object({
1146
1151
  id: z.string().optional(),
1147
- period_number: z.int().optional(),
1148
- min_minutes: z.int().nullish(),
1149
- max_minutes: z.int().nullish(),
1150
- num_competencies: z.int().nullish(),
1152
+ period_number: z.int().gte(0).optional(),
1153
+ min_minutes: z.int().gte(0).nullish(),
1154
+ max_minutes: z.int().gte(0).nullish(),
1155
+ num_competencies: z.int().gte(0).nullish(),
1151
1156
  description: z.string().nullish(),
1152
- wage_percent: z.number().optional(),
1153
- wage_cents: z.int().optional(),
1154
- fringe_percent: z.number().nullish(),
1155
- fringe_cents: z.int().nullish(),
1157
+ wage_percent: z.number().gte(0).optional(),
1158
+ wage_cents: z.int().gte(0).optional(),
1159
+ fringe_percent: z.number().gte(0).nullish(),
1160
+ fringe_cents: z.int().gte(0).nullish(),
1156
1161
  _destroy: z.boolean().optional()
1157
- }))).optional()
1162
+ })).optional()
1158
1163
  });
1159
1164
  /**
1160
1165
  * A work-type classification that determines how tracked time is treated — paid vs unpaid, overtime-eligible, billable, PWA/prevailing-wage-eligible, holiday, PTO, or rest-and-recovery — versioned bitemporally so each version carries its own validity window.
@@ -1306,7 +1311,7 @@ export const zPeopleEmploymentUpdateParameters = z.object({
1306
1311
  */
1307
1312
  export const zPeopleEmploymentCustomFieldsUpdateParameters = z.object({
1308
1313
  custom_fields: z.array(z.object({
1309
- custom_field_config_id: z.string(),
1314
+ custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1310
1315
  value: z.string().nullable()
1311
1316
  })).min(1)
1312
1317
  });
@@ -1444,7 +1449,8 @@ export const zTimecodeHistoryVersionObject = z.object({
1444
1449
  * Request body for creating or updating a timecode; only `name` is required. On create, omitted fields take their model/DB defaults (noted per field). On update the request applies a bitemporal correction, so omitted fields keep the current version's values rather than reverting to defaults.
1445
1450
  */
1446
1451
  export const zTimecodeParameters = z.object({
1447
- name: z.string().min(1),
1452
+ effective_date: z.string().optional(),
1453
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1448
1454
  description: z.string().nullish(),
1449
1455
  description_is_required: z.boolean().optional(),
1450
1456
  billable: z.boolean().optional(),
@@ -1463,16 +1469,15 @@ export const zTimecodeParameters = z.object({
1463
1469
  'job',
1464
1470
  'non_job',
1465
1471
  'job_with_timecode'
1466
- ]).optional(),
1467
- effective_date: z.iso.datetime().optional()
1472
+ ]).optional()
1468
1473
  });
1469
1474
  /**
1470
1475
  * Request body for correcting a timecode over a valid-time span. Send only the fields to change; omitted fields retain their current values. `effective_from` defaults to the addressed version's start, and `effective_to` is optional.
1471
1476
  */
1472
1477
  export const zTimecodeCorrectionParameters = z.object({
1473
- effective_from: z.iso.datetime().optional(),
1474
- effective_to: z.iso.datetime().optional(),
1475
- name: z.string().min(1).optional(),
1478
+ effective_from: z.string().optional(),
1479
+ effective_to: z.string().optional(),
1480
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1476
1481
  description: z.string().nullish(),
1477
1482
  description_is_required: z.boolean().optional(),
1478
1483
  billable: z.boolean().optional(),
@@ -1497,7 +1502,7 @@ export const zTimecodeCorrectionParameters = z.object({
1497
1502
  * Request body for moving the beginning of a timecode's valid-time timeline. Moving it earlier extends coverage; moving it later removes coverage before the new beginning.
1498
1503
  */
1499
1504
  export const zTimecodeGenesisParameters = z.object({
1500
- effective_date: z.iso.datetime()
1505
+ effective_date: z.string()
1501
1506
  });
1502
1507
  /**
1503
1508
  * Request body for scheduling a timecode's termination: the date from which it stops being valid. The body is required — the endpoint reads effective_date with `params.expect`, so a request omitting it is refused with `400`.
@@ -1506,11 +1511,11 @@ export const zTimecodeScheduledTerminationParameters = z.object({
1506
1511
  effective_date: z.iso.datetime()
1507
1512
  });
1508
1513
  /**
1509
- * Request body for scheduling a future change to a timecode: an effective_date paired with the attribute values to apply from that date. `effective_date` and `name` are required; omitted attributes inherit the current version's values.
1514
+ * Request body for scheduling a future change to a timecode: an effective_date paired with the attribute values to apply from that date. Only `effective_date` is required; omitted attributes inherit the current version's values.
1510
1515
  */
1511
1516
  export const zTimecodeScheduledChangeParameters = z.object({
1512
- effective_date: z.iso.datetime(),
1513
- name: z.string(),
1517
+ effective_date: z.string(),
1518
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1514
1519
  description: z.string().nullish(),
1515
1520
  description_is_required: z.boolean().optional(),
1516
1521
  billable: z.boolean().optional(),
@@ -1531,6 +1536,66 @@ export const zTimecodeScheduledChangeParameters = z.object({
1531
1536
  'job_with_timecode'
1532
1537
  ]).optional()
1533
1538
  });
1539
+ /**
1540
+ * Create a catalog product. `type` (serial or bulk) is required and immutable. `attribute_values` upserts the product's category-attribute values.
1541
+ */
1542
+ export const zAssetsProductParameters = z.object({
1543
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1544
+ description: z.string().nullish(),
1545
+ make: z.string().nullish(),
1546
+ model: z.string().nullish(),
1547
+ upc: z.string().nullish(),
1548
+ internal_sku: z.string().nullish(),
1549
+ default_minimum_quantity: z.int().nullish(),
1550
+ counted_by: z.enum([
1551
+ 'each',
1552
+ 'pair',
1553
+ 'pack'
1554
+ ]).optional(),
1555
+ assets_category_id: z.string().nullish(),
1556
+ container: z.boolean().optional(),
1557
+ attribute_values: z.array(z.object({
1558
+ assets_attribute_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1559
+ value: z.string().nullish(),
1560
+ assets_attribute_option_id: z.string().nullish()
1561
+ })).optional(),
1562
+ images_attributes: z.array(z.object({
1563
+ id: z.string().optional(),
1564
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1565
+ _destroy: z.boolean().optional()
1566
+ })).optional(),
1567
+ type: z.enum(['serial', 'bulk']),
1568
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
1569
+ });
1570
+ /**
1571
+ * Update a catalog product. All fields are optional — send only what changes. `type` is immutable and `performed_by_user_id` is create-only, so neither is accepted here. `attribute_values` upserts the product's category-attribute values.
1572
+ */
1573
+ export const zAssetsProductUpdateParameters = z.object({
1574
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1575
+ description: z.string().nullish(),
1576
+ make: z.string().nullish(),
1577
+ model: z.string().nullish(),
1578
+ upc: z.string().nullish(),
1579
+ internal_sku: z.string().nullish(),
1580
+ default_minimum_quantity: z.int().nullish(),
1581
+ counted_by: z.enum([
1582
+ 'each',
1583
+ 'pair',
1584
+ 'pack'
1585
+ ]).optional(),
1586
+ assets_category_id: z.string().nullish(),
1587
+ container: z.boolean().optional(),
1588
+ attribute_values: z.array(z.object({
1589
+ assets_attribute_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1590
+ value: z.string().nullish(),
1591
+ assets_attribute_option_id: z.string().nullish()
1592
+ })).optional(),
1593
+ images_attributes: z.array(z.object({
1594
+ id: z.string().optional(),
1595
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1596
+ _destroy: z.boolean().optional()
1597
+ })).optional()
1598
+ });
1534
1599
  /**
1535
1600
  * A named daily allowance (meals, lodging, travel, and the like) that a company can attach to time.
1536
1601
  */
@@ -1607,10 +1672,10 @@ export const zAssetsAttributeResponseObject = z.object({
1607
1672
  updated_at: z.iso.datetime()
1608
1673
  });
1609
1674
  /**
1610
- * Create or update an attribute definition. Options apply only to a select attribute and are ignored otherwise; data_type cannot be changed once any value has been filled.
1675
+ * Create an attribute definition. Omitting name or data_type answers 400, and a blank or null name or any wrong-typed value answers 422. Options apply only to a select attribute and are ignored otherwise.
1611
1676
  */
1612
1677
  export const zAssetsAttributeParameters = z.object({
1613
- name: z.string().min(1),
1678
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1614
1679
  data_type: z.enum([
1615
1680
  'text',
1616
1681
  'number',
@@ -1626,10 +1691,10 @@ export const zAssetsAttributeParameters = z.object({
1626
1691
  })).optional()
1627
1692
  });
1628
1693
  /**
1629
- * Update an attribute definition. All fields are optional — send only what changes. Options apply only to a select attribute and are ignored otherwise; data_type cannot be changed once any value has been filled.
1694
+ * Update an attribute definition. All fields are optional — send only what changes. A blank or null name or any wrong-typed value answers 422. Options apply only to a select attribute and are ignored otherwise; data_type cannot be changed once any value has been filled.
1630
1695
  */
1631
1696
  export const zAssetsAttributeUpdateParameters = z.object({
1632
- name: z.string().min(1).optional(),
1697
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1633
1698
  data_type: z.enum([
1634
1699
  'text',
1635
1700
  'number',
@@ -1664,30 +1729,30 @@ export const zAssetsCategoryResponseObject = z.object({
1664
1729
  updated_at: z.iso.datetime()
1665
1730
  });
1666
1731
  /**
1667
- * Create or update a category; only name is required. `category_attributes` sets this category's direct attribute assignments.
1732
+ * Create a category. Only name is required; omitting it answers 400, and a blank or null name or any wrong-typed value answers 422. A null or blank parent_id files the category at the root. `category_attributes` sets this category's direct attribute assignments.
1668
1733
  */
1669
1734
  export const zAssetsCategoryParameters = z.object({
1670
- name: z.string().min(1),
1735
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
1671
1736
  parent_id: z.string().nullish(),
1672
1737
  category_attributes: z.array(z.object({
1673
1738
  id: z.string().optional(),
1674
- assets_attribute_id: z.string(),
1675
- fillable_on: z.enum(['product', 'item']),
1739
+ assets_attribute_id: z.string().optional(),
1740
+ fillable_on: z.enum(['product', 'item']).optional(),
1676
1741
  required: z.boolean().optional(),
1677
1742
  position: z.int().optional(),
1678
1743
  _destroy: z.boolean().optional()
1679
1744
  })).optional()
1680
1745
  });
1681
1746
  /**
1682
- * Update a category. All fields are optional — send only what changes. `category_attributes` sets this category's direct attribute assignments.
1747
+ * Update a category. All fields are optional — send only what changes. A blank or null name or any wrong-typed value answers 422, and a null or blank parent_id moves the category to the root. `category_attributes` sets this category's direct attribute assignments.
1683
1748
  */
1684
1749
  export const zAssetsCategoryUpdateParameters = z.object({
1685
- name: z.string().min(1).optional(),
1750
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
1686
1751
  parent_id: z.string().nullish(),
1687
1752
  category_attributes: z.array(z.object({
1688
1753
  id: z.string().optional(),
1689
- assets_attribute_id: z.string(),
1690
- fillable_on: z.enum(['product', 'item']),
1754
+ assets_attribute_id: z.string().optional(),
1755
+ fillable_on: z.enum(['product', 'item']).optional(),
1691
1756
  required: z.boolean().optional(),
1692
1757
  position: z.int().optional(),
1693
1758
  _destroy: z.boolean().optional()
@@ -2362,19 +2427,19 @@ export const zGroupUpdateParameters = z.object({
2362
2427
  name: z.string().optional()
2363
2428
  });
2364
2429
  /**
2365
- * Request body for updating a worker's profile. Limited to person-level identity fields; employment, roles, and compliance are managed through onboarding (create) and the user-company endpoints.
2430
+ * Request body for updating a worker's profile. Limited to person-level identity fields; employment, roles, and compliance are managed through onboarding (create) and the user-company endpoints. Include only the fields to change. A null or blank legal name, or any wrong-typed value, answers 422.
2366
2431
  */
2367
2432
  export const zUserUpdateParameters = z.object({
2368
2433
  email: z.string().nullish(),
2369
2434
  personal_email: z.string().nullish(),
2370
2435
  phone_number: z.string().nullish(),
2371
- first_name: z.string().optional(),
2372
- last_name: z.string().optional(),
2436
+ first_name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
2437
+ last_name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
2373
2438
  preferred_first_name: z.string().nullish(),
2374
2439
  preferred_last_name: z.string().nullish(),
2375
2440
  city: z.string().nullish(),
2376
2441
  state: z.string().nullish(),
2377
- birth_date: z.string().nullish(),
2442
+ birth_date: z.iso.date().nullish(),
2378
2443
  dol_apprentice_no: z.string().nullish(),
2379
2444
  avatar_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
2380
2445
  });
@@ -2443,31 +2508,34 @@ export const zManagerTimeEntryApprovalParameters = z.object({
2443
2508
  approver_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
2444
2509
  });
2445
2510
  /**
2446
- * The time-entry body fields shared by the create and update bodies; each of those declares its own requiredness.
2511
+ * Request body for creating a time entry. timekeeping_time_card_id, start_time, and end_time are required, and omitting one answers 400.
2447
2512
  */
2448
- export const zTimeEntryParameters = z.object({
2449
- start_time: z.iso.datetime().optional(),
2450
- end_time: z.iso.datetime().optional(),
2451
- job_id: z.string().nullish(),
2452
- timekeeping_timecode_id: z.string().nullish(),
2513
+ export const zTimeEntryCreateParameters = z.object({
2514
+ timekeeping_time_card_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
2515
+ start_time: z.string(),
2516
+ end_time: z.string(),
2517
+ job_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
2518
+ timekeeping_timecode_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
2453
2519
  state: z.string().nullish(),
2454
2520
  description: z.string().nullish(),
2455
2521
  hourly_rate_cents: z.string().nullish(),
2456
- feature_ids: z.array(z.string()).nullish()
2522
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
2523
+ feature_allocation_acknowledged: z.boolean().optional()
2457
2524
  });
2458
2525
  /**
2459
- * Request body for creating a time entry — the time_entry_parameters fields plus the time card and the explicit "no feature" acknowledgement. timekeeping_time_card_id, start_time, and end_time are required.
2526
+ * Request body for updating a time entry. Every field is optional, and an omitted field keeps its value.
2460
2527
  */
2461
- export const zTimeEntryCreateParameters = zTimeEntryParameters.and(z.object({
2462
- timekeeping_time_card_id: z.string(),
2463
- feature_allocation_acknowledged: z.boolean().nullish()
2464
- }));
2465
- /**
2466
- * Request body for updating a time entry — the time_entry_parameters fields, every one optional, plus the acknowledgement that clears an apprenticeship allocation conflict.
2467
- */
2468
- export const zTimeEntryUpdateParameters = zTimeEntryParameters.and(z.object({
2469
- confirm_allocation_conflict: z.boolean().nullish()
2470
- }));
2528
+ export const zTimeEntryUpdateParameters = z.object({
2529
+ start_time: z.string().optional(),
2530
+ end_time: z.string().optional(),
2531
+ job_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
2532
+ timekeeping_timecode_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
2533
+ state: z.string().nullish(),
2534
+ description: z.string().nullish(),
2535
+ hourly_rate_cents: z.string().nullish(),
2536
+ feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
2537
+ confirm_allocation_conflict: z.boolean().optional()
2538
+ });
2471
2539
  /**
2472
2540
  * A form definition — a SurveyJS form template built and versioned in the web app's form builder. The same object the list door serializes. Read-only.
2473
2541
  */
@@ -2505,6 +2573,46 @@ export const zFormSubmissionResponseObject = z.object({
2505
2573
  created_at: z.iso.datetime(),
2506
2574
  updated_at: z.iso.datetime()
2507
2575
  });
2576
+ /**
2577
+ * Request body for updating a worker's employment at your company. Corrects administrative fields (employment type, title, manager, payroll id, hire date, and time-and-attendance enrollment) across the whole employment history, and changes the custom-field values it lists. For time-effective pay changes, use the scheduled-changes endpoints instead. A value of the wrong JSON type, a null for a field that is not nullable, or a value outside a listed set answers 422 at its pointer, and nothing is written.
2578
+ */
2579
+ export const zUserCompanyParameters = z.object({
2580
+ type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
2581
+ title: z.string().nullish(),
2582
+ manager_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
2583
+ payroll_id: z.string().nullish(),
2584
+ enrolled_in_t_and_a: z.boolean().optional(),
2585
+ hire_date: z.string().nullish(),
2586
+ custom_fields: z.array(z.object({
2587
+ custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
2588
+ value: z.string().nullable()
2589
+ })).optional()
2590
+ });
2591
+ /**
2592
+ * Request body for adding a worker to your company, creating their employment record and its custom-field values. hire_date is required and sets when employment begins; the remaining fields seed the initial title, pay, benefits, and accruals. Returns the worker with the new employment flattened onto it. Omitting hire_date answers 400. A value of the wrong JSON type, a null for a field that is not nullable, or a value outside a listed set answers 422 at its pointer, and nothing is written.
2593
+ */
2594
+ export const zUserCompanyCreateParameters = z.object({
2595
+ hire_date: z.string(),
2596
+ type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
2597
+ title: z.string().nullish(),
2598
+ manager_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
2599
+ payroll_id: z.string().nullish(),
2600
+ enrolled_in_t_and_a: z.boolean().optional(),
2601
+ compensation_type: z.enum(['hourly', 'salary']).optional(),
2602
+ hourly_rate: z.string().nullish(),
2603
+ overtime_eligible: z.boolean().optional(),
2604
+ training_annual_amount: z.string().nullish(),
2605
+ employer_combined_health_amount: z.string().nullish(),
2606
+ employer_combined_savings: z.string().nullish(),
2607
+ worked_annual_minutes: z.int().nullish(),
2608
+ pto_annual_minutes: z.int().nullish(),
2609
+ holiday_annual_minutes: z.int().nullish(),
2610
+ training_annual_minutes: z.int().nullish(),
2611
+ custom_fields: z.array(z.object({
2612
+ custom_field_config_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
2613
+ value: z.string().nullable()
2614
+ })).optional()
2615
+ });
2508
2616
  /**
2509
2617
  * 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.
2510
2618
  */
@@ -2713,7 +2821,7 @@ export const zUserGroupResponse = z.object({
2713
2821
  * Request body for adding users to a group. The group is taken from the URL path.
2714
2822
  */
2715
2823
  export const zUserGroupParameters = z.object({
2716
- user_ids: z.array(z.string())
2824
+ user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).min(1)
2717
2825
  });
2718
2826
  /**
2719
2827
  * Day of the week a job's workweek and time cards start on: 0 (Sunday) through 6 (Saturday).
@@ -2865,6 +2973,20 @@ export const zUserCompanyScheduledChangesResponse = z.object({
2865
2973
  export const zUserCompanyScheduledTerminationParameters = z.object({
2866
2974
  termination_date: z.iso.date()
2867
2975
  });
2976
+ /**
2977
+ * A pay period — a bounded pay window generated automatically by its pay schedule (PayPeriodConfig).
2978
+ */
2979
+ export const zPayPeriodResponseObject = z.object({
2980
+ id: z.string(),
2981
+ timekeeping_pay_period_config_id: z.string(),
2982
+ pay_date: z.iso.date(),
2983
+ start_time: z.iso.datetime(),
2984
+ end_time: z.iso.datetime(),
2985
+ pay_run_deadline: z.iso.datetime(),
2986
+ approvals_deadline: z.iso.datetime(),
2987
+ created_at: z.iso.datetime(),
2988
+ updated_at: z.iso.datetime()
2989
+ });
2868
2990
  /**
2869
2991
  * One problem found while processing an accepted import, whatever its type.
2870
2992
  */
@@ -3570,19 +3692,18 @@ export const zProjectResponseObject = z.object({
3570
3692
  updated_at: z.iso.datetime()
3571
3693
  });
3572
3694
  /**
3573
- * Request body for creating a project. `name` and `created_by_user_id` are required; the creator must be a member of the owning company. The owning company is inferred from the API key and is not part of the body. Undeclared body keys return 400 before any project or relationship is saved.
3695
+ * Request body for creating a project. `name` and `created_by_user_id` are required, and omitting either returns 400; the creator must be a member of the owning company. The owning company is inferred from the API key and is not part of the body. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship is saved.
3574
3696
  */
3575
3697
  export const zProjectParameters = z.object({
3576
3698
  external_id: z.string().nullish(),
3577
- name: z.string(),
3699
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3578
3700
  description: z.string().nullish(),
3579
- created_by_user_id: z.string(),
3580
- parent_id: z.string().nullish(),
3701
+ parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3581
3702
  participating_company_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
3582
3703
  start_date: z.iso.date().nullish(),
3583
3704
  end_date: z.iso.date().nullish(),
3584
3705
  tz_name: z.string().nullish(),
3585
- billing_start_day: z.int().nullish(),
3706
+ billing_start_day: z.int().gte(0).lte(6).nullish(),
3586
3707
  federal_pwa_mode: z.enum([
3587
3708
  'all',
3588
3709
  'pw_only',
@@ -3600,24 +3721,25 @@ export const zProjectParameters = z.object({
3600
3721
  administrator_name: z.string().nullish(),
3601
3722
  administrator_email: z.string().nullish(),
3602
3723
  administrator_phone: z.string().nullish(),
3603
- budget: z.string().optional(),
3724
+ budget: z.string().nullish(),
3604
3725
  prevailing_wage_lock_in_date: z.iso.date().nullish(),
3605
3726
  beginning_of_construction_date: z.iso.date().nullish(),
3606
- placed_in_service_date: z.iso.date().nullish()
3727
+ placed_in_service_date: z.iso.date().nullish(),
3728
+ created_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
3607
3729
  });
3608
3730
  /**
3609
- * Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. Undeclared body keys return 400 before any project or relationship changes.
3731
+ * Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship changes.
3610
3732
  */
3611
3733
  export const zProjectUpdateParameters = z.object({
3612
3734
  external_id: z.string().nullish(),
3613
- name: z.string().optional(),
3735
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
3614
3736
  description: z.string().nullish(),
3615
- parent_id: z.string().nullish(),
3737
+ parent_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
3616
3738
  participating_company_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
3617
3739
  start_date: z.iso.date().nullish(),
3618
3740
  end_date: z.iso.date().nullish(),
3619
3741
  tz_name: z.string().nullish(),
3620
- billing_start_day: z.int().nullish(),
3742
+ billing_start_day: z.int().gte(0).lte(6).nullish(),
3621
3743
  federal_pwa_mode: z.enum([
3622
3744
  'all',
3623
3745
  'pw_only',
@@ -3635,7 +3757,7 @@ export const zProjectUpdateParameters = z.object({
3635
3757
  administrator_name: z.string().nullish(),
3636
3758
  administrator_email: z.string().nullish(),
3637
3759
  administrator_phone: z.string().nullish(),
3638
- budget: z.string().optional(),
3760
+ budget: z.string().nullish(),
3639
3761
  prevailing_wage_lock_in_date: z.iso.date().nullish(),
3640
3762
  beginning_of_construction_date: z.iso.date().nullish(),
3641
3763
  placed_in_service_date: z.iso.date().nullish()
@@ -3661,6 +3783,56 @@ export const zProjectSiteParameters = z.object({
3661
3783
  export const zProjectSiteUpdateParameters = z.object({
3662
3784
  feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
3663
3785
  });
3786
+ /**
3787
+ * A file attached to a project. Uploaded through the direct-upload flow. `name` is always "document" and is not client-writable.
3788
+ */
3789
+ export const zProjectDocumentResponseObject = z.object({
3790
+ id: z.string(),
3791
+ project_id: z.string(),
3792
+ name: z.string(),
3793
+ filename: z.string().nullable(),
3794
+ description: z.string().nullable(),
3795
+ created_by_user_id: z.string(),
3796
+ file: z.object({
3797
+ filename: z.string(),
3798
+ content_type: z.string().nullable(),
3799
+ byte_size: z.int(),
3800
+ url: z.string()
3801
+ }).nullable(),
3802
+ created_at: z.iso.datetime(),
3803
+ updated_at: z.iso.datetime()
3804
+ });
3805
+ /**
3806
+ * Attach a file to a project as a document. file is required and takes a signed_id from the direct-upload endpoint.
3807
+ */
3808
+ export const zProjectDocumentParameters = z.object({
3809
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
3810
+ filename: z.string().nullish(),
3811
+ description: z.string().nullish(),
3812
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
3813
+ });
3814
+ /**
3815
+ * Update a project 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. `name` is read-only; sending it answers 400.
3816
+ */
3817
+ export const zProjectDocumentUpdateParameters = z.object({
3818
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
3819
+ filename: z.string().nullish(),
3820
+ description: z.string().nullish()
3821
+ });
3822
+ /**
3823
+ * One entry in a project document's PaperTrail change history, recorded whenever the document is created, updated, or deleted — including when only its attached file is replaced. This is transaction-time audit data, not a temporal valid-time version.
3824
+ */
3825
+ export const zProjectDocumentVersionResponseObject = z.object({
3826
+ id: z.int(),
3827
+ document_id: z.string(),
3828
+ event: z.enum([
3829
+ 'create',
3830
+ 'update',
3831
+ 'destroy'
3832
+ ]),
3833
+ whodunnit: z.string().nullable(),
3834
+ created_at: z.iso.datetime()
3835
+ });
3664
3836
  export const zSiteCheckInResponseObject = z.object({
3665
3837
  id: z.string(),
3666
3838
  site_id: z.string(),
@@ -3998,12 +4170,12 @@ export const zComplianceCheckDetailResponseObject = z.object({
3998
4170
  documents: z.array(zComplianceCheckDocumentObject)
3999
4171
  });
4000
4172
  /**
4001
- * Update a compliance check. Every field is optional.
4173
+ * Update a compliance check. Every field is optional. Undeclared body keys return 400, and a wrong-typed value, a null for a field that is not nullable, or a status outside the list returns 422 at its pointer before anything is written.
4002
4174
  */
4003
4175
  export const zComplianceCheckParameters = z.object({
4004
4176
  status: z.enum(['dismissed', 'pending']).optional(),
4005
- time_due: z.iso.datetime().nullish(),
4006
- assignee_user_ids: z.array(z.string()).optional(),
4177
+ time_due: z.string().nullish(),
4178
+ assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4007
4179
  file_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional()
4008
4180
  });
4009
4181
  export const zRichTextObject = z.object({
@@ -4521,7 +4693,7 @@ export const zSiteFormAssignmentParameters = z.object({
4521
4693
  'QUARTERLY'
4522
4694
  ]).nullish(),
4523
4695
  recurrence_end_time: z.iso.datetime().nullish(),
4524
- task_assignee_user_ids: z.array(z.string()).optional(),
4696
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4525
4697
  reminders_attributes: z.array(z.object({
4526
4698
  offset: z.enum([
4527
4699
  'PT0S',
@@ -4585,7 +4757,7 @@ export const zSiteFormAssignmentUpdateParameters = z.object({
4585
4757
  'QUARTERLY'
4586
4758
  ]).nullish(),
4587
4759
  recurrence_end_time: z.iso.datetime().nullish(),
4588
- task_assignee_user_ids: z.array(z.string()).optional(),
4760
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4589
4761
  reminders_attributes: z.array(z.object({
4590
4762
  offset: z.enum([
4591
4763
  'PT0S',
@@ -4677,7 +4849,7 @@ export const zFeatureFormAssignmentParameters = z.object({
4677
4849
  'QUARTERLY'
4678
4850
  ]).nullish(),
4679
4851
  recurrence_end_time: z.iso.datetime().nullish(),
4680
- task_assignee_user_ids: z.array(z.string()).optional(),
4852
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4681
4853
  reminders_attributes: z.array(z.object({
4682
4854
  offset: z.enum([
4683
4855
  'PT0S',
@@ -4741,7 +4913,7 @@ export const zFeatureFormAssignmentUpdateParameters = z.object({
4741
4913
  'QUARTERLY'
4742
4914
  ]).nullish(),
4743
4915
  recurrence_end_time: z.iso.datetime().nullish(),
4744
- task_assignee_user_ids: z.array(z.string()).optional(),
4916
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4745
4917
  reminders_attributes: z.array(z.object({
4746
4918
  offset: z.enum([
4747
4919
  'PT0S',
@@ -4806,7 +4978,7 @@ export const zJobFormAssignmentParameters = z.object({
4806
4978
  'QUARTERLY'
4807
4979
  ]).nullish(),
4808
4980
  recurrence_end_time: z.iso.datetime().nullish(),
4809
- task_assignee_user_ids: z.array(z.string()).optional(),
4981
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4810
4982
  reminders_attributes: z.array(z.object({
4811
4983
  offset: z.enum([
4812
4984
  'PT0S',
@@ -4870,7 +5042,7 @@ export const zJobFormAssignmentUpdateParameters = z.object({
4870
5042
  'QUARTERLY'
4871
5043
  ]).nullish(),
4872
5044
  recurrence_end_time: z.iso.datetime().nullish(),
4873
- task_assignee_user_ids: z.array(z.string()).optional(),
5045
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
4874
5046
  reminders_attributes: z.array(z.object({
4875
5047
  offset: z.enum([
4876
5048
  'PT0S',
@@ -4992,49 +5164,30 @@ export const zProductionJobScopePriceResponseObject = z.object({
4992
5164
  updated_at: z.iso.datetime()
4993
5165
  });
4994
5166
  /**
4995
- * Update a completion. Send only the fields to change. The scope price, filer, and feature reference are fixed at creation. Sending production_job_scope_price_id or performed_by_user_id on update returns 400 unknown_key. Feature completions accept no completable changes; quantity completions accept quantity_completed. A key for the other subtype returns 422.
5167
+ * Record a completion against a scope price. The server takes the completable subtype from the production tracking kind of the scope price's job, never from the request: a feature-tracked job records which feature was completed, and a quantity-tracked job how many units were completed. completable_attributes declares both kinds' keys; sending the other kind's key answers 422 subtype_foreign_keys with an entry pointing at it, and nothing is written.
4996
5168
  */
4997
- export const zProductionCompletionUpdateParameters = z.object({
5169
+ export const zProductionCompletionParameters = z.object({
5170
+ production_job_scope_price_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5171
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
4998
5172
  notes: z.string().nullish(),
4999
5173
  work_date: z.iso.date().optional(),
5000
5174
  position_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
5001
5175
  completable_attributes: z.object({
5002
- quantity_completed: z.int().optional()
5176
+ feature_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
5177
+ quantity_completed: z.int().gte(1).optional()
5003
5178
  }).optional()
5004
5179
  });
5005
5180
  /**
5006
- * Fields shared by both completion payload kinds.
5181
+ * Update a completion. Send only the fields to change. The scope price, filer, and feature reference are fixed at creation. Sending production_job_scope_price_id or performed_by_user_id on update returns 400 unknown_key. Feature completions accept no completable changes, so quantity_completed on one answers 422 subtype_foreign_keys with an entry pointing at it; quantity completions accept quantity_completed.
5007
5182
  */
5008
- export const zProductionCompletionBaseParameters = z.object({
5009
- production_job_scope_price_id: z.string(),
5010
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5183
+ export const zProductionCompletionUpdateParameters = z.object({
5011
5184
  notes: z.string().nullish(),
5012
5185
  work_date: z.iso.date().optional(),
5013
- position_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional()
5014
- });
5015
- /**
5016
- * Payload for completions on feature-tracked jobs (the scope price's job tracks production by feature). quantity_completed is not accepted; the feature reference is immutable after create, so update accepts no completable_attributes at all.
5017
- */
5018
- export const zProductionFeatureCompletionParameters = zProductionCompletionBaseParameters.and(z.object({
5019
- completable_attributes: z.object({
5020
- feature_id: z.string().optional()
5021
- }).optional()
5022
- }));
5023
- /**
5024
- * Payload for completions on quantity-tracked jobs (the scope price's job tracks production by quantity). feature_id is not accepted.
5025
- */
5026
- export const zProductionQuantityCompletionParameters = zProductionCompletionBaseParameters.and(z.object({
5186
+ position_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
5027
5187
  completable_attributes: z.object({
5028
- quantity_completed: z.int().optional()
5188
+ quantity_completed: z.int().gte(1).optional()
5029
5189
  }).optional()
5030
- }));
5031
- /**
5032
- * A completion's payload shape follows the production tracking kind of the scope price's job — the server derives the completable subtype from the job, never from the request. Feature-tracked jobs record which feature was completed (feature payload); quantity-tracked jobs record how many units were completed (quantity payload). The two payloads are mutually exclusive: sending the other kind's completable key returns 422.
5033
- */
5034
- export const zProductionCompletionParameters = z.union([
5035
- zProductionFeatureCompletionParameters,
5036
- zProductionQuantityCompletionParameters
5037
- ]);
5190
+ });
5038
5191
  /**
5039
5192
  * A completion recorded on a feature-tracked job — a unit of scoped work finished by a crew, identifying which feature was completed.
5040
5193
  */
@@ -5107,20 +5260,20 @@ export const zFormAssignmentTaskResponseObject = z.array(z.object({
5107
5260
  }))
5108
5261
  }));
5109
5262
  /**
5110
- * Request body for creating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only.
5263
+ * Request body for creating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only. Omitting company_id or name answers 400, and a null or blank one, or any wrong-typed value, answers 422.
5111
5264
  */
5112
5265
  export const zCertificationParameters = z.object({
5113
- company_id: z.string(),
5114
- name: z.string(),
5266
+ company_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5267
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
5115
5268
  description: z.string().nullish(),
5116
5269
  verified: z.boolean().optional(),
5117
5270
  duration: z.string().nullish()
5118
5271
  });
5119
5272
  /**
5120
- * Request body for updating a certification — a named qualification a worker can hold. Include only the fields to change. You can only manage your own company's certifications; global (platform) certifications are read-only. The certification's company is fixed at creation.
5273
+ * Request body for updating a certification — a named qualification a worker can hold. Include only the fields to change. You can only manage your own company's certifications; global (platform) certifications are read-only. The certification's company is fixed at creation. A null or blank name, or any wrong-typed value, answers 422.
5121
5274
  */
5122
5275
  export const zCertificationUpdateParameters = z.object({
5123
- name: z.string().optional(),
5276
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
5124
5277
  description: z.string().nullish(),
5125
5278
  verified: z.boolean().optional(),
5126
5279
  duration: z.string().nullish()
@@ -5201,10 +5354,10 @@ export const zUserCertificationUpdateParameters = z.object({
5201
5354
  archived_at: z.iso.datetime().nullish()
5202
5355
  });
5203
5356
  /**
5204
- * Request body for approving a certification held by a worker. A user key approves in its own user's name and sends no body.
5357
+ * Request body for approving a certification held by a worker. A user key approves in its own user's name and must omit approved_by_user_id. A company key must name the approver.
5205
5358
  */
5206
5359
  export const zUserCertificationApprovalParameters = z.object({
5207
- approved_by_user_id: z.string().optional()
5360
+ approved_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional()
5208
5361
  });
5209
5362
  /**
5210
5363
  * A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
@@ -5545,7 +5698,7 @@ export const zUserParameters = z.intersection(z.union([
5545
5698
  holiday_annual_minutes: z.string().optional(),
5546
5699
  training_annual_minutes: z.string().optional(),
5547
5700
  hire_date: z.string().optional(),
5548
- group_ids: z.array(z.uuid()).nullish(),
5701
+ group_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
5549
5702
  custom_fields: z.array(z.object({
5550
5703
  custom_field_config_id: z.string(),
5551
5704
  value: z.string().nullable()
@@ -5640,46 +5793,6 @@ export const zUserParameters = z.intersection(z.union([
5640
5793
  ])).optional()
5641
5794
  }).nullish()
5642
5795
  }));
5643
- /**
5644
- * Request body for updating a worker's employment at your company. Corrects administrative fields (employment type, title, manager, payroll id, hire date, and time-and-attendance enrollment) across the whole employment history, and changes the custom-field values it lists. For time-effective pay changes, use the scheduled-changes endpoints instead.
5645
- */
5646
- export const zUserCompanyParameters = z.object({
5647
- type: zUserCompanyType.optional(),
5648
- title: z.string().nullish(),
5649
- manager_user_id: z.string().nullish(),
5650
- payroll_id: z.string().nullish(),
5651
- hire_date: z.string().nullish(),
5652
- enrolled_in_t_and_a: z.boolean().optional(),
5653
- custom_fields: z.array(z.object({
5654
- custom_field_config_id: z.string(),
5655
- value: z.string().nullable()
5656
- })).optional()
5657
- });
5658
- /**
5659
- * Request body for adding a worker to your company, creating their employment record and its custom-field values. hire_date is required and sets when employment begins; the remaining fields seed the initial title, pay, benefits, and accruals. Returns the worker with the new employment flattened onto it.
5660
- */
5661
- export const zUserCompanyCreateParameters = z.object({
5662
- hire_date: z.string(),
5663
- type: zUserCompanyType.optional(),
5664
- title: z.string().nullish(),
5665
- manager_user_id: z.string().nullish(),
5666
- compensation_type: z.enum(['hourly', 'salary']).optional(),
5667
- enrolled_in_t_and_a: z.boolean().optional(),
5668
- payroll_id: z.string().nullish(),
5669
- hourly_rate: z.string().nullish(),
5670
- overtime_eligible: z.boolean().optional(),
5671
- training_annual_amount: z.string().nullish(),
5672
- employer_combined_health_amount: z.string().nullish(),
5673
- employer_combined_savings: z.string().nullish(),
5674
- worked_annual_minutes: z.int().nullish(),
5675
- pto_annual_minutes: z.int().nullish(),
5676
- holiday_annual_minutes: z.int().nullish(),
5677
- training_annual_minutes: z.int().nullish(),
5678
- custom_fields: z.array(z.object({
5679
- custom_field_config_id: z.string(),
5680
- value: z.string().nullable()
5681
- })).optional()
5682
- });
5683
5796
  /**
5684
5797
  * Keyset pagination cursors for the collection.
5685
5798
  */
@@ -5772,17 +5885,7 @@ export const zTimeEntryDeltasResponse = z.object({
5772
5885
  export const zPayPeriodsResponseObject = z.object({
5773
5886
  meta: zMeta,
5774
5887
  links: zLinks,
5775
- data: z.array(z.object({
5776
- id: z.string(),
5777
- timekeeping_pay_period_config_id: z.string(),
5778
- pay_date: z.iso.date(),
5779
- start_time: z.iso.datetime(),
5780
- end_time: z.iso.datetime(),
5781
- pay_run_deadline: z.iso.datetime(),
5782
- approvals_deadline: z.iso.datetime(),
5783
- created_at: z.iso.datetime(),
5784
- updated_at: z.iso.datetime()
5785
- }))
5888
+ data: z.array(zPayPeriodResponseObject)
5786
5889
  });
5787
5890
  /**
5788
5891
  * A page of job time card days, with pagination metadata and navigation links.
@@ -6105,35 +6208,6 @@ export const zFederalJobWageDeterminationHistoryCorrectionObject = z.object({
6105
6208
  created_at: z.iso.datetime(),
6106
6209
  updated_at: z.iso.datetime()
6107
6210
  });
6108
- /**
6109
- * State-specific rate fields for a Regional determination, as decimal-string money in cents
6110
- * (e.g. "538.0"). These nine properties are the whole write vocabulary, but which of them a
6111
- * request may send is set by the job's region, not the request — sending a key the job's
6112
- * region does not allow returns a 422:
6113
- *
6114
- * - Categorized-fringe regions (currently IL) accept `combined_health_fringe_rate_cents`,
6115
- * `combined_savings_fringe_rate_cents`, `combined_holiday_pto_fringe_rate_cents`,
6116
- * `training_fringe_rate_cents`, and `other_fringe_rate_cents`.
6117
- * - Overtime-adder regions (currently IL and NY) accept `one_five_x_adder_rate_cents`,
6118
- * `two_x_adder_rate_cents`, `one_five_x_fringe_adder_rate_cents`, and
6119
- * `two_x_fringe_adder_rate_cents`.
6120
- *
6121
- * In a categorized-fringe region the five fringe keys are required, not merely accepted —
6122
- * omitting any of them returns a 422. Categorized-fringe values are non-null when present;
6123
- * overtime-adder values may be null.
6124
- *
6125
- */
6126
- export const zRegionalWageDeterminationFields = z.object({
6127
- combined_health_fringe_rate_cents: z.string().optional(),
6128
- combined_savings_fringe_rate_cents: z.string().optional(),
6129
- combined_holiday_pto_fringe_rate_cents: z.string().optional(),
6130
- training_fringe_rate_cents: z.string().optional(),
6131
- other_fringe_rate_cents: z.string().optional(),
6132
- one_five_x_adder_rate_cents: z.string().nullish(),
6133
- two_x_adder_rate_cents: z.string().nullish(),
6134
- one_five_x_fringe_adder_rate_cents: z.string().nullish(),
6135
- two_x_fringe_adder_rate_cents: z.string().nullish()
6136
- });
6137
6211
  /**
6138
6212
  * State-specific rate fields recorded on a Regional determination, as decimal-string money in
6139
6213
  * cents (e.g. "538.0"). Which keys appear is set by the job's region, so this object is always
@@ -6256,12 +6330,12 @@ export const zJobWageDeterminationHistoryVersionObject = z.discriminatedUnion('t
6256
6330
  zRegionalJobWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
6257
6331
  ]);
6258
6332
  /**
6259
- * Parameters for creating a Federal (Davis-Bacon) wage determination on a job.
6333
+ * Parameters for creating a Federal (Davis-Bacon) wage determination on a job. A Federal determination holds no regional rates, so a body sending `regional_fields` returns a 422.
6260
6334
  */
6261
6335
  export const zFederalJobWageDeterminationParameters = z.object({
6262
6336
  type: z.enum(['Pwa::JobWageDeterminations::Federal']),
6263
- labor_classification: z.string(),
6264
- pwa_trade_id: z.string(),
6337
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6338
+ pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6265
6339
  hourly_rate_cents: z.string(),
6266
6340
  fringe_rate_cents: z.string(),
6267
6341
  class_code: z.string().nullish(),
@@ -6271,20 +6345,38 @@ export const zFederalJobWageDeterminationParameters = z.object({
6271
6345
  'highway',
6272
6346
  'residential'
6273
6347
  ]).nullish(),
6274
- general_wage_determination: z.string().nullish()
6348
+ general_wage_determination: z.string().nullish(),
6349
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6275
6350
  });
6276
6351
  /**
6277
6352
  * Parameters for creating a Regional (state prevailing-wage) wage determination on a job.
6278
6353
  */
6279
6354
  export const zRegionalJobWageDeterminationParameters = z.object({
6280
6355
  type: z.enum(['Pwa::JobWageDeterminations::Regional']),
6281
- labor_classification: z.string(),
6282
- pwa_trade_id: z.string(),
6356
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6357
+ pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6283
6358
  hourly_rate_cents: z.string(),
6284
6359
  fringe_rate_cents: z.string().optional(),
6360
+ class_code: z.string().nullish(),
6361
+ construction_category: z.enum([
6362
+ 'building',
6363
+ 'heavy',
6364
+ 'highway',
6365
+ 'residential'
6366
+ ]).nullish(),
6285
6367
  general_wage_determination: z.string().nullish(),
6286
- overtime_package_id: z.string().nullish(),
6287
- regional_fields: zRegionalWageDeterminationFields.optional()
6368
+ regional_fields: z.object({
6369
+ combined_health_fringe_rate_cents: z.string().nullish(),
6370
+ combined_savings_fringe_rate_cents: z.string().nullish(),
6371
+ combined_holiday_pto_fringe_rate_cents: z.string().nullish(),
6372
+ training_fringe_rate_cents: z.string().nullish(),
6373
+ other_fringe_rate_cents: z.string().nullish(),
6374
+ one_five_x_adder_rate_cents: z.string().nullish(),
6375
+ two_x_adder_rate_cents: z.string().nullish(),
6376
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
6377
+ two_x_fringe_adder_rate_cents: z.string().nullish()
6378
+ }).optional(),
6379
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6288
6380
  });
6289
6381
  /**
6290
6382
  * Parameters for creating a job wage determination. Provide the Federal or Regional shape; the type discriminator selects which. Editing an existing determination uses the update parameters, which take an `effective_from` instead of a type.
@@ -6298,9 +6390,9 @@ export const zJobWageDeterminationParameters = z.discriminatedUnion('type', [
6298
6390
  */
6299
6391
  export const zJobWageDeterminationUpdateParameters = z.object({
6300
6392
  effective_from: z.iso.date().optional(),
6301
- overtime_package_id: z.string().nullish(),
6302
- labor_classification: z.string().optional(),
6303
- pwa_trade_id: z.string().optional(),
6393
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6394
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
6395
+ pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
6304
6396
  hourly_rate_cents: z.string().optional(),
6305
6397
  fringe_rate_cents: z.string().optional(),
6306
6398
  class_code: z.string().nullish(),
@@ -6311,14 +6403,24 @@ export const zJobWageDeterminationUpdateParameters = z.object({
6311
6403
  'residential'
6312
6404
  ]).nullish(),
6313
6405
  general_wage_determination: z.string().nullish(),
6314
- regional_fields: zRegionalWageDeterminationFields.optional()
6406
+ regional_fields: z.object({
6407
+ combined_health_fringe_rate_cents: z.string().nullish(),
6408
+ combined_savings_fringe_rate_cents: z.string().nullish(),
6409
+ combined_holiday_pto_fringe_rate_cents: z.string().nullish(),
6410
+ training_fringe_rate_cents: z.string().nullish(),
6411
+ other_fringe_rate_cents: z.string().nullish(),
6412
+ one_five_x_adder_rate_cents: z.string().nullish(),
6413
+ two_x_adder_rate_cents: z.string().nullish(),
6414
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
6415
+ two_x_fringe_adder_rate_cents: z.string().nullish()
6416
+ }).optional()
6315
6417
  });
6316
6418
  /**
6317
6419
  * Parameters for an effective-dated change to a job wage determination, applying from a calendar date forward. The type is fixed by the determination the id names and is not sent.
6318
6420
  */
6319
6421
  export const zJobWageDeterminationScheduledChangeParameters = z.object({
6320
6422
  effective_date: z.iso.date(),
6321
- labor_classification: z.string().optional(),
6423
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
6322
6424
  hourly_rate_cents: z.string().optional(),
6323
6425
  fringe_rate_cents: z.string().optional(),
6324
6426
  class_code: z.string().nullish(),
@@ -6329,7 +6431,17 @@ export const zJobWageDeterminationScheduledChangeParameters = z.object({
6329
6431
  'residential'
6330
6432
  ]).nullish(),
6331
6433
  general_wage_determination: z.string().nullish(),
6332
- regional_fields: zRegionalWageDeterminationFields.optional()
6434
+ regional_fields: z.object({
6435
+ combined_health_fringe_rate_cents: z.string().nullish(),
6436
+ combined_savings_fringe_rate_cents: z.string().nullish(),
6437
+ combined_holiday_pto_fringe_rate_cents: z.string().nullish(),
6438
+ training_fringe_rate_cents: z.string().nullish(),
6439
+ other_fringe_rate_cents: z.string().nullish(),
6440
+ one_five_x_adder_rate_cents: z.string().nullish(),
6441
+ two_x_adder_rate_cents: z.string().nullish(),
6442
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
6443
+ two_x_fringe_adder_rate_cents: z.string().nullish()
6444
+ }).optional()
6333
6445
  });
6334
6446
  /**
6335
6447
  * Parameters for moving where a job wage determination's timeline begins.
@@ -6497,12 +6609,12 @@ export const zProjectWageDeterminationHistoryVersionObject = z.discriminatedUnio
6497
6609
  zRegionalProjectWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::ProjectWageDeterminations::Regional') })
6498
6610
  ]);
6499
6611
  /**
6500
- * Parameters for creating a Federal (Davis-Bacon) wage determination on a project.
6612
+ * Parameters for creating a Federal (Davis-Bacon) wage determination on a project. A Federal determination holds no regional rates, so a body sending `regional_fields` returns a 422.
6501
6613
  */
6502
6614
  export const zFederalProjectWageDeterminationParameters = z.object({
6503
6615
  type: z.enum(['Pwa::ProjectWageDeterminations::Federal']),
6504
- labor_classification: z.string(),
6505
- pwa_trade_id: z.string(),
6616
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6617
+ pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6506
6618
  hourly_rate_cents: z.string(),
6507
6619
  fringe_rate_cents: z.string(),
6508
6620
  class_code: z.string().nullish(),
@@ -6512,20 +6624,38 @@ export const zFederalProjectWageDeterminationParameters = z.object({
6512
6624
  'highway',
6513
6625
  'residential'
6514
6626
  ]).nullish(),
6515
- general_wage_determination: z.string().nullish()
6627
+ general_wage_determination: z.string().nullish(),
6628
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6516
6629
  });
6517
6630
  /**
6518
6631
  * Parameters for creating a Regional (state prevailing-wage) wage determination on a project.
6519
6632
  */
6520
6633
  export const zRegionalProjectWageDeterminationParameters = z.object({
6521
6634
  type: z.enum(['Pwa::ProjectWageDeterminations::Regional']),
6522
- labor_classification: z.string(),
6523
- pwa_trade_id: z.string(),
6635
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6636
+ pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
6524
6637
  hourly_rate_cents: z.string(),
6525
6638
  fringe_rate_cents: z.string().optional(),
6639
+ class_code: z.string().nullish(),
6640
+ construction_category: z.enum([
6641
+ 'building',
6642
+ 'heavy',
6643
+ 'highway',
6644
+ 'residential'
6645
+ ]).nullish(),
6526
6646
  general_wage_determination: z.string().nullish(),
6527
- overtime_package_id: z.string().nullish(),
6528
- regional_fields: zRegionalWageDeterminationFields.optional()
6647
+ regional_fields: z.object({
6648
+ combined_health_fringe_rate_cents: z.string().nullish(),
6649
+ combined_savings_fringe_rate_cents: z.string().nullish(),
6650
+ combined_holiday_pto_fringe_rate_cents: z.string().nullish(),
6651
+ training_fringe_rate_cents: z.string().nullish(),
6652
+ other_fringe_rate_cents: z.string().nullish(),
6653
+ one_five_x_adder_rate_cents: z.string().nullish(),
6654
+ two_x_adder_rate_cents: z.string().nullish(),
6655
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
6656
+ two_x_fringe_adder_rate_cents: z.string().nullish()
6657
+ }).optional(),
6658
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
6529
6659
  });
6530
6660
  /**
6531
6661
  * Parameters for creating a project wage determination. Provide the Federal or Regional shape; the type discriminator selects which. Editing an existing determination uses the update parameters, which take an `effective_from` instead of a type.
@@ -6539,9 +6669,9 @@ export const zProjectWageDeterminationParameters = z.discriminatedUnion('type',
6539
6669
  */
6540
6670
  export const zProjectWageDeterminationUpdateParameters = z.object({
6541
6671
  effective_from: z.iso.date().optional(),
6542
- overtime_package_id: z.string().nullish(),
6543
- labor_classification: z.string().optional(),
6544
- pwa_trade_id: z.string().optional(),
6672
+ overtime_package_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
6673
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
6674
+ pwa_trade_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
6545
6675
  hourly_rate_cents: z.string().optional(),
6546
6676
  fringe_rate_cents: z.string().optional(),
6547
6677
  class_code: z.string().nullish(),
@@ -6552,14 +6682,24 @@ export const zProjectWageDeterminationUpdateParameters = z.object({
6552
6682
  'residential'
6553
6683
  ]).nullish(),
6554
6684
  general_wage_determination: z.string().nullish(),
6555
- regional_fields: zRegionalWageDeterminationFields.optional()
6685
+ regional_fields: z.object({
6686
+ combined_health_fringe_rate_cents: z.string().nullish(),
6687
+ combined_savings_fringe_rate_cents: z.string().nullish(),
6688
+ combined_holiday_pto_fringe_rate_cents: z.string().nullish(),
6689
+ training_fringe_rate_cents: z.string().nullish(),
6690
+ other_fringe_rate_cents: z.string().nullish(),
6691
+ one_five_x_adder_rate_cents: z.string().nullish(),
6692
+ two_x_adder_rate_cents: z.string().nullish(),
6693
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
6694
+ two_x_fringe_adder_rate_cents: z.string().nullish()
6695
+ }).optional()
6556
6696
  });
6557
6697
  /**
6558
6698
  * 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.
6559
6699
  */
6560
6700
  export const zProjectWageDeterminationScheduledChangeParameters = z.object({
6561
6701
  effective_date: z.iso.date(),
6562
- labor_classification: z.string().optional(),
6702
+ labor_classification: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
6563
6703
  hourly_rate_cents: z.string().optional(),
6564
6704
  fringe_rate_cents: z.string().optional(),
6565
6705
  class_code: z.string().nullish(),
@@ -6570,7 +6710,17 @@ export const zProjectWageDeterminationScheduledChangeParameters = z.object({
6570
6710
  'residential'
6571
6711
  ]).nullish(),
6572
6712
  general_wage_determination: z.string().nullish(),
6573
- regional_fields: zRegionalWageDeterminationFields.optional()
6713
+ regional_fields: z.object({
6714
+ combined_health_fringe_rate_cents: z.string().nullish(),
6715
+ combined_savings_fringe_rate_cents: z.string().nullish(),
6716
+ combined_holiday_pto_fringe_rate_cents: z.string().nullish(),
6717
+ training_fringe_rate_cents: z.string().nullish(),
6718
+ other_fringe_rate_cents: z.string().nullish(),
6719
+ one_five_x_adder_rate_cents: z.string().nullish(),
6720
+ two_x_adder_rate_cents: z.string().nullish(),
6721
+ one_five_x_fringe_adder_rate_cents: z.string().nullish(),
6722
+ two_x_fringe_adder_rate_cents: z.string().nullish()
6723
+ }).optional()
6574
6724
  });
6575
6725
  /**
6576
6726
  * Parameters for moving where a project wage determination's timeline begins.
@@ -6596,15 +6746,15 @@ export const zRateRuleEffect = z.object({
6596
6746
  */
6597
6747
  export const zRateRuleTimeRangeCondition = z.object({
6598
6748
  type: z.enum(['time_range']),
6599
- start_time: z.string(),
6600
- end_time: z.string()
6749
+ start_time: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/),
6750
+ end_time: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/)
6601
6751
  });
6602
6752
  /**
6603
6753
  * Restricts the rule to specific days of the week.
6604
6754
  */
6605
6755
  export const zRateRuleDaysCondition = z.object({
6606
6756
  type: z.enum(['days']),
6607
- days: z.array(z.int())
6757
+ days: z.array(z.int().gte(0).lte(6)).min(1)
6608
6758
  });
6609
6759
  /**
6610
6760
  * Restricts the rule to a single calendar date.
@@ -6618,15 +6768,15 @@ export const zRateRuleSpecificDateCondition = z.object({
6618
6768
  */
6619
6769
  export const zRateRuleApprenticePeriodCondition = z.object({
6620
6770
  type: z.enum(['apprentice_period']),
6621
- period: z.int()
6771
+ period: z.int().gte(1).lte(100)
6622
6772
  });
6623
6773
  /**
6624
6774
  * Restricts the rule to a cumulative-apprentice-hours band.
6625
6775
  */
6626
6776
  export const zRateRuleApprenticeHoursCondition = z.object({
6627
6777
  type: z.enum(['apprentice_hours']),
6628
- min_hours: z.int(),
6629
- max_hours: z.int()
6778
+ min_hours: z.int().gte(0).lte(100000),
6779
+ max_hours: z.int().gte(0).lte(100000)
6630
6780
  });
6631
6781
  /**
6632
6782
  * Restricts the rule to a specific overtime tier.
@@ -6748,17 +6898,37 @@ export const zPayRatesRuleResponseObject = z.object({
6748
6898
  * Parameters for creating a conditional wage or fringe adjustment in a pay-rate rule package.
6749
6899
  */
6750
6900
  export const zPayRatesRuleParameters = z.object({
6751
- effect: zRateRuleEffect,
6752
- conditions: z.array(zRateRuleCondition).optional(),
6753
- effective_date: z.iso.date().optional()
6901
+ effective_date: z.iso.date().optional(),
6902
+ effect: z.object({
6903
+ type: z.enum(['wage_increment', 'fringe_increment']),
6904
+ amount_cents: z.string()
6905
+ }),
6906
+ conditions: z.array(z.union([
6907
+ zRateRuleTimeRangeCondition,
6908
+ zRateRuleDaysCondition,
6909
+ zRateRuleSpecificDateCondition,
6910
+ zRateRuleApprenticePeriodCondition,
6911
+ zRateRuleApprenticeHoursCondition,
6912
+ zRateRuleOvertimeMultiplierCondition
6913
+ ])).optional()
6754
6914
  });
6755
6915
  /**
6756
6916
  * Change a rule from an effective date forward. Omitted effect or conditions keep that part of the targeted version. When the targeted recipe changes, the resulting complete recipe applies from that coordinate across later scheduled versions; an unchanged recipe does not alter later scheduled versions. An empty conditions list makes the rule unconditional. Omit effective_from to correct the selected version from its exact existing start. A rule with an unbounded lower limit requires effective_from.
6757
6917
  */
6758
6918
  export const zPayRatesRuleUpdateParameters = z.object({
6759
- effect: zRateRuleEffect.optional(),
6760
- conditions: z.array(zRateRuleCondition).optional(),
6761
- effective_from: z.iso.date().optional()
6919
+ effective_from: z.iso.date().optional(),
6920
+ effect: z.object({
6921
+ type: z.enum(['wage_increment', 'fringe_increment']),
6922
+ amount_cents: z.string()
6923
+ }).optional(),
6924
+ conditions: z.array(z.union([
6925
+ zRateRuleTimeRangeCondition,
6926
+ zRateRuleDaysCondition,
6927
+ zRateRuleSpecificDateCondition,
6928
+ zRateRuleApprenticePeriodCondition,
6929
+ zRateRuleApprenticeHoursCondition,
6930
+ zRateRuleOvertimeMultiplierCondition
6931
+ ])).optional()
6762
6932
  });
6763
6933
  /**
6764
6934
  * Parameters for moving where a pay-rate rule family's valid-time timeline begins.
@@ -6777,8 +6947,18 @@ export const zPayRatesRuleScheduledTerminationParameters = z.object({
6777
6947
  */
6778
6948
  export const zPayRatesRuleScheduledChangeParameters = z.object({
6779
6949
  effective_date: z.iso.date(),
6780
- effect: zRateRuleEffect.optional(),
6781
- conditions: z.array(zRateRuleCondition).optional()
6950
+ effect: z.object({
6951
+ type: z.enum(['wage_increment', 'fringe_increment']),
6952
+ amount_cents: z.string()
6953
+ }).optional(),
6954
+ conditions: z.array(z.union([
6955
+ zRateRuleTimeRangeCondition,
6956
+ zRateRuleDaysCondition,
6957
+ zRateRuleSpecificDateCondition,
6958
+ zRateRuleApprenticePeriodCondition,
6959
+ zRateRuleApprenticeHoursCondition,
6960
+ zRateRuleOvertimeMultiplierCondition
6961
+ ])).optional()
6782
6962
  });
6783
6963
  export const zPayRatesRuleHistoryCorrectionObject = z.object({
6784
6964
  pay_rates_rule_id: z.string(),
@@ -6984,8 +7164,72 @@ export const zOvertimeRuleScheduledTerminationParameters = z.object({
6984
7164
  */
6985
7165
  export const zRateRuleParameters = z.object({
6986
7166
  effective_date: z.iso.date().nullish(),
6987
- effect: zRateRuleEffect,
6988
- conditions: z.array(zRateRuleCondition).optional()
7167
+ effect: z.object({
7168
+ type: z.enum(['wage_increment', 'fringe_increment']),
7169
+ amount_cents: z.string()
7170
+ }),
7171
+ conditions: z.array(z.union([
7172
+ zRateRuleTimeRangeCondition,
7173
+ zRateRuleDaysCondition,
7174
+ zRateRuleSpecificDateCondition,
7175
+ zRateRuleApprenticePeriodCondition,
7176
+ zRateRuleApprenticeHoursCondition,
7177
+ zRateRuleOvertimeMultiplierCondition
7178
+ ])).optional()
7179
+ });
7180
+ /**
7181
+ * Create an asset item. The write API creates serial items only; assets_product_id and serial_number identify the product and serial number. `attribute_values` fills the item-level attributes of the product's category. On create you may also place the item — assets_site_id to stock it at a site, or user_id to assign it to a user (the two are mutually exclusive). performed_by_user_id is required.
7182
+ */
7183
+ export const zAssetsItemParameters = z.object({
7184
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7185
+ description: z.string().nullish(),
7186
+ assets_product_id: z.string(),
7187
+ serial_number: z.string().nullish(),
7188
+ status: z.enum(['available', 'assigned']).optional(),
7189
+ purchase_date: z.string().nullish(),
7190
+ purchase_price_cents: z.int().nullish(),
7191
+ external_id: z.string().nullish(),
7192
+ external_system_url: z.string().nullish(),
7193
+ attribute_values: z.array(z.object({
7194
+ assets_attribute_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7195
+ value: z.string().nullish(),
7196
+ assets_attribute_option_id: z.string().nullish()
7197
+ })).optional(),
7198
+ images_attributes: z.array(z.object({
7199
+ id: z.string().optional(),
7200
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
7201
+ _destroy: z.boolean().optional()
7202
+ })).optional(),
7203
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7204
+ assets_site_id: z.string().nullish(),
7205
+ user_id: z.string().nullish(),
7206
+ container_item_id: z.string().nullish(),
7207
+ assets_sub_location_id: z.string().nullish()
7208
+ });
7209
+ /**
7210
+ * Update an asset item. All item fields are optional — send only what changes — but performed_by_user_id is required to record the updater. Omitted attributes retain their existing values. `attribute_values` upserts the item-level attributes of the product's category. The serial-only fields (serial_number, status, purchase_date, purchase_price_cents, external_id, external_system_url) apply to a serial item; sending one for a bulk item answers 422 subtype_foreign_keys with an entry pointing at each such field, and nothing is written.
7211
+ */
7212
+ export const zAssetsItemUpdateParameters = z.object({
7213
+ name: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
7214
+ description: z.string().nullish(),
7215
+ assets_product_id: z.string().optional(),
7216
+ serial_number: z.string().nullish(),
7217
+ status: z.enum(['available', 'assigned']).optional(),
7218
+ purchase_date: z.string().nullish(),
7219
+ purchase_price_cents: z.int().nullish(),
7220
+ external_id: z.string().nullish(),
7221
+ external_system_url: z.string().nullish(),
7222
+ attribute_values: z.array(z.object({
7223
+ assets_attribute_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7224
+ value: z.string().nullish(),
7225
+ assets_attribute_option_id: z.string().nullish()
7226
+ })).optional(),
7227
+ images_attributes: z.array(z.object({
7228
+ id: z.string().optional(),
7229
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
7230
+ _destroy: z.boolean().optional()
7231
+ })).optional(),
7232
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
6989
7233
  });
6990
7234
  /**
6991
7235
  * A vendor in the company's asset catalog — a supplier or manufacturer that products are sourced from.
@@ -7216,112 +7460,6 @@ export const zAssetsItemResponseObject = z.object({
7216
7460
  created_at: z.iso.datetime(),
7217
7461
  updated_at: z.iso.datetime()
7218
7462
  });
7219
- /**
7220
- * One attachment in a nested collection. Send file with a signed_id to add one; send id (with _destroy) to remove an existing one.
7221
- */
7222
- export const zAssetsAttachmentParameters = z.object({
7223
- id: z.string().optional(),
7224
- file: z.string().optional(),
7225
- _destroy: z.boolean().optional()
7226
- });
7227
- /**
7228
- * Create a catalog product. `type` (serial or bulk) is required and immutable. `attribute_values` upserts the product's category-attribute values.
7229
- */
7230
- export const zAssetsProductParameters = z.object({
7231
- type: z.enum(['serial', 'bulk']),
7232
- name: z.string().min(1),
7233
- description: z.string().nullish(),
7234
- assets_category_id: z.string().nullish(),
7235
- upc: z.string().nullish(),
7236
- internal_sku: z.string().nullish(),
7237
- default_minimum_quantity: z.int().nullish(),
7238
- make: z.string().nullish(),
7239
- model: z.string().nullish(),
7240
- counted_by: z.enum([
7241
- 'each',
7242
- 'pair',
7243
- 'pack'
7244
- ]).optional(),
7245
- container: z.boolean().optional(),
7246
- attribute_values: z.array(z.object({
7247
- assets_attribute_id: z.string(),
7248
- value: z.string().nullish(),
7249
- assets_attribute_option_id: z.string().nullish()
7250
- })).optional(),
7251
- images_attributes: z.array(zAssetsAttachmentParameters).optional(),
7252
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7253
- });
7254
- /**
7255
- * Update a catalog product. All fields are optional — send only what changes. `type` is immutable and `performed_by_user_id` is create-only, so neither is accepted here. `attribute_values` upserts the product's category-attribute values.
7256
- */
7257
- export const zAssetsProductUpdateParameters = z.object({
7258
- name: z.string().min(1).optional(),
7259
- description: z.string().nullish(),
7260
- assets_category_id: z.string().nullish(),
7261
- upc: z.string().nullish(),
7262
- internal_sku: z.string().nullish(),
7263
- default_minimum_quantity: z.int().nullish(),
7264
- make: z.string().nullish(),
7265
- model: z.string().nullish(),
7266
- counted_by: z.enum([
7267
- 'each',
7268
- 'pair',
7269
- 'pack'
7270
- ]).optional(),
7271
- container: z.boolean().optional(),
7272
- attribute_values: z.array(z.object({
7273
- assets_attribute_id: z.string(),
7274
- value: z.string().nullish(),
7275
- assets_attribute_option_id: z.string().nullish()
7276
- })).optional(),
7277
- images_attributes: z.array(zAssetsAttachmentParameters).optional()
7278
- });
7279
- /**
7280
- * Create an asset item. The write API creates serial items only; assets_product_id and serial_number identify the product and serial number. `attribute_values` fills the item-level attributes of the product's category. On create you may also place the item — assets_site_id to stock it at a site, or user_id to assign it to a user (the two are mutually exclusive). performed_by_user_id is required.
7281
- */
7282
- export const zAssetsItemParameters = z.object({
7283
- name: z.string().min(1),
7284
- description: z.string().optional(),
7285
- assets_product_id: z.string(),
7286
- serial_number: z.string(),
7287
- status: z.enum(['available', 'assigned']).optional(),
7288
- purchase_date: z.iso.datetime().optional(),
7289
- purchase_price_cents: z.int().optional(),
7290
- external_id: z.string().optional(),
7291
- external_system_url: z.string().optional(),
7292
- attribute_values: z.array(z.object({
7293
- assets_attribute_id: z.string(),
7294
- value: z.string().nullish(),
7295
- assets_attribute_option_id: z.string().nullish()
7296
- })).optional(),
7297
- images_attributes: z.array(zAssetsAttachmentParameters).optional(),
7298
- assets_site_id: z.string().optional(),
7299
- user_id: z.string().optional(),
7300
- container_item_id: z.string().optional(),
7301
- assets_sub_location_id: z.string().optional(),
7302
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7303
- });
7304
- /**
7305
- * Update an asset item. All item fields are optional — send only what changes — but performed_by_user_id is required to record the updater. Omitted attributes retain their existing values. `attribute_values` upserts the item-level attributes of the product's category.
7306
- */
7307
- export const zAssetsItemUpdateParameters = z.object({
7308
- name: z.string().min(1).optional(),
7309
- description: z.string().optional(),
7310
- assets_product_id: z.string().optional(),
7311
- serial_number: z.string().optional(),
7312
- status: z.enum(['available', 'assigned']).optional(),
7313
- purchase_date: z.iso.datetime().optional(),
7314
- purchase_price_cents: z.int().optional(),
7315
- external_id: z.string().optional(),
7316
- external_system_url: z.string().optional(),
7317
- attribute_values: z.array(z.object({
7318
- assets_attribute_id: z.string(),
7319
- value: z.string().nullish(),
7320
- assets_attribute_option_id: z.string().nullish()
7321
- })).optional(),
7322
- images_attributes: z.array(zAssetsAttachmentParameters).optional(),
7323
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7324
- });
7325
7463
  /**
7326
7464
  * A file attached to an asset item — a document such as a manual, warranty, or certificate. Uploaded through the direct-upload flow and optionally marked as a certified copy.
7327
7465
  */
@@ -7422,7 +7560,7 @@ export const zAssetsItemFormAssignmentParameters = z.object({
7422
7560
  'QUARTERLY'
7423
7561
  ]).nullish(),
7424
7562
  recurrence_end_time: z.iso.datetime().nullish(),
7425
- task_assignee_user_ids: z.array(z.string()).optional(),
7563
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
7426
7564
  reminders_attributes: z.array(z.object({
7427
7565
  offset: z.enum([
7428
7566
  'PT0S',
@@ -7486,7 +7624,7 @@ export const zAssetsItemFormAssignmentUpdateParameters = z.object({
7486
7624
  'QUARTERLY'
7487
7625
  ]).nullish(),
7488
7626
  recurrence_end_time: z.iso.datetime().nullish(),
7489
- task_assignee_user_ids: z.array(z.string()).optional(),
7627
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
7490
7628
  reminders_attributes: z.array(z.object({
7491
7629
  offset: z.enum([
7492
7630
  'PT0S',
@@ -7698,8 +7836,12 @@ export const zAssetsServiceEventParameters = z.object({
7698
7836
  notes: z.string().nullish(),
7699
7837
  performed_on: z.iso.date(),
7700
7838
  assets_service_schedule_id: z.string().nullish(),
7701
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7702
- attachments_attributes: z.array(zAssetsAttachmentParameters).optional()
7839
+ attachments_attributes: z.array(z.object({
7840
+ id: z.string().optional(),
7841
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
7842
+ _destroy: z.boolean().optional()
7843
+ })).optional(),
7844
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7703
7845
  });
7704
7846
  /**
7705
7847
  * Update a service event. Event fields are optional — send only what changes — but performed_by_user_id is required to record the updater. A linked schedule dictates kind, and changing or removing the link recomputes affected due dates.
@@ -7713,8 +7855,12 @@ export const zAssetsServiceEventUpdateParameters = z.object({
7713
7855
  notes: z.string().nullish(),
7714
7856
  performed_on: z.iso.date().optional(),
7715
7857
  assets_service_schedule_id: z.string().nullish(),
7716
- performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7717
- attachments_attributes: z.array(zAssetsAttachmentParameters).optional()
7858
+ attachments_attributes: z.array(z.object({
7859
+ id: z.string().optional(),
7860
+ file: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
7861
+ _destroy: z.boolean().optional()
7862
+ })).optional(),
7863
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
7718
7864
  });
7719
7865
  /**
7720
7866
  * A product-level service cadence that seeds and syncs the matching schedules on that product's items. Changing its defining fields (name, kind, interval) reconciles linked item schedules in the background.
@@ -7853,22 +7999,22 @@ export const zAssetsTransferResponseObject = z.object({
7853
7999
  updated_at: z.iso.datetime()
7854
8000
  });
7855
8001
  /**
7856
- * Move item stock. Each endpoint is a site, a user, or a container — give at most one per side. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). With a single open end it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. Moves are applied immediately, so the source must hold enough of each item.
8002
+ * Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). With a single open end it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. Moves are applied immediately, so the source must hold enough of each item.
7857
8003
  */
7858
8004
  export const zAssetsTransferParameters = z.object({
7859
- from_assets_site_id: z.string().optional(),
7860
- from_user_id: z.string().optional(),
7861
- from_container_item_id: z.string().optional(),
7862
- to_assets_site_id: z.string().optional(),
7863
- to_user_id: z.string().optional(),
7864
- to_container_item_id: z.string().optional(),
7865
- from_assets_sub_location_id: z.string().optional(),
7866
- to_assets_sub_location_id: z.string().optional(),
8005
+ from_assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8006
+ from_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8007
+ from_container_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8008
+ from_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8009
+ to_assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8010
+ to_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8011
+ to_container_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8012
+ to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
7867
8013
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7868
8014
  line_items: z.array(z.object({
7869
- assets_item_id: z.string(),
8015
+ assets_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
7870
8016
  quantity: z.int().gte(1)
7871
- }))
8017
+ })).min(1)
7872
8018
  });
7873
8019
  /**
7874
8020
  * Add stock of a bulk product at a site, recording a receive transaction. Bulk products only.
@@ -11231,6 +11377,7 @@ export const zGetTimeEntryImportPath = z.object({
11231
11377
  */
11232
11378
  export const zGetTimeEntryImportResponse = zTimeEntryImportResponseObject;
11233
11379
  export const zListPayPeriodsQuery = z.object({
11380
+ 'filter[timekeeping_pay_period_config_id]': z.string().optional(),
11234
11381
  'filter[start_time][gte]': z.iso.datetime().optional(),
11235
11382
  'filter[start_time][lte]': z.iso.datetime().optional(),
11236
11383
  filter: z.string().optional(),
@@ -11243,6 +11390,13 @@ export const zListPayPeriodsQuery = z.object({
11243
11390
  * Success
11244
11391
  */
11245
11392
  export const zListPayPeriodsResponse = zPayPeriodsResponseObject;
11393
+ export const zGetPayPeriodPath = z.object({
11394
+ id: z.string()
11395
+ });
11396
+ /**
11397
+ * Success
11398
+ */
11399
+ export const zGetPayPeriodResponse = zPayPeriodResponseObject;
11246
11400
  /**
11247
11401
  * Success
11248
11402
  */
@@ -11686,6 +11840,7 @@ export const zCreateEmploymentScheduledTerminationPath = z.object({
11686
11840
  export const zCreateEmploymentScheduledTerminationResponse = zPeopleEmploymentResponseObject;
11687
11841
  export const zListEmploymentsQuery = z.object({
11688
11842
  'filter[user_id]': z.string().optional(),
11843
+ 'filter[companies_department_id]': z.string().optional(),
11689
11844
  filter: z.string().optional(),
11690
11845
  'filter[unexpected]': z.string().optional(),
11691
11846
  'as_of[valid]': z.iso.datetime().optional(),
@@ -11891,6 +12046,78 @@ export const zUpdateCompletionPath = z.object({
11891
12046
  * Success
11892
12047
  */
11893
12048
  export const zUpdateCompletionResponse = zProductionCompletionResponseObject;
12049
+ export const zListProjectDocumentVersionsPath = z.object({
12050
+ project_id: z.string(),
12051
+ document_id: z.string()
12052
+ });
12053
+ export const zListProjectDocumentVersionsQuery = z.object({
12054
+ 'page[cursor]': z.string().optional(),
12055
+ 'page[limit]': z.int().gte(1).optional().default(20),
12056
+ page: z.string().optional()
12057
+ });
12058
+ /**
12059
+ * Success
12060
+ */
12061
+ export const zListProjectDocumentVersionsResponse = z.object({
12062
+ meta: zMeta,
12063
+ links: zLinks,
12064
+ data: z.array(zProjectDocumentVersionResponseObject)
12065
+ });
12066
+ export const zListProjectDocumentsPath = z.object({
12067
+ project_id: z.string()
12068
+ });
12069
+ export const zListProjectDocumentsQuery = z.object({
12070
+ 'filter[created_at][gte]': z.iso.datetime().optional(),
12071
+ 'filter[created_at][lte]': z.iso.datetime().optional(),
12072
+ 'filter[updated_at][gte]': z.iso.datetime().optional(),
12073
+ 'filter[updated_at][lte]': z.iso.datetime().optional(),
12074
+ 'page[cursor]': z.string().optional(),
12075
+ 'page[limit]': z.int().gte(1).optional().default(20),
12076
+ page: z.string().optional(),
12077
+ filter: z.string().optional(),
12078
+ 'filter[unexpected]': z.string().optional()
12079
+ });
12080
+ /**
12081
+ * Success
12082
+ */
12083
+ export const zListProjectDocumentsResponse = z.object({
12084
+ meta: zMeta,
12085
+ links: zLinks,
12086
+ data: z.array(zProjectDocumentResponseObject)
12087
+ });
12088
+ export const zCreateProjectDocumentBody = zProjectDocumentParameters;
12089
+ export const zCreateProjectDocumentPath = z.object({
12090
+ project_id: z.string()
12091
+ });
12092
+ /**
12093
+ * Created
12094
+ */
12095
+ export const zCreateProjectDocumentResponse = zProjectDocumentResponseObject;
12096
+ export const zDeleteProjectDocumentPath = z.object({
12097
+ project_id: z.string(),
12098
+ id: z.string()
12099
+ });
12100
+ /**
12101
+ * No Content
12102
+ */
12103
+ export const zDeleteProjectDocumentResponse = z.void();
12104
+ export const zGetProjectDocumentPath = z.object({
12105
+ project_id: z.string(),
12106
+ id: z.string()
12107
+ });
12108
+ /**
12109
+ * Success
12110
+ */
12111
+ export const zGetProjectDocumentResponse = zProjectDocumentResponseObject;
12112
+ export const zUpdateProjectDocumentBody = zProjectDocumentUpdateParameters;
12113
+ export const zUpdateProjectDocumentPath = z.object({
12114
+ project_id: z.string(),
12115
+ id: z.string()
12116
+ });
12117
+ /**
12118
+ * Success
12119
+ */
12120
+ export const zUpdateProjectDocumentResponse = zProjectDocumentResponseObject;
11894
12121
  export const zCreateProjectTradeBody = zPwaTradeParameters;
11895
12122
  export const zCreateProjectTradePath = z.object({
11896
12123
  project_id: z.string()
@@ -12348,7 +12575,7 @@ export const zCreateFormAssignmentTaskBody = z.object({
12348
12575
  'QUARTERLY'
12349
12576
  ]).optional(),
12350
12577
  recurrence_end_time: z.string().optional(),
12351
- task_assignee_user_ids: z.array(z.string()).optional(),
12578
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
12352
12579
  reminders_attributes: z.array(z.object({
12353
12580
  offset: z.enum([
12354
12581
  'PT0S',
@@ -13192,7 +13419,7 @@ export const zCreateCompanyPath = z.object({
13192
13419
  export const zCreateCompanyResponse = zUserResponseObject;
13193
13420
  export const zRemoveUserFromCompanyPath = z.object({
13194
13421
  user_id: z.string(),
13195
- company_id: z.string()
13422
+ id: z.string()
13196
13423
  });
13197
13424
  /**
13198
13425
  * Success
@@ -13204,7 +13431,7 @@ export const zRemoveUserFromCompanyResponse = zUserResponseObject;
13204
13431
  export const zUpdateCompanyBody = zUserCompanyParameters;
13205
13432
  export const zUpdateCompanyPath = z.object({
13206
13433
  user_id: z.string(),
13207
- company_id: z.string()
13434
+ id: z.string()
13208
13435
  });
13209
13436
  /**
13210
13437
  * Success