@dsptch-work/api-client 0.1.0 → 0.3.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.
@@ -9,6 +9,16 @@ export const zErrorsObject = z.object({
9
9
  message: z.string().optional()
10
10
  })).optional()
11
11
  });
12
+ export const zApiKeyScopeResponseObject = z.object({
13
+ resource: z.string(),
14
+ action: z.enum([
15
+ 'read',
16
+ 'create',
17
+ 'update',
18
+ 'delete'
19
+ ]),
20
+ name: z.string()
21
+ });
12
22
  /**
13
23
  * Register a file for direct upload — send its metadata to receive a blob plus a one-time URL for uploading the file's bytes to storage.
14
24
  */
@@ -318,10 +328,48 @@ export const zTimecodeResponseObject = z.object({
318
328
  ]),
319
329
  default_for_company_id: z.string().nullable(),
320
330
  valid_from: z.iso.datetime(),
321
- valid_to: z.iso.datetime(),
331
+ valid_to: z.iso.datetime().nullable(),
332
+ transaction_from: z.iso.datetime(),
333
+ transaction_to: z.iso.datetime().nullable(),
322
334
  created_at: z.iso.datetime(),
323
335
  updated_at: z.iso.datetime()
324
336
  });
337
+ export const zTimecodeHistoryVersionObject = z.object({
338
+ id: z.string(),
339
+ name: z.string(),
340
+ description: z.string().nullable(),
341
+ description_is_required: z.boolean(),
342
+ billable: z.boolean(),
343
+ overtime_eligible: z.boolean(),
344
+ unpaid: z.boolean(),
345
+ holiday: z.boolean(),
346
+ pto: z.boolean(),
347
+ safety: z.boolean(),
348
+ lunch_shortcut: z.boolean(),
349
+ break_shortcut: z.boolean(),
350
+ pwa: z.boolean(),
351
+ rest_and_recovery: z.boolean(),
352
+ incentive_pay_eligible: z.boolean(),
353
+ restricted_to: z.enum([
354
+ 'none',
355
+ 'job',
356
+ 'non_job',
357
+ 'job_with_timecode'
358
+ ]),
359
+ default_for_company_id: z.string().nullable(),
360
+ valid_from: z.iso.datetime(),
361
+ valid_to: z.iso.datetime().nullable(),
362
+ transaction_from: z.iso.datetime(),
363
+ transaction_to: z.iso.datetime().nullable(),
364
+ created_at: z.iso.datetime(),
365
+ updated_at: z.iso.datetime(),
366
+ version_status: z.enum([
367
+ 'scheduled',
368
+ 'current',
369
+ 'historical'
370
+ ]),
371
+ corrections: z.array(zTimecodeResponseObject)
372
+ });
325
373
  /**
326
374
  * 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.
327
375
  */
@@ -380,31 +428,6 @@ export const zTimecodeScheduledChangeParameters = z.object({
380
428
  'job_with_timecode'
381
429
  ]).optional()
382
430
  });
383
- /**
384
- * Create or update a catalog product. `type` (serial or bulk) is required on create and cannot be changed afterward; `performed_by_user_id` is required on create. `attribute_values` upserts the product's category-attribute values.
385
- */
386
- export const zAssetsProductParameters = z.object({
387
- type: z.enum(['serial', 'bulk']),
388
- name: z.string(),
389
- description: z.string().nullish(),
390
- category_id: z.string().nullish(),
391
- upc: z.string().nullish(),
392
- internal_sku: z.string().nullish(),
393
- default_minimum_quantity: z.int().nullish(),
394
- make: z.string().nullish(),
395
- model: z.string().nullish(),
396
- counted_by: z.enum([
397
- 'each',
398
- 'pair',
399
- 'pack'
400
- ]).optional(),
401
- attribute_values: z.array(z.object({
402
- attribute_id: z.string(),
403
- value: z.string().nullish(),
404
- attribute_option_id: z.string().nullish()
405
- })).optional(),
406
- performed_by_user_id: z.string()
407
- });
408
431
  /**
409
432
  * A named daily allowance (meals, lodging, travel, and the like) that a company can attach to time.
410
433
  */
