@dsptch-work/api-client 0.26.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 +27 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +385 -180
- package/dist/gen/sdk.gen.js +555 -244
- package/dist/gen/types.gen.d.ts +1342 -146
- package/dist/gen/zod.gen.d.ts +3822 -2344
- package/dist/gen/zod.gen.js +757 -61
- package/package.json +1 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -176,6 +176,12 @@ export const zProblem = z.object({
|
|
|
176
176
|
*
|
|
177
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.
|
|
178
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
|
+
*
|
|
179
185
|
* ### product_archived
|
|
180
186
|
*
|
|
181
187
|
* **Product Archived**
|
|
@@ -376,6 +382,7 @@ export const zProblemTypeCatalog = z.enum([
|
|
|
376
382
|
'not_found',
|
|
377
383
|
'already_terminated',
|
|
378
384
|
'import_in_progress',
|
|
385
|
+
'pay_schedule_already_exists',
|
|
379
386
|
'product_archived',
|
|
380
387
|
'recorded_since_termination',
|
|
381
388
|
'span_beyond_timeline_end',
|
|
@@ -1287,7 +1294,7 @@ export const zPerDiemUpdateParameters = z.object({
|
|
|
1287
1294
|
timekeeping_timecode_ids: z.array(z.string()).optional()
|
|
1288
1295
|
});
|
|
1289
1296
|
/**
|
|
1290
|
-
* The
|
|
1297
|
+
* The filled attribute values of a product or item — one entry per attribute its category makes fillable on that record.
|
|
1291
1298
|
*/
|
|
1292
1299
|
export const zAssetsAttributeValueObjects = z.array(z.object({
|
|
1293
1300
|
assets_attribute_id: z.string(),
|
|
@@ -1502,7 +1509,39 @@ export const zAttestationConfigParameters = z.object({
|
|
|
1502
1509
|
us_state_id: z.string().nullish()
|
|
1503
1510
|
});
|
|
1504
1511
|
/**
|
|
1505
|
-
*
|
|
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.
|
|
1506
1545
|
*/
|
|
1507
1546
|
export const zPayPeriodConfigResponseObject = z.object({
|
|
1508
1547
|
id: z.string(),
|
|
@@ -2481,10 +2520,10 @@ export const zJobParameters = z.object({
|
|
|
2481
2520
|
name: z.string().nullish(),
|
|
2482
2521
|
description: z.string().optional(),
|
|
2483
2522
|
requested_by_company_id: z.string().optional(),
|
|
2484
|
-
created_by_user_id: z.string().optional(),
|
|
2485
2523
|
manager_user_ids: z.array(z.string()).nullish(),
|
|
2486
2524
|
purchase_order_number: z.string().nullish(),
|
|
2487
2525
|
project_id: z.string().nullish(),
|
|
2526
|
+
companies_department_id: z.string().nullish(),
|
|
2488
2527
|
federal_pwa_mode: z.enum([
|
|
2489
2528
|
'all',
|
|
2490
2529
|
'pw_only',
|
|
@@ -2559,6 +2598,7 @@ export const zJobParameters = z.object({
|
|
|
2559
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.
|
|
2560
2599
|
*/
|
|
2561
2600
|
export const zJobCreateParameters = zJobParameters.and(z.object({
|
|
2601
|
+
created_by_user_id: z.string(),
|
|
2562
2602
|
template_id: z.string().nullish(),
|
|
2563
2603
|
custom_fields: z.array(z.object({
|
|
2564
2604
|
custom_field_config_id: z.string(),
|
|
@@ -2566,7 +2606,7 @@ export const zJobCreateParameters = zJobParameters.and(z.object({
|
|
|
2566
2606
|
})).optional()
|
|
2567
2607
|
}));
|
|
2568
2608
|
/**
|
|
2569
|
-
* 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.
|
|
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.
|
|
2570
2610
|
*/
|
|
2571
2611
|
export const zJobUpdateParameters = zJobParameters.and(z.object({
|
|
2572
2612
|
status: z.enum([
|
|
@@ -3176,7 +3216,7 @@ export const zPayrollRunResponseObject = z.object({
|
|
|
3176
3216
|
updated_at: z.iso.datetime()
|
|
3177
3217
|
});
|
|
3178
3218
|
/**
|
|
3179
|
-
* Create a payroll run. company_id, run_type, and run_date are required; an on-cycle run additionally requires timekeeping_pay_period_id.
|
|
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.
|
|
3180
3220
|
*/
|
|
3181
3221
|
export const zPayrollRunParameters = z.object({
|
|
3182
3222
|
company_id: z.string(),
|
|
@@ -3194,7 +3234,7 @@ export const zPayrollRunParameters = z.object({
|
|
|
3194
3234
|
external_id: z.string().nullish()
|
|
3195
3235
|
});
|
|
3196
3236
|
/**
|
|
3197
|
-
* Update a payroll run. Every field is optional — send only what changes. The run's company is fixed at creation.
|
|
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.
|
|
3198
3238
|
*/
|
|
3199
3239
|
export const zPayrollRunUpdateParameters = z.object({
|
|
3200
3240
|
timekeeping_pay_period_id: z.string().nullish(),
|
|
@@ -4040,51 +4080,519 @@ export const zPaystubLineItemResponseObject = z.object({
|
|
|
4040
4080
|
'garnishment',
|
|
4041
4081
|
'other'
|
|
4042
4082
|
])
|
|
4043
|
-
})
|
|
4044
|
-
}),
|
|
4045
|
-
amount_cents: z.string(),
|
|
4046
|
-
contributor: z.enum(['employee', 'employer']),
|
|
4047
|
-
created_at: z.iso.datetime(),
|
|
4048
|
-
updated_at: z.iso.datetime()
|
|
4049
|
-
});
|
|
4050
|
-
/**
|
|
4051
|
-
* Request body for creating a paystub line item. All four fields are required.
|
|
4052
|
-
*/
|
|
4053
|
-
export const zPaystubLineItemParameters = z.object({
|
|
4054
|
-
payrolls_paystub_id: z.string(),
|
|
4055
|
-
amount_cents: z.string(),
|
|
4056
|
-
contributor: z.enum(['employee', 'employer']),
|
|
4057
|
-
payrolls_external_map_id: z.string()
|
|
4058
|
-
});
|
|
4059
|
-
/**
|
|
4060
|
-
* Request body for updating a paystub line item. Send only the fields to change.
|
|
4061
|
-
*/
|
|
4062
|
-
export const zPaystubLineItemUpdateParameters = z.object({
|
|
4063
|
-
payrolls_paystub_id: z.string().optional(),
|
|
4064
|
-
amount_cents: z.string().optional(),
|
|
4065
|
-
contributor: z.enum(['employee', 'employer']).optional(),
|
|
4066
|
-
payrolls_external_map_id: z.string().optional()
|
|
4067
|
-
});
|
|
4068
|
-
/**
|
|
4069
|
-
* 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.
|
|
4070
|
-
*/
|
|
4071
|
-
export const zJobSiteResponseObject = z.object({
|
|
4072
|
-
id: z.string(),
|
|
4073
|
-
site_id: z.string(),
|
|
4074
|
-
feature_ids: z.array(z.string())
|
|
4075
|
-
});
|
|
4076
|
-
/**
|
|
4077
|
-
* Request body for attaching a site to a job. `site_id` is required; `feature_ids` is optional and defaults to none.
|
|
4078
|
-
*/
|
|
4079
|
-
export const zJobSiteParameters = z.object({
|
|
4080
|
-
site_id: z.string(),
|
|
4081
|
-
feature_ids: z.array(z.string()).optional()
|
|
4083
|
+
})
|
|
4084
|
+
}),
|
|
4085
|
+
amount_cents: z.string(),
|
|
4086
|
+
contributor: z.enum(['employee', 'employer']),
|
|
4087
|
+
created_at: z.iso.datetime(),
|
|
4088
|
+
updated_at: z.iso.datetime()
|
|
4089
|
+
});
|
|
4090
|
+
/**
|
|
4091
|
+
* Request body for creating a paystub line item. All four fields are required.
|
|
4092
|
+
*/
|
|
4093
|
+
export const zPaystubLineItemParameters = z.object({
|
|
4094
|
+
payrolls_paystub_id: z.string(),
|
|
4095
|
+
amount_cents: z.string(),
|
|
4096
|
+
contributor: z.enum(['employee', 'employer']),
|
|
4097
|
+
payrolls_external_map_id: z.string()
|
|
4098
|
+
});
|
|
4099
|
+
/**
|
|
4100
|
+
* Request body for updating a paystub line item. Send only the fields to change.
|
|
4101
|
+
*/
|
|
4102
|
+
export const zPaystubLineItemUpdateParameters = z.object({
|
|
4103
|
+
payrolls_paystub_id: z.string().optional(),
|
|
4104
|
+
amount_cents: z.string().optional(),
|
|
4105
|
+
contributor: z.enum(['employee', 'employer']).optional(),
|
|
4106
|
+
payrolls_external_map_id: z.string().optional()
|
|
4107
|
+
});
|
|
4108
|
+
/**
|
|
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.
|
|
4110
|
+
*/
|
|
4111
|
+
export const zJobSiteResponseObject = z.object({
|
|
4112
|
+
id: z.string(),
|
|
4113
|
+
site_id: z.string(),
|
|
4114
|
+
feature_ids: z.array(z.string())
|
|
4115
|
+
});
|
|
4116
|
+
/**
|
|
4117
|
+
* Request body for attaching a site to a job. `site_id` is required; `feature_ids` is optional and defaults to none.
|
|
4118
|
+
*/
|
|
4119
|
+
export const zJobSiteParameters = z.object({
|
|
4120
|
+
site_id: z.string(),
|
|
4121
|
+
feature_ids: z.array(z.string()).optional()
|
|
4122
|
+
});
|
|
4123
|
+
/**
|
|
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.
|
|
4125
|
+
*/
|
|
4126
|
+
export const zJobSiteUpdateParameters = z.object({
|
|
4127
|
+
feature_ids: z.array(z.string()).optional()
|
|
4128
|
+
});
|
|
4129
|
+
/**
|
|
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`.
|
|
4131
|
+
*/
|
|
4132
|
+
export const zJobFormAssignmentResponseObject = z.object({
|
|
4133
|
+
id: z.string(),
|
|
4134
|
+
job_id: z.string(),
|
|
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(),
|
|
4140
|
+
frequency: z.enum([
|
|
4141
|
+
'DAILY',
|
|
4142
|
+
'WORKDAILY',
|
|
4143
|
+
'WORKDAILYSIX',
|
|
4144
|
+
'WEEKLY',
|
|
4145
|
+
'BIWEEKLY',
|
|
4146
|
+
'MONTHLY',
|
|
4147
|
+
'QUARTERLY'
|
|
4148
|
+
]).nullable(),
|
|
4149
|
+
recurrence_end_time: z.iso.datetime().nullable(),
|
|
4150
|
+
task_assignee_user_ids: z.array(z.string()),
|
|
4151
|
+
reminders: z.array(z.object({
|
|
4152
|
+
offset: z.string(),
|
|
4153
|
+
remind_at: z.iso.datetime()
|
|
4154
|
+
}))
|
|
4155
|
+
});
|
|
4156
|
+
/**
|
|
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.
|
|
4158
|
+
*/
|
|
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
|
+
})
|
|
4082
4532
|
});
|
|
4083
4533
|
/**
|
|
4084
|
-
*
|
|
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.
|
|
4085
4535
|
*/
|
|
4086
|
-
export const
|
|
4087
|
-
|
|
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()
|
|
4088
4596
|
});
|
|
4089
4597
|
/**
|
|
4090
4598
|
* A company-owned collection of conditional wage and fringe adjustments, optionally scoped to a job.
|
|
@@ -4117,7 +4625,6 @@ export const zPayRatesRulePackageUpdateParameters = z.object({
|
|
|
4117
4625
|
* Request body for creating or updating a position on a job. The job is taken from the URL path.
|
|
4118
4626
|
*/
|
|
4119
4627
|
export const zPositionParameters = z.object({
|
|
4120
|
-
job_id: z.string().optional(),
|
|
4121
4628
|
fulfilled_by_user_id: z.string().nullish(),
|
|
4122
4629
|
start_time: z.iso.datetime().nullish(),
|
|
4123
4630
|
end_time: z.iso.datetime().nullish(),
|
|
@@ -4165,6 +4672,17 @@ export const zProductionJobScopePriceResponseObject = z.object({
|
|
|
4165
4672
|
created_at: z.iso.datetime(),
|
|
4166
4673
|
updated_at: z.iso.datetime()
|
|
4167
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
|
+
});
|
|
4168
4686
|
/**
|
|
4169
4687
|
* Fields shared by both completion payload kinds.
|
|
4170
4688
|
*/
|
|
@@ -4334,7 +4852,7 @@ export const zCertificationResponseObject = z.object({
|
|
|
4334
4852
|
updated_at: z.iso.datetime()
|
|
4335
4853
|
});
|
|
4336
4854
|
/**
|
|
4337
|
-
* 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.
|
|
4338
4856
|
*/
|
|
4339
4857
|
export const zUserCertificationParameters = z.object({
|
|
4340
4858
|
user_id: z.string(),
|
|
@@ -4344,13 +4862,12 @@ export const zUserCertificationParameters = z.object({
|
|
|
4344
4862
|
name: z.string().max(255).regex(/^[\w\s.-]*\.[A-Za-z0-9]+$/),
|
|
4345
4863
|
content: z.string()
|
|
4346
4864
|
}).nullish(),
|
|
4347
|
-
verified: z.boolean().optional(),
|
|
4348
4865
|
expiration_date: z.iso.date().nullish(),
|
|
4349
4866
|
credential_id: z.string().nullish(),
|
|
4350
4867
|
archived_at: z.iso.datetime().nullish()
|
|
4351
4868
|
});
|
|
4352
4869
|
/**
|
|
4353
|
-
* 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.
|
|
4354
4871
|
*/
|
|
4355
4872
|
export const zUserCertificationUpdateParameters = z.object({
|
|
4356
4873
|
user_id: z.string().optional(),
|
|
@@ -4360,7 +4877,6 @@ export const zUserCertificationUpdateParameters = z.object({
|
|
|
4360
4877
|
name: z.string().max(255).regex(/^[\w\s.-]*\.[A-Za-z0-9]+$/),
|
|
4361
4878
|
content: z.string()
|
|
4362
4879
|
}).nullish(),
|
|
4363
|
-
verified: z.boolean().optional(),
|
|
4364
4880
|
expiration_date: z.iso.date().nullish(),
|
|
4365
4881
|
credential_id: z.string().nullish(),
|
|
4366
4882
|
archived_at: z.iso.datetime().nullish()
|
|
@@ -4379,7 +4895,7 @@ export const zUserCertificationResponseObject = z.object({
|
|
|
4379
4895
|
user_id: z.string(),
|
|
4380
4896
|
certification_id: z.string(),
|
|
4381
4897
|
received_at: z.iso.datetime(),
|
|
4382
|
-
verified: z.boolean(),
|
|
4898
|
+
verified: z.boolean().readonly(),
|
|
4383
4899
|
issuer_company_id: z.string().nullable(),
|
|
4384
4900
|
expiration_date: z.iso.date().nullable(),
|
|
4385
4901
|
credential_id: z.string().nullable(),
|
|
@@ -4440,6 +4956,7 @@ export const zJobResponseObject = z.object({
|
|
|
4440
4956
|
created_by_company_id: z.string(),
|
|
4441
4957
|
requested_by_company_id: z.string().nullable(),
|
|
4442
4958
|
project_id: z.string().nullable(),
|
|
4959
|
+
companies_department_id: z.string().nullable(),
|
|
4443
4960
|
manager_users: z.array(z.object({
|
|
4444
4961
|
id: z.string(),
|
|
4445
4962
|
name: z.string()
|
|
@@ -6051,6 +6568,7 @@ export const zAssetsItemResponseObject = z.object({
|
|
|
6051
6568
|
container_item_id: z.string(),
|
|
6052
6569
|
quantity: z.int()
|
|
6053
6570
|
})),
|
|
6571
|
+
attributes: zAssetsAttributeValueObjects,
|
|
6054
6572
|
images: z.array(zAssetsAttachmentResponseObject),
|
|
6055
6573
|
archived_at: z.iso.datetime().nullable(),
|
|
6056
6574
|
created_at: z.iso.datetime(),
|
|
@@ -6117,7 +6635,7 @@ export const zAssetsProductUpdateParameters = z.object({
|
|
|
6117
6635
|
images_attributes: z.array(zAssetsAttachmentParameters).optional()
|
|
6118
6636
|
});
|
|
6119
6637
|
/**
|
|
6120
|
-
* 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.
|
|
6121
6639
|
*/
|
|
6122
6640
|
export const zAssetsItemParameters = z.object({
|
|
6123
6641
|
name: z.string().min(1),
|
|
@@ -6129,6 +6647,11 @@ export const zAssetsItemParameters = z.object({
|
|
|
6129
6647
|
purchase_price_cents: z.int().optional(),
|
|
6130
6648
|
external_id: z.string().optional(),
|
|
6131
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(),
|
|
6132
6655
|
images_attributes: z.array(zAssetsAttachmentParameters).optional(),
|
|
6133
6656
|
assets_site_id: z.string().optional(),
|
|
6134
6657
|
user_id: z.string().optional(),
|
|
@@ -6137,7 +6660,7 @@ export const zAssetsItemParameters = z.object({
|
|
|
6137
6660
|
performed_by_user_id: z.string()
|
|
6138
6661
|
});
|
|
6139
6662
|
/**
|
|
6140
|
-
* 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.
|
|
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.
|
|
6141
6664
|
*/
|
|
6142
6665
|
export const zAssetsItemUpdateParameters = z.object({
|
|
6143
6666
|
name: z.string().min(1).optional(),
|
|
@@ -6149,6 +6672,11 @@ export const zAssetsItemUpdateParameters = z.object({
|
|
|
6149
6672
|
purchase_price_cents: z.int().optional(),
|
|
6150
6673
|
external_id: z.string().optional(),
|
|
6151
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(),
|
|
6152
6680
|
images_attributes: z.array(zAssetsAttachmentParameters).optional(),
|
|
6153
6681
|
performed_by_user_id: z.string()
|
|
6154
6682
|
});
|
|
@@ -6636,11 +7164,9 @@ export const zAssetsSubLocationParameters = z.object({
|
|
|
6636
7164
|
code: z.string().min(1)
|
|
6637
7165
|
});
|
|
6638
7166
|
/**
|
|
6639
|
-
* 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.
|
|
6640
7168
|
*/
|
|
6641
7169
|
export const zAssetsSubLocationUpdateParameters = z.object({
|
|
6642
|
-
assets_site_id: z.string().optional(),
|
|
6643
|
-
container_item_id: z.string().optional(),
|
|
6644
7170
|
parent_id: z.string().nullish(),
|
|
6645
7171
|
kind: z.enum([
|
|
6646
7172
|
'zone',
|
|
@@ -6725,6 +7251,33 @@ export const zAssetsAdjustmentParameters = z.object({
|
|
|
6725
7251
|
export const zAssetsArchiveParameters = z.object({
|
|
6726
7252
|
performed_by_user_id: z.string()
|
|
6727
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
|
+
});
|
|
6728
7281
|
/**
|
|
6729
7282
|
* Success
|
|
6730
7283
|
*/
|
|
@@ -7797,7 +8350,7 @@ export const zListSubLocationsResponse = z.object({
|
|
|
7797
8350
|
});
|
|
7798
8351
|
export const zCreateSubLocationBody = zAssetsSubLocationParameters;
|
|
7799
8352
|
/**
|
|
7800
|
-
* Created
|
|
8353
|
+
* Created with an explicit holder
|
|
7801
8354
|
*/
|
|
7802
8355
|
export const zCreateSubLocationResponse = zAssetsSubLocationResponseObject;
|
|
7803
8356
|
export const zDeleteSubLocationPath = z.object({
|
|
@@ -8070,6 +8623,9 @@ export const zUpdateUserCertificationPath = z.object({
|
|
|
8070
8623
|
*/
|
|
8071
8624
|
export const zUpdateUserCertificationResponse = zUserCertificationResponseObject;
|
|
8072
8625
|
export const zListCertificationsQuery = z.object({
|
|
8626
|
+
'filter[name]': z.string().optional(),
|
|
8627
|
+
filter: z.string().optional(),
|
|
8628
|
+
'filter[unexpected]': z.string().optional(),
|
|
8073
8629
|
'page[cursor]': z.string().optional(),
|
|
8074
8630
|
'page[limit]': z.int().gte(1).optional().default(20),
|
|
8075
8631
|
page: z.string().optional()
|
|
@@ -8106,6 +8662,7 @@ export const zUpdateCertificationPath = z.object({
|
|
|
8106
8662
|
*/
|
|
8107
8663
|
export const zUpdateCertificationResponse = zCertificationResponseObject;
|
|
8108
8664
|
export const zListDepartmentsQuery = z.object({
|
|
8665
|
+
'filter[name]': z.string().optional(),
|
|
8109
8666
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
8110
8667
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
8111
8668
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -8295,6 +8852,7 @@ export const zCreateDirectUploadBody = zDirectUploadParameters;
|
|
|
8295
8852
|
*/
|
|
8296
8853
|
export const zCreateDirectUploadResponse = zDirectUploadResponseObject;
|
|
8297
8854
|
export const zListFormDefinitionsQuery = z.object({
|
|
8855
|
+
'filter[name]': z.string().optional(),
|
|
8298
8856
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
8299
8857
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
8300
8858
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -8395,6 +8953,9 @@ export const zRemoveUserFromGroupPath = z.object({
|
|
|
8395
8953
|
*/
|
|
8396
8954
|
export const zRemoveUserFromGroupResponse = zUserGroupResponse;
|
|
8397
8955
|
export const zListGroupsQuery = z.object({
|
|
8956
|
+
'filter[name]': z.string().optional(),
|
|
8957
|
+
filter: z.string().optional(),
|
|
8958
|
+
'filter[unexpected]': z.string().optional(),
|
|
8398
8959
|
'page[cursor]': z.string().optional(),
|
|
8399
8960
|
'page[limit]': z.int().gte(1).optional().default(20),
|
|
8400
8961
|
page: z.string().optional()
|
|
@@ -8434,6 +8995,47 @@ export const zUpdateGroupPath = z.object({
|
|
|
8434
8995
|
* Success
|
|
8435
8996
|
*/
|
|
8436
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;
|
|
8437
9039
|
export const zListJobScopePricesPath = z.object({
|
|
8438
9040
|
job_id: z.string()
|
|
8439
9041
|
});
|
|
@@ -8746,6 +9348,8 @@ export const zListJobsQuery = z.object({
|
|
|
8746
9348
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
8747
9349
|
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
8748
9350
|
'filter[project_id]': z.string().optional(),
|
|
9351
|
+
'filter[companies_department_id]': z.string().optional(),
|
|
9352
|
+
'filter[companies_department_id][null]': z.boolean().optional(),
|
|
8749
9353
|
'filter[status]': z.string().optional(),
|
|
8750
9354
|
'filter[production_tracking_kind]': z.enum([
|
|
8751
9355
|
'none',
|
|
@@ -8837,6 +9441,92 @@ export const zGetSiteCheckInPath = z.object({
|
|
|
8837
9441
|
* Success
|
|
8838
9442
|
*/
|
|
8839
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;
|
|
8840
9530
|
export const zShiftOvertimeRuleGenesisBody = zOvertimeRuleGenesisParameters;
|
|
8841
9531
|
export const zShiftOvertimeRuleGenesisHeaders = z.object({
|
|
8842
9532
|
'If-Match': z.string()
|
|
@@ -9149,6 +9839,7 @@ export const zListPayRateRulePackagesQuery = z.object({
|
|
|
9149
9839
|
'filter[scoped_to_job_id][null]': z.boolean().optional(),
|
|
9150
9840
|
'filter[default]': z.boolean().optional(),
|
|
9151
9841
|
'filter[selectable]': z.boolean().optional(),
|
|
9842
|
+
'filter[name]': z.string().optional(),
|
|
9152
9843
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
9153
9844
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
9154
9845
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -9923,7 +10614,7 @@ export const zGetCompletionPath = z.object({
|
|
|
9923
10614
|
* Success
|
|
9924
10615
|
*/
|
|
9925
10616
|
export const zGetCompletionResponse = zProductionCompletionResponseObject;
|
|
9926
|
-
export const zUpdateCompletionBody =
|
|
10617
|
+
export const zUpdateCompletionBody = zProductionCompletionUpdateParameters;
|
|
9927
10618
|
export const zUpdateCompletionPath = z.object({
|
|
9928
10619
|
id: z.string()
|
|
9929
10620
|
});
|
|
@@ -10819,6 +11510,11 @@ export const zListPayPeriodConfigsResponse = z.object({
|
|
|
10819
11510
|
links: zLinks,
|
|
10820
11511
|
data: z.array(zPayPeriodConfigResponseObject)
|
|
10821
11512
|
});
|
|
11513
|
+
export const zCreatePayPeriodConfigBody = zPayPeriodConfigParameters;
|
|
11514
|
+
/**
|
|
11515
|
+
* Created
|
|
11516
|
+
*/
|
|
11517
|
+
export const zCreatePayPeriodConfigResponse = zPayPeriodConfigResponseObject;
|
|
10822
11518
|
export const zGetPayPeriodConfigPath = z.object({
|
|
10823
11519
|
id: z.string()
|
|
10824
11520
|
});
|