omni-sync-sdk 0.18.0 → 0.18.2
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/dist/index.d.mts +23 -13
- package/dist/index.d.ts +23 -13
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -113,20 +113,26 @@ interface CustomerProfile {
|
|
|
113
113
|
updatedAt: string;
|
|
114
114
|
}
|
|
115
115
|
interface ProductMetafield {
|
|
116
|
-
id
|
|
117
|
-
definitionId
|
|
118
|
-
/** Key from
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
|
|
116
|
+
id: string;
|
|
117
|
+
definitionId: string;
|
|
118
|
+
/** Key from the metafield definition */
|
|
119
|
+
definitionKey: string;
|
|
120
|
+
/** Display name from the metafield definition */
|
|
121
|
+
definitionName: string;
|
|
122
|
+
/** Metafield type (e.g., 'text', 'number', 'boolean') */
|
|
123
|
+
type: string;
|
|
124
|
+
/** The metafield value */
|
|
122
125
|
value: string;
|
|
123
|
-
/** Display name (maps to definitionName in backend) */
|
|
124
|
-
name?: string;
|
|
125
|
-
/** Alias for name from backend */
|
|
126
|
-
definitionName?: string;
|
|
127
|
-
type?: string;
|
|
128
126
|
/** Variant ID if this metafield is variant-specific */
|
|
129
127
|
variantId?: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Use `definitionKey` instead. Alias for backwards compatibility.
|
|
130
|
+
*/
|
|
131
|
+
key?: string;
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated Use `definitionName` instead. Alias for backwards compatibility.
|
|
134
|
+
*/
|
|
135
|
+
name?: string;
|
|
130
136
|
}
|
|
131
137
|
interface Product {
|
|
132
138
|
id: string;
|
|
@@ -141,7 +147,8 @@ interface Product {
|
|
|
141
147
|
salePrice?: string | null;
|
|
142
148
|
/** Cost price as string. Use parseFloat() for calculations. */
|
|
143
149
|
costPrice?: string | null;
|
|
144
|
-
status
|
|
150
|
+
/** Product status (active, draft, archived). Always returned by backend. */
|
|
151
|
+
status: string;
|
|
145
152
|
type: 'SIMPLE' | 'VARIABLE';
|
|
146
153
|
isDownloadable?: boolean;
|
|
147
154
|
images?: ProductImage[];
|
|
@@ -246,7 +253,7 @@ interface InventoryInfo {
|
|
|
246
253
|
* - All DISABLED → DISABLED
|
|
247
254
|
* - Mixed → TRACKED
|
|
248
255
|
*/
|
|
249
|
-
trackingMode
|
|
256
|
+
trackingMode: InventoryTrackingMode;
|
|
250
257
|
/**
|
|
251
258
|
* Whether the item is in stock.
|
|
252
259
|
* Pre-calculated by backend - USE THIS instead of checking `available > 0`!
|
|
@@ -1824,9 +1831,12 @@ interface UpdateVariantInventoryDto {
|
|
|
1824
1831
|
reason?: string;
|
|
1825
1832
|
}
|
|
1826
1833
|
interface VariantInventoryResponse {
|
|
1834
|
+
trackingMode: InventoryTrackingMode;
|
|
1827
1835
|
total: number;
|
|
1828
1836
|
reserved: number;
|
|
1829
1837
|
available: number;
|
|
1838
|
+
inStock: boolean;
|
|
1839
|
+
canPurchase: boolean;
|
|
1830
1840
|
lastInventorySyncAt?: string | null;
|
|
1831
1841
|
}
|
|
1832
1842
|
type RefundType = 'full' | 'partial';
|
package/dist/index.d.ts
CHANGED
|
@@ -113,20 +113,26 @@ interface CustomerProfile {
|
|
|
113
113
|
updatedAt: string;
|
|
114
114
|
}
|
|
115
115
|
interface ProductMetafield {
|
|
116
|
-
id
|
|
117
|
-
definitionId
|
|
118
|
-
/** Key from
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
|
|
116
|
+
id: string;
|
|
117
|
+
definitionId: string;
|
|
118
|
+
/** Key from the metafield definition */
|
|
119
|
+
definitionKey: string;
|
|
120
|
+
/** Display name from the metafield definition */
|
|
121
|
+
definitionName: string;
|
|
122
|
+
/** Metafield type (e.g., 'text', 'number', 'boolean') */
|
|
123
|
+
type: string;
|
|
124
|
+
/** The metafield value */
|
|
122
125
|
value: string;
|
|
123
|
-
/** Display name (maps to definitionName in backend) */
|
|
124
|
-
name?: string;
|
|
125
|
-
/** Alias for name from backend */
|
|
126
|
-
definitionName?: string;
|
|
127
|
-
type?: string;
|
|
128
126
|
/** Variant ID if this metafield is variant-specific */
|
|
129
127
|
variantId?: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Use `definitionKey` instead. Alias for backwards compatibility.
|
|
130
|
+
*/
|
|
131
|
+
key?: string;
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated Use `definitionName` instead. Alias for backwards compatibility.
|
|
134
|
+
*/
|
|
135
|
+
name?: string;
|
|
130
136
|
}
|
|
131
137
|
interface Product {
|
|
132
138
|
id: string;
|
|
@@ -141,7 +147,8 @@ interface Product {
|
|
|
141
147
|
salePrice?: string | null;
|
|
142
148
|
/** Cost price as string. Use parseFloat() for calculations. */
|
|
143
149
|
costPrice?: string | null;
|
|
144
|
-
status
|
|
150
|
+
/** Product status (active, draft, archived). Always returned by backend. */
|
|
151
|
+
status: string;
|
|
145
152
|
type: 'SIMPLE' | 'VARIABLE';
|
|
146
153
|
isDownloadable?: boolean;
|
|
147
154
|
images?: ProductImage[];
|
|
@@ -246,7 +253,7 @@ interface InventoryInfo {
|
|
|
246
253
|
* - All DISABLED → DISABLED
|
|
247
254
|
* - Mixed → TRACKED
|
|
248
255
|
*/
|
|
249
|
-
trackingMode
|
|
256
|
+
trackingMode: InventoryTrackingMode;
|
|
250
257
|
/**
|
|
251
258
|
* Whether the item is in stock.
|
|
252
259
|
* Pre-calculated by backend - USE THIS instead of checking `available > 0`!
|
|
@@ -1824,9 +1831,12 @@ interface UpdateVariantInventoryDto {
|
|
|
1824
1831
|
reason?: string;
|
|
1825
1832
|
}
|
|
1826
1833
|
interface VariantInventoryResponse {
|
|
1834
|
+
trackingMode: InventoryTrackingMode;
|
|
1827
1835
|
total: number;
|
|
1828
1836
|
reserved: number;
|
|
1829
1837
|
available: number;
|
|
1838
|
+
inStock: boolean;
|
|
1839
|
+
canPurchase: boolean;
|
|
1830
1840
|
lastInventorySyncAt?: string | null;
|
|
1831
1841
|
}
|
|
1832
1842
|
type RefundType = 'full' | 'partial';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-sync-sdk",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"description": "Official SDK for building e-commerce storefronts with OmniSync Platform. Perfect for vibe-coded sites, AI-built stores (Cursor, Lovable, v0), and custom storefronts.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|