@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.
@@ -161,6 +161,12 @@ export type Problem = {
161
161
  *
162
162
  * The credential is valid, but this action on this record is refused by policy. The operation is not available to this principal.
163
163
  *
164
+ * ### forbidden_key
165
+ *
166
+ * **Field Not Writable By Key**
167
+ *
168
+ * 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.
169
+ *
164
170
  * ### insufficient_api_key_scope
165
171
  *
166
172
  * **Insufficient API Key Scope**
@@ -195,6 +201,12 @@ export type Problem = {
195
201
  *
196
202
  * 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.
197
203
  *
204
+ * ### pay_schedule_already_exists
205
+ *
206
+ * **Pay Schedule Already Exists**
207
+ *
208
+ * 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.
209
+ *
198
210
  * ### product_archived
199
211
  *
200
212
  * **Product Archived**
@@ -370,7 +382,7 @@ export type Problem = {
370
382
  * Another write to the same resource held it for longer than this request was willing to wait, so nothing was applied. The request itself is fine — resend it unchanged after the `Retry-After` window.
371
383
  *
372
384
  */
373
- export type ProblemTypeCatalog = 'blank_axis' | 'invalid_cursor' | 'invalid_filter_key' | 'invalid_limit' | 'invalid_signature' | 'malformed_body' | 'non_range_filter_value' | 'non_scalar_axis' | 'non_scalar_filter_value' | 'parameter_missing' | 'parameter_not_object' | 'unknown_axis' | 'unknown_key' | 'unsupported_axis' | 'valid_axis_on_timeline' | 'unauthorized' | 'company_scoped_key_required' | 'forbidden' | 'insufficient_api_key_scope' | 'user_scoped_key_required' | 'not_found' | 'already_terminated' | 'import_in_progress' | 'product_archived' | 'recorded_since_termination' | 'span_beyond_timeline_end' | 'version_overlap' | 'precondition_failed' | 'attachment_not_image' | 'company_not_employer' | 'confirm_apprenticeship_conflict' | 'destroy_restricted' | 'interval_too_wide' | 'invalid_date' | 'invalid_filter_value' | 'invalid_iso8601_duration' | 'invalid_placement_move' | 'invalid_signed_id' | 'non_numeric_cents' | 'nothing_to_cancel' | 'pagination_failed' | 'subtype_foreign_keys' | 'synced_determination' | 'user_not_company_member' | 'validation_failed' | 'wage_schedule_outside_program' | 'precondition_required' | 'too_many_requests' | 'internal_error' | 'write_contended';
385
+ export type ProblemTypeCatalog = 'blank_axis' | 'invalid_cursor' | 'invalid_filter_key' | 'invalid_limit' | 'invalid_signature' | 'malformed_body' | 'non_range_filter_value' | 'non_scalar_axis' | 'non_scalar_filter_value' | 'parameter_missing' | 'parameter_not_object' | 'unknown_axis' | 'unknown_key' | 'unsupported_axis' | 'valid_axis_on_timeline' | 'unauthorized' | 'company_scoped_key_required' | 'forbidden' | 'forbidden_key' | 'insufficient_api_key_scope' | 'user_scoped_key_required' | 'not_found' | 'already_terminated' | 'import_in_progress' | 'pay_schedule_already_exists' | 'product_archived' | 'recorded_since_termination' | 'span_beyond_timeline_end' | 'version_overlap' | 'precondition_failed' | 'attachment_not_image' | 'company_not_employer' | 'confirm_apprenticeship_conflict' | 'destroy_restricted' | 'interval_too_wide' | 'invalid_date' | 'invalid_filter_value' | 'invalid_iso8601_duration' | 'invalid_placement_move' | 'invalid_signed_id' | 'non_numeric_cents' | 'nothing_to_cancel' | 'pagination_failed' | 'subtype_foreign_keys' | 'synced_determination' | 'user_not_company_member' | 'validation_failed' | 'wage_schedule_outside_program' | 'precondition_required' | 'too_many_requests' | 'internal_error' | 'write_contended';
374
386
  export type ApiKeyScopeResponseObject = {
375
387
  resource: string;
376
388
  action: 'read' | 'create' | 'update' | 'delete';
@@ -1026,7 +1038,7 @@ export type ApprenticeshipOccupationUpdateParameters = {
1026
1038
  */
1027
1039
  export type ApprenticeshipProgramEmployerParameters = {
1028
1040
  /**
1029
- * ID of the company to authorize as an employer. An API key may name only its own company. Required.
1041
+ * ID of the company to authorize as an employer. A company-scoped key may name only its own company; a user-scoped key may name a company its user administers or manages. Required.
1030
1042
  */
1031
1043
  company_id: string;
1032
1044
  /**
@@ -1035,11 +1047,11 @@ export type ApprenticeshipProgramEmployerParameters = {
1035
1047
  require_timecard_allocation?: boolean;
1036
1048
  };
1037
1049
  /**
1038
- * Update an employer authorization in a program. Send only the fields to change; only the program's sponsor may manage this roster, and an API key may change only the row naming its own company.
1050
+ * 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.
1039
1051
  */
1040
1052
  export type ApprenticeshipProgramEmployerUpdateParameters = {
1041
1053
  /**
1042
- * ID of the company authorized as an employer. An API key may name only its own company; omit to leave it unchanged.
1054
+ * ID of the company authorized as an employer. A company-scoped key may name only its own company; a user-scoped key may name a company its user administers or manages. Omit to leave it unchanged.
1043
1055
  */
1044
1056
  company_id?: string;
1045
1057
  /**
@@ -1528,7 +1540,7 @@ export type PeopleEmploymentCreateParameters = {
1528
1540
  */
1529
1541
  user_id: string;
1530
1542
  /**
1531
- * First day of the stint, as a calendar date (`YYYY-MM-DD`). Required; interpreted at midnight in the credential company's time zone. A value carrying a time component is refused with `422` rather than truncated.
1543
+ * First day of the stint, as a calendar date (`YYYY-MM-DD`). Required; interpreted at midnight in the credential company's time zone.
1532
1544
  */
1533
1545
  hire_date: string;
1534
1546
  /**
@@ -1711,7 +1723,7 @@ export type PeopleEmploymentScheduledChangeUpdateParameters = {
1711
1723
  */
1712
1724
  export type PeopleEmploymentGenesisParameters = {
1713
1725
  /**
1714
- * The timeline's new start, as a calendar date (`YYYY-MM-DD`). Required; a value carrying a time component is refused with `422` rather than truncated. Moving it earlier extends the first version back to it. Moving it later drops every version whose coverage ended at or before it and truncates the one spanning it, so what those versions said stops being readable. Refused with `422` when the employment has no finite start or the new start would fall at or after a scheduled termination.
1726
+ * The timeline's new start, as a calendar date (`YYYY-MM-DD`). Required. Moving it earlier extends the first version back to it. Moving it later drops every version whose coverage ended at or before it and truncates the one spanning it, so what those versions said stops being readable. Refused with `422` when the employment has no finite start or the new start would fall at or after a scheduled termination.
1715
1727
  */
1716
1728
  effective_date?: string;
1717
1729
  };
@@ -1720,7 +1732,7 @@ export type PeopleEmploymentGenesisParameters = {
1720
1732
  */
1721
1733
  export type PeopleEmploymentScheduledTerminationParameters = {
1722
1734
  /**
1723
- * The exclusive end of the employment's valid-time timeline, as a calendar date (`YYYY-MM-DD`). Required; a value carrying a time component is refused with `422` rather than truncated. Must fall after the employment's genesis. Scheduling removes versions that start on or after the new end and truncates the version spanning it. An employment holds at most one scheduled termination; cancel the standing one before scheduling another. Cancellation reopens the last surviving version and does not restore removed versions.
1735
+ * The exclusive end of the employment's valid-time timeline, as a calendar date (`YYYY-MM-DD`). Required. Must fall after the employment's genesis. Scheduling removes versions that start on or after the new end and truncates the version spanning it. An employment holds at most one scheduled termination; cancel the standing one before scheduling another. Cancellation reopens the last surviving version and does not restore removed versions.
1724
1736
  */
1725
1737
  effective_date: string;
1726
1738
  };
@@ -1749,10 +1761,6 @@ export type PeopleEmploymentUpdateParameters = {
1749
1761
  */
1750
1762
  enrolled_in_t_and_a?: boolean;
1751
1763
  };
1752
- export type PeopleEmploymentCustomFieldResponseObject = {
1753
- custom_field_config_id: string;
1754
- value: string | null;
1755
- };
1756
1764
  /**
1757
1765
  * 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.
1758
1766
  */
@@ -2420,11 +2428,11 @@ export type PerDiemParameters = {
2420
2428
  */
2421
2429
  active?: boolean | null;
2422
2430
  /**
2423
- * IDs of the work types this per diem applies to.
2431
+ * IDs of the work types this per diem applies to. Each must be shared or the company's own.
2424
2432
  */
2425
2433
  work_type_ids?: Array<string>;
2426
2434
  /**
2427
- * IDs of the timecodes this per diem applies to.
2435
+ * IDs of the timecodes this per diem applies to. Each must belong to the company.
2428
2436
  */
2429
2437
  timekeeping_timecode_ids?: Array<string>;
2430
2438
  };
@@ -2461,16 +2469,16 @@ export type PerDiemUpdateParameters = {
2461
2469
  */
2462
2470
  active?: boolean | null;
2463
2471
  /**
2464
- * Complete set of work type IDs this per diem applies to. Omit to leave it unchanged.
2472
+ * Complete set of work type IDs this per diem applies to. Each must be shared or the company's own. Omit to leave it unchanged.
2465
2473
  */
2466
2474
  work_type_ids?: Array<string>;
2467
2475
  /**
2468
- * Complete set of timecode IDs this per diem applies to. Omit to leave it unchanged.
2476
+ * Complete set of timecode IDs this per diem applies to. Each must belong to the company. Omit to leave it unchanged.
2469
2477
  */
2470
2478
  timekeeping_timecode_ids?: Array<string>;
2471
2479
  };
2472
2480
  /**
2473
- * The product's filled attribute values — one entry per attribute assigned to its category.
2481
+ * The filled attribute values of a product or item — one entry per attribute its category makes fillable on that record.
2474
2482
  */
2475
2483
  export type AssetsAttributeValueObjects = Array<{
2476
2484
  /**
@@ -3000,7 +3008,68 @@ export type AttestationConfigParameters = {
3000
3008
  us_state_id?: string | null;
3001
3009
  };
3002
3010
  /**
3003
- * 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. Read-only; only the currently-valid version is returned, keyed by its stable id.
3011
+ * Create the company's first pay schedule. Time and payroll modes inherit company defaults.
3012
+ */
3013
+ export type PayPeriodConfigParameters = {
3014
+ /**
3015
+ * First effective date (YYYY-MM-DD), at midnight in tz_name; its weekday must match start_day_of_week.
3016
+ */
3017
+ effective_date: string;
3018
+ /**
3019
+ * Pay frequency: weekly (7 days) or biweekly (14 days).
3020
+ */
3021
+ frequency: 'weekly' | 'biweekly';
3022
+ /**
3023
+ * Day the pay period begins, 0 (Sunday) through 6 (Saturday).
3024
+ */
3025
+ start_day_of_week: 0 | 1 | 2 | 3 | 4 | 5 | 6;
3026
+ /**
3027
+ * Supported IANA time zone for schedule dates and deadlines (e.g. US/Central).
3028
+ */
3029
+ tz_name: string;
3030
+ /**
3031
+ * ISO 4217 currency code; defaults to USD.
3032
+ */
3033
+ currency?: string;
3034
+ /**
3035
+ * Time rounding in minutes, 1 or 15; defaults to 1.
3036
+ */
3037
+ rounding_interval?: 1 | 15;
3038
+ /**
3039
+ * Payroll provider; omit or send null when none.
3040
+ */
3041
+ payroll_system?: 'rippling' | 'quickbooks_online' | 'paychex' | 'gusto' | null;
3042
+ /**
3043
+ * Move pay dates after banking holidays rather than before; defaults to true.
3044
+ */
3045
+ paid_after_holiday?: boolean;
3046
+ /**
3047
+ * Whole days from the pay period's end to payday; must cover both deadline intervals.
3048
+ */
3049
+ arrear_days: number;
3050
+ /**
3051
+ * Calendar-day lead for the pay-run deadline; 1 with a clock time of 17:00 means seven hours before payday.
3052
+ */
3053
+ pay_run_deadline_days: number;
3054
+ /**
3055
+ * Pay-run deadline's local clock time (HH:MM).
3056
+ */
3057
+ pay_run_deadline_clock_time: string;
3058
+ /**
3059
+ * Whole calendar days before the pay-run deadline's date when approvals are due.
3060
+ */
3061
+ approvals_deadline_days: number;
3062
+ /**
3063
+ * Approvals deadline's local clock time (HH:MM).
3064
+ */
3065
+ approvals_deadline_clock_time: string;
3066
+ /**
3067
+ * Signed days from the pay-run deadline until time cards lock; negative values lock earlier, 0 locks at the deadline, null disables locking.
3068
+ */
3069
+ time_card_auto_lock_days?: number | null;
3070
+ };
3071
+ /**
3072
+ * 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.
3004
3073
  */
3005
3074
  export type PayPeriodConfigResponseObject = {
3006
3075
  /**
@@ -3332,7 +3401,7 @@ export type PwaCompanyUserDetailsResponseObject = {
3332
3401
  or_boli_race: Array<'american_indian_or_alaska_native' | 'asian' | 'hispanic_or_latino' | 'black_or_african_american' | 'native_hawaiian_or_pacific_islander' | 'white' | 'portuguese_or_brazilian'> | null;
3333
3402
  };
3334
3403
  /**
3335
- * 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. Only the keys listed here are accepted — any other key is rejected with 400 unknown_key.
3404
+ * 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.
3336
3405
  */
3337
3406
  export type PwaCompanyUserDetailsParameters = {
3338
3407
  /**
@@ -3425,7 +3494,7 @@ export type PwaCompanyUserDetailsParameters = {
3425
3494
  or_boli_race?: Array<'american_indian_or_alaska_native' | 'asian' | 'hispanic_or_latino' | 'black_or_african_american' | 'native_hawaiian_or_pacific_islander' | 'white' | 'portuguese_or_brazilian'> | null;
3426
3495
  };
3427
3496
  /**
3428
- * 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. user_id is absent by design — the company/user pair is fixed at creation, so sending the key is rejected with 400 unknown_key, as is any other key not listed here.
3497
+ * 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.
3429
3498
  */
3430
3499
  export type PwaCompanyUserDetailsUpdateParameters = {
3431
3500
  /**
@@ -3717,6 +3786,10 @@ export type JobResponseObject = {
3717
3786
  * ID of the project this job belongs to; null when the job is not part of a project.
3718
3787
  */
3719
3788
  project_id: string | null;
3789
+ /**
3790
+ * ID of the provider company's department assigned to this job; null when unassigned. Retrieve department IDs from GET /api/v1/companies/departments.
3791
+ */
3792
+ companies_department_id: string | null;
3720
3793
  /**
3721
3794
  * The job's managers, each as a minimal object; empty when the job has no managers.
3722
3795
  */
@@ -3819,7 +3892,10 @@ export type JobResponseObject = {
3819
3892
  * How this job records production completions: one of none (opts out), feature (per site feature, e.g. a turbine), or quantity (a unit count, e.g. modules). Locked once any completion exists.
3820
3893
  */
3821
3894
  production_tracking_kind: 'none' | 'feature' | 'quantity';
3822
- [key: string]: unknown;
3895
+ /**
3896
+ * Custom-field values stored on the job, one row per configuration, including hidden configurations; empty when none.
3897
+ */
3898
+ custom_fields: Array<CustomFieldResponseObject>;
3823
3899
  };
3824
3900
  /**
3825
3901
  * Prevailing-wage / apprenticeship (PWA) compliance details for a job, used in certified-payroll reporting. Common fields are always present when this object exists; regional fields appear only when applicable to the job's region and regional PWA mode. The property is null when no PWA details have been configured; PWA tracking modes alone do not materialize it.
@@ -3891,13 +3967,9 @@ export type PwaJobDetailsResponseObject = {
3891
3967
  ny_dol_prc_number?: string | null;
3892
3968
  } | null;
3893
3969
  /**
3894
- * 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. Extra keys are accepted, including custom fields.
3970
+ * 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.
3895
3971
  */
3896
3972
  export type JobParameters = {
3897
- /**
3898
- * ID of a job template to copy this job from; when set, the new job is created from that template. Null or omit to start from a blank job.
3899
- */
3900
- template_id?: string | null;
3901
3973
  /**
3902
3974
  * Human-readable job name, unique within the creating company; null when unset.
3903
3975
  */
@@ -3910,10 +3982,6 @@ export type JobParameters = {
3910
3982
  * ID of the company that requested the job (for example a general contractor). Required on create; omit on update to preserve the existing requester.
3911
3983
  */
3912
3984
  requested_by_company_id?: string;
3913
- /**
3914
- * ID of the user creating the job. Required on create and immutable thereafter — an update that sets, changes, or clears it is rejected.
3915
- */
3916
- created_by_user_id?: string;
3917
3985
  /**
3918
3986
  * IDs of the users who manage the job; null when the job has no managers.
3919
3987
  */
@@ -3926,6 +3994,10 @@ export type JobParameters = {
3926
3994
  * ID of the project this job belongs to; null when the job is not part of a project.
3927
3995
  */
3928
3996
  project_id?: string | null;
3997
+ /**
3998
+ * ID of a department belonging to the job's provider company. Retrieve department IDs from GET /api/v1/companies/departments. Send null to clear the assignment; omit on update to preserve it, or on create to preserve a copied template's assignment. A new job without a template starts unassigned.
3999
+ */
4000
+ companies_department_id?: string | null;
3929
4001
  /**
3930
4002
  * Federal prevailing-wage / apprenticeship (PWA) tracking mode: one of all (both prevailing wage and apprenticeship), pw_only, ap_only, or none.
3931
4003
  */
@@ -4049,19 +4121,6 @@ export type JobParameters = {
4049
4121
  */
4050
4122
  label?: string | null;
4051
4123
  } | null;
4052
- /**
4053
- * Custom field values to add to the job, addressed by custom field config id; null when none. Each row creates a value, so a config that already carries one on this job is refused with a 422 — to overwrite, send the value under a top-level key named after the custom field instead. Supplying this key turns that by-name form off for the request.
4054
- */
4055
- custom_fields_attributes?: Array<{
4056
- /**
4057
- * ID of the custom field config the value belongs to; the config must belong to the company that owns the job.
4058
- */
4059
- custom_field_config_id: string;
4060
- /**
4061
- * Value to store for the custom field; null when unset.
4062
- */
4063
- value?: string | null;
4064
- }> | null;
4065
4124
  /**
4066
4125
  * Prevailing-wage / apprenticeship (PWA) compliance details to set on the job. Omit or send an empty object to make no PWA-details changes; null and non-object values are rejected. The accepted regional keys depend on the effective region and regional PWA mode.
4067
4126
  */
@@ -4131,22 +4190,54 @@ export type JobParameters = {
4131
4190
  */
4132
4191
  ny_dol_prc_number?: string | null;
4133
4192
  };
4134
- [key: string]: unknown;
4135
4193
  };
4136
4194
  /**
4137
- * 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.
4195
+ * 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.
4138
4196
  */
4139
4197
  export type JobCreateParameters = JobParameters & {
4140
- [key: string]: unknown;
4198
+ /**
4199
+ * ID of the user creating the job. Required on create; the creator cannot be changed afterward.
4200
+ */
4201
+ created_by_user_id: string;
4202
+ /**
4203
+ * ID of a job template to copy this job from; when set, the new job is created from that template. Null or omit to start from a blank job.
4204
+ */
4205
+ template_id?: string | null;
4206
+ /**
4207
+ * Values for the job's custom fields, as a list of configurations and their values. Each configuration may appear only once. Every visible configuration gets a stored value; one left out of the list, or an omitted or empty list, stores null.
4208
+ */
4209
+ custom_fields?: Array<{
4210
+ /**
4211
+ * ID of a visible custom-field configuration owned by the credential company and applicable to jobs.
4212
+ */
4213
+ custom_field_config_id: string;
4214
+ /**
4215
+ * Value as text or null.
4216
+ */
4217
+ value: string | null;
4218
+ }>;
4141
4219
  };
4142
4220
  /**
4143
- * 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.
4221
+ * 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.
4144
4222
  */
4145
4223
  export type JobUpdateParameters = JobParameters & {
4146
4224
  /**
4147
4225
  * Settable status values. Other statuses are derived from job and position state and cannot be set directly.
4148
4226
  */
4149
4227
  status?: 'completed' | 'cancelled' | 'disputed';
4228
+ /**
4229
+ * Custom-field values to change, as a list of configurations and their replacement values. Each configuration may appear only once. Only the listed configurations change; every other configuration keeps its stored value, and an omitted or empty list changes none.
4230
+ */
4231
+ custom_fields?: Array<{
4232
+ /**
4233
+ * ID of a custom-field configuration owned by the credential company and applicable to jobs. A hidden configuration may be updated only when the job already stores its value.
4234
+ */
4235
+ custom_field_config_id: string;
4236
+ /**
4237
+ * Replacement value as text or null. Null stores a value rather than removing the row.
4238
+ */
4239
+ value: string | null;
4240
+ }>;
4150
4241
  };
4151
4242
  /**
4152
4243
  * A reusable job template — a saved job pattern for quickly creating new jobs with the same setup. Read-only through the API (listing only).
@@ -4205,7 +4296,7 @@ export type GroupUpdateParameters = {
4205
4296
  name?: string;
4206
4297
  };
4207
4298
  /**
4208
- * 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, no employment custom fields are published 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.
4299
+ * 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.
4209
4300
  */
4210
4301
  export type UserResponseObject = {
4211
4302
  /**
@@ -4285,7 +4376,7 @@ export type UserResponseObject = {
4285
4376
  */
4286
4377
  employment_state: 'active' | 'scheduled' | 'terminated' | 'none';
4287
4378
  /**
4288
- * Identity of the worker's employment at your company, stable across employment versions — a title change or a raise versions the employment without changing this id. It names the employment that this object's employment fields (type through employment_window, plus manager_user_id and any employment custom fields) describe: a worker rehired after an earlier stint holds a second employment with its own id, and exactly one of them is published here.
4379
+ * Identity of the worker's employment at your company, stable across employment versions — a title change or a raise versions the employment without changing this id. It names the employment that this object's employment fields (type through employment_window, plus manager_user_id and custom_fields) describe: a worker rehired after an earlier stint holds a second employment with its own id, and exactly one of them is published here.
4289
4380
  */
4290
4381
  employment_id: string | null;
4291
4382
  type: UserCompanyType;
@@ -4310,21 +4401,21 @@ export type UserResponseObject = {
4310
4401
  */
4311
4402
  compensation_type: string | null;
4312
4403
  /**
4313
- * Base pay rate, formatted as a currency string in the company's currency. Null when unset.
4404
+ * Base pay rate, formatted as a currency string in the company's currency. Present for company keys, company administrators, and the employed person, and omitted otherwise; null when authorized but unset.
4314
4405
  */
4315
- hourly_rate: string | null;
4406
+ hourly_rate?: string | null;
4316
4407
  /**
4317
- * Annual training-fund contribution for the worker, formatted as a currency string. Null when unset. Used in prevailing-wage fringe calculations.
4408
+ * Annual training-fund contribution for the worker, formatted as a currency string. Present for company keys, company administrators, and the employed person, and omitted otherwise; null when authorized but unset. Used in prevailing-wage fringe calculations.
4318
4409
  */
4319
- training_annual_amount: string | null;
4410
+ training_annual_amount?: string | null;
4320
4411
  /**
4321
- * Employer-paid annual combined health benefit, formatted as a currency string. Null when unset. Used in prevailing-wage fringe calculations.
4412
+ * Employer-paid annual combined health benefit, formatted as a currency string. Present for company keys, company administrators, and the employed person, and omitted otherwise; null when authorized but unset. Used in prevailing-wage fringe calculations.
4322
4413
  */
4323
- employer_combined_health_amount: string | null;
4414
+ employer_combined_health_amount?: string | null;
4324
4415
  /**
4325
- * Employer-paid annual combined savings and retirement benefit, formatted as a currency string. Null when unset. Used in prevailing-wage fringe calculations.
4416
+ * Employer-paid annual combined savings and retirement benefit, formatted as a currency string. Present for company keys, company administrators, and the employed person, and omitted otherwise; null when authorized but unset. Used in prevailing-wage fringe calculations.
4326
4417
  */
4327
- employer_combined_savings: string | null;
4418
+ employer_combined_savings?: string | null;
4328
4419
  /**
4329
4420
  * Annualized minutes the worker is expected to work, used to annualize fringe benefits. Null to fall back to the standard full-time year.
4330
4421
  */
@@ -4366,6 +4457,10 @@ export type UserResponseObject = {
4366
4457
  * Id of the worker's manager at your company (another user). Null when none.
4367
4458
  */
4368
4459
  manager_user_id: string | null;
4460
+ /**
4461
+ * Custom-field values stored on the employment, one row per configuration, including hidden configurations; empty when none. They belong to the whole employment rather than the version published here. Null for a role holder or an invitee your company does not employ.
4462
+ */
4463
+ custom_fields: Array<CustomFieldResponseObject> | null;
4369
4464
  /**
4370
4465
  * The worker's roles at your company, as an array of role strings such as TECHNICIAN, FIELD_LEAD, MANAGER, SAFETY_MANAGER, and ADMIN. Only roles at the company that owns the API key are listed.
4371
4466
  */
@@ -4463,7 +4558,6 @@ export type UserResponseObject = {
4463
4558
  */
4464
4559
  or_boli_race: Array<'american_indian_or_alaska_native' | 'asian' | 'hispanic_or_latino' | 'black_or_african_american' | 'native_hawaiian_or_pacific_islander' | 'white' | 'portuguese_or_brazilian'> | null;
4465
4560
  } | null;
4466
- [key: string]: unknown;
4467
4561
  };
4468
4562
  /**
4469
4563
  * Request body for updating a worker's profile. Limited to person-level identity fields; employment, roles, and compliance are managed through onboarding (create) and the user-company endpoints.
@@ -4534,10 +4628,6 @@ export type UserParameters = ({
4534
4628
  */
4535
4629
  skip_invite: true;
4536
4630
  }) & {
4537
- /**
4538
- * Id of the company to onboard the worker into. Must be the company that owns the API key.
4539
- */
4540
- company_id?: string;
4541
4631
  /**
4542
4632
  * Work email address; the worker signs in and receives their invite here. Null when the worker has none. Required to send an invite unless a phone number is given.
4543
4633
  */
@@ -4631,6 +4721,10 @@ export type UserParameters = ({
4631
4721
  * Base pay rate as a decimal string (for example "32.50"), in the company's currency.
4632
4722
  */
4633
4723
  hourly_rate?: string;
4724
+ /**
4725
+ * How the worker is paid: `hourly` or `salary`. Omit to use `hourly`; null is not accepted.
4726
+ */
4727
+ compensation_type?: 'hourly' | 'salary';
4634
4728
  /**
4635
4729
  * Whether the worker is eligible for overtime pay.
4636
4730
  */
@@ -4675,6 +4769,19 @@ export type UserParameters = ({
4675
4769
  * Ids of the groups to add the worker to at your company.
4676
4770
  */
4677
4771
  group_ids?: Array<number>;
4772
+ /**
4773
+ * Values for the employment's custom fields, as a list of configurations and their values. Each configuration may appear only once. Every visible configuration gets a stored value; one left out of the list, or an omitted or empty list, stores null.
4774
+ */
4775
+ custom_fields?: Array<{
4776
+ /**
4777
+ * ID of a visible custom-field configuration owned by the credential company and applicable to employments.
4778
+ */
4779
+ custom_field_config_id: string;
4780
+ /**
4781
+ * Value as text or null.
4782
+ */
4783
+ value: string | null;
4784
+ }>;
4678
4785
  /**
4679
4786
  * Prevailing-wage and apprenticeship compliance details to create for the worker (home address, demographics, and jurisdiction-specific reporting fields). Omit when the worker has no compliance record.
4680
4787
  */
@@ -4764,7 +4871,6 @@ export type UserParameters = ({
4764
4871
  */
4765
4872
  or_boli_race?: Array<'american_indian_or_alaska_native' | 'asian' | 'hispanic_or_latino' | 'black_or_african_american' | 'native_hawaiian_or_pacific_islander' | 'white' | 'portuguese_or_brazilian'> | null;
4766
4873
  } | null;
4767
- [key: string]: unknown;
4768
4874
  };
4769
4875
  /**
4770
4876
  * A page of time entries, with pagination metadata and navigation links.
@@ -4938,10 +5044,6 @@ export type ManagerTimeEntryApprovalParameters = {
4938
5044
  * The time-entry body fields shared by the create and update bodies; each of those declares its own requiredness.
4939
5045
  */
4940
5046
  export type TimeEntryParameters = {
4941
- /**
4942
- * Id of the time card to attach the entry to; user_id is derived server-side from it. Required on create.
4943
- */
4944
- timekeeping_time_card_id?: string;
4945
5047
  /**
4946
5048
  * these will be rounded to the nearest second
4947
5049
  */
@@ -4967,7 +5069,7 @@ export type TimeEntryParameters = {
4967
5069
  */
4968
5070
  description?: string | null;
4969
5071
  /**
4970
- * Base hourly rate in cents, sent as a string to preserve precision; omit it to let the system derive the rate from the position/user default. Only a company-scoped key or a key whose user is an admin in the entry's company may send it, and null from those keys also derives the default. Any other user-scoped key must omit it; sending it, null included, is refused with 403.
5072
+ * Base hourly rate in cents, sent as a string to preserve precision; omit it to let the system derive the rate from the position/user default, and null also derives the default. Admin only on user-scoped keys.
4971
5073
  */
4972
5074
  hourly_rate_cents?: string | null;
4973
5075
  /**
@@ -4976,9 +5078,13 @@ export type TimeEntryParameters = {
4976
5078
  feature_ids?: Array<string> | null;
4977
5079
  };
4978
5080
  /**
4979
- * Request body for creating a time entry — the time_entry_parameters fields, of which timekeeping_time_card_id, start_time, and end_time are required, plus the explicit "no feature" acknowledgement.
5081
+ * 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.
4980
5082
  */
4981
5083
  export type TimeEntryCreateParameters = TimeEntryParameters & {
5084
+ /**
5085
+ * Id of the time card to attach the entry to; user_id is derived server-side from it. Set at creation.
5086
+ */
5087
+ timekeeping_time_card_id: string;
4982
5088
  /**
4983
5089
  * Set true to record an explicit "no feature" answer when the job requires a feature allocation and you're not supplying one.
4984
5090
  */
@@ -4993,6 +5099,69 @@ export type TimeEntryUpdateParameters = TimeEntryParameters & {
4993
5099
  */
4994
5100
  confirm_allocation_conflict?: boolean | null;
4995
5101
  };
5102
+ /**
5103
+ * 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.
5104
+ */
5105
+ export type FormDefinitionObject = {
5106
+ /**
5107
+ * Unique identifier.
5108
+ */
5109
+ id: string;
5110
+ /**
5111
+ * Human-readable name of the form.
5112
+ */
5113
+ name: string;
5114
+ /**
5115
+ * Free-text description of the form.
5116
+ */
5117
+ description: string;
5118
+ /**
5119
+ * ID of the company that owns this form.
5120
+ */
5121
+ company_id: string;
5122
+ /**
5123
+ * ID of the user who last modified the form; null when unknown.
5124
+ */
5125
+ modified_by_user_id: string | null;
5126
+ /**
5127
+ * Lowercase tags on the form; null when none are set.
5128
+ */
5129
+ tags: Array<string> | null;
5130
+ /**
5131
+ * Names of the questions whose answers make up a submission's title; null when none are set.
5132
+ */
5133
+ title_keys: Array<string> | null;
5134
+ /**
5135
+ * Whether the form can be edited.
5136
+ */
5137
+ editable: boolean;
5138
+ /**
5139
+ * Whether the form is always shown to users.
5140
+ */
5141
+ always_visible: boolean;
5142
+ /**
5143
+ * Whether the form collects sensitive data.
5144
+ */
5145
+ sensitive_form: boolean;
5146
+ /**
5147
+ * Whether a user's prior answers can be carried forward into a new submission.
5148
+ */
5149
+ allow_carry_forward: boolean;
5150
+ /**
5151
+ * Revision number of the form's active version; null when it has no active version.
5152
+ */
5153
+ current_revision: number | null;
5154
+ /**
5155
+ * The SurveyJS form schema (questions, pages, and logic).
5156
+ */
5157
+ json: {
5158
+ [key: string]: unknown;
5159
+ };
5160
+ /**
5161
+ * When the record was created (ISO 8601).
5162
+ */
5163
+ created_at: string;
5164
+ };
4996
5165
  /**
4997
5166
  * A page of form definitions. A form definition is a SurveyJS form template built and versioned in the web app's form builder, so this API is read-only.
4998
5167
  */
@@ -5002,66 +5171,7 @@ export type FormDefinitionResponseObject = {
5002
5171
  /**
5003
5172
  * The page of form definitions.
5004
5173
  */
5005
- data: Array<{
5006
- /**
5007
- * Unique identifier.
5008
- */
5009
- id: string;
5010
- /**
5011
- * Human-readable name of the form.
5012
- */
5013
- name: string;
5014
- /**
5015
- * Free-text description of the form.
5016
- */
5017
- description: string;
5018
- /**
5019
- * ID of the company that owns this form.
5020
- */
5021
- company_id: string;
5022
- /**
5023
- * ID of the user who last modified the form; null when unknown.
5024
- */
5025
- modified_by_user_id: string | null;
5026
- /**
5027
- * Lowercase tags on the form; null when none are set.
5028
- */
5029
- tags: Array<string> | null;
5030
- /**
5031
- * Names of the questions whose answers make up a submission's title; null when none are set.
5032
- */
5033
- title_keys: Array<string> | null;
5034
- /**
5035
- * Whether the form can be edited.
5036
- */
5037
- editable: boolean;
5038
- /**
5039
- * Whether the form is always shown to users.
5040
- */
5041
- always_visible: boolean;
5042
- /**
5043
- * Whether the form collects sensitive data.
5044
- */
5045
- sensitive_form: boolean;
5046
- /**
5047
- * Whether a user's prior answers can be carried forward into a new submission.
5048
- */
5049
- allow_carry_forward: boolean;
5050
- /**
5051
- * Revision number of the form's active version; null when it has no active version.
5052
- */
5053
- current_revision: number | null;
5054
- /**
5055
- * The SurveyJS form schema (questions, pages, and logic).
5056
- */
5057
- json: {
5058
- [key: string]: unknown;
5059
- };
5060
- /**
5061
- * When the record was created (ISO 8601).
5062
- */
5063
- created_at: string;
5064
- }>;
5174
+ data: Array<FormDefinitionObject>;
5065
5175
  };
5066
5176
  /**
5067
5177
  * 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.
@@ -5148,7 +5258,7 @@ export type FormSubmissionResponseObject = {
5148
5258
  updated_at: string;
5149
5259
  };
5150
5260
  /**
5151
- * 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.
5261
+ * 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.
5152
5262
  */
5153
5263
  export type UserCompanyParameters = {
5154
5264
  type?: UserCompanyType;
@@ -5172,10 +5282,22 @@ export type UserCompanyParameters = {
5172
5282
  * Whether the worker is enrolled in Time and Attendance (time tracking).
5173
5283
  */
5174
5284
  enrolled_in_t_and_a?: boolean;
5175
- [key: string]: unknown;
5285
+ /**
5286
+ * Custom-field values to change, as a list of configurations and their replacement values. Each configuration may appear only once. Only the listed configurations change; every other configuration keeps its stored value, and an omitted or empty list changes none.
5287
+ */
5288
+ custom_fields?: Array<{
5289
+ /**
5290
+ * ID of a custom-field configuration owned by the credential company and applicable to employments. A hidden configuration may be updated only when the employment already stores its value.
5291
+ */
5292
+ custom_field_config_id: string;
5293
+ /**
5294
+ * Replacement value as text or null. Null stores a value rather than removing the row.
5295
+ */
5296
+ value: string | null;
5297
+ }>;
5176
5298
  };
5177
5299
  /**
5178
- * 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.
5300
+ * 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.
5179
5301
  */
5180
5302
  export type UserCompanyCreateParameters = {
5181
5303
  /**
@@ -5239,7 +5361,19 @@ export type UserCompanyCreateParameters = {
5239
5361
  * Paid training time for the year, in minutes.
5240
5362
  */
5241
5363
  training_annual_minutes?: number | null;
5242
- [key: string]: unknown;
5364
+ /**
5365
+ * Values for the employment's custom fields, as a list of configurations and their values. Each configuration may appear only once. Every visible configuration gets a stored value; one left out of the list, or an omitted or empty list, stores null.
5366
+ */
5367
+ custom_fields?: Array<{
5368
+ /**
5369
+ * ID of a visible custom-field configuration owned by the credential company and applicable to employments.
5370
+ */
5371
+ custom_field_config_id: string;
5372
+ /**
5373
+ * Value as text or null.
5374
+ */
5375
+ value: string | null;
5376
+ }>;
5243
5377
  };
5244
5378
  /**
5245
5379
  * A worker's scheduled compensation timeline at your company — the version currently in effect plus any future-dated versions.
@@ -5485,6 +5619,19 @@ export type CompanyParameters = ({
5485
5619
  naics_code?: string | null;
5486
5620
  linkedin_url?: string | null;
5487
5621
  };
5622
+ /**
5623
+ * A custom-field value stored on a record, addressed by the configuration it belongs to.
5624
+ */
5625
+ export type CustomFieldResponseObject = {
5626
+ /**
5627
+ * ID of the custom-field configuration the value belongs to. Join it to `GET /api/v1/custom_field_configs` for the field's name and definition.
5628
+ */
5629
+ custom_field_config_id: string;
5630
+ /**
5631
+ * The stored value as text; null when a null is stored.
5632
+ */
5633
+ value: string | null;
5634
+ };
5488
5635
  /**
5489
5636
  * 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.
5490
5637
  */
@@ -6687,7 +6834,7 @@ export type PayrollFringeBenefitPlanResponseObject = {
6687
6834
  */
6688
6835
  export type PayrollFringeBenefitPlanParameters = {
6689
6836
  /**
6690
- * ID of the pay schedule that owns the plan, stable across all of its versions. Required.
6837
+ * ID of the pay schedule that owns the plan, stable across all of its versions. Required. Set at creation.
6691
6838
  */
6692
6839
  timekeeping_pay_period_config_id: string;
6693
6840
  /**
@@ -6747,10 +6894,6 @@ export type PayrollFringeBenefitPlanParameters = {
6747
6894
  * Request body for updating a fringe-benefit plan. Send only the fields to change.
6748
6895
  */
6749
6896
  export type PayrollFringeBenefitPlanUpdateParameters = {
6750
- /**
6751
- * ID of the pay schedule that owns the plan, stable across all of its versions. Omit to leave it unchanged.
6752
- */
6753
- timekeeping_pay_period_config_id?: string;
6754
6897
  /**
6755
6898
  * Human-readable name of the plan. Omit to leave it unchanged.
6756
6899
  */
@@ -6965,7 +7108,7 @@ export type PayrollRunResponseObject = {
6965
7108
  updated_at: string;
6966
7109
  };
6967
7110
  /**
6968
- * Create a payroll run. company_id, run_type, and run_date are required; an on-cycle run additionally requires timekeeping_pay_period_id. Only the keys listed here are accepted — any other key is rejected with 400 unknown_key.
7111
+ * 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.
6969
7112
  */
6970
7113
  export type PayrollRunParameters = {
6971
7114
  /**
@@ -6973,11 +7116,11 @@ export type PayrollRunParameters = {
6973
7116
  */
6974
7117
  company_id: string;
6975
7118
  /**
6976
- * ID of the pay period the run is for; required for an on-cycle run, omitted for an off-cycle run.
7119
+ * ID of the pay period the run is for; required for an on-cycle run, omitted for an off-cycle run. Must belong to the run's company.
6977
7120
  */
6978
7121
  timekeeping_pay_period_id?: string | null;
6979
7122
  /**
6980
- * ID of the payroll-system credential that sourced the run.
7123
+ * ID of the payroll-system credential that sourced the run. Must belong to the run's company.
6981
7124
  */
6982
7125
  payrolls_credential_id?: string | null;
6983
7126
  /**
@@ -6994,15 +7137,15 @@ export type PayrollRunParameters = {
6994
7137
  external_id?: string | null;
6995
7138
  };
6996
7139
  /**
6997
- * Update a payroll run. Every field is optional — send only what changes. company_id is absent by design — the run's company is fixed at creation, so sending the key is rejected with 400 unknown_key, as is any other key not listed here.
7140
+ * 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.
6998
7141
  */
6999
7142
  export type PayrollRunUpdateParameters = {
7000
7143
  /**
7001
- * ID of the pay period the run is for; required for an on-cycle run, omitted for an off-cycle run.
7144
+ * ID of the pay period the run is for; required for an on-cycle run, omitted for an off-cycle run. Must belong to the run's company.
7002
7145
  */
7003
7146
  timekeeping_pay_period_id?: string | null;
7004
7147
  /**
7005
- * ID of the payroll-system credential that sourced the run.
7148
+ * ID of the payroll-system credential that sourced the run. Must belong to the run's company.
7006
7149
  */
7007
7150
  payrolls_credential_id?: string | null;
7008
7151
  /**
@@ -7148,7 +7291,7 @@ export type ProjectParameters = {
7148
7291
  */
7149
7292
  created_by_user_id: string;
7150
7293
  /**
7151
- * ID of a project visible to the API key's policy. Send null to make the project a root; the child schedule must fit within the parent's schedule.
7294
+ * ID of a project visible to the API key's policy. The parent must be owned by this project's owner or list that owner in its participating_company_ids. Send null to make the project a root; the child schedule must fit within the parent's schedule.
7152
7295
  */
7153
7296
  parent_id?: string | null;
7154
7297
  /**
@@ -7233,11 +7376,7 @@ export type ProjectUpdateParameters = {
7233
7376
  */
7234
7377
  description?: string | null;
7235
7378
  /**
7236
- * User recorded as the project's creator; must be a member of the owning company. Required on create and immutable thereafter — an update that sets, changes, or clears it is rejected.
7237
- */
7238
- created_by_user_id?: string | null;
7239
- /**
7240
- * ID of a project visible to the API key's policy. Send null to make the project a root; the child schedule must fit within the parent's schedule.
7379
+ * ID of a project visible to the API key's policy. The parent must be owned by this project's owner or list that owner in its participating_company_ids. Send null to make the project a root; the child schedule must fit within the parent's schedule.
7241
7380
  */
7242
7381
  parent_id?: string | null;
7243
7382
  /**
@@ -7305,19 +7444,58 @@ export type ProjectUpdateParameters = {
7305
7444
  */
7306
7445
  placed_in_service_date?: string | null;
7307
7446
  };
7308
- export type SiteCheckInResponseObject = {
7447
+ /**
7448
+ * 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.
7449
+ */
7450
+ export type ProjectSiteResponseObject = {
7451
+ /**
7452
+ * Unique identifier.
7453
+ */
7309
7454
  id: string;
7455
+ /**
7456
+ * ID of the linked site.
7457
+ */
7310
7458
  site_id: string;
7311
7459
  /**
7312
- * The checked-in DSPTCH user; null when the person was recorded by name instead.
7460
+ * IDs of the site's features that apply to this project. Empty when none are scoped.
7313
7461
  */
7314
- user_id: string | null;
7315
- first_name: string | null;
7316
- last_name: string | null;
7317
- site_contact_id: string | null;
7318
- site_contact_first_name: string | null;
7319
- site_contact_last_name: string | null;
7320
- employer_name: string | null;
7462
+ feature_ids: Array<string>;
7463
+ };
7464
+ /**
7465
+ * 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.
7466
+ */
7467
+ export type ProjectSiteParameters = {
7468
+ /**
7469
+ * ID of a site visible to the API key. The site must be public or private to the project's owning company. Duplicate (project, site) pairs are rejected.
7470
+ */
7471
+ site_id: string;
7472
+ /**
7473
+ * Optional complete set of feature IDs on that site to scope to this project. Omit to attach the site with no features. Each feature must belong to the site.
7474
+ */
7475
+ feature_ids?: Array<string>;
7476
+ };
7477
+ /**
7478
+ * 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.
7479
+ */
7480
+ export type ProjectSiteUpdateParameters = {
7481
+ /**
7482
+ * Complete desired set of feature IDs on the linked site. Send an empty array to clear the set. Omit to leave the current set unchanged. Each feature must belong to the site.
7483
+ */
7484
+ feature_ids?: Array<string>;
7485
+ };
7486
+ export type SiteCheckInResponseObject = {
7487
+ id: string;
7488
+ site_id: string;
7489
+ /**
7490
+ * The checked-in DSPTCH user; null when the person was recorded by name instead.
7491
+ */
7492
+ user_id: string | null;
7493
+ first_name: string | null;
7494
+ last_name: string | null;
7495
+ site_contact_id: string | null;
7496
+ site_contact_first_name: string | null;
7497
+ site_contact_last_name: string | null;
7498
+ employer_name: string | null;
7321
7499
  description: string | null;
7322
7500
  rationale: string | null;
7323
7501
  /**
@@ -7924,15 +8102,15 @@ export type PaystubResponseObject = {
7924
8102
  */
7925
8103
  export type PaystubParameters = {
7926
8104
  /**
7927
- * ID of the payroll run this paystub belongs to. Required.
8105
+ * ID of the worker who received the payment. Required. Set at creation.
7928
8106
  */
7929
- payrolls_payroll_run_id: string;
8107
+ user_id: string;
7930
8108
  /**
7931
- * ID of the worker who received the payment. Required.
8109
+ * ID of the payroll run this paystub belongs to. Required.
7932
8110
  */
7933
- user_id: string;
8111
+ payrolls_payroll_run_id: string;
7934
8112
  /**
7935
- * ID of the time card this paystub is for; required for an on-cycle run, not allowed for an off-cycle run.
8113
+ * ID of the time card this paystub is for; required for an on-cycle run, not allowed for an off-cycle run. Must be the worker's own card in the run's company.
7936
8114
  */
7937
8115
  timekeeping_time_card_id?: string | null;
7938
8116
  /**
@@ -7953,11 +8131,7 @@ export type PaystubUpdateParameters = {
7953
8131
  */
7954
8132
  payrolls_payroll_run_id?: string;
7955
8133
  /**
7956
- * ID of the worker who received the payment. Omit to leave it unchanged.
7957
- */
7958
- user_id?: string;
7959
- /**
7960
- * ID of the time card this paystub is for. Omit to leave it unchanged; the resulting paystub must have one for an on-cycle run and must not have one for an off-cycle run.
8134
+ * ID of the time card this paystub is for. Omit to leave it unchanged; the resulting paystub must have one for an on-cycle run and must not have one for an off-cycle run, and it must be the worker's own card in the run's company.
7961
8135
  */
7962
8136
  timekeeping_time_card_id?: string | null;
7963
8137
  /**
@@ -8070,6 +8244,31 @@ export type PriorPeriodAdjustmentParameters = {
8070
8244
  */
8071
8245
  pwa_compliance_eligible?: boolean;
8072
8246
  };
8247
+ /**
8248
+ * 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.
8249
+ */
8250
+ export type PriorPeriodAdjustmentUpdateParameters = {
8251
+ /**
8252
+ * Adjustment amount, in cents as a decimal string (e.g. "20000.0" is $200.00). Must be positive and may not exceed the line item's remaining adjustable_amount_cents. Omit to leave it unchanged.
8253
+ */
8254
+ amount_cents?: string;
8255
+ /**
8256
+ * Why the adjustment is being made: one of hours_correction, rate_correction, pwa_compliance, or other. Omit to leave it unchanged.
8257
+ */
8258
+ rationale?: 'hours_correction' | 'other' | 'pwa_compliance' | 'rate_correction';
8259
+ /**
8260
+ * ID of the job on the time card whose obligation this adjustment credits. Required whenever pwa_compliance_eligible is true, since compliance matches adjustments to obligations per job. Omit to leave it unchanged; send null to clear it on a non-PWA adjustment.
8261
+ */
8262
+ job_id?: string | null;
8263
+ /**
8264
+ * Free-text notes on the adjustment. Omit to leave it unchanged; send null to clear it.
8265
+ */
8266
+ notes?: string | null;
8267
+ /**
8268
+ * Whether the adjustment counts toward prevailing-wage / apprenticeship (PWA) compliance. Omit to leave it unchanged.
8269
+ */
8270
+ pwa_compliance_eligible?: boolean;
8271
+ };
8073
8272
  /**
8074
8273
  * What one PWA-tracked job on a time card still owes the worker, from the materialized prevailing-wage compliance view. Read-only.
8075
8274
  */
@@ -8487,206 +8686,768 @@ export type PaystubLineItemUpdateParameters = {
8487
8686
  payrolls_external_map_id?: string;
8488
8687
  };
8489
8688
  /**
8490
- * 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.
8689
+ * 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.
8491
8690
  */
8492
- export type PositionResponseObject = {
8691
+ export type JobSiteResponseObject = {
8493
8692
  /**
8494
- * Unique identifier.
8693
+ * Id of the job-site join row.
8495
8694
  */
8496
8695
  id: string;
8497
8696
  /**
8498
- * ID of the job this position belongs to; always matches the job in the URL path.
8697
+ * Id of the Site attached to the job.
8499
8698
  */
8500
- job_id: string;
8699
+ site_id: string;
8501
8700
  /**
8502
- * ID of the worker assigned to fill this position; null when the position is unfilled.
8701
+ * Ids of features on this join; empty when the job is attached to the site with no features selected. Always a subset of the site's features.
8503
8702
  */
8504
- fulfilled_by_user_id: string | null;
8703
+ feature_ids: Array<string>;
8704
+ };
8705
+ /**
8706
+ * A page of a job's site joins, with pagination metadata and navigation links.
8707
+ */
8708
+ export type JobSitesResponseObject = {
8709
+ meta: Meta;
8710
+ links: Links;
8505
8711
  /**
8506
- * ID of the pay-rate rule package applied to this position, or null when none is set.
8712
+ * The page of job-site joins.
8507
8713
  */
8508
- pay_rates_rule_package_id: string | null;
8509
- position_function: PositionFunction;
8714
+ data: Array<JobSiteResponseObject>;
8715
+ };
8716
+ /**
8717
+ * Request body for attaching a site to a job. `site_id` is required; `feature_ids` is optional and defaults to none.
8718
+ */
8719
+ export type JobSiteParameters = {
8510
8720
  /**
8511
- * Name of the per diem applied to this position; null when none is set.
8721
+ * Id of the Site to attach. Must be visible to the key and belong to the job's provider company (or be public). Duplicate (job, site) pairs are rejected.
8512
8722
  */
8513
- per_diem_name: string | null;
8723
+ site_id: string;
8514
8724
  /**
8515
- * ISO 4217 currency code for the per-diem rate; null when no per diem is set.
8725
+ * Ids of features to select on this join. Each feature must belong to the named site. Omit to attach the site with no features.
8516
8726
  */
8517
- per_diem_currency: string | null;
8727
+ feature_ids?: Array<string>;
8728
+ };
8729
+ /**
8730
+ * 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.
8731
+ */
8732
+ export type JobSiteUpdateParameters = {
8518
8733
  /**
8519
- * Per-diem amount in cents, as a string; null when no per diem is set.
8734
+ * Replacement set of feature ids on this join. An empty array clears every feature. Omit the field to leave the current set unchanged.
8520
8735
  */
8521
- per_diem_rate_cents: string | null;
8736
+ feature_ids?: Array<string>;
8737
+ };
8738
+ /**
8739
+ * 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`.
8740
+ */
8741
+ export type JobFormAssignmentResponseObject = {
8522
8742
  /**
8523
- * Planned base hourly pay rate in cents, as a string; null when no rate is set.
8743
+ * Unique identifier.
8524
8744
  */
8525
- hourly_rate_cents: string | null;
8745
+ id: string;
8526
8746
  /**
8527
- * Where the hourly rate came from: one of user_default, prevailing_wage, or custom; null when no rate is set.
8747
+ * ID of the job this form task belongs to; always matches the job in the URL path.
8528
8748
  */
8529
- hourly_rate_src_type: string | null;
8749
+ job_id: string;
8530
8750
  /**
8531
- * Planned hourly cash-fringe rate in cents, as a string; null when unset.
8751
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
8532
8752
  */
8533
- cash_fringe_rate_cents: string | null;
8753
+ form_definition_id: string;
8534
8754
  /**
8535
- * Where the cash-fringe rate came from: one of prevailing_wage or custom; null when unset.
8755
+ * Name of the form task; defaults to the form definition's name.
8536
8756
  */
8537
- cash_fringe_rate_src_type: string | null;
8757
+ name: string;
8538
8758
  /**
8539
- * Hourly wage-pay rate in cents applied to PWA (prevailing-wage / apprenticeship) eligible time on this position, as a string; null for non-PWA positions.
8759
+ * Free-text description of the task.
8540
8760
  */
8541
- pwa_wage_pay_rate_cents: string | null;
8761
+ description: string | null;
8542
8762
  /**
8543
- * Where the PWA wage-pay rate came from: one of user_default, prevailing_wage, or custom; null for non-PWA positions.
8763
+ * IANA time zone in which time_due is interpreted; always set, defaulting to US/Central.
8544
8764
  */
8545
- pwa_wage_pay_rate_src_type: string | null;
8765
+ tz_name: string;
8546
8766
  /**
8547
- * Hourly wage-adder rate in cents, as a string; null when unset. Excluded from cash-in-lieu-of-fringe calculations.
8767
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
8548
8768
  */
8549
- wage_adder_rate_cents: string | null;
8769
+ time_due: string | null;
8550
8770
  /**
8551
- * Whether this position tracks Prevailing Wage / Apprenticeship (PWA) compliance; when true, the PWA rate fields and wage-determination associations apply.
8771
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
8552
8772
  */
8553
- pwa: boolean;
8773
+ frequency: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
8554
8774
  /**
8555
- * IDs of the federal (Davis-Bacon) wage determinations applied to this position; empty when none.
8775
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
8556
8776
  */
8557
- federal_wage_determination_ids: Array<string>;
8777
+ recurrence_end_time: string | null;
8558
8778
  /**
8559
- * IDs of the regional (state) wage determinations applied to this position; empty when none.
8779
+ * IDs of the users this form task is assigned to.
8560
8780
  */
8561
- regional_wage_determination_ids: Array<string>;
8781
+ task_assignee_user_ids: Array<string>;
8562
8782
  /**
8563
- * PWA classification detail for this position; carries skill_level, the apprenticeship or skill classification, which is null when unset.
8783
+ * Reminder notifications for this task, each scheduled at an offset from the due time.
8564
8784
  */
8565
- pwa_details: {
8785
+ reminders: Array<{
8566
8786
  /**
8567
- * The apprenticeship or skill classification; null when unset.
8787
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
8568
8788
  */
8569
- skill_level: string | null;
8570
- };
8571
- /**
8572
- * Start of the position's scheduled window (ISO 8601); null when unscheduled.
8573
- */
8574
- start_time: string | null;
8575
- /**
8576
- * End of the position's scheduled window (ISO 8601); null when unscheduled.
8577
- */
8578
- end_time: string | null;
8579
- /**
8580
- * When the record was created (ISO 8601).
8581
- */
8582
- created_at: string;
8583
- /**
8584
- * When the record was last updated (ISO 8601).
8585
- */
8586
- updated_at: string;
8789
+ offset: string;
8790
+ /**
8791
+ * When the reminder fires (ISO 8601), computed as the due time plus the offset.
8792
+ */
8793
+ remind_at: string;
8794
+ }>;
8587
8795
  };
8588
8796
  /**
8589
- * A company-owned collection of conditional wage and fringe adjustments, optionally scoped to a job.
8797
+ * 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.
8590
8798
  */
8591
- export type PayRatesRulePackageResponseObject = {
8799
+ export type SiteFormAssignmentResponseObject = {
8592
8800
  /**
8593
- * Unique identifier of the rule package.
8801
+ * Unique identifier.
8594
8802
  */
8595
8803
  id: string;
8596
8804
  /**
8597
- * Human-readable package name.
8598
- */
8599
- name: string;
8600
- /**
8601
- * Free-form package description, or null.
8602
- */
8603
- description: string | null;
8604
- /**
8605
- * ID of the job this package is scoped to, or null for a company-wide package.
8805
+ * ID of the site this form task belongs to; always matches the site in the URL path.
8606
8806
  */
8607
- scoped_to_job_id: string | null;
8807
+ site_id: string;
8608
8808
  /**
8609
- * Whether this is the default package within its company-wide or job scope.
8809
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
8610
8810
  */
8611
- default: boolean;
8811
+ form_definition_id: string;
8612
8812
  /**
8613
- * Whether users may select this package directly in configuration workflows.
8813
+ * Name of the form task; defaults to the form definition's name.
8614
8814
  */
8615
- selectable: boolean;
8815
+ name: string;
8616
8816
  /**
8617
- * When the record was created (ISO 8601).
8817
+ * Free-text description of the task.
8618
8818
  */
8619
- created_at: string;
8819
+ description: string | null;
8620
8820
  /**
8621
- * When the record was last updated (ISO 8601).
8821
+ * IANA time zone in which time_due is interpreted; always set, defaulting to US/Central.
8622
8822
  */
8623
- updated_at: string;
8624
- };
8625
- /**
8626
- * Parameters for creating a company-wide pay-rate rule package.
8627
- */
8628
- export type PayRatesRulePackageParameters = {
8823
+ tz_name: string;
8629
8824
  /**
8630
- * Human-readable package name.
8825
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
8631
8826
  */
8632
- name: string;
8827
+ time_due: string | null;
8633
8828
  /**
8634
- * Free-form package description; send null or omit it when no description is needed.
8829
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
8635
8830
  */
8636
- description?: string | null;
8637
- };
8638
- /**
8639
- * 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.
8640
- */
8641
- export type PayRatesRulePackageUpdateParameters = {
8831
+ frequency: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
8642
8832
  /**
8643
- * Human-readable package name. Omit to leave it unchanged.
8833
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
8644
8834
  */
8645
- name?: string;
8835
+ recurrence_end_time: string | null;
8646
8836
  /**
8647
- * Free-form package description; omit to leave it unchanged, or send null to clear it.
8837
+ * IDs of the users this form task is assigned to.
8648
8838
  */
8649
- description?: string | null;
8650
- };
8651
- /**
8652
- * A page of a job's positions, with pagination metadata and navigation links.
8653
- */
8654
- export type PositionsResponseObject = {
8655
- meta: Meta;
8656
- links: Links;
8839
+ task_assignee_user_ids: Array<string>;
8657
8840
  /**
8658
- * The page of positions.
8841
+ * Reminder notifications for this task, each scheduled at an offset from the due time.
8659
8842
  */
8660
- data: Array<PositionResponseObject>;
8843
+ reminders: Array<{
8844
+ /**
8845
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
8846
+ */
8847
+ offset: string;
8848
+ /**
8849
+ * When the reminder fires (ISO 8601), computed as the due time plus the offset.
8850
+ */
8851
+ remind_at: string;
8852
+ }>;
8661
8853
  };
8662
8854
  /**
8663
- * Request body for creating or updating a position on a job. The job is taken from the URL path.
8855
+ * 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.
8664
8856
  */
8665
- export type PositionParameters = {
8666
- /**
8667
- * ID of the job the position belongs to; taken from the URL path, not the request body.
8668
- */
8669
- job_id?: string;
8670
- /**
8671
- * ID of the worker to assign; cannot be changed once the position has tracked time.
8672
- */
8673
- fulfilled_by_user_id?: string | null;
8674
- /**
8675
- * Start of the position's scheduled window (ISO 8601); must fall within the job's schedule.
8676
- */
8677
- start_time?: string | null;
8857
+ export type SiteFormAssignmentParameters = {
8678
8858
  /**
8679
- * End of the position's scheduled window (ISO 8601); must be on or after start_time and within the job's schedule.
8859
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
8680
8860
  */
8681
- end_time?: string | null;
8861
+ form_definition_id: string;
8682
8862
  /**
8683
- * ID of the position function (role) to assign; null for none. Must be a global function or one of the job's company.
8863
+ * When true, frequency and recurrence_end_time apply; when false or omitted, the task is one-time and those fields are cleared.
8684
8864
  */
8685
- position_function_id?: string | null;
8865
+ recurring?: boolean;
8686
8866
  /**
8687
- * ID of the per diem to apply; its rate and currency are copied onto the position. Must belong to the job's company.
8867
+ * The underlying task's name, schedule, assignees, and reminders.
8688
8868
  */
8689
- per_diem_id?: string | null;
8869
+ task_attributes: {
8870
+ /**
8871
+ * Name of the form task; defaults to the form definition's name.
8872
+ */
8873
+ name?: string | null;
8874
+ /**
8875
+ * Free-text description of the task.
8876
+ */
8877
+ description?: string | null;
8878
+ /**
8879
+ * ID of the user creating the task, recorded as its creator. Required; a missing value returns 400.
8880
+ */
8881
+ created_by_user_id: string;
8882
+ /**
8883
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
8884
+ */
8885
+ time_due?: string | null;
8886
+ /**
8887
+ * IANA time zone in which time_due is interpreted; null for an unscheduled task.
8888
+ */
8889
+ tz_name?: string | null;
8890
+ /**
8891
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
8892
+ */
8893
+ frequency?: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
8894
+ /**
8895
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
8896
+ */
8897
+ recurrence_end_time?: string | null;
8898
+ /**
8899
+ * IDs of the users this form task is assigned to.
8900
+ */
8901
+ task_assignee_user_ids?: Array<string>;
8902
+ /**
8903
+ * Reminders to attach, each an offset from the due time. On update, replaces the existing set.
8904
+ */
8905
+ reminders_attributes?: Array<{
8906
+ /**
8907
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
8908
+ */
8909
+ offset: 'PT0S' | 'PT-1M' | 'PT-5M' | 'PT-10M' | 'PT-15M' | 'PT-30M' | 'PT-1H' | 'PT-2H' | 'P-1D' | 'P-2D' | 'P-3D' | 'P-4D' | 'P-5D' | 'P-6D' | 'P-1W' | 'P-2W' | 'P-1M' | 'P-2M' | 'P-3M' | 'P-6M' | 'P-1Y' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'P1D' | 'P2D' | 'P3D' | 'P4D' | 'P5D' | 'P6D' | 'P1W' | 'P2W' | 'P3W';
8910
+ }>;
8911
+ };
8912
+ };
8913
+ /**
8914
+ * 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.
8915
+ */
8916
+ export type SiteFormAssignmentUpdateParameters = {
8917
+ /**
8918
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
8919
+ */
8920
+ form_definition_id?: string;
8921
+ /**
8922
+ * When true, frequency and recurrence_end_time apply; when false or omitted, the task is one-time and those fields are cleared.
8923
+ */
8924
+ recurring?: boolean;
8925
+ /**
8926
+ * The underlying task's name, schedule, assignees, and reminders.
8927
+ */
8928
+ task_attributes?: {
8929
+ /**
8930
+ * Name of the form task; defaults to the form definition's name.
8931
+ */
8932
+ name?: string | null;
8933
+ /**
8934
+ * Free-text description of the task.
8935
+ */
8936
+ description?: string | null;
8937
+ /**
8938
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
8939
+ */
8940
+ time_due?: string | null;
8941
+ /**
8942
+ * IANA time zone in which time_due is interpreted; null for an unscheduled task.
8943
+ */
8944
+ tz_name?: string | null;
8945
+ /**
8946
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
8947
+ */
8948
+ frequency?: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
8949
+ /**
8950
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
8951
+ */
8952
+ recurrence_end_time?: string | null;
8953
+ /**
8954
+ * IDs of the users this form task is assigned to.
8955
+ */
8956
+ task_assignee_user_ids?: Array<string>;
8957
+ /**
8958
+ * Reminders to attach, each an offset from the due time. On update, replaces the existing set.
8959
+ */
8960
+ reminders_attributes?: Array<{
8961
+ /**
8962
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
8963
+ */
8964
+ offset: 'PT0S' | 'PT-1M' | 'PT-5M' | 'PT-10M' | 'PT-15M' | 'PT-30M' | 'PT-1H' | 'PT-2H' | 'P-1D' | 'P-2D' | 'P-3D' | 'P-4D' | 'P-5D' | 'P-6D' | 'P-1W' | 'P-2W' | 'P-1M' | 'P-2M' | 'P-3M' | 'P-6M' | 'P-1Y' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'P1D' | 'P2D' | 'P3D' | 'P4D' | 'P5D' | 'P6D' | 'P1W' | 'P2W' | 'P3W';
8965
+ }>;
8966
+ };
8967
+ };
8968
+ /**
8969
+ * 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.
8970
+ */
8971
+ export type FeatureFormAssignmentResponseObject = {
8972
+ /**
8973
+ * Unique identifier.
8974
+ */
8975
+ id: string;
8976
+ /**
8977
+ * ID of the feature this form task belongs to; always matches the feature in the URL path.
8978
+ */
8979
+ feature_id: string;
8980
+ /**
8981
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
8982
+ */
8983
+ form_definition_id: string;
8984
+ /**
8985
+ * Name of the form task; defaults to the form definition's name.
8986
+ */
8987
+ name: string;
8988
+ /**
8989
+ * Free-text description of the task.
8990
+ */
8991
+ description: string | null;
8992
+ /**
8993
+ * IANA time zone in which time_due is interpreted; always set, defaulting to US/Central.
8994
+ */
8995
+ tz_name: string;
8996
+ /**
8997
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
8998
+ */
8999
+ time_due: string | null;
9000
+ /**
9001
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
9002
+ */
9003
+ frequency: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
9004
+ /**
9005
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
9006
+ */
9007
+ recurrence_end_time: string | null;
9008
+ /**
9009
+ * IDs of the users this form task is assigned to.
9010
+ */
9011
+ task_assignee_user_ids: Array<string>;
9012
+ /**
9013
+ * Reminder notifications for this task, each scheduled at an offset from the due time.
9014
+ */
9015
+ reminders: Array<{
9016
+ /**
9017
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
9018
+ */
9019
+ offset: string;
9020
+ /**
9021
+ * When the reminder fires (ISO 8601), computed as the due time plus the offset.
9022
+ */
9023
+ remind_at: string;
9024
+ }>;
9025
+ };
9026
+ /**
9027
+ * 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.
9028
+ */
9029
+ export type FeatureFormAssignmentParameters = {
9030
+ /**
9031
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
9032
+ */
9033
+ form_definition_id: string;
9034
+ /**
9035
+ * When true, frequency and recurrence_end_time apply; when false or omitted, the task is one-time and those fields are cleared.
9036
+ */
9037
+ recurring?: boolean;
9038
+ /**
9039
+ * The underlying task's name, schedule, assignees, and reminders.
9040
+ */
9041
+ task_attributes: {
9042
+ /**
9043
+ * Name of the form task; defaults to the form definition's name.
9044
+ */
9045
+ name?: string | null;
9046
+ /**
9047
+ * Free-text description of the task.
9048
+ */
9049
+ description?: string | null;
9050
+ /**
9051
+ * ID of the user creating the task, recorded as its creator. Required; a missing value returns 400.
9052
+ */
9053
+ created_by_user_id: string;
9054
+ /**
9055
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
9056
+ */
9057
+ time_due?: string | null;
9058
+ /**
9059
+ * IANA time zone in which time_due is interpreted; null for an unscheduled task.
9060
+ */
9061
+ tz_name?: string | null;
9062
+ /**
9063
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
9064
+ */
9065
+ frequency?: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
9066
+ /**
9067
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
9068
+ */
9069
+ recurrence_end_time?: string | null;
9070
+ /**
9071
+ * IDs of the users this form task is assigned to.
9072
+ */
9073
+ task_assignee_user_ids?: Array<string>;
9074
+ /**
9075
+ * Reminders to attach, each an offset from the due time. On update, replaces the existing set.
9076
+ */
9077
+ reminders_attributes?: Array<{
9078
+ /**
9079
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
9080
+ */
9081
+ offset: 'PT0S' | 'PT-1M' | 'PT-5M' | 'PT-10M' | 'PT-15M' | 'PT-30M' | 'PT-1H' | 'PT-2H' | 'P-1D' | 'P-2D' | 'P-3D' | 'P-4D' | 'P-5D' | 'P-6D' | 'P-1W' | 'P-2W' | 'P-1M' | 'P-2M' | 'P-3M' | 'P-6M' | 'P-1Y' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'P1D' | 'P2D' | 'P3D' | 'P4D' | 'P5D' | 'P6D' | 'P1W' | 'P2W' | 'P3W';
9082
+ }>;
9083
+ };
9084
+ };
9085
+ /**
9086
+ * 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.
9087
+ */
9088
+ export type FeatureFormAssignmentUpdateParameters = {
9089
+ /**
9090
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
9091
+ */
9092
+ form_definition_id?: string;
9093
+ /**
9094
+ * When true, frequency and recurrence_end_time apply; when false or omitted, the task is one-time and those fields are cleared.
9095
+ */
9096
+ recurring?: boolean;
9097
+ /**
9098
+ * The underlying task's name, schedule, assignees, and reminders.
9099
+ */
9100
+ task_attributes?: {
9101
+ /**
9102
+ * Name of the form task; defaults to the form definition's name.
9103
+ */
9104
+ name?: string | null;
9105
+ /**
9106
+ * Free-text description of the task.
9107
+ */
9108
+ description?: string | null;
9109
+ /**
9110
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
9111
+ */
9112
+ time_due?: string | null;
9113
+ /**
9114
+ * IANA time zone in which time_due is interpreted; null for an unscheduled task.
9115
+ */
9116
+ tz_name?: string | null;
9117
+ /**
9118
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
9119
+ */
9120
+ frequency?: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
9121
+ /**
9122
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
9123
+ */
9124
+ recurrence_end_time?: string | null;
9125
+ /**
9126
+ * IDs of the users this form task is assigned to.
9127
+ */
9128
+ task_assignee_user_ids?: Array<string>;
9129
+ /**
9130
+ * Reminders to attach, each an offset from the due time. On update, replaces the existing set.
9131
+ */
9132
+ reminders_attributes?: Array<{
9133
+ /**
9134
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
9135
+ */
9136
+ offset: 'PT0S' | 'PT-1M' | 'PT-5M' | 'PT-10M' | 'PT-15M' | 'PT-30M' | 'PT-1H' | 'PT-2H' | 'P-1D' | 'P-2D' | 'P-3D' | 'P-4D' | 'P-5D' | 'P-6D' | 'P-1W' | 'P-2W' | 'P-1M' | 'P-2M' | 'P-3M' | 'P-6M' | 'P-1Y' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'P1D' | 'P2D' | 'P3D' | 'P4D' | 'P5D' | 'P6D' | 'P1W' | 'P2W' | 'P3W';
9137
+ }>;
9138
+ };
9139
+ };
9140
+ /**
9141
+ * 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.
9142
+ */
9143
+ export type JobFormAssignmentParameters = {
9144
+ /**
9145
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
9146
+ */
9147
+ form_definition_id: string;
9148
+ /**
9149
+ * When true, frequency and recurrence_end_time apply; when false or omitted, the task is one-time and those fields are cleared.
9150
+ */
9151
+ recurring?: boolean;
9152
+ /**
9153
+ * The underlying task's name, schedule, assignees, and reminders.
9154
+ */
9155
+ task_attributes: {
9156
+ /**
9157
+ * Name of the form task; defaults to the form definition's name.
9158
+ */
9159
+ name?: string | null;
9160
+ /**
9161
+ * Free-text description of the task.
9162
+ */
9163
+ description?: string | null;
9164
+ /**
9165
+ * ID of the user creating the task, recorded as its creator. Required; a missing value returns 400.
9166
+ */
9167
+ created_by_user_id: string;
9168
+ /**
9169
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
9170
+ */
9171
+ time_due?: string | null;
9172
+ /**
9173
+ * IANA time zone in which time_due is interpreted; null for an unscheduled task.
9174
+ */
9175
+ tz_name?: string | null;
9176
+ /**
9177
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
9178
+ */
9179
+ frequency?: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
9180
+ /**
9181
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
9182
+ */
9183
+ recurrence_end_time?: string | null;
9184
+ /**
9185
+ * IDs of the users this form task is assigned to.
9186
+ */
9187
+ task_assignee_user_ids?: Array<string>;
9188
+ /**
9189
+ * Reminders to attach, each an offset from the due time. On update, replaces the existing set.
9190
+ */
9191
+ reminders_attributes?: Array<{
9192
+ /**
9193
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
9194
+ */
9195
+ offset: 'PT0S' | 'PT-1M' | 'PT-5M' | 'PT-10M' | 'PT-15M' | 'PT-30M' | 'PT-1H' | 'PT-2H' | 'P-1D' | 'P-2D' | 'P-3D' | 'P-4D' | 'P-5D' | 'P-6D' | 'P-1W' | 'P-2W' | 'P-1M' | 'P-2M' | 'P-3M' | 'P-6M' | 'P-1Y' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'P1D' | 'P2D' | 'P3D' | 'P4D' | 'P5D' | 'P6D' | 'P1W' | 'P2W' | 'P3W';
9196
+ }>;
9197
+ };
9198
+ };
9199
+ /**
9200
+ * 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.
9201
+ */
9202
+ export type JobFormAssignmentUpdateParameters = {
9203
+ /**
9204
+ * ID of the form definition (a SurveyJS form template) this assignment is for.
9205
+ */
9206
+ form_definition_id?: string;
9207
+ /**
9208
+ * When true, frequency and recurrence_end_time apply; when false or omitted, the task is one-time and those fields are cleared.
9209
+ */
9210
+ recurring?: boolean;
9211
+ /**
9212
+ * The underlying task's name, schedule, assignees, and reminders.
9213
+ */
9214
+ task_attributes?: {
9215
+ /**
9216
+ * Name of the form task; defaults to the form definition's name.
9217
+ */
9218
+ name?: string | null;
9219
+ /**
9220
+ * Free-text description of the task.
9221
+ */
9222
+ description?: string | null;
9223
+ /**
9224
+ * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
9225
+ */
9226
+ time_due?: string | null;
9227
+ /**
9228
+ * IANA time zone in which time_due is interpreted; null for an unscheduled task.
9229
+ */
9230
+ tz_name?: string | null;
9231
+ /**
9232
+ * How often this form task recurs: one of DAILY, WORKDAILY, WORKDAILYSIX, WEEKLY, BIWEEKLY, MONTHLY, or QUARTERLY. Null for a one-time assignment; on write, applied only when recurring is true.
9233
+ */
9234
+ frequency?: 'DAILY' | 'WORKDAILY' | 'WORKDAILYSIX' | 'WEEKLY' | 'BIWEEKLY' | 'MONTHLY' | 'QUARTERLY' | null;
9235
+ /**
9236
+ * When recurrence stops (ISO 8601); null for a non-recurring or open-ended task.
9237
+ */
9238
+ recurrence_end_time?: string | null;
9239
+ /**
9240
+ * IDs of the users this form task is assigned to.
9241
+ */
9242
+ task_assignee_user_ids?: Array<string>;
9243
+ /**
9244
+ * Reminders to attach, each an offset from the due time. On update, replaces the existing set.
9245
+ */
9246
+ reminders_attributes?: Array<{
9247
+ /**
9248
+ * ISO 8601 duration offset from the due time for the reminder (e.g. -PT1H for one hour before); must be one of the preset reminder times.
9249
+ */
9250
+ offset: 'PT0S' | 'PT-1M' | 'PT-5M' | 'PT-10M' | 'PT-15M' | 'PT-30M' | 'PT-1H' | 'PT-2H' | 'P-1D' | 'P-2D' | 'P-3D' | 'P-4D' | 'P-5D' | 'P-6D' | 'P-1W' | 'P-2W' | 'P-1M' | 'P-2M' | 'P-3M' | 'P-6M' | 'P-1Y' | 'PT5M' | 'PT15M' | 'PT30M' | 'PT1H' | 'PT6H' | 'PT12H' | 'P1D' | 'P2D' | 'P3D' | 'P4D' | 'P5D' | 'P6D' | 'P1W' | 'P2W' | 'P3W';
9251
+ }>;
9252
+ };
9253
+ };
9254
+ /**
9255
+ * 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.
9256
+ */
9257
+ export type PositionResponseObject = {
9258
+ /**
9259
+ * Unique identifier.
9260
+ */
9261
+ id: string;
9262
+ /**
9263
+ * ID of the job this position belongs to; always matches the job in the URL path.
9264
+ */
9265
+ job_id: string;
9266
+ /**
9267
+ * ID of the worker assigned to fill this position; null when the position is unfilled.
9268
+ */
9269
+ fulfilled_by_user_id: string | null;
9270
+ /**
9271
+ * ID of the pay-rate rule package applied to this position, or null when none is set.
9272
+ */
9273
+ pay_rates_rule_package_id: string | null;
9274
+ position_function: PositionFunction;
9275
+ /**
9276
+ * Name of the per diem applied to this position; null when none is set.
9277
+ */
9278
+ per_diem_name: string | null;
9279
+ /**
9280
+ * ISO 4217 currency code for the per-diem rate; null when no per diem is set.
9281
+ */
9282
+ per_diem_currency: string | null;
9283
+ /**
9284
+ * Per-diem amount in cents, as a string; null when no per diem is set.
9285
+ */
9286
+ per_diem_rate_cents: string | null;
9287
+ /**
9288
+ * Planned base hourly pay rate in cents, as a string; null when no rate is set.
9289
+ */
9290
+ hourly_rate_cents: string | null;
9291
+ /**
9292
+ * Where the hourly rate came from: one of user_default, prevailing_wage, or custom; null when no rate is set.
9293
+ */
9294
+ hourly_rate_src_type: string | null;
9295
+ /**
9296
+ * Planned hourly cash-fringe rate in cents, as a string; null when unset.
9297
+ */
9298
+ cash_fringe_rate_cents: string | null;
9299
+ /**
9300
+ * Where the cash-fringe rate came from: one of prevailing_wage or custom; null when unset.
9301
+ */
9302
+ cash_fringe_rate_src_type: string | null;
9303
+ /**
9304
+ * Hourly wage-pay rate in cents applied to PWA (prevailing-wage / apprenticeship) eligible time on this position, as a string; null for non-PWA positions.
9305
+ */
9306
+ pwa_wage_pay_rate_cents: string | null;
9307
+ /**
9308
+ * Where the PWA wage-pay rate came from: one of user_default, prevailing_wage, or custom; null for non-PWA positions.
9309
+ */
9310
+ pwa_wage_pay_rate_src_type: string | null;
9311
+ /**
9312
+ * Hourly wage-adder rate in cents, as a string; null when unset. Excluded from cash-in-lieu-of-fringe calculations.
9313
+ */
9314
+ wage_adder_rate_cents: string | null;
9315
+ /**
9316
+ * Whether this position tracks Prevailing Wage / Apprenticeship (PWA) compliance; when true, the PWA rate fields and wage-determination associations apply.
9317
+ */
9318
+ pwa: boolean;
9319
+ /**
9320
+ * IDs of the federal (Davis-Bacon) wage determinations applied to this position; empty when none.
9321
+ */
9322
+ federal_wage_determination_ids: Array<string>;
9323
+ /**
9324
+ * IDs of the regional (state) wage determinations applied to this position; empty when none.
9325
+ */
9326
+ regional_wage_determination_ids: Array<string>;
9327
+ /**
9328
+ * PWA classification detail for this position; carries skill_level, the apprenticeship or skill classification, which is null when unset.
9329
+ */
9330
+ pwa_details: {
9331
+ /**
9332
+ * The apprenticeship or skill classification; null when unset.
9333
+ */
9334
+ skill_level: string | null;
9335
+ };
9336
+ /**
9337
+ * Start of the position's scheduled window (ISO 8601); null when unscheduled.
9338
+ */
9339
+ start_time: string | null;
9340
+ /**
9341
+ * End of the position's scheduled window (ISO 8601); null when unscheduled.
9342
+ */
9343
+ end_time: string | null;
9344
+ /**
9345
+ * When the record was created (ISO 8601).
9346
+ */
9347
+ created_at: string;
9348
+ /**
9349
+ * When the record was last updated (ISO 8601).
9350
+ */
9351
+ updated_at: string;
9352
+ };
9353
+ /**
9354
+ * A company-owned collection of conditional wage and fringe adjustments, optionally scoped to a job.
9355
+ */
9356
+ export type PayRatesRulePackageResponseObject = {
9357
+ /**
9358
+ * Unique identifier of the rule package.
9359
+ */
9360
+ id: string;
9361
+ /**
9362
+ * Human-readable package name.
9363
+ */
9364
+ name: string;
9365
+ /**
9366
+ * Free-form package description, or null.
9367
+ */
9368
+ description: string | null;
9369
+ /**
9370
+ * ID of the job this package is scoped to, or null for a company-wide package.
9371
+ */
9372
+ scoped_to_job_id: string | null;
9373
+ /**
9374
+ * Whether this is the default package within its company-wide or job scope.
9375
+ */
9376
+ default: boolean;
9377
+ /**
9378
+ * Whether users may select this package directly in configuration workflows.
9379
+ */
9380
+ selectable: boolean;
9381
+ /**
9382
+ * When the record was created (ISO 8601).
9383
+ */
9384
+ created_at: string;
9385
+ /**
9386
+ * When the record was last updated (ISO 8601).
9387
+ */
9388
+ updated_at: string;
9389
+ };
9390
+ /**
9391
+ * Parameters for creating a company-wide pay-rate rule package.
9392
+ */
9393
+ export type PayRatesRulePackageParameters = {
9394
+ /**
9395
+ * Human-readable package name.
9396
+ */
9397
+ name: string;
9398
+ /**
9399
+ * Free-form package description; send null or omit it when no description is needed.
9400
+ */
9401
+ description?: string | null;
9402
+ };
9403
+ /**
9404
+ * 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.
9405
+ */
9406
+ export type PayRatesRulePackageUpdateParameters = {
9407
+ /**
9408
+ * Human-readable package name. Omit to leave it unchanged.
9409
+ */
9410
+ name?: string;
9411
+ /**
9412
+ * Free-form package description; omit to leave it unchanged, or send null to clear it.
9413
+ */
9414
+ description?: string | null;
9415
+ };
9416
+ /**
9417
+ * A page of a job's positions, with pagination metadata and navigation links.
9418
+ */
9419
+ export type PositionsResponseObject = {
9420
+ meta: Meta;
9421
+ links: Links;
9422
+ /**
9423
+ * The page of positions.
9424
+ */
9425
+ data: Array<PositionResponseObject>;
9426
+ };
9427
+ /**
9428
+ * Request body for creating or updating a position on a job. The job is taken from the URL path.
9429
+ */
9430
+ export type PositionParameters = {
9431
+ /**
9432
+ * ID of the worker to assign; cannot be changed once the position has tracked time.
9433
+ */
9434
+ fulfilled_by_user_id?: string | null;
9435
+ /**
9436
+ * Start of the position's scheduled window (ISO 8601); must fall within the job's schedule.
9437
+ */
9438
+ start_time?: string | null;
9439
+ /**
9440
+ * End of the position's scheduled window (ISO 8601); must be on or after start_time and within the job's schedule.
9441
+ */
9442
+ end_time?: string | null;
9443
+ /**
9444
+ * ID of the position function (role) to assign; null for none. Must be a global function or one of the job's company.
9445
+ */
9446
+ position_function_id?: string | null;
9447
+ /**
9448
+ * ID of the per diem to apply; its rate and currency are copied onto the position. Must belong to the job's company.
9449
+ */
9450
+ per_diem_id?: string | null;
8690
9451
  /**
8691
9452
  * Per-diem amount in cents; the effective rate is derived from the chosen per diem.
8692
9453
  */
@@ -8696,19 +9457,19 @@ export type PositionParameters = {
8696
9457
  */
8697
9458
  pwa?: boolean;
8698
9459
  /**
8699
- * Desired hourly cash-fringe rate in cents.
9460
+ * Desired hourly cash-fringe rate in cents. Admin only on user-scoped keys.
8700
9461
  */
8701
9462
  cash_fringe_rate_cents?: number | null;
8702
9463
  /**
8703
- * Desired base hourly rate in cents.
9464
+ * Desired base hourly rate in cents. Admin only on user-scoped keys.
8704
9465
  */
8705
9466
  hourly_rate_cents?: number | null;
8706
9467
  /**
8707
- * Desired PWA wage-pay rate in cents (PWA positions only).
9468
+ * Desired PWA wage-pay rate in cents (PWA positions only). Admin only on user-scoped keys.
8708
9469
  */
8709
9470
  pwa_wage_pay_rate_cents?: number | null;
8710
9471
  /**
8711
- * Desired hourly wage-adder rate in cents.
9472
+ * Desired hourly wage-adder rate in cents. Admin only on user-scoped keys.
8712
9473
  */
8713
9474
  wage_adder_rate_cents?: number | null;
8714
9475
  /**
@@ -8788,13 +9549,13 @@ export type ProductionJobScopePriceResponseObject = {
8788
9549
  */
8789
9550
  unit_of_measure: string;
8790
9551
  /**
8791
- * Billing rate per unit, as a decimal string in the company's currency.
9552
+ * Billing rate per unit, as a decimal string in the company's currency. Present for company keys and for administrators, managers, safety managers, and field leads of the company that owns the job; omitted for other user keys.
8792
9553
  */
8793
- unit_price: string;
9554
+ unit_price?: string;
8794
9555
  /**
8795
- * Contracted number of units expected for this scope on the job; null when no target is set.
9556
+ * Contracted number of units expected for this scope on the job; null when no target is set. Present for company keys and for administrators, managers, safety managers, and field leads of the company that owns the job; omitted for other user keys.
8796
9557
  */
8797
- contracted_count: number | null;
9558
+ contracted_count?: number | null;
8798
9559
  /**
8799
9560
  * When the record was created (ISO 8601).
8800
9561
  */
@@ -8808,6 +9569,29 @@ export type ProductionJobScopePriceResponseObject = {
8808
9569
  * 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.
8809
9570
  */
8810
9571
  export type ProductionCompletionParameters = ProductionFeatureCompletionParameters | ProductionQuantityCompletionParameters;
9572
+ /**
9573
+ * 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.
9574
+ */
9575
+ export type ProductionCompletionUpdateParameters = {
9576
+ /**
9577
+ * Free-text notes; omit to preserve them, or send null to clear them.
9578
+ */
9579
+ notes?: string | null;
9580
+ /**
9581
+ * Date the work was performed (YYYY-MM-DD); omit to preserve it.
9582
+ */
9583
+ work_date?: string;
9584
+ /**
9585
+ * Job positions that performed the work. Omit to preserve the crew; a supplied list replaces it and must retain at least one position.
9586
+ */
9587
+ position_ids?: Array<string>;
9588
+ completable_attributes?: {
9589
+ /**
9590
+ * Number of units completed, for quantity completions only. Omit to preserve it.
9591
+ */
9592
+ quantity_completed?: number;
9593
+ };
9594
+ };
8811
9595
  /**
8812
9596
  * Fields shared by both completion payload kinds.
8813
9597
  */
@@ -9040,7 +9824,7 @@ export type FormAssignmentTaskResponseObject = Array<{
9040
9824
  }>;
9041
9825
  }>;
9042
9826
  /**
9043
- * 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.
9827
+ * 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.
9044
9828
  */
9045
9829
  export type CertificationParameters = {
9046
9830
  /**
@@ -9065,7 +9849,7 @@ export type CertificationParameters = {
9065
9849
  duration?: string | null;
9066
9850
  };
9067
9851
  /**
9068
- * 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. company_id is absent by design — the certification's company is fixed at creation, so sending the key is rejected with 400 unknown_key, as is any other key not listed here.
9852
+ * 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.
9069
9853
  */
9070
9854
  export type CertificationUpdateParameters = {
9071
9855
  /**
@@ -9138,7 +9922,7 @@ export type CertificationPackageResponseObject = {
9138
9922
  updated_at: string;
9139
9923
  };
9140
9924
  /**
9141
- * 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. Only the keys listed here are accepted — any other key is rejected with 400 unknown_key.
9925
+ * 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.
9142
9926
  */
9143
9927
  export type CertificationPackageParameters = {
9144
9928
  /**
@@ -9159,7 +9943,7 @@ export type CertificationPackageParameters = {
9159
9943
  performed_by_user_id: string;
9160
9944
  };
9161
9945
  /**
9162
- * Request body for updating a certification package — a named set of certifications a company requires together. Include only the fields to change. Any key not listed here is rejected with 400 unknown_key.
9946
+ * Request body for updating a certification package — a named set of certifications a company requires together. Include only the fields to change.
9163
9947
  */
9164
9948
  export type CertificationPackageUpdateParameters = {
9165
9949
  /**
@@ -9217,7 +10001,7 @@ export type CertificationResponseObject = {
9217
10001
  updated_at: string;
9218
10002
  };
9219
10003
  /**
9220
- * Request body for recording a certification held by a worker — who holds it, which certification, when it was received, and optional proof, expiry, and verification details.
10004
+ * 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.
9221
10005
  */
9222
10006
  export type UserCertificationParameters = {
9223
10007
  /**
@@ -9225,7 +10009,7 @@ export type UserCertificationParameters = {
9225
10009
  */
9226
10010
  user_id: string;
9227
10011
  /**
9228
- * Id of the certification held. Required. A worker can hold each certification at most once.
10012
+ * Id of a certification visible to the key in its company, or a global certification. Required. A worker can hold each certification at most once.
9229
10013
  */
9230
10014
  certification_id: string;
9231
10015
  /**
@@ -9246,32 +10030,20 @@ export type UserCertificationParameters = {
9246
10030
  content: string;
9247
10031
  } | null;
9248
10032
  /**
9249
- * Whether DSPTCH has verified this held certification. Distinct from the verified flag on the certification definition itself.
9250
- */
9251
- verified?: boolean;
9252
- /**
9253
- * When the held certification expires (YYYY-MM-DD). Must be after received_at; null when it does not expire.
10033
+ * Company keys only: when the held certification expires (YYYY-MM-DD). On creation, must be after received_at; null when it does not expire. User keys must omit this field; supplying it returns 403. Creation and receipt or certification changes currently recalculate expiry from the catalog duration.
9254
10034
  */
9255
10035
  expiration_date?: string | null;
9256
10036
  /**
9257
10037
  * The credential or document number for the held certification, as issued by the issuer (for example a WINDA number or a license number). Free text; null when none.
9258
10038
  */
9259
10039
  credential_id?: string | null;
9260
- /**
9261
- * Id of the user recorded as approving this held certification; null when unset.
9262
- */
9263
- approved_by_user_id?: string | null;
9264
10040
  /**
9265
10041
  * When the held certification was archived (ISO 8601); null while active. Archiving is a soft flag, separate from deleting the record.
9266
10042
  */
9267
10043
  archived_at?: string | null;
9268
- /**
9269
- * When this held certification was approved (ISO 8601); null when unset.
9270
- */
9271
- approved_at?: string | null;
9272
10044
  };
9273
10045
  /**
9274
- * 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 and verification state, and any expiry date must remain after its receipt date.
10046
+ * 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.
9275
10047
  */
9276
10048
  export type UserCertificationUpdateParameters = {
9277
10049
  /**
@@ -9279,7 +10051,7 @@ export type UserCertificationUpdateParameters = {
9279
10051
  */
9280
10052
  user_id?: string;
9281
10053
  /**
9282
- * Id of the certification held. Omit to preserve the current certification; a worker can hold each certification at most once.
10054
+ * Id of a certification visible to the key in its company, or a global certification. Omit or repeat the stored id to preserve the current certification; a worker can hold each certification at most once.
9283
10055
  */
9284
10056
  certification_id?: string;
9285
10057
  /**
@@ -9300,29 +10072,26 @@ export type UserCertificationUpdateParameters = {
9300
10072
  content: string;
9301
10073
  } | null;
9302
10074
  /**
9303
- * Whether DSPTCH has verified this held certification. Distinct from the verified flag on the certification definition itself.
9304
- */
9305
- verified?: boolean;
9306
- /**
9307
- * When the held certification expires (YYYY-MM-DD). Must be after received_at; null when it does not expire.
10075
+ * Company keys only: when the held certification expires (YYYY-MM-DD). On creation, must be after received_at; null when it does not expire. User keys must omit this field; supplying it returns 403. Creation and receipt or certification changes currently recalculate expiry from the catalog duration.
9308
10076
  */
9309
10077
  expiration_date?: string | null;
9310
10078
  /**
9311
10079
  * The credential or document number for the held certification, as issued by the issuer (for example a WINDA number or a license number). Free text; null when none.
9312
10080
  */
9313
10081
  credential_id?: string | null;
9314
- /**
9315
- * Id of the user recorded as approving this held certification; null when unset.
9316
- */
9317
- approved_by_user_id?: string | null;
9318
10082
  /**
9319
10083
  * When the held certification was archived (ISO 8601); null while active. Archiving is a soft flag, separate from deleting the record.
9320
10084
  */
9321
10085
  archived_at?: string | null;
10086
+ };
10087
+ /**
10088
+ * Request body for approving a certification held by a worker. A user key approves in its own user's name and sends no body.
10089
+ */
10090
+ export type UserCertificationApprovalParameters = {
9322
10091
  /**
9323
- * When this held certification was approved (ISO 8601); null when unset.
10092
+ * Company keys only: a visible admin, manager, or safety manager at the key's company to record as approver. Required with a company key.
9324
10093
  */
9325
- approved_at?: string | null;
10094
+ approved_by_user_id?: string;
9326
10095
  };
9327
10096
  /**
9328
10097
  * A page of certifications held by your company's workers.
@@ -9356,9 +10125,9 @@ export type UserCertificationResponseObject = {
9356
10125
  */
9357
10126
  received_at: string;
9358
10127
  /**
9359
- * Whether DSPTCH has verified this held certification.
10128
+ * Whether DSPTCH or a trusted provider has verified the current evidence. Read-only for every API key and independent of employer approval. Ordinary changes to the worker, certification, issuer, receipt date, credential number, proof document, or explicit expiration revoke verification. Unchanged evidence, archiving, employer approval, and automatic expiration recalculation preserve it. A trusted provider can verify replacement evidence.
9360
10129
  */
9361
- verified: boolean;
10130
+ readonly verified: boolean;
9362
10131
  /**
9363
10132
  * Id of the company or organization that granted the certification to the worker. Set to your company for records created through the API; null when unknown.
9364
10133
  */
@@ -9372,7 +10141,7 @@ export type UserCertificationResponseObject = {
9372
10141
  */
9373
10142
  credential_id: string | null;
9374
10143
  /**
9375
- * Id of the user recorded as approving this held certification; null when unset.
10144
+ * Id of the user who approved this held certification; null when unapproved. Set through the approval endpoint.
9376
10145
  */
9377
10146
  approved_by_user_id: string | null;
9378
10147
  /**
@@ -9388,7 +10157,7 @@ export type UserCertificationResponseObject = {
9388
10157
  */
9389
10158
  archived_at: string | null;
9390
10159
  /**
9391
- * When this held certification was approved (ISO 8601); null when unset.
10160
+ * When the current approval was recorded (ISO 8601); null when unapproved.
9392
10161
  */
9393
10162
  approved_at: string | null;
9394
10163
  /**
@@ -10268,7 +11037,7 @@ export type RegionalJobWageDeterminationParameters = {
10268
11037
  */
10269
11038
  export type JobWageDeterminationUpdateParameters = {
10270
11039
  /**
10271
- * Where the edit starts applying, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Every version from this date forward takes the new values; earlier versions are untouched. Optional; defaults to the start of the version valid now, which corrects that version in place.
11040
+ * Where the edit starts applying, as a calendar date (`YYYY-MM-DD`). Every version from this date forward takes the new values; earlier versions are untouched. Optional; defaults to the start of the version valid now, which corrects that version in place.
10272
11041
  */
10273
11042
  effective_from?: string;
10274
11043
  /**
@@ -10314,7 +11083,7 @@ export type JobWageDeterminationUpdateParameters = {
10314
11083
  */
10315
11084
  export type JobWageDeterminationScheduledChangeParameters = {
10316
11085
  /**
10317
- * Where the change starts applying, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. A boundary is created at that date when needed, and the new values apply from there forward, carrying through every later version already scheduled. Past, current, and future dates are all accepted, so long as the date falls on or after the determination's timeline begins and before any scheduled termination. A date already reached reconciles derived pay data immediately; a date still ahead reconciles at that date.
11086
+ * Where the change starts applying, as a calendar date (`YYYY-MM-DD`). A boundary is created at that date when needed, and the new values apply from there forward, carrying through every later version already scheduled. Past, current, and future dates are all accepted, so long as the date falls on or after the determination's timeline begins and before any scheduled termination. A date already reached reconciles derived pay data immediately; a date still ahead reconciles at that date.
10318
11087
  */
10319
11088
  effective_date: string;
10320
11089
  /**
@@ -10348,7 +11117,7 @@ export type JobWageDeterminationScheduledChangeParameters = {
10348
11117
  */
10349
11118
  export type JobWageDeterminationGenesisParameters = {
10350
11119
  /**
10351
- * The timeline's new start, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Moving it earlier extends the first version back to it. Moving it later drops every version whose coverage ended at or before it and truncates the one spanning it, so what those versions said stops being readable. Refused with `422` when the new start would fall at or after a scheduled termination.
11120
+ * The timeline's new start, as a calendar date (`YYYY-MM-DD`). Moving it earlier extends the first version back to it. Moving it later drops every version whose coverage ended at or before it and truncates the one spanning it, so what those versions said stops being readable. Refused with `422` when the new start would fall at or after a scheduled termination.
10352
11121
  */
10353
11122
  effective_date: string;
10354
11123
  };
@@ -10357,7 +11126,7 @@ export type JobWageDeterminationGenesisParameters = {
10357
11126
  */
10358
11127
  export type JobWageDeterminationScheduledTerminationParameters = {
10359
11128
  /**
10360
- * When the determination stops being valid, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Segments beyond it are dropped and one spanning it is truncated. Must fall after the determination's genesis and on or before its current end. A determination holds at most one scheduled termination; cancel the standing one before scheduling another.
11129
+ * When the determination stops being valid, as a calendar date (`YYYY-MM-DD`). Segments beyond it are dropped and one spanning it is truncated. Must fall after the determination's genesis and on or before its current end. A determination holds at most one scheduled termination; cancel the standing one before scheduling another.
10361
11130
  */
10362
11131
  effective_date: string;
10363
11132
  };
@@ -10615,7 +11384,7 @@ export type PayRatesRuleUpdateParameters = {
10615
11384
  */
10616
11385
  export type PayRatesRuleGenesisParameters = {
10617
11386
  /**
10618
- * The timeline's new start as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Moving it earlier extends the first version back to it. Moving it later removes coverage before it. Refused with `422` when the new start would fall at or after a standing termination.
11387
+ * The timeline's new start as a calendar date (`YYYY-MM-DD`). Moving it earlier extends the first version back to it. Moving it later removes coverage before it. Refused with `422` when the new start would fall at or after a standing termination.
10619
11388
  */
10620
11389
  effective_date: string;
10621
11390
  };
@@ -10624,7 +11393,7 @@ export type PayRatesRuleGenesisParameters = {
10624
11393
  */
10625
11394
  export type PayRatesRuleScheduledTerminationParameters = {
10626
11395
  /**
10627
- * The exclusive end of the family's valid-time timeline as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Must fall after genesis. Scheduling removes versions that start after the new end and truncates the version spanning it. A family holds at most one standing termination; cancel it before scheduling another. Cancellation reopens the last surviving version with its existing recipe and does not restore removed versions.
11396
+ * The exclusive end of the family's valid-time timeline as a calendar date (`YYYY-MM-DD`). Must fall after genesis. Scheduling removes versions that start after the new end and truncates the version spanning it. A family holds at most one standing termination; cancel it before scheduling another. Cancellation reopens the last surviving version with its existing recipe and does not restore removed versions.
10628
11397
  */
10629
11398
  effective_date: string;
10630
11399
  };
@@ -10766,7 +11535,7 @@ export type OvertimeRuleHistoryVersionObject = {
10766
11535
  */
10767
11536
  export type OvertimeRuleParameters = {
10768
11537
  /**
10769
- * Date the rule takes effect, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Optional; defaults to today.
11538
+ * Date the rule takes effect, as a calendar date (`YYYY-MM-DD`). Optional; defaults to today.
10770
11539
  */
10771
11540
  effective_date?: string;
10772
11541
  /**
@@ -10799,7 +11568,7 @@ export type OvertimeRuleParameters = {
10799
11568
  */
10800
11569
  export type OvertimeRuleUpdateParameters = {
10801
11570
  /**
10802
- * Where the edit starts applying, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Every version from this date forward takes the new values; earlier versions are untouched. Optional; defaults to the start of the version valid now, which corrects that version in place.
11571
+ * Where the edit starts applying, as a calendar date (`YYYY-MM-DD`). Every version from this date forward takes the new values; earlier versions are untouched. Optional; defaults to the start of the version valid now, which corrects that version in place.
10803
11572
  */
10804
11573
  effective_from?: string;
10805
11574
  /**
@@ -10832,7 +11601,7 @@ export type OvertimeRuleUpdateParameters = {
10832
11601
  */
10833
11602
  export type OvertimeRuleScheduledChangeParameters = {
10834
11603
  /**
10835
- * Where the change starts applying, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. A boundary is created at that date when needed, and the new values apply from there forward. A date already reached reconciles derived overtime immediately; a date still ahead reconciles at that date.
11604
+ * Where the change starts applying, as a calendar date (`YYYY-MM-DD`). A boundary is created at that date when needed, and the new values apply from there forward. A date already reached reconciles derived overtime immediately; a date still ahead reconciles at that date.
10836
11605
  */
10837
11606
  effective_date: string;
10838
11607
  /**
@@ -10865,7 +11634,7 @@ export type OvertimeRuleScheduledChangeParameters = {
10865
11634
  */
10866
11635
  export type OvertimeRuleGenesisParameters = {
10867
11636
  /**
10868
- * The timeline's new start, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Moving it earlier extends the first version back to it. Moving it later drops every version whose coverage ended at or before it and truncates the one spanning it, so what those versions said stops being readable. Refused with `422` when the new start would fall at or after a scheduled termination.
11637
+ * The timeline's new start, as a calendar date (`YYYY-MM-DD`). Moving it earlier extends the first version back to it. Moving it later drops every version whose coverage ended at or before it and truncates the one spanning it, so what those versions said stops being readable. Refused with `422` when the new start would fall at or after a scheduled termination.
10869
11638
  */
10870
11639
  effective_date: string;
10871
11640
  };
@@ -10874,7 +11643,7 @@ export type OvertimeRuleGenesisParameters = {
10874
11643
  */
10875
11644
  export type OvertimeRuleScheduledTerminationParameters = {
10876
11645
  /**
10877
- * When the rule stops being valid, as a calendar date (`YYYY-MM-DD`); a value carrying a time component is refused with `422` rather than truncated. Must fall after the rule's genesis — removing the rule from every window it ever covered is the rule delete instead. A rule holds at most one scheduled termination; cancel the standing one before scheduling another.
11646
+ * When the rule stops being valid, as a calendar date (`YYYY-MM-DD`). Must fall after the rule's genesis — removing the rule from every window it ever covered is the rule delete instead. A rule holds at most one scheduled termination; cancel the standing one before scheduling another.
10878
11647
  */
10879
11648
  effective_date: string;
10880
11649
  };
@@ -10978,6 +11747,7 @@ export type AssetsItemResponseObject = {
10978
11747
  */
10979
11748
  quantity: number;
10980
11749
  }>;
11750
+ attributes: AssetsAttributeValueObjects;
10981
11751
  /**
10982
11752
  * Images attached to the item; each carries a download url for its file.
10983
11753
  */
@@ -10996,7 +11766,7 @@ export type AssetsItemResponseObject = {
10996
11766
  updated_at: string;
10997
11767
  };
10998
11768
  /**
10999
- * 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.
11769
+ * 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.
11000
11770
  */
11001
11771
  export type AssetsItemParameters = {
11002
11772
  /**
@@ -11035,6 +11805,23 @@ export type AssetsItemParameters = {
11035
11805
  * URL to this item in an external system.
11036
11806
  */
11037
11807
  external_system_url?: string;
11808
+ /**
11809
+ * Upserts the values of the item-level attributes of the product's category, one entry per attribute. Send a blank value and null assets_attribute_option_id to clear one.
11810
+ */
11811
+ attribute_values?: Array<{
11812
+ /**
11813
+ * ID of the attribute definition.
11814
+ */
11815
+ assets_attribute_id: string;
11816
+ /**
11817
+ * The entered value for a non-select attribute (text, number, date, or boolean as a string); null for a select attribute or when unfilled.
11818
+ */
11819
+ value?: string | null;
11820
+ /**
11821
+ * ID of the chosen option for a select attribute; null otherwise.
11822
+ */
11823
+ assets_attribute_option_id?: string | null;
11824
+ }>;
11038
11825
  /**
11039
11826
  * Image attachments. Send file with a signed_id to add one; include id with _destroy to remove an existing one.
11040
11827
  */
@@ -11061,7 +11848,7 @@ export type AssetsItemParameters = {
11061
11848
  performed_by_user_id: string;
11062
11849
  };
11063
11850
  /**
11064
- * Update an asset item. All item fields are optional — send only what changes — but performed_by_user_id is required to record the updater and any placement. Omitted attributes retain their existing values.
11851
+ * 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.
11065
11852
  */
11066
11853
  export type AssetsItemUpdateParameters = {
11067
11854
  /**
@@ -11101,27 +11888,28 @@ export type AssetsItemUpdateParameters = {
11101
11888
  */
11102
11889
  external_system_url?: string;
11103
11890
  /**
11104
- * Image attachments. Send file with a signed_id to add one; include id with _destroy to remove an existing one.
11105
- */
11106
- images_attributes?: Array<AssetsAttachmentParameters>;
11107
- /**
11108
- * Optional. Move the item to this site; mutually exclusive with user_id and container_item_id.
11891
+ * Upserts the values of the item-level attributes of the product's category, one entry per attribute. Send a blank value and null assets_attribute_option_id to clear one.
11109
11892
  */
11110
- assets_site_id?: string;
11111
- /**
11112
- * Optional. Assign the item to this user; mutually exclusive with assets_site_id and container_item_id.
11113
- */
11114
- user_id?: string;
11115
- /**
11116
- * Optional. Place the item inside this container item; mutually exclusive with assets_site_id and user_id.
11117
- */
11118
- container_item_id?: string;
11893
+ attribute_values?: Array<{
11894
+ /**
11895
+ * ID of the attribute definition.
11896
+ */
11897
+ assets_attribute_id: string;
11898
+ /**
11899
+ * The entered value for a non-select attribute (text, number, date, or boolean as a string); null for a select attribute or when unfilled.
11900
+ */
11901
+ value?: string | null;
11902
+ /**
11903
+ * ID of the chosen option for a select attribute; null otherwise.
11904
+ */
11905
+ assets_attribute_option_id?: string | null;
11906
+ }>;
11119
11907
  /**
11120
- * Optional. The storage location within the placement site or container; omit for an unbinned placement. Ignored for a user assignment.
11908
+ * Image attachments. Send file with a signed_id to add one; include id with _destroy to remove an existing one.
11121
11909
  */
11122
- assets_sub_location_id?: string;
11910
+ images_attributes?: Array<AssetsAttachmentParameters>;
11123
11911
  /**
11124
- * ID of the user this update is performed on behalf of, recorded as updater and attributed to any placement. Required; must belong to your company.
11912
+ * ID of the user this update is performed on behalf of, recorded as updater. Required; must belong to your company.
11125
11913
  */
11126
11914
  performed_by_user_id: string;
11127
11915
  };
@@ -11668,7 +12456,7 @@ export type AssetsItemFormAssignmentResponseObject = {
11668
12456
  }>;
11669
12457
  };
11670
12458
  /**
11671
- * Create or update an item form assignment. form_definition_id and task_attributes are required, and task_attributes.created_by_user_id is required (a missing value returns 400). recurring gates the recurrence fields.
12459
+ * 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.
11672
12460
  */
11673
12461
  export type AssetsItemFormAssignmentParameters = {
11674
12462
  /**
@@ -11695,10 +12483,6 @@ export type AssetsItemFormAssignmentParameters = {
11695
12483
  * ID of the user creating the task, recorded as its creator. Required; a missing value returns 400.
11696
12484
  */
11697
12485
  created_by_user_id: string;
11698
- /**
11699
- * ID of the user updating the task. Ignored on create (forced to created_by_user_id); recorded on update.
11700
- */
11701
- updated_by_user_id?: string | null;
11702
12486
  /**
11703
12487
  * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
11704
12488
  */
@@ -11731,7 +12515,7 @@ export type AssetsItemFormAssignmentParameters = {
11731
12515
  };
11732
12516
  };
11733
12517
  /**
11734
- * 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.
12518
+ * 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.
11735
12519
  */
11736
12520
  export type AssetsItemFormAssignmentUpdateParameters = {
11737
12521
  /**
@@ -11754,14 +12538,6 @@ export type AssetsItemFormAssignmentUpdateParameters = {
11754
12538
  * Free-text description of the task.
11755
12539
  */
11756
12540
  description?: string | null;
11757
- /**
11758
- * ID of the user who created the task. Existing assignments retain their creator when this is omitted.
11759
- */
11760
- created_by_user_id?: string;
11761
- /**
11762
- * ID of the user updating the task. The API derives the stored updater from the task creator.
11763
- */
11764
- updated_by_user_id?: string | null;
11765
12541
  /**
11766
12542
  * When the form task is due (ISO 8601), interpreted in tz_name; null for an unscheduled task.
11767
12543
  */
@@ -12395,17 +13171,9 @@ export type AssetsSubLocationParameters = {
12395
13171
  code: string;
12396
13172
  };
12397
13173
  /**
12398
- * Update a storage location. All fields are optional — send only what changes. The holder fields cannot change after creation; renaming code cascades new path codes through the node's subtree.
13174
+ * 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.
12399
13175
  */
12400
13176
  export type AssetsSubLocationUpdateParameters = {
12401
- /**
12402
- * ID of the site the location belongs to. Top-level nodes only — exactly one of assets_site_id or container_item_id; nested nodes inherit the parent's holder.
12403
- */
12404
- assets_site_id?: string;
12405
- /**
12406
- * ID of the container item the location belongs to. Top-level nodes only — exactly one of assets_site_id or container_item_id; the container's product must be flagged as a container.
12407
- */
12408
- container_item_id?: string;
12409
13177
  /**
12410
13178
  * ID of the enclosing location for a nested node; omit for a top-level node.
12411
13179
  */
@@ -12610,6 +13378,78 @@ export type AssetsArchiveParameters = {
12610
13378
  */
12611
13379
  performed_by_user_id: string;
12612
13380
  };
13381
+ /**
13382
+ * A page of certifications held by your company's workers.
13383
+ */
13384
+ export type UserCertificationsResponseObjWritable = {
13385
+ meta: Meta;
13386
+ links: Links;
13387
+ /**
13388
+ * The page of held certifications.
13389
+ */
13390
+ data: Array<UserCertificationResponseObjectWritable>;
13391
+ };
13392
+ /**
13393
+ * A certification held by a worker — the record that a worker earned a certification, with its receipt date, optional expiry, and verification state.
13394
+ */
13395
+ export type UserCertificationResponseObjectWritable = {
13396
+ /**
13397
+ * Unique identifier of the held certification.
13398
+ */
13399
+ id: string;
13400
+ /**
13401
+ * Id of the worker who holds the certification.
13402
+ */
13403
+ user_id: string;
13404
+ /**
13405
+ * Id of the certification held.
13406
+ */
13407
+ certification_id: string;
13408
+ /**
13409
+ * When the worker earned the certification (ISO 8601).
13410
+ */
13411
+ received_at: string;
13412
+ /**
13413
+ * Id of the company or organization that granted the certification to the worker. Set to your company for records created through the API; null when unknown.
13414
+ */
13415
+ issuer_company_id: string | null;
13416
+ /**
13417
+ * When the held certification expires (YYYY-MM-DD); null when it does not expire.
13418
+ */
13419
+ expiration_date: string | null;
13420
+ /**
13421
+ * The credential or document number for the held certification, as issued by the issuer; null when none.
13422
+ */
13423
+ credential_id: string | null;
13424
+ /**
13425
+ * Id of the user who approved this held certification; null when unapproved. Set through the approval endpoint.
13426
+ */
13427
+ approved_by_user_id: string | null;
13428
+ /**
13429
+ * Id of the user who created the record; null when unrecorded (records created through the API do not set it).
13430
+ */
13431
+ created_by_user_id: string | null;
13432
+ /**
13433
+ * Id of the user who last updated the record; null when unrecorded.
13434
+ */
13435
+ updated_by_user_id: string | null;
13436
+ /**
13437
+ * When the held certification was archived (ISO 8601); null while active.
13438
+ */
13439
+ archived_at: string | null;
13440
+ /**
13441
+ * When the current approval was recorded (ISO 8601); null when unapproved.
13442
+ */
13443
+ approved_at: string | null;
13444
+ /**
13445
+ * When the record was created (ISO 8601).
13446
+ */
13447
+ created_at: string;
13448
+ /**
13449
+ * When the record was last updated (ISO 8601).
13450
+ */
13451
+ updated_at: string;
13452
+ };
12613
13453
  export type ListApiKeyScopesData = {
12614
13454
  body?: never;
12615
13455
  path?: never;
@@ -13142,7 +13982,7 @@ export type CreateEmployerErrors = {
13142
13982
  */
13143
13983
  400: Problem;
13144
13984
  /**
13145
- * Forbidden. Also returned when `company_id` names a company other than the API key's own.
13985
+ * Forbidden. Also returned when `company_id` names a company the key's user neither administers nor manages, or, on a company-scoped key, any company other than the key's own.
13146
13986
  */
13147
13987
  403: Problem;
13148
13988
  /**
@@ -13185,6 +14025,33 @@ export type DeleteEmployerResponses = {
13185
14025
  200: ApprenticeshipProgramEmployerResponseObject;
13186
14026
  };
13187
14027
  export type DeleteEmployerResponse = DeleteEmployerResponses[keyof DeleteEmployerResponses];
14028
+ export type GetEmployerData = {
14029
+ body?: never;
14030
+ path: {
14031
+ program_id: string;
14032
+ id: string;
14033
+ };
14034
+ query?: never;
14035
+ url: '/api/v1/apprenticeship/programs/{program_id}/employers/{id}';
14036
+ };
14037
+ export type GetEmployerErrors = {
14038
+ /**
14039
+ * Forbidden
14040
+ */
14041
+ 403: Problem;
14042
+ /**
14043
+ * Not Found
14044
+ */
14045
+ 404: Problem;
14046
+ };
14047
+ export type GetEmployerError = GetEmployerErrors[keyof GetEmployerErrors];
14048
+ export type GetEmployerResponses = {
14049
+ /**
14050
+ * Success
14051
+ */
14052
+ 200: ApprenticeshipProgramEmployerResponseObject;
14053
+ };
14054
+ export type GetEmployerResponse = GetEmployerResponses[keyof GetEmployerResponses];
13188
14055
  export type UpdateEmployerData = {
13189
14056
  body?: ApprenticeshipProgramEmployerUpdateParameters;
13190
14057
  path: {
@@ -13200,7 +14067,7 @@ export type UpdateEmployerErrors = {
13200
14067
  */
13201
14068
  400: Problem;
13202
14069
  /**
13203
- * Forbidden. Also returned when `company_id`, sent or stored, names a company other than the API key's own.
14070
+ * Forbidden. Also returned when `company_id`, sent or stored, names a company the key's user neither administers nor manages, or, on a company-scoped key, any company other than the key's own.
13204
14071
  */
13205
14072
  403: Problem;
13206
14073
  /**
@@ -13456,6 +14323,64 @@ export type CreatePeriodResponses = {
13456
14323
  201: ApprenticeshipWageSchedulePeriodResponseObject;
13457
14324
  };
13458
14325
  export type CreatePeriodResponse = CreatePeriodResponses[keyof CreatePeriodResponses];
14326
+ export type DeletePeriodData = {
14327
+ body?: never;
14328
+ path: {
14329
+ wage_schedule_id: string;
14330
+ id: string;
14331
+ };
14332
+ query?: never;
14333
+ url: '/api/v1/apprenticeship/wage_schedules/{wage_schedule_id}/periods/{id}';
14334
+ };
14335
+ export type DeletePeriodErrors = {
14336
+ /**
14337
+ * Forbidden
14338
+ */
14339
+ 403: Problem;
14340
+ /**
14341
+ * Not Found
14342
+ */
14343
+ 404: Problem;
14344
+ /**
14345
+ * Unprocessable Content
14346
+ */
14347
+ 422: Problem;
14348
+ };
14349
+ export type DeletePeriodError = DeletePeriodErrors[keyof DeletePeriodErrors];
14350
+ export type DeletePeriodResponses = {
14351
+ /**
14352
+ * No Content
14353
+ */
14354
+ 204: void;
14355
+ };
14356
+ export type DeletePeriodResponse = DeletePeriodResponses[keyof DeletePeriodResponses];
14357
+ export type GetPeriodData = {
14358
+ body?: never;
14359
+ path: {
14360
+ wage_schedule_id: string;
14361
+ id: string;
14362
+ };
14363
+ query?: never;
14364
+ url: '/api/v1/apprenticeship/wage_schedules/{wage_schedule_id}/periods/{id}';
14365
+ };
14366
+ export type GetPeriodErrors = {
14367
+ /**
14368
+ * Forbidden
14369
+ */
14370
+ 403: Problem;
14371
+ /**
14372
+ * Not Found
14373
+ */
14374
+ 404: Problem;
14375
+ };
14376
+ export type GetPeriodError = GetPeriodErrors[keyof GetPeriodErrors];
14377
+ export type GetPeriodResponses = {
14378
+ /**
14379
+ * Success
14380
+ */
14381
+ 200: ApprenticeshipWageSchedulePeriodResponseObject;
14382
+ };
14383
+ export type GetPeriodResponse = GetPeriodResponses[keyof GetPeriodResponses];
13459
14384
  export type UpdatePeriodData = {
13460
14385
  body?: ApprenticeshipWageSchedulePeriodUpdateParameters;
13461
14386
  path: {
@@ -14391,7 +15316,7 @@ export type CreateItemErrors = {
14391
15316
  */
14392
15317
  404: Problem;
14393
15318
  /**
14394
- * Unprocessable Content (conflicting placement)
15319
+ * Unprocessable Content (missing required attribute)
14395
15320
  */
14396
15321
  422: Problem;
14397
15322
  };
@@ -14901,13 +15826,17 @@ export type CreateItemFormAssignmentTaskData = {
14901
15826
  };
14902
15827
  export type CreateItemFormAssignmentTaskErrors = {
14903
15828
  /**
14904
- * Bad Request (missing created_by_user_id)
15829
+ * Bad Request
14905
15830
  */
14906
15831
  400: Problem;
14907
15832
  /**
14908
15833
  * Forbidden
14909
15834
  */
14910
15835
  403: Problem;
15836
+ /**
15837
+ * Not Found
15838
+ */
15839
+ 404: Problem;
14911
15840
  /**
14912
15841
  * Unprocessable Content
14913
15842
  */
@@ -14958,10 +15887,22 @@ export type UpdateFormAssignmentTaskData = {
14958
15887
  url: '/api/v1/assets/items/{item_id}/form_assignment_tasks/{id}';
14959
15888
  };
14960
15889
  export type UpdateFormAssignmentTaskErrors = {
15890
+ /**
15891
+ * Bad Request
15892
+ */
15893
+ 400: Problem;
14961
15894
  /**
14962
15895
  * Forbidden
14963
15896
  */
14964
15897
  403: Problem;
15898
+ /**
15899
+ * Not Found
15900
+ */
15901
+ 404: Problem;
15902
+ /**
15903
+ * Unprocessable Content
15904
+ */
15905
+ 422: Problem;
14965
15906
  };
14966
15907
  export type UpdateFormAssignmentTaskError = UpdateFormAssignmentTaskErrors[keyof UpdateFormAssignmentTaskErrors];
14967
15908
  export type UpdateFormAssignmentTaskResponses = {
@@ -15848,6 +16789,10 @@ export type CreateSubLocationData = {
15848
16789
  url: '/api/v1/assets/sub_locations';
15849
16790
  };
15850
16791
  export type CreateSubLocationErrors = {
16792
+ /**
16793
+ * Bad Request
16794
+ */
16795
+ 400: Problem;
15851
16796
  /**
15852
16797
  * Forbidden
15853
16798
  */
@@ -15860,7 +16805,7 @@ export type CreateSubLocationErrors = {
15860
16805
  export type CreateSubLocationError = CreateSubLocationErrors[keyof CreateSubLocationErrors];
15861
16806
  export type CreateSubLocationResponses = {
15862
16807
  /**
15863
- * Created
16808
+ * Created with an explicit holder
15864
16809
  */
15865
16810
  201: AssetsSubLocationResponseObject;
15866
16811
  };
@@ -15930,6 +16875,10 @@ export type UpdateSubLocationData = {
15930
16875
  url: '/api/v1/assets/sub_locations/{id}';
15931
16876
  };
15932
16877
  export type UpdateSubLocationErrors = {
16878
+ /**
16879
+ * Bad Request (create-only holder)
16880
+ */
16881
+ 400: Problem;
15933
16882
  /**
15934
16883
  * Forbidden
15935
16884
  */
@@ -16553,6 +17502,66 @@ export type UpdatePackageResponses = {
16553
17502
  200: CertificationPackageResponseObject;
16554
17503
  };
16555
17504
  export type UpdatePackageResponse = UpdatePackageResponses[keyof UpdatePackageResponses];
17505
+ export type RevokeUserCertificationApprovalData = {
17506
+ body?: never;
17507
+ path: {
17508
+ user_certification_id: string;
17509
+ };
17510
+ query?: never;
17511
+ url: '/api/v1/certifications/user_certifications/{user_certification_id}/approval';
17512
+ };
17513
+ export type RevokeUserCertificationApprovalErrors = {
17514
+ /**
17515
+ * Forbidden
17516
+ */
17517
+ 403: Problem;
17518
+ /**
17519
+ * Not Found
17520
+ */
17521
+ 404: Problem;
17522
+ };
17523
+ export type RevokeUserCertificationApprovalError = RevokeUserCertificationApprovalErrors[keyof RevokeUserCertificationApprovalErrors];
17524
+ export type RevokeUserCertificationApprovalResponses = {
17525
+ /**
17526
+ * Success
17527
+ */
17528
+ 200: UserCertificationResponseObject;
17529
+ };
17530
+ export type RevokeUserCertificationApprovalResponse = RevokeUserCertificationApprovalResponses[keyof RevokeUserCertificationApprovalResponses];
17531
+ export type ApproveUserCertificationData = {
17532
+ body?: UserCertificationApprovalParameters;
17533
+ path: {
17534
+ user_certification_id: string;
17535
+ };
17536
+ query?: never;
17537
+ url: '/api/v1/certifications/user_certifications/{user_certification_id}/approval';
17538
+ };
17539
+ export type ApproveUserCertificationErrors = {
17540
+ /**
17541
+ * Bad Request
17542
+ */
17543
+ 400: Problem;
17544
+ /**
17545
+ * Forbidden
17546
+ */
17547
+ 403: Problem;
17548
+ /**
17549
+ * Not Found
17550
+ */
17551
+ 404: Problem;
17552
+ /**
17553
+ * Unprocessable Content
17554
+ */
17555
+ 422: Problem;
17556
+ };
17557
+ export type ApproveUserCertificationError = ApproveUserCertificationErrors[keyof ApproveUserCertificationErrors];
17558
+ export type ApproveUserCertificationResponses = {
17559
+ /**
17560
+ * Success
17561
+ */
17562
+ 200: UserCertificationResponseObject;
17563
+ };
17564
+ export type ApproveUserCertificationResponse = ApproveUserCertificationResponses[keyof ApproveUserCertificationResponses];
16556
17565
  export type ListUserCertificationsData = {
16557
17566
  body?: never;
16558
17567
  path?: never;
@@ -16687,6 +17696,10 @@ export type UpdateUserCertificationData = {
16687
17696
  url: '/api/v1/certifications/user_certifications/{id}';
16688
17697
  };
16689
17698
  export type UpdateUserCertificationErrors = {
17699
+ /**
17700
+ * Bad Request
17701
+ */
17702
+ 400: Problem;
16690
17703
  /**
16691
17704
  * Forbidden
16692
17705
  */
@@ -16708,6 +17721,12 @@ export type ListCertificationsData = {
16708
17721
  body?: never;
16709
17722
  path?: never;
16710
17723
  query?: {
17724
+ /**
17725
+ * Fuzzy-matches the certification name (trigram word-similarity). Matches the name column only.
17726
+ */
17727
+ 'filter[name]'?: string;
17728
+ filter?: string;
17729
+ 'filter[unexpected]'?: string;
16711
17730
  /**
16712
17731
  * This pagination cursor corresponds to the cursor value found in the response in
16713
17732
  * `meta.page.next_cursor`.
@@ -16853,6 +17872,10 @@ export type ListDepartmentsData = {
16853
17872
  body?: never;
16854
17873
  path?: never;
16855
17874
  query?: {
17875
+ /**
17876
+ * Fuzzy-matches the department name (trigram word-similarity). Matches the name column only.
17877
+ */
17878
+ 'filter[name]'?: string;
16856
17879
  'filter[created_at][gte]'?: string;
16857
17880
  'filter[created_at][lte]'?: string;
16858
17881
  'filter[updated_at][gte]'?: string;
@@ -17496,6 +18519,10 @@ export type ListFormDefinitionsData = {
17496
18519
  body?: never;
17497
18520
  path?: never;
17498
18521
  query?: {
18522
+ /**
18523
+ * Fuzzy-matches the form definition name (trigram word-similarity). Matches the name column only — not tags.
18524
+ */
18525
+ 'filter[name]'?: string;
17499
18526
  'filter[created_at][gte]'?: string;
17500
18527
  'filter[created_at][lte]'?: string;
17501
18528
  'filter[updated_at][gte]'?: string;
@@ -17541,6 +18568,32 @@ export type ListFormDefinitionsResponses = {
17541
18568
  200: FormDefinitionResponseObject;
17542
18569
  };
17543
18570
  export type ListFormDefinitionsResponse = ListFormDefinitionsResponses[keyof ListFormDefinitionsResponses];
18571
+ export type GetFormDefinitionData = {
18572
+ body?: never;
18573
+ path: {
18574
+ id: string;
18575
+ };
18576
+ query?: never;
18577
+ url: '/api/v1/form_definitions/{id}';
18578
+ };
18579
+ export type GetFormDefinitionErrors = {
18580
+ /**
18581
+ * Forbidden
18582
+ */
18583
+ 403: Problem;
18584
+ /**
18585
+ * Not Found
18586
+ */
18587
+ 404: Problem;
18588
+ };
18589
+ export type GetFormDefinitionError = GetFormDefinitionErrors[keyof GetFormDefinitionErrors];
18590
+ export type GetFormDefinitionResponses = {
18591
+ /**
18592
+ * Success
18593
+ */
18594
+ 200: FormDefinitionObject;
18595
+ };
18596
+ export type GetFormDefinitionResponse = GetFormDefinitionResponses[keyof GetFormDefinitionResponses];
17544
18597
  export type ListFormSubmissionDeltasData = {
17545
18598
  body?: never;
17546
18599
  path?: never;
@@ -17755,6 +18808,12 @@ export type ListGroupsData = {
17755
18808
  body?: never;
17756
18809
  path?: never;
17757
18810
  query?: {
18811
+ /**
18812
+ * Fuzzy-matches the group name (trigram word-similarity). Matches the name column only.
18813
+ */
18814
+ 'filter[name]'?: string;
18815
+ filter?: string;
18816
+ 'filter[unexpected]'?: string;
17758
18817
  /**
17759
18818
  * This pagination cursor corresponds to the cursor value found in the response in
17760
18819
  * `meta.page.next_cursor`.
@@ -17904,6 +18963,147 @@ export type UpdateGroupResponses = {
17904
18963
  200: GroupResponseObject;
17905
18964
  };
17906
18965
  export type UpdateGroupResponse = UpdateGroupResponses[keyof UpdateGroupResponses];
18966
+ export type ListJobFormAssignmentTasksData = {
18967
+ body?: never;
18968
+ path: {
18969
+ job_id: string;
18970
+ };
18971
+ query?: {
18972
+ /**
18973
+ * This pagination cursor corresponds to the cursor value found in the response in
18974
+ * `meta.page.next_cursor`.
18975
+ */
18976
+ 'page[cursor]'?: string;
18977
+ /**
18978
+ * Maximum number of records to return per page. Defaults to 20. A value above 100 is capped to 100 rather than rejected; a value that is zero, negative, or not an integer is rejected with a `400`.
18979
+ */
18980
+ 'page[limit]'?: number;
18981
+ page?: string;
18982
+ };
18983
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks';
18984
+ };
18985
+ export type ListJobFormAssignmentTasksErrors = {
18986
+ /**
18987
+ * Bad Request
18988
+ */
18989
+ 400: Problem;
18990
+ /**
18991
+ * Forbidden
18992
+ */
18993
+ 403: Problem;
18994
+ /**
18995
+ * Not Found
18996
+ */
18997
+ 404: Problem;
18998
+ };
18999
+ export type ListJobFormAssignmentTasksError = ListJobFormAssignmentTasksErrors[keyof ListJobFormAssignmentTasksErrors];
19000
+ export type ListJobFormAssignmentTasksResponses = {
19001
+ /**
19002
+ * Success
19003
+ */
19004
+ 200: {
19005
+ meta: Meta;
19006
+ links: Links;
19007
+ data: Array<JobFormAssignmentResponseObject>;
19008
+ };
19009
+ };
19010
+ export type ListJobFormAssignmentTasksResponse = ListJobFormAssignmentTasksResponses[keyof ListJobFormAssignmentTasksResponses];
19011
+ export type CreateJobFormAssignmentTaskData = {
19012
+ body: JobFormAssignmentParameters;
19013
+ path: {
19014
+ job_id: string;
19015
+ };
19016
+ query?: never;
19017
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks';
19018
+ };
19019
+ export type CreateJobFormAssignmentTaskErrors = {
19020
+ /**
19021
+ * Bad Request
19022
+ */
19023
+ 400: Problem;
19024
+ /**
19025
+ * Forbidden
19026
+ */
19027
+ 403: Problem;
19028
+ /**
19029
+ * Not Found
19030
+ */
19031
+ 404: Problem;
19032
+ /**
19033
+ * Unprocessable Content
19034
+ */
19035
+ 422: Problem;
19036
+ };
19037
+ export type CreateJobFormAssignmentTaskError = CreateJobFormAssignmentTaskErrors[keyof CreateJobFormAssignmentTaskErrors];
19038
+ export type CreateJobFormAssignmentTaskResponses = {
19039
+ /**
19040
+ * Created (recurring, with assignees and reminders)
19041
+ */
19042
+ 201: JobFormAssignmentResponseObject;
19043
+ };
19044
+ export type CreateJobFormAssignmentTaskResponse = CreateJobFormAssignmentTaskResponses[keyof CreateJobFormAssignmentTaskResponses];
19045
+ export type GetJobFormAssignmentTaskData = {
19046
+ body?: never;
19047
+ path: {
19048
+ job_id: string;
19049
+ id: string;
19050
+ };
19051
+ query?: never;
19052
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks/{id}';
19053
+ };
19054
+ export type GetJobFormAssignmentTaskErrors = {
19055
+ /**
19056
+ * Forbidden
19057
+ */
19058
+ 403: Problem;
19059
+ /**
19060
+ * Not Found
19061
+ */
19062
+ 404: Problem;
19063
+ };
19064
+ export type GetJobFormAssignmentTaskError = GetJobFormAssignmentTaskErrors[keyof GetJobFormAssignmentTaskErrors];
19065
+ export type GetJobFormAssignmentTaskResponses = {
19066
+ /**
19067
+ * Success
19068
+ */
19069
+ 200: JobFormAssignmentResponseObject;
19070
+ };
19071
+ export type GetJobFormAssignmentTaskResponse = GetJobFormAssignmentTaskResponses[keyof GetJobFormAssignmentTaskResponses];
19072
+ export type UpdateJobFormAssignmentTaskData = {
19073
+ body: JobFormAssignmentUpdateParameters;
19074
+ path: {
19075
+ job_id: string;
19076
+ id: string;
19077
+ };
19078
+ query?: never;
19079
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks/{id}';
19080
+ };
19081
+ export type UpdateJobFormAssignmentTaskErrors = {
19082
+ /**
19083
+ * Bad Request
19084
+ */
19085
+ 400: Problem;
19086
+ /**
19087
+ * Forbidden
19088
+ */
19089
+ 403: Problem;
19090
+ /**
19091
+ * Not Found
19092
+ */
19093
+ 404: Problem;
19094
+ /**
19095
+ * Unprocessable Content
19096
+ */
19097
+ 422: Problem;
19098
+ };
19099
+ export type UpdateJobFormAssignmentTaskError = UpdateJobFormAssignmentTaskErrors[keyof UpdateJobFormAssignmentTaskErrors];
19100
+ export type UpdateJobFormAssignmentTaskResponses = {
19101
+ /**
19102
+ * Success
19103
+ */
19104
+ 200: JobFormAssignmentResponseObject;
19105
+ };
19106
+ export type UpdateJobFormAssignmentTaskResponse = UpdateJobFormAssignmentTaskResponses[keyof UpdateJobFormAssignmentTaskResponses];
17907
19107
  export type ListJobScopePricesData = {
17908
19108
  body?: never;
17909
19109
  path: {
@@ -18205,34 +19405,196 @@ export type CreateRateRuleErrors = {
18205
19405
  */
18206
19406
  403: Problem;
18207
19407
  /**
18208
- * Unprocessable Content
19408
+ * Unprocessable Content
19409
+ */
19410
+ 422: Problem;
19411
+ };
19412
+ export type CreateRateRuleError = CreateRateRuleErrors[keyof CreateRateRuleErrors];
19413
+ export type CreateRateRuleResponses = {
19414
+ /**
19415
+ * Created
19416
+ */
19417
+ 201: RateRuleResponseObject;
19418
+ };
19419
+ export type CreateRateRuleResponse = CreateRateRuleResponses[keyof CreateRateRuleResponses];
19420
+ export type GetRateRuleData = {
19421
+ body?: never;
19422
+ path: {
19423
+ job_id: string;
19424
+ wage_determination_id: string;
19425
+ id: string;
19426
+ };
19427
+ query?: {
19428
+ /**
19429
+ * Read the version valid at this point in time. Defaults to now.
19430
+ */
19431
+ 'as_of[valid]'?: string;
19432
+ };
19433
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules/{id}';
19434
+ };
19435
+ export type GetRateRuleErrors = {
19436
+ /**
19437
+ * Forbidden
19438
+ */
19439
+ 403: Problem;
19440
+ /**
19441
+ * Not Found
19442
+ */
19443
+ 404: Problem;
19444
+ };
19445
+ export type GetRateRuleError = GetRateRuleErrors[keyof GetRateRuleErrors];
19446
+ export type GetRateRuleResponses = {
19447
+ /**
19448
+ * Success
19449
+ */
19450
+ 200: RateRuleResponseObject;
19451
+ };
19452
+ export type GetRateRuleResponse = GetRateRuleResponses[keyof GetRateRuleResponses];
19453
+ export type ListJobSitesData = {
19454
+ body?: never;
19455
+ path: {
19456
+ job_id: string;
19457
+ };
19458
+ query?: {
19459
+ filter?: string;
19460
+ 'filter[unexpected]'?: string;
19461
+ /**
19462
+ * This pagination cursor corresponds to the cursor value found in the response in
19463
+ * `meta.page.next_cursor`.
19464
+ */
19465
+ 'page[cursor]'?: string;
19466
+ /**
19467
+ * Maximum number of records to return per page. Defaults to 20. A value above 100 is capped to 100 rather than rejected; a value that is zero, negative, or not an integer is rejected with a `400`.
19468
+ */
19469
+ 'page[limit]'?: number;
19470
+ page?: string;
19471
+ };
19472
+ url: '/api/v1/jobs/{job_id}/sites';
19473
+ };
19474
+ export type ListJobSitesErrors = {
19475
+ /**
19476
+ * Bad Request
19477
+ */
19478
+ 400: Problem;
19479
+ /**
19480
+ * Forbidden
19481
+ */
19482
+ 403: Problem;
19483
+ /**
19484
+ * Not Found
19485
+ */
19486
+ 404: Problem;
19487
+ };
19488
+ export type ListJobSitesError = ListJobSitesErrors[keyof ListJobSitesErrors];
19489
+ export type ListJobSitesResponses = {
19490
+ /**
19491
+ * Success
19492
+ */
19493
+ 200: JobSitesResponseObject;
19494
+ };
19495
+ export type ListJobSitesResponse = ListJobSitesResponses[keyof ListJobSitesResponses];
19496
+ export type CreateJobSiteData = {
19497
+ body: JobSiteParameters;
19498
+ path: {
19499
+ job_id: string;
19500
+ };
19501
+ query?: never;
19502
+ url: '/api/v1/jobs/{job_id}/sites';
19503
+ };
19504
+ export type CreateJobSiteErrors = {
19505
+ /**
19506
+ * Bad Request
19507
+ */
19508
+ 400: Problem;
19509
+ /**
19510
+ * Forbidden
19511
+ */
19512
+ 403: Problem;
19513
+ /**
19514
+ * Not Found
19515
+ */
19516
+ 404: Problem;
19517
+ /**
19518
+ * Unprocessable Content
19519
+ */
19520
+ 422: Problem;
19521
+ };
19522
+ export type CreateJobSiteError = CreateJobSiteErrors[keyof CreateJobSiteErrors];
19523
+ export type CreateJobSiteResponses = {
19524
+ /**
19525
+ * Created
19526
+ */
19527
+ 201: JobSiteResponseObject;
19528
+ };
19529
+ export type CreateJobSiteResponse = CreateJobSiteResponses[keyof CreateJobSiteResponses];
19530
+ export type DeleteJobSiteData = {
19531
+ body?: never;
19532
+ path: {
19533
+ job_id: string;
19534
+ id: string;
19535
+ };
19536
+ query?: never;
19537
+ url: '/api/v1/jobs/{job_id}/sites/{id}';
19538
+ };
19539
+ export type DeleteJobSiteErrors = {
19540
+ /**
19541
+ * Forbidden
19542
+ */
19543
+ 403: Problem;
19544
+ /**
19545
+ * Not Found
19546
+ */
19547
+ 404: Problem;
19548
+ };
19549
+ export type DeleteJobSiteError = DeleteJobSiteErrors[keyof DeleteJobSiteErrors];
19550
+ export type DeleteJobSiteResponses = {
19551
+ /**
19552
+ * No Content
19553
+ */
19554
+ 204: void;
19555
+ };
19556
+ export type DeleteJobSiteResponse = DeleteJobSiteResponses[keyof DeleteJobSiteResponses];
19557
+ export type GetJobSiteData = {
19558
+ body?: never;
19559
+ path: {
19560
+ job_id: string;
19561
+ id: string;
19562
+ };
19563
+ query?: never;
19564
+ url: '/api/v1/jobs/{job_id}/sites/{id}';
19565
+ };
19566
+ export type GetJobSiteErrors = {
19567
+ /**
19568
+ * Forbidden
19569
+ */
19570
+ 403: Problem;
19571
+ /**
19572
+ * Not Found
18209
19573
  */
18210
- 422: Problem;
19574
+ 404: Problem;
18211
19575
  };
18212
- export type CreateRateRuleError = CreateRateRuleErrors[keyof CreateRateRuleErrors];
18213
- export type CreateRateRuleResponses = {
19576
+ export type GetJobSiteError = GetJobSiteErrors[keyof GetJobSiteErrors];
19577
+ export type GetJobSiteResponses = {
18214
19578
  /**
18215
- * Created
19579
+ * Success
18216
19580
  */
18217
- 201: RateRuleResponseObject;
19581
+ 200: JobSiteResponseObject;
18218
19582
  };
18219
- export type CreateRateRuleResponse = CreateRateRuleResponses[keyof CreateRateRuleResponses];
18220
- export type GetRateRuleData = {
18221
- body?: never;
19583
+ export type GetJobSiteResponse = GetJobSiteResponses[keyof GetJobSiteResponses];
19584
+ export type UpdateJobSiteData = {
19585
+ body: JobSiteUpdateParameters;
18222
19586
  path: {
18223
19587
  job_id: string;
18224
- wage_determination_id: string;
18225
19588
  id: string;
18226
19589
  };
18227
- query?: {
18228
- /**
18229
- * Read the version valid at this point in time. Defaults to now.
18230
- */
18231
- 'as_of[valid]'?: string;
18232
- };
18233
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules/{id}';
19590
+ query?: never;
19591
+ url: '/api/v1/jobs/{job_id}/sites/{id}';
18234
19592
  };
18235
- export type GetRateRuleErrors = {
19593
+ export type UpdateJobSiteErrors = {
19594
+ /**
19595
+ * Bad Request
19596
+ */
19597
+ 400: Problem;
18236
19598
  /**
18237
19599
  * Forbidden
18238
19600
  */
@@ -18241,15 +19603,19 @@ export type GetRateRuleErrors = {
18241
19603
  * Not Found
18242
19604
  */
18243
19605
  404: Problem;
19606
+ /**
19607
+ * Unprocessable Content
19608
+ */
19609
+ 422: Problem;
18244
19610
  };
18245
- export type GetRateRuleError = GetRateRuleErrors[keyof GetRateRuleErrors];
18246
- export type GetRateRuleResponses = {
19611
+ export type UpdateJobSiteError = UpdateJobSiteErrors[keyof UpdateJobSiteErrors];
19612
+ export type UpdateJobSiteResponses = {
18247
19613
  /**
18248
19614
  * Success
18249
19615
  */
18250
- 200: RateRuleResponseObject;
19616
+ 200: JobSiteResponseObject;
18251
19617
  };
18252
- export type GetRateRuleResponse = GetRateRuleResponses[keyof GetRateRuleResponses];
19618
+ export type UpdateJobSiteResponse = UpdateJobSiteResponses[keyof UpdateJobSiteResponses];
18253
19619
  export type ShiftJobWageDeterminationGenesisData = {
18254
19620
  body: JobWageDeterminationGenesisParameters;
18255
19621
  headers: {
@@ -18789,6 +20155,14 @@ export type ListJobsData = {
18789
20155
  * Returns jobs in the given project and all of its descendant projects
18790
20156
  */
18791
20157
  'filter[project_id]'?: string;
20158
+ /**
20159
+ * Returns jobs assigned to this provider-company department. Retrieve department IDs from GET /api/v1/companies/departments.
20160
+ */
20161
+ 'filter[companies_department_id]'?: string;
20162
+ /**
20163
+ * Use true for jobs without a department or false for jobs with a department. Use this instead of the department ID filter.
20164
+ */
20165
+ 'filter[companies_department_id][null]'?: boolean;
18792
20166
  /**
18793
20167
  * Returns jobs whose status is any of the given values. Comma-separate to match multiple (e.g. `ready,completed`). Accepts each concrete status (pending_provider, pending_schedule, pending_workers, ready, disputed, completed, cancelled) plus the aggregates `pending` (any pending_* status) and `active` (ready or disputed).
18794
20168
  */
@@ -19049,14 +20423,292 @@ export type GetSiteCheckInErrors = {
19049
20423
  */
19050
20424
  404: Problem;
19051
20425
  };
19052
- export type GetSiteCheckInError = GetSiteCheckInErrors[keyof GetSiteCheckInErrors];
19053
- export type GetSiteCheckInResponses = {
20426
+ export type GetSiteCheckInError = GetSiteCheckInErrors[keyof GetSiteCheckInErrors];
20427
+ export type GetSiteCheckInResponses = {
20428
+ /**
20429
+ * Success
20430
+ */
20431
+ 200: SiteCheckInResponseObject;
20432
+ };
20433
+ export type GetSiteCheckInResponse = GetSiteCheckInResponses[keyof GetSiteCheckInResponses];
20434
+ export type ListFeatureFormAssignmentTasksData = {
20435
+ body?: never;
20436
+ path: {
20437
+ site_id: string;
20438
+ feature_id: string;
20439
+ };
20440
+ query?: {
20441
+ /**
20442
+ * This pagination cursor corresponds to the cursor value found in the response in
20443
+ * `meta.page.next_cursor`.
20444
+ */
20445
+ 'page[cursor]'?: string;
20446
+ /**
20447
+ * Maximum number of records to return per page. Defaults to 20. A value above 100 is capped to 100 rather than rejected; a value that is zero, negative, or not an integer is rejected with a `400`.
20448
+ */
20449
+ 'page[limit]'?: number;
20450
+ page?: string;
20451
+ };
20452
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks';
20453
+ };
20454
+ export type ListFeatureFormAssignmentTasksErrors = {
20455
+ /**
20456
+ * Bad Request
20457
+ */
20458
+ 400: Problem;
20459
+ /**
20460
+ * Forbidden
20461
+ */
20462
+ 403: Problem;
20463
+ /**
20464
+ * Not Found
20465
+ */
20466
+ 404: Problem;
20467
+ };
20468
+ export type ListFeatureFormAssignmentTasksError = ListFeatureFormAssignmentTasksErrors[keyof ListFeatureFormAssignmentTasksErrors];
20469
+ export type ListFeatureFormAssignmentTasksResponses = {
20470
+ /**
20471
+ * Success
20472
+ */
20473
+ 200: {
20474
+ meta: Meta;
20475
+ links: Links;
20476
+ data: Array<FeatureFormAssignmentResponseObject>;
20477
+ };
20478
+ };
20479
+ export type ListFeatureFormAssignmentTasksResponse = ListFeatureFormAssignmentTasksResponses[keyof ListFeatureFormAssignmentTasksResponses];
20480
+ export type CreateFeatureFormAssignmentTaskData = {
20481
+ body: FeatureFormAssignmentParameters;
20482
+ path: {
20483
+ site_id: string;
20484
+ feature_id: string;
20485
+ };
20486
+ query?: never;
20487
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks';
20488
+ };
20489
+ export type CreateFeatureFormAssignmentTaskErrors = {
20490
+ /**
20491
+ * Bad Request
20492
+ */
20493
+ 400: Problem;
20494
+ /**
20495
+ * Forbidden
20496
+ */
20497
+ 403: Problem;
20498
+ /**
20499
+ * Not Found
20500
+ */
20501
+ 404: Problem;
20502
+ /**
20503
+ * Unprocessable Content
20504
+ */
20505
+ 422: Problem;
20506
+ };
20507
+ export type CreateFeatureFormAssignmentTaskError = CreateFeatureFormAssignmentTaskErrors[keyof CreateFeatureFormAssignmentTaskErrors];
20508
+ export type CreateFeatureFormAssignmentTaskResponses = {
20509
+ /**
20510
+ * Created
20511
+ */
20512
+ 201: FeatureFormAssignmentResponseObject;
20513
+ };
20514
+ export type CreateFeatureFormAssignmentTaskResponse = CreateFeatureFormAssignmentTaskResponses[keyof CreateFeatureFormAssignmentTaskResponses];
20515
+ export type GetFeatureFormAssignmentTaskData = {
20516
+ body?: never;
20517
+ path: {
20518
+ site_id: string;
20519
+ feature_id: string;
20520
+ id: string;
20521
+ };
20522
+ query?: never;
20523
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks/{id}';
20524
+ };
20525
+ export type GetFeatureFormAssignmentTaskErrors = {
20526
+ /**
20527
+ * Forbidden
20528
+ */
20529
+ 403: Problem;
20530
+ /**
20531
+ * Not Found
20532
+ */
20533
+ 404: Problem;
20534
+ };
20535
+ export type GetFeatureFormAssignmentTaskError = GetFeatureFormAssignmentTaskErrors[keyof GetFeatureFormAssignmentTaskErrors];
20536
+ export type GetFeatureFormAssignmentTaskResponses = {
20537
+ /**
20538
+ * Success
20539
+ */
20540
+ 200: FeatureFormAssignmentResponseObject;
20541
+ };
20542
+ export type GetFeatureFormAssignmentTaskResponse = GetFeatureFormAssignmentTaskResponses[keyof GetFeatureFormAssignmentTaskResponses];
20543
+ export type UpdateFeatureFormAssignmentTaskData = {
20544
+ body: FeatureFormAssignmentUpdateParameters;
20545
+ path: {
20546
+ site_id: string;
20547
+ feature_id: string;
20548
+ id: string;
20549
+ };
20550
+ query?: never;
20551
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks/{id}';
20552
+ };
20553
+ export type UpdateFeatureFormAssignmentTaskErrors = {
20554
+ /**
20555
+ * Bad Request
20556
+ */
20557
+ 400: Problem;
20558
+ /**
20559
+ * Forbidden
20560
+ */
20561
+ 403: Problem;
20562
+ /**
20563
+ * Not Found
20564
+ */
20565
+ 404: Problem;
20566
+ };
20567
+ export type UpdateFeatureFormAssignmentTaskError = UpdateFeatureFormAssignmentTaskErrors[keyof UpdateFeatureFormAssignmentTaskErrors];
20568
+ export type UpdateFeatureFormAssignmentTaskResponses = {
20569
+ /**
20570
+ * Success
20571
+ */
20572
+ 200: FeatureFormAssignmentResponseObject;
20573
+ };
20574
+ export type UpdateFeatureFormAssignmentTaskResponse = UpdateFeatureFormAssignmentTaskResponses[keyof UpdateFeatureFormAssignmentTaskResponses];
20575
+ export type ListSiteFormAssignmentTasksData = {
20576
+ body?: never;
20577
+ path: {
20578
+ site_id: string;
20579
+ };
20580
+ query?: {
20581
+ /**
20582
+ * This pagination cursor corresponds to the cursor value found in the response in
20583
+ * `meta.page.next_cursor`.
20584
+ */
20585
+ 'page[cursor]'?: string;
20586
+ /**
20587
+ * Maximum number of records to return per page. Defaults to 20. A value above 100 is capped to 100 rather than rejected; a value that is zero, negative, or not an integer is rejected with a `400`.
20588
+ */
20589
+ 'page[limit]'?: number;
20590
+ page?: string;
20591
+ };
20592
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks';
20593
+ };
20594
+ export type ListSiteFormAssignmentTasksErrors = {
20595
+ /**
20596
+ * Bad Request
20597
+ */
20598
+ 400: Problem;
20599
+ /**
20600
+ * Forbidden
20601
+ */
20602
+ 403: Problem;
20603
+ /**
20604
+ * Not Found
20605
+ */
20606
+ 404: Problem;
20607
+ };
20608
+ export type ListSiteFormAssignmentTasksError = ListSiteFormAssignmentTasksErrors[keyof ListSiteFormAssignmentTasksErrors];
20609
+ export type ListSiteFormAssignmentTasksResponses = {
20610
+ /**
20611
+ * Success
20612
+ */
20613
+ 200: {
20614
+ meta: Meta;
20615
+ links: Links;
20616
+ data: Array<SiteFormAssignmentResponseObject>;
20617
+ };
20618
+ };
20619
+ export type ListSiteFormAssignmentTasksResponse = ListSiteFormAssignmentTasksResponses[keyof ListSiteFormAssignmentTasksResponses];
20620
+ export type CreateSiteFormAssignmentTaskData = {
20621
+ body: SiteFormAssignmentParameters;
20622
+ path: {
20623
+ site_id: string;
20624
+ };
20625
+ query?: never;
20626
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks';
20627
+ };
20628
+ export type CreateSiteFormAssignmentTaskErrors = {
20629
+ /**
20630
+ * Bad Request
20631
+ */
20632
+ 400: Problem;
20633
+ /**
20634
+ * Forbidden
20635
+ */
20636
+ 403: Problem;
20637
+ /**
20638
+ * Not Found
20639
+ */
20640
+ 404: Problem;
20641
+ /**
20642
+ * Unprocessable Content
20643
+ */
20644
+ 422: Problem;
20645
+ };
20646
+ export type CreateSiteFormAssignmentTaskError = CreateSiteFormAssignmentTaskErrors[keyof CreateSiteFormAssignmentTaskErrors];
20647
+ export type CreateSiteFormAssignmentTaskResponses = {
20648
+ /**
20649
+ * Created
20650
+ */
20651
+ 201: SiteFormAssignmentResponseObject;
20652
+ };
20653
+ export type CreateSiteFormAssignmentTaskResponse = CreateSiteFormAssignmentTaskResponses[keyof CreateSiteFormAssignmentTaskResponses];
20654
+ export type GetSiteFormAssignmentTaskData = {
20655
+ body?: never;
20656
+ path: {
20657
+ site_id: string;
20658
+ id: string;
20659
+ };
20660
+ query?: never;
20661
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks/{id}';
20662
+ };
20663
+ export type GetSiteFormAssignmentTaskErrors = {
20664
+ /**
20665
+ * Forbidden
20666
+ */
20667
+ 403: Problem;
20668
+ /**
20669
+ * Not Found
20670
+ */
20671
+ 404: Problem;
20672
+ };
20673
+ export type GetSiteFormAssignmentTaskError = GetSiteFormAssignmentTaskErrors[keyof GetSiteFormAssignmentTaskErrors];
20674
+ export type GetSiteFormAssignmentTaskResponses = {
20675
+ /**
20676
+ * Success
20677
+ */
20678
+ 200: SiteFormAssignmentResponseObject;
20679
+ };
20680
+ export type GetSiteFormAssignmentTaskResponse = GetSiteFormAssignmentTaskResponses[keyof GetSiteFormAssignmentTaskResponses];
20681
+ export type UpdateSiteFormAssignmentTaskData = {
20682
+ body: SiteFormAssignmentUpdateParameters;
20683
+ path: {
20684
+ site_id: string;
20685
+ id: string;
20686
+ };
20687
+ query?: never;
20688
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks/{id}';
20689
+ };
20690
+ export type UpdateSiteFormAssignmentTaskErrors = {
20691
+ /**
20692
+ * Bad Request
20693
+ */
20694
+ 400: Problem;
20695
+ /**
20696
+ * Forbidden
20697
+ */
20698
+ 403: Problem;
20699
+ /**
20700
+ * Not Found
20701
+ */
20702
+ 404: Problem;
20703
+ };
20704
+ export type UpdateSiteFormAssignmentTaskError = UpdateSiteFormAssignmentTaskErrors[keyof UpdateSiteFormAssignmentTaskErrors];
20705
+ export type UpdateSiteFormAssignmentTaskResponses = {
19054
20706
  /**
19055
20707
  * Success
19056
20708
  */
19057
- 200: SiteCheckInResponseObject;
20709
+ 200: SiteFormAssignmentResponseObject;
19058
20710
  };
19059
- export type GetSiteCheckInResponse = GetSiteCheckInResponses[keyof GetSiteCheckInResponses];
20711
+ export type UpdateSiteFormAssignmentTaskResponse = UpdateSiteFormAssignmentTaskResponses[keyof UpdateSiteFormAssignmentTaskResponses];
19060
20712
  export type ShiftOvertimeRuleGenesisData = {
19061
20713
  body: OvertimeRuleGenesisParameters;
19062
20714
  headers: {
@@ -20194,6 +21846,10 @@ export type ListPayRateRulePackagesData = {
20194
21846
  * Filter by whether users can select the package.
20195
21847
  */
20196
21848
  'filter[selectable]'?: boolean;
21849
+ /**
21850
+ * Fuzzy-matches the rule package name (trigram word-similarity). Matches the name column only.
21851
+ */
21852
+ 'filter[name]'?: string;
20197
21853
  'filter[created_at][gte]'?: string;
20198
21854
  'filter[created_at][lte]'?: string;
20199
21855
  'filter[updated_at][gte]'?: string;
@@ -21042,6 +22698,10 @@ export type CreateFringeBenefitPlanData = {
21042
22698
  url: '/api/v1/payrolls/fringe_benefit_plans';
21043
22699
  };
21044
22700
  export type CreateFringeBenefitPlanErrors = {
22701
+ /**
22702
+ * Bad Request
22703
+ */
22704
+ 400: Problem;
21045
22705
  /**
21046
22706
  * Forbidden
21047
22707
  */
@@ -21120,6 +22780,10 @@ export type UpdateFringeBenefitPlanData = {
21120
22780
  url: '/api/v1/payrolls/fringe_benefit_plans/{id}';
21121
22781
  };
21122
22782
  export type UpdateFringeBenefitPlanErrors = {
22783
+ /**
22784
+ * Bad Request
22785
+ */
22786
+ 400: Problem;
21123
22787
  /**
21124
22788
  * Forbidden
21125
22789
  */
@@ -21660,10 +23324,18 @@ export type CreatePaystubData = {
21660
23324
  url: '/api/v1/paystubs';
21661
23325
  };
21662
23326
  export type CreatePaystubErrors = {
23327
+ /**
23328
+ * Bad Request
23329
+ */
23330
+ 400: Problem;
21663
23331
  /**
21664
23332
  * Forbidden
21665
23333
  */
21666
23334
  403: Problem;
23335
+ /**
23336
+ * Not Found
23337
+ */
23338
+ 404: Problem;
21667
23339
  /**
21668
23340
  * Unprocessable Entity
21669
23341
  */
@@ -21751,6 +23423,10 @@ export type UpdatePaystubData = {
21751
23423
  url: '/api/v1/paystubs/{id}';
21752
23424
  };
21753
23425
  export type UpdatePaystubErrors = {
23426
+ /**
23427
+ * Bad Request
23428
+ */
23429
+ 400: Problem;
21754
23430
  /**
21755
23431
  * Forbidden
21756
23432
  */
@@ -21796,7 +23472,7 @@ export type ListCustomFieldsResponses = {
21796
23472
  * Success
21797
23473
  */
21798
23474
  200: {
21799
- data: Array<PeopleEmploymentCustomFieldResponseObject>;
23475
+ data: Array<CustomFieldResponseObject>;
21800
23476
  };
21801
23477
  };
21802
23478
  export type ListCustomFieldsResponse = ListCustomFieldsResponses[keyof ListCustomFieldsResponses];
@@ -21846,7 +23522,7 @@ export type UpdateCustomFieldResponses = {
21846
23522
  * Success
21847
23523
  */
21848
23524
  200: {
21849
- data: Array<PeopleEmploymentCustomFieldResponseObject>;
23525
+ data: Array<CustomFieldResponseObject>;
21850
23526
  };
21851
23527
  };
21852
23528
  export type UpdateCustomFieldResponse = UpdateCustomFieldResponses[keyof UpdateCustomFieldResponses];
@@ -22551,6 +24227,10 @@ export type CreatePerDiemErrors = {
22551
24227
  * Forbidden
22552
24228
  */
22553
24229
  403: Problem;
24230
+ /**
24231
+ * Not Found
24232
+ */
24233
+ 404: Problem;
22554
24234
  /**
22555
24235
  * Unprocessable Content
22556
24236
  */
@@ -22956,7 +24636,7 @@ export type GetCompletionResponses = {
22956
24636
  };
22957
24637
  export type GetCompletionResponse = GetCompletionResponses[keyof GetCompletionResponses];
22958
24638
  export type UpdateCompletionData = {
22959
- body?: ProductionCompletionParameters;
24639
+ body?: ProductionCompletionUpdateParameters;
22960
24640
  path: {
22961
24641
  id: string;
22962
24642
  };
@@ -22964,6 +24644,10 @@ export type UpdateCompletionData = {
22964
24644
  url: '/api/v1/production/completions/{id}';
22965
24645
  };
22966
24646
  export type UpdateCompletionErrors = {
24647
+ /**
24648
+ * Bad Request (create-only lookup)
24649
+ */
24650
+ 400: Problem;
22967
24651
  /**
22968
24652
  * Forbidden
22969
24653
  */
@@ -23015,6 +24699,174 @@ export type CreateProjectTradeResponses = {
23015
24699
  201: PwaTradeResponseObject;
23016
24700
  };
23017
24701
  export type CreateProjectTradeResponse = CreateProjectTradeResponses[keyof CreateProjectTradeResponses];
24702
+ export type ListProjectSitesData = {
24703
+ body?: never;
24704
+ path: {
24705
+ project_id: string;
24706
+ };
24707
+ query?: {
24708
+ /**
24709
+ * This pagination cursor corresponds to the cursor value found in the response in
24710
+ * `meta.page.next_cursor`.
24711
+ */
24712
+ 'page[cursor]'?: string;
24713
+ /**
24714
+ * Maximum number of records to return per page. Defaults to 20. A value above 100 is capped to 100 rather than rejected; a value that is zero, negative, or not an integer is rejected with a `400`.
24715
+ */
24716
+ 'page[limit]'?: number;
24717
+ page?: string;
24718
+ };
24719
+ url: '/api/v1/projects/{project_id}/sites';
24720
+ };
24721
+ export type ListProjectSitesErrors = {
24722
+ /**
24723
+ * Bad Request
24724
+ */
24725
+ 400: Problem;
24726
+ /**
24727
+ * Forbidden
24728
+ */
24729
+ 403: Problem;
24730
+ /**
24731
+ * Not Found
24732
+ */
24733
+ 404: Problem;
24734
+ };
24735
+ export type ListProjectSitesError = ListProjectSitesErrors[keyof ListProjectSitesErrors];
24736
+ export type ListProjectSitesResponses = {
24737
+ /**
24738
+ * Success
24739
+ */
24740
+ 200: {
24741
+ meta: Meta;
24742
+ links: Links;
24743
+ data: Array<ProjectSiteResponseObject>;
24744
+ };
24745
+ };
24746
+ export type ListProjectSitesResponse = ListProjectSitesResponses[keyof ListProjectSitesResponses];
24747
+ export type CreateProjectSiteData = {
24748
+ body: ProjectSiteParameters;
24749
+ path: {
24750
+ project_id: string;
24751
+ };
24752
+ query?: never;
24753
+ url: '/api/v1/projects/{project_id}/sites';
24754
+ };
24755
+ export type CreateProjectSiteErrors = {
24756
+ /**
24757
+ * Bad Request
24758
+ */
24759
+ 400: Problem;
24760
+ /**
24761
+ * Forbidden
24762
+ */
24763
+ 403: Problem;
24764
+ /**
24765
+ * Not Found
24766
+ */
24767
+ 404: Problem;
24768
+ /**
24769
+ * Unprocessable Content
24770
+ */
24771
+ 422: Problem;
24772
+ };
24773
+ export type CreateProjectSiteError = CreateProjectSiteErrors[keyof CreateProjectSiteErrors];
24774
+ export type CreateProjectSiteResponses = {
24775
+ /**
24776
+ * Created
24777
+ */
24778
+ 201: ProjectSiteResponseObject;
24779
+ };
24780
+ export type CreateProjectSiteResponse = CreateProjectSiteResponses[keyof CreateProjectSiteResponses];
24781
+ export type DeleteProjectSiteData = {
24782
+ body?: never;
24783
+ path: {
24784
+ project_id: string;
24785
+ id: string;
24786
+ };
24787
+ query?: never;
24788
+ url: '/api/v1/projects/{project_id}/sites/{id}';
24789
+ };
24790
+ export type DeleteProjectSiteErrors = {
24791
+ /**
24792
+ * Forbidden
24793
+ */
24794
+ 403: Problem;
24795
+ /**
24796
+ * Not Found
24797
+ */
24798
+ 404: Problem;
24799
+ };
24800
+ export type DeleteProjectSiteError = DeleteProjectSiteErrors[keyof DeleteProjectSiteErrors];
24801
+ export type DeleteProjectSiteResponses = {
24802
+ /**
24803
+ * No Content
24804
+ */
24805
+ 204: void;
24806
+ };
24807
+ export type DeleteProjectSiteResponse = DeleteProjectSiteResponses[keyof DeleteProjectSiteResponses];
24808
+ export type GetProjectSiteData = {
24809
+ body?: never;
24810
+ path: {
24811
+ project_id: string;
24812
+ id: string;
24813
+ };
24814
+ query?: never;
24815
+ url: '/api/v1/projects/{project_id}/sites/{id}';
24816
+ };
24817
+ export type GetProjectSiteErrors = {
24818
+ /**
24819
+ * Forbidden
24820
+ */
24821
+ 403: Problem;
24822
+ /**
24823
+ * Not Found
24824
+ */
24825
+ 404: Problem;
24826
+ };
24827
+ export type GetProjectSiteError = GetProjectSiteErrors[keyof GetProjectSiteErrors];
24828
+ export type GetProjectSiteResponses = {
24829
+ /**
24830
+ * Success
24831
+ */
24832
+ 200: ProjectSiteResponseObject;
24833
+ };
24834
+ export type GetProjectSiteResponse = GetProjectSiteResponses[keyof GetProjectSiteResponses];
24835
+ export type UpdateProjectSiteData = {
24836
+ body: ProjectSiteUpdateParameters;
24837
+ path: {
24838
+ project_id: string;
24839
+ id: string;
24840
+ };
24841
+ query?: never;
24842
+ url: '/api/v1/projects/{project_id}/sites/{id}';
24843
+ };
24844
+ export type UpdateProjectSiteErrors = {
24845
+ /**
24846
+ * Bad Request
24847
+ */
24848
+ 400: Problem;
24849
+ /**
24850
+ * Forbidden
24851
+ */
24852
+ 403: Problem;
24853
+ /**
24854
+ * Not Found
24855
+ */
24856
+ 404: Problem;
24857
+ /**
24858
+ * Unprocessable Content
24859
+ */
24860
+ 422: Problem;
24861
+ };
24862
+ export type UpdateProjectSiteError = UpdateProjectSiteErrors[keyof UpdateProjectSiteErrors];
24863
+ export type UpdateProjectSiteResponses = {
24864
+ /**
24865
+ * Success
24866
+ */
24867
+ 200: ProjectSiteResponseObject;
24868
+ };
24869
+ export type UpdateProjectSiteResponse = UpdateProjectSiteResponses[keyof UpdateProjectSiteResponses];
23018
24870
  export type ListProjectsData = {
23019
24871
  body?: never;
23020
24872
  path?: never;
@@ -23372,6 +25224,33 @@ export type DeleteApprenticeshipOccupationResponses = {
23372
25224
  200: PwaTradeApprenticeshipOccupationResponseObject;
23373
25225
  };
23374
25226
  export type DeleteApprenticeshipOccupationResponse = DeleteApprenticeshipOccupationResponses[keyof DeleteApprenticeshipOccupationResponses];
25227
+ export type GetApprenticeshipOccupationData = {
25228
+ body?: never;
25229
+ path: {
25230
+ trade_id: string;
25231
+ id: string;
25232
+ };
25233
+ query?: never;
25234
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}';
25235
+ };
25236
+ export type GetApprenticeshipOccupationErrors = {
25237
+ /**
25238
+ * Forbidden
25239
+ */
25240
+ 403: Problem;
25241
+ /**
25242
+ * Not Found
25243
+ */
25244
+ 404: Problem;
25245
+ };
25246
+ export type GetApprenticeshipOccupationError = GetApprenticeshipOccupationErrors[keyof GetApprenticeshipOccupationErrors];
25247
+ export type GetApprenticeshipOccupationResponses = {
25248
+ /**
25249
+ * Success
25250
+ */
25251
+ 200: PwaTradeApprenticeshipOccupationResponseObject;
25252
+ };
25253
+ export type GetApprenticeshipOccupationResponse = GetApprenticeshipOccupationResponses[keyof GetApprenticeshipOccupationResponses];
23375
25254
  export type UpdateApprenticeshipOccupationData = {
23376
25255
  body: PwaTradeApprenticeshipOccupationUpdateParameters;
23377
25256
  path: {
@@ -24238,6 +26117,41 @@ export type GetPriorPeriodAdjustmentResponses = {
24238
26117
  200: PriorPeriodAdjustmentResponseObject;
24239
26118
  };
24240
26119
  export type GetPriorPeriodAdjustmentResponse = GetPriorPeriodAdjustmentResponses[keyof GetPriorPeriodAdjustmentResponses];
26120
+ export type UpdatePriorPeriodAdjustmentData = {
26121
+ body: PriorPeriodAdjustmentUpdateParameters;
26122
+ path: {
26123
+ time_card_id: string;
26124
+ id: string;
26125
+ };
26126
+ query?: never;
26127
+ url: '/api/v1/time_cards/{time_card_id}/prior_period_adjustments/{id}';
26128
+ };
26129
+ export type UpdatePriorPeriodAdjustmentErrors = {
26130
+ /**
26131
+ * Bad Request
26132
+ */
26133
+ 400: Problem;
26134
+ /**
26135
+ * Forbidden
26136
+ */
26137
+ 403: Problem;
26138
+ /**
26139
+ * Not Found
26140
+ */
26141
+ 404: Problem;
26142
+ /**
26143
+ * Unprocessable Content
26144
+ */
26145
+ 422: Problem;
26146
+ };
26147
+ export type UpdatePriorPeriodAdjustmentError = UpdatePriorPeriodAdjustmentErrors[keyof UpdatePriorPeriodAdjustmentErrors];
26148
+ export type UpdatePriorPeriodAdjustmentResponses = {
26149
+ /**
26150
+ * Success
26151
+ */
26152
+ 200: PriorPeriodAdjustmentResponseObject;
26153
+ };
26154
+ export type UpdatePriorPeriodAdjustmentResponse = UpdatePriorPeriodAdjustmentResponses[keyof UpdatePriorPeriodAdjustmentResponses];
24241
26155
  export type ListPwaCompliancesData = {
24242
26156
  body?: never;
24243
26157
  path: {
@@ -24518,6 +26432,10 @@ export type CreateTimeEntryErrors = {
24518
26432
  * Forbidden
24519
26433
  */
24520
26434
  403: Problem;
26435
+ /**
26436
+ * Not Found
26437
+ */
26438
+ 404: Problem;
24521
26439
  /**
24522
26440
  * Unprocessable Content
24523
26441
  */
@@ -25585,6 +27503,38 @@ export type ListPayPeriodConfigsResponses = {
25585
27503
  };
25586
27504
  };
25587
27505
  export type ListPayPeriodConfigsResponse = ListPayPeriodConfigsResponses[keyof ListPayPeriodConfigsResponses];
27506
+ export type CreatePayPeriodConfigData = {
27507
+ body: PayPeriodConfigParameters;
27508
+ path?: never;
27509
+ query?: never;
27510
+ url: '/api/v1/timekeeping/pay_period_configs';
27511
+ };
27512
+ export type CreatePayPeriodConfigErrors = {
27513
+ /**
27514
+ * Bad Request
27515
+ */
27516
+ 400: Problem;
27517
+ /**
27518
+ * Forbidden
27519
+ */
27520
+ 403: Problem;
27521
+ /**
27522
+ * Pay schedule already exists
27523
+ */
27524
+ 409: Problem;
27525
+ /**
27526
+ * Invalid configuration
27527
+ */
27528
+ 422: Problem;
27529
+ };
27530
+ export type CreatePayPeriodConfigError = CreatePayPeriodConfigErrors[keyof CreatePayPeriodConfigErrors];
27531
+ export type CreatePayPeriodConfigResponses = {
27532
+ /**
27533
+ * Created
27534
+ */
27535
+ 201: PayPeriodConfigResponseObject;
27536
+ };
27537
+ export type CreatePayPeriodConfigResponse = CreatePayPeriodConfigResponses[keyof CreatePayPeriodConfigResponses];
25588
27538
  export type GetPayPeriodConfigData = {
25589
27539
  body?: never;
25590
27540
  path: {
@@ -26179,6 +28129,10 @@ export type UpdateCompanyData = {
26179
28129
  url: '/api/v1/users/{user_id}/companies/{company_id}';
26180
28130
  };
26181
28131
  export type UpdateCompanyErrors = {
28132
+ /**
28133
+ * Bad Request
28134
+ */
28135
+ 400: Problem;
26182
28136
  /**
26183
28137
  * Forbidden
26184
28138
  */
@@ -26208,6 +28162,10 @@ export type ListUsersData = {
26208
28162
  * Filter users by their employment lifecycle in the company, the same vocabulary `employment_state` publishes on each user. Defaults to `active` (an employment in effect now); `scheduled` returns employments that have not begun; `terminated` returns employments that have ended, with nothing current and nothing upcoming; `none` returns people your company sees without employing, which is its role holders and its invitees; `all` returns everyone your company sees.
26209
28163
  */
26210
28164
  'filter[state]'?: 'active' | 'scheduled' | 'terminated' | 'none' | 'all';
28165
+ /**
28166
+ * Fuzzy-matches the person name (trigram word-similarity). Matches the name column only — not email or phone.
28167
+ */
28168
+ 'filter[name]'?: string;
26211
28169
  /**
26212
28170
  * This pagination cursor corresponds to the cursor value found in the response in
26213
28171
  * `meta.page.next_cursor`.
@@ -26319,6 +28277,10 @@ export type UpdateUserData = {
26319
28277
  url: '/api/v1/users/{id}';
26320
28278
  };
26321
28279
  export type UpdateUserErrors = {
28280
+ /**
28281
+ * Bad Request
28282
+ */
28283
+ 400: Problem;
26322
28284
  /**
26323
28285
  * Forbidden
26324
28286
  */