@dsptch-work/api-client 0.50.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/sdk.gen.d.ts +91 -1
- package/dist/gen/sdk.gen.js +156 -0
- package/dist/gen/types.gen.d.ts +300 -5
- package/dist/gen/zod.gen.d.ts +313 -2
- package/dist/gen/zod.gen.js +98 -2
- package/package.json +1 -1
package/dist/gen/zod.gen.d.ts
CHANGED
|
@@ -11680,7 +11680,7 @@ export declare const zAssetsSubLocationUpdateParameters: z.ZodObject<{
|
|
|
11680
11680
|
code: z.ZodOptional<z.ZodString>;
|
|
11681
11681
|
}, z.core.$strip>;
|
|
11682
11682
|
/**
|
|
11683
|
-
* A
|
|
11683
|
+
* 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
11684
|
*/
|
|
11685
11685
|
export declare const zAssetsTransferResponseObject: z.ZodObject<{
|
|
11686
11686
|
id: z.ZodString;
|
|
@@ -11689,6 +11689,7 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
|
|
|
11689
11689
|
pending: "pending";
|
|
11690
11690
|
cancelled: "cancelled";
|
|
11691
11691
|
completed: "completed";
|
|
11692
|
+
declined: "declined";
|
|
11692
11693
|
in_transit: "in_transit";
|
|
11693
11694
|
}>;
|
|
11694
11695
|
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
@@ -11699,7 +11700,9 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
|
|
|
11699
11700
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
11700
11701
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
11701
11702
|
initiated_by_user_id: z.ZodString;
|
|
11703
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
11702
11704
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
11705
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
11703
11706
|
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
11704
11707
|
id: z.ZodString;
|
|
11705
11708
|
assets_item_id: z.ZodString;
|
|
@@ -11710,7 +11713,7 @@ export declare const zAssetsTransferResponseObject: z.ZodObject<{
|
|
|
11710
11713
|
updated_at: z.ZodISODateTime;
|
|
11711
11714
|
}, z.core.$strip>;
|
|
11712
11715
|
/**
|
|
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.
|
|
11716
|
+
* 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
11717
|
*/
|
|
11715
11718
|
export declare const zAssetsTransferParameters: z.ZodObject<{
|
|
11716
11719
|
from_assets_site_id: z.ZodOptional<z.ZodString>;
|
|
@@ -11722,11 +11725,50 @@ export declare const zAssetsTransferParameters: z.ZodObject<{
|
|
|
11722
11725
|
to_container_item_id: z.ZodOptional<z.ZodString>;
|
|
11723
11726
|
to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11724
11727
|
performed_by_user_id: z.ZodString;
|
|
11728
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
11729
|
+
pending: "pending";
|
|
11730
|
+
completed: "completed";
|
|
11731
|
+
}>>;
|
|
11725
11732
|
line_items: z.ZodArray<z.ZodObject<{
|
|
11726
11733
|
assets_item_id: z.ZodString;
|
|
11727
11734
|
quantity: z.ZodInt;
|
|
11728
11735
|
}, z.core.$strip>>;
|
|
11729
11736
|
}, z.core.$strip>;
|
|
11737
|
+
/**
|
|
11738
|
+
* Answer a transfer — decline, cancel, or reopen it. The named filer is recorded on the step. An optional note is the step comment.
|
|
11739
|
+
*/
|
|
11740
|
+
export declare const zAssetsTransferCommandParameters: z.ZodObject<{
|
|
11741
|
+
performed_by_user_id: z.ZodString;
|
|
11742
|
+
note: z.ZodOptional<z.ZodString>;
|
|
11743
|
+
}, z.core.$strip>;
|
|
11744
|
+
/**
|
|
11745
|
+
* 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.
|
|
11746
|
+
*/
|
|
11747
|
+
export declare const zAssetsTransferAcceptanceParameters: z.ZodObject<{
|
|
11748
|
+
performed_by_user_id: z.ZodString;
|
|
11749
|
+
note: z.ZodOptional<z.ZodString>;
|
|
11750
|
+
placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11751
|
+
line_id: z.ZodString;
|
|
11752
|
+
container_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11753
|
+
sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11754
|
+
}, z.core.$strip>>>;
|
|
11755
|
+
}, z.core.$strip>;
|
|
11756
|
+
/**
|
|
11757
|
+
* 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.
|
|
11758
|
+
*/
|
|
11759
|
+
export declare const zAssetsTransferLineParameters: z.ZodObject<{
|
|
11760
|
+
assets_item_id: z.ZodString;
|
|
11761
|
+
quantity: z.ZodInt;
|
|
11762
|
+
from_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11763
|
+
to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11764
|
+
}, z.core.$strip>;
|
|
11765
|
+
/**
|
|
11766
|
+
* 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.
|
|
11767
|
+
*/
|
|
11768
|
+
export declare const zAssetsTransferLineUpdateParameters: z.ZodObject<{
|
|
11769
|
+
quantity: z.ZodOptional<z.ZodInt>;
|
|
11770
|
+
to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11771
|
+
}, z.core.$strip>;
|
|
11730
11772
|
/**
|
|
11731
11773
|
* 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
11774
|
*/
|
|
@@ -16536,6 +16578,7 @@ export declare const zListTransfersResponse: z.ZodObject<{
|
|
|
16536
16578
|
pending: "pending";
|
|
16537
16579
|
cancelled: "cancelled";
|
|
16538
16580
|
completed: "completed";
|
|
16581
|
+
declined: "declined";
|
|
16539
16582
|
in_transit: "in_transit";
|
|
16540
16583
|
}>;
|
|
16541
16584
|
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
@@ -16546,7 +16589,9 @@ export declare const zListTransfersResponse: z.ZodObject<{
|
|
|
16546
16589
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16547
16590
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16548
16591
|
initiated_by_user_id: z.ZodString;
|
|
16592
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16549
16593
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16594
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16550
16595
|
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16551
16596
|
id: z.ZodString;
|
|
16552
16597
|
assets_item_id: z.ZodString;
|
|
@@ -16567,6 +16612,10 @@ export declare const zCreateTransferBody: z.ZodObject<{
|
|
|
16567
16612
|
to_container_item_id: z.ZodOptional<z.ZodString>;
|
|
16568
16613
|
to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16569
16614
|
performed_by_user_id: z.ZodString;
|
|
16615
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
16616
|
+
pending: "pending";
|
|
16617
|
+
completed: "completed";
|
|
16618
|
+
}>>;
|
|
16570
16619
|
line_items: z.ZodArray<z.ZodObject<{
|
|
16571
16620
|
assets_item_id: z.ZodString;
|
|
16572
16621
|
quantity: z.ZodInt;
|
|
@@ -16579,6 +16628,7 @@ export declare const zCreateTransferResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
16579
16628
|
pending: "pending";
|
|
16580
16629
|
cancelled: "cancelled";
|
|
16581
16630
|
completed: "completed";
|
|
16631
|
+
declined: "declined";
|
|
16582
16632
|
in_transit: "in_transit";
|
|
16583
16633
|
}>;
|
|
16584
16634
|
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
@@ -16589,7 +16639,9 @@ export declare const zCreateTransferResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
16589
16639
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16590
16640
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16591
16641
|
initiated_by_user_id: z.ZodString;
|
|
16642
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16592
16643
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16644
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16593
16645
|
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16594
16646
|
id: z.ZodString;
|
|
16595
16647
|
assets_item_id: z.ZodString;
|
|
@@ -16612,6 +16664,263 @@ export declare const zGetTransferResponse: z.ZodObject<{
|
|
|
16612
16664
|
pending: "pending";
|
|
16613
16665
|
cancelled: "cancelled";
|
|
16614
16666
|
completed: "completed";
|
|
16667
|
+
declined: "declined";
|
|
16668
|
+
in_transit: "in_transit";
|
|
16669
|
+
}>;
|
|
16670
|
+
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16671
|
+
from_user_id: z.ZodNullable<z.ZodString>;
|
|
16672
|
+
from_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16673
|
+
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16674
|
+
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16675
|
+
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16676
|
+
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16677
|
+
initiated_by_user_id: z.ZodString;
|
|
16678
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16679
|
+
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16680
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16681
|
+
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16682
|
+
id: z.ZodString;
|
|
16683
|
+
assets_item_id: z.ZodString;
|
|
16684
|
+
quantity: z.ZodInt;
|
|
16685
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16686
|
+
}, z.core.$strip>>;
|
|
16687
|
+
created_at: z.ZodISODateTime;
|
|
16688
|
+
updated_at: z.ZodISODateTime;
|
|
16689
|
+
}, z.core.$strip>;
|
|
16690
|
+
export declare const zAcceptTransferBody: z.ZodObject<{
|
|
16691
|
+
performed_by_user_id: z.ZodString;
|
|
16692
|
+
note: z.ZodOptional<z.ZodString>;
|
|
16693
|
+
placements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16694
|
+
line_id: z.ZodString;
|
|
16695
|
+
container_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16696
|
+
sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16697
|
+
}, z.core.$strip>>>;
|
|
16698
|
+
}, z.core.$strip>;
|
|
16699
|
+
export declare const zAcceptTransferPath: z.ZodObject<{
|
|
16700
|
+
transfer_id: z.ZodString;
|
|
16701
|
+
}, z.core.$strip>;
|
|
16702
|
+
/**
|
|
16703
|
+
* Created
|
|
16704
|
+
*/
|
|
16705
|
+
export declare const zAcceptTransferResponse: z.ZodObject<{
|
|
16706
|
+
id: z.ZodString;
|
|
16707
|
+
company_id: z.ZodString;
|
|
16708
|
+
status: z.ZodEnum<{
|
|
16709
|
+
pending: "pending";
|
|
16710
|
+
cancelled: "cancelled";
|
|
16711
|
+
completed: "completed";
|
|
16712
|
+
declined: "declined";
|
|
16713
|
+
in_transit: "in_transit";
|
|
16714
|
+
}>;
|
|
16715
|
+
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16716
|
+
from_user_id: z.ZodNullable<z.ZodString>;
|
|
16717
|
+
from_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16718
|
+
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16719
|
+
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16720
|
+
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16721
|
+
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16722
|
+
initiated_by_user_id: z.ZodString;
|
|
16723
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16724
|
+
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16725
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16726
|
+
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16727
|
+
id: z.ZodString;
|
|
16728
|
+
assets_item_id: z.ZodString;
|
|
16729
|
+
quantity: z.ZodInt;
|
|
16730
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16731
|
+
}, z.core.$strip>>;
|
|
16732
|
+
created_at: z.ZodISODateTime;
|
|
16733
|
+
updated_at: z.ZodISODateTime;
|
|
16734
|
+
}, z.core.$strip>;
|
|
16735
|
+
export declare const zDeclineTransferBody: z.ZodObject<{
|
|
16736
|
+
performed_by_user_id: z.ZodString;
|
|
16737
|
+
note: z.ZodOptional<z.ZodString>;
|
|
16738
|
+
}, z.core.$strip>;
|
|
16739
|
+
export declare const zDeclineTransferPath: z.ZodObject<{
|
|
16740
|
+
transfer_id: z.ZodString;
|
|
16741
|
+
}, z.core.$strip>;
|
|
16742
|
+
/**
|
|
16743
|
+
* Created
|
|
16744
|
+
*/
|
|
16745
|
+
export declare const zDeclineTransferResponse: z.ZodObject<{
|
|
16746
|
+
id: z.ZodString;
|
|
16747
|
+
company_id: z.ZodString;
|
|
16748
|
+
status: z.ZodEnum<{
|
|
16749
|
+
pending: "pending";
|
|
16750
|
+
cancelled: "cancelled";
|
|
16751
|
+
completed: "completed";
|
|
16752
|
+
declined: "declined";
|
|
16753
|
+
in_transit: "in_transit";
|
|
16754
|
+
}>;
|
|
16755
|
+
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16756
|
+
from_user_id: z.ZodNullable<z.ZodString>;
|
|
16757
|
+
from_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16758
|
+
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16759
|
+
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16760
|
+
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16761
|
+
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16762
|
+
initiated_by_user_id: z.ZodString;
|
|
16763
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16764
|
+
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16765
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16766
|
+
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16767
|
+
id: z.ZodString;
|
|
16768
|
+
assets_item_id: z.ZodString;
|
|
16769
|
+
quantity: z.ZodInt;
|
|
16770
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16771
|
+
}, z.core.$strip>>;
|
|
16772
|
+
created_at: z.ZodISODateTime;
|
|
16773
|
+
updated_at: z.ZodISODateTime;
|
|
16774
|
+
}, z.core.$strip>;
|
|
16775
|
+
export declare const zCancelTransferBody: z.ZodObject<{
|
|
16776
|
+
performed_by_user_id: z.ZodString;
|
|
16777
|
+
note: z.ZodOptional<z.ZodString>;
|
|
16778
|
+
}, z.core.$strip>;
|
|
16779
|
+
export declare const zCancelTransferPath: z.ZodObject<{
|
|
16780
|
+
transfer_id: z.ZodString;
|
|
16781
|
+
}, z.core.$strip>;
|
|
16782
|
+
/**
|
|
16783
|
+
* Created
|
|
16784
|
+
*/
|
|
16785
|
+
export declare const zCancelTransferResponse: z.ZodObject<{
|
|
16786
|
+
id: z.ZodString;
|
|
16787
|
+
company_id: z.ZodString;
|
|
16788
|
+
status: z.ZodEnum<{
|
|
16789
|
+
pending: "pending";
|
|
16790
|
+
cancelled: "cancelled";
|
|
16791
|
+
completed: "completed";
|
|
16792
|
+
declined: "declined";
|
|
16793
|
+
in_transit: "in_transit";
|
|
16794
|
+
}>;
|
|
16795
|
+
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16796
|
+
from_user_id: z.ZodNullable<z.ZodString>;
|
|
16797
|
+
from_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16798
|
+
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16799
|
+
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16800
|
+
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16801
|
+
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16802
|
+
initiated_by_user_id: z.ZodString;
|
|
16803
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16804
|
+
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16805
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16806
|
+
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16807
|
+
id: z.ZodString;
|
|
16808
|
+
assets_item_id: z.ZodString;
|
|
16809
|
+
quantity: z.ZodInt;
|
|
16810
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16811
|
+
}, z.core.$strip>>;
|
|
16812
|
+
created_at: z.ZodISODateTime;
|
|
16813
|
+
updated_at: z.ZodISODateTime;
|
|
16814
|
+
}, z.core.$strip>;
|
|
16815
|
+
export declare const zReopenTransferBody: z.ZodObject<{
|
|
16816
|
+
performed_by_user_id: z.ZodString;
|
|
16817
|
+
note: z.ZodOptional<z.ZodString>;
|
|
16818
|
+
}, z.core.$strip>;
|
|
16819
|
+
export declare const zReopenTransferPath: z.ZodObject<{
|
|
16820
|
+
transfer_id: z.ZodString;
|
|
16821
|
+
}, z.core.$strip>;
|
|
16822
|
+
/**
|
|
16823
|
+
* Created
|
|
16824
|
+
*/
|
|
16825
|
+
export declare const zReopenTransferResponse: z.ZodObject<{
|
|
16826
|
+
id: z.ZodString;
|
|
16827
|
+
company_id: z.ZodString;
|
|
16828
|
+
status: z.ZodEnum<{
|
|
16829
|
+
pending: "pending";
|
|
16830
|
+
cancelled: "cancelled";
|
|
16831
|
+
completed: "completed";
|
|
16832
|
+
declined: "declined";
|
|
16833
|
+
in_transit: "in_transit";
|
|
16834
|
+
}>;
|
|
16835
|
+
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16836
|
+
from_user_id: z.ZodNullable<z.ZodString>;
|
|
16837
|
+
from_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16838
|
+
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16839
|
+
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16840
|
+
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16841
|
+
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16842
|
+
initiated_by_user_id: z.ZodString;
|
|
16843
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16844
|
+
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16845
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16846
|
+
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16847
|
+
id: z.ZodString;
|
|
16848
|
+
assets_item_id: z.ZodString;
|
|
16849
|
+
quantity: z.ZodInt;
|
|
16850
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16851
|
+
}, z.core.$strip>>;
|
|
16852
|
+
created_at: z.ZodISODateTime;
|
|
16853
|
+
updated_at: z.ZodISODateTime;
|
|
16854
|
+
}, z.core.$strip>;
|
|
16855
|
+
export declare const zCreateTransferLineBody: z.ZodObject<{
|
|
16856
|
+
assets_item_id: z.ZodString;
|
|
16857
|
+
quantity: z.ZodInt;
|
|
16858
|
+
from_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16859
|
+
to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16860
|
+
}, z.core.$strip>;
|
|
16861
|
+
export declare const zCreateTransferLinePath: z.ZodObject<{
|
|
16862
|
+
transfer_id: z.ZodString;
|
|
16863
|
+
}, z.core.$strip>;
|
|
16864
|
+
/**
|
|
16865
|
+
* Created
|
|
16866
|
+
*/
|
|
16867
|
+
export declare const zCreateTransferLineResponse: z.ZodObject<{
|
|
16868
|
+
id: z.ZodString;
|
|
16869
|
+
company_id: z.ZodString;
|
|
16870
|
+
status: z.ZodEnum<{
|
|
16871
|
+
pending: "pending";
|
|
16872
|
+
cancelled: "cancelled";
|
|
16873
|
+
completed: "completed";
|
|
16874
|
+
declined: "declined";
|
|
16875
|
+
in_transit: "in_transit";
|
|
16876
|
+
}>;
|
|
16877
|
+
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16878
|
+
from_user_id: z.ZodNullable<z.ZodString>;
|
|
16879
|
+
from_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16880
|
+
to_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
16881
|
+
to_user_id: z.ZodNullable<z.ZodString>;
|
|
16882
|
+
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16883
|
+
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16884
|
+
initiated_by_user_id: z.ZodString;
|
|
16885
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16886
|
+
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16887
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16888
|
+
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16889
|
+
id: z.ZodString;
|
|
16890
|
+
assets_item_id: z.ZodString;
|
|
16891
|
+
quantity: z.ZodInt;
|
|
16892
|
+
from_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16893
|
+
}, z.core.$strip>>;
|
|
16894
|
+
created_at: z.ZodISODateTime;
|
|
16895
|
+
updated_at: z.ZodISODateTime;
|
|
16896
|
+
}, z.core.$strip>;
|
|
16897
|
+
export declare const zDeleteTransferLinePath: z.ZodObject<{
|
|
16898
|
+
transfer_id: z.ZodString;
|
|
16899
|
+
line_id: z.ZodString;
|
|
16900
|
+
}, z.core.$strip>;
|
|
16901
|
+
/**
|
|
16902
|
+
* No Content
|
|
16903
|
+
*/
|
|
16904
|
+
export declare const zDeleteTransferLineResponse: z.ZodVoid;
|
|
16905
|
+
export declare const zUpdateTransferLineBody: z.ZodObject<{
|
|
16906
|
+
quantity: z.ZodOptional<z.ZodInt>;
|
|
16907
|
+
to_assets_sub_location_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16908
|
+
}, z.core.$strip>;
|
|
16909
|
+
export declare const zUpdateTransferLinePath: z.ZodObject<{
|
|
16910
|
+
transfer_id: z.ZodString;
|
|
16911
|
+
line_id: z.ZodString;
|
|
16912
|
+
}, z.core.$strip>;
|
|
16913
|
+
/**
|
|
16914
|
+
* Success
|
|
16915
|
+
*/
|
|
16916
|
+
export declare const zUpdateTransferLineResponse: z.ZodObject<{
|
|
16917
|
+
id: z.ZodString;
|
|
16918
|
+
company_id: z.ZodString;
|
|
16919
|
+
status: z.ZodEnum<{
|
|
16920
|
+
pending: "pending";
|
|
16921
|
+
cancelled: "cancelled";
|
|
16922
|
+
completed: "completed";
|
|
16923
|
+
declined: "declined";
|
|
16615
16924
|
in_transit: "in_transit";
|
|
16616
16925
|
}>;
|
|
16617
16926
|
from_assets_site_id: z.ZodNullable<z.ZodString>;
|
|
@@ -16622,7 +16931,9 @@ export declare const zGetTransferResponse: z.ZodObject<{
|
|
|
16622
16931
|
to_container_item_id: z.ZodNullable<z.ZodString>;
|
|
16623
16932
|
to_assets_sub_location_id: z.ZodNullable<z.ZodString>;
|
|
16624
16933
|
initiated_by_user_id: z.ZodString;
|
|
16934
|
+
resolved_by_user_id: z.ZodNullable<z.ZodString>;
|
|
16625
16935
|
completed_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16936
|
+
resolved_at: z.ZodNullable<z.ZodISODateTime>;
|
|
16626
16937
|
transfer_lines: z.ZodArray<z.ZodObject<{
|
|
16627
16938
|
id: z.ZodString;
|
|
16628
16939
|
assets_item_id: z.ZodString;
|
package/dist/gen/zod.gen.js
CHANGED
|
@@ -8852,7 +8852,7 @@ export const zAssetsSubLocationUpdateParameters = z.object({
|
|
|
8852
8852
|
code: z.string().min(1).optional()
|
|
8853
8853
|
});
|
|
8854
8854
|
/**
|
|
8855
|
-
* A
|
|
8855
|
+
* 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
8856
|
*/
|
|
8857
8857
|
export const zAssetsTransferResponseObject = z.object({
|
|
8858
8858
|
id: z.string(),
|
|
@@ -8861,6 +8861,7 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
8861
8861
|
'pending',
|
|
8862
8862
|
'in_transit',
|
|
8863
8863
|
'completed',
|
|
8864
|
+
'declined',
|
|
8864
8865
|
'cancelled'
|
|
8865
8866
|
]),
|
|
8866
8867
|
from_assets_site_id: z.string().nullable(),
|
|
@@ -8871,7 +8872,9 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
8871
8872
|
to_container_item_id: z.string().nullable(),
|
|
8872
8873
|
to_assets_sub_location_id: z.string().nullable(),
|
|
8873
8874
|
initiated_by_user_id: z.string(),
|
|
8875
|
+
resolved_by_user_id: z.string().nullable(),
|
|
8874
8876
|
completed_at: z.iso.datetime().nullable(),
|
|
8877
|
+
resolved_at: z.iso.datetime().nullable(),
|
|
8875
8878
|
transfer_lines: z.array(z.object({
|
|
8876
8879
|
id: z.string(),
|
|
8877
8880
|
assets_item_id: z.string(),
|
|
@@ -8882,7 +8885,7 @@ export const zAssetsTransferResponseObject = z.object({
|
|
|
8882
8885
|
updated_at: z.iso.datetime()
|
|
8883
8886
|
});
|
|
8884
8887
|
/**
|
|
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.
|
|
8888
|
+
* 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
8889
|
*/
|
|
8887
8890
|
export const zAssetsTransferParameters = z.object({
|
|
8888
8891
|
from_assets_site_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
@@ -8894,11 +8897,47 @@ export const zAssetsTransferParameters = z.object({
|
|
|
8894
8897
|
to_container_item_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).optional(),
|
|
8895
8898
|
to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
8896
8899
|
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
8900
|
+
status: z.enum(['pending', 'completed']).optional(),
|
|
8897
8901
|
line_items: z.array(z.object({
|
|
8898
8902
|
assets_item_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
8899
8903
|
quantity: z.int().gte(1)
|
|
8900
8904
|
})).min(1)
|
|
8901
8905
|
});
|
|
8906
|
+
/**
|
|
8907
|
+
* Answer a transfer — decline, cancel, or reopen it. The named filer is recorded on the step. An optional note is the step comment.
|
|
8908
|
+
*/
|
|
8909
|
+
export const zAssetsTransferCommandParameters = z.object({
|
|
8910
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
8911
|
+
note: z.string().optional()
|
|
8912
|
+
});
|
|
8913
|
+
/**
|
|
8914
|
+
* 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.
|
|
8915
|
+
*/
|
|
8916
|
+
export const zAssetsTransferAcceptanceParameters = z.object({
|
|
8917
|
+
performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
8918
|
+
note: z.string().optional(),
|
|
8919
|
+
placements: z.array(z.object({
|
|
8920
|
+
line_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
8921
|
+
container_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
8922
|
+
sub_location_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
8923
|
+
})).optional()
|
|
8924
|
+
});
|
|
8925
|
+
/**
|
|
8926
|
+
* 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.
|
|
8927
|
+
*/
|
|
8928
|
+
export const zAssetsTransferLineParameters = z.object({
|
|
8929
|
+
assets_item_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/),
|
|
8930
|
+
quantity: z.int().gte(1),
|
|
8931
|
+
from_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish(),
|
|
8932
|
+
to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
8933
|
+
});
|
|
8934
|
+
/**
|
|
8935
|
+
* 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.
|
|
8936
|
+
*/
|
|
8937
|
+
export const zAssetsTransferLineUpdateParameters = z.object({
|
|
8938
|
+
quantity: z.int().gte(1).optional(),
|
|
8939
|
+
to_assets_sub_location_id: z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/).nullish()
|
|
8940
|
+
});
|
|
8902
8941
|
/**
|
|
8903
8942
|
* 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
8943
|
*/
|
|
@@ -10305,6 +10344,63 @@ export const zGetTransferPath = z.object({
|
|
|
10305
10344
|
* Success
|
|
10306
10345
|
*/
|
|
10307
10346
|
export const zGetTransferResponse = zAssetsTransferResponseObject;
|
|
10347
|
+
export const zAcceptTransferBody = zAssetsTransferAcceptanceParameters;
|
|
10348
|
+
export const zAcceptTransferPath = z.object({
|
|
10349
|
+
transfer_id: z.string()
|
|
10350
|
+
});
|
|
10351
|
+
/**
|
|
10352
|
+
* Created
|
|
10353
|
+
*/
|
|
10354
|
+
export const zAcceptTransferResponse = zAssetsTransferResponseObject;
|
|
10355
|
+
export const zDeclineTransferBody = zAssetsTransferCommandParameters;
|
|
10356
|
+
export const zDeclineTransferPath = z.object({
|
|
10357
|
+
transfer_id: z.string()
|
|
10358
|
+
});
|
|
10359
|
+
/**
|
|
10360
|
+
* Created
|
|
10361
|
+
*/
|
|
10362
|
+
export const zDeclineTransferResponse = zAssetsTransferResponseObject;
|
|
10363
|
+
export const zCancelTransferBody = zAssetsTransferCommandParameters;
|
|
10364
|
+
export const zCancelTransferPath = z.object({
|
|
10365
|
+
transfer_id: z.string()
|
|
10366
|
+
});
|
|
10367
|
+
/**
|
|
10368
|
+
* Created
|
|
10369
|
+
*/
|
|
10370
|
+
export const zCancelTransferResponse = zAssetsTransferResponseObject;
|
|
10371
|
+
export const zReopenTransferBody = zAssetsTransferCommandParameters;
|
|
10372
|
+
export const zReopenTransferPath = z.object({
|
|
10373
|
+
transfer_id: z.string()
|
|
10374
|
+
});
|
|
10375
|
+
/**
|
|
10376
|
+
* Created
|
|
10377
|
+
*/
|
|
10378
|
+
export const zReopenTransferResponse = zAssetsTransferResponseObject;
|
|
10379
|
+
export const zCreateTransferLineBody = zAssetsTransferLineParameters;
|
|
10380
|
+
export const zCreateTransferLinePath = z.object({
|
|
10381
|
+
transfer_id: z.string()
|
|
10382
|
+
});
|
|
10383
|
+
/**
|
|
10384
|
+
* Created
|
|
10385
|
+
*/
|
|
10386
|
+
export const zCreateTransferLineResponse = zAssetsTransferResponseObject;
|
|
10387
|
+
export const zDeleteTransferLinePath = z.object({
|
|
10388
|
+
transfer_id: z.string(),
|
|
10389
|
+
line_id: z.string()
|
|
10390
|
+
});
|
|
10391
|
+
/**
|
|
10392
|
+
* No Content
|
|
10393
|
+
*/
|
|
10394
|
+
export const zDeleteTransferLineResponse = z.void();
|
|
10395
|
+
export const zUpdateTransferLineBody = zAssetsTransferLineUpdateParameters;
|
|
10396
|
+
export const zUpdateTransferLinePath = z.object({
|
|
10397
|
+
transfer_id: z.string(),
|
|
10398
|
+
line_id: z.string()
|
|
10399
|
+
});
|
|
10400
|
+
/**
|
|
10401
|
+
* Success
|
|
10402
|
+
*/
|
|
10403
|
+
export const zUpdateTransferLineResponse = zAssetsTransferResponseObject;
|
|
10308
10404
|
export const zListVendorsQuery = z.object({
|
|
10309
10405
|
filter: z.string().optional(),
|
|
10310
10406
|
'filter[unexpected]': z.string().optional(),
|