@dsptch-work/api-client 0.14.0 → 0.15.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.
@@ -176,6 +176,12 @@ export type Problem = {
176
176
  *
177
177
  * The resource's timeline already ends at a scheduled termination, and scheduling a second one would silently move it. Moving an end is two steps on purpose: cancel the standing termination, then schedule the one you want.
178
178
  *
179
+ * ### import_in_progress
180
+ *
181
+ * **Import In Progress**
182
+ *
183
+ * 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.
184
+ *
179
185
  * ### product_archived
180
186
  *
181
187
  * **Product Archived**
@@ -351,7 +357,7 @@ export type Problem = {
351
357
  * 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.
352
358
  *
353
359
  */
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';
360
+ 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';
355
361
  export type ApiKeyScopeResponseObject = {
356
362
  resource: string;
357
363
  action: 'read' | 'create' | 'update' | 'delete';
@@ -364,7 +370,7 @@ export type DirectUploadParameters = {
364
370
  /**
365
371
  * 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.
366
372
  */
367
- resource: 'assets.items' | 'assets.items.documents' | 'assets.items.service_events' | 'assets.products' | 'assets.vendors' | 'pay_periods.imports.time_entries' | 'users';
373
+ resource: 'assets.items' | 'assets.items.documents' | 'assets.items.service_events' | 'assets.products' | 'assets.vendors' | 'pay_periods.imports.aggregate_times' | 'pay_periods.imports.dsptch_cprs' | 'pay_periods.imports.time_entries' | 'users';
368
374
  /**
369
375
  * Metadata describing the file being registered, before its bytes are uploaded.
370
376
  */
@@ -2472,6 +2478,15 @@ export type PwaTradeUpdateParameters = {
2472
2478
  */
2473
2479
  name?: string;
2474
2480
  };
2481
+ /**
2482
+ * Parameters for merging one PWA trade (craft) into another in the same pool.
2483
+ */
2484
+ export type PwaTradeMergeParameters = {
2485
+ /**
2486
+ * ID of the craft to merge into. It absorbs the source's wage determinations and survives; the source is deleted. Must name a different craft than the source, owned by the same project root or standalone job. The source's apprentice-scope decisions transfer with it, except where the target already holds a decision for that occupation — there the target's own verdict stands.
2487
+ */
2488
+ target_trade_id: string;
2489
+ };
2475
2490
  /**
2476
2491
  * 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
2492
  */
@@ -2717,73 +2732,73 @@ export type JobResponseObject = {
2717
2732
  [key: string]: unknown;
2718
2733
  };
2719
2734
  /**
2720
- * Prevailing-wage / apprenticeship (PWA) compliance details for a job, used in certified-payroll reporting. Fields for every supported state are always present; those outside the job's region come back null. Null on the job when it tracks no PWA compliance.
2735
+ * 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.
2721
2736
  */
2722
2737
  export type PwaJobDetailsResponseObject = {
2723
2738
  /**
2724
- * California DIR (Department of Industrial Relations) awarding-body ID; null when not applicable.
2739
+ * Role of the company on this job for PWA reporting: one of prime_contractor or sub_contractor; null when unset.
2725
2740
  */
2726
- dir_awarding_body_id: string | null;
2741
+ contractor_type: 'prime_contractor' | 'sub_contractor' | null;
2727
2742
  /**
2728
- * California DIR project registration ID (an 11-digit number); null when not applicable.
2743
+ * Whether new positions on the job default to paying the full fringe as cash.
2729
2744
  */
2730
- dir_project_id: string | null;
2745
+ pay_full_cash_fringe_by_default: boolean;
2731
2746
  /**
2732
- * California DIR project name; null when not applicable.
2747
+ * California DIR (Department of Industrial Relations) awarding-body ID; present only for a compatible California prevailing-wage configuration and null when applicable but unset.
2733
2748
  */
2734
- dir_project_name: string | null;
2749
+ dir_awarding_body_id?: string | null;
2735
2750
  /**
2736
- * California DIR contract ID; null when not applicable.
2751
+ * California DIR project registration ID (an 11-digit number); present only for a compatible California prevailing-wage configuration and null when applicable but unset.
2737
2752
  */
2738
- dir_contract_id: string | null;
2753
+ dir_project_id?: string | null;
2739
2754
  /**
2740
- * California DIR awarding-body name; null when not applicable.
2755
+ * California DIR project name; present only for a compatible California prevailing-wage configuration and null when applicable but unset.
2741
2756
  */
2742
- dir_project_awarding_body_name: string | null;
2757
+ dir_project_name?: string | null;
2743
2758
  /**
2744
- * California DIR project number; null when not applicable.
2759
+ * California DIR contract ID; present only for a compatible California prevailing-wage configuration and null when applicable but unset.
2745
2760
  */
2746
- dir_project_number: string | null;
2761
+ dir_contract_id?: string | null;
2747
2762
  /**
2748
- * Illinois DOL (Department of Labor) project ID; null when not applicable.
2763
+ * California DIR awarding-body name; present only for a compatible California prevailing-wage configuration and null when applicable but unset.
2749
2764
  */
2750
- il_dol_project_id: string | null;
2765
+ dir_project_awarding_body_name?: string | null;
2751
2766
  /**
2752
- * Whether the Illinois project is funded with state capital funds; null when not applicable.
2767
+ * California DIR project number; present only for a compatible California prevailing-wage configuration and null when applicable but unset.
2753
2768
  */
2754
- il_dol_state_capital_funds: boolean | null;
2769
+ dir_project_number?: string | null;
2755
2770
  /**
2756
- * Illinois DOL public-body name; null when not applicable.
2771
+ * Illinois DOL (Department of Labor) project ID; present only for a compatible Illinois prevailing-wage configuration and null when applicable but unset.
2757
2772
  */
2758
- il_dol_public_body_name: string | null;
2773
+ il_dol_project_id?: string | null;
2759
2774
  /**
2760
- * ID of the Illinois DOL public-body contact; null when not applicable.
2775
+ * Whether the Illinois project is funded with state capital funds; present only for a compatible Illinois prevailing-wage configuration and null when applicable but unset.
2761
2776
  */
2762
- il_dol_public_body_contact_id: string | null;
2777
+ il_dol_state_capital_funds?: boolean | null;
2763
2778
  /**
2764
- * ID of the Illinois DOL public-body address; null when not applicable.
2779
+ * Illinois DOL public-body name; present only for a compatible Illinois prevailing-wage configuration and null when applicable but unset.
2765
2780
  */
2766
- il_dol_public_body_address_id: string | null;
2781
+ il_dol_public_body_name?: string | null;
2767
2782
  /**
2768
- * Illinois DOL contract number; null when not applicable.
2783
+ * ID of the Illinois DOL public-body contact; present only for a compatible Illinois prevailing-wage configuration and null when applicable but unset.
2769
2784
  */
2770
- il_dol_contract_number: string | null;
2785
+ il_dol_public_body_contact_id?: string | null;
2771
2786
  /**
2772
- * Illinois SHINES project ID; null when not applicable.
2787
+ * ID of the Illinois DOL public-body address; present only for a compatible Illinois prevailing-wage configuration and null when applicable but unset.
2773
2788
  */
2774
- il_shines_project_id: string | null;
2789
+ il_dol_public_body_address_id?: string | null;
2775
2790
  /**
2776
- * New York DOL prevailing-rate-case (PRC) number, a 10-digit identifier; null when not applicable.
2791
+ * Illinois DOL contract number; present only for a compatible Illinois prevailing-wage configuration and null when applicable but unset.
2777
2792
  */
2778
- ny_dol_prc_number: string | null;
2793
+ il_dol_contract_number?: string | null;
2779
2794
  /**
2780
- * Whether new positions on the job default to paying the full fringe as cash.
2795
+ * Illinois SHINES project ID; present only for a compatible Illinois prevailing-wage configuration and null when applicable but unset.
2781
2796
  */
2782
- pay_full_cash_fringe_by_default: boolean;
2797
+ il_shines_project_id?: string | null;
2783
2798
  /**
2784
- * Role of the company on this job for PWA reporting: one of prime_contractor or sub_contractor; null when unset.
2799
+ * New York DOL prevailing-rate-case (PRC) number, a 10-digit identifier; present only for a compatible New York prevailing-wage configuration and null when applicable but unset.
2785
2800
  */
2786
- contractor_type: string | null;
2801
+ ny_dol_prc_number?: string | null;
2787
2802
  } | null;
2788
2803
  /**
2789
2804
  * Parameters for creating a job. Sets the job's schedule, work types, address, and optional Prevailing Wage / Apprenticeship (PWA) compliance. Extra keys are accepted, including custom fields.
@@ -2954,17 +2969,17 @@ export type JobParameters = {
2954
2969
  value?: string | null;
2955
2970
  }> | null;
2956
2971
  /**
2957
- * Prevailing-wage / apprenticeship (PWA) compliance details to set on the job; which fields apply depends on region. Null when the job tracks no PWA compliance.
2972
+ * 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.
2958
2973
  */
2959
2974
  pwa_details?: {
2960
2975
  /**
2961
2976
  * Role of the company on this job for PWA reporting: one of prime_contractor or sub_contractor; null when unset.
2962
2977
  */
2963
- contractor_type?: string | null;
2978
+ contractor_type?: 'prime_contractor' | 'sub_contractor' | null;
2964
2979
  /**
2965
- * Whether new positions on the job default to paying the full fringe as cash; null when unset.
2980
+ * Whether new positions on the job default to paying the full fringe as cash. Omit to retain the current value (or use the database default on create); when sent, the value must be true or false.
2966
2981
  */
2967
- pay_full_cash_fringe_by_default?: boolean | null;
2982
+ pay_full_cash_fringe_by_default?: boolean;
2968
2983
  /**
2969
2984
  * California DIR (Department of Industrial Relations) awarding-body ID; null when not applicable.
2970
2985
  */
@@ -3001,14 +3016,6 @@ export type JobParameters = {
3001
3016
  * Illinois DOL public-body name; null when not applicable.
3002
3017
  */
3003
3018
  il_dol_public_body_name?: string | null;
3004
- /**
3005
- * Illinois DOL contract number; null when not applicable.
3006
- */
3007
- il_dol_contract_number?: string | null;
3008
- /**
3009
- * Illinois SHINES project ID; null when not applicable.
3010
- */
3011
- il_shines_project_id?: string | null;
3012
3019
  /**
3013
3020
  * ID of the Illinois DOL public-body contact; null when not applicable.
3014
3021
  */
@@ -3017,11 +3024,19 @@ export type JobParameters = {
3017
3024
  * ID of the Illinois DOL public-body address; null when not applicable.
3018
3025
  */
3019
3026
  il_dol_public_body_address_id?: string | null;
3027
+ /**
3028
+ * Illinois DOL contract number; null when not applicable.
3029
+ */
3030
+ il_dol_contract_number?: string | null;
3031
+ /**
3032
+ * Illinois SHINES project ID; null when not applicable.
3033
+ */
3034
+ il_shines_project_id?: string | null;
3020
3035
  /**
3021
3036
  * New York DOL prevailing-rate-case (PRC) number, a 10-digit identifier; null when not applicable.
3022
3037
  */
3023
3038
  ny_dol_prc_number?: string | null;
3024
- } | null;
3039
+ };
3025
3040
  [key: string]: unknown;
3026
3041
  };
3027
3042
  /**
@@ -4579,11 +4594,11 @@ export type PayPeriodsResponseObject = {
4579
4594
  }>;
4580
4595
  };
4581
4596
  /**
4582
- * One problem found while processing an accepted import.
4597
+ * One problem found while processing an accepted import, whatever its type.
4583
4598
  */
4584
- export type TimeEntryImportProcessingError = {
4599
+ export type ImportProcessingError = {
4585
4600
  /**
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.
4601
+ * What went wrong, as a stable slug — `no_active_employee`, `job_not_found`, `time_overlap` and so on. The vocabulary varies by import type. `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
4602
  */
4588
4603
  code: string;
4589
4604
  /**
@@ -4601,6 +4616,104 @@ export type TimeEntryImportProcessingError = {
4601
4616
  [key: string]: unknown;
4602
4617
  };
4603
4618
  };
4619
+ /**
4620
+ * One bulk upload of day-level hours against a pay period, and how it turned out.
4621
+ */
4622
+ export type AggregateTimeImportResponseObject = {
4623
+ /**
4624
+ * Unique identifier.
4625
+ */
4626
+ id: string;
4627
+ /**
4628
+ * The pay period the hours were imported against.
4629
+ */
4630
+ pay_period_id: string;
4631
+ /**
4632
+ * Where the import has got to. `pending` until the background job starts, then `success` or `failed`.
4633
+ */
4634
+ status: 'pending' | 'processing' | 'processed' | 'success' | 'failed';
4635
+ /**
4636
+ * 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.
4637
+ */
4638
+ processed_rows_count: number;
4639
+ /**
4640
+ * Every problem found after the import was accepted, oldest row first; empty when there were none, and always empty while the import is `pending`.
4641
+ */
4642
+ processing_errors: Array<ImportProcessingError>;
4643
+ /**
4644
+ * When processing finished; null while the import is still pending.
4645
+ */
4646
+ completed_at: string | null;
4647
+ /**
4648
+ * When the import was submitted.
4649
+ */
4650
+ created_at: string;
4651
+ /**
4652
+ * When the import was last modified.
4653
+ */
4654
+ updated_at: string;
4655
+ };
4656
+ /**
4657
+ * Submit a spreadsheet of day-level hours for a pay period. The pay period's pay schedule must keep time in aggregate mode and take pay in base mode; a schedule that keeps time as entries, or that aggregates pay, is refused. The file carries employee_payroll_id, job_id and week_ending_date, the three wage pay rates one_x_wage_pay_rate, one_five_x_wage_pay_rate and two_x_wage_pay_rate, and one hours column per multiplier per day of the period — seven days each for a weekly schedule, fourteen for a biweekly one. All of them must be present as column headers, or the file is refused naming the ones missing. Of those, employee_payroll_id, job_id and week_ending_date must also carry a value on every row; a rate left blank falls back to the one the employee's position and wage determination already carry. federal_labor_classification and regional_labor_classification are read when present, and are needed only where a position has more than one wage determination in a jurisdiction. 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.
4658
+ *
4659
+ * Submitting the same work twice is refused rather than doubled: an import will not write onto a time card that already holds data, so a retry after a submission that already succeeded answers 422 naming `time_card_has_data`, and nothing is written. The guard is per time card, not per file, so a corrected file for the same worker and period is refused the same way — clear that period's data first.
4660
+ *
4661
+ * Because acceptance is synchronous but the write happens in the background, only one import at a time is accepted for a pay period: while an earlier one is still `pending`, a second answers 409 naming `import_in_progress`, and nothing is written. Poll the earlier import until it reports, then submit again.
4662
+ */
4663
+ export type AggregateTimeImportParameters = {
4664
+ /**
4665
+ * A signed_id from POST /api/v1/direct_uploads identifying the uploaded spreadsheet. Register the upload naming `pay_periods.imports.aggregate_times` — a signed_id issued for any other resource will not resolve here.
4666
+ */
4667
+ file_signed_id: string;
4668
+ };
4669
+ /**
4670
+ * One bulk upload of a certified payroll report against a pay period, and how it turned out.
4671
+ */
4672
+ export type DsptchCprImportResponseObject = {
4673
+ /**
4674
+ * Unique identifier.
4675
+ */
4676
+ id: string;
4677
+ /**
4678
+ * The pay period the report was imported against.
4679
+ */
4680
+ pay_period_id: string;
4681
+ /**
4682
+ * Where the import has got to. `pending` until the background job starts, then `success` or `failed`.
4683
+ */
4684
+ status: 'pending' | 'processing' | 'processed' | 'success' | 'failed';
4685
+ /**
4686
+ * 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.
4687
+ */
4688
+ processed_rows_count: number;
4689
+ /**
4690
+ * Every problem found after the import was accepted, oldest row first; empty when there were none, and always empty while the import is `pending`.
4691
+ */
4692
+ processing_errors: Array<ImportProcessingError>;
4693
+ /**
4694
+ * When processing finished; null while the import is still pending.
4695
+ */
4696
+ completed_at: string | null;
4697
+ /**
4698
+ * When the import was submitted.
4699
+ */
4700
+ created_at: string;
4701
+ /**
4702
+ * When the import was last modified.
4703
+ */
4704
+ updated_at: string;
4705
+ };
4706
+ /**
4707
+ * Submit a certified payroll report for a pay period. The pay period's pay schedule must be in aggregate time mode; a schedule that keeps time as entries is refused. The file carries every column of the DSPTCH CPR template: the payroll, job and employee identifiers, the employer and employee pay, contribution and deduction amounts, the three wage pay rates, and one hours column per multiplier per day of the period — seven days each for a weekly schedule, fourteen for a biweekly one. All of them must be present as column headers, or the file is refused naming the ones missing. Of those, job_id, week_ending_date, employee_payroll_id, one_x_wage_pay_rate and one_five_x_wage_pay_rate must also carry a value on every row, and two_x_wage_pay_rate must whenever any 2x hours column does. federal_labor_classification and regional_labor_classification are read when present, and are needed only where a position has more than one wage determination in a jurisdiction. 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.
4708
+ *
4709
+ * Submitting the same work twice is refused rather than doubled: an import will not write onto a time card that already holds data, so a retry after a submission that already succeeded answers 422 naming `time_card_has_data`, and nothing is written. The guard is per time card, not per file, so a corrected file for the same worker and period is refused the same way — clear that period's data first. Because acceptance is synchronous but the write happens in the background, two submissions racing each other can both be accepted; the second one then fails on the same guard and reports it through `processing_errors`.
4710
+ */
4711
+ export type DsptchCprImportParameters = {
4712
+ /**
4713
+ * A signed_id from POST /api/v1/direct_uploads identifying the uploaded spreadsheet. Register the upload naming `pay_periods.imports.dsptch_cprs` — a signed_id issued for any other resource will not resolve here.
4714
+ */
4715
+ file_signed_id: string;
4716
+ };
4604
4717
  /**
4605
4718
  * One bulk upload of time entries against a pay period, and how it turned out.
4606
4719
  */
@@ -4624,7 +4737,7 @@ export type TimeEntryImportResponseObject = {
4624
4737
  /**
4625
4738
  * 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
4739
  */
4627
- processing_errors: Array<TimeEntryImportProcessingError>;
4740
+ processing_errors: Array<ImportProcessingError>;
4628
4741
  /**
4629
4742
  * When processing finished; null while the import is still pending.
4630
4743
  */
@@ -15694,6 +15807,10 @@ export type CreateJobData = {
15694
15807
  url: '/api/v1/jobs';
15695
15808
  };
15696
15809
  export type CreateJobErrors = {
15810
+ /**
15811
+ * Bad Request
15812
+ */
15813
+ 400: Problem;
15697
15814
  /**
15698
15815
  * Forbidden
15699
15816
  */
@@ -15746,6 +15863,10 @@ export type UpdateJobData = {
15746
15863
  url: '/api/v1/jobs/{id}';
15747
15864
  };
15748
15865
  export type UpdateJobErrors = {
15866
+ /**
15867
+ * Bad Request
15868
+ */
15869
+ 400: Problem;
15749
15870
  /**
15750
15871
  * Forbidden
15751
15872
  */
@@ -16422,6 +16543,258 @@ export type UpdateOvertimeRuleResponses = {
16422
16543
  200: OvertimeRuleResponseObject;
16423
16544
  };
16424
16545
  export type UpdateOvertimeRuleResponse = UpdateOvertimeRuleResponses[keyof UpdateOvertimeRuleResponses];
16546
+ export type ListAggregateTimeImportsData = {
16547
+ body?: never;
16548
+ path: {
16549
+ pay_period_id: string;
16550
+ };
16551
+ query?: {
16552
+ /**
16553
+ * Filter by import status:
16554
+ * * `pending`
16555
+ * * `processing`
16556
+ * * `processed`
16557
+ * * `success`
16558
+ * * `failed`
16559
+ *
16560
+ */
16561
+ 'filter[status]'?: string;
16562
+ filter?: string;
16563
+ 'filter[unexpected]'?: string;
16564
+ 'filter[completed_at][gte]'?: string;
16565
+ 'filter[completed_at][lte]'?: string;
16566
+ 'filter[created_at][gte]'?: string;
16567
+ 'filter[created_at][lte]'?: string;
16568
+ 'filter[updated_at][gte]'?: string;
16569
+ 'filter[updated_at][lte]'?: string;
16570
+ /**
16571
+ * This pagination cursor corresponds to the cursor value found in the response in
16572
+ * `meta.page.next_cursor`.
16573
+ */
16574
+ 'page[cursor]'?: string;
16575
+ /**
16576
+ * 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`.
16577
+ */
16578
+ 'page[limit]'?: number;
16579
+ page?: string;
16580
+ };
16581
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/aggregate_times';
16582
+ };
16583
+ export type ListAggregateTimeImportsErrors = {
16584
+ /**
16585
+ * Bad Request
16586
+ */
16587
+ 400: Problem;
16588
+ /**
16589
+ * Forbidden
16590
+ */
16591
+ 403: Problem;
16592
+ /**
16593
+ * Unprocessable Content
16594
+ */
16595
+ 422: Problem;
16596
+ };
16597
+ export type ListAggregateTimeImportsError = ListAggregateTimeImportsErrors[keyof ListAggregateTimeImportsErrors];
16598
+ export type ListAggregateTimeImportsResponses = {
16599
+ /**
16600
+ * Success
16601
+ */
16602
+ 200: {
16603
+ meta: Meta;
16604
+ links: Links;
16605
+ data: Array<AggregateTimeImportResponseObject>;
16606
+ };
16607
+ };
16608
+ export type ListAggregateTimeImportsResponse = ListAggregateTimeImportsResponses[keyof ListAggregateTimeImportsResponses];
16609
+ export type CreateAggregateTimeImportData = {
16610
+ body: AggregateTimeImportParameters;
16611
+ path: {
16612
+ pay_period_id: string;
16613
+ };
16614
+ query?: never;
16615
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/aggregate_times';
16616
+ };
16617
+ export type CreateAggregateTimeImportErrors = {
16618
+ /**
16619
+ * Bad Request
16620
+ */
16621
+ 400: Problem;
16622
+ /**
16623
+ * Forbidden
16624
+ */
16625
+ 403: Problem;
16626
+ /**
16627
+ * Not Found
16628
+ */
16629
+ 404: Problem;
16630
+ /**
16631
+ * Conflict
16632
+ */
16633
+ 409: Problem;
16634
+ /**
16635
+ * Unprocessable Content
16636
+ */
16637
+ 422: Problem;
16638
+ };
16639
+ export type CreateAggregateTimeImportError = CreateAggregateTimeImportErrors[keyof CreateAggregateTimeImportErrors];
16640
+ export type CreateAggregateTimeImportResponses = {
16641
+ /**
16642
+ * Created
16643
+ */
16644
+ 201: AggregateTimeImportResponseObject;
16645
+ };
16646
+ export type CreateAggregateTimeImportResponse = CreateAggregateTimeImportResponses[keyof CreateAggregateTimeImportResponses];
16647
+ export type GetAggregateTimeImportData = {
16648
+ body?: never;
16649
+ path: {
16650
+ pay_period_id: string;
16651
+ id: string;
16652
+ };
16653
+ query?: never;
16654
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/aggregate_times/{id}';
16655
+ };
16656
+ export type GetAggregateTimeImportErrors = {
16657
+ /**
16658
+ * Forbidden
16659
+ */
16660
+ 403: Problem;
16661
+ /**
16662
+ * Not Found
16663
+ */
16664
+ 404: Problem;
16665
+ };
16666
+ export type GetAggregateTimeImportError = GetAggregateTimeImportErrors[keyof GetAggregateTimeImportErrors];
16667
+ export type GetAggregateTimeImportResponses = {
16668
+ /**
16669
+ * Success
16670
+ */
16671
+ 200: AggregateTimeImportResponseObject;
16672
+ };
16673
+ export type GetAggregateTimeImportResponse = GetAggregateTimeImportResponses[keyof GetAggregateTimeImportResponses];
16674
+ export type ListDsptchCprImportsData = {
16675
+ body?: never;
16676
+ path: {
16677
+ pay_period_id: string;
16678
+ };
16679
+ query?: {
16680
+ /**
16681
+ * Filter by import status:
16682
+ * * `pending`
16683
+ * * `processing`
16684
+ * * `processed`
16685
+ * * `success`
16686
+ * * `failed`
16687
+ *
16688
+ */
16689
+ 'filter[status]'?: string;
16690
+ filter?: string;
16691
+ 'filter[unexpected]'?: string;
16692
+ 'filter[completed_at][gte]'?: string;
16693
+ 'filter[completed_at][lte]'?: string;
16694
+ 'filter[created_at][gte]'?: string;
16695
+ 'filter[created_at][lte]'?: string;
16696
+ 'filter[updated_at][gte]'?: string;
16697
+ 'filter[updated_at][lte]'?: string;
16698
+ /**
16699
+ * This pagination cursor corresponds to the cursor value found in the response in
16700
+ * `meta.page.next_cursor`.
16701
+ */
16702
+ 'page[cursor]'?: string;
16703
+ /**
16704
+ * 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`.
16705
+ */
16706
+ 'page[limit]'?: number;
16707
+ page?: string;
16708
+ };
16709
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/dsptch_cprs';
16710
+ };
16711
+ export type ListDsptchCprImportsErrors = {
16712
+ /**
16713
+ * Bad Request
16714
+ */
16715
+ 400: Problem;
16716
+ /**
16717
+ * Forbidden
16718
+ */
16719
+ 403: Problem;
16720
+ /**
16721
+ * Unprocessable Content
16722
+ */
16723
+ 422: Problem;
16724
+ };
16725
+ export type ListDsptchCprImportsError = ListDsptchCprImportsErrors[keyof ListDsptchCprImportsErrors];
16726
+ export type ListDsptchCprImportsResponses = {
16727
+ /**
16728
+ * Success
16729
+ */
16730
+ 200: {
16731
+ meta: Meta;
16732
+ links: Links;
16733
+ data: Array<DsptchCprImportResponseObject>;
16734
+ };
16735
+ };
16736
+ export type ListDsptchCprImportsResponse = ListDsptchCprImportsResponses[keyof ListDsptchCprImportsResponses];
16737
+ export type CreateDsptchCprImportData = {
16738
+ body: DsptchCprImportParameters;
16739
+ path: {
16740
+ pay_period_id: string;
16741
+ };
16742
+ query?: never;
16743
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/dsptch_cprs';
16744
+ };
16745
+ export type CreateDsptchCprImportErrors = {
16746
+ /**
16747
+ * Bad Request
16748
+ */
16749
+ 400: Problem;
16750
+ /**
16751
+ * Forbidden
16752
+ */
16753
+ 403: Problem;
16754
+ /**
16755
+ * Not Found
16756
+ */
16757
+ 404: Problem;
16758
+ /**
16759
+ * Unprocessable Content
16760
+ */
16761
+ 422: Problem;
16762
+ };
16763
+ export type CreateDsptchCprImportError = CreateDsptchCprImportErrors[keyof CreateDsptchCprImportErrors];
16764
+ export type CreateDsptchCprImportResponses = {
16765
+ /**
16766
+ * Created
16767
+ */
16768
+ 201: DsptchCprImportResponseObject;
16769
+ };
16770
+ export type CreateDsptchCprImportResponse = CreateDsptchCprImportResponses[keyof CreateDsptchCprImportResponses];
16771
+ export type GetDsptchCprImportData = {
16772
+ body?: never;
16773
+ path: {
16774
+ pay_period_id: string;
16775
+ id: string;
16776
+ };
16777
+ query?: never;
16778
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/dsptch_cprs/{id}';
16779
+ };
16780
+ export type GetDsptchCprImportErrors = {
16781
+ /**
16782
+ * Forbidden
16783
+ */
16784
+ 403: Problem;
16785
+ /**
16786
+ * Not Found
16787
+ */
16788
+ 404: Problem;
16789
+ };
16790
+ export type GetDsptchCprImportError = GetDsptchCprImportErrors[keyof GetDsptchCprImportErrors];
16791
+ export type GetDsptchCprImportResponses = {
16792
+ /**
16793
+ * Success
16794
+ */
16795
+ 200: DsptchCprImportResponseObject;
16796
+ };
16797
+ export type GetDsptchCprImportResponse = GetDsptchCprImportResponses[keyof GetDsptchCprImportResponses];
16425
16798
  export type ListTimeEntryImportsData = {
16426
16799
  body?: never;
16427
16800
  path: {
@@ -18315,6 +18688,40 @@ export type UpdateApprenticeshipOccupationResponses = {
18315
18688
  200: PwaTradeApprenticeshipOccupationResponseObject;
18316
18689
  };
18317
18690
  export type UpdateApprenticeshipOccupationResponse = UpdateApprenticeshipOccupationResponses[keyof UpdateApprenticeshipOccupationResponses];
18691
+ export type CreateMergeData = {
18692
+ body: PwaTradeMergeParameters;
18693
+ path: {
18694
+ trade_id: string;
18695
+ };
18696
+ query?: never;
18697
+ url: '/api/v1/pwa/trades/{trade_id}/merges';
18698
+ };
18699
+ export type CreateMergeErrors = {
18700
+ /**
18701
+ * Bad Request
18702
+ */
18703
+ 400: Problem;
18704
+ /**
18705
+ * Forbidden
18706
+ */
18707
+ 403: Problem;
18708
+ /**
18709
+ * Not Found
18710
+ */
18711
+ 404: Problem;
18712
+ /**
18713
+ * Unprocessable Content
18714
+ */
18715
+ 422: Problem;
18716
+ };
18717
+ export type CreateMergeError = CreateMergeErrors[keyof CreateMergeErrors];
18718
+ export type CreateMergeResponses = {
18719
+ /**
18720
+ * Success
18721
+ */
18722
+ 200: PwaTradeResponseObject;
18723
+ };
18724
+ export type CreateMergeResponse = CreateMergeResponses[keyof CreateMergeResponses];
18318
18725
  export type ListTradesData = {
18319
18726
  body?: never;
18320
18727
  path?: never;