@use-stall/types 0.2.7 → 0.2.8

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.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Type declarations for Stall SDKs",
5
5
  "types": "index.d.ts",
6
6
  "type": "module",
@@ -10,14 +10,16 @@ export interface UnifiedCustomerType {
10
10
  last_name: string;
11
11
  addresses: UnifiedCustomerAddressType[];
12
12
  phone: string;
13
- metadata: Record<string, any>;
13
+ metadata: {
14
+ stall_offline_id?: string;
15
+ stall_offline_created_at?: string;
16
+ stall_offline_updated_at?: string;
17
+ stall_offline_deleted_at?: string;
18
+ [key: string]: any;
19
+ };
14
20
  created_at: string;
15
21
  updated_at: string;
16
22
  deleted_at: string;
17
- stall_offline_id: string;
18
- stall_offline_created_at: string;
19
- stall_offline_updated_at: string;
20
- stall_offline_deleted_at: string;
21
23
  }
22
24
 
23
25
  export interface UnifiedCustomerAddressType {
@@ -79,5 +79,11 @@ export interface UnifiedFulfillmentType {
79
79
  destination: UnifiedCustomerAddressType;
80
80
  departure: UnifiedCustomerAddressType;
81
81
  };
82
- metadata: Record<string, any>;
82
+ metadata: {
83
+ stall_offline_id?: string;
84
+ stall_offline_created_at?: string;
85
+ stall_offline_updated_at?: string;
86
+ stall_offline_deleted_at?: string;
87
+ [key: string]: any;
88
+ };
83
89
  }
@@ -1,58 +1,65 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  export interface UnifiedInventoryLevelType {
3
- id: string;
4
- location_id: string;
5
- product_id: string;
6
- variant_id: string;
7
- unavailable: number | string; // Items not available for sale (e.g., damaged, expired)
8
- committed: number | string; // Items reserved for existing orders but not yet shipped
9
- in_stock: number | string; // Items available for new orders (In Stock)
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
12
- last_updatedAt: string;
13
- created_at: string;
14
- metadata: Record<string, any>;
15
- }
16
- export interface ExtendedUnifiedInventoryLevelType
17
- extends UnifiedInventoryLevelType {
18
- title: string;
19
- thumbnail: string;
20
- options: string[];
21
- is_new: boolean;
22
- }
23
-
24
- export interface InventoryAdjustmentRequestType {
25
- id: string;
26
- batch?: string;
27
- items: ExtendedUnifiedInventoryLevelType[];
28
- reason: string;
29
- location_id: string;
30
- organization_id: string;
31
- device_id: string;
32
- staff_id: string;
33
- user_id: string;
34
- stall_offline_id: string;
35
- stall_offline_created_at: string;
36
- stall_offline_updated_at: string;
37
- stall_offline_deleted_at: string;
38
- }
39
-
40
- export interface UnifiedInventoryLevelChangeLogType {
41
- id: string;
42
- date: string;
43
- inventory_item_id: string;
44
- unavailable: number | string;
45
- committed: number | string;
46
- in_stock: number | string;
47
- on_hand: number | string;
48
- reason: string;
49
- batch: string;
50
- device_id: string;
51
- staff_id: string;
52
- location_id: string;
53
- user_id: string;
54
- stall_offline_id: string;
55
- stall_offline_created_at: string;
56
- stall_offline_updated_at: string;
57
- stall_offline_deleted_at: string;
58
- }
3
+ id: string;
4
+ location_id: string;
5
+ product_id: string;
6
+ variant_id: string;
7
+ unavailable: number | string; // Items not available for sale (e.g., damaged, expired)
8
+ committed: number | string; // Items reserved for existing orders but not yet shipped
9
+ in_stock: number | string; // Items available for new orders (In Stock)
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
12
+ last_updatedAt: string;
13
+ created_at: string;
14
+ metadata: {
15
+ stall_offline_id?: string;
16
+ stall_offline_created_at?: string;
17
+ stall_offline_updated_at?: string;
18
+ stall_offline_deleted_at?: string;
19
+ [key: string]: any;
20
+ };
21
+ }
22
+
23
+ export interface ExtendedUnifiedInventoryLevelType
24
+ extends UnifiedInventoryLevelType {
25
+ title: string;
26
+ thumbnail: string;
27
+ options: string[];
28
+ is_new: boolean;
29
+ }
30
+
31
+ export interface InventoryAdjustmentRequestType {
32
+ id: string;
33
+ batch?: string;
34
+ items: ExtendedUnifiedInventoryLevelType[];
35
+ reason: string;
36
+ location_id: string;
37
+ organization_id: string;
38
+ device_id: string;
39
+ staff_id: string;
40
+ user_id: string;
41
+ stall_offline_id: string;
42
+ stall_offline_created_at: string;
43
+ stall_offline_updated_at: string;
44
+ stall_offline_deleted_at: string;
45
+ }
46
+
47
+ export interface UnifiedInventoryLevelChangeLogType {
48
+ id: string;
49
+ date: string;
50
+ inventory_item_id: string;
51
+ unavailable: number | string;
52
+ committed: number | string;
53
+ in_stock: number | string;
54
+ on_hand: number | string;
55
+ reason: string;
56
+ batch: string;
57
+ device_id: string;
58
+ staff_id: string;
59
+ location_id: string;
60
+ user_id: string;
61
+ stall_offline_id: string;
62
+ stall_offline_created_at: string;
63
+ stall_offline_updated_at: string;
64
+ stall_offline_deleted_at: string;
65
+ }
@@ -11,4 +11,11 @@ export interface UnifiedLocationType {
11
11
  created_at: string;
12
12
  updated_at: string;
13
13
  active: boolean;
14
+ metadata: {
15
+ stall_offline_id?: string;
16
+ stall_offline_created_at?: string;
17
+ stall_offline_updated_at?: string;
18
+ stall_offline_deleted_at?: string;
19
+ [key: string]: any;
20
+ };
14
21
  }
