omni-sync-sdk 0.18.2 → 0.18.4
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 +34 -3
- package/dist/index.d.ts +34 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -150,6 +150,10 @@ interface Product {
|
|
|
150
150
|
/** Product status (active, draft, archived). Always returned by backend. */
|
|
151
151
|
status: string;
|
|
152
152
|
type: 'SIMPLE' | 'VARIABLE';
|
|
153
|
+
/**
|
|
154
|
+
* Whether product is downloadable/digital.
|
|
155
|
+
* @deprecated For read operations, check channels.WOOCOMMERCE.downloadable instead
|
|
156
|
+
*/
|
|
153
157
|
isDownloadable?: boolean;
|
|
154
158
|
images?: ProductImage[];
|
|
155
159
|
inventory?: InventoryInfo | null;
|
|
@@ -165,12 +169,18 @@ interface Product {
|
|
|
165
169
|
name: string;
|
|
166
170
|
}>;
|
|
167
171
|
tags?: string[];
|
|
172
|
+
/** Array of attribute option IDs for global assignments (admin mode only) */
|
|
173
|
+
attributes?: string[];
|
|
168
174
|
metafields?: ProductMetafield[];
|
|
169
175
|
channels?: Record<string, Record<string, unknown>>;
|
|
170
176
|
/** Shopify product ID (admin mode only) */
|
|
171
177
|
shopifyProductId?: string | null;
|
|
172
|
-
/**
|
|
173
|
-
|
|
178
|
+
/** WooCommerce product ID (admin mode only) */
|
|
179
|
+
woocommerceProductId?: string | null;
|
|
180
|
+
/** Meta/Facebook Item Group ID (admin mode only) */
|
|
181
|
+
metaItemGroupId?: string | null;
|
|
182
|
+
/** Whether product needs sync to platforms. Always returned by backend. */
|
|
183
|
+
needsSync: boolean;
|
|
174
184
|
/** Last sync timestamp (admin mode only) */
|
|
175
185
|
lastSyncedAt?: string | null;
|
|
176
186
|
/** Menu/display order */
|
|
@@ -208,6 +218,22 @@ interface ProductImage {
|
|
|
208
218
|
isMain?: boolean;
|
|
209
219
|
/** Alt text for accessibility */
|
|
210
220
|
alt?: string;
|
|
221
|
+
/** Image ID (admin mode only) */
|
|
222
|
+
id?: string;
|
|
223
|
+
/** Storage key (admin mode only) */
|
|
224
|
+
key?: string;
|
|
225
|
+
/** Thumbnail URL for previews (admin mode only) */
|
|
226
|
+
thumbnailUrl?: string;
|
|
227
|
+
/** Image width in pixels (admin mode only) */
|
|
228
|
+
width?: number;
|
|
229
|
+
/** Image height in pixels (admin mode only) */
|
|
230
|
+
height?: number;
|
|
231
|
+
/** File size in bytes (admin mode only) */
|
|
232
|
+
size?: number;
|
|
233
|
+
/** MIME type (admin mode only) */
|
|
234
|
+
mimeType?: string;
|
|
235
|
+
/** Creation timestamp (admin mode only) */
|
|
236
|
+
createdAt?: string;
|
|
211
237
|
}
|
|
212
238
|
interface ProductVariant {
|
|
213
239
|
id: string;
|
|
@@ -223,7 +249,10 @@ interface ProductVariant {
|
|
|
223
249
|
attributes?: Record<string, unknown> | null;
|
|
224
250
|
inventory?: InventoryInfo | null;
|
|
225
251
|
/** Variant image URL or image object */
|
|
226
|
-
image?:
|
|
252
|
+
image?: string | {
|
|
253
|
+
url: string;
|
|
254
|
+
thumbnailUrl?: string;
|
|
255
|
+
} | null;
|
|
227
256
|
/** Display position/order for sorting variants */
|
|
228
257
|
position: number;
|
|
229
258
|
/** Variant status */
|
|
@@ -266,6 +295,8 @@ interface InventoryInfo {
|
|
|
266
295
|
* false if trackingMode is DISABLED or if out of stock.
|
|
267
296
|
*/
|
|
268
297
|
canPurchase: boolean;
|
|
298
|
+
/** Last inventory sync timestamp (admin mode only) */
|
|
299
|
+
lastInventorySyncAt?: string | null;
|
|
269
300
|
}
|
|
270
301
|
/**
|
|
271
302
|
* Check if a product description contains HTML and should be rendered with dangerouslySetInnerHTML
|
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,10 @@ interface Product {
|
|
|
150
150
|
/** Product status (active, draft, archived). Always returned by backend. */
|
|
151
151
|
status: string;
|
|
152
152
|
type: 'SIMPLE' | 'VARIABLE';
|
|
153
|
+
/**
|
|
154
|
+
* Whether product is downloadable/digital.
|
|
155
|
+
* @deprecated For read operations, check channels.WOOCOMMERCE.downloadable instead
|
|
156
|
+
*/
|
|
153
157
|
isDownloadable?: boolean;
|
|
154
158
|
images?: ProductImage[];
|
|
155
159
|
inventory?: InventoryInfo | null;
|
|
@@ -165,12 +169,18 @@ interface Product {
|
|
|
165
169
|
name: string;
|
|
166
170
|
}>;
|
|
167
171
|
tags?: string[];
|
|
172
|
+
/** Array of attribute option IDs for global assignments (admin mode only) */
|
|
173
|
+
attributes?: string[];
|
|
168
174
|
metafields?: ProductMetafield[];
|
|
169
175
|
channels?: Record<string, Record<string, unknown>>;
|
|
170
176
|
/** Shopify product ID (admin mode only) */
|
|
171
177
|
shopifyProductId?: string | null;
|
|
172
|
-
/**
|
|
173
|
-
|
|
178
|
+
/** WooCommerce product ID (admin mode only) */
|
|
179
|
+
woocommerceProductId?: string | null;
|
|
180
|
+
/** Meta/Facebook Item Group ID (admin mode only) */
|
|
181
|
+
metaItemGroupId?: string | null;
|
|
182
|
+
/** Whether product needs sync to platforms. Always returned by backend. */
|
|
183
|
+
needsSync: boolean;
|
|
174
184
|
/** Last sync timestamp (admin mode only) */
|
|
175
185
|
lastSyncedAt?: string | null;
|
|
176
186
|
/** Menu/display order */
|
|
@@ -208,6 +218,22 @@ interface ProductImage {
|
|
|
208
218
|
isMain?: boolean;
|
|
209
219
|
/** Alt text for accessibility */
|
|
210
220
|
alt?: string;
|
|
221
|
+
/** Image ID (admin mode only) */
|
|
222
|
+
id?: string;
|
|
223
|
+
/** Storage key (admin mode only) */
|
|
224
|
+
key?: string;
|
|
225
|
+
/** Thumbnail URL for previews (admin mode only) */
|
|
226
|
+
thumbnailUrl?: string;
|
|
227
|
+
/** Image width in pixels (admin mode only) */
|
|
228
|
+
width?: number;
|
|
229
|
+
/** Image height in pixels (admin mode only) */
|
|
230
|
+
height?: number;
|
|
231
|
+
/** File size in bytes (admin mode only) */
|
|
232
|
+
size?: number;
|
|
233
|
+
/** MIME type (admin mode only) */
|
|
234
|
+
mimeType?: string;
|
|
235
|
+
/** Creation timestamp (admin mode only) */
|
|
236
|
+
createdAt?: string;
|
|
211
237
|
}
|
|
212
238
|
interface ProductVariant {
|
|
213
239
|
id: string;
|
|
@@ -223,7 +249,10 @@ interface ProductVariant {
|
|
|
223
249
|
attributes?: Record<string, unknown> | null;
|
|
224
250
|
inventory?: InventoryInfo | null;
|
|
225
251
|
/** Variant image URL or image object */
|
|
226
|
-
image?:
|
|
252
|
+
image?: string | {
|
|
253
|
+
url: string;
|
|
254
|
+
thumbnailUrl?: string;
|
|
255
|
+
} | null;
|
|
227
256
|
/** Display position/order for sorting variants */
|
|
228
257
|
position: number;
|
|
229
258
|
/** Variant status */
|
|
@@ -266,6 +295,8 @@ interface InventoryInfo {
|
|
|
266
295
|
* false if trackingMode is DISABLED or if out of stock.
|
|
267
296
|
*/
|
|
268
297
|
canPurchase: boolean;
|
|
298
|
+
/** Last inventory sync timestamp (admin mode only) */
|
|
299
|
+
lastInventorySyncAt?: string | null;
|
|
269
300
|
}
|
|
270
301
|
/**
|
|
271
302
|
* 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.18.
|
|
3
|
+
"version": "0.18.4",
|
|
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",
|