@use-stall/types 0.3.15 → 0.3.17

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-stall/types",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "description": "Type declarations for Stall SDKs",
5
5
  "types": "index.d.ts",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- export interface UnifiedInventoryLevelType {
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; // Low stock threshold specific to the location
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 ExtendedUnifiedInventoryLevelType extends UnifiedInventoryLevelType {
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: ExtendedUnifiedInventoryLevelType[];
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
- }; // Additional metadata
30
+ };
46
31
  }
47
32
 
48
33
  export interface UnifiedTagProductTag {
@@ -89,20 +74,18 @@ export interface UnifiedVariantsType {
89
74
  title: string;
90
75
  description: string;
91
76
  sales_channels: string[];
77
+ locations: string[];
92
78
  price: number | string;
93
79
  cost_price: number | string;
94
80
  sale_price: number | string;
81
+ price_currency: string;
95
82
  on_sale: boolean;
96
83
  status: "draft" | "private" | "publish" | "pending";
97
84
  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
85
  weight: string;
104
86
  thumbnail: string;
105
87
  attributes: UnifiedVariantsAttributeType[];
88
+ default: boolean;
106
89
  metadata: {
107
90
  stall_offline_id: string;
108
91
  stall_offline_created_at: string;
@@ -123,11 +106,11 @@ export interface UnifiedLocationStockType {
123
106
  location_id: string;
124
107
  product_id: string;
125
108
  variant_id: string;
126
- unavailable: number | string; // Items not available for sale (e.g., damaged, expired)
127
- committed: number | string; // Items reserved for existing orders but not yet shipped
128
- in_stock: number | string; // Items available for new orders (In Stock)
129
- on_hand: number | string; // Total items physically present at the location
130
- low_stock_threshold: number | string; // Low stock threshold specific to the location
109
+ unavailable: number | string;
110
+ committed: number | string;
111
+ in_stock: number | string;
112
+ on_hand: number | string;
113
+ low_stock_threshold: number | string;
131
114
  last_updatedAt: string;
132
115
  created_at: string;
133
116
  }