@dsptch-work/api-client 0.37.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +193 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +109 -12
- package/dist/gen/sdk.gen.js +146 -11
- package/dist/gen/types.gen.d.ts +346 -112
- package/dist/gen/zod.gen.d.ts +272 -146
- package/dist/gen/zod.gen.js +132 -58
- package/package.json +1 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -262,7 +262,7 @@ export const zProblem = z.object({
|
|
|
262
262
|
*
|
|
263
263
|
* **Unparseable Date Value**
|
|
264
264
|
*
|
|
265
|
-
* A date-time value cannot be parsed,
|
|
265
|
+
* A date or date-time value cannot be parsed, names a day that does not exist, falls outside the storable range, or has no UTC offset where one is required. Send a day as `2026-08-05` and an instant with its offset (`2026-08-05T14:30:00-04:00` or `2026-08-05T18:30:00Z`). The times of time entries and apprenticeship allocations, a compliance check's due time, a timecode correction's bounds, timestamp filter bounds, and `as_of[]` coordinates need the offset; a time sent without one is refused with the value to send.
|
|
266
266
|
*
|
|
267
267
|
* ### invalid_filter_value
|
|
268
268
|
*
|
|
@@ -930,7 +930,7 @@ export const zApprenticeshipAllocationCreateParameters = z.object({
|
|
|
930
930
|
apprenticeship_work_process_category_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
931
931
|
minutes: z.int(),
|
|
932
932
|
description: z.string().nullish(),
|
|
933
|
-
allocated_at: z.
|
|
933
|
+
allocated_at: z.iso.datetime().optional()
|
|
934
934
|
});
|
|
935
935
|
/**
|
|
936
936
|
* Correct an existing allocation's hours, work process category, description, or (for a standalone allocation) effective timestamp. The time card an allocation is linked to cannot be changed after creation. Any change that shifts progression rebuilds it and requests historical wage repricing in the background, including locked time cards.
|
|
@@ -939,7 +939,7 @@ export const zApprenticeshipAllocationUpdateParameters = z.object({
|
|
|
939
939
|
apprenticeship_work_process_category_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
940
940
|
minutes: z.int().optional(),
|
|
941
941
|
description: z.string().nullish(),
|
|
942
|
-
allocated_at: z.
|
|
942
|
+
allocated_at: z.iso.datetime().optional()
|
|
943
943
|
});
|
|
944
944
|
/**
|
|
945
945
|
* Enroll a user as an apprentice under an employer in a program; the employing program-employer record is derived from the enrolling company and the program in the URL path. Apprentices cannot be updated through the API, only created. Omitting a required field answers 400; a null for a non-nullable field, a blank ID, a wrong JSON type, an unlisted status, or a date that is not a YYYY-MM-DD calendar date answers 422.
|
|
@@ -1095,7 +1095,7 @@ export const zApprenticeshipWageScheduleParameters = z.object({
|
|
|
1095
1095
|
journeyworker_fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1096
1096
|
end_wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1097
1097
|
periods_attributes: z.array(z.object({
|
|
1098
|
-
id: z.string().optional(),
|
|
1098
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1099
1099
|
period_number: z.int().gte(0).optional(),
|
|
1100
1100
|
min_minutes: z.int().gte(0).nullish(),
|
|
1101
1101
|
max_minutes: z.int().gte(0).nullish(),
|
|
@@ -1142,7 +1142,7 @@ export const zApprenticeshipWageScheduleUpdateParameters = z.object({
|
|
|
1142
1142
|
journeyworker_fringe_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
1143
1143
|
end_wage_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
1144
1144
|
periods_attributes: z.array(z.object({
|
|
1145
|
-
id: z.string().optional(),
|
|
1145
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1146
1146
|
period_number: z.int().gte(0).optional(),
|
|
1147
1147
|
min_minutes: z.int().gte(0).nullish(),
|
|
1148
1148
|
max_minutes: z.int().gte(0).nullish(),
|
|
@@ -1443,7 +1443,7 @@ export const zTimecodeHistoryVersionObject = z.object({
|
|
|
1443
1443
|
* 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.
|
|
1444
1444
|
*/
|
|
1445
1445
|
export const zTimecodeParameters = z.object({
|
|
1446
|
-
effective_date: z.
|
|
1446
|
+
effective_date: z.iso.date().optional(),
|
|
1447
1447
|
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
1448
1448
|
description: z.string().nullish(),
|
|
1449
1449
|
description_is_required: z.boolean().optional(),
|
|
@@ -1469,8 +1469,8 @@ export const zTimecodeParameters = z.object({
|
|
|
1469
1469
|
* 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.
|
|
1470
1470
|
*/
|
|
1471
1471
|
export const zTimecodeCorrectionParameters = z.object({
|
|
1472
|
-
effective_from: z.
|
|
1473
|
-
effective_to: z.
|
|
1472
|
+
effective_from: z.iso.datetime().optional(),
|
|
1473
|
+
effective_to: z.iso.datetime().optional(),
|
|
1474
1474
|
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1475
1475
|
description: z.string().nullish(),
|
|
1476
1476
|
description_is_required: z.boolean().optional(),
|
|
@@ -1496,7 +1496,7 @@ export const zTimecodeCorrectionParameters = z.object({
|
|
|
1496
1496
|
* 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.
|
|
1497
1497
|
*/
|
|
1498
1498
|
export const zTimecodeGenesisParameters = z.object({
|
|
1499
|
-
effective_date: z.
|
|
1499
|
+
effective_date: z.iso.date()
|
|
1500
1500
|
});
|
|
1501
1501
|
/**
|
|
1502
1502
|
* 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`.
|
|
@@ -1508,7 +1508,7 @@ export const zTimecodeScheduledTerminationParameters = z.object({
|
|
|
1508
1508
|
* 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.
|
|
1509
1509
|
*/
|
|
1510
1510
|
export const zTimecodeScheduledChangeParameters = z.object({
|
|
1511
|
-
effective_date: z.
|
|
1511
|
+
effective_date: z.iso.date(),
|
|
1512
1512
|
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1513
1513
|
description: z.string().nullish(),
|
|
1514
1514
|
description_is_required: z.boolean().optional(),
|
|
@@ -1554,7 +1554,7 @@ export const zAssetsProductParameters = z.object({
|
|
|
1554
1554
|
assets_attribute_option_id: z.string().nullish()
|
|
1555
1555
|
})).optional(),
|
|
1556
1556
|
images_attributes: z.array(z.object({
|
|
1557
|
-
id: z.string().optional(),
|
|
1557
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1558
1558
|
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1559
1559
|
_destroy: z.boolean().optional()
|
|
1560
1560
|
})).optional(),
|
|
@@ -1585,7 +1585,7 @@ export const zAssetsProductUpdateParameters = z.object({
|
|
|
1585
1585
|
assets_attribute_option_id: z.string().nullish()
|
|
1586
1586
|
})).optional(),
|
|
1587
1587
|
images_attributes: z.array(z.object({
|
|
1588
|
-
id: z.string().optional(),
|
|
1588
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1589
1589
|
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1590
1590
|
_destroy: z.boolean().optional()
|
|
1591
1591
|
})).optional()
|
|
@@ -1678,7 +1678,7 @@ export const zAssetsAttributeParameters = z.object({
|
|
|
1678
1678
|
'select'
|
|
1679
1679
|
]),
|
|
1680
1680
|
options: z.array(z.object({
|
|
1681
|
-
id: z.string().optional(),
|
|
1681
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1682
1682
|
value: z.string().optional(),
|
|
1683
1683
|
position: z.int().optional(),
|
|
1684
1684
|
_destroy: z.boolean().optional()
|
|
@@ -1697,7 +1697,7 @@ export const zAssetsAttributeUpdateParameters = z.object({
|
|
|
1697
1697
|
'select'
|
|
1698
1698
|
]).optional(),
|
|
1699
1699
|
options: z.array(z.object({
|
|
1700
|
-
id: z.string().optional(),
|
|
1700
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1701
1701
|
value: z.string().optional(),
|
|
1702
1702
|
position: z.int().optional(),
|
|
1703
1703
|
_destroy: z.boolean().optional()
|
|
@@ -1729,7 +1729,7 @@ export const zAssetsCategoryParameters = z.object({
|
|
|
1729
1729
|
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
1730
1730
|
parent_id: z.string().nullish(),
|
|
1731
1731
|
category_attributes: z.array(z.object({
|
|
1732
|
-
id: z.string().optional(),
|
|
1732
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1733
1733
|
assets_attribute_id: z.string().optional(),
|
|
1734
1734
|
fillable_on: z.enum(['product', 'item']).optional(),
|
|
1735
1735
|
required: z.boolean().optional(),
|
|
@@ -1744,7 +1744,7 @@ export const zAssetsCategoryUpdateParameters = z.object({
|
|
|
1744
1744
|
name: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1745
1745
|
parent_id: z.string().nullish(),
|
|
1746
1746
|
category_attributes: z.array(z.object({
|
|
1747
|
-
id: z.string().optional(),
|
|
1747
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
1748
1748
|
assets_attribute_id: z.string().optional(),
|
|
1749
1749
|
fillable_on: z.enum(['product', 'item']).optional(),
|
|
1750
1750
|
required: z.boolean().optional(),
|
|
@@ -1786,8 +1786,8 @@ export const zTimeCardPerDiemResponseObject = z.object({
|
|
|
1786
1786
|
date: z.iso.date(),
|
|
1787
1787
|
approver_user_id: z.string(),
|
|
1788
1788
|
per_diem_id: z.string().nullable(),
|
|
1789
|
-
per_diem_rate_cents: z.string().
|
|
1790
|
-
per_diem_currency: z.string().
|
|
1789
|
+
per_diem_rate_cents: z.string().nullish(),
|
|
1790
|
+
per_diem_currency: z.string().nullish(),
|
|
1791
1791
|
taxable: z.boolean(),
|
|
1792
1792
|
created_at: z.iso.datetime(),
|
|
1793
1793
|
updated_at: z.iso.datetime()
|
|
@@ -2416,8 +2416,8 @@ export const zJobCreateParameters = z.object({
|
|
|
2416
2416
|
'none'
|
|
2417
2417
|
]).optional(),
|
|
2418
2418
|
region: z.string().nullish(),
|
|
2419
|
-
start_time: z.
|
|
2420
|
-
end_time: z.
|
|
2419
|
+
start_time: z.iso.date().nullish(),
|
|
2420
|
+
end_time: z.iso.date().nullish(),
|
|
2421
2421
|
tz_name: z.string().optional(),
|
|
2422
2422
|
time_card_start_day: z.int().gte(0).lte(6).optional(),
|
|
2423
2423
|
clock_in_requirement: z.enum([
|
|
@@ -2501,8 +2501,8 @@ export const zJobUpdateParameters = z.object({
|
|
|
2501
2501
|
'none'
|
|
2502
2502
|
]).optional(),
|
|
2503
2503
|
region: z.string().nullish(),
|
|
2504
|
-
start_time: z.
|
|
2505
|
-
end_time: z.
|
|
2504
|
+
start_time: z.iso.date().nullish(),
|
|
2505
|
+
end_time: z.iso.date().nullish(),
|
|
2506
2506
|
tz_name: z.string().optional(),
|
|
2507
2507
|
time_card_start_day: z.int().gte(0).lte(6).optional(),
|
|
2508
2508
|
clock_in_requirement: z.enum([
|
|
@@ -2817,8 +2817,8 @@ export const zManagerTimeEntryApprovalParameters = z.object({
|
|
|
2817
2817
|
*/
|
|
2818
2818
|
export const zTimeEntryCreateParameters = z.object({
|
|
2819
2819
|
timekeeping_time_card_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
2820
|
-
start_time: z.
|
|
2821
|
-
end_time: z.
|
|
2820
|
+
start_time: z.iso.datetime(),
|
|
2821
|
+
end_time: z.iso.datetime(),
|
|
2822
2822
|
job_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2823
2823
|
timekeeping_timecode_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2824
2824
|
state: z.string().nullish(),
|
|
@@ -2831,8 +2831,8 @@ export const zTimeEntryCreateParameters = z.object({
|
|
|
2831
2831
|
* Request body for updating a time entry. Every field is optional, and an omitted field keeps its value.
|
|
2832
2832
|
*/
|
|
2833
2833
|
export const zTimeEntryUpdateParameters = z.object({
|
|
2834
|
-
start_time: z.
|
|
2835
|
-
end_time: z.
|
|
2834
|
+
start_time: z.iso.datetime().optional(),
|
|
2835
|
+
end_time: z.iso.datetime().optional(),
|
|
2836
2836
|
job_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2837
2837
|
timekeeping_timecode_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
2838
2838
|
state: z.string().nullish(),
|
|
@@ -2859,12 +2859,14 @@ export const zFormDefinitionObject = z.object({
|
|
|
2859
2859
|
allow_carry_forward: z.boolean(),
|
|
2860
2860
|
current_revision: z.int().nullable(),
|
|
2861
2861
|
json: z.record(z.string(), z.unknown()),
|
|
2862
|
+
submission_shape: z.record(z.string(), z.unknown()),
|
|
2862
2863
|
created_at: z.iso.datetime()
|
|
2863
2864
|
});
|
|
2864
2865
|
/**
|
|
2865
|
-
* A single form submission
|
|
2866
|
+
* A single form submission with resolved answers, returned by both show and create.
|
|
2866
2867
|
*/
|
|
2867
2868
|
export const zFormSubmissionResponseObject = z.object({
|
|
2869
|
+
id: z.string(),
|
|
2868
2870
|
user: z.object({
|
|
2869
2871
|
id: z.string(),
|
|
2870
2872
|
name: z.string()
|
|
@@ -2878,6 +2880,15 @@ export const zFormSubmissionResponseObject = z.object({
|
|
|
2878
2880
|
created_at: z.iso.datetime(),
|
|
2879
2881
|
updated_at: z.iso.datetime()
|
|
2880
2882
|
});
|
|
2883
|
+
/**
|
|
2884
|
+
* Create a submission using supported keys from the form definition's submission_shape. Requires a user-scoped API key.
|
|
2885
|
+
*/
|
|
2886
|
+
export const zFormSubmissionCreateParameters = z.object({
|
|
2887
|
+
form_definition_id: z.string(),
|
|
2888
|
+
user_id: z.string(),
|
|
2889
|
+
json: z.record(z.string(), z.unknown()),
|
|
2890
|
+
timezone: z.string().optional()
|
|
2891
|
+
});
|
|
2881
2892
|
/**
|
|
2882
2893
|
* 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.
|
|
2883
2894
|
*/
|
|
@@ -3387,10 +3398,10 @@ export const zTimeCardResponseObject = z.object({
|
|
|
3387
3398
|
1.5: z.number(),
|
|
3388
3399
|
2: z.number()
|
|
3389
3400
|
}),
|
|
3390
|
-
pay_cents: z.string(),
|
|
3391
|
-
base_wage_pay_cents: z.string(),
|
|
3392
|
-
one_five_x_adder_cents: z.string(),
|
|
3393
|
-
two_x_adder_cents: z.string(),
|
|
3401
|
+
pay_cents: z.string().optional(),
|
|
3402
|
+
base_wage_pay_cents: z.string().optional(),
|
|
3403
|
+
one_five_x_adder_cents: z.string().optional(),
|
|
3404
|
+
two_x_adder_cents: z.string().optional(),
|
|
3394
3405
|
region_ids: z.array(z.string())
|
|
3395
3406
|
});
|
|
3396
3407
|
/**
|
|
@@ -3423,10 +3434,10 @@ export const zJobTimeCardDayResponseObject = z.object({
|
|
|
3423
3434
|
1.5: z.number(),
|
|
3424
3435
|
2: z.number()
|
|
3425
3436
|
}),
|
|
3426
|
-
pay_cents: z.string(),
|
|
3427
|
-
base_wage_pay_cents: z.string(),
|
|
3428
|
-
one_five_x_adder_cents: z.string(),
|
|
3429
|
-
two_x_adder_cents: z.string(),
|
|
3437
|
+
pay_cents: z.string().optional(),
|
|
3438
|
+
base_wage_pay_cents: z.string().optional(),
|
|
3439
|
+
one_five_x_adder_cents: z.string().optional(),
|
|
3440
|
+
two_x_adder_cents: z.string().optional(),
|
|
3430
3441
|
region_ids: z.array(z.string()),
|
|
3431
3442
|
cumulative_minutes_worked: z.int(),
|
|
3432
3443
|
weekly_cumulative_minutes_worked: z.int(),
|
|
@@ -3468,14 +3479,14 @@ export const zJobTimeCardDayResponseObject = z.object({
|
|
|
3468
3479
|
1.5: z.number(),
|
|
3469
3480
|
2: z.number()
|
|
3470
3481
|
}),
|
|
3471
|
-
cumulative_pay_cents: z.string(),
|
|
3472
|
-
weekly_cumulative_pay_cents: z.string(),
|
|
3473
|
-
cumulative_base_wage_pay_cents: z.string(),
|
|
3474
|
-
weekly_cumulative_base_wage_pay_cents: z.string(),
|
|
3475
|
-
cumulative_one_five_x_adder_cents: z.string(),
|
|
3476
|
-
weekly_cumulative_one_five_x_adder_cents: z.string(),
|
|
3477
|
-
cumulative_two_x_adder_cents: z.string(),
|
|
3478
|
-
weekly_cumulative_two_x_adder_cents: z.string(),
|
|
3482
|
+
cumulative_pay_cents: z.string().optional(),
|
|
3483
|
+
weekly_cumulative_pay_cents: z.string().optional(),
|
|
3484
|
+
cumulative_base_wage_pay_cents: z.string().optional(),
|
|
3485
|
+
weekly_cumulative_base_wage_pay_cents: z.string().optional(),
|
|
3486
|
+
cumulative_one_five_x_adder_cents: z.string().optional(),
|
|
3487
|
+
weekly_cumulative_one_five_x_adder_cents: z.string().optional(),
|
|
3488
|
+
cumulative_two_x_adder_cents: z.string().optional(),
|
|
3489
|
+
weekly_cumulative_two_x_adder_cents: z.string().optional(),
|
|
3479
3490
|
cumulative_region_ids: z.array(z.string()),
|
|
3480
3491
|
weekly_cumulative_region_ids: z.array(z.string()),
|
|
3481
3492
|
created_at: z.iso.datetime(),
|
|
@@ -3982,6 +3993,22 @@ export const zProjectSiteParameters = z.object({
|
|
|
3982
3993
|
export const zProjectSiteUpdateParameters = z.object({
|
|
3983
3994
|
feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional()
|
|
3984
3995
|
});
|
|
3996
|
+
/**
|
|
3997
|
+
* A project–user visibility join: names one person on one project. Path `{id}` is this join's id. Not included on project GET.
|
|
3998
|
+
*/
|
|
3999
|
+
export const zProjectUserVisibilityResponseObject = z.object({
|
|
4000
|
+
id: z.string(),
|
|
4001
|
+
project_id: z.string(),
|
|
4002
|
+
user_id: z.string(),
|
|
4003
|
+
created_at: z.iso.datetime(),
|
|
4004
|
+
updated_at: z.iso.datetime()
|
|
4005
|
+
});
|
|
4006
|
+
/**
|
|
4007
|
+
* Request body for naming a person on a project. `user_id` is required. The project is taken from the path and is not part of the body. There is no update body — `user_id` and `project_id` are readonly after create.
|
|
4008
|
+
*/
|
|
4009
|
+
export const zProjectUserVisibilityParameters = z.object({
|
|
4010
|
+
user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)
|
|
4011
|
+
});
|
|
3985
4012
|
/**
|
|
3986
4013
|
* A file attached to a project. Uploaded through the direct-upload flow. `name` is always "document" and is not client-writable.
|
|
3987
4014
|
*/
|
|
@@ -4374,7 +4401,7 @@ export const zComplianceCheckDetailResponseObject = z.object({
|
|
|
4374
4401
|
*/
|
|
4375
4402
|
export const zComplianceCheckParameters = z.object({
|
|
4376
4403
|
status: z.enum(['dismissed', 'pending']).optional(),
|
|
4377
|
-
time_due: z.
|
|
4404
|
+
time_due: z.iso.datetime().nullish(),
|
|
4378
4405
|
assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
4379
4406
|
file_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
4380
4407
|
});
|
|
@@ -5406,11 +5433,11 @@ export const zPositionParameters = z.object({
|
|
|
5406
5433
|
}).optional()
|
|
5407
5434
|
});
|
|
5408
5435
|
/**
|
|
5409
|
-
* Parameters for creating a per-unit scope price on a job. `scope_kind` and `
|
|
5436
|
+
* Parameters for creating a per-unit scope price on a job. `scope_kind` and `unit_price_cents` are required; omitting either answers 400, and a null or wrong-typed value answers 422.
|
|
5410
5437
|
*/
|
|
5411
5438
|
export const zProductionJobScopePriceParameters = z.object({
|
|
5412
5439
|
scope_kind: z.string(),
|
|
5413
|
-
|
|
5440
|
+
unit_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
|
|
5414
5441
|
contracted_count: z.int().nullish(),
|
|
5415
5442
|
unit_of_measure: z.string().optional()
|
|
5416
5443
|
});
|
|
@@ -5419,7 +5446,7 @@ export const zProductionJobScopePriceParameters = z.object({
|
|
|
5419
5446
|
*/
|
|
5420
5447
|
export const zProductionJobScopePriceUpdateParameters = z.object({
|
|
5421
5448
|
scope_kind: z.string().optional(),
|
|
5422
|
-
|
|
5449
|
+
unit_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
5423
5450
|
contracted_count: z.int().nullish(),
|
|
5424
5451
|
unit_of_measure: z.string().optional()
|
|
5425
5452
|
});
|
|
@@ -5431,7 +5458,7 @@ export const zProductionJobScopePriceResponseObject = z.object({
|
|
|
5431
5458
|
job_id: z.string(),
|
|
5432
5459
|
scope_kind: z.string(),
|
|
5433
5460
|
unit_of_measure: z.string(),
|
|
5434
|
-
|
|
5461
|
+
unit_price_cents: z.string().optional(),
|
|
5435
5462
|
contracted_count: z.int().nullish(),
|
|
5436
5463
|
created_at: z.iso.datetime(),
|
|
5437
5464
|
updated_at: z.iso.datetime()
|
|
@@ -5671,8 +5698,8 @@ export const zJobResponseObject = z.object({
|
|
|
5671
5698
|
created_at: z.iso.datetime(),
|
|
5672
5699
|
updated_at: z.iso.datetime(),
|
|
5673
5700
|
status: z.string(),
|
|
5674
|
-
start_time: z.
|
|
5675
|
-
end_time: z.
|
|
5701
|
+
start_time: z.iso.date().nullable(),
|
|
5702
|
+
end_time: z.iso.date().nullable(),
|
|
5676
5703
|
purchase_order_number: z.string().nullable(),
|
|
5677
5704
|
time_card_start_day: zTimeCardStartDay,
|
|
5678
5705
|
tz_name: z.string(),
|
|
@@ -5970,7 +5997,7 @@ export const zFormDefinitionResponseObject = z.object({
|
|
|
5970
5997
|
data: z.array(zFormDefinitionObject)
|
|
5971
5998
|
});
|
|
5972
5999
|
/**
|
|
5973
|
-
* A page of form submissions — the lighter list representation. A submission is a user's completed form
|
|
6000
|
+
* A page of form submissions — the lighter list representation. A submission is a user's completed form, created in the app or through the API.
|
|
5974
6001
|
*/
|
|
5975
6002
|
export const zFormSubmissionIndexObject = z.object({
|
|
5976
6003
|
meta: zMeta,
|
|
@@ -7326,7 +7353,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
7326
7353
|
assets_product_id: z.string(),
|
|
7327
7354
|
serial_number: z.string().nullish(),
|
|
7328
7355
|
status: z.enum(['available', 'assigned']).optional(),
|
|
7329
|
-
purchase_date: z.
|
|
7356
|
+
purchase_date: z.iso.date().nullish(),
|
|
7330
7357
|
purchase_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
7331
7358
|
external_id: z.string().nullish(),
|
|
7332
7359
|
external_system_url: z.string().nullish(),
|
|
@@ -7336,7 +7363,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
7336
7363
|
assets_attribute_option_id: z.string().nullish()
|
|
7337
7364
|
})).optional(),
|
|
7338
7365
|
images_attributes: z.array(z.object({
|
|
7339
|
-
id: z.string().optional(),
|
|
7366
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
7340
7367
|
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
7341
7368
|
_destroy: z.boolean().optional()
|
|
7342
7369
|
})).optional(),
|
|
@@ -7355,7 +7382,7 @@ export const zAssetsItemUpdateParameters = z.object({
|
|
|
7355
7382
|
assets_product_id: z.string().optional(),
|
|
7356
7383
|
serial_number: z.string().nullish(),
|
|
7357
7384
|
status: z.enum(['available', 'assigned']).optional(),
|
|
7358
|
-
purchase_date: z.
|
|
7385
|
+
purchase_date: z.iso.date().nullish(),
|
|
7359
7386
|
purchase_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
7360
7387
|
external_id: z.string().nullish(),
|
|
7361
7388
|
external_system_url: z.string().nullish(),
|
|
@@ -7365,7 +7392,7 @@ export const zAssetsItemUpdateParameters = z.object({
|
|
|
7365
7392
|
assets_attribute_option_id: z.string().nullish()
|
|
7366
7393
|
})).optional(),
|
|
7367
7394
|
images_attributes: z.array(z.object({
|
|
7368
|
-
id: z.string().optional(),
|
|
7395
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
7369
7396
|
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
7370
7397
|
_destroy: z.boolean().optional()
|
|
7371
7398
|
})).optional(),
|
|
@@ -7580,7 +7607,7 @@ export const zAssetsItemResponseObject = z.object({
|
|
|
7580
7607
|
type: z.enum(['serial', 'bulk']),
|
|
7581
7608
|
serial_number: z.string().nullable(),
|
|
7582
7609
|
status: z.enum(['available', 'assigned']).nullable(),
|
|
7583
|
-
purchase_date: z.iso.
|
|
7610
|
+
purchase_date: z.iso.date().nullable(),
|
|
7584
7611
|
purchase_price_cents: z.string().nullable(),
|
|
7585
7612
|
currency: z.string().nullable(),
|
|
7586
7613
|
external_id: z.string().nullable(),
|
|
@@ -7977,7 +8004,7 @@ export const zAssetsServiceEventParameters = z.object({
|
|
|
7977
8004
|
performed_on: z.iso.date(),
|
|
7978
8005
|
assets_service_schedule_id: z.string().nullish(),
|
|
7979
8006
|
attachments_attributes: z.array(z.object({
|
|
7980
|
-
id: z.string().optional(),
|
|
8007
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
7981
8008
|
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
7982
8009
|
_destroy: z.boolean().optional()
|
|
7983
8010
|
})).optional(),
|
|
@@ -7996,7 +8023,7 @@ export const zAssetsServiceEventUpdateParameters = z.object({
|
|
|
7996
8023
|
performed_on: z.iso.date().optional(),
|
|
7997
8024
|
assets_service_schedule_id: z.string().nullish(),
|
|
7998
8025
|
attachments_attributes: z.array(z.object({
|
|
7999
|
-
id: z.string().optional(),
|
|
8026
|
+
id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8000
8027
|
file: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8001
8028
|
_destroy: z.boolean().optional()
|
|
8002
8029
|
})).optional(),
|
|
@@ -10364,6 +10391,11 @@ export const zListFormSubmissionsQuery = z.object({
|
|
|
10364
10391
|
* Success
|
|
10365
10392
|
*/
|
|
10366
10393
|
export const zListFormSubmissionsResponse = zFormSubmissionIndexObject;
|
|
10394
|
+
export const zCreateFormSubmissionBody = zFormSubmissionCreateParameters;
|
|
10395
|
+
/**
|
|
10396
|
+
* Created
|
|
10397
|
+
*/
|
|
10398
|
+
export const zCreateFormSubmissionResponse = zFormSubmissionResponseObject;
|
|
10367
10399
|
export const zGetFormSubmissionPath = z.object({
|
|
10368
10400
|
id: z.string()
|
|
10369
10401
|
});
|
|
@@ -12427,6 +12459,48 @@ export const zUpdateProjectSitePath = z.object({
|
|
|
12427
12459
|
* Success
|
|
12428
12460
|
*/
|
|
12429
12461
|
export const zUpdateProjectSiteResponse = zProjectSiteResponseObject;
|
|
12462
|
+
export const zListUserVisibilitiesPath = z.object({
|
|
12463
|
+
project_id: z.string()
|
|
12464
|
+
});
|
|
12465
|
+
export const zListUserVisibilitiesQuery = z.object({
|
|
12466
|
+
'page[cursor]': z.string().optional(),
|
|
12467
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
12468
|
+
page: z.string().optional(),
|
|
12469
|
+
filter: z.string().optional(),
|
|
12470
|
+
'filter[unexpected]': z.string().optional()
|
|
12471
|
+
});
|
|
12472
|
+
/**
|
|
12473
|
+
* Success
|
|
12474
|
+
*/
|
|
12475
|
+
export const zListUserVisibilitiesResponse = z.object({
|
|
12476
|
+
meta: zMeta,
|
|
12477
|
+
links: zLinks,
|
|
12478
|
+
data: z.array(zProjectUserVisibilityResponseObject)
|
|
12479
|
+
});
|
|
12480
|
+
export const zCreateUserVisibilityBody = zProjectUserVisibilityParameters;
|
|
12481
|
+
export const zCreateUserVisibilityPath = z.object({
|
|
12482
|
+
project_id: z.string()
|
|
12483
|
+
});
|
|
12484
|
+
/**
|
|
12485
|
+
* Created
|
|
12486
|
+
*/
|
|
12487
|
+
export const zCreateUserVisibilityResponse = zProjectUserVisibilityResponseObject;
|
|
12488
|
+
export const zDeleteUserVisibilityPath = z.object({
|
|
12489
|
+
project_id: z.string(),
|
|
12490
|
+
id: z.string()
|
|
12491
|
+
});
|
|
12492
|
+
/**
|
|
12493
|
+
* No Content
|
|
12494
|
+
*/
|
|
12495
|
+
export const zDeleteUserVisibilityResponse = z.void();
|
|
12496
|
+
export const zGetUserVisibilityPath = z.object({
|
|
12497
|
+
project_id: z.string(),
|
|
12498
|
+
id: z.string()
|
|
12499
|
+
});
|
|
12500
|
+
/**
|
|
12501
|
+
* Success
|
|
12502
|
+
*/
|
|
12503
|
+
export const zGetUserVisibilityResponse = zProjectUserVisibilityResponseObject;
|
|
12430
12504
|
export const zShiftProjectWageDeterminationGenesisBody = zProjectWageDeterminationGenesisParameters;
|
|
12431
12505
|
export const zShiftProjectWageDeterminationGenesisHeaders = z.object({
|
|
12432
12506
|
'If-Match': z.string()
|