omni-sync-sdk 0.7.6 → 0.7.7
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -13
- package/dist/index.mjs +22 -13
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2163,7 +2163,7 @@ declare class OmniSyncClient {
|
|
|
2163
2163
|
}): Promise<CustomerProfile>;
|
|
2164
2164
|
/**
|
|
2165
2165
|
* Get the current customer's orders (requires customerToken)
|
|
2166
|
-
*
|
|
2166
|
+
* Works in vibe-coded and storefront modes
|
|
2167
2167
|
*/
|
|
2168
2168
|
getMyOrders(params?: {
|
|
2169
2169
|
page?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -2163,7 +2163,7 @@ declare class OmniSyncClient {
|
|
|
2163
2163
|
}): Promise<CustomerProfile>;
|
|
2164
2164
|
/**
|
|
2165
2165
|
* Get the current customer's orders (requires customerToken)
|
|
2166
|
-
*
|
|
2166
|
+
* Works in vibe-coded and storefront modes
|
|
2167
2167
|
*/
|
|
2168
2168
|
getMyOrders(params?: {
|
|
2169
2169
|
page?: number;
|
package/dist/index.js
CHANGED
|
@@ -2015,24 +2015,33 @@ var OmniSyncClient = class {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
/**
|
|
2017
2017
|
* Get the current customer's orders (requires customerToken)
|
|
2018
|
-
*
|
|
2018
|
+
* Works in vibe-coded and storefront modes
|
|
2019
2019
|
*/
|
|
2020
2020
|
async getMyOrders(params) {
|
|
2021
|
-
if (!this.storeId) {
|
|
2022
|
-
throw new OmniSyncError("getMyOrders is only available in storefront mode", 400);
|
|
2023
|
-
}
|
|
2024
2021
|
if (!this.customerToken) {
|
|
2025
2022
|
throw new OmniSyncError("Customer token required. Call setCustomerToken() after login.", 401);
|
|
2026
2023
|
}
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2024
|
+
const queryParams = {
|
|
2025
|
+
page: params?.page,
|
|
2026
|
+
limit: params?.limit
|
|
2027
|
+
};
|
|
2028
|
+
if (this.isVibeCodedMode()) {
|
|
2029
|
+
return this.vibeCodedRequest(
|
|
2030
|
+
"GET",
|
|
2031
|
+
"/customers/me/orders",
|
|
2032
|
+
void 0,
|
|
2033
|
+
queryParams
|
|
2034
|
+
);
|
|
2035
|
+
}
|
|
2036
|
+
if (this.storeId && !this.apiKey) {
|
|
2037
|
+
return this.storefrontRequest(
|
|
2038
|
+
"GET",
|
|
2039
|
+
"/customers/me/orders",
|
|
2040
|
+
void 0,
|
|
2041
|
+
queryParams
|
|
2042
|
+
);
|
|
2043
|
+
}
|
|
2044
|
+
throw new OmniSyncError("getMyOrders is only available in vibe-coded or storefront mode", 400);
|
|
2036
2045
|
}
|
|
2037
2046
|
/**
|
|
2038
2047
|
* Get the current customer's addresses (requires customerToken)
|
package/dist/index.mjs
CHANGED
|
@@ -1990,24 +1990,33 @@ var OmniSyncClient = class {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
/**
|
|
1992
1992
|
* Get the current customer's orders (requires customerToken)
|
|
1993
|
-
*
|
|
1993
|
+
* Works in vibe-coded and storefront modes
|
|
1994
1994
|
*/
|
|
1995
1995
|
async getMyOrders(params) {
|
|
1996
|
-
if (!this.storeId) {
|
|
1997
|
-
throw new OmniSyncError("getMyOrders is only available in storefront mode", 400);
|
|
1998
|
-
}
|
|
1999
1996
|
if (!this.customerToken) {
|
|
2000
1997
|
throw new OmniSyncError("Customer token required. Call setCustomerToken() after login.", 401);
|
|
2001
1998
|
}
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1999
|
+
const queryParams = {
|
|
2000
|
+
page: params?.page,
|
|
2001
|
+
limit: params?.limit
|
|
2002
|
+
};
|
|
2003
|
+
if (this.isVibeCodedMode()) {
|
|
2004
|
+
return this.vibeCodedRequest(
|
|
2005
|
+
"GET",
|
|
2006
|
+
"/customers/me/orders",
|
|
2007
|
+
void 0,
|
|
2008
|
+
queryParams
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
2011
|
+
if (this.storeId && !this.apiKey) {
|
|
2012
|
+
return this.storefrontRequest(
|
|
2013
|
+
"GET",
|
|
2014
|
+
"/customers/me/orders",
|
|
2015
|
+
void 0,
|
|
2016
|
+
queryParams
|
|
2017
|
+
);
|
|
2018
|
+
}
|
|
2019
|
+
throw new OmniSyncError("getMyOrders is only available in vibe-coded or storefront mode", 400);
|
|
2011
2020
|
}
|
|
2012
2021
|
/**
|
|
2013
2022
|
* Get the current customer's addresses (requires customerToken)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-sync-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
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",
|