@@ -415,8 +438,8 @@ export const zPerDiemResponseObject = z.object({
415
438
  rate_cents: z.string().nullable(),
416
439
  currency: z.string(),
417
440
  taxable: z.boolean(),
418
- is_default: z.boolean().nullable(),
419
- is_active: z.boolean().nullable(),
441
+ default: z.boolean().nullable(),
442
+ active: z.boolean().nullable(),
420
443
  work_type_ids: z.array(z.string()),
421
444
  timecode_ids: z.array(z.string()),
422
445
  created_at: z.iso.datetime(),
@@ -431,8 +454,8 @@ export const zPerDiemParameters = z.object({
431
454
  rate_cents: z.string().nullable(),
432
455
  currency: z.string(),
433
456
  taxable: z.boolean().optional(),
434
- is_default: z.boolean().nullish(),
435
- is_active: z.boolean().nullish(),
457
+ default: z.boolean().nullish(),
458
+ active: z.boolean().nullish(),
436
459
  work_type_ids: z.array(z.string()).optional(),
437
460
  timecode_ids: z.array(z.string()).optional()
438
461
  });
@@ -440,33 +463,10 @@ export const zPerDiemParameters = z.object({
440
463
  * The product's filled attribute values — one entry per attribute assigned to its category.
441
464
  */
442
465
  export const zAssetsAttributeValueObjects = z.array(z.object({
443
- attribute_id: z.string(),
466
+ assets_attribute_id: z.string(),
444
467
  value: z.string().nullable(),
445
- attribute_option_id: z.string().nullable()
468
+ assets_attribute_option_id: z.string().nullable()
446
469
  }));
447
- /**
448
- * A product in the company's asset catalog — a template that tracked items instantiate. `serialized` distinguishes an individually-tracked (serial) product from a quantity-counted (bulk) one.
449
- */
450
- export const zAssetsProductResponseObject = z.object({
451
- id: z.string(),
452
- company_id: z.string(),
453
- name: z.string(),
454
- upc: z.string().nullable(),
455
- internal_sku: z.string().nullable(),
456
- default_minimum_quantity: z.int().nullable(),
457
- make: z.string().nullable(),
458
- model: z.string().nullable(),
459
- counted_by: z.enum([
460
- 'each',
461
- 'pair',
462
- 'pack'
463
- ]),
464
- serialized: z.boolean(),
465
- category_id: z.string().nullable(),
466
- attributes: zAssetsAttributeValueObjects,
467
- created_at: z.iso.datetime(),
468
- updated_at: z.iso.datetime()
469
- });
470
470
  /**
471
471
  * A reusable custom-field definition (for example "Color" or "Voltage") that categories assign and products or items fill in.
472
472
  */
@@ -519,7 +519,7 @@ export const zAssetsCategoryResponseObject = z.object({
519
519
  full_name: z.string(),
520
520
  attributes: z.array(z.object({
521
521
  id: z.string(),
522
- attribute_id: z.string(),
522
+ assets_attribute_id: z.string(),
523
523
  fillable_on: z.enum(['product', 'item']),
524
524
  required: z.boolean(),
525
525
  position: z.int()
@@ -535,7 +535,7 @@ export const zAssetsCategoryParameters = z.object({
535
535
  parent_id: z.string().nullish(),
536
536
  category_attributes: z.array(z.object({
537
537
  id: z.string().optional(),
538
- attribute_id: z.string(),
538
+ assets_attribute_id: z.string(),
539
539
  fillable_on: z.enum(['product', 'item']),
540
540
  required: z.boolean().optional(),
541
541
  position: z.int().optional(),
@@ -660,12 +660,55 @@ export const zPayPeriodConfigResponseObject = z.object({
660
660
  ]),
661
661
  actuals_enabled: z.boolean().nullable(),
662
662
  requires_external_map_contributor: z.boolean(),
663
- is_paid_after_holiday: z.boolean(),
664
- is_demo: z.boolean().nullable(),
663
+ paid_after_holiday: z.boolean(),
664
+ demo: z.boolean().nullable(),
665
665
  valid_from: z.iso.datetime(),
666
666
  valid_to: z.iso.datetime().nullable(),
667
667
  created_at: z.iso.datetime()
668
668
  });
669
+ export const zPayPeriodConfigHistoryVersionObject = z.object({
670
+ uid: z.string(),
671
+ company_id: z.string(),
672
+ name: z.string(),
673
+ frequency: z.enum(['weekly', 'biweekly']),
674
+ start_day_of_week: z.int(),
675
+ tz_name: z.string(),
676
+ currency: z.string(),
677
+ status: z.enum([
678
+ 'synced',
679
+ 'pending',
680
+ 'failed'
681
+ ]),
682
+ payroll_mode: z.enum([
683
+ 'none',
684
+ 'base',
685
+ 'aggregate'
686
+ ]),
687
+ time_mode: z.enum([
688
+ 'none',
689
+ 'base',
690
+ 'aggregate'
691
+ ]),
692
+ payroll_system: z.enum([
693
+ 'rippling',
694
+ 'quickbooks_online',
695
+ 'paychex',
696
+ 'gusto'
697
+ ]),
698
+ actuals_enabled: z.boolean().nullable(),
699
+ requires_external_map_contributor: z.boolean(),
700
+ paid_after_holiday: z.boolean(),
701
+ demo: z.boolean().nullable(),
702
+ valid_from: z.iso.datetime(),
703
+ valid_to: z.iso.datetime().nullable(),
704
+ created_at: z.iso.datetime(),
705
+ version_status: z.enum([
706
+ 'scheduled',
707
+ 'current',
708
+ 'historical'
709
+ ]),
710
+ corrections: z.array(zPayPeriodConfigResponseObject)
711
+ });
669
712
  /**
670
713
  * Create or update a holiday on a pay schedule. name, holiday_type, and month are required; mday is required for fixed holidays and wday + week for floating holidays (enforced by model validation).
671
714
  */
@@ -1054,11 +1097,7 @@ export const zFormSubmissionResponseObject = z.object({
1054
1097
  user_id: z.string(),
1055
1098
  updated_by_user_id: z.string(),
1056
1099
  created_at: z.iso.datetime(),
1057
- updated_at: z.iso.datetime(),
1058
- valid_time: z.object({
1059
- start: z.string().optional(),
1060
- end: z.string().nullish()
1061
- })
1100
+ updated_at: z.iso.datetime()
1062
1101
  });
1063
1102
  /**
1064
1103
  * 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.
@@ -1083,7 +1122,7 @@ export const zUserCompanyScheduledChangesParameters = z.object({
1083
1122
  export const zWorkTypeResponseObject = z.object({
1084
1123
  id: z.string(),
1085
1124
  value: z.string(),
1086
- is_verified: z.boolean(),
1125
+ verified: z.boolean(),
1087
1126
  scoped_to_company_id: z.string().nullable(),
1088
1127
  specific_to_site_type: z.string().nullable(),
1089
1128
  created_at: z.iso.datetime(),
@@ -1125,7 +1164,7 @@ export const zCompanyResponseObject = z.object({
1125
1164
  'partnership',
1126
1165
  'sole_proprietorship',
1127
1166
  's_corporation'
1128
- ]),
1167
+ ]).nullable(),
1129
1168
  employee_count_range: z.enum([
1130
1169
  'one_to_ten',
1131
1170
  'eleven_to_fifty',
@@ -1135,7 +1174,7 @@ export const zCompanyResponseObject = z.object({
1135
1174
  'one_thousand_one_to_five_thousand',
1136
1175
  'five_thousand_one_to_ten_thousand',
1137
1176
  'ten_thousand_one_plus'
1138
- ]),
1177
+ ]).nullable(),
1139
1178
  revenue_range: z.enum([
1140
1179
  'zero_to_one_million',
1141
1180
  'one_to_ten_million',
@@ -1147,12 +1186,127 @@ export const zCompanyResponseObject = z.object({
1147
1186
  'five_hundred_to_one_billion',
1148
1187
  'one_billion_to_ten_billion',
1149
1188
  'ten_billion_plus'
1150
- ]),
1189
+ ]).nullable(),
1151
1190
  naics_code: z.string().nullable(),
1152
1191
  linkedin_url: z.string().nullable(),
1153
1192
  created_at: z.iso.datetime(),
1154
1193
  updated_at: z.iso.datetime()
1155
1194
  });
1195
+ export const zCompanyParameters = z.intersection(z.union([
1196
+ z.object({
1197
+ name: z.string()
1198
+ }),
1199
+ z.object({
1200
+ legal_name: z.string().nullable()
1201
+ }),
1202
+ z.object({
1203
+ description: z.string().nullable()
1204
+ }),
1205
+ z.object({
1206
+ address: z.string().nullable()
1207
+ }),
1208
+ z.object({
1209
+ website: z.string().nullable()
1210
+ }),
1211
+ z.object({
1212
+ phone_number: z.string().nullable()
1213
+ }),
1214
+ z.object({
1215
+ email: z.string().nullable()
1216
+ }),
1217
+ z.object({
1218
+ color_hex: z.string()
1219
+ }),
1220
+ z.object({
1221
+ tagline: z.string().nullable()
1222
+ }),
1223
+ z.object({
1224
+ founding_year: z.int().nullable()
1225
+ }),
1226
+ z.object({
1227
+ corporate_structure: z.enum([
1228
+ 'corporation',
1229
+ 'llc',
1230
+ 'partnership',
1231
+ 'sole_proprietorship',
1232
+ 's_corporation'
1233
+ ]).nullable()
1234
+ }),
1235
+ z.object({
1236
+ employee_count_range: z.enum([
1237
+ 'one_to_ten',
1238
+ 'eleven_to_fifty',
1239
+ 'fifty_one_to_two_hundred',
1240
+ 'two_hundred_one_to_five_hundred',
1241
+ 'five_hundred_one_to_one_thousand',
1242
+ 'one_thousand_one_to_five_thousand',
1243
+ 'five_thousand_one_to_ten_thousand',
1244
+ 'ten_thousand_one_plus'
1245
+ ]).nullable()
1246
+ }),
1247
+ z.object({
1248
+ revenue_range: z.enum([
1249
+ 'zero_to_one_million',
1250
+ 'one_to_ten_million',
1251
+ 'ten_to_twenty_five_million',
1252
+ 'twenty_five_to_fifty_million',
1253
+ 'fifty_to_one_hundred_million',
1254
+ 'one_hundred_to_two_fifty_million',
1255
+ 'two_fifty_to_five_hundred_million',
1256
+ 'five_hundred_to_one_billion',
1257
+ 'one_billion_to_ten_billion',
1258
+ 'ten_billion_plus'
1259
+ ]).nullable()
1260
+ }),
1261
+ z.object({
1262
+ naics_code: z.string().nullable()
1263
+ }),
1264
+ z.object({
1265
+ linkedin_url: z.string().nullable()
1266
+ })
1267
+ ]), z.object({
1268
+ name: z.string().optional(),
1269
+ legal_name: z.string().nullish(),
1270
+ description: z.string().nullish(),
1271
+ address: z.string().nullish(),
1272
+ website: z.string().nullish(),
1273
+ phone_number: z.string().nullish(),
1274
+ email: z.string().nullish(),
1275
+ color_hex: z.string().optional(),
1276
+ tagline: z.string().nullish(),
1277
+ founding_year: z.int().nullish(),
1278
+ corporate_structure: z.enum([
1279
+ 'corporation',
1280
+ 'llc',
1281
+ 'partnership',
1282
+ 'sole_proprietorship',
1283
+ 's_corporation'
1284
+ ]).nullish(),
1285
+ employee_count_range: z.enum([
1286
+ 'one_to_ten',
1287
+ 'eleven_to_fifty',
1288
+ 'fifty_one_to_two_hundred',
1289
+ 'two_hundred_one_to_five_hundred',
1290
+ 'five_hundred_one_to_one_thousand',
1291
+ 'one_thousand_one_to_five_thousand',
1292
+ 'five_thousand_one_to_ten_thousand',
1293
+ 'ten_thousand_one_plus'
1294
+ ]).nullish(),
1295
+ revenue_range: z.enum([
1296
+ 'zero_to_one_million',
1297
+ 'one_to_ten_million',
1298
+ 'ten_to_twenty_five_million',
1299
+ 'twenty_five_to_fifty_million',
1300
+ 'fifty_to_one_hundred_million',
1301
+ 'one_hundred_to_two_fifty_million',
1302
+ 'two_fifty_to_five_hundred_million',
1303
+ 'five_hundred_to_one_billion',
1304
+ 'one_billion_to_ten_billion',
1305
+ 'ten_billion_plus'
1306
+ ]).nullish(),
1307
+ naics_code: z.string().nullish(),
1308
+ linkedin_url: z.string().nullish()
1309
+ }));
1156
1310
  /**
1157
1311
  * A custom field definition — a company-defined attribute attached to one kind of record (jobs, workers, apprentices, or the company itself). Deleting one is blocked while any record still holds a value for it.
1158
1312
  */
@@ -1161,7 +1315,7 @@ export const zCustomFieldConfigsResponseObject = z.object({
1161
1315
  name: z.string(),
1162
1316
  description: z.string().nullable(),
1163
1317
  model_type: z.string(),
1164
- is_visible: z.boolean(),
1318
+ visible: z.boolean(),
1165
1319
  company_id: z.string(),
1166
1320
  created_at: z.iso.datetime(),
1167
1321
  updated_at: z.iso.datetime()
@@ -1178,7 +1332,7 @@ export const zCustomFieldConfigParameters = z.object({
1178
1332
  'job',
1179
1333
  'user_company'
1180
1334
  ]),
1181
- is_visible: z.boolean().optional()
1335
+ visible: z.boolean().optional()
1182
1336
  });
1183
1337
  /**
1184
1338
  * A user's membership in a group.
@@ -1242,7 +1396,7 @@ export const zJobParameters = z.object({
1242
1396
  requires_feature_allocation: z.boolean().nullish(),
1243
1397
  max_one_feature_allocation: z.boolean().nullish(),
1244
1398
  job_work_types_attributes: z.array(z.object({
1245
- is_primary: z.boolean().optional(),
1399
+ primary: z.boolean().optional(),
1246
1400
  work_type_id: z.string().optional()
1247
1401
  })).nullish(),
1248
1402
  job_address_attributes: z.object({
@@ -1622,14 +1776,52 @@ export const zPayrollExternalMapResponseObject = z.object({
1622
1776
  created_by_user_id: z.string().nullable(),
1623
1777
  global: z.boolean(),
1624
1778
  valid_from: z.iso.datetime(),
1625
- valid_to: z.iso.datetime(),
1779
+ valid_to: z.iso.datetime().nullable(),
1626
1780
  transaction_from: z.iso.datetime(),
1627
- transaction_to: z.iso.datetime(),
1781
+ transaction_to: z.iso.datetime().nullable(),
1628
1782
  created_at: z.iso.datetime(),
1629
1783
  updated_at: z.iso.datetime()
1630
1784
  });
1785
+ export const zPayrollExternalMapHistoryVersionObject = z.object({
1786
+ id: z.string(),
1787
+ bitemporal_id: z.string(),
1788
+ name: z.string(),
1789
+ compensation_element_id: z.string(),
1790
+ compensation_element_name: z.string(),
1791
+ compensation_element_category: z.enum([
1792
+ 'tax',
1793
+ 'health',
1794
+ 'retirement',
1795
+ 'insurance',
1796
+ 'earning',
1797
+ 'garnishment',
1798
+ 'other'
1799
+ ]),
1800
+ pay_period_config_uid: z.string().nullable(),
1801
+ fringe_benefit_plan_id: z.string().nullable(),
1802
+ contributor: z.enum([
1803
+ 'any',
1804
+ 'employee',
1805
+ 'employer'
1806
+ ]),
1807
+ annual_periods: z.int(),
1808
+ created_by_user_id: z.string().nullable(),
1809
+ global: z.boolean(),
1810
+ valid_from: z.iso.datetime(),
1811
+ valid_to: z.iso.datetime().nullable(),
1812
+ transaction_from: z.iso.datetime(),
1813
+ transaction_to: z.iso.datetime().nullable(),
1814
+ created_at: z.iso.datetime(),
1815
+ updated_at: z.iso.datetime(),
1816
+ version_status: z.enum([
1817
+ 'scheduled',
1818
+ 'current',
1819
+ 'historical'
1820
+ ]),
1821
+ corrections: z.array(zPayrollExternalMapResponseObject)
1822
+ });
1631
1823
  /**
1632
- * A payroll run — a record of one payroll-processing event as it occurred in the external payroll system (not a run initiated by DSPTCH). Paystubs belong to a run.
1824
+ * A payroll run — a record of one payroll-processing event, synced from an external payroll system or reported to DSPTCH (never a run DSPTCH itself initiates). Paystubs belong to a run.
1633
1825
  */
1634
1826
  export const zPayrollRunResponseObject = z.object({
1635
1827
  id: z.string(),
@@ -1741,6 +1933,30 @@ export const zProjectParameters = z.object({
1741
1933
  beginning_of_construction_date: z.iso.date().nullish(),
1742
1934
  placed_in_service_date: z.iso.date().nullish()
1743
1935
  });
1936
+ export const zSiteCheckInResponseObject = z.object({
1937
+ id: z.string(),
1938
+ site_id: z.string(),
1939
+ user_id: z.string().nullable(),
1940
+ first_name: z.string().nullable(),
1941
+ last_name: z.string().nullable(),
1942
+ site_contact_id: z.string().nullable(),
1943
+ site_contact_first_name: z.string().nullable(),
1944
+ site_contact_last_name: z.string().nullable(),
1945
+ employer_name: z.string().nullable(),
1946
+ description: z.string().nullable(),
1947
+ rationale: z.string().nullable(),
1948
+ source: z.enum(['manual', 'auto']),
1949
+ nerc_check_in: z.boolean(),
1950
+ cip_exceptional: z.boolean(),
1951
+ created_by_user_id: z.string().nullable(),
1952
+ latitude: z.number().nullable(),
1953
+ longitude: z.number().nullable(),
1954
+ start_time: z.iso.datetime(),
1955
+ end_time: z.iso.datetime().nullable(),
1956
+ verified_at: z.iso.datetime().nullable(),
1957
+ created_at: z.iso.datetime(),
1958
+ updated_at: z.iso.datetime()
1959
+ });
1744
1960
  /**
1745
1961
  * A geographic location where work is performed — a site on the Atlas map. Read-only through the API; sites are drawn on the map or imported from external sources, not created here.
1746
1962
  */
@@ -1885,7 +2101,7 @@ export const zFeatureResponseObject = z.object({
1885
2101
  ext_source: z.string(),
1886
2102
  scoped_to_company_id: z.string().nullable(),
1887
2103
  created_by_company_id: z.string().nullable(),
1888
- is_scoped_to_user: z.boolean(),
2104
+ scoped_to_user: z.boolean(),
1889
2105
  address_id: z.string().nullable(),
1890
2106
  created_by_user_id: z.string().nullable(),
1891
2107
  updated_by_user_id: z.string().nullable(),
@@ -1925,8 +2141,7 @@ export const zComplianceCheckResponseObject = z.object({
1925
2141
  'failed',
1926
2142
  'not_applicable',
1927
2143
  'dismissed',
1928
- 'pending',
1929
- 'error'
2144
+ 'pending'
1930
2145
  ]),
1931
2146
  requirement_id: z.string(),
1932
2147
  company_id: z.string().nullable(),
@@ -2128,7 +2343,7 @@ export const zPositionParameters = z.object({
2128
2343
  position_function_id: z.string().nullish(),
2129
2344
  per_diem_id: z.string().nullish(),
2130
2345
  per_diem_rate_cents: z.number().nullish(),
2131
- is_pwa: z.boolean().optional(),
2346
+ pwa: z.boolean().optional(),
2132
2347
  cash_fringe_rate_cents: z.number().nullish(),
2133
2348
  hourly_rate_cents: z.number().nullish(),
2134
2349
  pwa_wage_pay_rate_cents: z.number().nullish(),
@@ -2319,12 +2534,12 @@ export const zCertificationResponseObject = z.object({
2319
2534
  export const zUserCertificationParameters = z.object({
2320
2535
  user_id: z.string(),
2321
2536
  certification_id: z.string(),
2322
- date_received: z.iso.datetime(),
2537
+ received_at: z.iso.datetime(),
2323
2538
  file: z.object({
2324
2539
  name: z.string().optional(),
2325
2540
  content: z.string().optional()
2326
2541
  }).nullish(),
2327
- is_verified: z.boolean().nullish(),
2542
+ verified: z.boolean().nullish(),
2328
2543
  expiration_date: z.iso.date().nullish(),
2329
2544
  credential_id: z.string().nullish(),
2330
2545
  approved_by_user_id: z.string().nullish(),
@@ -2338,10 +2553,10 @@ export const zUserCertificationResponseObject = z.object({
2338
2553
  id: z.string(),
2339
2554
  user_id: z.string(),
2340
2555
  certification_id: z.string(),
2341
- date_received: z.iso.datetime(),
2342
- is_verified: z.boolean(),
2556
+ received_at: z.iso.datetime(),
2557
+ verified: z.boolean(),
2343
2558
  issuer_company_id: z.string().nullable(),
2344
- expiration_date: z.iso.datetime().nullable(),
2559
+ expiration_date: z.iso.date().nullable(),
2345
2560
  credential_id: z.string().nullable(),
2346
2561
  approved_by_user_id: z.string().nullable(),
2347
2562
  created_by_user_id: z.string().nullable(),
@@ -2459,7 +2674,7 @@ export const zPositionResponseObject = z.object({
2459
2674
  pwa_wage_pay_rate_cents: z.string().nullable(),
2460
2675
  pwa_wage_pay_rate_src_type: z.string().nullable(),
2461
2676
  wage_adder_rate_cents: z.string().nullable(),
2462
- is_pwa: z.boolean(),
2677
+ pwa: z.boolean(),
2463
2678
  federal_wage_determination_uids: z.array(z.string()),
2464
2679
  regional_wage_determination_uids: z.array(z.string()),
2465
2680
  pwa_details: z.object({
@@ -2812,11 +3027,7 @@ export const zFormSubmissionIndexObject = z.object({
2812
3027
  user_id: z.string().optional(),
2813
3028
  updated_by_user_id: z.string().optional(),
2814
3029
  created_at: z.iso.datetime().optional(),
2815
- updated_at: z.iso.datetime().optional(),
2816
- valid_time: z.object({
2817
- start: z.string().optional(),
2818
- end: z.string().nullish()
2819
- }).optional()
3030
+ updated_at: z.iso.datetime().optional()
2820
3031
  })).optional()
2821
3032
  });
2822
3033
  /**
@@ -2973,13 +3184,6 @@ export const zLaborRatesResponseObject = z.object({
2973
3184
  links: zLinks,
2974
3185
  data: z.array(zLaborRateResponseObject)
2975
3186
  });
2976
- /**
2977
- * The time range over which this version of the wage determination is in effect. Half-open, so a null end means it is still current.
2978
- */
2979
- export const zWageDeterminationValidTime = z.object({
2980
- start: z.iso.datetime(),
2981
- end: z.iso.datetime().nullable()
2982
- });
2983
3187
  /**
2984
3188
  * A Federal (Davis-Bacon) wage determination on a job.
2985
3189
  */
@@ -2987,6 +3191,7 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
2987
3191
  id: z.string(),
2988
3192
  uid: z.string(),
2989
3193
  job_id: z.string(),
3194
+ trade_id: z.string(),
2990
3195
  type: z.enum(['Pwa::JobWageDeterminations::Federal']),
2991
3196
  labor_classification: z.string(),
2992
3197
  hourly_rate_cents: z.string(),
@@ -2999,7 +3204,8 @@ export const zFederalJobWageDeterminationResponseObject = z.object({
2999
3204
  'residential'
3000
3205
  ]),
3001
3206
  general_wage_determination: z.string().nullable(),
3002
- valid_time: zWageDeterminationValidTime,
3207
+ valid_from: z.iso.datetime(),
3208
+ valid_to: z.iso.datetime().nullable(),
3003
3209
  created_at: z.iso.datetime(),
3004
3210
  updated_at: z.iso.datetime()
3005
3211
  });
@@ -3029,13 +3235,15 @@ export const zRegionalJobWageDeterminationResponseObject = z.object({
3029
3235
  id: z.string(),
3030
3236
  uid: z.string(),
3031
3237
  job_id: z.string(),
3238
+ trade_id: z.string(),
3032
3239
  type: z.enum(['Pwa::JobWageDeterminations::Regional']),
3033
3240
  labor_classification: z.string(),
3034
3241
  hourly_rate_cents: z.string(),
3035
3242
  fringe_rate_cents: z.string(),
3036
3243
  general_wage_determination: z.string().nullable(),
3037
3244
  regional_fields: zRegionalWageDeterminationFields,
3038
- valid_time: zWageDeterminationValidTime,
3245
+ valid_from: z.iso.datetime(),
3246
+ valid_to: z.iso.datetime().nullable(),
3039
3247
  created_at: z.iso.datetime(),
3040
3248
  updated_at: z.iso.datetime()
3041
3249
  });
@@ -3046,12 +3254,67 @@ export const zJobWageDeterminationResponseObject = z.discriminatedUnion('type',
3046
3254
  zFederalJobWageDeterminationResponseObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
3047
3255
  zRegionalJobWageDeterminationResponseObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
3048
3256
  ]);
3257
+ export const zFederalJobWageDeterminationHistoryVersionObject = z.object({
3258
+ id: z.string(),
3259
+ uid: z.string(),
3260
+ job_id: z.string(),
3261
+ trade_id: z.string(),
3262
+ type: z.enum(['Pwa::JobWageDeterminations::Federal']),
3263
+ labor_classification: z.string(),
3264
+ hourly_rate_cents: z.string(),
3265
+ fringe_rate_cents: z.string(),
3266
+ class_code: z.string().nullable(),
3267
+ construction_category: z.enum([
3268
+ 'building',
3269
+ 'heavy',
3270
+ 'highway',
3271
+ 'residential'
3272
+ ]),
3273
+ general_wage_determination: z.string().nullable(),
3274
+ valid_from: z.iso.datetime(),
3275
+ valid_to: z.iso.datetime().nullable(),
3276
+ created_at: z.iso.datetime(),
3277
+ updated_at: z.iso.datetime(),
3278
+ version_status: z.enum([
3279
+ 'scheduled',
3280
+ 'current',
3281
+ 'historical'
3282
+ ]),
3283
+ corrections: z.array(zJobWageDeterminationResponseObject)
3284
+ });
3285
+ export const zRegionalJobWageDeterminationHistoryVersionObject = z.object({
3286
+ id: z.string(),
3287
+ uid: z.string(),
3288
+ job_id: z.string(),
3289
+ trade_id: z.string(),
3290
+ type: z.enum(['Pwa::JobWageDeterminations::Regional']),
3291
+ labor_classification: z.string(),
3292
+ hourly_rate_cents: z.string(),
3293
+ fringe_rate_cents: z.string(),
3294
+ general_wage_determination: z.string().nullable(),
3295
+ regional_fields: zRegionalWageDeterminationFields,
3296
+ valid_from: z.iso.datetime(),
3297
+ valid_to: z.iso.datetime().nullable(),
3298
+ created_at: z.iso.datetime(),
3299
+ updated_at: z.iso.datetime(),
3300
+ version_status: z.enum([
3301
+ 'scheduled',
3302
+ 'current',
3303
+ 'historical'
3304
+ ]),
3305
+ corrections: z.array(zJobWageDeterminationResponseObject)
3306
+ });
3307
+ export const zJobWageDeterminationHistoryVersionObject = z.discriminatedUnion('type', [
3308
+ zFederalJobWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Federal') }),
3309
+ zRegionalJobWageDeterminationHistoryVersionObject.extend({ type: z.literal('Pwa::JobWageDeterminations::Regional') })
3310
+ ]);
3049
3311
  /**
3050
3312
  * Parameters for creating a Federal (Davis-Bacon) wage determination on a job.
3051
3313
  */
3052
3314
  export const zFederalJobWageDeterminationParameters = z.object({
3053
3315
  type: z.enum(['Pwa::JobWageDeterminations::Federal']),
3054
3316
  labor_classification: z.string(),
3317
+ trade_id: z.string(),
3055
3318
  hourly_rate_cents: z.string(),
3056
3319
  fringe_rate_cents: z.string(),
3057
3320
  class_code: z.string().nullish(),
@@ -3069,6 +3332,7 @@ export const zFederalJobWageDeterminationParameters = z.object({
3069
3332
  export const zRegionalJobWageDeterminationParameters = z.object({
3070
3333
  type: z.enum(['Pwa::JobWageDeterminations::Regional']),
3071
3334
  labor_classification: z.string(),
3335
+ trade_id: z.string(),
3072
3336
  hourly_rate_cents: z.string(),
3073
3337
  fringe_rate_cents: z.string().optional(),
3074
3338
  general_wage_determination: z.string().nullish(),
@@ -3144,7 +3408,7 @@ export const zRateRuleCondition = z.discriminatedUnion('type', [
3144
3408
  zRateRuleOvertimeMultiplierCondition.extend({ type: z.literal('overtime_multiplier') })
3145
3409
  ]);
3146
3410
  /**
3147
- * A conditional rate-modification rule on a job wage determination — it adds wage or fringe cents when its conditions match. `valid_time` is the temporal window over which this version of the rule is in effect.
3411
+ * A conditional rate-modification rule on a job wage determination — it adds wage or fringe cents when its conditions match. `valid_from` and `valid_to` bound the window over which this version of the rule is in effect.
3148
3412
  */
3149
3413
  export const zRateRuleResponseObject = z.object({
3150
3414
  id: z.string(),
@@ -3153,66 +3417,36 @@ export const zRateRuleResponseObject = z.object({
3153
3417
  pay_rates_rule_package_id: z.string(),
3154
3418
  effect: zRateRuleEffect,
3155
3419
  conditions: z.array(zRateRuleCondition),
3156
- valid_time: zWageDeterminationValidTime,
3157
- created_at: z.iso.datetime(),
3158
- updated_at: z.iso.datetime()
3159
- });
3160
- /**
3161
- * Create a rate rule on a job wage determination. `effect` is required. `conditions` is optional — an omitted or empty list makes the rule always apply. `effective_date` (YYYY-MM-DD) sets when the rule takes effect; it defaults to today and cannot predate the earliest applicable wage determination.
3162
- */
3163
- export const zRateRuleParameters = z.object({
3164
- effective_date: z.iso.date().nullish(),
3165
- effect: zRateRuleEffect,
3166
- conditions: z.array(zRateRuleCondition).optional()
3167
- });
3168
- /**
3169
- * A tracked physical asset owned by a company and typed by a product — either an individually-tracked serial unit or a quantity-tracked bulk stock record. The serial-only fields (serial_number, status, purchase_date, purchase_price_cents, currency, external_id, external_system_url) are null on a bulk item.
3170
- */
3171
- export const zAssetsItemResponseObject = z.object({
3172
- id: z.string(),
3173
- name: z.string(),
3174
- description: z.string().nullable(),
3175
- assets_product_id: z.string(),
3176
- company_id: z.string(),
3177
- type: z.enum(['serial', 'bulk']),
3178
- serial_number: z.string().nullable(),
3179
- status: z.enum([
3180
- 'available',
3181
- 'assigned',
3182
- 'transit',
3183
- 'maintenance',
3184
- 'retired'
3185
- ]),
3186
- purchase_date: z.iso.datetime().nullable(),
3187
- purchase_price_cents: z.string().nullable(),
3188
- currency: z.string().nullable(),
3189
- external_id: z.string().nullable(),
3190
- external_system_url: z.string().nullable(),
3420
+ valid_from: z.iso.datetime(),
3421
+ valid_to: z.iso.datetime().nullable(),
3191
3422
  created_at: z.iso.datetime(),
3192
3423
  updated_at: z.iso.datetime()
3193
3424
  });
3194
- /**
3195
- * Create or update an asset item. The write API creates serial items only; assets_product_id and serial_number are set on create and ignored on update. On create you may also place the item — assets_site_id to stock it at a site, or user_id to assign it to a user (the two are mutually exclusive). performed_by_user_id is required.
3196
- */
3197
- export const zAssetsItemParameters = z.object({
3198
- name: z.string(),
3199
- description: z.string().optional(),
3200
- assets_product_id: z.string(),
3201
- serial_number: z.string(),
3202
- status: z.enum([
3203
- 'available',
3204
- 'assigned',
3205
- 'transit',
3206
- 'maintenance',
3207
- 'retired'
3208
- ]).optional(),
3209
- purchase_date: z.iso.datetime().optional(),
3210
- purchase_price_cents: z.int().optional(),
3211
- external_id: z.string().optional(),
3212
- external_system_url: z.string().optional(),
3213
- assets_site_id: z.string().optional(),
3214
- user_id: z.string().optional(),
3215
- performed_by_user_id: z.string()
3425
+ export const zRateRuleHistoryVersionObject = z.object({
3426
+ id: z.string(),
3427
+ uid: z.string(),
3428
+ job_wage_determination_id: z.string(),
3429
+ pay_rates_rule_package_id: z.string(),
3430
+ effect: zRateRuleEffect,
3431
+ conditions: z.array(zRateRuleCondition),
3432
+ valid_from: z.iso.datetime(),
3433
+ valid_to: z.iso.datetime().nullable(),
3434
+ created_at: z.iso.datetime(),
3435
+ updated_at: z.iso.datetime(),
3436
+ version_status: z.enum([
3437
+ 'scheduled',
3438
+ 'current',
3439
+ 'historical'
3440
+ ]),
3441
+ corrections: z.array(zRateRuleResponseObject)
3442
+ });
3443
+ /**
3444
+ * Create a rate rule on a job wage determination. `effect` is required. `conditions` is optional — an omitted or empty list makes the rule always apply. `effective_date` (YYYY-MM-DD) sets when the rule takes effect; it defaults to today and cannot predate the earliest applicable wage determination.
3445
+ */
3446
+ export const zRateRuleParameters = z.object({
3447
+ effective_date: z.iso.date().nullish(),
3448
+ effect: zRateRuleEffect,
3449
+ conditions: z.array(zRateRuleCondition).optional()
3216
3450
  });
3217
3451
  /**
3218
3452
  * A vendor in the company's asset catalog — a supplier or manufacturer that products are sourced from.
@@ -3221,6 +3455,7 @@ export const zAssetsVendorResponseObject = z.object({
3221
3455
  id: z.string(),
3222
3456
  name: z.string(),
3223
3457
  company_id: z.string(),
3458
+ logo_url: z.string().nullable(),
3224
3459
  created_at: z.iso.datetime(),
3225
3460
  updated_at: z.iso.datetime()
3226
3461
  });
@@ -3228,7 +3463,8 @@ export const zAssetsVendorResponseObject = z.object({
3228
3463
  * Create or update a vendor. Only name is required.
3229
3464
  */
3230
3465
  export const zAssetsVendorParameters = z.object({
3231
- name: z.string()
3466
+ name: z.string(),
3467
+ logo_signed_id: z.string().optional()
3232
3468
  });
3233
3469
  /**
3234
3470
  * A physical container that holds a company's assets and inventory — either a fixed, Atlas-mapped location (warehouse or yard) or a standalone mobile container (trailer, truck, van, or conex).
@@ -3346,22 +3582,165 @@ export const zAssetsFormAssignmentTriggerParameters = z.object({
3346
3582
  assigned_user_ids: z.array(z.string()).optional(),
3347
3583
  product_ids: z.array(z.string()).optional()
3348
3584
  });
3585
+ /**
3586
+ * A file attached to an asset — an item or product image, or a service-event attachment. Uploaded through the direct-upload flow; the response carries a URL to download it.
3587
+ */
3588
+ export const zAssetsAttachmentResponseObject = z.object({
3589
+ id: z.string(),
3590
+ file: z.object({
3591
+ filename: z.string(),
3592
+ content_type: z.string().nullish(),
3593
+ byte_size: z.int(),
3594
+ url: z.string()
3595
+ }).nullable(),
3596
+ created_at: z.iso.datetime(),
3597
+ updated_at: z.iso.datetime()
3598
+ });
3599
+ /**
3600
+ * A product in the company's asset catalog — a template that tracked items instantiate. `serialized` distinguishes an individually-tracked (serial) product from a quantity-counted (bulk) one.
3601
+ */
3602
+ export const zAssetsProductResponseObject = z.object({
3603
+ id: z.string(),
3604
+ company_id: z.string(),
3605
+ name: z.string(),
3606
+ upc: z.string().nullable(),
3607
+ internal_sku: z.string().nullable(),
3608
+ default_minimum_quantity: z.int().nullable(),
3609
+ make: z.string().nullable(),
3610
+ model: z.string().nullable(),
3611
+ counted_by: z.enum([
3612
+ 'each',
3613
+ 'pair',
3614
+ 'pack'
3615
+ ]),
3616
+ serialized: z.boolean(),
3617
+ assets_category_id: z.string().nullable(),
3618
+ attributes: zAssetsAttributeValueObjects,
3619
+ images: z.array(zAssetsAttachmentResponseObject),
3620
+ created_at: z.iso.datetime(),
3621
+ updated_at: z.iso.datetime()
3622
+ });
3623
+ /**
3624
+ * A tracked physical asset owned by a company and typed by a product — either an individually-tracked serial unit or a quantity-tracked bulk stock record. The serial-only fields (serial_number, status, purchase_date, purchase_price_cents, currency, external_id, external_system_url) are null on a bulk item.
3625
+ */
3626
+ export const zAssetsItemResponseObject = z.object({
3627
+ id: z.string(),
3628
+ name: z.string(),
3629
+ description: z.string().nullable(),
3630
+ assets_product_id: z.string(),
3631
+ company_id: z.string(),
3632
+ type: z.enum(['serial', 'bulk']),
3633
+ serial_number: z.string().nullable(),
3634
+ status: z.enum([
3635
+ 'available',
3636
+ 'assigned',
3637
+ 'retired'
3638
+ ]),
3639
+ purchase_date: z.iso.datetime().nullable(),
3640
+ purchase_price_cents: z.string().nullable(),
3641
+ currency: z.string().nullable(),
3642
+ external_id: z.string().nullable(),
3643
+ external_system_url: z.string().nullable(),
3644
+ images: z.array(zAssetsAttachmentResponseObject),
3645
+ created_at: z.iso.datetime(),
3646
+ updated_at: z.iso.datetime()
3647
+ });
3648
+ /**
3649
+ * One attachment in a nested collection. Send file with a signed_id to add one; send id (with _destroy) to remove an existing one.
3650
+ */
3651
+ export const zAssetsAttachmentParameters = z.object({
3652
+ id: z.string().optional(),
3653
+ file: z.string().optional(),
3654
+ _destroy: z.boolean().optional()
3655
+ });
3656
+ /**
3657
+ * Create a catalog product. `type` (serial or bulk) is required and immutable. `attribute_values` upserts the product's category-attribute values.
3658
+ */
3659
+ export const zAssetsProductParameters = z.object({
3660
+ type: z.enum(['serial', 'bulk']),
3661
+ name: z.string(),
3662
+ description: z.string().nullish(),
3663
+ assets_category_id: z.string().nullish(),
3664
+ upc: z.string().nullish(),
3665
+ internal_sku: z.string().nullish(),
3666
+ default_minimum_quantity: z.int().nullish(),
3667
+ make: z.string().nullish(),
3668
+ model: z.string().nullish(),
3669
+ counted_by: z.enum([
3670
+ 'each',
3671
+ 'pair',
3672
+ 'pack'
3673
+ ]).optional(),
3674
+ attribute_values: z.array(z.object({
3675
+ assets_attribute_id: z.string(),
3676
+ value: z.string().nullish(),
3677
+ assets_attribute_option_id: z.string().nullish()
3678
+ })).optional(),
3679
+ images_attributes: z.array(zAssetsAttachmentParameters).optional(),
3680
+ performed_by_user_id: z.string()
3681
+ });
3682
+ /**
3683
+ * 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.
3684
+ */
3685
+ export const zAssetsProductUpdateParameters = z.object({
3686
+ name: z.string().optional(),
3687
+ description: z.string().nullish(),
3688
+ assets_category_id: z.string().nullish(),
3689
+ upc: z.string().nullish(),
3690
+ internal_sku: z.string().nullish(),
3691
+ default_minimum_quantity: z.int().nullish(),
3692
+ make: z.string().nullish(),
3693
+ model: z.string().nullish(),
3694
+ counted_by: z.enum([
3695
+ 'each',
3696
+ 'pair',
3697
+ 'pack'
3698
+ ]).optional(),
3699
+ attribute_values: z.array(z.object({
3700
+ assets_attribute_id: z.string(),
3701
+ value: z.string().nullish(),
3702
+ assets_attribute_option_id: z.string().nullish()
3703
+ })).optional(),
3704
+ images_attributes: z.array(zAssetsAttachmentParameters).optional()
3705
+ });
3706
+ /**
3707
+ * Create or update an asset item. The write API creates serial items only; assets_product_id and serial_number are set on create and ignored on update. On create you may also place the item — assets_site_id to stock it at a site, or user_id to assign it to a user (the two are mutually exclusive). performed_by_user_id is required.
3708
+ */
3709
+ export const zAssetsItemParameters = z.object({
3710
+ name: z.string(),
3711
+ description: z.string().optional(),
3712
+ assets_product_id: z.string(),
3713
+ serial_number: z.string(),
3714
+ status: z.enum([
3715
+ 'available',
3716
+ 'assigned',
3717
+ 'retired'
3718
+ ]).optional(),
3719
+ purchase_date: z.iso.datetime().optional(),
3720
+ purchase_price_cents: z.int().optional(),
3721
+ external_id: z.string().optional(),
3722
+ external_system_url: z.string().optional(),
3723
+ images_attributes: z.array(zAssetsAttachmentParameters).optional(),
3724
+ assets_site_id: z.string().optional(),
3725
+ user_id: z.string().optional(),
3726
+ performed_by_user_id: z.string()
3727
+ });
3349
3728
  /**
3350
3729
  * 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.
3351
3730
  */
3352
3731
  export const zAssetsDocumentResponseObject = z.object({
3353
3732
  id: z.string(),
3354
- item_id: z.string(),
3733
+ assets_item_id: z.string(),
3355
3734
  name: z.string(),
3356
3735
  filename: z.string().nullable(),
3357
3736
  description: z.string().nullable(),
3358
3737
  certified: z.boolean(),
3359
3738
  created_by_user_id: z.string(),
3360
3739
  file: z.object({
3361
- signed_id: z.string(),
3362
3740
  filename: z.string(),
3363
3741
  content_type: z.string().nullish(),
3364
- byte_size: z.int()
3742
+ byte_size: z.int(),
3743
+ url: z.string()
3365
3744
  }).nullable(),
3366
3745
  created_at: z.iso.datetime(),
3367
3746
  updated_at: z.iso.datetime()
@@ -3393,7 +3772,7 @@ export const zAssetsDocumentVersionResponseObject = z.object({
3393
3772
  */
3394
3773
  export const zAssetsItemFormAssignmentResponseObject = z.object({
3395
3774
  id: z.string(),
3396
- item_id: z.string(),
3775
+ assets_item_id: z.string(),
3397
3776
  form_definition_id: z.string(),
3398
3777
  name: z.string(),
3399
3778
  description: z.string().nullable(),
@@ -3416,11 +3795,11 @@ export const zAssetsItemFormAssignmentResponseObject = z.object({
3416
3795
  }))
3417
3796
  });
3418
3797
  /**
3419
- * Create or update an item form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400). is_recurring gates the recurrence fields.
3798
+ * Create or update an item form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400). recurring gates the recurrence fields.
3420
3799
  */
3421
3800
  export const zAssetsItemFormAssignmentParameters = z.object({
3422
3801
  form_definition_id: z.string(),
3423
- is_recurring: z.boolean().optional(),
3802
+ recurring: z.boolean().optional(),
3424
3803
  task_attributes: z.object({
3425
3804
  name: z.string().nullish(),
3426
3805
  description: z.string().nullish(),
@@ -3449,7 +3828,7 @@ export const zAssetsItemFormAssignmentParameters = z.object({
3449
3828
  */
3450
3829
  export const zAssetsInventoryResponseObject = z.object({
3451
3830
  id: z.string(),
3452
- item_id: z.string(),
3831
+ assets_item_id: z.string(),
3453
3832
  assets_site_id: z.string(),
3454
3833
  company_id: z.string(),
3455
3834
  quantity_on_hand: z.int(),
@@ -3461,7 +3840,7 @@ export const zAssetsInventoryResponseObject = z.object({
3461
3840
  */
3462
3841
  export const zAssetsCustodyResponseObject = z.object({
3463
3842
  id: z.string(),
3464
- item_id: z.string(),
3843
+ assets_item_id: z.string(),
3465
3844
  user_id: z.string(),
3466
3845
  company_id: z.string(),
3467
3846
  quantity: z.int(),
@@ -3473,7 +3852,7 @@ export const zAssetsCustodyResponseObject = z.object({
3473
3852
  */
3474
3853
  export const zAssetsTransactionEventResponseObject = z.object({
3475
3854
  id: z.string(),
3476
- item_id: z.string(),
3855
+ assets_item_id: z.string(),
3477
3856
  company_id: z.string(),
3478
3857
  event_type: z.enum(['Assets::Transaction']),
3479
3858
  performed_at: z.iso.datetime(),
@@ -3499,7 +3878,7 @@ export const zAssetsTransactionEventResponseObject = z.object({
3499
3878
  */
3500
3879
  export const zAssetsServiceEventResponseObject = z.object({
3501
3880
  id: z.string(),
3502
- item_id: z.string(),
3881
+ assets_item_id: z.string(),
3503
3882
  company_id: z.string(),
3504
3883
  event_type: z.enum(['Assets::ServiceEvent']),
3505
3884
  performed_at: z.iso.datetime(),
@@ -3529,7 +3908,7 @@ export const zAssetsItemEventResponseObject = z.discriminatedUnion('event_type',
3529
3908
  */
3530
3909
  export const zAssetsServiceScheduleResponseObject = z.object({
3531
3910
  id: z.string(),
3532
- item_id: z.string(),
3911
+ assets_item_id: z.string(),
3533
3912
  company_id: z.string(),
3534
3913
  assets_service_schedule_template_id: z.string().nullable(),
3535
3914
  kind: z.enum(['calibration', 'maintenance']),
@@ -3567,7 +3946,7 @@ export const zAssetsServiceScheduleParameters = z.object({
3567
3946
  */
3568
3947
  export const zAssetsServiceEventFullResponseObject = z.object({
3569
3948
  id: z.string(),
3570
- item_id: z.string(),
3949
+ assets_item_id: z.string(),
3571
3950
  company_id: z.string(),
3572
3951
  assets_service_schedule_id: z.string().nullable(),
3573
3952
  performed_by_user_id: z.string(),
@@ -3578,27 +3957,24 @@ export const zAssetsServiceEventFullResponseObject = z.object({
3578
3957
  ]),
3579
3958
  notes: z.string().nullable(),
3580
3959
  performed_at: z.iso.datetime(),
3960
+ attachments: z.array(zAssetsAttachmentResponseObject),
3581
3961
  created_at: z.iso.datetime(),
3582
3962
  updated_at: z.iso.datetime()
3583
3963
  });
3584
3964
  /**
3585
- * Record a service on an item. kind, performed_on, and performed_by_user_id are required. Link a schedule with assets_service_schedule_id to satisfy it — the schedule then dictates the kind or omit it for an ad-hoc service or a repair.
3965
+ * Record a service on an item. performed_on and performed_by_user_id are required. When a schedule is linked with assets_service_schedule_id, the schedule dictates the kind; otherwise provide kind for the ad-hoc service or repair.
3586
3966
  */
3587
3967
  export const zAssetsServiceEventParameters = z.object({
3588
3968
  kind: z.enum([
3589
3969
  'calibration',
3590
3970
  'maintenance',
3591
3971
  'repair'
3592
- ]),
3972
+ ]).optional(),
3593
3973
  notes: z.string().nullish(),
3594
3974
  performed_on: z.iso.date(),
3595
3975
  assets_service_schedule_id: z.string().nullish(),
3596
3976
  performed_by_user_id: z.string(),
3597
- attachments_attributes: z.array(z.object({
3598
- id: z.string().optional(),
3599
- file: z.string().optional(),
3600
- _destroy: z.boolean().optional()
3601
- })).optional()
3977
+ attachments_attributes: z.array(zAssetsAttachmentParameters).optional()
3602
3978
  });
3603
3979
  /**
3604
3980
  * 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.
@@ -3654,7 +4030,7 @@ export const zAssetsTransferResponseObject = z.object({
3654
4030
  completed_at: z.iso.datetime().nullable(),
3655
4031
  transfer_lines: z.array(z.object({
3656
4032
  id: z.string(),
3657
- item_id: z.string(),
4033
+ assets_item_id: z.string(),
3658
4034
  quantity: z.int()
3659
4035
  })),
3660
4036
  created_at: z.iso.datetime(),
@@ -3670,7 +4046,7 @@ export const zAssetsTransferParameters = z.object({
3670
4046
  to_user_id: z.string().optional(),
3671
4047
  performed_by_user_id: z.string(),
3672
4048
  line_items: z.array(z.object({
3673
- item_id: z.string(),
4049
+ assets_item_id: z.string(),
3674
4050
  quantity: z.int().gte(1)
3675
4051
  }))
3676
4052
  });
@@ -3696,6 +4072,12 @@ export const zAssetsAdjustmentParameters = z.object({
3696
4072
  export const zAssetsRetirementParameters = z.object({
3697
4073
  performed_by_user_id: z.string()
3698
4074
  });
4075
+ /**
4076
+ * Success
4077
+ */
4078
+ export const zListApiKeyScopesResponse = z.object({
4079
+ data: z.array(zApiKeyScopeResponseObject).optional()
4080
+ });
3699
4081
  export const zListApprenticesPath = z.object({
3700
4082
  program_id: z.string()
3701
4083
  });
@@ -4018,7 +4400,7 @@ export const zUpdateCategoryPath = z.object({
4018
4400
  */
4019
4401
  export const zUpdateCategoryResponse = zAssetsCategoryResponseObject;
4020
4402
  export const zListCustodiesQuery = z.object({
4021
- 'filter[item_id]': z.string().optional(),
4403
+ 'filter[assets_item_id]': z.string().optional(),
4022
4404
  'filter[user_id]': z.string().optional(),
4023
4405
  filter: z.string().optional(),
4024
4406
  'filter[unexpected]': z.string().optional()
@@ -4039,7 +4421,7 @@ export const zGetCustodyPath = z.object({
4039
4421
  */
4040
4422
  export const zGetCustodyResponse = zAssetsCustodyResponseObject;
4041
4423
  export const zListEventsQuery = z.object({
4042
- 'filter[item_id]': z.string().optional(),
4424
+ 'filter[assets_item_id]': z.string().optional(),
4043
4425
  'filter[eventable_type]': z.string().optional(),
4044
4426
  filter: z.string().optional(),
4045
4427
  'filter[unexpected]': z.string().optional()
@@ -4103,7 +4485,7 @@ export const zUpdateFormAssignmentTriggerPath = z.object({
4103
4485
  */
4104
4486
  export const zUpdateFormAssignmentTriggerResponse = zAssetsFormAssignmentTriggerResponseObject;
4105
4487
  export const zListInventoriesQuery = z.object({
4106
- 'filter[item_id]': z.string().optional(),
4488
+ 'filter[assets_item_id]': z.string().optional(),
4107
4489
  'filter[assets_site_id]': z.string().optional(),
4108
4490
  filter: z.string().optional(),
4109
4491
  'filter[unexpected]': z.string().optional()
@@ -4139,7 +4521,7 @@ export const zListItemsResponse = z.object({
4139
4521
  });
4140
4522
  export const zCreateItemBody = zAssetsItemParameters;
4141
4523
  /**
4142
- * Created with placement at site
4524
+ * Created with an image
4143
4525
  */
4144
4526
  export const zCreateItemResponse = zAssetsItemResponseObject;
4145
4527
  export const zDeleteItemPath = z.object({
@@ -4161,7 +4543,7 @@ export const zUpdateItemPath = z.object({
4161
4543
  id: z.string()
4162
4544
  });
4163
4545
  /**
4164
- * Success
4546
+ * Removes an image
4165
4547
  */
4166
4548
  export const zUpdateItemResponse = zAssetsItemResponseObject;
4167
4549
  export const zUnretireItemPath = z.object({
@@ -4396,7 +4778,7 @@ export const zListVersionsResponse = z.object({
4396
4778
  data: z.array(zAssetsDocumentVersionResponseObject).optional()
4397
4779
  });
4398
4780
  export const zListProductsQuery = z.object({
4399
- 'filter[category_id]': z.string().optional(),
4781
+ 'filter[assets_category_id]': z.string().optional(),
4400
4782
  'filter[created_at][gte]': z.iso.datetime().optional(),
4401
4783
  'filter[created_at][lte]': z.iso.datetime().optional(),
4402
4784
  'filter[updated_at][gte]': z.iso.datetime().optional(),
@@ -4417,7 +4799,7 @@ export const zListProductsResponse = z.object({
4417
4799
  });
4418
4800
  export const zCreateProductBody = zAssetsProductParameters;
4419
4801
  /**
4420
- * Created (with category and attribute values)
4802
+ * Created (with an image)
4421
4803
  */
4422
4804
  export const zCreateProductResponse = zAssetsProductResponseObject;
4423
4805
  export const zDeleteProductPath = z.object({
@@ -4434,7 +4816,7 @@ export const zGetProductPath = z.object({
4434
4816
  * Success
4435
4817
  */
4436
4818
  export const zGetProductResponse = zAssetsProductResponseObject;
4437
- export const zUpdateProductBody = zAssetsProductParameters;
4819
+ export const zUpdateProductBody = zAssetsProductUpdateParameters;
4438
4820
  export const zUpdateProductPath = z.object({
4439
4821
  id: z.string()
4440
4822
  });
@@ -4511,7 +4893,7 @@ export const zUpdateServiceScheduleTemplatePath = z.object({
4511
4893
  */
4512
4894
  export const zUpdateServiceScheduleTemplateResponse = zAssetsServiceScheduleTemplateResponseObject;
4513
4895
  export const zSeedServiceScheduleTemplateBody = z.object({
4514
- item_ids: z.array(z.string()).optional(),
4896
+ assets_item_ids: z.array(z.string()).optional(),
4515
4897
  performed_by_user_id: z.string()
4516
4898
  });
4517
4899
  export const zSeedServiceScheduleTemplatePath = z.object({
@@ -4628,7 +5010,7 @@ export const zListVendorsResponse = z.object({
4628
5010
  });
4629
5011
  export const zCreateVendorBody = zAssetsVendorParameters;
4630
5012
  /**
4631
- * Created
5013
+ * Created with a logo
4632
5014
  */
4633
5015
  export const zCreateVendorResponse = zAssetsVendorResponseObject;
4634
5016
  export const zDeleteVendorPath = z.object({
@@ -4650,7 +5032,7 @@ export const zUpdateVendorPath = z.object({
4650
5032
  id: z.string()
4651
5033
  });
4652
5034
  /**
4653
- * Success
5035
+ * Updated with a logo
4654
5036
  */
4655
5037
  export const zUpdateVendorResponse = zAssetsVendorResponseObject;
4656
5038
  export const zListFeaturesQuery = z.object({
@@ -4909,14 +5291,21 @@ export const zGetCompanyPath = z.object({
4909
5291
  * Success
4910
5292
  */
4911
5293
  export const zGetCompanyResponse = zCompanyResponseObject;
5294
+ export const zUpdateCompanyProfileBody = zCompanyParameters;
5295
+ export const zUpdateCompanyProfilePath = z.object({
5296
+ id: z.string()
5297
+ });
5298
+ /**
5299
+ * Success
5300
+ */
5301
+ export const zUpdateCompanyProfileResponse = zCompanyResponseObject;
4912
5302
  export const zListChecksQuery = z.object({
4913
5303
  'filter[status]': z.enum([
4914
5304
  'passed',
4915
5305
  'failed',
4916
5306
  'not_applicable',
4917
5307
  'dismissed',
4918
- 'pending',
4919
- 'error'
5308
+ 'pending'
4920
5309
  ]).optional(),
4921
5310
  'filter[type]': z.string().optional(),
4922
5311
  'filter[job_id]': z.string().optional(),
@@ -5178,9 +5567,25 @@ export const zCreateJobTradePath = z.object({
5178
5567
  * Created
5179
5568
  */
5180
5569
  export const zCreateJobTradeResponse = zPwaTradeResponseObject;
5570
+ export const zListRateRuleHistoryPath = z.object({
5571
+ job_id: z.string(),
5572
+ wage_determination_uid: z.string(),
5573
+ rate_rule_uid: z.string()
5574
+ });
5575
+ export const zListRateRuleHistoryQuery = z.object({
5576
+ 'as_of[valid]': z.string().optional()
5577
+ });
5578
+ /**
5579
+ * Success
5580
+ */
5581
+ export const zListRateRuleHistoryResponse = z.object({
5582
+ meta: zMeta.optional(),
5583
+ links: zLinks.optional(),
5584
+ data: z.array(zRateRuleHistoryVersionObject).optional()
5585
+ });
5181
5586
  export const zListRateRulesPath = z.object({
5182
5587
  job_id: z.string(),
5183
- wage_determination_id: z.string()
5588
+ wage_determination_uid: z.string()
5184
5589
  });
5185
5590
  export const zListRateRulesQuery = z.object({
5186
5591
  'as_of[valid]': z.iso.datetime().optional(),
@@ -5200,7 +5605,7 @@ export const zListRateRulesResponse = z.object({
5200
5605
  export const zCreateRateRuleBody = zRateRuleParameters;
5201
5606
  export const zCreateRateRulePath = z.object({
5202
5607
  job_id: z.string(),
5203
- wage_determination_id: z.string()
5608
+ wage_determination_uid: z.string()
5204
5609
  });
5205
5610
  /**
5206
5611
  * Created
@@ -5208,13 +5613,31 @@ export const zCreateRateRulePath = z.object({
5208
5613
  export const zCreateRateRuleResponse = zRateRuleResponseObject;
5209
5614
  export const zGetRateRulePath = z.object({
5210
5615
  job_id: z.string(),
5211
- wage_determination_id: z.string(),
5212
- id: z.string()
5616
+ wage_determination_uid: z.string(),
5617
+ uid: z.string()
5618
+ });
5619
+ export const zGetRateRuleQuery = z.object({
5620
+ 'as_of[valid]': z.iso.datetime().optional()
5213
5621
  });
5214
5622
  /**
5215
5623
  * Success
5216
5624
  */
5217
5625
  export const zGetRateRuleResponse = zRateRuleResponseObject;
5626
+ export const zListJobWageDeterminationHistoryPath = z.object({
5627
+ job_id: z.string(),
5628
+ wage_determination_uid: z.string()
5629
+ });
5630
+ export const zListJobWageDeterminationHistoryQuery = z.object({
5631
+ 'as_of[valid]': z.string().optional()
5632
+ });
5633
+ /**
5634
+ * Success
5635
+ */
5636
+ export const zListJobWageDeterminationHistoryResponse = z.object({
5637
+ meta: zMeta.optional(),
5638
+ links: zLinks.optional(),
5639
+ data: z.array(zJobWageDeterminationHistoryVersionObject).optional()
5640
+ });
5218
5641
  export const zListJobWageDeterminationsPath = z.object({
5219
5642
  job_id: z.string()
5220
5643
  });
@@ -5243,7 +5666,7 @@ export const zCreateWageDeterminationPath = z.object({
5243
5666
  export const zCreateWageDeterminationResponse = zJobWageDeterminationResponseObject;
5244
5667
  export const zDeleteWageDeterminationPath = z.object({
5245
5668
  job_id: z.string(),
5246
- id: z.string()
5669
+ uid: z.string()
5247
5670
  });
5248
5671
  /**
5249
5672
  * Success
@@ -5251,7 +5674,10 @@ export const zDeleteWageDeterminationPath = z.object({
5251
5674
  export const zDeleteWageDeterminationResponse = zJobWageDeterminationResponseObject;
5252
5675
  export const zGetJobWageDeterminationPath = z.object({
5253
5676
  job_id: z.string(),
5254
- id: z.string()
5677
+ uid: z.string()
5678
+ });
5679
+ export const zGetJobWageDeterminationQuery = z.object({
5680
+ 'as_of[valid]': z.iso.datetime().optional()
5255
5681
  });
5256
5682
  /**
5257
5683
  * Success
@@ -5299,6 +5725,39 @@ export const zUpdateJobPath = z.object({
5299
5725
  * Success
5300
5726
  */
5301
5727
  export const zUpdateJobResponse = zJobResponseObject;
5728
+ export const zListSiteCheckInsPath = z.object({
5729
+ site_id: z.string()
5730
+ });
5731
+ export const zListSiteCheckInsQuery = z.object({
5732
+ 'filter[user_id]': z.string().optional(),
5733
+ 'filter[created_at][gte]': z.iso.datetime().optional(),
5734
+ 'filter[created_at][lte]': z.iso.datetime().optional(),
5735
+ 'filter[updated_at][gte]': z.iso.datetime().optional(),
5736
+ 'filter[updated_at][lte]': z.iso.datetime().optional(),
5737
+ 'filter[start_time][gte]': z.iso.datetime().optional(),
5738
+ 'filter[start_time][lte]': z.iso.datetime().optional(),
5739
+ filter: z.string().optional(),
5740
+ 'filter[unexpected]': z.string().optional(),
5741
+ 'page[cursor]': z.string().optional(),
5742
+ 'page[limit]': z.int().gte(1).optional().default(20),
5743
+ page: z.string().optional()
5744
+ });
5745
+ /**
5746
+ * Success
5747
+ */
5748
+ export const zListSiteCheckInsResponse = z.object({
5749
+ meta: zMeta,
5750
+ links: zLinks,
5751
+ data: z.array(zSiteCheckInResponseObject)
5752
+ });
5753
+ export const zGetSiteCheckInPath = z.object({
5754
+ site_id: z.string(),
5755
+ id: z.string()
5756
+ });
5757
+ /**
5758
+ * Success
5759
+ */
5760
+ export const zGetSiteCheckInResponse = zSiteCheckInResponseObject;
5302
5761
  export const zListPayPeriodsQuery = z.object({
5303
5762
  'filter[start_time][gte]': z.iso.datetime().optional(),
5304
5763
  'filter[start_time][lte]': z.iso.datetime().optional(),
@@ -5327,6 +5786,21 @@ export const zGetCompensationElementPath = z.object({
5327
5786
  * Success
5328
5787
  */
5329
5788
  export const zGetCompensationElementResponse = zCompensationElementResponseObject;
5789
+ export const zListExternalMapHistoryPath = z.object({
5790
+ external_map_id: z.string()
5791
+ });
5792
+ export const zListExternalMapHistoryQuery = z.object({
5793
+ 'as_of[transaction]': z.iso.datetime().optional(),
5794
+ 'as_of[valid]': z.string().optional()
5795
+ });
5796
+ /**
5797
+ * Success
5798
+ */
5799
+ export const zListExternalMapHistoryResponse = z.object({
5800
+ meta: zMeta.optional(),
5801
+ links: zLinks.optional(),
5802
+ data: z.array(zPayrollExternalMapHistoryVersionObject).optional()
5803
+ });
5330
5804
  export const zListExternalMapsQuery = z.object({
5331
5805
  'filter[name]': z.string().optional(),
5332
5806
  'filter[pay_period_config_uid]': z.string().optional(),
@@ -5353,6 +5827,10 @@ export const zListExternalMapsResponse = z.object({
5353
5827
  export const zGetExternalMapPath = z.object({
5354
5828
  id: z.string()
5355
5829
  });
5830
+ export const zGetExternalMapQuery = z.object({
5831
+ 'as_of[valid]': z.iso.datetime().optional(),
5832
+ 'as_of[transaction]': z.iso.datetime().optional()
5833
+ });
5356
5834
  /**
5357
5835
  * Success
5358
5836
  */
@@ -5528,7 +6006,7 @@ export const zUpdatePaystubPath = z.object({
5528
6006
  */
5529
6007
  export const zUpdatePaystubResponse = zPaystubResponseObject;
5530
6008
  export const zListPerDiemsQuery = z.object({
5531
- 'filter[is_default]': z.boolean().optional(),
6009
+ 'filter[default]': z.boolean().optional(),
5532
6010
  'filter[taxable]': z.boolean().optional(),
5533
6011
  'filter[created_at][gte]': z.iso.datetime().optional(),
5534
6012
  'filter[created_at][lte]': z.iso.datetime().optional(),
@@ -5776,7 +6254,7 @@ export const zGetTradeResponse = zPwaTradeResponseObject;
5776
6254
  export const zCreateFormAssignmentTaskBody = z.object({
5777
6255
  form_definition_id: z.string(),
5778
6256
  spread_assignees: z.boolean().optional(),
5779
- is_recurring: z.boolean().optional(),
6257
+ recurring: z.boolean().optional(),
5780
6258
  task_attributes: z.object({
5781
6259
  name: z.string(),
5782
6260
  description: z.string().optional(),
@@ -6016,6 +6494,21 @@ export const zUpdateTimeEntryPath = z.object({
6016
6494
  * Success
6017
6495
  */
6018
6496
  export const zUpdateTimeEntryResponse = zTimeEntryResponseObject;
6497
+ export const zListTimecodeHistoryPath = z.object({
6498
+ timecode_id: z.string()
6499
+ });
6500
+ export const zListTimecodeHistoryQuery = z.object({
6501
+ 'as_of[transaction]': z.iso.datetime().optional(),
6502
+ 'as_of[valid]': z.string().optional()
6503
+ });
6504
+ /**
6505
+ * Success
6506
+ */
6507
+ export const zListTimecodeHistoryResponse = z.object({
6508
+ meta: zMeta.optional(),
6509
+ links: zLinks.optional(),
6510
+ data: z.array(zTimecodeHistoryVersionObject).optional()
6511
+ });
6019
6512
  export const zCancelTimecodeScheduledChangesPath = z.object({
6020
6513
  timecode_id: z.string()
6021
6514
  });
@@ -6085,6 +6578,10 @@ export const zTerminateTimecodeResponse = zTimecodeResponseObject;
6085
6578
  export const zGetTimecodePath = z.object({
6086
6579
  id: z.string()
6087
6580
  });
6581
+ export const zGetTimecodeQuery = z.object({
6582
+ 'as_of[valid]': z.iso.datetime().optional(),
6583
+ 'as_of[transaction]': z.iso.datetime().optional()
6584
+ });
6088
6585
  /**
6089
6586
  * Success
6090
6587
  */
@@ -6167,6 +6664,20 @@ export const zGetAttestationConfigPath = z.object({
6167
6664
  * Success
6168
6665
  */
6169
6666
  export const zGetAttestationConfigResponse = zAttestationConfigResponseObject;
6667
+ export const zListPayPeriodConfigHistoryPath = z.object({
6668
+ pay_period_config_uid: z.string()
6669
+ });
6670
+ export const zListPayPeriodConfigHistoryQuery = z.object({
6671
+ 'as_of[valid]': z.string().optional()
6672
+ });
6673
+ /**
6674
+ * Success
6675
+ */
6676
+ export const zListPayPeriodConfigHistoryResponse = z.object({
6677
+ meta: zMeta.optional(),
6678
+ links: zLinks.optional(),
6679
+ data: z.array(zPayPeriodConfigHistoryVersionObject).optional()
6680
+ });
6170
6681
  export const zListHolidaysPath = z.object({
6171
6682
  pay_period_config_uid: z.string()
6172
6683
  });
@@ -6237,6 +6748,9 @@ export const zListPayPeriodConfigsResponse = z.object({
6237
6748
  export const zGetPayPeriodConfigPath = z.object({
6238
6749
  uid: z.string()
6239
6750
  });
6751
+ export const zGetPayPeriodConfigQuery = z.object({
6752
+ 'as_of[valid]': z.iso.datetime().optional()
6753
+ });
6240
6754
  /**
6241
6755
  * Success
6242
6756
  */