@dsptch-work/api-client 0.25.0 → 0.27.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 +64 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +591 -96
- package/dist/gen/sdk.gen.js +869 -136
- package/dist/gen/types.gen.d.ts +2386 -424
- package/dist/gen/zod.gen.d.ts +2656 -673
- package/dist/gen/zod.gen.js +1202 -256
- package/package.json +1 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -136,6 +136,12 @@ export const zProblem = z.object({
|
|
|
136
136
|
*
|
|
137
137
|
* The credential is valid, but this action on this record is refused by policy. The operation is not available to this principal.
|
|
138
138
|
*
|
|
139
|
+
* ### forbidden_key
|
|
140
|
+
*
|
|
141
|
+
* **Field Not Writable By Key**
|
|
142
|
+
*
|
|
143
|
+
* The request body carries a field the operation accepts, but the user this user-scoped API key acts for may not write it, as their role could not in the DSPTCH app. Nothing was written. Remove the fields the detail names, or send the write with a key whose user may write them.
|
|
144
|
+
*
|
|
139
145
|
* ### insufficient_api_key_scope
|
|
140
146
|
*
|
|
141
147
|
* **Insufficient API Key Scope**
|
|
@@ -170,6 +176,12 @@ export const zProblem = z.object({
|
|
|
170
176
|
*
|
|
171
177
|
* The parent already has an import that has not reported yet. Acceptance is synchronous but the write happens in the background, so a second file would be validated against records the queued import has not written to yet and both would apply. Poll the earlier import until it reports, then submit again.
|
|
172
178
|
*
|
|
179
|
+
* ### pay_schedule_already_exists
|
|
180
|
+
*
|
|
181
|
+
* **Pay Schedule Already Exists**
|
|
182
|
+
*
|
|
183
|
+
* The company already has a pay schedule, including one starting in the future or ending in the past. Use the existing schedule instead of creating another.
|
|
184
|
+
*
|
|
173
185
|
* ### product_archived
|
|
174
186
|
*
|
|
175
187
|
* **Product Archived**
|
|
@@ -364,11 +376,13 @@ export const zProblemTypeCatalog = z.enum([
|
|
|
364
376
|
'unauthorized',
|
|
365
377
|
'company_scoped_key_required',
|
|
366
378
|
'forbidden',
|
|
379
|
+
'forbidden_key',
|
|
367
380
|
'insufficient_api_key_scope',
|
|
368
381
|
'user_scoped_key_required',
|
|
369
382
|
'not_found',
|
|
370
383
|
'already_terminated',
|
|
371
384
|
'import_in_progress',
|
|
385
|
+
'pay_schedule_already_exists',
|
|
372
386
|
'product_archived',
|
|
373
387
|
'recorded_since_termination',
|
|
374
388
|
'span_beyond_timeline_end',
|
|
@@ -715,7 +729,7 @@ export const zApprenticeshipProgramEmployerParameters = z.object({
|
|
|
715
729
|
require_timecard_allocation: z.boolean().optional()
|
|
716
730
|
});
|
|
717
731
|
/**
|
|
718
|
-
* Update an employer authorization in a program. Send only the fields to change; only the program's sponsor may manage this roster, and
|
|
732
|
+
* Update an employer authorization in a program. Send only the fields to change; only the program's sponsor may manage this roster, and a company-scoped key may change only the row naming its own company.
|
|
719
733
|
*/
|
|
720
734
|
export const zApprenticeshipProgramEmployerUpdateParameters = z.object({
|
|
721
735
|
company_id: z.string().optional(),
|
|
@@ -1004,10 +1018,6 @@ export const zPeopleEmploymentUpdateParameters = z.object({
|
|
|
1004
1018
|
payroll_id: z.string().nullish(),
|
|
1005
1019
|
enrolled_in_t_and_a: z.boolean().optional()
|
|
1006
1020
|
});
|
|
1007
|
-
export const zPeopleEmploymentCustomFieldResponseObject = z.object({
|
|
1008
|
-
custom_field_config_id: z.string(),
|
|
1009
|
-
value: z.string().nullable()
|
|
1010
|
-
});
|
|
1011
1021
|
/**
|
|
1012
1022
|
* Update stored custom-field values for one employment family in a single batch. The batch must contain at least one row. Omitted configurations keep their values, and an explicit null is stored.
|
|
1013
1023
|
*/
|
|
@@ -1284,7 +1294,7 @@ export const zPerDiemUpdateParameters = z.object({
|
|
|
1284
1294
|
timekeeping_timecode_ids: z.array(z.string()).optional()
|
|
1285
1295
|
});
|
|
1286
1296
|
/**
|
|
1287
|
-
* The
|
|
1297
|
+
* The filled attribute values of a product or item — one entry per attribute its category makes fillable on that record.
|
|
1288
1298
|
*/
|
|
1289
1299
|
export const zAssetsAttributeValueObjects = z.array(z.object({
|
|
1290
1300
|
assets_attribute_id: z.string(),
|
|
@@ -1499,7 +1509,39 @@ export const zAttestationConfigParameters = z.object({
|
|
|
1499
1509
|
us_state_id: z.string().nullish()
|
|
1500
1510
|
});
|
|
1501
1511
|
/**
|
|
1502
|
-
*
|
|
1512
|
+
* Create the company's first pay schedule. Time and payroll modes inherit company defaults.
|
|
1513
|
+
*/
|
|
1514
|
+
export const zPayPeriodConfigParameters = z.object({
|
|
1515
|
+
effective_date: z.iso.date(),
|
|
1516
|
+
frequency: z.enum(['weekly', 'biweekly']),
|
|
1517
|
+
start_day_of_week: z.union([
|
|
1518
|
+
z.literal(0),
|
|
1519
|
+
z.literal(1),
|
|
1520
|
+
z.literal(2),
|
|
1521
|
+
z.literal(3),
|
|
1522
|
+
z.literal(4),
|
|
1523
|
+
z.literal(5),
|
|
1524
|
+
z.literal(6)
|
|
1525
|
+
]),
|
|
1526
|
+
tz_name: z.string(),
|
|
1527
|
+
currency: z.string().optional().default('USD'),
|
|
1528
|
+
rounding_interval: z.union([z.literal(1), z.literal(15)]).optional().default(1),
|
|
1529
|
+
payroll_system: z.enum([
|
|
1530
|
+
'rippling',
|
|
1531
|
+
'quickbooks_online',
|
|
1532
|
+
'paychex',
|
|
1533
|
+
'gusto'
|
|
1534
|
+
]).nullish(),
|
|
1535
|
+
paid_after_holiday: z.boolean().optional().default(true),
|
|
1536
|
+
arrear_days: z.int().gte(0),
|
|
1537
|
+
pay_run_deadline_days: z.int().gte(1),
|
|
1538
|
+
pay_run_deadline_clock_time: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/),
|
|
1539
|
+
approvals_deadline_days: z.int().gte(0),
|
|
1540
|
+
approvals_deadline_clock_time: z.string().regex(/^([01][0-9]|2[0-3]):[0-5][0-9]$/),
|
|
1541
|
+
time_card_auto_lock_days: z.int().nullish()
|
|
1542
|
+
});
|
|
1543
|
+
/**
|
|
1544
|
+
* A pay schedule (PayPeriodConfig) — the top-level timekeeping unit that sets a company's payroll cadence and tracking modes and generates its stream of pay periods. Reads return the version valid at the requested time; create returns the new schedule, keyed by its stable id.
|
|
1503
1545
|
*/
|
|
1504
1546
|
export const zPayPeriodConfigResponseObject = z.object({
|
|
1505
1547
|
id: z.string(),
|
|
@@ -1748,7 +1790,7 @@ export const zPwaCompanyUserDetailsResponseObject = z.object({
|
|
|
1748
1790
|
])).nullable()
|
|
1749
1791
|
});
|
|
1750
1792
|
/**
|
|
1751
|
-
* Create a worker's PWA compliance details at a company. The company is taken from the API key. user_id names the worker and is required; every other field is optional — send whichever your jurisdiction's certified-payroll export requires.
|
|
1793
|
+
* Create a worker's PWA compliance details at a company. The company is taken from the API key. user_id names the worker and is required; every other field is optional — send whichever your jurisdiction's certified-payroll export requires.
|
|
1752
1794
|
*/
|
|
1753
1795
|
export const zPwaCompanyUserDetailsParameters = z.object({
|
|
1754
1796
|
user_id: z.string(),
|
|
@@ -1841,7 +1883,7 @@ export const zPwaCompanyUserDetailsParameters = z.object({
|
|
|
1841
1883
|
])).nullish()
|
|
1842
1884
|
});
|
|
1843
1885
|
/**
|
|
1844
|
-
* Update a worker's PWA compliance details. The company is taken from the API key. Every field is optional — send only what changes, and omitted fields are left unchanged.
|
|
1886
|
+
* Update a worker's PWA compliance details. The company is taken from the API key. Every field is optional — send only what changes, and omitted fields are left unchanged. The company/user pair is fixed at creation.
|
|
1845
1887
|
*/
|
|
1846
1888
|
export const zPwaCompanyUserDetailsUpdateParameters = z.object({
|
|
1847
1889
|
address1: z.string().nullish(),
|
|
@@ -2121,7 +2163,6 @@ export const zManagerTimeEntryApprovalParameters = z.object({
|
|
|
2121
2163
|
* The time-entry body fields shared by the create and update bodies; each of those declares its own requiredness.
|
|
2122
2164
|
*/
|
|
2123
2165
|
export const zTimeEntryParameters = z.object({
|
|
2124
|
-
timekeeping_time_card_id: z.string().optional(),
|
|
2125
2166
|
start_time: z.iso.datetime().optional(),
|
|
2126
2167
|
end_time: z.iso.datetime().optional(),
|
|
2127
2168
|
job_id: z.string().nullish(),
|
|
@@ -2132,9 +2173,10 @@ export const zTimeEntryParameters = z.object({
|
|
|
2132
2173
|
feature_ids: z.array(z.string()).nullish()
|
|
2133
2174
|
});
|
|
2134
2175
|
/**
|
|
2135
|
-
* Request body for creating a time entry — the time_entry_parameters fields
|
|
2176
|
+
* Request body for creating a time entry — the time_entry_parameters fields plus the time card and the explicit "no feature" acknowledgement. timekeeping_time_card_id, start_time, and end_time are required.
|
|
2136
2177
|
*/
|
|
2137
2178
|
export const zTimeEntryCreateParameters = zTimeEntryParameters.and(z.object({
|
|
2179
|
+
timekeeping_time_card_id: z.string(),
|
|
2138
2180
|
feature_allocation_acknowledged: z.boolean().nullish()
|
|
2139
2181
|
}));
|
|
2140
2182
|
/**
|
|
@@ -2143,6 +2185,25 @@ export const zTimeEntryCreateParameters = zTimeEntryParameters.and(z.object({
|
|
|
2143
2185
|
export const zTimeEntryUpdateParameters = zTimeEntryParameters.and(z.object({
|
|
2144
2186
|
confirm_allocation_conflict: z.boolean().nullish()
|
|
2145
2187
|
}));
|
|
2188
|
+
/**
|
|
2189
|
+
* A form definition — a SurveyJS form template built and versioned in the web app's form builder. The same object the list door serializes. Read-only.
|
|
2190
|
+
*/
|
|
2191
|
+
export const zFormDefinitionObject = z.object({
|
|
2192
|
+
id: z.string(),
|
|
2193
|
+
name: z.string(),
|
|
2194
|
+
description: z.string(),
|
|
2195
|
+
company_id: z.string(),
|
|
2196
|
+
modified_by_user_id: z.string().nullable(),
|
|
2197
|
+
tags: z.array(z.string()).nullable(),
|
|
2198
|
+
title_keys: z.array(z.string()).nullable(),
|
|
2199
|
+
editable: z.boolean(),
|
|
2200
|
+
always_visible: z.boolean(),
|
|
2201
|
+
sensitive_form: z.boolean(),
|
|
2202
|
+
allow_carry_forward: z.boolean(),
|
|
2203
|
+
current_revision: z.int().nullable(),
|
|
2204
|
+
json: z.record(z.string(), z.unknown()),
|
|
2205
|
+
created_at: z.iso.datetime()
|
|
2206
|
+
});
|
|
2146
2207
|
/**
|
|
2147
2208
|
* A single form submission — a user's completed SurveyJS form with the resolved answers (the fuller show representation). Read-only; submissions are created in the app.
|
|
2148
2209
|
*/
|
|
@@ -2379,6 +2440,13 @@ export const zCompanyParameters = z.intersection(z.union([
|
|
|
2379
2440
|
naics_code: z.string().nullish(),
|
|
2380
2441
|
linkedin_url: z.string().nullish()
|
|
2381
2442
|
}));
|
|
2443
|
+
/**
|
|
2444
|
+
* A custom-field value stored on a record, addressed by the configuration it belongs to.
|
|
2445
|
+
*/
|
|
2446
|
+
export const zCustomFieldResponseObject = z.object({
|
|
2447
|
+
custom_field_config_id: z.string(),
|
|
2448
|
+
value: z.string().nullable()
|
|
2449
|
+
});
|
|
2382
2450
|
/**
|
|
2383
2451
|
* 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.
|
|
2384
2452
|
*/
|
|
@@ -2446,17 +2514,16 @@ export const zTimeCardStartDay = z.union([
|
|
|
2446
2514
|
z.literal(6)
|
|
2447
2515
|
]);
|
|
2448
2516
|
/**
|
|
2449
|
-
* Fields shared by job creation and updates. Updates may omit any field to preserve its current value. The resulting job must still satisfy its schedule and PWA validation rules.
|
|
2517
|
+
* Fields shared by job creation and updates. Updates may omit any field to preserve its current value. The resulting job must still satisfy its schedule and PWA validation rules.
|
|
2450
2518
|
*/
|
|
2451
2519
|
export const zJobParameters = z.object({
|
|
2452
|
-
template_id: z.string().nullish(),
|
|
2453
2520
|
name: z.string().nullish(),
|
|
2454
2521
|
description: z.string().optional(),
|
|
2455
2522
|
requested_by_company_id: z.string().optional(),
|
|
2456
|
-
created_by_user_id: z.string().optional(),
|
|
2457
2523
|
manager_user_ids: z.array(z.string()).nullish(),
|
|
2458
2524
|
purchase_order_number: z.string().nullish(),
|
|
2459
2525
|
project_id: z.string().nullish(),
|
|
2526
|
+
companies_department_id: z.string().nullish(),
|
|
2460
2527
|
federal_pwa_mode: z.enum([
|
|
2461
2528
|
'all',
|
|
2462
2529
|
'pw_only',
|
|
@@ -2508,10 +2575,6 @@ export const zJobParameters = z.object({
|
|
|
2508
2575
|
verified: z.boolean().nullish(),
|
|
2509
2576
|
label: z.string().nullish()
|
|
2510
2577
|
}).nullish(),
|
|
2511
|
-
custom_fields_attributes: z.array(z.object({
|
|
2512
|
-
custom_field_config_id: z.string(),
|
|
2513
|
-
value: z.string().nullish()
|
|
2514
|
-
})).nullish(),
|
|
2515
2578
|
pwa_details: z.object({
|
|
2516
2579
|
contractor_type: z.enum(['prime_contractor', 'sub_contractor']).nullish(),
|
|
2517
2580
|
pay_full_cash_fringe_by_default: z.boolean().optional(),
|
|
@@ -2532,18 +2595,29 @@ export const zJobParameters = z.object({
|
|
|
2532
2595
|
}).optional()
|
|
2533
2596
|
});
|
|
2534
2597
|
/**
|
|
2535
|
-
* Parameters for creating a job. `requested_by_company_id` and `created_by_user_id` are required. Sets the job's schedule, work types, address, and optional Prevailing Wage / Apprenticeship (PWA) compliance.
|
|
2598
|
+
* Parameters for creating a job. `requested_by_company_id` and `created_by_user_id` are required. Sets the job's schedule, work types, address, custom-field values, and optional Prevailing Wage / Apprenticeship (PWA) compliance.
|
|
2536
2599
|
*/
|
|
2537
|
-
export const zJobCreateParameters = zJobParameters.and(z.
|
|
2600
|
+
export const zJobCreateParameters = zJobParameters.and(z.object({
|
|
2601
|
+
created_by_user_id: z.string(),
|
|
2602
|
+
template_id: z.string().nullish(),
|
|
2603
|
+
custom_fields: z.array(z.object({
|
|
2604
|
+
custom_field_config_id: z.string(),
|
|
2605
|
+
value: z.string().nullable()
|
|
2606
|
+
})).optional()
|
|
2607
|
+
}));
|
|
2538
2608
|
/**
|
|
2539
|
-
* Parameters for updating an existing job. Every field is optional; omit a field to preserve its current value. The resulting job must still satisfy schedule and PWA validation rules. Accepts every shared job field plus a directly settable status.
|
|
2609
|
+
* Parameters for updating an existing job. Every field is optional; omit a field to preserve its current value. The resulting job must still satisfy schedule and PWA validation rules. Accepts every shared job field plus a directly settable status and custom-field changes. Sending `created_by_user_id` returns 400 unknown_key, including when it matches the existing creator or is null.
|
|
2540
2610
|
*/
|
|
2541
2611
|
export const zJobUpdateParameters = zJobParameters.and(z.object({
|
|
2542
2612
|
status: z.enum([
|
|
2543
2613
|
'completed',
|
|
2544
2614
|
'cancelled',
|
|
2545
2615
|
'disputed'
|
|
2546
|
-
]).optional()
|
|
2616
|
+
]).optional(),
|
|
2617
|
+
custom_fields: z.array(z.object({
|
|
2618
|
+
custom_field_config_id: z.string(),
|
|
2619
|
+
value: z.string().nullable()
|
|
2620
|
+
})).optional()
|
|
2547
2621
|
}));
|
|
2548
2622
|
/**
|
|
2549
2623
|
* One version of a worker's compensation at your company, effective from its start date until the next version begins.
|
|
@@ -2998,7 +3072,6 @@ export const zPayrollFringeBenefitPlanParameters = z.object({
|
|
|
2998
3072
|
* Request body for updating a fringe-benefit plan. Send only the fields to change.
|
|
2999
3073
|
*/
|
|
3000
3074
|
export const zPayrollFringeBenefitPlanUpdateParameters = z.object({
|
|
3001
|
-
timekeeping_pay_period_config_id: z.string().optional(),
|
|
3002
3075
|
name: z.string().optional(),
|
|
3003
3076
|
plan_number: z.string().optional(),
|
|
3004
3077
|
funded: z.boolean().optional(),
|
|
@@ -3143,7 +3216,7 @@ export const zPayrollRunResponseObject = z.object({
|
|
|
3143
3216
|
updated_at: z.iso.datetime()
|
|
3144
3217
|
});
|
|
3145
3218
|
/**
|
|
3146
|
-
* Create a payroll run.
|
|
3219
|
+
* Create a payroll run. Company-scoped keys and company-admin user-scoped keys accept the same fields. Manager and technician user keys cannot create runs. company_id, run_type, and run_date are required; an on-cycle run additionally requires timekeeping_pay_period_id.
|
|
3147
3220
|
*/
|
|
3148
3221
|
export const zPayrollRunParameters = z.object({
|
|
3149
3222
|
company_id: z.string(),
|
|
@@ -3161,7 +3234,7 @@ export const zPayrollRunParameters = z.object({
|
|
|
3161
3234
|
external_id: z.string().nullish()
|
|
3162
3235
|
});
|
|
3163
3236
|
/**
|
|
3164
|
-
* Update a payroll run.
|
|
3237
|
+
* Update a payroll run. Company-scoped keys and company-admin user-scoped keys accept the same fields. Manager and technician user keys cannot update runs. Every field is optional — send only what changes. The run's company is fixed at creation.
|
|
3165
3238
|
*/
|
|
3166
3239
|
export const zPayrollRunUpdateParameters = z.object({
|
|
3167
3240
|
timekeeping_pay_period_id: z.string().nullish(),
|
|
@@ -3261,7 +3334,6 @@ export const zProjectUpdateParameters = z.object({
|
|
|
3261
3334
|
external_id: z.string().nullish(),
|
|
3262
3335
|
name: z.string().optional(),
|
|
3263
3336
|
description: z.string().nullish(),
|
|
3264
|
-
created_by_user_id: z.string().nullish(),
|
|
3265
3337
|
parent_id: z.string().nullish(),
|
|
3266
3338
|
participating_company_ids: z.array(z.string()).optional(),
|
|
3267
3339
|
start_date: z.iso.date().nullish(),
|
|
@@ -3290,6 +3362,27 @@ export const zProjectUpdateParameters = z.object({
|
|
|
3290
3362
|
beginning_of_construction_date: z.iso.date().nullish(),
|
|
3291
3363
|
placed_in_service_date: z.iso.date().nullish()
|
|
3292
3364
|
});
|
|
3365
|
+
/**
|
|
3366
|
+
* 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.
|
|
3367
|
+
*/
|
|
3368
|
+
export const zProjectSiteResponseObject = z.object({
|
|
3369
|
+
id: z.string(),
|
|
3370
|
+
site_id: z.string(),
|
|
3371
|
+
feature_ids: z.array(z.string())
|
|
3372
|
+
});
|
|
3373
|
+
/**
|
|
3374
|
+
* Request body for attaching a site to a project. `site_id` is required; `feature_ids` is optional. The project is taken from the path and is not part of the body.
|
|
3375
|
+
*/
|
|
3376
|
+
export const zProjectSiteParameters = z.object({
|
|
3377
|
+
site_id: z.string(),
|
|
3378
|
+
feature_ids: z.array(z.string()).optional()
|
|
3379
|
+
});
|
|
3380
|
+
/**
|
|
3381
|
+
* Request body for replacing which of the site's features apply to this project. Every field is optional; omit a field to preserve its current value. `site_id` is create-only and an update that names it is rejected.
|
|
3382
|
+
*/
|
|
3383
|
+
export const zProjectSiteUpdateParameters = z.object({
|
|
3384
|
+
feature_ids: z.array(z.string()).optional()
|
|
3385
|
+
});
|
|
3293
3386
|
export const zSiteCheckInResponseObject = z.object({
|
|
3294
3387
|
id: z.string(),
|
|
3295
3388
|
site_id: z.string(),
|
|
@@ -3806,8 +3899,8 @@ export const zPaystubResponseObject = z.object({
|
|
|
3806
3899
|
* Request body for creating a paystub. payrolls_payroll_run_id and user_id are required; timekeeping_time_card_id is required for an on-cycle run and disallowed for an off-cycle run.
|
|
3807
3900
|
*/
|
|
3808
3901
|
export const zPaystubParameters = z.object({
|
|
3809
|
-
payrolls_payroll_run_id: z.string(),
|
|
3810
3902
|
user_id: z.string(),
|
|
3903
|
+
payrolls_payroll_run_id: z.string(),
|
|
3811
3904
|
timekeeping_time_card_id: z.string().nullish(),
|
|
3812
3905
|
external_id: z.string().nullish(),
|
|
3813
3906
|
check_number: z.string().nullish()
|
|
@@ -3817,7 +3910,6 @@ export const zPaystubParameters = z.object({
|
|
|
3817
3910
|
*/
|
|
3818
3911
|
export const zPaystubUpdateParameters = z.object({
|
|
3819
3912
|
payrolls_payroll_run_id: z.string().optional(),
|
|
3820
|
-
user_id: z.string().optional(),
|
|
3821
3913
|
timekeeping_time_card_id: z.string().nullish(),
|
|
3822
3914
|
external_id: z.string().nullish(),
|
|
3823
3915
|
check_number: z.string().nullish()
|
|
@@ -3862,6 +3954,21 @@ export const zPriorPeriodAdjustmentParameters = z.object({
|
|
|
3862
3954
|
notes: z.string().nullish(),
|
|
3863
3955
|
pwa_compliance_eligible: z.boolean().optional()
|
|
3864
3956
|
});
|
|
3957
|
+
/**
|
|
3958
|
+
* Request body for updating a prior period adjustment. Send only the fields to change. The time card is the path parent; payrolls_paystub_line_item_id, created_by_user_id, time_card_id, and adjustment_type are rejected.
|
|
3959
|
+
*/
|
|
3960
|
+
export const zPriorPeriodAdjustmentUpdateParameters = z.object({
|
|
3961
|
+
amount_cents: z.string().optional(),
|
|
3962
|
+
rationale: z.enum([
|
|
3963
|
+
'hours_correction',
|
|
3964
|
+
'other',
|
|
3965
|
+
'pwa_compliance',
|
|
3966
|
+
'rate_correction'
|
|
3967
|
+
]).optional(),
|
|
3968
|
+
job_id: z.string().nullish(),
|
|
3969
|
+
notes: z.string().nullish(),
|
|
3970
|
+
pwa_compliance_eligible: z.boolean().optional()
|
|
3971
|
+
});
|
|
3865
3972
|
/**
|
|
3866
3973
|
* What one PWA-tracked job on a time card still owes the worker, from the materialized prevailing-wage compliance view. Read-only.
|
|
3867
3974
|
*/
|
|
@@ -3999,168 +4106,37 @@ export const zPaystubLineItemUpdateParameters = z.object({
|
|
|
3999
4106
|
payrolls_external_map_id: z.string().optional()
|
|
4000
4107
|
});
|
|
4001
4108
|
/**
|
|
4002
|
-
* A
|
|
4003
|
-
*/
|
|
4004
|
-
export const zPayRatesRulePackageResponseObject = z.object({
|
|
4005
|
-
id: z.string(),
|
|
4006
|
-
name: z.string(),
|
|
4007
|
-
description: z.string().nullable(),
|
|
4008
|
-
scoped_to_job_id: z.string().nullable(),
|
|
4009
|
-
default: z.boolean(),
|
|
4010
|
-
selectable: z.boolean(),
|
|
4011
|
-
created_at: z.iso.datetime(),
|
|
4012
|
-
updated_at: z.iso.datetime()
|
|
4013
|
-
});
|
|
4014
|
-
/**
|
|
4015
|
-
* Parameters for creating a company-wide pay-rate rule package.
|
|
4016
|
-
*/
|
|
4017
|
-
export const zPayRatesRulePackageParameters = z.object({
|
|
4018
|
-
name: z.string().min(1),
|
|
4019
|
-
description: z.string().nullish()
|
|
4020
|
-
});
|
|
4021
|
-
/**
|
|
4022
|
-
* Request body for updating a pay-rate rule package. Send only the fields to change. `default`, `selectable`, and `scoped_to_job_id` are not writable on this operation.
|
|
4023
|
-
*/
|
|
4024
|
-
export const zPayRatesRulePackageUpdateParameters = z.object({
|
|
4025
|
-
name: z.string().min(1).optional(),
|
|
4026
|
-
description: z.string().nullish()
|
|
4027
|
-
});
|
|
4028
|
-
/**
|
|
4029
|
-
* Request body for creating or updating a position on a job. The job is taken from the URL path.
|
|
4030
|
-
*/
|
|
4031
|
-
export const zPositionParameters = z.object({
|
|
4032
|
-
job_id: z.string().optional(),
|
|
4033
|
-
fulfilled_by_user_id: z.string().nullish(),
|
|
4034
|
-
start_time: z.iso.datetime().nullish(),
|
|
4035
|
-
end_time: z.iso.datetime().nullish(),
|
|
4036
|
-
position_function_id: z.string().nullish(),
|
|
4037
|
-
per_diem_id: z.string().nullish(),
|
|
4038
|
-
per_diem_rate_cents: z.number().nullish(),
|
|
4039
|
-
pwa: z.boolean().optional(),
|
|
4040
|
-
cash_fringe_rate_cents: z.number().nullish(),
|
|
4041
|
-
hourly_rate_cents: z.number().nullish(),
|
|
4042
|
-
pwa_wage_pay_rate_cents: z.number().nullish(),
|
|
4043
|
-
wage_adder_rate_cents: z.number().nullish(),
|
|
4044
|
-
job_wage_determination_ids: z.array(z.string()).optional(),
|
|
4045
|
-
pwa_details_attributes: z.object({
|
|
4046
|
-
skill_level: z.string().nullish()
|
|
4047
|
-
}).optional()
|
|
4048
|
-
});
|
|
4049
|
-
/**
|
|
4050
|
-
* Parameters for creating a per-unit scope price on a job. `scope_kind` and `unit_price` are required.
|
|
4051
|
-
*/
|
|
4052
|
-
export const zProductionJobScopePriceParameters = z.object({
|
|
4053
|
-
scope_kind: z.string(),
|
|
4054
|
-
unit_price: z.string(),
|
|
4055
|
-
contracted_count: z.int().nullish(),
|
|
4056
|
-
unit_of_measure: z.string().optional()
|
|
4057
|
-
});
|
|
4058
|
-
/**
|
|
4059
|
-
* Parameters for updating a per-unit scope price on a job. Every field is optional; omit a field to preserve its current value. The resulting price must retain a scope kind and non-negative unit price.
|
|
4060
|
-
*/
|
|
4061
|
-
export const zProductionJobScopePriceUpdateParameters = z.object({
|
|
4062
|
-
scope_kind: z.string().optional(),
|
|
4063
|
-
unit_price: z.string().optional(),
|
|
4064
|
-
contracted_count: z.int().nullish(),
|
|
4065
|
-
unit_of_measure: z.string().optional()
|
|
4066
|
-
});
|
|
4067
|
-
/**
|
|
4068
|
-
* A per-unit billing price for one scope of work on a job. Production completions bill against these prices.
|
|
4109
|
+
* A job-site join — the Site attached to a Job, plus the subset of that site's features the job is working on. `{id}` is the join row, not the Site.
|
|
4069
4110
|
*/
|
|
4070
|
-
export const
|
|
4111
|
+
export const zJobSiteResponseObject = z.object({
|
|
4071
4112
|
id: z.string(),
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
unit_of_measure: z.string(),
|
|
4075
|
-
unit_price: z.string(),
|
|
4076
|
-
contracted_count: z.int().nullable(),
|
|
4077
|
-
created_at: z.iso.datetime(),
|
|
4078
|
-
updated_at: z.iso.datetime()
|
|
4113
|
+
site_id: z.string(),
|
|
4114
|
+
feature_ids: z.array(z.string())
|
|
4079
4115
|
});
|
|
4080
4116
|
/**
|
|
4081
|
-
*
|
|
4117
|
+
* Request body for attaching a site to a job. `site_id` is required; `feature_ids` is optional and defaults to none.
|
|
4082
4118
|
*/
|
|
4083
|
-
export const
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
notes: z.string().nullish(),
|
|
4087
|
-
work_date: z.iso.date().optional(),
|
|
4088
|
-
position_ids: z.array(z.string()).optional()
|
|
4119
|
+
export const zJobSiteParameters = z.object({
|
|
4120
|
+
site_id: z.string(),
|
|
4121
|
+
feature_ids: z.array(z.string()).optional()
|
|
4089
4122
|
});
|
|
4090
4123
|
/**
|
|
4091
|
-
*
|
|
4092
|
-
*/
|
|
4093
|
-
export const zProductionFeatureCompletionParameters = zProductionCompletionBaseParameters.and(z.object({
|
|
4094
|
-
completable_attributes: z.object({
|
|
4095
|
-
feature_id: z.string().optional()
|
|
4096
|
-
}).optional()
|
|
4097
|
-
}));
|
|
4098
|
-
/**
|
|
4099
|
-
* Payload for completions on quantity-tracked jobs (the scope price's job tracks production by quantity). feature_id is not accepted.
|
|
4100
|
-
*/
|
|
4101
|
-
export const zProductionQuantityCompletionParameters = zProductionCompletionBaseParameters.and(z.object({
|
|
4102
|
-
completable_attributes: z.object({
|
|
4103
|
-
quantity_completed: z.int().optional()
|
|
4104
|
-
}).optional()
|
|
4105
|
-
}));
|
|
4106
|
-
/**
|
|
4107
|
-
* A completion's payload shape follows the production tracking kind of the scope price's job — the server derives the completable subtype from the job, never from the request. Feature-tracked jobs record which feature was completed (feature payload); quantity-tracked jobs record how many units were completed (quantity payload). The two payloads are mutually exclusive: sending the other kind's completable key returns 422.
|
|
4108
|
-
*/
|
|
4109
|
-
export const zProductionCompletionParameters = z.union([
|
|
4110
|
-
zProductionFeatureCompletionParameters,
|
|
4111
|
-
zProductionQuantityCompletionParameters
|
|
4112
|
-
]);
|
|
4113
|
-
/**
|
|
4114
|
-
* A completion recorded on a feature-tracked job — a unit of scoped work finished by a crew, identifying which feature was completed.
|
|
4124
|
+
* Request body for replacing the features on an existing job-site join. `site_id` cannot be changed; send a new join to attach a different site.
|
|
4115
4125
|
*/
|
|
4116
|
-
export const
|
|
4117
|
-
|
|
4118
|
-
notes: z.string().nullable(),
|
|
4119
|
-
completable_type: z.enum(['Production::FeatureCompletion']),
|
|
4120
|
-
completable_id: z.string(),
|
|
4121
|
-
created_by_user_id: z.string(),
|
|
4122
|
-
production_job_scope_price_id: z.string(),
|
|
4123
|
-
job_id: z.string(),
|
|
4124
|
-
scope_kind: z.string(),
|
|
4125
|
-
unit_of_measure: z.string(),
|
|
4126
|
-
position_ids: z.array(z.string()),
|
|
4127
|
-
feature_id: z.string(),
|
|
4128
|
-
created_at: z.iso.datetime(),
|
|
4129
|
-
updated_at: z.iso.datetime(),
|
|
4130
|
-
work_date: z.iso.date()
|
|
4126
|
+
export const zJobSiteUpdateParameters = z.object({
|
|
4127
|
+
feature_ids: z.array(z.string()).optional()
|
|
4131
4128
|
});
|
|
4132
4129
|
/**
|
|
4133
|
-
* A completion
|
|
4130
|
+
* 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`.
|
|
4134
4131
|
*/
|
|
4135
|
-
export const
|
|
4132
|
+
export const zJobFormAssignmentResponseObject = z.object({
|
|
4136
4133
|
id: z.string(),
|
|
4137
|
-
notes: z.string().nullable(),
|
|
4138
|
-
completable_type: z.enum(['Production::QuantityCompletion']),
|
|
4139
|
-
completable_id: z.string(),
|
|
4140
|
-
created_by_user_id: z.string(),
|
|
4141
|
-
production_job_scope_price_id: z.string(),
|
|
4142
4134
|
job_id: z.string(),
|
|
4143
|
-
scope_kind: z.string(),
|
|
4144
|
-
unit_of_measure: z.string(),
|
|
4145
|
-
position_ids: z.array(z.string()),
|
|
4146
|
-
quantity_completed: z.int(),
|
|
4147
|
-
created_at: z.iso.datetime(),
|
|
4148
|
-
updated_at: z.iso.datetime(),
|
|
4149
|
-
work_date: z.iso.date()
|
|
4150
|
-
});
|
|
4151
|
-
/**
|
|
4152
|
-
* A recorded production completion. The completable_type discriminator selects the feature-tracked or quantity-tracked representation.
|
|
4153
|
-
*/
|
|
4154
|
-
export const zProductionCompletionResponseObject = z.discriminatedUnion('completable_type', [
|
|
4155
|
-
zProductionFeatureCompletionResponseObject.extend({ completable_type: z.literal('Production::FeatureCompletion') }),
|
|
4156
|
-
zProductionQuantityCompletionResponseObject.extend({ completable_type: z.literal('Production::QuantityCompletion') })
|
|
4157
|
-
]);
|
|
4158
|
-
/**
|
|
4159
|
-
* The form-assignment tasks created by one request — assigning a form to one or more users, each with a due time and optional recurrence and reminders. Returned as an array because a request can spread the assignment into one task per assignee.
|
|
4160
|
-
*/
|
|
4161
|
-
export const zFormAssignmentTaskResponseObject = z.array(z.object({
|
|
4162
|
-
id: z.string(),
|
|
4163
4135
|
form_definition_id: z.string(),
|
|
4136
|
+
name: z.string(),
|
|
4137
|
+
description: z.string().nullable(),
|
|
4138
|
+
tz_name: z.string(),
|
|
4139
|
+
time_due: z.iso.datetime().nullable(),
|
|
4164
4140
|
frequency: z.enum([
|
|
4165
4141
|
'DAILY',
|
|
4166
4142
|
'WORKDAILY',
|
|
@@ -4171,36 +4147,666 @@ export const zFormAssignmentTaskResponseObject = z.array(z.object({
|
|
|
4171
4147
|
'QUARTERLY'
|
|
4172
4148
|
]).nullable(),
|
|
4173
4149
|
recurrence_end_time: z.iso.datetime().nullable(),
|
|
4174
|
-
time_due: z.iso.datetime(),
|
|
4175
|
-
tz_name: z.string(),
|
|
4176
|
-
name: z.string(),
|
|
4177
|
-
description: z.string().nullable(),
|
|
4178
4150
|
task_assignee_user_ids: z.array(z.string()),
|
|
4179
4151
|
reminders: z.array(z.object({
|
|
4180
4152
|
offset: z.string(),
|
|
4181
4153
|
remind_at: z.iso.datetime()
|
|
4182
4154
|
}))
|
|
4183
|
-
}));
|
|
4184
|
-
/**
|
|
4185
|
-
* Request body for creating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only. Only the keys listed here are accepted — any other key is rejected with 400 unknown_key.
|
|
4186
|
-
*/
|
|
4187
|
-
export const zCertificationParameters = z.object({
|
|
4188
|
-
company_id: z.string(),
|
|
4189
|
-
name: z.string(),
|
|
4190
|
-
description: z.string().nullish(),
|
|
4191
|
-
verified: z.boolean().optional(),
|
|
4192
|
-
duration: z.string().nullish()
|
|
4193
4155
|
});
|
|
4194
4156
|
/**
|
|
4195
|
-
*
|
|
4157
|
+
* 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.
|
|
4196
4158
|
*/
|
|
4197
|
-
export const
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4159
|
+
export const zSiteFormAssignmentResponseObject = z.object({
|
|
4160
|
+
id: z.string(),
|
|
4161
|
+
site_id: z.string(),
|
|
4162
|
+
form_definition_id: z.string(),
|
|
4163
|
+
name: z.string(),
|
|
4164
|
+
description: z.string().nullable(),
|
|
4165
|
+
tz_name: z.string(),
|
|
4166
|
+
time_due: z.iso.datetime().nullable(),
|
|
4167
|
+
frequency: z.enum([
|
|
4168
|
+
'DAILY',
|
|
4169
|
+
'WORKDAILY',
|
|
4170
|
+
'WORKDAILYSIX',
|
|
4171
|
+
'WEEKLY',
|
|
4172
|
+
'BIWEEKLY',
|
|
4173
|
+
'MONTHLY',
|
|
4174
|
+
'QUARTERLY'
|
|
4175
|
+
]).nullable(),
|
|
4176
|
+
recurrence_end_time: z.iso.datetime().nullable(),
|
|
4177
|
+
task_assignee_user_ids: z.array(z.string()),
|
|
4178
|
+
reminders: z.array(z.object({
|
|
4179
|
+
offset: z.string(),
|
|
4180
|
+
remind_at: z.iso.datetime()
|
|
4181
|
+
}))
|
|
4182
|
+
});
|
|
4183
|
+
/**
|
|
4184
|
+
* Create a site form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400). site_id comes from the path and is not part of the body. recurring gates the recurrence fields. An empty task_assignee_user_ids list is valid. The company must hold a SiteClaim on the site with site_forms enabled.
|
|
4185
|
+
*/
|
|
4186
|
+
export const zSiteFormAssignmentParameters = z.object({
|
|
4187
|
+
form_definition_id: z.string(),
|
|
4188
|
+
recurring: z.boolean().optional(),
|
|
4189
|
+
task_attributes: z.object({
|
|
4190
|
+
name: z.string().nullish(),
|
|
4191
|
+
description: z.string().nullish(),
|
|
4192
|
+
created_by_user_id: z.string(),
|
|
4193
|
+
time_due: z.iso.datetime().nullish(),
|
|
4194
|
+
tz_name: z.string().nullish(),
|
|
4195
|
+
frequency: z.enum([
|
|
4196
|
+
'DAILY',
|
|
4197
|
+
'WORKDAILY',
|
|
4198
|
+
'WORKDAILYSIX',
|
|
4199
|
+
'WEEKLY',
|
|
4200
|
+
'BIWEEKLY',
|
|
4201
|
+
'MONTHLY',
|
|
4202
|
+
'QUARTERLY'
|
|
4203
|
+
]).nullish(),
|
|
4204
|
+
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4205
|
+
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
4206
|
+
reminders_attributes: z.array(z.object({
|
|
4207
|
+
offset: z.enum([
|
|
4208
|
+
'PT0S',
|
|
4209
|
+
'PT-1M',
|
|
4210
|
+
'PT-5M',
|
|
4211
|
+
'PT-10M',
|
|
4212
|
+
'PT-15M',
|
|
4213
|
+
'PT-30M',
|
|
4214
|
+
'PT-1H',
|
|
4215
|
+
'PT-2H',
|
|
4216
|
+
'P-1D',
|
|
4217
|
+
'P-2D',
|
|
4218
|
+
'P-3D',
|
|
4219
|
+
'P-4D',
|
|
4220
|
+
'P-5D',
|
|
4221
|
+
'P-6D',
|
|
4222
|
+
'P-1W',
|
|
4223
|
+
'P-2W',
|
|
4224
|
+
'P-1M',
|
|
4225
|
+
'P-2M',
|
|
4226
|
+
'P-3M',
|
|
4227
|
+
'P-6M',
|
|
4228
|
+
'P-1Y',
|
|
4229
|
+
'PT5M',
|
|
4230
|
+
'PT15M',
|
|
4231
|
+
'PT30M',
|
|
4232
|
+
'PT1H',
|
|
4233
|
+
'PT6H',
|
|
4234
|
+
'PT12H',
|
|
4235
|
+
'P1D',
|
|
4236
|
+
'P2D',
|
|
4237
|
+
'P3D',
|
|
4238
|
+
'P4D',
|
|
4239
|
+
'P5D',
|
|
4240
|
+
'P6D',
|
|
4241
|
+
'P1W',
|
|
4242
|
+
'P2W',
|
|
4243
|
+
'P3W'
|
|
4244
|
+
])
|
|
4245
|
+
})).optional()
|
|
4246
|
+
})
|
|
4247
|
+
});
|
|
4248
|
+
/**
|
|
4249
|
+
* Update a site form assignment. All fields are optional — send only what changes. site_id comes from the path and cannot be sent. recurring gates the recurrence fields, and task_attributes.reminders_attributes replaces the existing reminder set when supplied. An empty task_assignee_user_ids list is valid. The creator is set at creation and cannot be sent.
|
|
4250
|
+
*/
|
|
4251
|
+
export const zSiteFormAssignmentUpdateParameters = z.object({
|
|
4252
|
+
form_definition_id: z.string().optional(),
|
|
4253
|
+
recurring: z.boolean().optional(),
|
|
4254
|
+
task_attributes: z.object({
|
|
4255
|
+
name: z.string().nullish(),
|
|
4256
|
+
description: z.string().nullish(),
|
|
4257
|
+
time_due: z.iso.datetime().nullish(),
|
|
4258
|
+
tz_name: z.string().nullish(),
|
|
4259
|
+
frequency: z.enum([
|
|
4260
|
+
'DAILY',
|
|
4261
|
+
'WORKDAILY',
|
|
4262
|
+
'WORKDAILYSIX',
|
|
4263
|
+
'WEEKLY',
|
|
4264
|
+
'BIWEEKLY',
|
|
4265
|
+
'MONTHLY',
|
|
4266
|
+
'QUARTERLY'
|
|
4267
|
+
]).nullish(),
|
|
4268
|
+
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4269
|
+
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
4270
|
+
reminders_attributes: z.array(z.object({
|
|
4271
|
+
offset: z.enum([
|
|
4272
|
+
'PT0S',
|
|
4273
|
+
'PT-1M',
|
|
4274
|
+
'PT-5M',
|
|
4275
|
+
'PT-10M',
|
|
4276
|
+
'PT-15M',
|
|
4277
|
+
'PT-30M',
|
|
4278
|
+
'PT-1H',
|
|
4279
|
+
'PT-2H',
|
|
4280
|
+
'P-1D',
|
|
4281
|
+
'P-2D',
|
|
4282
|
+
'P-3D',
|
|
4283
|
+
'P-4D',
|
|
4284
|
+
'P-5D',
|
|
4285
|
+
'P-6D',
|
|
4286
|
+
'P-1W',
|
|
4287
|
+
'P-2W',
|
|
4288
|
+
'P-1M',
|
|
4289
|
+
'P-2M',
|
|
4290
|
+
'P-3M',
|
|
4291
|
+
'P-6M',
|
|
4292
|
+
'P-1Y',
|
|
4293
|
+
'PT5M',
|
|
4294
|
+
'PT15M',
|
|
4295
|
+
'PT30M',
|
|
4296
|
+
'PT1H',
|
|
4297
|
+
'PT6H',
|
|
4298
|
+
'PT12H',
|
|
4299
|
+
'P1D',
|
|
4300
|
+
'P2D',
|
|
4301
|
+
'P3D',
|
|
4302
|
+
'P4D',
|
|
4303
|
+
'P5D',
|
|
4304
|
+
'P6D',
|
|
4305
|
+
'P1W',
|
|
4306
|
+
'P2W',
|
|
4307
|
+
'P3W'
|
|
4308
|
+
])
|
|
4309
|
+
})).optional()
|
|
4310
|
+
}).optional()
|
|
4311
|
+
});
|
|
4312
|
+
/**
|
|
4313
|
+
* A form-completion task attached to a site feature — a SurveyJS form assigned to users with a due time, optional recurrence, and reminders. Path `{id}` is the `Tasks::FeatureFormAssignmentTask` id, not the web show `Task#uid`. Sites and features are shared across companies; another company's assignment on the same feature is not found. An empty assignee list is valid. The assignment does not include site_id.
|
|
4314
|
+
*/
|
|
4315
|
+
export const zFeatureFormAssignmentResponseObject = z.object({
|
|
4316
|
+
id: z.string(),
|
|
4317
|
+
feature_id: z.string(),
|
|
4318
|
+
form_definition_id: z.string(),
|
|
4319
|
+
name: z.string(),
|
|
4320
|
+
description: z.string().nullable(),
|
|
4321
|
+
tz_name: z.string(),
|
|
4322
|
+
time_due: z.iso.datetime().nullable(),
|
|
4323
|
+
frequency: z.enum([
|
|
4324
|
+
'DAILY',
|
|
4325
|
+
'WORKDAILY',
|
|
4326
|
+
'WORKDAILYSIX',
|
|
4327
|
+
'WEEKLY',
|
|
4328
|
+
'BIWEEKLY',
|
|
4329
|
+
'MONTHLY',
|
|
4330
|
+
'QUARTERLY'
|
|
4331
|
+
]).nullable(),
|
|
4332
|
+
recurrence_end_time: z.iso.datetime().nullable(),
|
|
4333
|
+
task_assignee_user_ids: z.array(z.string()),
|
|
4334
|
+
reminders: z.array(z.object({
|
|
4335
|
+
offset: z.string(),
|
|
4336
|
+
remind_at: z.iso.datetime()
|
|
4337
|
+
}))
|
|
4338
|
+
});
|
|
4339
|
+
/**
|
|
4340
|
+
* Create a feature form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400). site_id and feature_id come from the path and are not part of the body. recurring gates the recurrence fields. An empty task_assignee_user_ids list is valid. The company must hold a SiteClaim on the path's site with site_forms enabled, and the feature must belong to that site.
|
|
4341
|
+
*/
|
|
4342
|
+
export const zFeatureFormAssignmentParameters = z.object({
|
|
4343
|
+
form_definition_id: z.string(),
|
|
4344
|
+
recurring: z.boolean().optional(),
|
|
4345
|
+
task_attributes: z.object({
|
|
4346
|
+
name: z.string().nullish(),
|
|
4347
|
+
description: z.string().nullish(),
|
|
4348
|
+
created_by_user_id: z.string(),
|
|
4349
|
+
time_due: z.iso.datetime().nullish(),
|
|
4350
|
+
tz_name: z.string().nullish(),
|
|
4351
|
+
frequency: z.enum([
|
|
4352
|
+
'DAILY',
|
|
4353
|
+
'WORKDAILY',
|
|
4354
|
+
'WORKDAILYSIX',
|
|
4355
|
+
'WEEKLY',
|
|
4356
|
+
'BIWEEKLY',
|
|
4357
|
+
'MONTHLY',
|
|
4358
|
+
'QUARTERLY'
|
|
4359
|
+
]).nullish(),
|
|
4360
|
+
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4361
|
+
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
4362
|
+
reminders_attributes: z.array(z.object({
|
|
4363
|
+
offset: z.enum([
|
|
4364
|
+
'PT0S',
|
|
4365
|
+
'PT-1M',
|
|
4366
|
+
'PT-5M',
|
|
4367
|
+
'PT-10M',
|
|
4368
|
+
'PT-15M',
|
|
4369
|
+
'PT-30M',
|
|
4370
|
+
'PT-1H',
|
|
4371
|
+
'PT-2H',
|
|
4372
|
+
'P-1D',
|
|
4373
|
+
'P-2D',
|
|
4374
|
+
'P-3D',
|
|
4375
|
+
'P-4D',
|
|
4376
|
+
'P-5D',
|
|
4377
|
+
'P-6D',
|
|
4378
|
+
'P-1W',
|
|
4379
|
+
'P-2W',
|
|
4380
|
+
'P-1M',
|
|
4381
|
+
'P-2M',
|
|
4382
|
+
'P-3M',
|
|
4383
|
+
'P-6M',
|
|
4384
|
+
'P-1Y',
|
|
4385
|
+
'PT5M',
|
|
4386
|
+
'PT15M',
|
|
4387
|
+
'PT30M',
|
|
4388
|
+
'PT1H',
|
|
4389
|
+
'PT6H',
|
|
4390
|
+
'PT12H',
|
|
4391
|
+
'P1D',
|
|
4392
|
+
'P2D',
|
|
4393
|
+
'P3D',
|
|
4394
|
+
'P4D',
|
|
4395
|
+
'P5D',
|
|
4396
|
+
'P6D',
|
|
4397
|
+
'P1W',
|
|
4398
|
+
'P2W',
|
|
4399
|
+
'P3W'
|
|
4400
|
+
])
|
|
4401
|
+
})).optional()
|
|
4402
|
+
})
|
|
4403
|
+
});
|
|
4404
|
+
/**
|
|
4405
|
+
* Update a feature form assignment. All fields are optional — send only what changes. site_id and feature_id come from the path and cannot be sent. recurring gates the recurrence fields, and task_attributes.reminders_attributes replaces the existing reminder set when supplied. An empty task_assignee_user_ids list is valid. The creator is set at creation and cannot be sent.
|
|
4406
|
+
*/
|
|
4407
|
+
export const zFeatureFormAssignmentUpdateParameters = z.object({
|
|
4408
|
+
form_definition_id: z.string().optional(),
|
|
4409
|
+
recurring: z.boolean().optional(),
|
|
4410
|
+
task_attributes: z.object({
|
|
4411
|
+
name: z.string().nullish(),
|
|
4412
|
+
description: z.string().nullish(),
|
|
4413
|
+
time_due: z.iso.datetime().nullish(),
|
|
4414
|
+
tz_name: z.string().nullish(),
|
|
4415
|
+
frequency: z.enum([
|
|
4416
|
+
'DAILY',
|
|
4417
|
+
'WORKDAILY',
|
|
4418
|
+
'WORKDAILYSIX',
|
|
4419
|
+
'WEEKLY',
|
|
4420
|
+
'BIWEEKLY',
|
|
4421
|
+
'MONTHLY',
|
|
4422
|
+
'QUARTERLY'
|
|
4423
|
+
]).nullish(),
|
|
4424
|
+
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4425
|
+
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
4426
|
+
reminders_attributes: z.array(z.object({
|
|
4427
|
+
offset: z.enum([
|
|
4428
|
+
'PT0S',
|
|
4429
|
+
'PT-1M',
|
|
4430
|
+
'PT-5M',
|
|
4431
|
+
'PT-10M',
|
|
4432
|
+
'PT-15M',
|
|
4433
|
+
'PT-30M',
|
|
4434
|
+
'PT-1H',
|
|
4435
|
+
'PT-2H',
|
|
4436
|
+
'P-1D',
|
|
4437
|
+
'P-2D',
|
|
4438
|
+
'P-3D',
|
|
4439
|
+
'P-4D',
|
|
4440
|
+
'P-5D',
|
|
4441
|
+
'P-6D',
|
|
4442
|
+
'P-1W',
|
|
4443
|
+
'P-2W',
|
|
4444
|
+
'P-1M',
|
|
4445
|
+
'P-2M',
|
|
4446
|
+
'P-3M',
|
|
4447
|
+
'P-6M',
|
|
4448
|
+
'P-1Y',
|
|
4449
|
+
'PT5M',
|
|
4450
|
+
'PT15M',
|
|
4451
|
+
'PT30M',
|
|
4452
|
+
'PT1H',
|
|
4453
|
+
'PT6H',
|
|
4454
|
+
'PT12H',
|
|
4455
|
+
'P1D',
|
|
4456
|
+
'P2D',
|
|
4457
|
+
'P3D',
|
|
4458
|
+
'P4D',
|
|
4459
|
+
'P5D',
|
|
4460
|
+
'P6D',
|
|
4461
|
+
'P1W',
|
|
4462
|
+
'P2W',
|
|
4463
|
+
'P3W'
|
|
4464
|
+
])
|
|
4465
|
+
})).optional()
|
|
4466
|
+
}).optional()
|
|
4467
|
+
});
|
|
4468
|
+
/**
|
|
4469
|
+
* Create a job form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400). job_id comes from the path and is not part of the body. recurring gates the recurrence fields. An assignee outside the credential company returns 422, and a creator outside it returns 403.
|
|
4470
|
+
*/
|
|
4471
|
+
export const zJobFormAssignmentParameters = z.object({
|
|
4472
|
+
form_definition_id: z.string(),
|
|
4473
|
+
recurring: z.boolean().optional(),
|
|
4474
|
+
task_attributes: z.object({
|
|
4475
|
+
name: z.string().nullish(),
|
|
4476
|
+
description: z.string().nullish(),
|
|
4477
|
+
created_by_user_id: z.string(),
|
|
4478
|
+
time_due: z.iso.datetime().nullish(),
|
|
4479
|
+
tz_name: z.string().nullish(),
|
|
4480
|
+
frequency: z.enum([
|
|
4481
|
+
'DAILY',
|
|
4482
|
+
'WORKDAILY',
|
|
4483
|
+
'WORKDAILYSIX',
|
|
4484
|
+
'WEEKLY',
|
|
4485
|
+
'BIWEEKLY',
|
|
4486
|
+
'MONTHLY',
|
|
4487
|
+
'QUARTERLY'
|
|
4488
|
+
]).nullish(),
|
|
4489
|
+
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4490
|
+
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
4491
|
+
reminders_attributes: z.array(z.object({
|
|
4492
|
+
offset: z.enum([
|
|
4493
|
+
'PT0S',
|
|
4494
|
+
'PT-1M',
|
|
4495
|
+
'PT-5M',
|
|
4496
|
+
'PT-10M',
|
|
4497
|
+
'PT-15M',
|
|
4498
|
+
'PT-30M',
|
|
4499
|
+
'PT-1H',
|
|
4500
|
+
'PT-2H',
|
|
4501
|
+
'P-1D',
|
|
4502
|
+
'P-2D',
|
|
4503
|
+
'P-3D',
|
|
4504
|
+
'P-4D',
|
|
4505
|
+
'P-5D',
|
|
4506
|
+
'P-6D',
|
|
4507
|
+
'P-1W',
|
|
4508
|
+
'P-2W',
|
|
4509
|
+
'P-1M',
|
|
4510
|
+
'P-2M',
|
|
4511
|
+
'P-3M',
|
|
4512
|
+
'P-6M',
|
|
4513
|
+
'P-1Y',
|
|
4514
|
+
'PT5M',
|
|
4515
|
+
'PT15M',
|
|
4516
|
+
'PT30M',
|
|
4517
|
+
'PT1H',
|
|
4518
|
+
'PT6H',
|
|
4519
|
+
'PT12H',
|
|
4520
|
+
'P1D',
|
|
4521
|
+
'P2D',
|
|
4522
|
+
'P3D',
|
|
4523
|
+
'P4D',
|
|
4524
|
+
'P5D',
|
|
4525
|
+
'P6D',
|
|
4526
|
+
'P1W',
|
|
4527
|
+
'P2W',
|
|
4528
|
+
'P3W'
|
|
4529
|
+
])
|
|
4530
|
+
})).optional()
|
|
4531
|
+
})
|
|
4532
|
+
});
|
|
4533
|
+
/**
|
|
4534
|
+
* Update a job form assignment. All fields are optional — send only what changes. job_id comes from the path and cannot be sent. recurring gates the recurrence fields, and task_attributes.reminders_attributes replaces the existing reminder set when supplied. A newly added assignee outside the credential company returns 422. The creator is set at creation and cannot be sent.
|
|
4535
|
+
*/
|
|
4536
|
+
export const zJobFormAssignmentUpdateParameters = z.object({
|
|
4537
|
+
form_definition_id: z.string().optional(),
|
|
4538
|
+
recurring: z.boolean().optional(),
|
|
4539
|
+
task_attributes: z.object({
|
|
4540
|
+
name: z.string().nullish(),
|
|
4541
|
+
description: z.string().nullish(),
|
|
4542
|
+
time_due: z.iso.datetime().nullish(),
|
|
4543
|
+
tz_name: z.string().nullish(),
|
|
4544
|
+
frequency: z.enum([
|
|
4545
|
+
'DAILY',
|
|
4546
|
+
'WORKDAILY',
|
|
4547
|
+
'WORKDAILYSIX',
|
|
4548
|
+
'WEEKLY',
|
|
4549
|
+
'BIWEEKLY',
|
|
4550
|
+
'MONTHLY',
|
|
4551
|
+
'QUARTERLY'
|
|
4552
|
+
]).nullish(),
|
|
4553
|
+
recurrence_end_time: z.iso.datetime().nullish(),
|
|
4554
|
+
task_assignee_user_ids: z.array(z.string()).optional(),
|
|
4555
|
+
reminders_attributes: z.array(z.object({
|
|
4556
|
+
offset: z.enum([
|
|
4557
|
+
'PT0S',
|
|
4558
|
+
'PT-1M',
|
|
4559
|
+
'PT-5M',
|
|
4560
|
+
'PT-10M',
|
|
4561
|
+
'PT-15M',
|
|
4562
|
+
'PT-30M',
|
|
4563
|
+
'PT-1H',
|
|
4564
|
+
'PT-2H',
|
|
4565
|
+
'P-1D',
|
|
4566
|
+
'P-2D',
|
|
4567
|
+
'P-3D',
|
|
4568
|
+
'P-4D',
|
|
4569
|
+
'P-5D',
|
|
4570
|
+
'P-6D',
|
|
4571
|
+
'P-1W',
|
|
4572
|
+
'P-2W',
|
|
4573
|
+
'P-1M',
|
|
4574
|
+
'P-2M',
|
|
4575
|
+
'P-3M',
|
|
4576
|
+
'P-6M',
|
|
4577
|
+
'P-1Y',
|
|
4578
|
+
'PT5M',
|
|
4579
|
+
'PT15M',
|
|
4580
|
+
'PT30M',
|
|
4581
|
+
'PT1H',
|
|
4582
|
+
'PT6H',
|
|
4583
|
+
'PT12H',
|
|
4584
|
+
'P1D',
|
|
4585
|
+
'P2D',
|
|
4586
|
+
'P3D',
|
|
4587
|
+
'P4D',
|
|
4588
|
+
'P5D',
|
|
4589
|
+
'P6D',
|
|
4590
|
+
'P1W',
|
|
4591
|
+
'P2W',
|
|
4592
|
+
'P3W'
|
|
4593
|
+
])
|
|
4594
|
+
})).optional()
|
|
4595
|
+
}).optional()
|
|
4596
|
+
});
|
|
4597
|
+
/**
|
|
4598
|
+
* A company-owned collection of conditional wage and fringe adjustments, optionally scoped to a job.
|
|
4599
|
+
*/
|
|
4600
|
+
export const zPayRatesRulePackageResponseObject = z.object({
|
|
4601
|
+
id: z.string(),
|
|
4602
|
+
name: z.string(),
|
|
4603
|
+
description: z.string().nullable(),
|
|
4604
|
+
scoped_to_job_id: z.string().nullable(),
|
|
4605
|
+
default: z.boolean(),
|
|
4606
|
+
selectable: z.boolean(),
|
|
4607
|
+
created_at: z.iso.datetime(),
|
|
4608
|
+
updated_at: z.iso.datetime()
|
|
4609
|
+
});
|
|
4610
|
+
/**
|
|
4611
|
+
* Parameters for creating a company-wide pay-rate rule package.
|
|
4612
|
+
*/
|
|
4613
|
+
export const zPayRatesRulePackageParameters = z.object({
|
|
4614
|
+
name: z.string().min(1),
|
|
4615
|
+
description: z.string().nullish()
|
|
4616
|
+
});
|
|
4617
|
+
/**
|
|
4618
|
+
* Request body for updating a pay-rate rule package. Send only the fields to change. `default`, `selectable`, and `scoped_to_job_id` are not writable on this operation.
|
|
4619
|
+
*/
|
|
4620
|
+
export const zPayRatesRulePackageUpdateParameters = z.object({
|
|
4621
|
+
name: z.string().min(1).optional(),
|
|
4622
|
+
description: z.string().nullish()
|
|
4623
|
+
});
|
|
4624
|
+
/**
|
|
4625
|
+
* Request body for creating or updating a position on a job. The job is taken from the URL path.
|
|
4626
|
+
*/
|
|
4627
|
+
export const zPositionParameters = z.object({
|
|
4628
|
+
fulfilled_by_user_id: z.string().nullish(),
|
|
4629
|
+
start_time: z.iso.datetime().nullish(),
|
|
4630
|
+
end_time: z.iso.datetime().nullish(),
|
|
4631
|
+
position_function_id: z.string().nullish(),
|
|
4632
|
+
per_diem_id: z.string().nullish(),
|
|
4633
|
+
per_diem_rate_cents: z.number().nullish(),
|
|
4634
|
+
pwa: z.boolean().optional(),
|
|
4635
|
+
cash_fringe_rate_cents: z.number().nullish(),
|
|
4636
|
+
hourly_rate_cents: z.number().nullish(),
|
|
4637
|
+
pwa_wage_pay_rate_cents: z.number().nullish(),
|
|
4638
|
+
wage_adder_rate_cents: z.number().nullish(),
|
|
4639
|
+
job_wage_determination_ids: z.array(z.string()).optional(),
|
|
4640
|
+
pwa_details_attributes: z.object({
|
|
4641
|
+
skill_level: z.string().nullish()
|
|
4642
|
+
}).optional()
|
|
4643
|
+
});
|
|
4644
|
+
/**
|
|
4645
|
+
* Parameters for creating a per-unit scope price on a job. `scope_kind` and `unit_price` are required.
|
|
4646
|
+
*/
|
|
4647
|
+
export const zProductionJobScopePriceParameters = z.object({
|
|
4648
|
+
scope_kind: z.string(),
|
|
4649
|
+
unit_price: z.string(),
|
|
4650
|
+
contracted_count: z.int().nullish(),
|
|
4651
|
+
unit_of_measure: z.string().optional()
|
|
4652
|
+
});
|
|
4653
|
+
/**
|
|
4654
|
+
* Parameters for updating a per-unit scope price on a job. Every field is optional; omit a field to preserve its current value. The resulting price must retain a scope kind and non-negative unit price.
|
|
4655
|
+
*/
|
|
4656
|
+
export const zProductionJobScopePriceUpdateParameters = z.object({
|
|
4657
|
+
scope_kind: z.string().optional(),
|
|
4658
|
+
unit_price: z.string().optional(),
|
|
4659
|
+
contracted_count: z.int().nullish(),
|
|
4660
|
+
unit_of_measure: z.string().optional()
|
|
4661
|
+
});
|
|
4662
|
+
/**
|
|
4663
|
+
* A per-unit billing price for one scope of work on a job. Production completions bill against these prices.
|
|
4664
|
+
*/
|
|
4665
|
+
export const zProductionJobScopePriceResponseObject = z.object({
|
|
4666
|
+
id: z.string(),
|
|
4667
|
+
job_id: z.string(),
|
|
4668
|
+
scope_kind: z.string(),
|
|
4669
|
+
unit_of_measure: z.string(),
|
|
4670
|
+
unit_price: z.string().optional(),
|
|
4671
|
+
contracted_count: z.int().nullish(),
|
|
4672
|
+
created_at: z.iso.datetime(),
|
|
4673
|
+
updated_at: z.iso.datetime()
|
|
4674
|
+
});
|
|
4675
|
+
/**
|
|
4676
|
+
* Update a completion. Send only the fields to change. The scope price, filer, and feature reference are fixed at creation. Sending production_job_scope_price_id or performed_by_user_id on update returns 400 unknown_key. Feature completions accept no completable changes; quantity completions accept quantity_completed. A key for the other subtype returns 422.
|
|
4677
|
+
*/
|
|
4678
|
+
export const zProductionCompletionUpdateParameters = z.object({
|
|
4679
|
+
notes: z.string().nullish(),
|
|
4680
|
+
work_date: z.iso.date().optional(),
|
|
4681
|
+
position_ids: z.array(z.string()).optional(),
|
|
4682
|
+
completable_attributes: z.object({
|
|
4683
|
+
quantity_completed: z.int().optional()
|
|
4684
|
+
}).optional()
|
|
4685
|
+
});
|
|
4686
|
+
/**
|
|
4687
|
+
* Fields shared by both completion payload kinds.
|
|
4688
|
+
*/
|
|
4689
|
+
export const zProductionCompletionBaseParameters = z.object({
|
|
4690
|
+
production_job_scope_price_id: z.string().optional(),
|
|
4691
|
+
performed_by_user_id: z.string().optional(),
|
|
4692
|
+
notes: z.string().nullish(),
|
|
4693
|
+
work_date: z.iso.date().optional(),
|
|
4694
|
+
position_ids: z.array(z.string()).optional()
|
|
4695
|
+
});
|
|
4696
|
+
/**
|
|
4697
|
+
* Payload for completions on feature-tracked jobs (the scope price's job tracks production by feature). quantity_completed is not accepted; the feature reference is immutable after create, so update accepts no completable_attributes at all.
|
|
4698
|
+
*/
|
|
4699
|
+
export const zProductionFeatureCompletionParameters = zProductionCompletionBaseParameters.and(z.object({
|
|
4700
|
+
completable_attributes: z.object({
|
|
4701
|
+
feature_id: z.string().optional()
|
|
4702
|
+
}).optional()
|
|
4703
|
+
}));
|
|
4704
|
+
/**
|
|
4705
|
+
* Payload for completions on quantity-tracked jobs (the scope price's job tracks production by quantity). feature_id is not accepted.
|
|
4706
|
+
*/
|
|
4707
|
+
export const zProductionQuantityCompletionParameters = zProductionCompletionBaseParameters.and(z.object({
|
|
4708
|
+
completable_attributes: z.object({
|
|
4709
|
+
quantity_completed: z.int().optional()
|
|
4710
|
+
}).optional()
|
|
4711
|
+
}));
|
|
4712
|
+
/**
|
|
4713
|
+
* A completion's payload shape follows the production tracking kind of the scope price's job — the server derives the completable subtype from the job, never from the request. Feature-tracked jobs record which feature was completed (feature payload); quantity-tracked jobs record how many units were completed (quantity payload). The two payloads are mutually exclusive: sending the other kind's completable key returns 422.
|
|
4714
|
+
*/
|
|
4715
|
+
export const zProductionCompletionParameters = z.union([
|
|
4716
|
+
zProductionFeatureCompletionParameters,
|
|
4717
|
+
zProductionQuantityCompletionParameters
|
|
4718
|
+
]);
|
|
4719
|
+
/**
|
|
4720
|
+
* A completion recorded on a feature-tracked job — a unit of scoped work finished by a crew, identifying which feature was completed.
|
|
4721
|
+
*/
|
|
4722
|
+
export const zProductionFeatureCompletionResponseObject = z.object({
|
|
4723
|
+
id: z.string(),
|
|
4724
|
+
notes: z.string().nullable(),
|
|
4725
|
+
completable_type: z.enum(['Production::FeatureCompletion']),
|
|
4726
|
+
completable_id: z.string(),
|
|
4727
|
+
created_by_user_id: z.string(),
|
|
4728
|
+
production_job_scope_price_id: z.string(),
|
|
4729
|
+
job_id: z.string(),
|
|
4730
|
+
scope_kind: z.string(),
|
|
4731
|
+
unit_of_measure: z.string(),
|
|
4732
|
+
position_ids: z.array(z.string()),
|
|
4733
|
+
feature_id: z.string(),
|
|
4734
|
+
created_at: z.iso.datetime(),
|
|
4735
|
+
updated_at: z.iso.datetime(),
|
|
4736
|
+
work_date: z.iso.date()
|
|
4737
|
+
});
|
|
4738
|
+
/**
|
|
4739
|
+
* A completion recorded on a quantity-tracked job — a unit of scoped work finished by a crew, counting how many units were completed.
|
|
4740
|
+
*/
|
|
4741
|
+
export const zProductionQuantityCompletionResponseObject = z.object({
|
|
4742
|
+
id: z.string(),
|
|
4743
|
+
notes: z.string().nullable(),
|
|
4744
|
+
completable_type: z.enum(['Production::QuantityCompletion']),
|
|
4745
|
+
completable_id: z.string(),
|
|
4746
|
+
created_by_user_id: z.string(),
|
|
4747
|
+
production_job_scope_price_id: z.string(),
|
|
4748
|
+
job_id: z.string(),
|
|
4749
|
+
scope_kind: z.string(),
|
|
4750
|
+
unit_of_measure: z.string(),
|
|
4751
|
+
position_ids: z.array(z.string()),
|
|
4752
|
+
quantity_completed: z.int(),
|
|
4753
|
+
created_at: z.iso.datetime(),
|
|
4754
|
+
updated_at: z.iso.datetime(),
|
|
4755
|
+
work_date: z.iso.date()
|
|
4756
|
+
});
|
|
4757
|
+
/**
|
|
4758
|
+
* A recorded production completion. The completable_type discriminator selects the feature-tracked or quantity-tracked representation.
|
|
4759
|
+
*/
|
|
4760
|
+
export const zProductionCompletionResponseObject = z.discriminatedUnion('completable_type', [
|
|
4761
|
+
zProductionFeatureCompletionResponseObject.extend({ completable_type: z.literal('Production::FeatureCompletion') }),
|
|
4762
|
+
zProductionQuantityCompletionResponseObject.extend({ completable_type: z.literal('Production::QuantityCompletion') })
|
|
4763
|
+
]);
|
|
4764
|
+
/**
|
|
4765
|
+
* The form-assignment tasks created by one request — assigning a form to one or more users, each with a due time and optional recurrence and reminders. Returned as an array because a request can spread the assignment into one task per assignee.
|
|
4766
|
+
*/
|
|
4767
|
+
export const zFormAssignmentTaskResponseObject = z.array(z.object({
|
|
4768
|
+
id: z.string(),
|
|
4769
|
+
form_definition_id: z.string(),
|
|
4770
|
+
frequency: z.enum([
|
|
4771
|
+
'DAILY',
|
|
4772
|
+
'WORKDAILY',
|
|
4773
|
+
'WORKDAILYSIX',
|
|
4774
|
+
'WEEKLY',
|
|
4775
|
+
'BIWEEKLY',
|
|
4776
|
+
'MONTHLY',
|
|
4777
|
+
'QUARTERLY'
|
|
4778
|
+
]).nullable(),
|
|
4779
|
+
recurrence_end_time: z.iso.datetime().nullable(),
|
|
4780
|
+
time_due: z.iso.datetime(),
|
|
4781
|
+
tz_name: z.string(),
|
|
4782
|
+
name: z.string(),
|
|
4783
|
+
description: z.string().nullable(),
|
|
4784
|
+
task_assignee_user_ids: z.array(z.string()),
|
|
4785
|
+
reminders: z.array(z.object({
|
|
4786
|
+
offset: z.string(),
|
|
4787
|
+
remind_at: z.iso.datetime()
|
|
4788
|
+
}))
|
|
4789
|
+
}));
|
|
4790
|
+
/**
|
|
4791
|
+
* Request body for creating a certification — a named qualification a worker can hold. You can only manage your own company's certifications; global (platform) certifications are read-only.
|
|
4792
|
+
*/
|
|
4793
|
+
export const zCertificationParameters = z.object({
|
|
4794
|
+
company_id: z.string(),
|
|
4795
|
+
name: z.string(),
|
|
4796
|
+
description: z.string().nullish(),
|
|
4797
|
+
verified: z.boolean().optional(),
|
|
4798
|
+
duration: z.string().nullish()
|
|
4799
|
+
});
|
|
4800
|
+
/**
|
|
4801
|
+
* Request body for updating a certification — a named qualification a worker can hold. Include only the fields to change. You can only manage your own company's certifications; global (platform) certifications are read-only. The certification's company is fixed at creation.
|
|
4802
|
+
*/
|
|
4803
|
+
export const zCertificationUpdateParameters = z.object({
|
|
4804
|
+
name: z.string().optional(),
|
|
4805
|
+
description: z.string().nullish(),
|
|
4806
|
+
verified: z.boolean().optional(),
|
|
4807
|
+
duration: z.string().nullish()
|
|
4808
|
+
});
|
|
4809
|
+
/**
|
|
4204
4810
|
* A certification package — a named set of certifications your company requires together.
|
|
4205
4811
|
*/
|
|
4206
4812
|
export const zCertificationPackageResponseObject = z.object({
|
|
@@ -4215,7 +4821,7 @@ export const zCertificationPackageResponseObject = z.object({
|
|
|
4215
4821
|
updated_at: z.iso.datetime()
|
|
4216
4822
|
});
|
|
4217
4823
|
/**
|
|
4218
|
-
* Request body for creating a certification package — a named set of certifications a company requires together. The package belongs to the company that owns the API key.
|
|
4824
|
+
* Request body for creating a certification package — a named set of certifications a company requires together. The package belongs to the company that owns the API key.
|
|
4219
4825
|
*/
|
|
4220
4826
|
export const zCertificationPackageParameters = z.object({
|
|
4221
4827
|
name: z.string(),
|
|
@@ -4224,7 +4830,7 @@ export const zCertificationPackageParameters = z.object({
|
|
|
4224
4830
|
performed_by_user_id: z.string()
|
|
4225
4831
|
});
|
|
4226
4832
|
/**
|
|
4227
|
-
* Request body for updating a certification package — a named set of certifications a company requires together. Include only the fields to change.
|
|
4833
|
+
* Request body for updating a certification package — a named set of certifications a company requires together. Include only the fields to change.
|
|
4228
4834
|
*/
|
|
4229
4835
|
export const zCertificationPackageUpdateParameters = z.object({
|
|
4230
4836
|
name: z.string().optional(),
|
|
@@ -4246,7 +4852,7 @@ export const zCertificationResponseObject = z.object({
|
|
|
4246
4852
|
updated_at: z.iso.datetime()
|
|
4247
4853
|
});
|
|
4248
4854
|
/**
|
|
4249
|
-
* Request body for recording a certification held by a worker — who holds it, which certification, when it was received, and optional proof
|
|
4855
|
+
* Request body for recording a certification held by a worker — who holds it, which certification, when it was received, and optional proof and expiry. Verification is read-only for all API keys; employer approval is a separate action.
|
|
4250
4856
|
*/
|
|
4251
4857
|
export const zUserCertificationParameters = z.object({
|
|
4252
4858
|
user_id: z.string(),
|
|
@@ -4256,15 +4862,12 @@ export const zUserCertificationParameters = z.object({
|
|
|
4256
4862
|
name: z.string().max(255).regex(/^[\w\s.-]*\.[A-Za-z0-9]+$/),
|
|
4257
4863
|
content: z.string()
|
|
4258
4864
|
}).nullish(),
|
|
4259
|
-
verified: z.boolean().optional(),
|
|
4260
4865
|
expiration_date: z.iso.date().nullish(),
|
|
4261
4866
|
credential_id: z.string().nullish(),
|
|
4262
|
-
|
|
4263
|
-
archived_at: z.iso.datetime().nullish(),
|
|
4264
|
-
approved_at: z.iso.datetime().nullish()
|
|
4867
|
+
archived_at: z.iso.datetime().nullish()
|
|
4265
4868
|
});
|
|
4266
4869
|
/**
|
|
4267
|
-
* Request body for updating a certification held by a worker. Every field is optional; omit a field to preserve its current value. The resulting certification must still have a receipt date
|
|
4870
|
+
* Request body for updating a certification held by a worker. Every field is optional; omit a field to preserve its current value. The resulting certification must still have a receipt date. Verification is read-only for all API keys. Changes to the worker, certification, receipt date, credential number, proof document, or explicit expiration revoke DSPTCH/provider verification. Unchanged evidence, archiving, and employer approval preserve verification. Changing approved content revokes employer approval; approve through the approval endpoint.
|
|
4268
4871
|
*/
|
|
4269
4872
|
export const zUserCertificationUpdateParameters = z.object({
|
|
4270
4873
|
user_id: z.string().optional(),
|
|
@@ -4274,12 +4877,15 @@ export const zUserCertificationUpdateParameters = z.object({
|
|
|
4274
4877
|
name: z.string().max(255).regex(/^[\w\s.-]*\.[A-Za-z0-9]+$/),
|
|
4275
4878
|
content: z.string()
|
|
4276
4879
|
}).nullish(),
|
|
4277
|
-
verified: z.boolean().optional(),
|
|
4278
4880
|
expiration_date: z.iso.date().nullish(),
|
|
4279
4881
|
credential_id: z.string().nullish(),
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4882
|
+
archived_at: z.iso.datetime().nullish()
|
|
4883
|
+
});
|
|
4884
|
+
/**
|
|
4885
|
+
* Request body for approving a certification held by a worker. A user key approves in its own user's name and sends no body.
|
|
4886
|
+
*/
|
|
4887
|
+
export const zUserCertificationApprovalParameters = z.object({
|
|
4888
|
+
approved_by_user_id: z.string().optional()
|
|
4283
4889
|
});
|
|
4284
4890
|
/**
|
|
4285
4891
|
* A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
|
|
@@ -4289,7 +4895,7 @@ export const zUserCertificationResponseObject = z.object({
|
|
|
4289
4895
|
user_id: z.string(),
|
|
4290
4896
|
certification_id: z.string(),
|
|
4291
4897
|
received_at: z.iso.datetime(),
|
|
4292
|
-
verified: z.boolean(),
|
|
4898
|
+
verified: z.boolean().readonly(),
|
|
4293
4899
|
issuer_company_id: z.string().nullable(),
|
|
4294
4900
|
expiration_date: z.iso.date().nullable(),
|
|
4295
4901
|
credential_id: z.string().nullable(),
|
|
@@ -4350,6 +4956,7 @@ export const zJobResponseObject = z.object({
|
|
|
4350
4956
|
created_by_company_id: z.string(),
|
|
4351
4957
|
requested_by_company_id: z.string().nullable(),
|
|
4352
4958
|
project_id: z.string().nullable(),
|
|
4959
|
+
companies_department_id: z.string().nullable(),
|
|
4353
4960
|
manager_users: z.array(z.object({
|
|
4354
4961
|
id: z.string(),
|
|
4355
4962
|
name: z.string()
|
|
@@ -4386,7 +4993,8 @@ export const zJobResponseObject = z.object({
|
|
|
4386
4993
|
'none',
|
|
4387
4994
|
'feature',
|
|
4388
4995
|
'quantity'
|
|
4389
|
-
])
|
|
4996
|
+
]),
|
|
4997
|
+
custom_fields: z.array(zCustomFieldResponseObject)
|
|
4390
4998
|
});
|
|
4391
4999
|
/**
|
|
4392
5000
|
* A spot to be filled on a job — one worker's assignment and the unit against which they track time, carrying the schedule window, assigned worker, function, and the planned pay and fringe rates (including PWA prevailing-wage compliance rates). Always accessed nested under a job.
|
|
@@ -4452,7 +5060,7 @@ export const zUserRoleResponse = z.object({
|
|
|
4452
5060
|
*/
|
|
4453
5061
|
export const zUserCompanyType = z.enum(['EMPLOYEE', 'CONTRACTOR']).nullable();
|
|
4454
5062
|
/**
|
|
4455
|
-
* A worker as your company sees them: the cross-company person merged with their employment record at your company (title, pay, benefits, and accruals), their roles at your company, and optional prevailing-wage compliance details. Your company sees everyone it employs, everyone it has granted a role, and everyone it has invited, which is the same set the web app shows. A role holder or an invitee your company does not employ has no employment record to merge, so the employment fields (employment_id through employment_window, plus manager_user_id) are null for them,
|
|
5063
|
+
* A worker as your company sees them: the cross-company person merged with their employment record at your company (title, pay, benefits, and accruals), their roles at your company, and optional prevailing-wage compliance details. Your company sees everyone it employs, everyone it has granted a role, and everyone it has invited, which is the same set the web app shows. A role holder or an invitee your company does not employ has no employment record to merge, so the employment fields (employment_id through employment_window, plus manager_user_id and custom_fields) are null for them, and employment_state reads none. There is no delete — removing a worker terminates their employment at the company (see the user-company endpoints), which sets termination_date and drops them from the default list.
|
|
4456
5064
|
*/
|
|
4457
5065
|
export const zUserResponseObject = z.object({
|
|
4458
5066
|
id: z.string(),
|
|
@@ -4486,10 +5094,10 @@ export const zUserResponseObject = z.object({
|
|
|
4486
5094
|
enrolled_in_t_and_a: z.boolean().nullable(),
|
|
4487
5095
|
payroll_id: z.string().nullable(),
|
|
4488
5096
|
compensation_type: z.string().nullable(),
|
|
4489
|
-
hourly_rate: z.string().
|
|
4490
|
-
training_annual_amount: z.string().
|
|
4491
|
-
employer_combined_health_amount: z.string().
|
|
4492
|
-
employer_combined_savings: z.string().
|
|
5097
|
+
hourly_rate: z.string().nullish(),
|
|
5098
|
+
training_annual_amount: z.string().nullish(),
|
|
5099
|
+
employer_combined_health_amount: z.string().nullish(),
|
|
5100
|
+
employer_combined_savings: z.string().nullish(),
|
|
4493
5101
|
worked_annual_minutes: z.int().nullable(),
|
|
4494
5102
|
pto_annual_minutes: z.int().nullable(),
|
|
4495
5103
|
holiday_annual_minutes: z.int().nullable(),
|
|
@@ -4501,6 +5109,7 @@ export const zUserResponseObject = z.object({
|
|
|
4501
5109
|
valid_to: z.iso.datetime().nullable()
|
|
4502
5110
|
}).nullable(),
|
|
4503
5111
|
manager_user_id: z.string().nullable(),
|
|
5112
|
+
custom_fields: z.array(zCustomFieldResponseObject).nullable(),
|
|
4504
5113
|
roles: z.array(z.string()),
|
|
4505
5114
|
company_user_pwa_info: z.object({
|
|
4506
5115
|
id: z.string(),
|
|
@@ -4582,7 +5191,6 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
4582
5191
|
skip_invite: z.literal(true)
|
|
4583
5192
|
})
|
|
4584
5193
|
]), z.object({
|
|
4585
|
-
company_id: z.string().optional(),
|
|
4586
5194
|
email: z.string().nullish(),
|
|
4587
5195
|
personal_email: z.string().nullish(),
|
|
4588
5196
|
phone_number: z.string().nullish(),
|
|
@@ -4607,6 +5215,7 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
4607
5215
|
manager_user_id: z.string().optional(),
|
|
4608
5216
|
payroll_id: z.string().optional(),
|
|
4609
5217
|
hourly_rate: z.string().optional(),
|
|
5218
|
+
compensation_type: z.enum(['hourly', 'salary']).optional(),
|
|
4610
5219
|
overtime_eligible: z.string().optional(),
|
|
4611
5220
|
enrolled_in_t_and_a: z.string().optional(),
|
|
4612
5221
|
training_annual_amount: z.string().optional(),
|
|
@@ -4618,6 +5227,10 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
4618
5227
|
training_annual_minutes: z.string().optional(),
|
|
4619
5228
|
hire_date: z.string().optional(),
|
|
4620
5229
|
group_ids: z.array(z.int()).optional(),
|
|
5230
|
+
custom_fields: z.array(z.object({
|
|
5231
|
+
custom_field_config_id: z.string(),
|
|
5232
|
+
value: z.string().nullable()
|
|
5233
|
+
})).optional(),
|
|
4621
5234
|
company_user_pwa_info: z.object({
|
|
4622
5235
|
address1: z.string().nullish(),
|
|
4623
5236
|
address2: z.string().nullish(),
|
|
@@ -4687,7 +5300,7 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
4687
5300
|
}).nullish()
|
|
4688
5301
|
}));
|
|
4689
5302
|
/**
|
|
4690
|
-
* 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. For time-effective pay changes, use the scheduled-changes endpoints instead.
|
|
5303
|
+
* 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.
|
|
4691
5304
|
*/
|
|
4692
5305
|
export const zUserCompanyParameters = z.object({
|
|
4693
5306
|
type: zUserCompanyType.optional(),
|
|
@@ -4695,10 +5308,14 @@ export const zUserCompanyParameters = z.object({
|
|
|
4695
5308
|
manager_user_id: z.string().nullish(),
|
|
4696
5309
|
payroll_id: z.string().nullish(),
|
|
4697
5310
|
hire_date: z.string().nullish(),
|
|
4698
|
-
enrolled_in_t_and_a: z.boolean().optional()
|
|
5311
|
+
enrolled_in_t_and_a: z.boolean().optional(),
|
|
5312
|
+
custom_fields: z.array(z.object({
|
|
5313
|
+
custom_field_config_id: z.string(),
|
|
5314
|
+
value: z.string().nullable()
|
|
5315
|
+
})).optional()
|
|
4699
5316
|
});
|
|
4700
5317
|
/**
|
|
4701
|
-
* Request body for adding a worker to your company, creating their employment record. hire_date is required and sets when employment begins; the remaining fields seed the initial title, pay, benefits, and accruals. Returns the worker with the new employment flattened onto it.
|
|
5318
|
+
* Request body for adding a worker to your company, creating their employment record and its custom-field values. hire_date is required and sets when employment begins; the remaining fields seed the initial title, pay, benefits, and accruals. Returns the worker with the new employment flattened onto it.
|
|
4702
5319
|
*/
|
|
4703
5320
|
export const zUserCompanyCreateParameters = z.object({
|
|
4704
5321
|
hire_date: z.string(),
|
|
@@ -4716,7 +5333,11 @@ export const zUserCompanyCreateParameters = z.object({
|
|
|
4716
5333
|
worked_annual_minutes: z.int().nullish(),
|
|
4717
5334
|
pto_annual_minutes: z.int().nullish(),
|
|
4718
5335
|
holiday_annual_minutes: z.int().nullish(),
|
|
4719
|
-
training_annual_minutes: z.int().nullish()
|
|
5336
|
+
training_annual_minutes: z.int().nullish(),
|
|
5337
|
+
custom_fields: z.array(z.object({
|
|
5338
|
+
custom_field_config_id: z.string(),
|
|
5339
|
+
value: z.string().nullable()
|
|
5340
|
+
})).optional()
|
|
4720
5341
|
});
|
|
4721
5342
|
/**
|
|
4722
5343
|
* Keyset pagination cursors for the collection.
|
|
@@ -4760,22 +5381,7 @@ export const zTimeEntryIndexObject = z.object({
|
|
|
4760
5381
|
export const zFormDefinitionResponseObject = z.object({
|
|
4761
5382
|
meta: zMeta,
|
|
4762
5383
|
links: zLinks,
|
|
4763
|
-
data: z.array(
|
|
4764
|
-
id: z.string(),
|
|
4765
|
-
name: z.string(),
|
|
4766
|
-
description: z.string(),
|
|
4767
|
-
company_id: z.string(),
|
|
4768
|
-
modified_by_user_id: z.string().nullable(),
|
|
4769
|
-
tags: z.array(z.string()).nullable(),
|
|
4770
|
-
title_keys: z.array(z.string()).nullable(),
|
|
4771
|
-
editable: z.boolean(),
|
|
4772
|
-
always_visible: z.boolean(),
|
|
4773
|
-
sensitive_form: z.boolean(),
|
|
4774
|
-
allow_carry_forward: z.boolean(),
|
|
4775
|
-
current_revision: z.int().nullable(),
|
|
4776
|
-
json: z.record(z.string(), z.unknown()),
|
|
4777
|
-
created_at: z.iso.datetime()
|
|
4778
|
-
}))
|
|
5384
|
+
data: z.array(zFormDefinitionObject)
|
|
4779
5385
|
});
|
|
4780
5386
|
/**
|
|
4781
5387
|
* A page of form submissions — the lighter list representation. A submission is a user's completed form; submissions are created in the app, so this API is read-only.
|
|
@@ -4885,6 +5491,14 @@ export const zPaystubLineItemsResponseObject = z.object({
|
|
|
4885
5491
|
links: zLinks,
|
|
4886
5492
|
data: z.array(zPaystubLineItemResponseObject)
|
|
4887
5493
|
});
|
|
5494
|
+
/**
|
|
5495
|
+
* A page of a job's site joins, with pagination metadata and navigation links.
|
|
5496
|
+
*/
|
|
5497
|
+
export const zJobSitesResponseObject = z.object({
|
|
5498
|
+
meta: zMeta,
|
|
5499
|
+
links: zLinks,
|
|
5500
|
+
data: z.array(zJobSiteResponseObject)
|
|
5501
|
+
});
|
|
4888
5502
|
/**
|
|
4889
5503
|
* A page of a job's positions, with pagination metadata and navigation links.
|
|
4890
5504
|
*/
|
|
@@ -5954,6 +6568,7 @@ export const zAssetsItemResponseObject = z.object({
|
|
|
5954
6568
|
container_item_id: z.string(),
|
|
5955
6569
|
quantity: z.int()
|
|
5956
6570
|
})),
|
|
6571
|
+
attributes: zAssetsAttributeValueObjects,
|
|
5957
6572
|
images: z.array(zAssetsAttachmentResponseObject),
|
|
5958
6573
|
archived_at: z.iso.datetime().nullable(),
|
|
5959
6574
|
created_at: z.iso.datetime(),
|
|
@@ -6020,7 +6635,7 @@ export const zAssetsProductUpdateParameters = z.object({
|
|
|
6020
6635
|
images_attributes: z.array(zAssetsAttachmentParameters).optional()
|
|
6021
6636
|
});
|
|
6022
6637
|
/**
|
|
6023
|
-
* Create an asset item. The write API creates serial items only; assets_product_id and serial_number identify the product and serial number. 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.
|
|
6638
|
+
* Create an asset item. The write API creates serial items only; assets_product_id and serial_number identify the product and serial number. `attribute_values` fills the item-level attributes of the product's category. On create you may also place the item — assets_site_id to stock it at a site, or user_id to assign it to a user (the two are mutually exclusive). performed_by_user_id is required.
|
|
6024
6639
|
*/
|
|
6025
6640
|
export const zAssetsItemParameters = z.object({
|
|
6026
6641
|
name: z.string().min(1),
|
|
@@ -6032,6 +6647,11 @@ export const zAssetsItemParameters = z.object({
|
|
|
6032
6647
|
purchase_price_cents: z.int().optional(),
|
|
6033
6648
|
external_id: z.string().optional(),
|
|
6034
6649
|
external_system_url: z.string().optional(),
|
|
6650
|
+
attribute_values: z.array(z.object({
|
|
6651
|
+
assets_attribute_id: z.string(),
|
|
6652
|
+
value: z.string().nullish(),
|
|
6653
|
+
assets_attribute_option_id: z.string().nullish()
|
|
6654
|
+
})).optional(),
|
|
6035
6655
|
images_attributes: z.array(zAssetsAttachmentParameters).optional(),
|
|
6036
6656
|
assets_site_id: z.string().optional(),
|
|
6037
6657
|
user_id: z.string().optional(),
|
|
@@ -6040,7 +6660,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
6040
6660
|
performed_by_user_id: z.string()
|
|
6041
6661
|
});
|
|
6042
6662
|
/**
|
|
6043
|
-
* Update an asset item. All item fields are optional — send only what changes — but performed_by_user_id is required to record the updater
|
|
6663
|
+
* Update an asset item. All item fields are optional — send only what changes — but performed_by_user_id is required to record the updater. Omitted attributes retain their existing values. `attribute_values` upserts the item-level attributes of the product's category.
|
|
6044
6664
|
*/
|
|
6045
6665
|
export const zAssetsItemUpdateParameters = z.object({
|
|
6046
6666
|
name: z.string().min(1).optional(),
|
|
@@ -6052,11 +6672,12 @@ export const zAssetsItemUpdateParameters = z.object({
|
|
|
6052
6672
|
purchase_price_cents: z.int().optional(),
|
|
6053
6673
|
external_id: z.string().optional(),
|
|
6054
6674
|
external_system_url: z.string().optional(),
|
|
6675
|
+
attribute_values: z.array(z.object({
|
|
6676
|
+
assets_attribute_id: z.string(),
|
|
6677
|
+
value: z.string().nullish(),
|
|
6678
|
+
assets_attribute_option_id: z.string().nullish()
|
|
6679
|
+
})).optional(),
|
|
6055
6680
|
images_attributes: z.array(zAssetsAttachmentParameters).optional(),
|
|
6056
|
-
assets_site_id: z.string().optional(),
|
|
6057
|
-
user_id: z.string().optional(),
|
|
6058
|
-
container_item_id: z.string().optional(),
|
|
6059
|
-
assets_sub_location_id: z.string().optional(),
|
|
6060
6681
|
performed_by_user_id: z.string()
|
|
6061
6682
|
});
|
|
6062
6683
|
/**
|
|
@@ -6137,7 +6758,7 @@ export const zAssetsItemFormAssignmentResponseObject = z.object({
|
|
|
6137
6758
|
}))
|
|
6138
6759
|
});
|
|
6139
6760
|
/**
|
|
6140
|
-
* Create
|
|
6761
|
+
* Create 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. An assignee outside the credential company returns 422, and a creator outside it returns 403.
|
|
6141
6762
|
*/
|
|
6142
6763
|
export const zAssetsItemFormAssignmentParameters = z.object({
|
|
6143
6764
|
form_definition_id: z.string(),
|
|
@@ -6146,7 +6767,6 @@ export const zAssetsItemFormAssignmentParameters = z.object({
|
|
|
6146
6767
|
name: z.string().nullish(),
|
|
6147
6768
|
description: z.string().nullish(),
|
|
6148
6769
|
created_by_user_id: z.string(),
|
|
6149
|
-
updated_by_user_id: z.string().nullish(),
|
|
6150
6770
|
time_due: z.iso.datetime().nullish(),
|
|
6151
6771
|
tz_name: z.string().nullish(),
|
|
6152
6772
|
frequency: z.enum([
|
|
@@ -6203,7 +6823,7 @@ export const zAssetsItemFormAssignmentParameters = z.object({
|
|
|
6203
6823
|
})
|
|
6204
6824
|
});
|
|
6205
6825
|
/**
|
|
6206
|
-
* Update an item form assignment. All fields are optional — send only what changes. recurring gates the recurrence fields, and task_attributes.reminders_attributes replaces the existing reminder set when supplied.
|
|
6826
|
+
* Update an item form assignment. All fields are optional — send only what changes. recurring gates the recurrence fields, and task_attributes.reminders_attributes replaces the existing reminder set when supplied. A newly added assignee outside the credential company returns 422. The creator is set at creation and cannot be sent.
|
|
6207
6827
|
*/
|
|
6208
6828
|
export const zAssetsItemFormAssignmentUpdateParameters = z.object({
|
|
6209
6829
|
form_definition_id: z.string().optional(),
|
|
@@ -6211,8 +6831,6 @@ export const zAssetsItemFormAssignmentUpdateParameters = z.object({
|
|
|
6211
6831
|
task_attributes: z.object({
|
|
6212
6832
|
name: z.string().nullish(),
|
|
6213
6833
|
description: z.string().nullish(),
|
|
6214
|
-
created_by_user_id: z.string().optional(),
|
|
6215
|
-
updated_by_user_id: z.string().nullish(),
|
|
6216
6834
|
time_due: z.iso.datetime().nullish(),
|
|
6217
6835
|
tz_name: z.string().nullish(),
|
|
6218
6836
|
frequency: z.enum([
|
|
@@ -6546,11 +7164,9 @@ export const zAssetsSubLocationParameters = z.object({
|
|
|
6546
7164
|
code: z.string().min(1)
|
|
6547
7165
|
});
|
|
6548
7166
|
/**
|
|
6549
|
-
* Update a storage location. All fields are optional — send only what changes.
|
|
7167
|
+
* Update a storage location. All fields are optional — send only what changes. Sending assets_site_id or container_item_id on update returns 400 unknown_key. Holder fields are accepted only on create; renaming code cascades new path codes through the node's subtree.
|
|
6550
7168
|
*/
|
|
6551
7169
|
export const zAssetsSubLocationUpdateParameters = z.object({
|
|
6552
|
-
assets_site_id: z.string().optional(),
|
|
6553
|
-
container_item_id: z.string().optional(),
|
|
6554
7170
|
parent_id: z.string().nullish(),
|
|
6555
7171
|
kind: z.enum([
|
|
6556
7172
|
'zone',
|
|
@@ -6635,6 +7251,33 @@ export const zAssetsAdjustmentParameters = z.object({
|
|
|
6635
7251
|
export const zAssetsArchiveParameters = z.object({
|
|
6636
7252
|
performed_by_user_id: z.string()
|
|
6637
7253
|
});
|
|
7254
|
+
/**
|
|
7255
|
+
* A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
|
|
7256
|
+
*/
|
|
7257
|
+
export const zUserCertificationResponseObjectWritable = z.object({
|
|
7258
|
+
id: z.string(),
|
|
7259
|
+
user_id: z.string(),
|
|
7260
|
+
certification_id: z.string(),
|
|
7261
|
+
received_at: z.iso.datetime(),
|
|
7262
|
+
issuer_company_id: z.string().nullable(),
|
|
7263
|
+
expiration_date: z.iso.date().nullable(),
|
|
7264
|
+
credential_id: z.string().nullable(),
|
|
7265
|
+
approved_by_user_id: z.string().nullable(),
|
|
7266
|
+
created_by_user_id: z.string().nullable(),
|
|
7267
|
+
updated_by_user_id: z.string().nullable(),
|
|
7268
|
+
archived_at: z.iso.datetime().nullable(),
|
|
7269
|
+
approved_at: z.iso.datetime().nullable(),
|
|
7270
|
+
created_at: z.iso.datetime(),
|
|
7271
|
+
updated_at: z.iso.datetime()
|
|
7272
|
+
});
|
|
7273
|
+
/**
|
|
7274
|
+
* A page of certifications held by your company's workers.
|
|
7275
|
+
*/
|
|
7276
|
+
export const zUserCertificationsResponseObjWritable = z.object({
|
|
7277
|
+
meta: zMeta,
|
|
7278
|
+
links: zLinks,
|
|
7279
|
+
data: z.array(zUserCertificationResponseObjectWritable)
|
|
7280
|
+
});
|
|
6638
7281
|
/**
|
|
6639
7282
|
* Success
|
|
6640
7283
|
*/
|
|
@@ -6823,6 +7466,14 @@ export const zDeleteEmployerPath = z.object({
|
|
|
6823
7466
|
* Success
|
|
6824
7467
|
*/
|
|
6825
7468
|
export const zDeleteEmployerResponse = zApprenticeshipProgramEmployerResponseObject;
|
|
7469
|
+
export const zGetEmployerPath = z.object({
|
|
7470
|
+
program_id: z.string(),
|
|
7471
|
+
id: z.string()
|
|
7472
|
+
});
|
|
7473
|
+
/**
|
|
7474
|
+
* Success
|
|
7475
|
+
*/
|
|
7476
|
+
export const zGetEmployerResponse = zApprenticeshipProgramEmployerResponseObject;
|
|
6826
7477
|
export const zUpdateEmployerBody = zApprenticeshipProgramEmployerUpdateParameters;
|
|
6827
7478
|
export const zUpdateEmployerPath = z.object({
|
|
6828
7479
|
program_id: z.string(),
|
|
@@ -6908,6 +7559,22 @@ export const zCreatePeriodPath = z.object({
|
|
|
6908
7559
|
* Created
|
|
6909
7560
|
*/
|
|
6910
7561
|
export const zCreatePeriodResponse = zApprenticeshipWageSchedulePeriodResponseObject;
|
|
7562
|
+
export const zDeletePeriodPath = z.object({
|
|
7563
|
+
wage_schedule_id: z.string(),
|
|
7564
|
+
id: z.string()
|
|
7565
|
+
});
|
|
7566
|
+
/**
|
|
7567
|
+
* No Content
|
|
7568
|
+
*/
|
|
7569
|
+
export const zDeletePeriodResponse = z.void();
|
|
7570
|
+
export const zGetPeriodPath = z.object({
|
|
7571
|
+
wage_schedule_id: z.string(),
|
|
7572
|
+
id: z.string()
|
|
7573
|
+
});
|
|
7574
|
+
/**
|
|
7575
|
+
* Success
|
|
7576
|
+
*/
|
|
7577
|
+
export const zGetPeriodResponse = zApprenticeshipWageSchedulePeriodResponseObject;
|
|
6911
7578
|
export const zUpdatePeriodBody = zApprenticeshipWageSchedulePeriodUpdateParameters;
|
|
6912
7579
|
export const zUpdatePeriodPath = z.object({
|
|
6913
7580
|
wage_schedule_id: z.string(),
|
|
@@ -7683,7 +8350,7 @@ export const zListSubLocationsResponse = z.object({
|
|
|
7683
8350
|
});
|
|
7684
8351
|
export const zCreateSubLocationBody = zAssetsSubLocationParameters;
|
|
7685
8352
|
/**
|
|
7686
|
-
* Created
|
|
8353
|
+
* Created with an explicit holder
|
|
7687
8354
|
*/
|
|
7688
8355
|
export const zCreateSubLocationResponse = zAssetsSubLocationResponseObject;
|
|
7689
8356
|
export const zDeleteSubLocationPath = z.object({
|
|
@@ -7897,6 +8564,21 @@ export const zUpdatePackagePath = z.object({
|
|
|
7897
8564
|
* Success
|
|
7898
8565
|
*/
|
|
7899
8566
|
export const zUpdatePackageResponse = zCertificationPackageResponseObject;
|
|
8567
|
+
export const zRevokeUserCertificationApprovalPath = z.object({
|
|
8568
|
+
user_certification_id: z.string()
|
|
8569
|
+
});
|
|
8570
|
+
/**
|
|
8571
|
+
* Success
|
|
8572
|
+
*/
|
|
8573
|
+
export const zRevokeUserCertificationApprovalResponse = zUserCertificationResponseObject;
|
|
8574
|
+
export const zApproveUserCertificationBody = zUserCertificationApprovalParameters;
|
|
8575
|
+
export const zApproveUserCertificationPath = z.object({
|
|
8576
|
+
user_certification_id: z.string()
|
|
8577
|
+
});
|
|
8578
|
+
/**
|
|
8579
|
+
* Success
|
|
8580
|
+
*/
|
|
8581
|
+
export const zApproveUserCertificationResponse = zUserCertificationResponseObject;
|
|
7900
8582
|
export const zListUserCertificationsQuery = z.object({
|
|
7901
8583
|
filter: z.string().optional(),
|
|
7902
8584
|
'filter[unexpected]': z.string().optional(),
|
|
@@ -7941,6 +8623,9 @@ export const zUpdateUserCertificationPath = z.object({
|
|
|
7941
8623
|
*/
|
|
7942
8624
|
export const zUpdateUserCertificationResponse = zUserCertificationResponseObject;
|
|
7943
8625
|
export const zListCertificationsQuery = z.object({
|
|
8626
|
+
'filter[name]': z.string().optional(),
|
|
8627
|
+
filter: z.string().optional(),
|
|
8628
|
+
'filter[unexpected]': z.string().optional(),
|
|
7944
8629
|
'page[cursor]': z.string().optional(),
|
|
7945
8630
|
'page[limit]': z.int().gte(1).optional().default(20),
|
|
7946
8631
|
page: z.string().optional()
|
|
@@ -7977,6 +8662,7 @@ export const zUpdateCertificationPath = z.object({
|
|
|
7977
8662
|
*/
|
|
7978
8663
|
export const zUpdateCertificationResponse = zCertificationResponseObject;
|
|
7979
8664
|
export const zListDepartmentsQuery = z.object({
|
|
8665
|
+
'filter[name]': z.string().optional(),
|
|
7980
8666
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
7981
8667
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
7982
8668
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -8166,6 +8852,7 @@ export const zCreateDirectUploadBody = zDirectUploadParameters;
|
|
|
8166
8852
|
*/
|
|
8167
8853
|
export const zCreateDirectUploadResponse = zDirectUploadResponseObject;
|
|
8168
8854
|
export const zListFormDefinitionsQuery = z.object({
|
|
8855
|
+
'filter[name]': z.string().optional(),
|
|
8169
8856
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
8170
8857
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
8171
8858
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -8185,6 +8872,13 @@ export const zListFormDefinitionsQuery = z.object({
|
|
|
8185
8872
|
* Success
|
|
8186
8873
|
*/
|
|
8187
8874
|
export const zListFormDefinitionsResponse = zFormDefinitionResponseObject;
|
|
8875
|
+
export const zGetFormDefinitionPath = z.object({
|
|
8876
|
+
id: z.string()
|
|
8877
|
+
});
|
|
8878
|
+
/**
|
|
8879
|
+
* Success
|
|
8880
|
+
*/
|
|
8881
|
+
export const zGetFormDefinitionResponse = zFormDefinitionObject;
|
|
8188
8882
|
export const zListFormSubmissionDeltasQuery = z.object({
|
|
8189
8883
|
'filter[event]': z.enum([
|
|
8190
8884
|
'create',
|
|
@@ -8259,6 +8953,9 @@ export const zRemoveUserFromGroupPath = z.object({
|
|
|
8259
8953
|
*/
|
|
8260
8954
|
export const zRemoveUserFromGroupResponse = zUserGroupResponse;
|
|
8261
8955
|
export const zListGroupsQuery = z.object({
|
|
8956
|
+
'filter[name]': z.string().optional(),
|
|
8957
|
+
filter: z.string().optional(),
|
|
8958
|
+
'filter[unexpected]': z.string().optional(),
|
|
8262
8959
|
'page[cursor]': z.string().optional(),
|
|
8263
8960
|
'page[limit]': z.int().gte(1).optional().default(20),
|
|
8264
8961
|
page: z.string().optional()
|
|
@@ -8298,6 +8995,47 @@ export const zUpdateGroupPath = z.object({
|
|
|
8298
8995
|
* Success
|
|
8299
8996
|
*/
|
|
8300
8997
|
export const zUpdateGroupResponse = zGroupResponseObject;
|
|
8998
|
+
export const zListJobFormAssignmentTasksPath = z.object({
|
|
8999
|
+
job_id: z.string()
|
|
9000
|
+
});
|
|
9001
|
+
export const zListJobFormAssignmentTasksQuery = z.object({
|
|
9002
|
+
'page[cursor]': z.string().optional(),
|
|
9003
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9004
|
+
page: z.string().optional()
|
|
9005
|
+
});
|
|
9006
|
+
/**
|
|
9007
|
+
* Success
|
|
9008
|
+
*/
|
|
9009
|
+
export const zListJobFormAssignmentTasksResponse = z.object({
|
|
9010
|
+
meta: zMeta,
|
|
9011
|
+
links: zLinks,
|
|
9012
|
+
data: z.array(zJobFormAssignmentResponseObject)
|
|
9013
|
+
});
|
|
9014
|
+
export const zCreateJobFormAssignmentTaskBody = zJobFormAssignmentParameters;
|
|
9015
|
+
export const zCreateJobFormAssignmentTaskPath = z.object({
|
|
9016
|
+
job_id: z.string()
|
|
9017
|
+
});
|
|
9018
|
+
/**
|
|
9019
|
+
* Created (recurring, with assignees and reminders)
|
|
9020
|
+
*/
|
|
9021
|
+
export const zCreateJobFormAssignmentTaskResponse = zJobFormAssignmentResponseObject;
|
|
9022
|
+
export const zGetJobFormAssignmentTaskPath = z.object({
|
|
9023
|
+
job_id: z.string(),
|
|
9024
|
+
id: z.string()
|
|
9025
|
+
});
|
|
9026
|
+
/**
|
|
9027
|
+
* Success
|
|
9028
|
+
*/
|
|
9029
|
+
export const zGetJobFormAssignmentTaskResponse = zJobFormAssignmentResponseObject;
|
|
9030
|
+
export const zUpdateJobFormAssignmentTaskBody = zJobFormAssignmentUpdateParameters;
|
|
9031
|
+
export const zUpdateJobFormAssignmentTaskPath = z.object({
|
|
9032
|
+
job_id: z.string(),
|
|
9033
|
+
id: z.string()
|
|
9034
|
+
});
|
|
9035
|
+
/**
|
|
9036
|
+
* Success
|
|
9037
|
+
*/
|
|
9038
|
+
export const zUpdateJobFormAssignmentTaskResponse = zJobFormAssignmentResponseObject;
|
|
8301
9039
|
export const zListJobScopePricesPath = z.object({
|
|
8302
9040
|
job_id: z.string()
|
|
8303
9041
|
});
|
|
@@ -8418,6 +9156,53 @@ export const zGetRateRuleQuery = z.object({
|
|
|
8418
9156
|
* Success
|
|
8419
9157
|
*/
|
|
8420
9158
|
export const zGetRateRuleResponse = zRateRuleResponseObject;
|
|
9159
|
+
export const zListJobSitesPath = z.object({
|
|
9160
|
+
job_id: z.string()
|
|
9161
|
+
});
|
|
9162
|
+
export const zListJobSitesQuery = z.object({
|
|
9163
|
+
filter: z.string().optional(),
|
|
9164
|
+
'filter[unexpected]': z.string().optional(),
|
|
9165
|
+
'page[cursor]': z.string().optional(),
|
|
9166
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9167
|
+
page: z.string().optional()
|
|
9168
|
+
});
|
|
9169
|
+
/**
|
|
9170
|
+
* Success
|
|
9171
|
+
*/
|
|
9172
|
+
export const zListJobSitesResponse = zJobSitesResponseObject;
|
|
9173
|
+
export const zCreateJobSiteBody = zJobSiteParameters;
|
|
9174
|
+
export const zCreateJobSitePath = z.object({
|
|
9175
|
+
job_id: z.string()
|
|
9176
|
+
});
|
|
9177
|
+
/**
|
|
9178
|
+
* Created
|
|
9179
|
+
*/
|
|
9180
|
+
export const zCreateJobSiteResponse = zJobSiteResponseObject;
|
|
9181
|
+
export const zDeleteJobSitePath = z.object({
|
|
9182
|
+
job_id: z.string(),
|
|
9183
|
+
id: z.string()
|
|
9184
|
+
});
|
|
9185
|
+
/**
|
|
9186
|
+
* No Content
|
|
9187
|
+
*/
|
|
9188
|
+
export const zDeleteJobSiteResponse = z.void();
|
|
9189
|
+
export const zGetJobSitePath = z.object({
|
|
9190
|
+
job_id: z.string(),
|
|
9191
|
+
id: z.string()
|
|
9192
|
+
});
|
|
9193
|
+
/**
|
|
9194
|
+
* Success
|
|
9195
|
+
*/
|
|
9196
|
+
export const zGetJobSiteResponse = zJobSiteResponseObject;
|
|
9197
|
+
export const zUpdateJobSiteBody = zJobSiteUpdateParameters;
|
|
9198
|
+
export const zUpdateJobSitePath = z.object({
|
|
9199
|
+
job_id: z.string(),
|
|
9200
|
+
id: z.string()
|
|
9201
|
+
});
|
|
9202
|
+
/**
|
|
9203
|
+
* Success
|
|
9204
|
+
*/
|
|
9205
|
+
export const zUpdateJobSiteResponse = zJobSiteResponseObject;
|
|
8421
9206
|
export const zShiftJobWageDeterminationGenesisBody = zJobWageDeterminationGenesisParameters;
|
|
8422
9207
|
export const zShiftJobWageDeterminationGenesisHeaders = z.object({
|
|
8423
9208
|
'If-Match': z.string()
|
|
@@ -8563,6 +9348,8 @@ export const zListJobsQuery = z.object({
|
|
|
8563
9348
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
8564
9349
|
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
8565
9350
|
'filter[project_id]': z.string().optional(),
|
|
9351
|
+
'filter[companies_department_id]': z.string().optional(),
|
|
9352
|
+
'filter[companies_department_id][null]': z.boolean().optional(),
|
|
8566
9353
|
'filter[status]': z.string().optional(),
|
|
8567
9354
|
'filter[production_tracking_kind]': z.enum([
|
|
8568
9355
|
'none',
|
|
@@ -8654,6 +9441,92 @@ export const zGetSiteCheckInPath = z.object({
|
|
|
8654
9441
|
* Success
|
|
8655
9442
|
*/
|
|
8656
9443
|
export const zGetSiteCheckInResponse = zSiteCheckInResponseObject;
|
|
9444
|
+
export const zListFeatureFormAssignmentTasksPath = z.object({
|
|
9445
|
+
site_id: z.string(),
|
|
9446
|
+
feature_id: z.string()
|
|
9447
|
+
});
|
|
9448
|
+
export const zListFeatureFormAssignmentTasksQuery = z.object({
|
|
9449
|
+
'page[cursor]': z.string().optional(),
|
|
9450
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9451
|
+
page: z.string().optional()
|
|
9452
|
+
});
|
|
9453
|
+
/**
|
|
9454
|
+
* Success
|
|
9455
|
+
*/
|
|
9456
|
+
export const zListFeatureFormAssignmentTasksResponse = z.object({
|
|
9457
|
+
meta: zMeta,
|
|
9458
|
+
links: zLinks,
|
|
9459
|
+
data: z.array(zFeatureFormAssignmentResponseObject)
|
|
9460
|
+
});
|
|
9461
|
+
export const zCreateFeatureFormAssignmentTaskBody = zFeatureFormAssignmentParameters;
|
|
9462
|
+
export const zCreateFeatureFormAssignmentTaskPath = z.object({
|
|
9463
|
+
site_id: z.string(),
|
|
9464
|
+
feature_id: z.string()
|
|
9465
|
+
});
|
|
9466
|
+
/**
|
|
9467
|
+
* Created
|
|
9468
|
+
*/
|
|
9469
|
+
export const zCreateFeatureFormAssignmentTaskResponse = zFeatureFormAssignmentResponseObject;
|
|
9470
|
+
export const zGetFeatureFormAssignmentTaskPath = z.object({
|
|
9471
|
+
site_id: z.string(),
|
|
9472
|
+
feature_id: z.string(),
|
|
9473
|
+
id: z.string()
|
|
9474
|
+
});
|
|
9475
|
+
/**
|
|
9476
|
+
* Success
|
|
9477
|
+
*/
|
|
9478
|
+
export const zGetFeatureFormAssignmentTaskResponse = zFeatureFormAssignmentResponseObject;
|
|
9479
|
+
export const zUpdateFeatureFormAssignmentTaskBody = zFeatureFormAssignmentUpdateParameters;
|
|
9480
|
+
export const zUpdateFeatureFormAssignmentTaskPath = z.object({
|
|
9481
|
+
site_id: z.string(),
|
|
9482
|
+
feature_id: z.string(),
|
|
9483
|
+
id: z.string()
|
|
9484
|
+
});
|
|
9485
|
+
/**
|
|
9486
|
+
* Success
|
|
9487
|
+
*/
|
|
9488
|
+
export const zUpdateFeatureFormAssignmentTaskResponse = zFeatureFormAssignmentResponseObject;
|
|
9489
|
+
export const zListSiteFormAssignmentTasksPath = z.object({
|
|
9490
|
+
site_id: z.string()
|
|
9491
|
+
});
|
|
9492
|
+
export const zListSiteFormAssignmentTasksQuery = z.object({
|
|
9493
|
+
'page[cursor]': z.string().optional(),
|
|
9494
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9495
|
+
page: z.string().optional()
|
|
9496
|
+
});
|
|
9497
|
+
/**
|
|
9498
|
+
* Success
|
|
9499
|
+
*/
|
|
9500
|
+
export const zListSiteFormAssignmentTasksResponse = z.object({
|
|
9501
|
+
meta: zMeta,
|
|
9502
|
+
links: zLinks,
|
|
9503
|
+
data: z.array(zSiteFormAssignmentResponseObject)
|
|
9504
|
+
});
|
|
9505
|
+
export const zCreateSiteFormAssignmentTaskBody = zSiteFormAssignmentParameters;
|
|
9506
|
+
export const zCreateSiteFormAssignmentTaskPath = z.object({
|
|
9507
|
+
site_id: z.string()
|
|
9508
|
+
});
|
|
9509
|
+
/**
|
|
9510
|
+
* Created
|
|
9511
|
+
*/
|
|
9512
|
+
export const zCreateSiteFormAssignmentTaskResponse = zSiteFormAssignmentResponseObject;
|
|
9513
|
+
export const zGetSiteFormAssignmentTaskPath = z.object({
|
|
9514
|
+
site_id: z.string(),
|
|
9515
|
+
id: z.string()
|
|
9516
|
+
});
|
|
9517
|
+
/**
|
|
9518
|
+
* Success
|
|
9519
|
+
*/
|
|
9520
|
+
export const zGetSiteFormAssignmentTaskResponse = zSiteFormAssignmentResponseObject;
|
|
9521
|
+
export const zUpdateSiteFormAssignmentTaskBody = zSiteFormAssignmentUpdateParameters;
|
|
9522
|
+
export const zUpdateSiteFormAssignmentTaskPath = z.object({
|
|
9523
|
+
site_id: z.string(),
|
|
9524
|
+
id: z.string()
|
|
9525
|
+
});
|
|
9526
|
+
/**
|
|
9527
|
+
* Success
|
|
9528
|
+
*/
|
|
9529
|
+
export const zUpdateSiteFormAssignmentTaskResponse = zSiteFormAssignmentResponseObject;
|
|
8657
9530
|
export const zShiftOvertimeRuleGenesisBody = zOvertimeRuleGenesisParameters;
|
|
8658
9531
|
export const zShiftOvertimeRuleGenesisHeaders = z.object({
|
|
8659
9532
|
'If-Match': z.string()
|
|
@@ -8966,6 +9839,7 @@ export const zListPayRateRulePackagesQuery = z.object({
|
|
|
8966
9839
|
'filter[scoped_to_job_id][null]': z.boolean().optional(),
|
|
8967
9840
|
'filter[default]': z.boolean().optional(),
|
|
8968
9841
|
'filter[selectable]': z.boolean().optional(),
|
|
9842
|
+
'filter[name]': z.string().optional(),
|
|
8969
9843
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
8970
9844
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
8971
9845
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -9429,7 +10303,7 @@ export const zListCustomFieldsPath = z.object({
|
|
|
9429
10303
|
* Success
|
|
9430
10304
|
*/
|
|
9431
10305
|
export const zListCustomFieldsResponse = z.object({
|
|
9432
|
-
data: z.array(
|
|
10306
|
+
data: z.array(zCustomFieldResponseObject)
|
|
9433
10307
|
});
|
|
9434
10308
|
export const zUpdateCustomFieldBody = zPeopleEmploymentCustomFieldsUpdateParameters;
|
|
9435
10309
|
export const zUpdateCustomFieldHeaders = z.object({
|
|
@@ -9442,7 +10316,7 @@ export const zUpdateCustomFieldPath = z.object({
|
|
|
9442
10316
|
* Success
|
|
9443
10317
|
*/
|
|
9444
10318
|
export const zUpdateCustomFieldResponse = z.object({
|
|
9445
|
-
data: z.array(
|
|
10319
|
+
data: z.array(zCustomFieldResponseObject)
|
|
9446
10320
|
});
|
|
9447
10321
|
export const zUpdateGenesisBody = zPeopleEmploymentGenesisParameters;
|
|
9448
10322
|
export const zUpdateGenesisHeaders = z.object({
|
|
@@ -9740,7 +10614,7 @@ export const zGetCompletionPath = z.object({
|
|
|
9740
10614
|
* Success
|
|
9741
10615
|
*/
|
|
9742
10616
|
export const zGetCompletionResponse = zProductionCompletionResponseObject;
|
|
9743
|
-
export const zUpdateCompletionBody =
|
|
10617
|
+
export const zUpdateCompletionBody = zProductionCompletionUpdateParameters;
|
|
9744
10618
|
export const zUpdateCompletionPath = z.object({
|
|
9745
10619
|
id: z.string()
|
|
9746
10620
|
});
|
|
@@ -9756,6 +10630,55 @@ export const zCreateProjectTradePath = z.object({
|
|
|
9756
10630
|
* Created
|
|
9757
10631
|
*/
|
|
9758
10632
|
export const zCreateProjectTradeResponse = zPwaTradeResponseObject;
|
|
10633
|
+
export const zListProjectSitesPath = z.object({
|
|
10634
|
+
project_id: z.string()
|
|
10635
|
+
});
|
|
10636
|
+
export const zListProjectSitesQuery = z.object({
|
|
10637
|
+
'page[cursor]': z.string().optional(),
|
|
10638
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
10639
|
+
page: z.string().optional()
|
|
10640
|
+
});
|
|
10641
|
+
/**
|
|
10642
|
+
* Success
|
|
10643
|
+
*/
|
|
10644
|
+
export const zListProjectSitesResponse = z.object({
|
|
10645
|
+
meta: zMeta,
|
|
10646
|
+
links: zLinks,
|
|
10647
|
+
data: z.array(zProjectSiteResponseObject)
|
|
10648
|
+
});
|
|
10649
|
+
export const zCreateProjectSiteBody = zProjectSiteParameters;
|
|
10650
|
+
export const zCreateProjectSitePath = z.object({
|
|
10651
|
+
project_id: z.string()
|
|
10652
|
+
});
|
|
10653
|
+
/**
|
|
10654
|
+
* Created
|
|
10655
|
+
*/
|
|
10656
|
+
export const zCreateProjectSiteResponse = zProjectSiteResponseObject;
|
|
10657
|
+
export const zDeleteProjectSitePath = z.object({
|
|
10658
|
+
project_id: z.string(),
|
|
10659
|
+
id: z.string()
|
|
10660
|
+
});
|
|
10661
|
+
/**
|
|
10662
|
+
* No Content
|
|
10663
|
+
*/
|
|
10664
|
+
export const zDeleteProjectSiteResponse = z.void();
|
|
10665
|
+
export const zGetProjectSitePath = z.object({
|
|
10666
|
+
project_id: z.string(),
|
|
10667
|
+
id: z.string()
|
|
10668
|
+
});
|
|
10669
|
+
/**
|
|
10670
|
+
* Success
|
|
10671
|
+
*/
|
|
10672
|
+
export const zGetProjectSiteResponse = zProjectSiteResponseObject;
|
|
10673
|
+
export const zUpdateProjectSiteBody = zProjectSiteUpdateParameters;
|
|
10674
|
+
export const zUpdateProjectSitePath = z.object({
|
|
10675
|
+
project_id: z.string(),
|
|
10676
|
+
id: z.string()
|
|
10677
|
+
});
|
|
10678
|
+
/**
|
|
10679
|
+
* Success
|
|
10680
|
+
*/
|
|
10681
|
+
export const zUpdateProjectSiteResponse = zProjectSiteResponseObject;
|
|
9759
10682
|
export const zListProjectsQuery = z.object({
|
|
9760
10683
|
'filter[federal_pwa_mode]': z.enum([
|
|
9761
10684
|
'all',
|
|
@@ -9867,6 +10790,14 @@ export const zDeleteApprenticeshipOccupationPath = z.object({
|
|
|
9867
10790
|
* Success
|
|
9868
10791
|
*/
|
|
9869
10792
|
export const zDeleteApprenticeshipOccupationResponse = zPwaTradeApprenticeshipOccupationResponseObject;
|
|
10793
|
+
export const zGetApprenticeshipOccupationPath = z.object({
|
|
10794
|
+
trade_id: z.string(),
|
|
10795
|
+
id: z.string()
|
|
10796
|
+
});
|
|
10797
|
+
/**
|
|
10798
|
+
* Success
|
|
10799
|
+
*/
|
|
10800
|
+
export const zGetApprenticeshipOccupationResponse = zPwaTradeApprenticeshipOccupationResponseObject;
|
|
9870
10801
|
export const zUpdateApprenticeshipOccupationBody = zPwaTradeApprenticeshipOccupationUpdateParameters;
|
|
9871
10802
|
export const zUpdateApprenticeshipOccupationPath = z.object({
|
|
9872
10803
|
trade_id: z.string(),
|
|
@@ -10176,6 +11107,15 @@ export const zGetPriorPeriodAdjustmentPath = z.object({
|
|
|
10176
11107
|
* Success
|
|
10177
11108
|
*/
|
|
10178
11109
|
export const zGetPriorPeriodAdjustmentResponse = zPriorPeriodAdjustmentResponseObject;
|
|
11110
|
+
export const zUpdatePriorPeriodAdjustmentBody = zPriorPeriodAdjustmentUpdateParameters;
|
|
11111
|
+
export const zUpdatePriorPeriodAdjustmentPath = z.object({
|
|
11112
|
+
time_card_id: z.string(),
|
|
11113
|
+
id: z.string()
|
|
11114
|
+
});
|
|
11115
|
+
/**
|
|
11116
|
+
* Success
|
|
11117
|
+
*/
|
|
11118
|
+
export const zUpdatePriorPeriodAdjustmentResponse = zPriorPeriodAdjustmentResponseObject;
|
|
10179
11119
|
export const zListPwaCompliancesPath = z.object({
|
|
10180
11120
|
time_card_id: z.string()
|
|
10181
11121
|
});
|
|
@@ -10570,6 +11510,11 @@ export const zListPayPeriodConfigsResponse = z.object({
|
|
|
10570
11510
|
links: zLinks,
|
|
10571
11511
|
data: z.array(zPayPeriodConfigResponseObject)
|
|
10572
11512
|
});
|
|
11513
|
+
export const zCreatePayPeriodConfigBody = zPayPeriodConfigParameters;
|
|
11514
|
+
/**
|
|
11515
|
+
* Created
|
|
11516
|
+
*/
|
|
11517
|
+
export const zCreatePayPeriodConfigResponse = zPayPeriodConfigResponseObject;
|
|
10573
11518
|
export const zGetPayPeriodConfigPath = z.object({
|
|
10574
11519
|
id: z.string()
|
|
10575
11520
|
});
|
|
@@ -10760,6 +11705,7 @@ export const zListUsersQuery = z.object({
|
|
|
10760
11705
|
'none',
|
|
10761
11706
|
'all'
|
|
10762
11707
|
]).optional(),
|
|
11708
|
+
'filter[name]': z.string().optional(),
|
|
10763
11709
|
'page[cursor]': z.string().optional(),
|
|
10764
11710
|
'page[limit]': z.int().gte(1).optional().default(20),
|
|
10765
11711
|
page: z.string().optional(),
|