@dsptch-work/api-client 0.40.0 → 0.41.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 +90 -0
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/sdk.gen.d.ts +223 -14
- package/dist/gen/sdk.gen.js +310 -13
- package/dist/gen/types.gen.d.ts +1002 -33
- package/dist/gen/zod.gen.d.ts +879 -36
- package/dist/gen/zod.gen.js +337 -19
- package/package.json +1 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -452,11 +452,14 @@ export const zDirectUploadParameters = z.object({
|
|
|
452
452
|
'internal.job_todos',
|
|
453
453
|
'internal.project_todos',
|
|
454
454
|
'jobs.documents',
|
|
455
|
+
'jobs.pwa.apprenticeship.good_faith_effort_exceptions',
|
|
456
|
+
'jobs.pwa.cure_payments',
|
|
455
457
|
'pay_periods.imports.aggregate_times',
|
|
456
458
|
'pay_periods.imports.dsptch_cprs',
|
|
457
459
|
'pay_periods.imports.time_entries',
|
|
458
460
|
'payrolls.payroll_runs.imports.paystubs',
|
|
459
461
|
'payrolls.payroll_runs.imports.wide_paystubs',
|
|
462
|
+
'projects',
|
|
460
463
|
'projects.documents',
|
|
461
464
|
'users'
|
|
462
465
|
]),
|
|
@@ -758,10 +761,10 @@ export const zCompetencyEvidenceItemResponseObject = z.object({
|
|
|
758
761
|
'form_submission',
|
|
759
762
|
'certification'
|
|
760
763
|
]),
|
|
761
|
-
description: z.string().
|
|
764
|
+
description: z.string().nullish(),
|
|
762
765
|
captured_on: z.iso.date(),
|
|
763
|
-
form_submission_id: z.string().
|
|
764
|
-
user_certification_id: z.string().
|
|
766
|
+
form_submission_id: z.string().nullish(),
|
|
767
|
+
user_certification_id: z.string().nullish(),
|
|
765
768
|
added_by_user_id: z.string(),
|
|
766
769
|
file_name: z.string().nullable(),
|
|
767
770
|
file_byte_size: z.int().nullable(),
|
|
@@ -1541,7 +1544,7 @@ export const zAssetsProductParameters = z.object({
|
|
|
1541
1544
|
model: z.string().nullish(),
|
|
1542
1545
|
upc: z.string().nullish(),
|
|
1543
1546
|
internal_sku: z.string().nullish(),
|
|
1544
|
-
default_minimum_quantity: z.int().nullish(),
|
|
1547
|
+
default_minimum_quantity: z.int().gte(1).nullish(),
|
|
1545
1548
|
counted_by: z.enum([
|
|
1546
1549
|
'each',
|
|
1547
1550
|
'pair',
|
|
@@ -1572,7 +1575,7 @@ export const zAssetsProductUpdateParameters = z.object({
|
|
|
1572
1575
|
model: z.string().nullish(),
|
|
1573
1576
|
upc: z.string().nullish(),
|
|
1574
1577
|
internal_sku: z.string().nullish(),
|
|
1575
|
-
default_minimum_quantity: z.int().nullish(),
|
|
1578
|
+
default_minimum_quantity: z.int().gte(1).nullish(),
|
|
1576
1579
|
counted_by: z.enum([
|
|
1577
1580
|
'each',
|
|
1578
1581
|
'pair',
|
|
@@ -1918,6 +1921,9 @@ export const zPayPeriodConfigResponseObject = z.object({
|
|
|
1918
1921
|
actuals_enabled: z.boolean().nullable(),
|
|
1919
1922
|
requires_external_map_contributor: z.boolean(),
|
|
1920
1923
|
paid_after_holiday: z.boolean(),
|
|
1924
|
+
arrear_days: z.int(),
|
|
1925
|
+
time_card_auto_lock_days: z.int().nullable(),
|
|
1926
|
+
rounding_interval: z.union([z.literal(1), z.literal(15)]),
|
|
1921
1927
|
demo: z.boolean().nullable(),
|
|
1922
1928
|
valid_from: z.iso.datetime().nullable(),
|
|
1923
1929
|
valid_to: z.iso.datetime().nullable(),
|
|
@@ -1955,6 +1961,9 @@ export const zPayPeriodConfigHistoryCorrectionObject = z.object({
|
|
|
1955
1961
|
actuals_enabled: z.boolean().nullable(),
|
|
1956
1962
|
requires_external_map_contributor: z.boolean(),
|
|
1957
1963
|
paid_after_holiday: z.boolean(),
|
|
1964
|
+
arrear_days: z.int(),
|
|
1965
|
+
time_card_auto_lock_days: z.int().nullable(),
|
|
1966
|
+
rounding_interval: z.union([z.literal(1), z.literal(15)]),
|
|
1958
1967
|
demo: z.boolean().nullable(),
|
|
1959
1968
|
valid_from: z.iso.datetime().nullable(),
|
|
1960
1969
|
valid_to: z.iso.datetime().nullable(),
|
|
@@ -1992,6 +2001,9 @@ export const zPayPeriodConfigHistoryVersionObject = z.object({
|
|
|
1992
2001
|
actuals_enabled: z.boolean().nullable(),
|
|
1993
2002
|
requires_external_map_contributor: z.boolean(),
|
|
1994
2003
|
paid_after_holiday: z.boolean(),
|
|
2004
|
+
arrear_days: z.int(),
|
|
2005
|
+
time_card_auto_lock_days: z.int().nullable(),
|
|
2006
|
+
rounding_interval: z.union([z.literal(1), z.literal(15)]),
|
|
1995
2007
|
demo: z.boolean().nullable(),
|
|
1996
2008
|
valid_from: z.iso.datetime().nullable(),
|
|
1997
2009
|
valid_to: z.iso.datetime().nullable(),
|
|
@@ -2908,9 +2920,9 @@ export const zTimeEntryResponseObject = z.object({
|
|
|
2908
2920
|
2: z.number()
|
|
2909
2921
|
}),
|
|
2910
2922
|
incentive_pay_one_five_x_minutes_worked: z.int(),
|
|
2911
|
-
hourly_rate_cents: z.string().
|
|
2912
|
-
currency: z.string(),
|
|
2913
|
-
hourly_rate_src_type: z.string().
|
|
2923
|
+
hourly_rate_cents: z.string().nullish(),
|
|
2924
|
+
currency: z.string().optional(),
|
|
2925
|
+
hourly_rate_src_type: z.string().nullish(),
|
|
2914
2926
|
timekeeping_pay_period_id: z.string(),
|
|
2915
2927
|
start_time: z.iso.datetime(),
|
|
2916
2928
|
end_time: z.iso.datetime(),
|
|
@@ -2995,10 +3007,11 @@ export const zFormDefinitionObject = z.object({
|
|
|
2995
3007
|
current_revision: z.int().nullable(),
|
|
2996
3008
|
json: z.record(z.string(), z.unknown()),
|
|
2997
3009
|
submission_shape: z.record(z.string(), z.unknown()),
|
|
2998
|
-
created_at: z.iso.datetime()
|
|
3010
|
+
created_at: z.iso.datetime(),
|
|
3011
|
+
updated_at: z.iso.datetime()
|
|
2999
3012
|
});
|
|
3000
3013
|
/**
|
|
3001
|
-
* A single form submission with resolved answers, returned by
|
|
3014
|
+
* A single form submission with resolved answers, returned by show, create, and update.
|
|
3002
3015
|
*/
|
|
3003
3016
|
export const zFormSubmissionResponseObject = z.object({
|
|
3004
3017
|
id: z.string(),
|
|
@@ -3024,6 +3037,13 @@ export const zFormSubmissionCreateParameters = z.object({
|
|
|
3024
3037
|
json: z.record(z.string(), z.unknown()),
|
|
3025
3038
|
timezone: z.string().optional()
|
|
3026
3039
|
});
|
|
3040
|
+
/**
|
|
3041
|
+
* Request body for updating a submission's timezone and answers. Send only fields to change; omitted fields remain unchanged. form_definition_id and user_id cannot change.
|
|
3042
|
+
*/
|
|
3043
|
+
export const zFormSubmissionUpdateParameters = z.object({
|
|
3044
|
+
timezone: z.string().optional(),
|
|
3045
|
+
json: z.record(z.string(), z.unknown()).optional()
|
|
3046
|
+
});
|
|
3027
3047
|
/**
|
|
3028
3048
|
* 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.
|
|
3029
3049
|
*/
|
|
@@ -3706,6 +3726,37 @@ export const zTimeOffRequestResponseObject = z.object({
|
|
|
3706
3726
|
created_at: z.iso.datetime(),
|
|
3707
3727
|
updated_at: z.iso.datetime()
|
|
3708
3728
|
});
|
|
3729
|
+
/**
|
|
3730
|
+
* Create a time-off request for a worker. Instants must be the beginning of the first day and the end of the last day in the company's pay-schedule timezone (company timezone, else UTC). When the filer is the worker the request is born pending; otherwise it is born approved with the filer stamped as reviewer, and an Absence is built in the background.
|
|
3731
|
+
*/
|
|
3732
|
+
export const zTimeOffRequestParameters = z.object({
|
|
3733
|
+
user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
3734
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
3735
|
+
absence_type: z.enum([
|
|
3736
|
+
'rest_and_recovery',
|
|
3737
|
+
'vacation',
|
|
3738
|
+
'bereavement',
|
|
3739
|
+
'ca_covid_19_sick',
|
|
3740
|
+
'custom',
|
|
3741
|
+
'jury_duty',
|
|
3742
|
+
'unpaid',
|
|
3743
|
+
'training',
|
|
3744
|
+
'bench'
|
|
3745
|
+
]),
|
|
3746
|
+
start_time: z.iso.datetime(),
|
|
3747
|
+
end_time: z.iso.datetime()
|
|
3748
|
+
});
|
|
3749
|
+
/**
|
|
3750
|
+
* Approve, deny, or cancel a pending time-off request. The named filer is the reviewer: only the worker may cancel, and nobody may approve or deny their own row. Approving enqueues the Absence build.
|
|
3751
|
+
*/
|
|
3752
|
+
export const zTimeOffRequestReviewParameters = z.object({
|
|
3753
|
+
status: z.enum([
|
|
3754
|
+
'approved',
|
|
3755
|
+
'denied',
|
|
3756
|
+
'cancelled'
|
|
3757
|
+
]),
|
|
3758
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)
|
|
3759
|
+
});
|
|
3709
3760
|
/**
|
|
3710
3761
|
* Request body for locking or unlocking a time card.
|
|
3711
3762
|
*/
|
|
@@ -4037,11 +4088,32 @@ export const zProjectResponseObject = z.object({
|
|
|
4037
4088
|
prevailing_wage_lock_in_date: z.iso.date().nullable(),
|
|
4038
4089
|
beginning_of_construction_date: z.iso.date().nullable(),
|
|
4039
4090
|
placed_in_service_date: z.iso.date().nullable(),
|
|
4091
|
+
lock_in_date_doc: z.object({
|
|
4092
|
+
id: z.string(),
|
|
4093
|
+
filename: z.string(),
|
|
4094
|
+
content_type: z.string().nullable(),
|
|
4095
|
+
byte_size: z.int(),
|
|
4096
|
+
url: z.string()
|
|
4097
|
+
}).nullable(),
|
|
4098
|
+
beginning_of_construction_doc: z.object({
|
|
4099
|
+
id: z.string(),
|
|
4100
|
+
filename: z.string(),
|
|
4101
|
+
content_type: z.string().nullable(),
|
|
4102
|
+
byte_size: z.int(),
|
|
4103
|
+
url: z.string()
|
|
4104
|
+
}).nullable(),
|
|
4105
|
+
placed_in_service_doc: z.object({
|
|
4106
|
+
id: z.string(),
|
|
4107
|
+
filename: z.string(),
|
|
4108
|
+
content_type: z.string().nullable(),
|
|
4109
|
+
byte_size: z.int(),
|
|
4110
|
+
url: z.string()
|
|
4111
|
+
}).nullable(),
|
|
4040
4112
|
created_at: z.iso.datetime(),
|
|
4041
4113
|
updated_at: z.iso.datetime()
|
|
4042
4114
|
});
|
|
4043
4115
|
/**
|
|
4044
|
-
* Request body for creating a project. `name` and `created_by_user_id` are required, and omitting either returns 400; the creator must be a member of the owning company. The owning company is inferred from the API key and is not part of the body. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship is saved.
|
|
4116
|
+
* Request body for creating a project. `name` and `created_by_user_id` are required, and omitting either returns 400; the creator must be a member of the owning company. The owning company is inferred from the API key and is not part of the body. IRA evidence files attach through `lock_in_date_doc_signed_id`, `beginning_of_construction_doc_signed_id`, and `placed_in_service_doc_signed_id` (purpose-bound `projects` signed ids); when any of those keys is present, `performed_by_user_id` is required. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship is saved.
|
|
4045
4117
|
*/
|
|
4046
4118
|
export const zProjectParameters = z.object({
|
|
4047
4119
|
external_id: z.string().nullish(),
|
|
@@ -4075,10 +4147,14 @@ export const zProjectParameters = z.object({
|
|
|
4075
4147
|
prevailing_wage_lock_in_date: z.iso.date().nullish(),
|
|
4076
4148
|
beginning_of_construction_date: z.iso.date().nullish(),
|
|
4077
4149
|
placed_in_service_date: z.iso.date().nullish(),
|
|
4150
|
+
lock_in_date_doc_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4151
|
+
beginning_of_construction_doc_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4152
|
+
placed_in_service_doc_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4153
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4078
4154
|
created_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)
|
|
4079
4155
|
});
|
|
4080
4156
|
/**
|
|
4081
|
-
* Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship changes.
|
|
4157
|
+
* Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. IRA evidence files attach through the same `*_doc_signed_id` keys as create; omit a key to keep the stored file, and send `performed_by_user_id` when any signed id is present. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any project or relationship changes.
|
|
4082
4158
|
*/
|
|
4083
4159
|
export const zProjectUpdateParameters = z.object({
|
|
4084
4160
|
external_id: z.string().nullish(),
|
|
@@ -4111,7 +4187,11 @@ export const zProjectUpdateParameters = z.object({
|
|
|
4111
4187
|
budget_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
|
|
4112
4188
|
prevailing_wage_lock_in_date: z.iso.date().nullish(),
|
|
4113
4189
|
beginning_of_construction_date: z.iso.date().nullish(),
|
|
4114
|
-
placed_in_service_date: z.iso.date().nullish()
|
|
4190
|
+
placed_in_service_date: z.iso.date().nullish(),
|
|
4191
|
+
lock_in_date_doc_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4192
|
+
beginning_of_construction_doc_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4193
|
+
placed_in_service_doc_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
4194
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
4115
4195
|
});
|
|
4116
4196
|
/**
|
|
4117
4197
|
* A project–site assignment: the join linking a project to a site, optionally scoping which of that site's features apply. Path `{id}` is this join's id, not the Site's. Not included on project GET.
|
|
@@ -5025,7 +5105,7 @@ export const zJobDocumentUpdateParameters = z.object({
|
|
|
5025
5105
|
url: z.string().nullish()
|
|
5026
5106
|
});
|
|
5027
5107
|
/**
|
|
5028
|
-
* A good-faith-effort exception on a job — a record that the employer requested apprentices from a registered program and did not receive the full request, or that no qualifying program existed.
|
|
5108
|
+
* A good-faith-effort exception on a job — a record that the employer requested apprentices from a registered program and did not receive the full request, or that no qualifying program existed. Proof files are always present as `null` or a document object; omit a signed-id key on write to keep the stored file.
|
|
5029
5109
|
*/
|
|
5030
5110
|
export const zJobGoodFaithEffortExceptionResponseObject = z.object({
|
|
5031
5111
|
id: z.string(),
|
|
@@ -5044,9 +5124,85 @@ export const zJobGoodFaithEffortExceptionResponseObject = z.object({
|
|
|
5044
5124
|
'denied',
|
|
5045
5125
|
'partial'
|
|
5046
5126
|
]).nullable(),
|
|
5127
|
+
request_letter: z.object({
|
|
5128
|
+
id: z.string(),
|
|
5129
|
+
filename: z.string(),
|
|
5130
|
+
content_type: z.string().nullable(),
|
|
5131
|
+
byte_size: z.int(),
|
|
5132
|
+
url: z.string()
|
|
5133
|
+
}).nullable(),
|
|
5134
|
+
submission_proof: z.object({
|
|
5135
|
+
id: z.string(),
|
|
5136
|
+
filename: z.string(),
|
|
5137
|
+
content_type: z.string().nullable(),
|
|
5138
|
+
byte_size: z.int(),
|
|
5139
|
+
url: z.string()
|
|
5140
|
+
}).nullable(),
|
|
5141
|
+
response_letter: z.object({
|
|
5142
|
+
id: z.string(),
|
|
5143
|
+
filename: z.string(),
|
|
5144
|
+
content_type: z.string().nullable(),
|
|
5145
|
+
byte_size: z.int(),
|
|
5146
|
+
url: z.string()
|
|
5147
|
+
}).nullable(),
|
|
5148
|
+
no_availability_proof: z.object({
|
|
5149
|
+
id: z.string(),
|
|
5150
|
+
filename: z.string(),
|
|
5151
|
+
content_type: z.string().nullable(),
|
|
5152
|
+
byte_size: z.int(),
|
|
5153
|
+
url: z.string()
|
|
5154
|
+
}).nullable(),
|
|
5047
5155
|
created_at: z.iso.datetime(),
|
|
5048
5156
|
updated_at: z.iso.datetime()
|
|
5049
5157
|
});
|
|
5158
|
+
/**
|
|
5159
|
+
* Request body for creating a good-faith-effort exception on the job in the path. `job_id` is not part of the body. Every field is optional at the transport layer; model validations answer 422 when the two tracks, presence rules, one-year window, or `response=partial` constraint fail. Proof files attach through `request_letter_signed_id`, `submission_proof_signed_id`, `response_letter_signed_id`, and `no_availability_proof_signed_id` minted by `POST /api/v1/direct_uploads` naming `jobs.pwa.apprenticeship.good_faith_effort_exceptions`; when any of those keys is present, `performed_by_user_id` is required. Undeclared body keys, including the web form's `hours_per_apprentice`, return 400.
|
|
5160
|
+
*/
|
|
5161
|
+
export const zJobGoodFaithEffortExceptionParameters = z.object({
|
|
5162
|
+
program_unavailable: z.boolean().optional(),
|
|
5163
|
+
num_apprentices_requested: z.int().nullish(),
|
|
5164
|
+
num_apprentices_provided: z.int().nullish(),
|
|
5165
|
+
minutes_per_apprentice: z.int().nullish(),
|
|
5166
|
+
requested_on_date: z.iso.date().nullish(),
|
|
5167
|
+
request_start_date: z.iso.date().nullish(),
|
|
5168
|
+
request_end_date: z.iso.date().nullish(),
|
|
5169
|
+
occupation: z.string().nullish(),
|
|
5170
|
+
program_name: z.string().nullish(),
|
|
5171
|
+
response: z.enum([
|
|
5172
|
+
'no_response',
|
|
5173
|
+
'denied',
|
|
5174
|
+
'partial'
|
|
5175
|
+
]).nullish(),
|
|
5176
|
+
request_letter_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5177
|
+
submission_proof_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5178
|
+
response_letter_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5179
|
+
no_availability_proof_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5180
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
5181
|
+
});
|
|
5182
|
+
/**
|
|
5183
|
+
* Request body for updating a good-faith-effort exception. Every field is optional; omit a field to preserve its current value. The resulting record must still satisfy the two-track, presence, one-year-window, and `response=partial` validations. Proof files attach through the same `*_signed_id` keys as create; omit a key to keep the stored file, and send `performed_by_user_id` when any signed id is present. `job_id` comes from the path and cannot be sent. Undeclared body keys, including `hours_per_apprentice`, return 400.
|
|
5184
|
+
*/
|
|
5185
|
+
export const zJobGoodFaithEffortExceptionUpdateParameters = z.object({
|
|
5186
|
+
program_unavailable: z.boolean().optional(),
|
|
5187
|
+
num_apprentices_requested: z.int().nullish(),
|
|
5188
|
+
num_apprentices_provided: z.int().nullish(),
|
|
5189
|
+
minutes_per_apprentice: z.int().nullish(),
|
|
5190
|
+
requested_on_date: z.iso.date().nullish(),
|
|
5191
|
+
request_start_date: z.iso.date().nullish(),
|
|
5192
|
+
request_end_date: z.iso.date().nullish(),
|
|
5193
|
+
occupation: z.string().nullish(),
|
|
5194
|
+
program_name: z.string().nullish(),
|
|
5195
|
+
response: z.enum([
|
|
5196
|
+
'no_response',
|
|
5197
|
+
'denied',
|
|
5198
|
+
'partial'
|
|
5199
|
+
]).nullish(),
|
|
5200
|
+
request_letter_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5201
|
+
submission_proof_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5202
|
+
response_letter_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5203
|
+
no_availability_proof_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5204
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
5205
|
+
});
|
|
5050
5206
|
/**
|
|
5051
5207
|
* A form-completion task attached to a job — a SurveyJS form assigned to users with a due time, optional recurrence, and reminders. Path `{id}` is the `Tasks::JobFormAssignmentTask` id, not the web show `Task#uid`.
|
|
5052
5208
|
*/
|
|
@@ -5075,7 +5231,7 @@ export const zJobFormAssignmentResponseObject = z.object({
|
|
|
5075
5231
|
}))
|
|
5076
5232
|
});
|
|
5077
5233
|
/**
|
|
5078
|
-
* A corrective payment recorded against a job's PWA obligations.
|
|
5234
|
+
* A corrective payment recorded against a job's PWA obligations. Does not include pretty type, currency, or a Money amount.
|
|
5079
5235
|
*/
|
|
5080
5236
|
export const zJobCurePaymentResponseObject = z.object({
|
|
5081
5237
|
id: z.string(),
|
|
@@ -5087,9 +5243,41 @@ export const zJobCurePaymentResponseObject = z.object({
|
|
|
5087
5243
|
cures_to_date: z.iso.date(),
|
|
5088
5244
|
notes: z.string().nullable(),
|
|
5089
5245
|
created_by_user_id: z.string(),
|
|
5246
|
+
attestation: z.object({
|
|
5247
|
+
id: z.string(),
|
|
5248
|
+
filename: z.string(),
|
|
5249
|
+
content_type: z.string().nullable(),
|
|
5250
|
+
byte_size: z.int(),
|
|
5251
|
+
url: z.string()
|
|
5252
|
+
}).nullable(),
|
|
5090
5253
|
created_at: z.iso.datetime(),
|
|
5091
5254
|
updated_at: z.iso.datetime()
|
|
5092
5255
|
});
|
|
5256
|
+
/**
|
|
5257
|
+
* Request body for creating a job PWA cure payment. `job_id` comes from the path and is not part of the body. `type`, `amount_cents`, the three dates, and `performed_by_user_id` are required; omitting any of those returns 400. The attestation file attaches through `attestation_signed_id` (a purpose-bound `jobs.pwa.cure_payments` signed id). Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any payment is saved.
|
|
5258
|
+
*/
|
|
5259
|
+
export const zJobCurePaymentParameters = z.object({
|
|
5260
|
+
amount_cents: z.string().regex(/^[0-9]+$/),
|
|
5261
|
+
paid_on_date: z.iso.date(),
|
|
5262
|
+
cures_from_date: z.iso.date(),
|
|
5263
|
+
cures_to_date: z.iso.date(),
|
|
5264
|
+
notes: z.string().nullish(),
|
|
5265
|
+
attestation_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5266
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
5267
|
+
type: z.enum(['Pwa::CurePayments::Federal', 'Pwa::CurePayments::Regional'])
|
|
5268
|
+
});
|
|
5269
|
+
/**
|
|
5270
|
+
* Request body for updating a job PWA cure payment. Every field is optional; omit a field to preserve its current value. `type` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. The attestation file attaches through the same `attestation_signed_id` key as create; omit the key to keep the stored file, and send `performed_by_user_id` when a signed id is present. Undeclared body keys return 400, and a null for a field that is not nullable or a wrongly typed value returns 422 at its pointer, before any payment changes.
|
|
5271
|
+
*/
|
|
5272
|
+
export const zJobCurePaymentUpdateParameters = z.object({
|
|
5273
|
+
amount_cents: z.string().regex(/^[0-9]+$/).optional(),
|
|
5274
|
+
paid_on_date: z.iso.date().optional(),
|
|
5275
|
+
cures_from_date: z.iso.date().optional(),
|
|
5276
|
+
cures_to_date: z.iso.date().optional(),
|
|
5277
|
+
notes: z.string().nullish(),
|
|
5278
|
+
attestation_signed_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
5279
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional()
|
|
5280
|
+
});
|
|
5093
5281
|
/**
|
|
5094
5282
|
* A form-completion task attached to a site — a SurveyJS form assigned to users with a due time, optional recurrence, and reminders. Path `{id}` is the `Tasks::SiteFormAssignmentTask` id, not the web show `Task#uid`. Sites are shared across companies; another company's assignment on the same site is not found. An empty assignee list is valid.
|
|
5095
5283
|
*/
|
|
@@ -7700,6 +7888,7 @@ export const zAssetsProductResponseObject = z.object({
|
|
|
7700
7888
|
id: z.string(),
|
|
7701
7889
|
company_id: z.string(),
|
|
7702
7890
|
name: z.string(),
|
|
7891
|
+
description: z.string().nullable(),
|
|
7703
7892
|
upc: z.string().nullable(),
|
|
7704
7893
|
internal_sku: z.string().nullable(),
|
|
7705
7894
|
default_minimum_quantity: z.int().nullable(),
|
|
@@ -8838,8 +9027,15 @@ export const zUpdateCategoryResponse = zAssetsCategoryResponseObject;
|
|
|
8838
9027
|
export const zListCustodiesQuery = z.object({
|
|
8839
9028
|
'filter[assets_item_id]': z.string().optional(),
|
|
8840
9029
|
'filter[user_id]': z.string().optional(),
|
|
9030
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
9031
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
9032
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
9033
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
8841
9034
|
filter: z.string().optional(),
|
|
8842
|
-
'filter[unexpected]': z.string().optional()
|
|
9035
|
+
'filter[unexpected]': z.string().optional(),
|
|
9036
|
+
'page[cursor]': z.string().optional(),
|
|
9037
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9038
|
+
page: z.string().optional()
|
|
8843
9039
|
});
|
|
8844
9040
|
/**
|
|
8845
9041
|
* Success
|
|
@@ -8923,8 +9119,15 @@ export const zUpdateFormAssignmentTriggerResponse = zAssetsFormAssignmentTrigger
|
|
|
8923
9119
|
export const zListInventoriesQuery = z.object({
|
|
8924
9120
|
'filter[assets_item_id]': z.string().optional(),
|
|
8925
9121
|
'filter[assets_site_id]': z.string().optional(),
|
|
9122
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
9123
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
9124
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
9125
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
8926
9126
|
filter: z.string().optional(),
|
|
8927
|
-
'filter[unexpected]': z.string().optional()
|
|
9127
|
+
'filter[unexpected]': z.string().optional(),
|
|
9128
|
+
'page[cursor]': z.string().optional(),
|
|
9129
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9130
|
+
page: z.string().optional()
|
|
8928
9131
|
});
|
|
8929
9132
|
/**
|
|
8930
9133
|
* Success
|
|
@@ -9474,8 +9677,15 @@ export const zUpdateSubLocationPath = z.object({
|
|
|
9474
9677
|
export const zUpdateSubLocationResponse = zAssetsSubLocationResponseObject;
|
|
9475
9678
|
export const zListTransfersQuery = z.object({
|
|
9476
9679
|
'filter[status]': z.string().optional(),
|
|
9680
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
9681
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
9682
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
9683
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
9477
9684
|
filter: z.string().optional(),
|
|
9478
|
-
'filter[unexpected]': z.string().optional()
|
|
9685
|
+
'filter[unexpected]': z.string().optional(),
|
|
9686
|
+
'page[cursor]': z.string().optional(),
|
|
9687
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9688
|
+
page: z.string().optional()
|
|
9479
9689
|
});
|
|
9480
9690
|
/**
|
|
9481
9691
|
* Success
|
|
@@ -9847,6 +10057,10 @@ export const zListAssessmentsQuery = z.object({
|
|
|
9847
10057
|
'decided'
|
|
9848
10058
|
]).optional(),
|
|
9849
10059
|
'filter[outcome]': z.enum(['competent', 'not_yet_competent']).nullish(),
|
|
10060
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10061
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10062
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10063
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
9850
10064
|
filter: z.string().optional(),
|
|
9851
10065
|
'filter[unexpected]': z.string().optional()
|
|
9852
10066
|
});
|
|
@@ -9869,11 +10083,15 @@ export const zListAssessmentCriteriaPath = z.object({
|
|
|
9869
10083
|
assessment_id: z.string()
|
|
9870
10084
|
});
|
|
9871
10085
|
export const zListAssessmentCriteriaQuery = z.object({
|
|
10086
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10087
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10088
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10089
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
9872
10090
|
filter: z.string().optional(),
|
|
9873
10091
|
'filter[unexpected]': z.string().optional()
|
|
9874
10092
|
});
|
|
9875
10093
|
/**
|
|
9876
|
-
*
|
|
10094
|
+
* Success
|
|
9877
10095
|
*/
|
|
9878
10096
|
export const zListAssessmentCriteriaResponse = z.object({
|
|
9879
10097
|
meta: zMeta,
|
|
@@ -9898,6 +10116,8 @@ export const zListEvidenceItemsQuery = z.object({
|
|
|
9898
10116
|
'form_submission',
|
|
9899
10117
|
'certification'
|
|
9900
10118
|
]).optional(),
|
|
10119
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10120
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
9901
10121
|
filter: z.string().optional(),
|
|
9902
10122
|
'filter[unexpected]': z.string().optional()
|
|
9903
10123
|
});
|
|
@@ -9983,6 +10203,10 @@ export const zListLevelsPath = z.object({
|
|
|
9983
10203
|
version_id: z.string()
|
|
9984
10204
|
});
|
|
9985
10205
|
export const zListLevelsQuery = z.object({
|
|
10206
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10207
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10208
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10209
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
9986
10210
|
filter: z.string().optional(),
|
|
9987
10211
|
'filter[unexpected]': z.string().optional()
|
|
9988
10212
|
});
|
|
@@ -10047,6 +10271,10 @@ export const zListKeyActivitiesPath = z.object({
|
|
|
10047
10271
|
level_id: z.string()
|
|
10048
10272
|
});
|
|
10049
10273
|
export const zListKeyActivitiesQuery = z.object({
|
|
10274
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10275
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10276
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10277
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
10050
10278
|
filter: z.string().optional(),
|
|
10051
10279
|
'filter[unexpected]': z.string().optional()
|
|
10052
10280
|
});
|
|
@@ -10117,6 +10345,10 @@ export const zListCriteriaPath = z.object({
|
|
|
10117
10345
|
key_activity_id: z.string()
|
|
10118
10346
|
});
|
|
10119
10347
|
export const zListCriteriaQuery = z.object({
|
|
10348
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10349
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10350
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10351
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
10120
10352
|
filter: z.string().optional(),
|
|
10121
10353
|
'filter[unexpected]': z.string().optional()
|
|
10122
10354
|
});
|
|
@@ -10189,6 +10421,10 @@ export const zListQualificationsQuery = z.object({
|
|
|
10189
10421
|
'filter[candidate_user_id]': z.string().optional(),
|
|
10190
10422
|
'filter[competencies_standard_id]': z.string().optional(),
|
|
10191
10423
|
'filter[level_sort_order]': z.int().optional(),
|
|
10424
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10425
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10426
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10427
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
10192
10428
|
filter: z.string().optional(),
|
|
10193
10429
|
'filter[unexpected]': z.string().optional(),
|
|
10194
10430
|
'page[cursor]': z.string().optional(),
|
|
@@ -10356,6 +10592,10 @@ export const zListChecksQuery = z.object({
|
|
|
10356
10592
|
'filter[assignee_user_id]': z.string().optional(),
|
|
10357
10593
|
'filter[time_due][gte]': z.iso.datetime().optional(),
|
|
10358
10594
|
'filter[time_due][lte]': z.iso.datetime().optional(),
|
|
10595
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10596
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10597
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10598
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
10359
10599
|
filter: z.string().optional(),
|
|
10360
10600
|
'filter[unexpected]': z.string().optional(),
|
|
10361
10601
|
'page[cursor]': z.string().optional(),
|
|
@@ -10520,6 +10760,13 @@ export const zCreateFormSubmissionBody = zFormSubmissionCreateParameters;
|
|
|
10520
10760
|
* Created
|
|
10521
10761
|
*/
|
|
10522
10762
|
export const zCreateFormSubmissionResponse = zFormSubmissionResponseObject;
|
|
10763
|
+
export const zDeleteFormSubmissionPath = z.object({
|
|
10764
|
+
id: z.string()
|
|
10765
|
+
});
|
|
10766
|
+
/**
|
|
10767
|
+
* No Content
|
|
10768
|
+
*/
|
|
10769
|
+
export const zDeleteFormSubmissionResponse = z.void();
|
|
10523
10770
|
export const zGetFormSubmissionPath = z.object({
|
|
10524
10771
|
id: z.string()
|
|
10525
10772
|
});
|
|
@@ -10527,6 +10774,14 @@ export const zGetFormSubmissionPath = z.object({
|
|
|
10527
10774
|
* Success
|
|
10528
10775
|
*/
|
|
10529
10776
|
export const zGetFormSubmissionResponse = zFormSubmissionResponseObject;
|
|
10777
|
+
export const zUpdateFormSubmissionBody = zFormSubmissionUpdateParameters;
|
|
10778
|
+
export const zUpdateFormSubmissionPath = z.object({
|
|
10779
|
+
id: z.string()
|
|
10780
|
+
});
|
|
10781
|
+
/**
|
|
10782
|
+
* Success
|
|
10783
|
+
*/
|
|
10784
|
+
export const zUpdateFormSubmissionResponse = zFormSubmissionResponseObject;
|
|
10530
10785
|
export const zListGroupUsersPath = z.object({
|
|
10531
10786
|
group_id: z.string()
|
|
10532
10787
|
});
|
|
@@ -10769,6 +11024,22 @@ export const zListGoodFaithEffortExceptionsQuery = z.object({
|
|
|
10769
11024
|
* Success
|
|
10770
11025
|
*/
|
|
10771
11026
|
export const zListGoodFaithEffortExceptionsResponse = zJobGoodFaithEffortExceptionsResponseObject;
|
|
11027
|
+
export const zCreateGoodFaithEffortExceptionBody = zJobGoodFaithEffortExceptionParameters;
|
|
11028
|
+
export const zCreateGoodFaithEffortExceptionPath = z.object({
|
|
11029
|
+
job_id: z.string()
|
|
11030
|
+
});
|
|
11031
|
+
/**
|
|
11032
|
+
* Created
|
|
11033
|
+
*/
|
|
11034
|
+
export const zCreateGoodFaithEffortExceptionResponse = zJobGoodFaithEffortExceptionResponseObject;
|
|
11035
|
+
export const zDeleteGoodFaithEffortExceptionPath = z.object({
|
|
11036
|
+
job_id: z.string(),
|
|
11037
|
+
id: z.string()
|
|
11038
|
+
});
|
|
11039
|
+
/**
|
|
11040
|
+
* No Content
|
|
11041
|
+
*/
|
|
11042
|
+
export const zDeleteGoodFaithEffortExceptionResponse = z.void();
|
|
10772
11043
|
export const zGetGoodFaithEffortExceptionPath = z.object({
|
|
10773
11044
|
job_id: z.string(),
|
|
10774
11045
|
id: z.string()
|
|
@@ -10777,6 +11048,15 @@ export const zGetGoodFaithEffortExceptionPath = z.object({
|
|
|
10777
11048
|
* Success
|
|
10778
11049
|
*/
|
|
10779
11050
|
export const zGetGoodFaithEffortExceptionResponse = zJobGoodFaithEffortExceptionResponseObject;
|
|
11051
|
+
export const zUpdateGoodFaithEffortExceptionBody = zJobGoodFaithEffortExceptionUpdateParameters;
|
|
11052
|
+
export const zUpdateGoodFaithEffortExceptionPath = z.object({
|
|
11053
|
+
job_id: z.string(),
|
|
11054
|
+
id: z.string()
|
|
11055
|
+
});
|
|
11056
|
+
/**
|
|
11057
|
+
* Success
|
|
11058
|
+
*/
|
|
11059
|
+
export const zUpdateGoodFaithEffortExceptionResponse = zJobGoodFaithEffortExceptionResponseObject;
|
|
10780
11060
|
export const zListCurePaymentsPath = z.object({
|
|
10781
11061
|
job_id: z.string()
|
|
10782
11062
|
});
|
|
@@ -10791,6 +11071,22 @@ export const zListCurePaymentsQuery = z.object({
|
|
|
10791
11071
|
* Success
|
|
10792
11072
|
*/
|
|
10793
11073
|
export const zListCurePaymentsResponse = zJobCurePaymentsResponseObject;
|
|
11074
|
+
export const zCreateCurePaymentBody = zJobCurePaymentParameters;
|
|
11075
|
+
export const zCreateCurePaymentPath = z.object({
|
|
11076
|
+
job_id: z.string()
|
|
11077
|
+
});
|
|
11078
|
+
/**
|
|
11079
|
+
* Created
|
|
11080
|
+
*/
|
|
11081
|
+
export const zCreateCurePaymentResponse = zJobCurePaymentResponseObject;
|
|
11082
|
+
export const zDeleteCurePaymentPath = z.object({
|
|
11083
|
+
job_id: z.string(),
|
|
11084
|
+
id: z.string()
|
|
11085
|
+
});
|
|
11086
|
+
/**
|
|
11087
|
+
* No Content
|
|
11088
|
+
*/
|
|
11089
|
+
export const zDeleteCurePaymentResponse = z.void();
|
|
10794
11090
|
export const zGetCurePaymentPath = z.object({
|
|
10795
11091
|
job_id: z.string(),
|
|
10796
11092
|
id: z.string()
|
|
@@ -10799,6 +11095,15 @@ export const zGetCurePaymentPath = z.object({
|
|
|
10799
11095
|
* Success
|
|
10800
11096
|
*/
|
|
10801
11097
|
export const zGetCurePaymentResponse = zJobCurePaymentResponseObject;
|
|
11098
|
+
export const zUpdateCurePaymentBody = zJobCurePaymentUpdateParameters;
|
|
11099
|
+
export const zUpdateCurePaymentPath = z.object({
|
|
11100
|
+
job_id: z.string(),
|
|
11101
|
+
id: z.string()
|
|
11102
|
+
});
|
|
11103
|
+
/**
|
|
11104
|
+
* Success
|
|
11105
|
+
*/
|
|
11106
|
+
export const zUpdateCurePaymentResponse = zJobCurePaymentResponseObject;
|
|
10802
11107
|
export const zCreateJobTradeBody = zPwaTradeParameters;
|
|
10803
11108
|
export const zCreateJobTradePath = z.object({
|
|
10804
11109
|
job_id: z.string()
|
|
@@ -13929,6 +14234,11 @@ export const zListTimeOffRequestsQuery = z.object({
|
|
|
13929
14234
|
* Success
|
|
13930
14235
|
*/
|
|
13931
14236
|
export const zListTimeOffRequestsResponse = zTimeOffRequestsResponseObject;
|
|
14237
|
+
export const zCreateTimeOffRequestBody = zTimeOffRequestParameters;
|
|
14238
|
+
/**
|
|
14239
|
+
* Created
|
|
14240
|
+
*/
|
|
14241
|
+
export const zCreateTimeOffRequestResponse = zTimeOffRequestResponseObject;
|
|
13932
14242
|
export const zGetTimeOffRequestPath = z.object({
|
|
13933
14243
|
id: z.string()
|
|
13934
14244
|
});
|
|
@@ -13936,6 +14246,14 @@ export const zGetTimeOffRequestPath = z.object({
|
|
|
13936
14246
|
* Success
|
|
13937
14247
|
*/
|
|
13938
14248
|
export const zGetTimeOffRequestResponse = zTimeOffRequestResponseObject;
|
|
14249
|
+
export const zCreateReviewBody = zTimeOffRequestReviewParameters;
|
|
14250
|
+
export const zCreateReviewPath = z.object({
|
|
14251
|
+
time_off_request_id: z.string()
|
|
14252
|
+
});
|
|
14253
|
+
/**
|
|
14254
|
+
* Created
|
|
14255
|
+
*/
|
|
14256
|
+
export const zCreateReviewResponse = zTimeOffRequestResponseObject;
|
|
13939
14257
|
export const zListTimeSessionsQuery = z.object({
|
|
13940
14258
|
'filter[user_id]': z.string().optional(),
|
|
13941
14259
|
'filter[job_id]': z.string().optional(),
|