@use-stall/types 0.3.15 → 0.3.16
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/package.json +1 -1
- package/src/inventory.d.ts +4 -4
- package/src/product.d.ts +10 -28
package/package.json
CHANGED
package/src/inventory.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
export interface
|
|
2
|
+
export interface UnifiedInventoryItemType {
|
|
3
3
|
id: string;
|
|
4
4
|
location_id: string;
|
|
5
5
|
product_id: string;
|
|
@@ -8,7 +8,7 @@ export interface UnifiedInventoryLevelType {
|
|
|
8
8
|
committed: number | string; // Items reserved for existing orders but not yet shipped
|
|
9
9
|
in_stock: number | string; // Items available for new orders (In Stock)
|
|
10
10
|
on_hand: number | string; // Total items physically present at the location
|
|
11
|
-
low_stock_threshold: number | string;
|
|
11
|
+
low_stock_threshold: number | string;
|
|
12
12
|
last_updated_at: string;
|
|
13
13
|
created_at: string;
|
|
14
14
|
metadata: {
|
|
@@ -20,7 +20,7 @@ export interface UnifiedInventoryLevelType {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export interface
|
|
23
|
+
export interface ExtendedUnifiedInventoryItemType extends UnifiedInventoryItemType {
|
|
24
24
|
title: string;
|
|
25
25
|
thumbnail: string;
|
|
26
26
|
options: string[];
|
|
@@ -30,7 +30,7 @@ export interface ExtendedUnifiedInventoryLevelType extends UnifiedInventoryLevel
|
|
|
30
30
|
export interface InventoryAdjustmentRequestType {
|
|
31
31
|
id: string;
|
|
32
32
|
batch?: string;
|
|
33
|
-
items:
|
|
33
|
+
items: ExtendedUnifiedInventoryItemType[];
|
|
34
34
|
reason: string;
|
|
35
35
|
location_id: string;
|
|
36
36
|
organization_id: string;
|
package/src/product.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export interface UnifiedProductType {
|
|
2
2
|
id: string;
|
|
3
|
-
sku: string;
|
|
4
|
-
barcode: string;
|
|
5
3
|
title: string;
|
|
6
4
|
handle: string;
|
|
7
5
|
description: string;
|
|
@@ -9,7 +7,6 @@ export interface UnifiedProductType {
|
|
|
9
7
|
created_at: string;
|
|
10
8
|
updated_at: string;
|
|
11
9
|
deleted_at: string;
|
|
12
|
-
channels: string[]; // Channel ids of where this product is available
|
|
13
10
|
sales_channels: string[];
|
|
14
11
|
status: "draft" | "private" | "publish" | "pending";
|
|
15
12
|
type: "simple" | "variable" | "grouped";
|
|
@@ -20,29 +17,17 @@ export interface UnifiedProductType {
|
|
|
20
17
|
categories: string[];
|
|
21
18
|
attributes: UnifiedAttributeType[];
|
|
22
19
|
collections: string[];
|
|
23
|
-
variants: string[];
|
|
24
|
-
price: number | string;
|
|
25
|
-
sale_price: number | string;
|
|
26
|
-
price_currency: string;
|
|
27
|
-
cost_price: number | string;
|
|
28
|
-
taxable: boolean;
|
|
29
|
-
tax_class: string; // class id
|
|
30
|
-
on_sale: boolean;
|
|
31
|
-
track_inventory: boolean;
|
|
32
|
-
unavailable: number | string; // Items not available for sale (e.g., damaged, expired)
|
|
33
|
-
committed: number | string; // Items reserved for existing orders but not yet shipped
|
|
34
|
-
in_stock: number | string; // Items available for new orders (In Stock)
|
|
35
|
-
on_hand: number | string; // Total items physically present at the location
|
|
36
|
-
low_stock_threshold: number | string; // Low stock threshold specific to the location'
|
|
37
20
|
locations: string[];
|
|
38
21
|
weight: string;
|
|
22
|
+
taxable: boolean;
|
|
23
|
+
tax_class: string;
|
|
39
24
|
metadata: {
|
|
40
25
|
stall_offline_id: string;
|
|
41
26
|
stall_offline_created_at: string;
|
|
42
27
|
stall_offline_updated_at: string;
|
|
43
28
|
stall_offline_deleted_at: string;
|
|
44
29
|
[key: string]: any;
|
|
45
|
-
};
|
|
30
|
+
};
|
|
46
31
|
}
|
|
47
32
|
|
|
48
33
|
export interface UnifiedTagProductTag {
|
|
@@ -92,17 +77,14 @@ export interface UnifiedVariantsType {
|
|
|
92
77
|
price: number | string;
|
|
93
78
|
cost_price: number | string;
|
|
94
79
|
sale_price: number | string;
|
|
80
|
+
price_currency: string;
|
|
95
81
|
on_sale: boolean;
|
|
96
82
|
status: "draft" | "private" | "publish" | "pending";
|
|
97
83
|
track_inventory: boolean;
|
|
98
|
-
unavailable?: number | string; // Items not available for sale (e.g., damaged, expired)
|
|
99
|
-
committed?: number | string; // Items reserved for existing orders but not yet shipped
|
|
100
|
-
in_stock: number | string; // Items available for new orders (In Stock)
|
|
101
|
-
on_hand?: number | string; // Total items physically present at the location
|
|
102
|
-
low_stock_threshold: number | string; // Low stock threshold specific to the location
|
|
103
84
|
weight: string;
|
|
104
85
|
thumbnail: string;
|
|
105
86
|
attributes: UnifiedVariantsAttributeType[];
|
|
87
|
+
default: boolean;
|
|
106
88
|
metadata: {
|
|
107
89
|
stall_offline_id: string;
|
|
108
90
|
stall_offline_created_at: string;
|
|
@@ -123,11 +105,11 @@ export interface UnifiedLocationStockType {
|
|
|
123
105
|
location_id: string;
|
|
124
106
|
product_id: string;
|
|
125
107
|
variant_id: string;
|
|
126
|
-
unavailable: number | string;
|
|
127
|
-
committed: number | string;
|
|
128
|
-
in_stock: number | string;
|
|
129
|
-
on_hand: number | string;
|
|
130
|
-
low_stock_threshold: number | string;
|
|
108
|
+
unavailable: number | string;
|
|
109
|
+
committed: number | string;
|
|
110
|
+
in_stock: number | string;
|
|
111
|
+
on_hand: number | string;
|
|
112
|
+
low_stock_threshold: number | string;
|
|
131
113
|
last_updatedAt: string;
|
|
132
114
|
created_at: string;
|
|
133
115
|
}
|