@swan-admin/swan-ai-measurements 1.0.34 → 1.0.35
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/auth.js +1 -1
- package/constants.js +2 -1
- package/package.json +1 -1
- package/tryOn.js +2 -1
package/auth.js
CHANGED
package/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const FILE_UPLOAD_KEY = "7a8ccc86249849be911b0d7dbc20290e";
|
|
2
2
|
export const APP_BASE_URL = "https://fitview-server-staging.ft2a64raup4pg.us-east-1.cs.amazonlightsail.com";
|
|
3
3
|
export const APP_AUTH_BASE_URL = "https://staging.api.getswan.co";
|
|
4
|
-
export const APP_AUTH_WEBSOCKET_URL = "wss://staging.wsnotify.api.getswan.co
|
|
4
|
+
export const APP_AUTH_WEBSOCKET_URL = "wss://staging.wsnotify.api.getswan.co";
|
|
5
5
|
export const APP_TRY_ON_WEBSOCKET_URL = "wss://bucbzczxjk.execute-api.ap-south-1.amazonaws.com";
|
|
6
6
|
export const APP_RECOMMENDATION_WEBSOCKET_URL = "wss://staging.wsnotify.api.getswan.co/scanning";
|
|
7
7
|
export const APP_POSE_DETECTION_WEbSOCKET_URL =
|
|
@@ -27,6 +27,7 @@ export const API_ENDPOINTS = {
|
|
|
27
27
|
TRY_ON_IMAGE_URLS: "/tryon/user-image-urls",
|
|
28
28
|
TRY_ON_RESULT_IMAGE_DOWNLOAD: "/tryon/result-image-urls/download",
|
|
29
29
|
TRY_ON: "/tryon",
|
|
30
|
+
AUTH: "/auth",
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
export const REQUIRED_MESSAGE = "Please verify required parameters";
|
package/package.json
CHANGED
package/tryOn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
import { API_ENDPOINTS, APP_AUTH_BASE_URL, REQUIRED_MESSAGE } from "./constants.js";
|
|
2
|
+
import { API_ENDPOINTS, APP_AUTH_BASE_URL, APP_AUTH_WEBSOCKET_URL, REQUIRED_MESSAGE } from "./constants.js";
|
|
3
3
|
import { checkParameters } from "./utils.js";
|
|
4
4
|
|
|
5
5
|
class TryOn {
|
|
@@ -72,6 +72,7 @@ class TryOn {
|
|
|
72
72
|
throw new Error(REQUIRED_MESSAGE);
|
|
73
73
|
}
|
|
74
74
|
TryOn.disconnectSocket();
|
|
75
|
+
const url = `${APP_AUTH_WEBSOCKET_URL}${API_ENDPOINTS.TRY_ON}/?store_url=${shopDomain}&product_name=${productName}&scan_id=${userId}`;
|
|
75
76
|
TryOn.tryOnSocketRef = new WebSocket(url);
|
|
76
77
|
TryOn.tryOnSocketRef.onopen = async () => {
|
|
77
78
|
onOpen?.();
|