package/src/orders.d.ts CHANGED
@@ -53,11 +53,13 @@ export interface UnifiedOrderType {
53
53
  amount: string;
54
54
  date: string;
55
55
  }[];
56
- stall_offline_id: string;
57
- stall_offline_created_at: string;
58
- stall_offline_updated_at: string;
59
- stall_offline_deleted_at: string;
60
- metadata: { [key: string]: any }; // Custom metadata
56
+ metadata: {
57
+ stall_offline_id: string;
58
+ stall_offline_created_at: string;
59
+ stall_offline_updated_at: string;
60
+ stall_offline_deleted_at: string;
61
+ [key: string]: any;
62
+ }; // Custom metadata
61
63
  }
62
64
 
63
65
  export interface UnifiedLineItemType {
package/src/payments.d.ts CHANGED
@@ -71,7 +71,13 @@ export interface UnifiedPaymentCollectionType {
71
71
  provider_id: string;
72
72
  payment_method: UnifiedPaymentMethodType;
73
73
  note: string;
74
- metadata: Record<string, any>;
74
+ metadata: {
75
+ stall_offline_id?: string;
76
+ stall_offline_created_at?: string;
77
+ stall_offline_updated_at?: string;
78
+ stall_offline_deleted_at?: string;
79
+ [key: string]: any;
80
+ };
75
81
  }
76
82
 
77
83
  export interface UnifiedFlexSessionType {
@@ -100,4 +106,4 @@ export interface UnifiedFlexSessionType {
100
106
  notes: string;
101
107
  closing_remarks: string;
102
108
  metadata: Record<string, any>;
103
- }
109
+ }
package/src/product.d.ts CHANGED
@@ -34,7 +34,30 @@ export interface UnifiedProductType {
34
34
  low_stock_threshold: number | string; // Low stock threshold specific to the location'
35
35
  locations: string[];
36
36
  weight: string;
37
- metadata: { [key: string]: string }; // add date in milliseconds
37
+ metadata: {
38
+ stall_offline_id?: string;
39
+ stall_offline_created_at?: string;
40
+ stall_offline_updated_at?: string;
41
+ stall_offline_deleted_at?: string;
42
+ [key: string]: any;
43
+ }; // add date in milliseconds
44
+ }
45
+
46
+ export interface UnifiedTagProductTag {
47
+ id: string;
48
+ name: string;
49
+ slug: string;
50
+ description: string;
51
+ created_at: string;
52
+ updated_at: string;
53
+ deleted_at: string;
54
+ metadata: {
55
+ stall_offline_id?: string;
56
+ stall_offline_created_at?: string;
57
+ stall_offline_updated_at?: string;
58
+ stall_offline_deleted_at?: string;
59
+ [key: string]: any;
60
+ };
38
61
  }
39
62
 
40
63
  export interface UnifiedProductPriceType {
@@ -78,7 +101,13 @@ export interface UnifiedVariantsType {
78
101
  weight: string;
79
102
  thumbnail: string;
80
103
  attributes: UnifiedVariantsAttributeType[];
81
- metadata: { [key: string]: string };
104
+ metadata: {
105
+ stall_offline_id?: string;
106
+ stall_offline_created_at?: string;
107
+ stall_offline_updated_at?: string;
108
+ stall_offline_deleted_at?: string;
109
+ [key: string]: any;
110
+ };
82
111
  }
83
112
 
84
113
  export interface UnifiedVariantsAttributeType {
@@ -106,7 +135,13 @@ export interface UnifiedCategoryType {
106
135
  name: string;
107
136
  description: string;
108
137
  thumbnail: string;
109
- metadata: { [key: string]: string };
138
+ metadata: {
139
+ stall_offline_id?: string;
140
+ stall_offline_created_at?: string;
141
+ stall_offline_updated_at?: string;
142
+ stall_offline_deleted_at?: string;
143
+ [key: string]: any;
144
+ };
110
145
  date: string;
111
146
  count: number;
112
147
  parent_id: string;
@@ -117,7 +152,13 @@ export interface UnifiedCollectionType {
117
152
  name: string;
118
153
  description: string;
119
154
  thumbnail: string;
120
- metadata: { [key: string]: string };
155
+ metadata: {
156
+ stall_offline_id?: string;
157
+ stall_offline_created_at?: string;
158
+ stall_offline_updated_at?: string;
159
+ stall_offline_deleted_at?: string;
160
+ [key: string]: any;
161
+ };
121
162
  linked_products: string[];
122
163
  linked_categories: string[];
123
164
  createAt: string;
@@ -19,7 +19,13 @@ export interface UnifiedPromotion {
19
19
  eligibility_rules: UnifiedPromotionRule[];
20
20
  /** How the promotion applies */
21
21
  application: UnifiedPromotionApplication;
22
- metadata: Record<string, unknown>;
22
+ metadata: {
23
+ stall_offline_id?: string;
24
+ stall_offline_created_at?: string;
25
+ stall_offline_updated_at?: string;
26
+ stall_offline_deleted_at?: string;
27
+ [key: string]: unknown;
28
+ };
23
29
  }
24
30
  export type UnifiedPromotionApplicationType =
25
31
  | "percentage"
package/src/taxes.d.ts CHANGED
@@ -9,7 +9,13 @@ export interface UnifiedTaxRegionType {
9
9
  postal_codes: string[]; // Specific ZIP codes if applicable
10
10
  tax_inclusive: boolean; // Whether prices include tax
11
11
  is_default?: boolean; // Whether this is the default region
12
- metadata: { [key: string]: string }; // Additional metadata
12
+ metadata: {
13
+ stall_offline_id?: string;
14
+ stall_offline_created_at?: string;
15
+ stall_offline_updated_at?: string;
16
+ stall_offline_deleted_at?: string;
17
+ [key: string]: string;
18
+ }; // Additional metadata
13
19
  }
14
20
 
15
21
  export interface UnifiedTaxClassType {
@@ -28,5 +34,11 @@ export interface UnifiedTaxRateType {
28
34
  code: string; // Optional description
29
35
  compound: boolean; // Whether this is a compound tax rate
30
36
  priority: number; // Priority order
31
- metadata: { [key: string]: any }; // Additional metadata
32
- }
37
+ metadata: {
38
+ stall_offline_id?: string;
39
+ stall_offline_created_at?: string;
40
+ stall_offline_updated_at?: string;
41
+ stall_offline_deleted_at?: string;
42
+ [key: string]: any;
43
+ }; // Additional metadata
44
+ }