omni-sync-sdk 0.17.4 → 0.17.5
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/README.md +2 -2
- package/dist/index.d.mts +13 -5
- package/dist/index.d.ts +13 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -601,8 +601,8 @@ interface InventoryInfo {
|
|
|
601
601
|
reserved: number;
|
|
602
602
|
available: number;
|
|
603
603
|
trackingMode?: 'TRACKED' | 'UNLIMITED' | 'DISABLED';
|
|
604
|
-
inStock: boolean;
|
|
605
|
-
canPurchase: boolean;
|
|
604
|
+
inStock: boolean; // Pre-calculated - use this for display!
|
|
605
|
+
canPurchase: boolean; // Pre-calculated - use this for add-to-cart
|
|
606
606
|
}
|
|
607
607
|
```
|
|
608
608
|
|
package/dist/index.d.mts
CHANGED
|
@@ -187,17 +187,25 @@ interface InventoryInfo {
|
|
|
187
187
|
* - TRACKED: Normal inventory with quantity tracking
|
|
188
188
|
* - UNLIMITED: Always in stock
|
|
189
189
|
* - DISABLED: Cannot be purchased
|
|
190
|
+
*
|
|
191
|
+
* Note: For VARIABLE products, this is aggregated from variants:
|
|
192
|
+
* - All UNLIMITED → UNLIMITED
|
|
193
|
+
* - All DISABLED → DISABLED
|
|
194
|
+
* - Mixed → TRACKED
|
|
190
195
|
*/
|
|
191
196
|
trackingMode?: InventoryTrackingMode;
|
|
192
197
|
/**
|
|
193
|
-
* Whether the item is in stock
|
|
194
|
-
*
|
|
198
|
+
* Whether the item is in stock.
|
|
199
|
+
* Pre-calculated by backend - USE THIS instead of checking `available > 0`!
|
|
200
|
+
* For VARIABLE products, true if ANY variant is available.
|
|
195
201
|
*/
|
|
196
|
-
inStock
|
|
202
|
+
inStock: boolean;
|
|
197
203
|
/**
|
|
198
|
-
* Whether the item can be purchased
|
|
204
|
+
* Whether the item can be purchased.
|
|
205
|
+
* Pre-calculated by backend - USE THIS for add-to-cart button state!
|
|
206
|
+
* false if trackingMode is DISABLED or if out of stock.
|
|
199
207
|
*/
|
|
200
|
-
canPurchase
|
|
208
|
+
canPurchase: boolean;
|
|
201
209
|
}
|
|
202
210
|
/**
|
|
203
211
|
* Check if a product description contains HTML and should be rendered with dangerouslySetInnerHTML
|
package/dist/index.d.ts
CHANGED
|
@@ -187,17 +187,25 @@ interface InventoryInfo {
|
|
|
187
187
|
* - TRACKED: Normal inventory with quantity tracking
|
|
188
188
|
* - UNLIMITED: Always in stock
|
|
189
189
|
* - DISABLED: Cannot be purchased
|
|
190
|
+
*
|
|
191
|
+
* Note: For VARIABLE products, this is aggregated from variants:
|
|
192
|
+
* - All UNLIMITED → UNLIMITED
|
|
193
|
+
* - All DISABLED → DISABLED
|
|
194
|
+
* - Mixed → TRACKED
|
|
190
195
|
*/
|
|
191
196
|
trackingMode?: InventoryTrackingMode;
|
|
192
197
|
/**
|
|
193
|
-
* Whether the item is in stock
|
|
194
|
-
*
|
|
198
|
+
* Whether the item is in stock.
|
|
199
|
+
* Pre-calculated by backend - USE THIS instead of checking `available > 0`!
|
|
200
|
+
* For VARIABLE products, true if ANY variant is available.
|
|
195
201
|
*/
|
|
196
|
-
inStock
|
|
202
|
+
inStock: boolean;
|
|
197
203
|
/**
|
|
198
|
-
* Whether the item can be purchased
|
|
204
|
+
* Whether the item can be purchased.
|
|
205
|
+
* Pre-calculated by backend - USE THIS for add-to-cart button state!
|
|
206
|
+
* false if trackingMode is DISABLED or if out of stock.
|
|
199
207
|
*/
|
|
200
|
-
canPurchase
|
|
208
|
+
canPurchase: boolean;
|
|
201
209
|
}
|
|
202
210
|
/**
|
|
203
211
|
* Check if a product description contains HTML and should be rendered with dangerouslySetInnerHTML
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-sync-sdk",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.5",
|
|
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",
|