omni-sync-sdk 0.8.2 → 0.8.3
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 +5 -4
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,10 +38,10 @@ const { data: products } = await omni.getProducts();
|
|
|
38
38
|
|
|
39
39
|
> **IMPORTANT:** There are TWO different checkout flows. You MUST use the correct one based on whether the customer is logged in or not.
|
|
40
40
|
|
|
41
|
-
| Customer Type | Cart Type
|
|
42
|
-
|
|
43
|
-
| **Guest**
|
|
44
|
-
| **Logged In** | Server Cart
|
|
41
|
+
| Customer Type | Cart Type | Checkout Method | Orders Linked to Account? |
|
|
42
|
+
| ------------- | ------------------------- | -------------------- | ------------------------- |
|
|
43
|
+
| **Guest** | Local Cart (localStorage) | `submitGuestOrder()` | No |
|
|
44
|
+
| **Logged In** | Server Cart | `completeCheckout()` | Yes |
|
|
45
45
|
|
|
46
46
|
### Decision Flow
|
|
47
47
|
|
|
@@ -2110,6 +2110,7 @@ export default function CheckoutPage() {
|
|
|
2110
2110
|
```
|
|
2111
2111
|
|
|
2112
2112
|
> **Key Points:**
|
|
2113
|
+
>
|
|
2113
2114
|
> - `isLoggedIn()` determines which flow to use
|
|
2114
2115
|
> - Logged-in customers use `createCart()` → `createCheckout()` → `completeCheckout()`
|
|
2115
2116
|
> - Guests use local cart + `submitGuestOrder()`
|
package/dist/index.d.mts
CHANGED
|
@@ -65,6 +65,12 @@ interface CustomerProfile {
|
|
|
65
65
|
createdAt: string;
|
|
66
66
|
updatedAt: string;
|
|
67
67
|
}
|
|
68
|
+
interface ProductMetafield {
|
|
69
|
+
key: string;
|
|
70
|
+
value: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
type?: string;
|
|
73
|
+
}
|
|
68
74
|
interface Product {
|
|
69
75
|
id: string;
|
|
70
76
|
name: string;
|
|
@@ -82,6 +88,7 @@ interface Product {
|
|
|
82
88
|
variants?: ProductVariant[];
|
|
83
89
|
categories?: string[];
|
|
84
90
|
tags?: string[];
|
|
91
|
+
metafields?: ProductMetafield[];
|
|
85
92
|
channels?: Record<string, Record<string, unknown>>;
|
|
86
93
|
createdAt: string;
|
|
87
94
|
updatedAt: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,12 @@ interface CustomerProfile {
|
|
|
65
65
|
createdAt: string;
|
|
66
66
|
updatedAt: string;
|
|
67
67
|
}
|
|
68
|
+
interface ProductMetafield {
|
|
69
|
+
key: string;
|
|
70
|
+
value: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
type?: string;
|
|
73
|
+
}
|
|
68
74
|
interface Product {
|
|
69
75
|
id: string;
|
|
70
76
|
name: string;
|
|
@@ -82,6 +88,7 @@ interface Product {
|
|
|
82
88
|
variants?: ProductVariant[];
|
|
83
89
|
categories?: string[];
|
|
84
90
|
tags?: string[];
|
|
91
|
+
metafields?: ProductMetafield[];
|
|
85
92
|
channels?: Record<string, Record<string, unknown>>;
|
|
86
93
|
createdAt: string;
|
|
87
94
|
updatedAt: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-sync-sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
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",
|