@dsptch-work/api-client 0.50.0 → 0.51.1

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.
@@ -239,6 +239,12 @@ export declare const zProblem: z.ZodObject<{
239
239
  *
240
240
  * The upload behind an image attachment's signed id is not an image content type. Upload an image file.
241
241
  *
242
+ * ### certified_payroll_export_blocked
243
+ *
244
+ * **Certified Payroll Export Blocked**
245
+ *
246
+ * Failing compliance checks block this certified payroll export: a job-level check on the named job, or a time-card check on a worker the export would include. These are the same checks that disable Export in the web app. Resolve the failing checks, then retry.
247
+ *
242
248
  * ### certified_payroll_format_unavailable
243
249
  *
244
250
  * **Certified Payroll Format Unavailable**
@@ -427,6 +433,7 @@ export declare const zProblemTypeCatalog: z.ZodEnum<{
427
433
  version_overlap: "version_overlap";
428
434
  precondition_failed: "precondition_failed";
429
435
  attachment_not_image: "attachment_not_image";
436
+ certified_payroll_export_blocked: "certified_payroll_export_blocked";
430
437
  certified_payroll_format_unavailable: "certified_payroll_format_unavailable";
431
438
  company_not_employer: "company_not_employer";
432
439
  confirm_apprenticeship_conflict: "confirm_apprenticeship_conflict";
@@ -3819,7 +3826,7 @@ export declare const zDsptchCprImportResponseObject: z.ZodObject<{
3819
3826
  updated_at: z.ZodISODateTime;
3820
3827
  }, z.core.$strip>;
3821
3828
  /**
3822
- * 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.
3829
+ * 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. On a job that tracks prevailing wage, each rate must also be more than 0 when the row has hours at its multiplier: a row that prices such hours at 0 or below answers 422 naming `non_positive_rate_for_prevailing_wage_hours`, and nothing is written. 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.
3823
3830
  *
3824
3831
  * 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.
3825
3832
  *
@@ -5863,7 +5870,7 @@ export declare const zJobCaEcprXmlExportResponseObject: z.ZodObject<{
5863
5870
  created_at: z.ZodISODateTime;
5864
5871
  }, z.core.$strip>;
5865
5872
  /**
5866
- * Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. A window with no reportable pay periods answers 422 nothing_exportable.
5873
+ * Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. Failing compliance checks that block the export answer 422 certified_payroll_export_blocked. A window with no reportable pay periods answers 422 nothing_exportable.
5867
5874
  */
5868
5875
  export declare const zJobCaEcprXmlExportCreateParameters: z.ZodObject<{
5869
5876
  start_date: z.ZodISODate;
@@ -11680,7 +11687,7 @@ export declare const zAssetsSubLocationUpdateParameters: z.ZodObject<{
11680
11687
  code: z.ZodOptional<z.ZodString>;
11681
11688
  }, z.core.$strip>;
11682
11689
  /**
11683
- * A completed movement of item stock between two holders, each a site, a user, or a container. Each line moves one item; applying the transfer records paired outbound and inbound transactions and updates the on-hand, custody, and containment counts. Transfers created through this API are always completed. One-sided moves (placing or removing an item with only one endpoint) record transactions but no transfer, and so are not represented by this resource.
11690
+ * A movement of item stock between two holders, each a site, a user, or a container. Each line names one item. A completed transfer has applied paired outbound and inbound transactions and updated on-hand, custody, and containment counts. A pending transfer has not moved stock; it waits to be accepted, declined, or cancelled. One-sided moves (placing or removing an item with only one endpoint) record transactions but no transfer, and so are not represented by this resource.
11684
11691
  */
11685
11692
  export declare const zAssetsTransferResponseObject: z.ZodObject<{
11686
11693
  id: z.ZodString;
@@ -11689,6 +11696,7 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
11689
11696
  pending: "pending";
11690
11697
  cancelled: "cancelled";
11691
11698
  completed: "completed";
11699
+ declined: "declined";
11692
11700
  in_transit: "in_transit";
11693
11701
  }>;
11694
11702
  from_assets_site_id: z.ZodNullable<z.ZodString>;
@@ -11699,7 +11707,9 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
11699
11707
  to_container_item_id: z.ZodNullable<z.ZodString>;
11700
11708
  to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
11701
11709
  initiated_by_user_id: z.ZodString;
11710
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
11702
11711
  completed_at: z.ZodNullable<z.ZodISODateTime>;
11712
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
11703
11713
  transfer_lines: z.ZodArray<z.ZodObject<{
11704
11714
  id: z.ZodString;
11705
11715
  assets_item_id: z.ZodString;
@@ -11710,7 +11720,7 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
11710
11720
  updated_at: z.ZodISODateTime;
11711
11721
  }, z.core.$strip>;
11712
11722
  /**
11713
- * Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). With a single open end it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. Moves are applied immediately, so the source must hold enough of each item.
11723
+ * Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). Omit status or send completed to apply it immediately; send pending to persist without moving stock. A pending create requires both endpoints (one endpoint answers 422). With a single open end and completed (or omitted) status it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. A completed create applies immediately, so the source must hold enough of each item.
11714
11724
  */
11715
11725
  export declare const zAssetsTransferParameters: z.ZodObject<{
11716
11726
  from_assets_site_id: z.ZodOptional<z.ZodString>;
@@ -11722,11 +11732,50 @@ export declare const zAssetsTransferParameters: z.ZodObject<{
11722
11732
  to_container_item_id: z.ZodOptional<z.ZodString>;
11723
11733
  to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11724
11734
  performed_by_user_id: z.ZodString;
11735
+ status: z.ZodOptional<z.ZodEnum<{
11736
+ pending: "pending";
11737
+ completed: "completed";
11738
+ }>>;
11725
11739
  line_items: z.ZodArray<z.ZodObject<{
11726
11740
  assets_item_id: z.ZodString;
11727
11741
  quantity: z.ZodInt;
11728
11742
  }, z.core.$strip>>;
11729
11743
  }, z.core.$strip>;
11744
+ /**
11745
+ * Answer a transfer — decline, cancel, or reopen it. The named filer is recorded on the step. An optional note is the step comment.
11746
+ */
11747
+ export declare const zAssetsTransferCommandParameters: z.ZodObject<{
11748
+ performed_by_user_id: z.ZodString;
11749
+ note: z.ZodOptional<z.ZodString>;
11750
+ }, z.core.$strip>;
11751
+ /**
11752
+ * Accept a pending transfer and move its stock. The named filer is recorded on the step. An optional note is the step comment. Optional placements put individual lines away at the destination; a line without a placement lands in the destination holder's own bucket.
11753
+ */
11754
+ export declare const zAssetsTransferAcceptanceParameters: z.ZodObject<{
11755
+ performed_by_user_id: z.ZodString;
11756
+ note: z.ZodOptional<z.ZodString>;
11757
+ placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
11758
+ line_id: z.ZodString;
11759
+ container_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11760
+ sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11761
+ }, z.core.$strip>>>;
11762
+ }, z.core.$strip>;
11763
+ /**
11764
+ * Add a line to a pending transfer. The item is identified the same way create's line_items are, under this transfer's source holder. Stock stays with the sender until the transfer is accepted. A resolved transfer answers 422.
11765
+ */
11766
+ export declare const zAssetsTransferLineParameters: z.ZodObject<{
11767
+ assets_item_id: z.ZodString;
11768
+ quantity: z.ZodInt;
11769
+ from_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11770
+ to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11771
+ }, z.core.$strip>;
11772
+ /**
11773
+ * Change a pending transfer line's quantity and/or destination storage location. A resolved transfer answers 422. A line that is not on this transfer answers 404.
11774
+ */
11775
+ export declare const zAssetsTransferLineUpdateParameters: z.ZodObject<{
11776
+ quantity: z.ZodOptional<z.ZodInt>;
11777
+ to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11778
+ }, z.core.$strip>;
11730
11779
  /**
11731
11780
  * Add stock of a bulk product to a holder — a site, a user's custody, or a container — recording a receive transaction. Name the holder with exactly one of assets_site_id, user_id, or container_item_id; several answer 422 at each named key, and none answers 422. Bulk products only.
11732
11781
  */
@@ -16536,6 +16585,7 @@ export declare const zListTransfersResponse: z.ZodObject<{
16536
16585
  pending: "pending";
16537
16586
  cancelled: "cancelled";
16538
16587
  completed: "completed";
16588
+ declined: "declined";
16539
16589
  in_transit: "in_transit";
16540
16590
  }>;
16541
16591
  from_assets_site_id: z.ZodNullable<z.ZodString>;
@@ -16546,7 +16596,9 @@ export declare const zListTransfersResponse: z.ZodObject<{
16546
16596
  to_container_item_id: z.ZodNullable<z.ZodString>;
16547
16597
  to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16548
16598
  initiated_by_user_id: z.ZodString;
16599
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16549
16600
  completed_at: z.ZodNullable<z.ZodISODateTime>;
16601
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16550
16602
  transfer_lines: z.ZodArray<z.ZodObject<{
16551
16603
  id: z.ZodString;
16552
16604
  assets_item_id: z.ZodString;
@@ -16567,6 +16619,10 @@ export declare const zCreateTransferBody: z.ZodObject<{
16567
16619
  to_container_item_id: z.ZodOptional<z.ZodString>;
16568
16620
  to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16569
16621
  performed_by_user_id: z.ZodString;
16622
+ status: z.ZodOptional<z.ZodEnum<{
16623
+ pending: "pending";
16624
+ completed: "completed";
16625
+ }>>;
16570
16626
  line_items: z.ZodArray<z.ZodObject<{
16571
16627
  assets_item_id: z.ZodString;
16572
16628
  quantity: z.ZodInt;
@@ -16579,6 +16635,7 @@ export declare const zCreateTransferResponse: z.ZodUnion<readonly [z.ZodObject<{
16579
16635
  pending: "pending";
16580
16636
  cancelled: "cancelled";
16581
16637
  completed: "completed";
16638
+ declined: "declined";
16582
16639
  in_transit: "in_transit";
16583
16640
  }>;
16584
16641
  from_assets_site_id: z.ZodNullable<z.ZodString>;
@@ -16589,7 +16646,9 @@ export declare const zCreateTransferResponse: z.ZodUnion<readonly [z.ZodObject<{
16589
16646
  to_container_item_id: z.ZodNullable<z.ZodString>;
16590
16647
  to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16591
16648
  initiated_by_user_id: z.ZodString;
16649
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16592
16650
  completed_at: z.ZodNullable<z.ZodISODateTime>;
16651
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16593
16652
  transfer_lines: z.ZodArray<z.ZodObject<{
16594
16653
  id: z.ZodString;
16595
16654
  assets_item_id: z.ZodString;
@@ -16612,6 +16671,263 @@ export declare const zGetTransferResponse: z.ZodObject<{
16612
16671
  pending: "pending";
16613
16672
  cancelled: "cancelled";
16614
16673
  completed: "completed";
16674
+ declined: "declined";
16675
+ in_transit: "in_transit";
16676
+ }>;
16677
+ from_assets_site_id: z.ZodNullable<z.ZodString>;
16678
+ from_user_id: z.ZodNullable<z.ZodString>;
16679
+ from_container_item_id: z.ZodNullable<z.ZodString>;
16680
+ to_assets_site_id: z.ZodNullable<z.ZodString>;
16681
+ to_user_id: z.ZodNullable<z.ZodString>;
16682
+ to_container_item_id: z.ZodNullable<z.ZodString>;
16683
+ to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16684
+ initiated_by_user_id: z.ZodString;
16685
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16686
+ completed_at: z.ZodNullable<z.ZodISODateTime>;
16687
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16688
+ transfer_lines: z.ZodArray<z.ZodObject<{
16689
+ id: z.ZodString;
16690
+ assets_item_id: z.ZodString;
16691
+ quantity: z.ZodInt;
16692
+ from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16693
+ }, z.core.$strip>>;
16694
+ created_at: z.ZodISODateTime;
16695
+ updated_at: z.ZodISODateTime;
16696
+ }, z.core.$strip>;
16697
+ export declare const zAcceptTransferBody: z.ZodObject<{
16698
+ performed_by_user_id: z.ZodString;
16699
+ note: z.ZodOptional<z.ZodString>;
16700
+ placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
16701
+ line_id: z.ZodString;
16702
+ container_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16703
+ sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16704
+ }, z.core.$strip>>>;
16705
+ }, z.core.$strip>;
16706
+ export declare const zAcceptTransferPath: z.ZodObject<{
16707
+ transfer_id: z.ZodString;
16708
+ }, z.core.$strip>;
16709
+ /**
16710
+ * Created
16711
+ */
16712
+ export declare const zAcceptTransferResponse: z.ZodObject<{
16713
+ id: z.ZodString;
16714
+ company_id: z.ZodString;
16715
+ status: z.ZodEnum<{
16716
+ pending: "pending";
16717
+ cancelled: "cancelled";
16718
+ completed: "completed";
16719
+ declined: "declined";
16720
+ in_transit: "in_transit";
16721
+ }>;
16722
+ from_assets_site_id: z.ZodNullable<z.ZodString>;
16723
+ from_user_id: z.ZodNullable<z.ZodString>;
16724
+ from_container_item_id: z.ZodNullable<z.ZodString>;
16725
+ to_assets_site_id: z.ZodNullable<z.ZodString>;
16726
+ to_user_id: z.ZodNullable<z.ZodString>;
16727
+ to_container_item_id: z.ZodNullable<z.ZodString>;
16728
+ to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16729
+ initiated_by_user_id: z.ZodString;
16730
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16731
+ completed_at: z.ZodNullable<z.ZodISODateTime>;
16732
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16733
+ transfer_lines: z.ZodArray<z.ZodObject<{
16734
+ id: z.ZodString;
16735
+ assets_item_id: z.ZodString;
16736
+ quantity: z.ZodInt;
16737
+ from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16738
+ }, z.core.$strip>>;
16739
+ created_at: z.ZodISODateTime;
16740
+ updated_at: z.ZodISODateTime;
16741
+ }, z.core.$strip>;
16742
+ export declare const zDeclineTransferBody: z.ZodObject<{
16743
+ performed_by_user_id: z.ZodString;
16744
+ note: z.ZodOptional<z.ZodString>;
16745
+ }, z.core.$strip>;
16746
+ export declare const zDeclineTransferPath: z.ZodObject<{
16747
+ transfer_id: z.ZodString;
16748
+ }, z.core.$strip>;
16749
+ /**
16750
+ * Created
16751
+ */
16752
+ export declare const zDeclineTransferResponse: z.ZodObject<{
16753
+ id: z.ZodString;
16754
+ company_id: z.ZodString;
16755
+ status: z.ZodEnum<{
16756
+ pending: "pending";
16757
+ cancelled: "cancelled";
16758
+ completed: "completed";
16759
+ declined: "declined";
16760
+ in_transit: "in_transit";
16761
+ }>;
16762
+ from_assets_site_id: z.ZodNullable<z.ZodString>;
16763
+ from_user_id: z.ZodNullable<z.ZodString>;
16764
+ from_container_item_id: z.ZodNullable<z.ZodString>;
16765
+ to_assets_site_id: z.ZodNullable<z.ZodString>;
16766
+ to_user_id: z.ZodNullable<z.ZodString>;
16767
+ to_container_item_id: z.ZodNullable<z.ZodString>;
16768
+ to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16769
+ initiated_by_user_id: z.ZodString;
16770
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16771
+ completed_at: z.ZodNullable<z.ZodISODateTime>;
16772
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16773
+ transfer_lines: z.ZodArray<z.ZodObject<{
16774
+ id: z.ZodString;
16775
+ assets_item_id: z.ZodString;
16776
+ quantity: z.ZodInt;
16777
+ from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16778
+ }, z.core.$strip>>;
16779
+ created_at: z.ZodISODateTime;
16780
+ updated_at: z.ZodISODateTime;
16781
+ }, z.core.$strip>;
16782
+ export declare const zCancelTransferBody: z.ZodObject<{
16783
+ performed_by_user_id: z.ZodString;
16784
+ note: z.ZodOptional<z.ZodString>;
16785
+ }, z.core.$strip>;
16786
+ export declare const zCancelTransferPath: z.ZodObject<{
16787
+ transfer_id: z.ZodString;
16788
+ }, z.core.$strip>;
16789
+ /**
16790
+ * Created
16791
+ */
16792
+ export declare const zCancelTransferResponse: z.ZodObject<{
16793
+ id: z.ZodString;
16794
+ company_id: z.ZodString;
16795
+ status: z.ZodEnum<{
16796
+ pending: "pending";
16797
+ cancelled: "cancelled";
16798
+ completed: "completed";
16799
+ declined: "declined";
16800
+ in_transit: "in_transit";
16801
+ }>;
16802
+ from_assets_site_id: z.ZodNullable<z.ZodString>;
16803
+ from_user_id: z.ZodNullable<z.ZodString>;
16804
+ from_container_item_id: z.ZodNullable<z.ZodString>;
16805
+ to_assets_site_id: z.ZodNullable<z.ZodString>;
16806
+ to_user_id: z.ZodNullable<z.ZodString>;
16807
+ to_container_item_id: z.ZodNullable<z.ZodString>;
16808
+ to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16809
+ initiated_by_user_id: z.ZodString;
16810
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16811
+ completed_at: z.ZodNullable<z.ZodISODateTime>;
16812
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16813
+ transfer_lines: z.ZodArray<z.ZodObject<{
16814
+ id: z.ZodString;
16815
+ assets_item_id: z.ZodString;
16816
+ quantity: z.ZodInt;
16817
+ from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16818
+ }, z.core.$strip>>;
16819
+ created_at: z.ZodISODateTime;
16820
+ updated_at: z.ZodISODateTime;
16821
+ }, z.core.$strip>;
16822
+ export declare const zReopenTransferBody: z.ZodObject<{
16823
+ performed_by_user_id: z.ZodString;
16824
+ note: z.ZodOptional<z.ZodString>;
16825
+ }, z.core.$strip>;
16826
+ export declare const zReopenTransferPath: z.ZodObject<{
16827
+ transfer_id: z.ZodString;
16828
+ }, z.core.$strip>;
16829
+ /**
16830
+ * Created
16831
+ */
16832
+ export declare const zReopenTransferResponse: z.ZodObject<{
16833
+ id: z.ZodString;
16834
+ company_id: z.ZodString;
16835
+ status: z.ZodEnum<{
16836
+ pending: "pending";
16837
+ cancelled: "cancelled";
16838
+ completed: "completed";
16839
+ declined: "declined";
16840
+ in_transit: "in_transit";
16841
+ }>;
16842
+ from_assets_site_id: z.ZodNullable<z.ZodString>;
16843
+ from_user_id: z.ZodNullable<z.ZodString>;
16844
+ from_container_item_id: z.ZodNullable<z.ZodString>;
16845
+ to_assets_site_id: z.ZodNullable<z.ZodString>;
16846
+ to_user_id: z.ZodNullable<z.ZodString>;
16847
+ to_container_item_id: z.ZodNullable<z.ZodString>;
16848
+ to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16849
+ initiated_by_user_id: z.ZodString;
16850
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16851
+ completed_at: z.ZodNullable<z.ZodISODateTime>;
16852
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16853
+ transfer_lines: z.ZodArray<z.ZodObject<{
16854
+ id: z.ZodString;
16855
+ assets_item_id: z.ZodString;
16856
+ quantity: z.ZodInt;
16857
+ from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16858
+ }, z.core.$strip>>;
16859
+ created_at: z.ZodISODateTime;
16860
+ updated_at: z.ZodISODateTime;
16861
+ }, z.core.$strip>;
16862
+ export declare const zCreateTransferLineBody: z.ZodObject<{
16863
+ assets_item_id: z.ZodString;
16864
+ quantity: z.ZodInt;
16865
+ from_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16866
+ to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16867
+ }, z.core.$strip>;
16868
+ export declare const zCreateTransferLinePath: z.ZodObject<{
16869
+ transfer_id: z.ZodString;
16870
+ }, z.core.$strip>;
16871
+ /**
16872
+ * Created
16873
+ */
16874
+ export declare const zCreateTransferLineResponse: z.ZodObject<{
16875
+ id: z.ZodString;
16876
+ company_id: z.ZodString;
16877
+ status: z.ZodEnum<{
16878
+ pending: "pending";
16879
+ cancelled: "cancelled";
16880
+ completed: "completed";
16881
+ declined: "declined";
16882
+ in_transit: "in_transit";
16883
+ }>;
16884
+ from_assets_site_id: z.ZodNullable<z.ZodString>;
16885
+ from_user_id: z.ZodNullable<z.ZodString>;
16886
+ from_container_item_id: z.ZodNullable<z.ZodString>;
16887
+ to_assets_site_id: z.ZodNullable<z.ZodString>;
16888
+ to_user_id: z.ZodNullable<z.ZodString>;
16889
+ to_container_item_id: z.ZodNullable<z.ZodString>;
16890
+ to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16891
+ initiated_by_user_id: z.ZodString;
16892
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16893
+ completed_at: z.ZodNullable<z.ZodISODateTime>;
16894
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16895
+ transfer_lines: z.ZodArray<z.ZodObject<{
16896
+ id: z.ZodString;
16897
+ assets_item_id: z.ZodString;
16898
+ quantity: z.ZodInt;
16899
+ from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16900
+ }, z.core.$strip>>;
16901
+ created_at: z.ZodISODateTime;
16902
+ updated_at: z.ZodISODateTime;
16903
+ }, z.core.$strip>;
16904
+ export declare const zDeleteTransferLinePath: z.ZodObject<{
16905
+ transfer_id: z.ZodString;
16906
+ line_id: z.ZodString;
16907
+ }, z.core.$strip>;
16908
+ /**
16909
+ * No Content
16910
+ */
16911
+ export declare const zDeleteTransferLineResponse: z.ZodVoid;
16912
+ export declare const zUpdateTransferLineBody: z.ZodObject<{
16913
+ quantity: z.ZodOptional<z.ZodInt>;
16914
+ to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16915
+ }, z.core.$strip>;
16916
+ export declare const zUpdateTransferLinePath: z.ZodObject<{
16917
+ transfer_id: z.ZodString;
16918
+ line_id: z.ZodString;
16919
+ }, z.core.$strip>;
16920
+ /**
16921
+ * Success
16922
+ */
16923
+ export declare const zUpdateTransferLineResponse: z.ZodObject<{
16924
+ id: z.ZodString;
16925
+ company_id: z.ZodString;
16926
+ status: z.ZodEnum<{
16927
+ pending: "pending";
16928
+ cancelled: "cancelled";
16929
+ completed: "completed";
16930
+ declined: "declined";
16615
16931
  in_transit: "in_transit";
16616
16932
  }>;
16617
16933
  from_assets_site_id: z.ZodNullable<z.ZodString>;
@@ -16622,7 +16938,9 @@ export declare const zGetTransferResponse: z.ZodObject<{
16622
16938
  to_container_item_id: z.ZodNullable<z.ZodString>;
16623
16939
  to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
16624
16940
  initiated_by_user_id: z.ZodString;
16941
+ resolved_by_user_id: z.ZodNullable<z.ZodString>;
16625
16942
  completed_at: z.ZodNullable<z.ZodISODateTime>;
16943
+ resolved_at: z.ZodNullable<z.ZodISODateTime>;
16626
16944
  transfer_lines: z.ZodArray<z.ZodObject<{
16627
16945
  id: z.ZodString;
16628
16946
  assets_item_id: z.ZodString;
@@ -240,6 +240,12 @@ export const zProblem = z.object({
240
240
  *
241
241
  * The upload behind an image attachment's signed id is not an image content type. Upload an image file.
242
242
  *
243
+ * ### certified_payroll_export_blocked
244
+ *
245
+ * **Certified Payroll Export Blocked**
246
+ *
247
+ * Failing compliance checks block this certified payroll export: a job-level check on the named job, or a time-card check on a worker the export would include. These are the same checks that disable Export in the web app. Resolve the failing checks, then retry.
248
+ *
243
249
  * ### certified_payroll_format_unavailable
244
250
  *
245
251
  * **Certified Payroll Format Unavailable**
@@ -428,6 +434,7 @@ export const zProblemTypeCatalog = z.enum([
428
434
  'version_overlap',
429
435
  'precondition_failed',
430
436
  'attachment_not_image',
437
+ 'certified_payroll_export_blocked',
431
438
  'certified_payroll_format_unavailable',
432
439
  'company_not_employer',
433
440
  'confirm_apprenticeship_conflict',
@@ -3540,7 +3547,7 @@ export const zDsptchCprImportResponseObject = z.object({
3540
3547
  updated_at: z.iso.datetime()
3541
3548
  });
3542
3549
  /**
3543
- * 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.
3550
+ * 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. On a job that tracks prevailing wage, each rate must also be more than 0 when the row has hours at its multiplier: a row that prices such hours at 0 or below answers 422 naming `non_positive_rate_for_prevailing_wage_hours`, and nothing is written. 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.
3544
3551
  *
3545
3552
  * 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.
3546
3553
  *
@@ -5392,7 +5399,7 @@ export const zJobCaEcprXmlExportResponseObject = z.object({
5392
5399
  created_at: z.iso.datetime()
5393
5400
  });
5394
5401
  /**
5395
- * Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. A window with no reportable pay periods answers 422 nothing_exportable.
5402
+ * Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. Failing compliance checks that block the export answer 422 certified_payroll_export_blocked. A window with no reportable pay periods answers 422 nothing_exportable.
5396
5403
  */
5397
5404
  export const zJobCaEcprXmlExportCreateParameters = z.object({
5398
5405
  start_date: z.iso.date(),
@@ -8852,7 +8859,7 @@ export const zAssetsSubLocationUpdateParameters = z.object({
8852
8859
  code: z.string().min(1).optional()
8853
8860
  });
8854
8861
  /**
8855
- * A completed movement of item stock between two holders, each a site, a user, or a container. Each line moves one item; applying the transfer records paired outbound and inbound transactions and updates the on-hand, custody, and containment counts. Transfers created through this API are always completed. One-sided moves (placing or removing an item with only one endpoint) record transactions but no transfer, and so are not represented by this resource.
8862
+ * A movement of item stock between two holders, each a site, a user, or a container. Each line names one item. A completed transfer has applied paired outbound and inbound transactions and updated on-hand, custody, and containment counts. A pending transfer has not moved stock; it waits to be accepted, declined, or cancelled. One-sided moves (placing or removing an item with only one endpoint) record transactions but no transfer, and so are not represented by this resource.
8856
8863
  */
8857
8864
  export const zAssetsTransferResponseObject = z.object({
8858
8865
  id: z.string(),
@@ -8861,6 +8868,7 @@ export const zAssetsTransferResponseObject = z.object({
8861
8868
  'pending',
8862
8869
  'in_transit',
8863
8870
  'completed',
8871
+ 'declined',
8864
8872
  'cancelled'
8865
8873
  ]),
8866
8874
  from_assets_site_id: z.string().nullable(),
@@ -8871,7 +8879,9 @@ export const zAssetsTransferResponseObject = z.object({
8871
8879
  to_container_item_id: z.string().nullable(),
8872
8880
  to_assets_sub_location_id: z.string().nullable(),
8873
8881
  initiated_by_user_id: z.string(),
8882
+ resolved_by_user_id: z.string().nullable(),
8874
8883
  completed_at: z.iso.datetime().nullable(),
8884
+ resolved_at: z.iso.datetime().nullable(),
8875
8885
  transfer_lines: z.array(z.object({
8876
8886
  id: z.string(),
8877
8887
  assets_item_id: z.string(),
@@ -8882,7 +8892,7 @@ export const zAssetsTransferResponseObject = z.object({
8882
8892
  updated_at: z.iso.datetime()
8883
8893
  });
8884
8894
  /**
8885
- * Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). With a single open end it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. Moves are applied immediately, so the source must hold enough of each item.
8895
+ * Move item stock. Each endpoint is a site, a user, or a container — give at most one per side; more than one on a side, or no endpoint at all, answers 422. With both a source and a destination this is a two-sided transfer (returns the created transfer, 201). Omit status or send completed to apply it immediately; send pending to persist without moving stock. A pending create requires both endpoints (one endpoint answers 422). With a single open end and completed (or omitted) status it is a one-sided move — placing an unplaced item (destination only) or removing it from its holder (source only) — which records transactions but no transfer and returns 204. A completed create applies immediately, so the source must hold enough of each item.
8886
8896
  */
8887
8897
  export const zAssetsTransferParameters = z.object({
8888
8898
  from_assets_site_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
@@ -8894,11 +8904,47 @@ export const zAssetsTransferParameters = z.object({
8894
8904
  to_container_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
8895
8905
  to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8896
8906
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8907
+ status: z.enum(['pending', 'completed']).optional(),
8897
8908
  line_items: z.array(z.object({
8898
8909
  assets_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8899
8910
  quantity: z.int().gte(1)
8900
8911
  })).min(1)
8901
8912
  });
8913
+ /**
8914
+ * Answer a transfer — decline, cancel, or reopen it. The named filer is recorded on the step. An optional note is the step comment.
8915
+ */
8916
+ export const zAssetsTransferCommandParameters = z.object({
8917
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8918
+ note: z.string().optional()
8919
+ });
8920
+ /**
8921
+ * Accept a pending transfer and move its stock. The named filer is recorded on the step. An optional note is the step comment. Optional placements put individual lines away at the destination; a line without a placement lands in the destination holder's own bucket.
8922
+ */
8923
+ export const zAssetsTransferAcceptanceParameters = z.object({
8924
+ performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8925
+ note: z.string().optional(),
8926
+ placements: z.array(z.object({
8927
+ line_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8928
+ container_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8929
+ sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8930
+ })).optional()
8931
+ });
8932
+ /**
8933
+ * Add a line to a pending transfer. The item is identified the same way create's line_items are, under this transfer's source holder. Stock stays with the sender until the transfer is accepted. A resolved transfer answers 422.
8934
+ */
8935
+ export const zAssetsTransferLineParameters = z.object({
8936
+ assets_item_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/),
8937
+ quantity: z.int().gte(1),
8938
+ from_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish(),
8939
+ to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8940
+ });
8941
+ /**
8942
+ * Change a pending transfer line's quantity and/or destination storage location. A resolved transfer answers 422. A line that is not on this transfer answers 404.
8943
+ */
8944
+ export const zAssetsTransferLineUpdateParameters = z.object({
8945
+ quantity: z.int().gte(1).optional(),
8946
+ to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).nullish()
8947
+ });
8902
8948
  /**
8903
8949
  * Add stock of a bulk product to a holder — a site, a user's custody, or a container — recording a receive transaction. Name the holder with exactly one of assets_site_id, user_id, or container_item_id; several answer 422 at each named key, and none answers 422. Bulk products only.
8904
8950
  */
@@ -10305,6 +10351,63 @@ export const zGetTransferPath = z.object({
10305
10351
  * Success
10306
10352
  */
10307
10353
  export const zGetTransferResponse = zAssetsTransferResponseObject;
10354
+ export const zAcceptTransferBody = zAssetsTransferAcceptanceParameters;
10355
+ export const zAcceptTransferPath = z.object({
10356
+ transfer_id: z.string()
10357
+ });
10358
+ /**
10359
+ * Created
10360
+ */
10361
+ export const zAcceptTransferResponse = zAssetsTransferResponseObject;
10362
+ export const zDeclineTransferBody = zAssetsTransferCommandParameters;
10363
+ export const zDeclineTransferPath = z.object({
10364
+ transfer_id: z.string()
10365
+ });
10366
+ /**
10367
+ * Created
10368
+ */
10369
+ export const zDeclineTransferResponse = zAssetsTransferResponseObject;
10370
+ export const zCancelTransferBody = zAssetsTransferCommandParameters;
10371
+ export const zCancelTransferPath = z.object({
10372
+ transfer_id: z.string()
10373
+ });
10374
+ /**
10375
+ * Created
10376
+ */
10377
+ export const zCancelTransferResponse = zAssetsTransferResponseObject;
10378
+ export const zReopenTransferBody = zAssetsTransferCommandParameters;
10379
+ export const zReopenTransferPath = z.object({
10380
+ transfer_id: z.string()
10381
+ });
10382
+ /**
10383
+ * Created
10384
+ */
10385
+ export const zReopenTransferResponse = zAssetsTransferResponseObject;
10386
+ export const zCreateTransferLineBody = zAssetsTransferLineParameters;
10387
+ export const zCreateTransferLinePath = z.object({
10388
+ transfer_id: z.string()
10389
+ });
10390
+ /**
10391
+ * Created
10392
+ */
10393
+ export const zCreateTransferLineResponse = zAssetsTransferResponseObject;
10394
+ export const zDeleteTransferLinePath = z.object({
10395
+ transfer_id: z.string(),
10396
+ line_id: z.string()
10397
+ });
10398
+ /**
10399
+ * No Content
10400
+ */
10401
+ export const zDeleteTransferLineResponse = z.void();
10402
+ export const zUpdateTransferLineBody = zAssetsTransferLineUpdateParameters;
10403
+ export const zUpdateTransferLinePath = z.object({
10404
+ transfer_id: z.string(),
10405
+ line_id: z.string()
10406
+ });
10407
+ /**
10408
+ * Success
10409
+ */
10410
+ export const zUpdateTransferLineResponse = zAssetsTransferResponseObject;
10308
10411
  export const zListVendorsQuery = z.object({
10309
10412
  filter: z.string().optional(),
10310
10413
  'filter[unexpected]': z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsptch-work/api-client",
3
- "version": "0.50.0",
3
+ "version": "0.51.1",
4
4
  "description": "Generated TypeScript client for the DSPTCH REST API.",
5
5
  "keywords": [
6
6
  "dsptch",