@dsptch-work/api-client 0.13.0 → 0.14.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.
@@ -154,6 +154,12 @@ export type Problem = {
154
154
  *
155
155
  * The API key lacks the scope grant for this endpoint and verb. Grant the required scope to the key and retry.
156
156
  *
157
+ * ### user_scoped_key_required
158
+ *
159
+ * **User-Scoped Key Required**
160
+ *
161
+ * The endpoint records which person performed the action, so it needs a credential that names one. The presented key is scoped to the company itself. Retry with a user-scoped API key; no additional scope grant makes a company-scoped key acceptable here.
162
+ *
157
163
  * ## 404
158
164
  *
159
165
  * ### not_found
@@ -345,7 +351,7 @@ export type Problem = {
345
351
  * 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.
346
352
  *
347
353
  */
348
- 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' | 'not_found' | 'already_terminated' | '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';
354
+ 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' | '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';
349
355
  export type ApiKeyScopeResponseObject = {
350
356
  resource: string;
351
357
  action: 'read' | 'create' | 'update' | 'delete';
@@ -358,7 +364,7 @@ export type DirectUploadParameters = {
358
364
  /**
359
365
  * What the file is for, named as the endpoint that will attach it (for example `assets.vendors`). Required. It decides where the file is stored, and the signed ID this call returns is issued for that resource alone — it will not resolve at any other endpoint, so a vendor logo cannot be attached as an avatar, or an avatar as a logo.
360
366
  */
361
- resource: 'assets.items' | 'assets.items.documents' | 'assets.items.service_events' | 'assets.products' | 'assets.vendors' | 'users';
367
+ resource: 'assets.items' | 'assets.items.documents' | 'assets.items.service_events' | 'assets.products' | 'assets.vendors' | 'pay_periods.imports.time_entries' | 'users';
362
368
  /**
363
369
  * Metadata describing the file being registered, before its bytes are uploaded.
364
370
  */
@@ -2457,6 +2463,66 @@ export type PwaTradeParameters = {
2457
2463
  */
2458
2464
  name: string;
2459
2465
  };
2466
+ /**
2467
+ * Parameters for renaming a PWA trade (craft). Renaming edits the display label only — the craft's match key and every determination grouped under it are untouched.
2468
+ */
2469
+ export type PwaTradeUpdateParameters = {
2470
+ /**
2471
+ * New display name for the craft, e.g. "Electrician".
2472
+ */
2473
+ name?: string;
2474
+ };
2475
+ /**
2476
+ * A reviewed apprentice-scope decision pairing a registered apprenticeship occupation with a craft (trade). The row's existence means the pair was reviewed; scope_status carries the verdict. A pair with no row is undecided and denies apprentice treatment.
2477
+ */
2478
+ export type PwaTradeApprenticeshipOccupationResponseObject = {
2479
+ /**
2480
+ * Unique identifier.
2481
+ */
2482
+ id: string;
2483
+ /**
2484
+ * ID of the craft (trade) this decision applies to.
2485
+ */
2486
+ pwa_trade_id: string;
2487
+ /**
2488
+ * ID of the registered apprenticeship occupation this decision applies to.
2489
+ */
2490
+ apprenticeship_occupation_id: string;
2491
+ /**
2492
+ * The verdict — in_scope grants apprentice treatment for hours charged to this craft; out_of_scope denies it and stops the pair prompting for review.
2493
+ */
2494
+ scope_status: 'in_scope' | 'out_of_scope';
2495
+ /**
2496
+ * When the record was created (ISO 8601).
2497
+ */
2498
+ created_at: string;
2499
+ /**
2500
+ * When the record was last updated (ISO 8601).
2501
+ */
2502
+ updated_at: string;
2503
+ };
2504
+ /**
2505
+ * Parameters for recording an apprentice-scope decision on a trade.
2506
+ */
2507
+ export type PwaTradeApprenticeshipOccupationCreateParameters = {
2508
+ /**
2509
+ * ID of the registered apprenticeship occupation to decide on. Create-only — a decision is replaced rather than re-pointed to a different occupation.
2510
+ */
2511
+ apprenticeship_occupation_id: string;
2512
+ /**
2513
+ * The verdict to record; defaults to in_scope when omitted or null.
2514
+ */
2515
+ scope_status?: 'in_scope' | 'out_of_scope' | null;
2516
+ };
2517
+ /**
2518
+ * Parameters for flipping an existing apprentice-scope decision's verdict.
2519
+ */
2520
+ export type PwaTradeApprenticeshipOccupationUpdateParameters = {
2521
+ /**
2522
+ * The verdict to record. Null states nothing, so it leaves the decision's current verdict standing.
2523
+ */
2524
+ scope_status?: 'in_scope' | 'out_of_scope' | null;
2525
+ };
2460
2526
  /**
2461
2527
  * A job — the primary unit of work in DSPTCH. Workers fill its positions and track time against it; it optionally tracks Prevailing Wage / Apprenticeship (PWA) compliance and optionally belongs to a project. There is no delete endpoint — cancel or complete a job through its status instead.
2462
2528
  */
@@ -4512,6 +4578,75 @@ export type PayPeriodsResponseObject = {
4512
4578
  updated_at: string;
4513
4579
  }>;
4514
4580
  };
4581
+ /**
4582
+ * One problem found while processing an accepted import.
4583
+ */
4584
+ export type TimeEntryImportProcessingError = {
4585
+ /**
4586
+ * What went wrong, as a stable slug — `no_active_employee`, `time_overlap` and so on. `internal_error` means the import failed on the server rather than on anything in the file; retry it, and contact support if it fails again.
4587
+ */
4588
+ code: string;
4589
+ /**
4590
+ * The file row the problem was found on. The header is row 1, so data rows start at 2; a problem with the file as a whole rather than with one row is also reported against row 1. Null only on `internal_error`.
4591
+ */
4592
+ row: number | null;
4593
+ /**
4594
+ * The column the problem was found in, named as the file's header. Null when the problem is with the row or the file as a whole rather than with one value.
4595
+ */
4596
+ column: string | null;
4597
+ /**
4598
+ * The values the code was raised against — which vary by code, so read them as a diagnostic rather than a fixed shape. `row` and `column` are not repeated here.
4599
+ */
4600
+ context: {
4601
+ [key: string]: unknown;
4602
+ };
4603
+ };
4604
+ /**
4605
+ * One bulk upload of time entries against a pay period, and how it turned out.
4606
+ */
4607
+ export type TimeEntryImportResponseObject = {
4608
+ /**
4609
+ * Unique identifier.
4610
+ */
4611
+ id: string;
4612
+ /**
4613
+ * The pay period the entries were imported against.
4614
+ */
4615
+ pay_period_id: string;
4616
+ /**
4617
+ * Where the import has got to. `pending` until the background job starts, then `success` or `failed`.
4618
+ */
4619
+ status: 'pending' | 'processing' | 'processed' | 'success' | 'failed';
4620
+ /**
4621
+ * How many rows passed validation and were prepared for writing. On a `success` import that is also how many rows were written. On a `failed` one it is not — the import writes all of its rows in a single transaction, so a failure part-way through undoes every write already made while this count still reports every row that had been prepared.
4622
+ */
4623
+ processed_rows_count: number;
4624
+ /**
4625
+ * Every problem found after the import was accepted, oldest row first; empty when there were none, and always empty while the import is `pending`.
4626
+ */
4627
+ processing_errors: Array<TimeEntryImportProcessingError>;
4628
+ /**
4629
+ * When processing finished; null while the import is still pending.
4630
+ */
4631
+ completed_at: string | null;
4632
+ /**
4633
+ * When the import was submitted.
4634
+ */
4635
+ created_at: string;
4636
+ /**
4637
+ * When the import was last modified.
4638
+ */
4639
+ updated_at: string;
4640
+ };
4641
+ /**
4642
+ * Submit a spreadsheet of time entries for a pay period. All seven of payroll_id, start_time, end_time, timecode, job_id, state and description must be present as column headers, or the file is refused naming the ones missing. Of those, payroll_id, start_time, end_time, timecode and state must also carry a value on every row. features, federal_labor_classification and regional_labor_classification are read when present. Header matching ignores case and treats spaces as underscores, and column order does not matter. Any other column is refused: a name this import does not read would be dropped without trace, so the file is rejected naming it rather than applied in part.
4643
+ */
4644
+ export type TimeEntryImportParameters = {
4645
+ /**
4646
+ * A signed_id from POST /api/v1/direct_uploads identifying the uploaded spreadsheet. Register the upload naming `pay_periods.imports.time_entries` — a signed_id issued for any other resource will not resolve here.
4647
+ */
4648
+ file_signed_id: string;
4649
+ };
4515
4650
  /**
4516
4651
  * A worker's time card for one pay period — the aggregation root for their tracked time, carrying approval and lock status alongside the period's rolled-up minutes and pay totals. One per worker per pay period.
4517
4652
  */
@@ -7544,7 +7679,7 @@ export type FederalJobWageDeterminationResponseObject = {
7544
7679
  */
7545
7680
  pwa_trade_id: string;
7546
7681
  /**
7547
- * ID of the overtime package whose rules apply to this determination, or null when none is set.
7682
+ * ID of the overtime package whose rules apply to this determination, or null when none is set. Not a versioned attribute: every version of the determination carries the same package, so this reads the same whatever point in time you ask for. The rules inside the package carry their own valid times.
7548
7683
  */
7549
7684
  overtime_package_id: string | null;
7550
7685
  /**
@@ -7609,7 +7744,7 @@ export type RegionalJobWageDeterminationResponseObject = {
7609
7744
  */
7610
7745
  pwa_trade_id: string;
7611
7746
  /**
7612
- * ID of the overtime package whose rules apply to this determination, or null when none is set.
7747
+ * ID of the overtime package whose rules apply to this determination, or null when none is set. Not a versioned attribute: every version of the determination carries the same package, so this reads the same whatever point in time you ask for. The rules inside the package carry their own valid times.
7613
7748
  */
7614
7749
  overtime_package_id: string | null;
7615
7750
  /**
@@ -7890,6 +8025,10 @@ export type RegionalJobWageDeterminationParameters = {
7890
8025
  * The DOL general wage determination the rates are drawn from — the general decision number plus its revision (e.g. "CA20230001/5"); null when not recorded.
7891
8026
  */
7892
8027
  general_wage_determination?: string | null;
8028
+ /**
8029
+ * Overtime package whose rules govern overtime on work under this determination. This is not a versioned attribute: setting it points every version at that package, not only the one this request writes, and `effective_from` does not date it. Send null to detach, leaving the determination with no overtime package of its own. Omit the key to leave the current attachment alone. A package belonging to another company is refused, and a Federal determination refuses one outright — only a Regional determination carries overtime rules.
8030
+ */
8031
+ overtime_package_id?: string | null;
7893
8032
  regional_fields?: RegionalWageDeterminationFields;
7894
8033
  };
7895
8034
  /**
@@ -7900,6 +8039,10 @@ export type JobWageDeterminationUpdateParameters = {
7900
8039
  * 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.
7901
8040
  */
7902
8041
  effective_from?: string;
8042
+ /**
8043
+ * Overtime package whose rules govern overtime on work under this determination. This is not a versioned attribute: setting it points every version at that package, not only the one this request writes, and `effective_from` does not date it. Send null to detach, leaving the determination with no overtime package of its own. Omit the key to leave the current attachment alone. A package belonging to another company is refused, and a Federal determination refuses one outright — only a Regional determination carries overtime rules.
8044
+ */
8045
+ overtime_package_id?: string | null;
7903
8046
  /**
7904
8047
  * Human-readable labor classification — the craft or trade this determination sets rates for; the display label, distinct from the machine class code.
7905
8048
  */
@@ -7942,10 +8085,6 @@ export type JobWageDeterminationScheduledChangeParameters = {
7942
8085
  * Human-readable labor classification — the craft or trade this determination sets rates for; the display label, distinct from the machine class code.
7943
8086
  */
7944
8087
  labor_classification?: string;
7945
- /**
7946
- * UUID of the craft grouping (trade) this determination pools into for apprenticeship-ratio tracking; obtain one from the job or project PWA trades endpoint before assigning it here.
7947
- */
7948
- pwa_trade_id?: string;
7949
8088
  /**
7950
8089
  * Base hourly wage rate, in cents as a decimal string (e.g. "5380.0" is $53.80).
7951
8090
  */
@@ -8169,6 +8308,212 @@ export type RateRuleHistoryVersionObject = {
8169
8308
  version_status: 'scheduled' | 'current' | 'historical';
8170
8309
  corrections: Array<RateRuleHistoryCorrectionObject>;
8171
8310
  };
8311
+ /**
8312
+ * An overtime rule (daily or weekly) belonging to an overtime package. It sets a pay multiplier that applies once a worked-hours threshold — and any day or date qualifier — is met. `valid_from`/`valid_to` bound the window this version is in effect.
8313
+ */
8314
+ export type OvertimeRuleResponseObject = {
8315
+ /**
8316
+ * The rule's identity, shared by every version of it. Addresses the rule itself rather than one of its versions; versions are told apart by their `valid_from`/`valid_to` windows.
8317
+ */
8318
+ id: string;
8319
+ /**
8320
+ * ID of the overtime package this rule belongs to, taken from the request path.
8321
+ */
8322
+ overtime_package_id: string;
8323
+ /**
8324
+ * The rule's cadence, as a class name: `DailyOvertimeRule` applies per day, `WeeklyOvertimeRule` per week.
8325
+ */
8326
+ type: 'DailyOvertimeRule' | 'WeeklyOvertimeRule';
8327
+ /**
8328
+ * The overtime pay multiplier: `one_x` = 1.0x (straight time), `one_five_x` = 1.5x, `two_x` = 2.0x.
8329
+ */
8330
+ rate_multiplier: 'one_x' | 'one_five_x' | 'two_x';
8331
+ /**
8332
+ * Two-letter US state code the rule is limited to, or null when it applies regardless of region.
8333
+ */
8334
+ region_id: string | null;
8335
+ /**
8336
+ * Whole hours that must be worked (daily or weekly per `type`) before the multiplier applies. Null when the rule has no hours threshold.
8337
+ */
8338
+ eligible_hours_worked: number | null;
8339
+ /**
8340
+ * Lowercase weekday name (e.g. `monday`) the rule is limited to, or null when it is not day-of-week specific.
8341
+ */
8342
+ specific_day_of_week: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | null;
8343
+ /**
8344
+ * A single calendar date (YYYY-MM-DD) the rule is limited to, or null when it is not date specific.
8345
+ */
8346
+ specific_date: string | null;
8347
+ /**
8348
+ * Valid time — when this version of the rule took effect (ISO 8601); null when the version has no recorded start.
8349
+ */
8350
+ valid_from: string | null;
8351
+ /**
8352
+ * Valid time — when this version stopped applying (ISO 8601); null while it is still current.
8353
+ */
8354
+ valid_to: string | null;
8355
+ /**
8356
+ * When the record was created (ISO 8601).
8357
+ */
8358
+ created_at: string | null;
8359
+ /**
8360
+ * When the record was last updated (ISO 8601).
8361
+ */
8362
+ updated_at: string | null;
8363
+ };
8364
+ export type OvertimeRuleHistoryCorrectionObject = {
8365
+ /**
8366
+ * Family key shared by every entry on this timeline — the same identity the member route addresses. An entry carries no identifier of its own; versions are distinguished by their window coordinates.
8367
+ */
8368
+ overtime_rule_id: string;
8369
+ overtime_package_id: string;
8370
+ type: 'DailyOvertimeRule' | 'WeeklyOvertimeRule';
8371
+ rate_multiplier: 'one_x' | 'one_five_x' | 'two_x';
8372
+ region_id: string | null;
8373
+ eligible_hours_worked: number | null;
8374
+ specific_day_of_week: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | null;
8375
+ specific_date: string | null;
8376
+ valid_from: string | null;
8377
+ valid_to: string | null;
8378
+ created_at: string | null;
8379
+ updated_at: string | null;
8380
+ };
8381
+ export type OvertimeRuleHistoryVersionObject = {
8382
+ /**
8383
+ * Family key shared by every entry on this timeline — the same identity the member route addresses. An entry carries no identifier of its own; versions are distinguished by their window coordinates.
8384
+ */
8385
+ overtime_rule_id: string;
8386
+ overtime_package_id: string;
8387
+ type: 'DailyOvertimeRule' | 'WeeklyOvertimeRule';
8388
+ rate_multiplier: 'one_x' | 'one_five_x' | 'two_x';
8389
+ region_id: string | null;
8390
+ eligible_hours_worked: number | null;
8391
+ specific_day_of_week: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | null;
8392
+ specific_date: string | null;
8393
+ valid_from: string | null;
8394
+ valid_to: string | null;
8395
+ created_at: string | null;
8396
+ updated_at: string | null;
8397
+ version_status: 'scheduled' | 'current' | 'historical';
8398
+ corrections: Array<OvertimeRuleHistoryCorrectionObject>;
8399
+ };
8400
+ /**
8401
+ * Create an overtime rule on the package. `type` and `rate_multiplier` are required; the qualifiers below are optional and describe when the multiplier applies.
8402
+ */
8403
+ export type OvertimeRuleParameters = {
8404
+ /**
8405
+ * 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.
8406
+ */
8407
+ effective_date?: string;
8408
+ /**
8409
+ * The rule's cadence, as a class name: `DailyOvertimeRule` (per day) or `WeeklyOvertimeRule` (per week).
8410
+ */
8411
+ type: 'DailyOvertimeRule' | 'WeeklyOvertimeRule';
8412
+ /**
8413
+ * The overtime pay multiplier: `one_x` = 1.0x, `one_five_x` = 1.5x, `two_x` = 2.0x.
8414
+ */
8415
+ rate_multiplier: 'one_x' | 'one_five_x' | 'two_x';
8416
+ /**
8417
+ * Two-letter US state code to limit the rule to, or null to apply regardless of region.
8418
+ */
8419
+ region_id?: string | null;
8420
+ /**
8421
+ * Whole hours that must be worked before the multiplier applies. Omitted or null is read as `0`, the same default the web form submits, which applies the multiplier to every minute the other qualifiers admit.
8422
+ */
8423
+ eligible_hours_worked?: number | null;
8424
+ /**
8425
+ * Lowercase weekday name (e.g. `monday`) to limit the rule to, or null. A value naming no weekday is refused with `422` rather than dropped.
8426
+ */
8427
+ specific_day_of_week?: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | null;
8428
+ /**
8429
+ * A single calendar date (YYYY-MM-DD) to limit the rule to, or null.
8430
+ */
8431
+ specific_date?: string | null;
8432
+ };
8433
+ /**
8434
+ * Edit the rule from a point in valid time forward. `type` is required, since it selects how the rule is compiled, and `rate_multiplier` carries forward when omitted. Everything describing *when* the multiplier applies — `region_id`, `eligible_hours_worked`, `specific_day_of_week`, `specific_date` — is recompiled from the body on every write, so omitting one drops it rather than keeping it. State the whole set of qualifiers you want, not just the ones you are changing.
8435
+ */
8436
+ export type OvertimeRuleUpdateParameters = {
8437
+ /**
8438
+ * 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.
8439
+ */
8440
+ effective_from?: string;
8441
+ /**
8442
+ * The rule's cadence, as a class name: `DailyOvertimeRule` (per day) or `WeeklyOvertimeRule` (per week).
8443
+ */
8444
+ type: 'DailyOvertimeRule' | 'WeeklyOvertimeRule';
8445
+ /**
8446
+ * The overtime pay multiplier: `one_x` = 1.0x, `one_five_x` = 1.5x, `two_x` = 2.0x.
8447
+ */
8448
+ rate_multiplier?: 'one_x' | 'one_five_x' | 'two_x';
8449
+ /**
8450
+ * Two-letter US state code to limit the rule to, or null to apply regardless of region.
8451
+ */
8452
+ region_id?: string | null;
8453
+ /**
8454
+ * Whole hours that must be worked before the multiplier applies. Omitted or null is read as `0`, the same default the web form submits, which applies the multiplier to every minute the other qualifiers admit.
8455
+ */
8456
+ eligible_hours_worked?: number | null;
8457
+ /**
8458
+ * Lowercase weekday name (e.g. `monday`) to limit the rule to, or null. A value naming no weekday is refused with `422` rather than dropped.
8459
+ */
8460
+ specific_day_of_week?: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | null;
8461
+ /**
8462
+ * A single calendar date (YYYY-MM-DD) to limit the rule to, or null.
8463
+ */
8464
+ specific_date?: string | null;
8465
+ };
8466
+ /**
8467
+ * Schedule an effective-dated change to the rule, applying from a calendar date forward. `type` is required, since it selects how the rule is compiled, and `rate_multiplier` carries forward when omitted. Everything describing *when* the multiplier applies — `region_id`, `eligible_hours_worked`, `specific_day_of_week`, `specific_date` — is recompiled from the body on every write, so omitting one drops it rather than keeping it. State the whole set of qualifiers you want, not just the ones you are changing.
8468
+ */
8469
+ export type OvertimeRuleScheduledChangeParameters = {
8470
+ /**
8471
+ * 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.
8472
+ */
8473
+ effective_date: string;
8474
+ /**
8475
+ * The rule's cadence, as a class name: `DailyOvertimeRule` (per day) or `WeeklyOvertimeRule` (per week).
8476
+ */
8477
+ type: 'DailyOvertimeRule' | 'WeeklyOvertimeRule';
8478
+ /**
8479
+ * The overtime pay multiplier: `one_x` = 1.0x, `one_five_x` = 1.5x, `two_x` = 2.0x.
8480
+ */
8481
+ rate_multiplier?: 'one_x' | 'one_five_x' | 'two_x';
8482
+ /**
8483
+ * Two-letter US state code to limit the rule to, or null to apply regardless of region.
8484
+ */
8485
+ region_id?: string | null;
8486
+ /**
8487
+ * Whole hours that must be worked before the multiplier applies. Omitted or null is read as `0`, the same default the web form submits, which applies the multiplier to every minute the other qualifiers admit.
8488
+ */
8489
+ eligible_hours_worked?: number | null;
8490
+ /**
8491
+ * Lowercase weekday name (e.g. `monday`) to limit the rule to, or null. A value naming no weekday is refused with `422` rather than dropped.
8492
+ */
8493
+ specific_day_of_week?: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | null;
8494
+ /**
8495
+ * A single calendar date (YYYY-MM-DD) to limit the rule to, or null.
8496
+ */
8497
+ specific_date?: string | null;
8498
+ };
8499
+ /**
8500
+ * Parameters for moving where an overtime rule's timeline begins.
8501
+ */
8502
+ export type OvertimeRuleGenesisParameters = {
8503
+ /**
8504
+ * 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.
8505
+ */
8506
+ effective_date: string;
8507
+ };
8508
+ /**
8509
+ * Schedule when the overtime rule stops being valid.
8510
+ */
8511
+ export type OvertimeRuleScheduledTerminationParameters = {
8512
+ /**
8513
+ * 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.
8514
+ */
8515
+ effective_date: string;
8516
+ };
8172
8517
  /**
8173
8518
  * Create a rate rule on a job wage determination. `effect` is required. `conditions` is optional — an omitted or empty list makes the rule always apply. `effective_date` (YYYY-MM-DD) sets when the rule takes effect; it defaults to today and cannot predate the earliest applicable wage determination.
8174
8519
  */
@@ -15131,6 +15476,10 @@ export type CreateWageDeterminationErrors = {
15131
15476
  * Forbidden
15132
15477
  */
15133
15478
  403: Problem;
15479
+ /**
15480
+ * Not Found
15481
+ */
15482
+ 404: Problem;
15134
15483
  /**
15135
15484
  * Unprocessable Content
15136
15485
  */
@@ -15237,6 +15586,10 @@ export type UpdateJobWageDeterminationData = {
15237
15586
  url: '/api/v1/jobs/{job_id}/wage_determinations/{id}';
15238
15587
  };
15239
15588
  export type UpdateJobWageDeterminationErrors = {
15589
+ /**
15590
+ * Bad Request
15591
+ */
15592
+ 400: Problem;
15240
15593
  /**
15241
15594
  * Forbidden
15242
15595
  */
@@ -15414,6 +15767,42 @@ export type UpdateJobResponses = {
15414
15767
  200: JobResponseObject;
15415
15768
  };
15416
15769
  export type UpdateJobResponse = UpdateJobResponses[keyof UpdateJobResponses];
15770
+ export type GetOpenapiDocumentData = {
15771
+ body?: never;
15772
+ path?: never;
15773
+ query?: never;
15774
+ url: '/api/v1/openapi';
15775
+ };
15776
+ export type GetOpenapiDocumentResponses = {
15777
+ /**
15778
+ * Success
15779
+ */
15780
+ 200: {
15781
+ openapi: string;
15782
+ info: {
15783
+ [key: string]: unknown;
15784
+ };
15785
+ externalDocs: {
15786
+ [key: string]: unknown;
15787
+ };
15788
+ tags: Array<{
15789
+ [key: string]: unknown;
15790
+ }>;
15791
+ 'x-tagGroups': Array<{
15792
+ [key: string]: unknown;
15793
+ }>;
15794
+ paths: {
15795
+ [key: string]: unknown;
15796
+ };
15797
+ servers: Array<{
15798
+ [key: string]: unknown;
15799
+ }>;
15800
+ components: {
15801
+ [key: string]: unknown;
15802
+ };
15803
+ };
15804
+ };
15805
+ export type GetOpenapiDocumentResponse = GetOpenapiDocumentResponses[keyof GetOpenapiDocumentResponses];
15417
15806
  export type ListSiteCheckInsData = {
15418
15807
  body?: never;
15419
15808
  path: {
@@ -15498,20 +15887,679 @@ export type GetSiteCheckInResponses = {
15498
15887
  200: SiteCheckInResponseObject;
15499
15888
  };
15500
15889
  export type GetSiteCheckInResponse = GetSiteCheckInResponses[keyof GetSiteCheckInResponses];
15501
- export type ListPayPeriodsData = {
15502
- body?: never;
15503
- path?: never;
15504
- query?: {
15505
- 'filter[start_time][gte]'?: string;
15506
- 'filter[start_time][lte]'?: string;
15507
- filter?: string;
15508
- 'filter[unexpected]'?: string;
15890
+ export type ShiftOvertimeRuleGenesisData = {
15891
+ body: OvertimeRuleGenesisParameters;
15892
+ headers: {
15509
15893
  /**
15510
- * This pagination cursor corresponds to the cursor value found in the response in
15511
- * `meta.page.next_cursor`.
15894
+ * Version validator this write is composed against — the `ETag` from a read of this rule, or `*` to write against whatever exists. See "Version validators" in the API overview.
15512
15895
  */
15513
- 'page[cursor]'?: string;
15514
- /**
15896
+ 'If-Match': string;
15897
+ };
15898
+ path: {
15899
+ overtime_package_id: string;
15900
+ overtime_rule_id: string;
15901
+ };
15902
+ query?: never;
15903
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/genesis';
15904
+ };
15905
+ export type ShiftOvertimeRuleGenesisErrors = {
15906
+ /**
15907
+ * Bad Request
15908
+ */
15909
+ 400: Problem;
15910
+ /**
15911
+ * Forbidden
15912
+ */
15913
+ 403: Problem;
15914
+ /**
15915
+ * Not Found
15916
+ */
15917
+ 404: Problem;
15918
+ /**
15919
+ * Conflict
15920
+ */
15921
+ 409: Problem;
15922
+ /**
15923
+ * Precondition Failed
15924
+ */
15925
+ 412: Problem;
15926
+ /**
15927
+ * Unprocessable Content
15928
+ */
15929
+ 422: Problem;
15930
+ /**
15931
+ * Precondition Required
15932
+ */
15933
+ 428: Problem;
15934
+ };
15935
+ export type ShiftOvertimeRuleGenesisError = ShiftOvertimeRuleGenesisErrors[keyof ShiftOvertimeRuleGenesisErrors];
15936
+ export type ShiftOvertimeRuleGenesisResponses = {
15937
+ /**
15938
+ * Success
15939
+ */
15940
+ 200: OvertimeRuleResponseObject;
15941
+ };
15942
+ export type ShiftOvertimeRuleGenesisResponse = ShiftOvertimeRuleGenesisResponses[keyof ShiftOvertimeRuleGenesisResponses];
15943
+ export type ListOvertimeRuleHistoryData = {
15944
+ body?: never;
15945
+ path: {
15946
+ overtime_package_id: string;
15947
+ /**
15948
+ * The rule's version-stable identity, as returned in `id`.
15949
+ */
15950
+ overtime_rule_id: string;
15951
+ };
15952
+ query?: {
15953
+ 'as_of[valid]'?: string;
15954
+ };
15955
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/history';
15956
+ };
15957
+ export type ListOvertimeRuleHistoryErrors = {
15958
+ /**
15959
+ * Bad Request
15960
+ */
15961
+ 400: Problem;
15962
+ /**
15963
+ * Forbidden
15964
+ */
15965
+ 403: Problem;
15966
+ /**
15967
+ * Not Found
15968
+ */
15969
+ 404: Problem;
15970
+ };
15971
+ export type ListOvertimeRuleHistoryError = ListOvertimeRuleHistoryErrors[keyof ListOvertimeRuleHistoryErrors];
15972
+ export type ListOvertimeRuleHistoryResponses = {
15973
+ /**
15974
+ * Success
15975
+ */
15976
+ 200: {
15977
+ meta: Meta;
15978
+ links: Links;
15979
+ data: Array<OvertimeRuleHistoryVersionObject>;
15980
+ };
15981
+ };
15982
+ export type ListOvertimeRuleHistoryResponse = ListOvertimeRuleHistoryResponses[keyof ListOvertimeRuleHistoryResponses];
15983
+ export type CancelOvertimeRuleScheduledChangesData = {
15984
+ body?: never;
15985
+ headers: {
15986
+ /**
15987
+ * Version validator this write is composed against — the `ETag` from a read of this rule, or `*` to write against whatever exists. See "Version validators" in the API overview.
15988
+ */
15989
+ 'If-Match': string;
15990
+ };
15991
+ path: {
15992
+ overtime_package_id: string;
15993
+ overtime_rule_id: string;
15994
+ };
15995
+ query?: never;
15996
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes';
15997
+ };
15998
+ export type CancelOvertimeRuleScheduledChangesErrors = {
15999
+ /**
16000
+ * Forbidden
16001
+ */
16002
+ 403: Problem;
16003
+ /**
16004
+ * Not Found
16005
+ */
16006
+ 404: Problem;
16007
+ /**
16008
+ * Precondition Failed
16009
+ */
16010
+ 412: Problem;
16011
+ /**
16012
+ * Unprocessable Content
16013
+ */
16014
+ 422: Problem;
16015
+ /**
16016
+ * Precondition Required
16017
+ */
16018
+ 428: Problem;
16019
+ };
16020
+ export type CancelOvertimeRuleScheduledChangesError = CancelOvertimeRuleScheduledChangesErrors[keyof CancelOvertimeRuleScheduledChangesErrors];
16021
+ export type CancelOvertimeRuleScheduledChangesResponses = {
16022
+ /**
16023
+ * Success
16024
+ */
16025
+ 200: OvertimeRuleResponseObject;
16026
+ };
16027
+ export type CancelOvertimeRuleScheduledChangesResponse = CancelOvertimeRuleScheduledChangesResponses[keyof CancelOvertimeRuleScheduledChangesResponses];
16028
+ export type ListOvertimeRuleScheduledChangesData = {
16029
+ body?: never;
16030
+ path: {
16031
+ overtime_package_id: string;
16032
+ overtime_rule_id: string;
16033
+ };
16034
+ query?: never;
16035
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes';
16036
+ };
16037
+ export type ListOvertimeRuleScheduledChangesErrors = {
16038
+ /**
16039
+ * Forbidden
16040
+ */
16041
+ 403: Problem;
16042
+ /**
16043
+ * Not Found
16044
+ */
16045
+ 404: Problem;
16046
+ };
16047
+ export type ListOvertimeRuleScheduledChangesError = ListOvertimeRuleScheduledChangesErrors[keyof ListOvertimeRuleScheduledChangesErrors];
16048
+ export type ListOvertimeRuleScheduledChangesResponses = {
16049
+ /**
16050
+ * Success with scheduled changes
16051
+ */
16052
+ 200: Array<OvertimeRuleResponseObject>;
16053
+ };
16054
+ export type ListOvertimeRuleScheduledChangesResponse = ListOvertimeRuleScheduledChangesResponses[keyof ListOvertimeRuleScheduledChangesResponses];
16055
+ export type ScheduleOvertimeRuleChangeData = {
16056
+ body: OvertimeRuleScheduledChangeParameters;
16057
+ headers: {
16058
+ /**
16059
+ * Version validator this write is composed against — the `ETag` from a read of this rule, or `*` to write against whatever exists. See "Version validators" in the API overview.
16060
+ */
16061
+ 'If-Match': string;
16062
+ };
16063
+ path: {
16064
+ overtime_package_id: string;
16065
+ overtime_rule_id: string;
16066
+ };
16067
+ query?: never;
16068
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes';
16069
+ };
16070
+ export type ScheduleOvertimeRuleChangeErrors = {
16071
+ /**
16072
+ * Bad Request
16073
+ */
16074
+ 400: Problem;
16075
+ /**
16076
+ * Forbidden
16077
+ */
16078
+ 403: Problem;
16079
+ /**
16080
+ * Not Found
16081
+ */
16082
+ 404: Problem;
16083
+ /**
16084
+ * Conflict
16085
+ */
16086
+ 409: Problem;
16087
+ /**
16088
+ * Precondition Failed
16089
+ */
16090
+ 412: Problem;
16091
+ /**
16092
+ * Unprocessable Content
16093
+ */
16094
+ 422: Problem;
16095
+ /**
16096
+ * Precondition Required
16097
+ */
16098
+ 428: Problem;
16099
+ };
16100
+ export type ScheduleOvertimeRuleChangeError = ScheduleOvertimeRuleChangeErrors[keyof ScheduleOvertimeRuleChangeErrors];
16101
+ export type ScheduleOvertimeRuleChangeResponses = {
16102
+ /**
16103
+ * Success (already scheduled)
16104
+ */
16105
+ 200: OvertimeRuleResponseObject;
16106
+ /**
16107
+ * Created
16108
+ */
16109
+ 201: OvertimeRuleResponseObject;
16110
+ };
16111
+ export type ScheduleOvertimeRuleChangeResponse = ScheduleOvertimeRuleChangeResponses[keyof ScheduleOvertimeRuleChangeResponses];
16112
+ export type CancelOvertimeRuleScheduledTerminationData = {
16113
+ body?: never;
16114
+ headers: {
16115
+ /**
16116
+ * Version validator this write is composed against — the `ETag` from a read of this rule, or `*` to write against whatever exists. See "Version validators" in the API overview.
16117
+ */
16118
+ 'If-Match': string;
16119
+ };
16120
+ path: {
16121
+ overtime_package_id: string;
16122
+ overtime_rule_id: string;
16123
+ };
16124
+ query?: never;
16125
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_termination';
16126
+ };
16127
+ export type CancelOvertimeRuleScheduledTerminationErrors = {
16128
+ /**
16129
+ * Forbidden
16130
+ */
16131
+ 403: Problem;
16132
+ /**
16133
+ * Not Found
16134
+ */
16135
+ 404: Problem;
16136
+ /**
16137
+ * Precondition Failed
16138
+ */
16139
+ 412: Problem;
16140
+ /**
16141
+ * Unprocessable Content
16142
+ */
16143
+ 422: Problem;
16144
+ /**
16145
+ * Precondition Required
16146
+ */
16147
+ 428: Problem;
16148
+ };
16149
+ export type CancelOvertimeRuleScheduledTerminationError = CancelOvertimeRuleScheduledTerminationErrors[keyof CancelOvertimeRuleScheduledTerminationErrors];
16150
+ export type CancelOvertimeRuleScheduledTerminationResponses = {
16151
+ /**
16152
+ * Success
16153
+ */
16154
+ 200: OvertimeRuleResponseObject;
16155
+ };
16156
+ export type CancelOvertimeRuleScheduledTerminationResponse = CancelOvertimeRuleScheduledTerminationResponses[keyof CancelOvertimeRuleScheduledTerminationResponses];
16157
+ export type ScheduleOvertimeRuleTerminationData = {
16158
+ body: OvertimeRuleScheduledTerminationParameters;
16159
+ headers: {
16160
+ /**
16161
+ * Version validator this write is composed against — the `ETag` from a read of this rule, or `*` to write against whatever exists. See "Version validators" in the API overview.
16162
+ */
16163
+ 'If-Match': string;
16164
+ };
16165
+ path: {
16166
+ overtime_package_id: string;
16167
+ overtime_rule_id: string;
16168
+ };
16169
+ query?: never;
16170
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_termination';
16171
+ };
16172
+ export type ScheduleOvertimeRuleTerminationErrors = {
16173
+ /**
16174
+ * Bad Request
16175
+ */
16176
+ 400: Problem;
16177
+ /**
16178
+ * Forbidden
16179
+ */
16180
+ 403: Problem;
16181
+ /**
16182
+ * Not Found
16183
+ */
16184
+ 404: Problem;
16185
+ /**
16186
+ * Conflict
16187
+ */
16188
+ 409: Problem;
16189
+ /**
16190
+ * Precondition Failed
16191
+ */
16192
+ 412: Problem;
16193
+ /**
16194
+ * Unprocessable Content
16195
+ */
16196
+ 422: Problem;
16197
+ /**
16198
+ * Precondition Required
16199
+ */
16200
+ 428: Problem;
16201
+ };
16202
+ export type ScheduleOvertimeRuleTerminationError = ScheduleOvertimeRuleTerminationErrors[keyof ScheduleOvertimeRuleTerminationErrors];
16203
+ export type ScheduleOvertimeRuleTerminationResponses = {
16204
+ /**
16205
+ * Created
16206
+ */
16207
+ 201: OvertimeRuleResponseObject;
16208
+ };
16209
+ export type ScheduleOvertimeRuleTerminationResponse = ScheduleOvertimeRuleTerminationResponses[keyof ScheduleOvertimeRuleTerminationResponses];
16210
+ export type ListOvertimeRulesData = {
16211
+ body?: never;
16212
+ path: {
16213
+ overtime_package_id: string;
16214
+ };
16215
+ query?: {
16216
+ /**
16217
+ * Read the version valid at this point in time. Defaults to now.
16218
+ */
16219
+ 'as_of[valid]'?: string;
16220
+ as_of?: string;
16221
+ 'as_of[bogus_axis]'?: string;
16222
+ 'as_of[valid][gte]'?: string;
16223
+ 'as_of[transaction]'?: string;
16224
+ filter?: string;
16225
+ 'filter[unexpected]'?: string;
16226
+ /**
16227
+ * This pagination cursor corresponds to the cursor value found in the response in
16228
+ * `meta.page.next_cursor`.
16229
+ */
16230
+ 'page[cursor]'?: string;
16231
+ /**
16232
+ * 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`.
16233
+ */
16234
+ 'page[limit]'?: number;
16235
+ page?: string;
16236
+ };
16237
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules';
16238
+ };
16239
+ export type ListOvertimeRulesErrors = {
16240
+ /**
16241
+ * Bad Request
16242
+ */
16243
+ 400: Problem;
16244
+ /**
16245
+ * Forbidden
16246
+ */
16247
+ 403: Problem;
16248
+ /**
16249
+ * Unprocessable Content
16250
+ */
16251
+ 422: Problem;
16252
+ };
16253
+ export type ListOvertimeRulesError = ListOvertimeRulesErrors[keyof ListOvertimeRulesErrors];
16254
+ export type ListOvertimeRulesResponses = {
16255
+ /**
16256
+ * Success
16257
+ */
16258
+ 200: {
16259
+ meta: Meta;
16260
+ links: Links;
16261
+ data: Array<OvertimeRuleResponseObject>;
16262
+ };
16263
+ };
16264
+ export type ListOvertimeRulesResponse = ListOvertimeRulesResponses[keyof ListOvertimeRulesResponses];
16265
+ export type CreateOvertimeRuleData = {
16266
+ body: OvertimeRuleParameters;
16267
+ path: {
16268
+ overtime_package_id: string;
16269
+ };
16270
+ query?: never;
16271
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules';
16272
+ };
16273
+ export type CreateOvertimeRuleErrors = {
16274
+ /**
16275
+ * Bad Request (unknown body key)
16276
+ */
16277
+ 400: Problem;
16278
+ /**
16279
+ * Forbidden
16280
+ */
16281
+ 403: Problem;
16282
+ /**
16283
+ * Not Found
16284
+ */
16285
+ 404: Problem;
16286
+ /**
16287
+ * Unprocessable Content
16288
+ */
16289
+ 422: Problem;
16290
+ };
16291
+ export type CreateOvertimeRuleError = CreateOvertimeRuleErrors[keyof CreateOvertimeRuleErrors];
16292
+ export type CreateOvertimeRuleResponses = {
16293
+ /**
16294
+ * Created
16295
+ */
16296
+ 201: OvertimeRuleResponseObject;
16297
+ };
16298
+ export type CreateOvertimeRuleResponse = CreateOvertimeRuleResponses[keyof CreateOvertimeRuleResponses];
16299
+ export type DeleteOvertimeRuleData = {
16300
+ body?: never;
16301
+ headers: {
16302
+ /**
16303
+ * Version validator this write is composed against — the `ETag` from a read of this rule, or `*` to write against whatever exists. See "Version validators" in the API overview.
16304
+ */
16305
+ 'If-Match': string;
16306
+ };
16307
+ path: {
16308
+ overtime_package_id: string;
16309
+ id: string;
16310
+ };
16311
+ query?: never;
16312
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}';
16313
+ };
16314
+ export type DeleteOvertimeRuleErrors = {
16315
+ /**
16316
+ * Forbidden
16317
+ */
16318
+ 403: Problem;
16319
+ /**
16320
+ * Not Found
16321
+ */
16322
+ 404: Problem;
16323
+ /**
16324
+ * Precondition Failed
16325
+ */
16326
+ 412: Problem;
16327
+ /**
16328
+ * Precondition Required
16329
+ */
16330
+ 428: Problem;
16331
+ };
16332
+ export type DeleteOvertimeRuleError = DeleteOvertimeRuleErrors[keyof DeleteOvertimeRuleErrors];
16333
+ export type DeleteOvertimeRuleResponses = {
16334
+ /**
16335
+ * Success
16336
+ */
16337
+ 200: OvertimeRuleResponseObject;
16338
+ };
16339
+ export type DeleteOvertimeRuleResponse = DeleteOvertimeRuleResponses[keyof DeleteOvertimeRuleResponses];
16340
+ export type GetOvertimeRuleData = {
16341
+ body?: never;
16342
+ path: {
16343
+ overtime_package_id: string;
16344
+ id: string;
16345
+ };
16346
+ query?: {
16347
+ /**
16348
+ * Read the version valid at this point in time. Defaults to now.
16349
+ */
16350
+ 'as_of[valid]'?: string;
16351
+ };
16352
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}';
16353
+ };
16354
+ export type GetOvertimeRuleErrors = {
16355
+ /**
16356
+ * Forbidden
16357
+ */
16358
+ 403: Problem;
16359
+ /**
16360
+ * Not Found
16361
+ */
16362
+ 404: Problem;
16363
+ };
16364
+ export type GetOvertimeRuleError = GetOvertimeRuleErrors[keyof GetOvertimeRuleErrors];
16365
+ export type GetOvertimeRuleResponses = {
16366
+ /**
16367
+ * Success
16368
+ */
16369
+ 200: OvertimeRuleResponseObject;
16370
+ };
16371
+ export type GetOvertimeRuleResponse = GetOvertimeRuleResponses[keyof GetOvertimeRuleResponses];
16372
+ export type UpdateOvertimeRuleData = {
16373
+ body: OvertimeRuleUpdateParameters;
16374
+ headers: {
16375
+ /**
16376
+ * Version validator this write is composed against — the `ETag` from a read of this rule, or `*` to write against whatever exists. See "Version validators" in the API overview.
16377
+ */
16378
+ 'If-Match': string;
16379
+ };
16380
+ path: {
16381
+ overtime_package_id: string;
16382
+ id: string;
16383
+ };
16384
+ query?: never;
16385
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}';
16386
+ };
16387
+ export type UpdateOvertimeRuleErrors = {
16388
+ /**
16389
+ * Bad Request (unknown body key)
16390
+ */
16391
+ 400: Problem;
16392
+ /**
16393
+ * Forbidden
16394
+ */
16395
+ 403: Problem;
16396
+ /**
16397
+ * Not Found
16398
+ */
16399
+ 404: Problem;
16400
+ /**
16401
+ * Conflict
16402
+ */
16403
+ 409: Problem;
16404
+ /**
16405
+ * Precondition Failed
16406
+ */
16407
+ 412: Problem;
16408
+ /**
16409
+ * Unprocessable Content
16410
+ */
16411
+ 422: Problem;
16412
+ /**
16413
+ * Precondition Required
16414
+ */
16415
+ 428: Problem;
16416
+ };
16417
+ export type UpdateOvertimeRuleError = UpdateOvertimeRuleErrors[keyof UpdateOvertimeRuleErrors];
16418
+ export type UpdateOvertimeRuleResponses = {
16419
+ /**
16420
+ * Success
16421
+ */
16422
+ 200: OvertimeRuleResponseObject;
16423
+ };
16424
+ export type UpdateOvertimeRuleResponse = UpdateOvertimeRuleResponses[keyof UpdateOvertimeRuleResponses];
16425
+ export type ListTimeEntryImportsData = {
16426
+ body?: never;
16427
+ path: {
16428
+ pay_period_id: string;
16429
+ };
16430
+ query?: {
16431
+ /**
16432
+ * Filter by import status:
16433
+ * * `pending`
16434
+ * * `processing`
16435
+ * * `processed`
16436
+ * * `success`
16437
+ * * `failed`
16438
+ *
16439
+ */
16440
+ 'filter[status]'?: string;
16441
+ filter?: string;
16442
+ 'filter[unexpected]'?: string;
16443
+ 'filter[completed_at][gte]'?: string;
16444
+ 'filter[completed_at][lte]'?: string;
16445
+ 'filter[created_at][gte]'?: string;
16446
+ 'filter[created_at][lte]'?: string;
16447
+ 'filter[updated_at][gte]'?: string;
16448
+ 'filter[updated_at][lte]'?: string;
16449
+ /**
16450
+ * This pagination cursor corresponds to the cursor value found in the response in
16451
+ * `meta.page.next_cursor`.
16452
+ */
16453
+ 'page[cursor]'?: string;
16454
+ /**
16455
+ * 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`.
16456
+ */
16457
+ 'page[limit]'?: number;
16458
+ page?: string;
16459
+ };
16460
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries';
16461
+ };
16462
+ export type ListTimeEntryImportsErrors = {
16463
+ /**
16464
+ * Bad Request
16465
+ */
16466
+ 400: Problem;
16467
+ /**
16468
+ * Forbidden
16469
+ */
16470
+ 403: Problem;
16471
+ /**
16472
+ * Unprocessable Content
16473
+ */
16474
+ 422: Problem;
16475
+ };
16476
+ export type ListTimeEntryImportsError = ListTimeEntryImportsErrors[keyof ListTimeEntryImportsErrors];
16477
+ export type ListTimeEntryImportsResponses = {
16478
+ /**
16479
+ * Success
16480
+ */
16481
+ 200: {
16482
+ meta: Meta;
16483
+ links: Links;
16484
+ data: Array<TimeEntryImportResponseObject>;
16485
+ };
16486
+ };
16487
+ export type ListTimeEntryImportsResponse = ListTimeEntryImportsResponses[keyof ListTimeEntryImportsResponses];
16488
+ export type CreateTimeEntryImportData = {
16489
+ body: TimeEntryImportParameters;
16490
+ path: {
16491
+ pay_period_id: string;
16492
+ };
16493
+ query?: never;
16494
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries';
16495
+ };
16496
+ export type CreateTimeEntryImportErrors = {
16497
+ /**
16498
+ * Bad Request
16499
+ */
16500
+ 400: Problem;
16501
+ /**
16502
+ * Forbidden
16503
+ */
16504
+ 403: Problem;
16505
+ /**
16506
+ * Not Found
16507
+ */
16508
+ 404: Problem;
16509
+ /**
16510
+ * Unprocessable Content
16511
+ */
16512
+ 422: Problem;
16513
+ };
16514
+ export type CreateTimeEntryImportError = CreateTimeEntryImportErrors[keyof CreateTimeEntryImportErrors];
16515
+ export type CreateTimeEntryImportResponses = {
16516
+ /**
16517
+ * Created
16518
+ */
16519
+ 201: TimeEntryImportResponseObject;
16520
+ };
16521
+ export type CreateTimeEntryImportResponse = CreateTimeEntryImportResponses[keyof CreateTimeEntryImportResponses];
16522
+ export type GetTimeEntryImportData = {
16523
+ body?: never;
16524
+ path: {
16525
+ pay_period_id: string;
16526
+ id: string;
16527
+ };
16528
+ query?: never;
16529
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries/{id}';
16530
+ };
16531
+ export type GetTimeEntryImportErrors = {
16532
+ /**
16533
+ * Forbidden
16534
+ */
16535
+ 403: Problem;
16536
+ /**
16537
+ * Not Found
16538
+ */
16539
+ 404: Problem;
16540
+ };
16541
+ export type GetTimeEntryImportError = GetTimeEntryImportErrors[keyof GetTimeEntryImportErrors];
16542
+ export type GetTimeEntryImportResponses = {
16543
+ /**
16544
+ * Success
16545
+ */
16546
+ 200: TimeEntryImportResponseObject;
16547
+ };
16548
+ export type GetTimeEntryImportResponse = GetTimeEntryImportResponses[keyof GetTimeEntryImportResponses];
16549
+ export type ListPayPeriodsData = {
16550
+ body?: never;
16551
+ path?: never;
16552
+ query?: {
16553
+ 'filter[start_time][gte]'?: string;
16554
+ 'filter[start_time][lte]'?: string;
16555
+ filter?: string;
16556
+ 'filter[unexpected]'?: string;
16557
+ /**
16558
+ * This pagination cursor corresponds to the cursor value found in the response in
16559
+ * `meta.page.next_cursor`.
16560
+ */
16561
+ 'page[cursor]'?: string;
16562
+ /**
15515
16563
  * 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`.
15516
16564
  */
15517
16565
  'page[limit]'?: number;
@@ -16044,6 +17092,10 @@ export type UpdatePayrollRunErrors = {
16044
17092
  * Not Found
16045
17093
  */
16046
17094
  404: Problem;
17095
+ /**
17096
+ * Unprocessable Content
17097
+ */
17098
+ 422: Problem;
16047
17099
  };
16048
17100
  export type UpdatePayrollRunError = UpdatePayrollRunErrors[keyof UpdatePayrollRunErrors];
16049
17101
  export type UpdatePayrollRunResponses = {
@@ -17114,6 +18166,155 @@ export type UpdateCompanyUserDetailResponses = {
17114
18166
  200: PwaCompanyUserDetailsResponseObject;
17115
18167
  };
17116
18168
  export type UpdateCompanyUserDetailResponse = UpdateCompanyUserDetailResponses[keyof UpdateCompanyUserDetailResponses];
18169
+ export type ListApprenticeshipOccupationsData = {
18170
+ body?: never;
18171
+ path: {
18172
+ trade_id: string;
18173
+ };
18174
+ query?: {
18175
+ /**
18176
+ * Filter by apprenticeship occupation.
18177
+ */
18178
+ 'filter[apprenticeship_occupation_id]'?: string;
18179
+ /**
18180
+ * Filter by verdict.
18181
+ */
18182
+ 'filter[scope_status]'?: 'in_scope' | 'out_of_scope';
18183
+ /**
18184
+ * This pagination cursor corresponds to the cursor value found in the response in
18185
+ * `meta.page.next_cursor`.
18186
+ */
18187
+ 'page[cursor]'?: string;
18188
+ /**
18189
+ * 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`.
18190
+ */
18191
+ 'page[limit]'?: number;
18192
+ page?: string;
18193
+ 'filter[created_at][gte]'?: string;
18194
+ 'filter[created_at][lte]'?: string;
18195
+ filter?: string;
18196
+ 'filter[unexpected]'?: string;
18197
+ };
18198
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations';
18199
+ };
18200
+ export type ListApprenticeshipOccupationsErrors = {
18201
+ /**
18202
+ * Bad Request
18203
+ */
18204
+ 400: Problem;
18205
+ /**
18206
+ * Forbidden
18207
+ */
18208
+ 403: Problem;
18209
+ /**
18210
+ * Not Found
18211
+ */
18212
+ 404: Problem;
18213
+ /**
18214
+ * Unprocessable Content
18215
+ */
18216
+ 422: Problem;
18217
+ };
18218
+ export type ListApprenticeshipOccupationsError = ListApprenticeshipOccupationsErrors[keyof ListApprenticeshipOccupationsErrors];
18219
+ export type ListApprenticeshipOccupationsResponses = {
18220
+ /**
18221
+ * Success
18222
+ */
18223
+ 200: {
18224
+ meta: Meta;
18225
+ links: Links;
18226
+ data: Array<PwaTradeApprenticeshipOccupationResponseObject>;
18227
+ };
18228
+ };
18229
+ export type ListApprenticeshipOccupationsResponse = ListApprenticeshipOccupationsResponses[keyof ListApprenticeshipOccupationsResponses];
18230
+ export type CreateApprenticeshipOccupationData = {
18231
+ body: PwaTradeApprenticeshipOccupationCreateParameters;
18232
+ path: {
18233
+ trade_id: string;
18234
+ };
18235
+ query?: never;
18236
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations';
18237
+ };
18238
+ export type CreateApprenticeshipOccupationErrors = {
18239
+ /**
18240
+ * Bad Request
18241
+ */
18242
+ 400: Problem;
18243
+ /**
18244
+ * Forbidden
18245
+ */
18246
+ 403: Problem;
18247
+ /**
18248
+ * Unprocessable Content
18249
+ */
18250
+ 422: Problem;
18251
+ };
18252
+ export type CreateApprenticeshipOccupationError = CreateApprenticeshipOccupationErrors[keyof CreateApprenticeshipOccupationErrors];
18253
+ export type CreateApprenticeshipOccupationResponses = {
18254
+ /**
18255
+ * Created
18256
+ */
18257
+ 201: PwaTradeApprenticeshipOccupationResponseObject;
18258
+ };
18259
+ export type CreateApprenticeshipOccupationResponse = CreateApprenticeshipOccupationResponses[keyof CreateApprenticeshipOccupationResponses];
18260
+ export type DeleteApprenticeshipOccupationData = {
18261
+ body?: never;
18262
+ path: {
18263
+ trade_id: string;
18264
+ id: string;
18265
+ };
18266
+ query?: never;
18267
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}';
18268
+ };
18269
+ export type DeleteApprenticeshipOccupationErrors = {
18270
+ /**
18271
+ * Forbidden
18272
+ */
18273
+ 403: Problem;
18274
+ /**
18275
+ * Not Found
18276
+ */
18277
+ 404: Problem;
18278
+ };
18279
+ export type DeleteApprenticeshipOccupationError = DeleteApprenticeshipOccupationErrors[keyof DeleteApprenticeshipOccupationErrors];
18280
+ export type DeleteApprenticeshipOccupationResponses = {
18281
+ /**
18282
+ * Success
18283
+ */
18284
+ 200: PwaTradeApprenticeshipOccupationResponseObject;
18285
+ };
18286
+ export type DeleteApprenticeshipOccupationResponse = DeleteApprenticeshipOccupationResponses[keyof DeleteApprenticeshipOccupationResponses];
18287
+ export type UpdateApprenticeshipOccupationData = {
18288
+ body: PwaTradeApprenticeshipOccupationUpdateParameters;
18289
+ path: {
18290
+ trade_id: string;
18291
+ id: string;
18292
+ };
18293
+ query?: never;
18294
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}';
18295
+ };
18296
+ export type UpdateApprenticeshipOccupationErrors = {
18297
+ /**
18298
+ * Bad Request
18299
+ */
18300
+ 400: Problem;
18301
+ /**
18302
+ * Forbidden
18303
+ */
18304
+ 403: Problem;
18305
+ /**
18306
+ * Unprocessable Content
18307
+ */
18308
+ 422: Problem;
18309
+ };
18310
+ export type UpdateApprenticeshipOccupationError = UpdateApprenticeshipOccupationErrors[keyof UpdateApprenticeshipOccupationErrors];
18311
+ export type UpdateApprenticeshipOccupationResponses = {
18312
+ /**
18313
+ * Success
18314
+ */
18315
+ 200: PwaTradeApprenticeshipOccupationResponseObject;
18316
+ };
18317
+ export type UpdateApprenticeshipOccupationResponse = UpdateApprenticeshipOccupationResponses[keyof UpdateApprenticeshipOccupationResponses];
17117
18318
  export type ListTradesData = {
17118
18319
  body?: never;
17119
18320
  path?: never;
@@ -17123,9 +18324,13 @@ export type ListTradesData = {
17123
18324
  */
17124
18325
  'filter[project_id]'?: string;
17125
18326
  /**
17126
- * Filter by owning job
18327
+ * Filter by owning job. Only a standalone job owns trades — a job inside a project consumes its project root's pool, so filter by that root's `project_id` instead. Filtering by such a job's own id returns an empty list.
17127
18328
  */
17128
18329
  'filter[job_id]'?: string;
18330
+ /**
18331
+ * Fuzzy match on the craft name, e.g. `Electrican` finds `Electrician`.
18332
+ */
18333
+ 'filter[name]'?: string;
17129
18334
  'filter[created_at][gte]'?: string;
17130
18335
  'filter[created_at][lte]'?: string;
17131
18336
  'filter[updated_at][gte]'?: string;
@@ -17171,6 +18376,36 @@ export type ListTradesResponses = {
17171
18376
  };
17172
18377
  };
17173
18378
  export type ListTradesResponse = ListTradesResponses[keyof ListTradesResponses];
18379
+ export type DeleteTradeData = {
18380
+ body?: never;
18381
+ path: {
18382
+ id: string;
18383
+ };
18384
+ query?: never;
18385
+ url: '/api/v1/pwa/trades/{id}';
18386
+ };
18387
+ export type DeleteTradeErrors = {
18388
+ /**
18389
+ * Forbidden
18390
+ */
18391
+ 403: Problem;
18392
+ /**
18393
+ * Not Found
18394
+ */
18395
+ 404: Problem;
18396
+ /**
18397
+ * Unprocessable Content
18398
+ */
18399
+ 422: Problem;
18400
+ };
18401
+ export type DeleteTradeError = DeleteTradeErrors[keyof DeleteTradeErrors];
18402
+ export type DeleteTradeResponses = {
18403
+ /**
18404
+ * Success
18405
+ */
18406
+ 200: PwaTradeResponseObject;
18407
+ };
18408
+ export type DeleteTradeResponse = DeleteTradeResponses[keyof DeleteTradeResponses];
17174
18409
  export type GetTradeData = {
17175
18410
  body?: never;
17176
18411
  path: {
@@ -17197,6 +18432,40 @@ export type GetTradeResponses = {
17197
18432
  200: PwaTradeResponseObject;
17198
18433
  };
17199
18434
  export type GetTradeResponse = GetTradeResponses[keyof GetTradeResponses];
18435
+ export type UpdateTradeData = {
18436
+ body: PwaTradeUpdateParameters;
18437
+ path: {
18438
+ id: string;
18439
+ };
18440
+ query?: never;
18441
+ url: '/api/v1/pwa/trades/{id}';
18442
+ };
18443
+ export type UpdateTradeErrors = {
18444
+ /**
18445
+ * Bad Request
18446
+ */
18447
+ 400: Problem;
18448
+ /**
18449
+ * Forbidden
18450
+ */
18451
+ 403: Problem;
18452
+ /**
18453
+ * Not Found
18454
+ */
18455
+ 404: Problem;
18456
+ /**
18457
+ * Unprocessable Content
18458
+ */
18459
+ 422: Problem;
18460
+ };
18461
+ export type UpdateTradeError = UpdateTradeErrors[keyof UpdateTradeErrors];
18462
+ export type UpdateTradeResponses = {
18463
+ /**
18464
+ * Success
18465
+ */
18466
+ 200: PwaTradeResponseObject;
18467
+ };
18468
+ export type UpdateTradeResponse = UpdateTradeResponses[keyof UpdateTradeResponses];
17200
18469
  export type CreateFormAssignmentTaskData = {
17201
18470
  body?: {
17202
18471
  form_definition_id: string;
@@ -17536,6 +18805,10 @@ export type ListTimeCardPerDiemsErrors = {
17536
18805
  * Forbidden
17537
18806
  */
17538
18807
  403: Problem;
18808
+ /**
18809
+ * Not Found
18810
+ */
18811
+ 404: Problem;
17539
18812
  };
17540
18813
  export type ListTimeCardPerDiemsError = ListTimeCardPerDiemsErrors[keyof ListTimeCardPerDiemsErrors];
17541
18814
  export type ListTimeCardPerDiemsResponses = {