@swan-admin/swan-ai-measurements 1.1.79 → 1.1.82

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/constants.js CHANGED
@@ -51,8 +51,8 @@ exports.API_ENDPOINTS = {
51
51
  DEVICE_INFO: "/deviceinfo",
52
52
  TRY_ON_PRODUCT_IMAGE_ELIGIBILTY: "/tryon/product-image-eligibility"
53
53
  };
54
- exports.requiredMetaData = ["gender", "focal_length", "height", "customer_store_url", "callback_url", "clothes_fit"];
55
- exports.requiredFaceScanMetaData = ["gender", "focal_length", "customer_store_url", "scan_type", "callback_url", "face_scan_id"];
54
+ exports.requiredMetaData = ["gender", "focal_length", "height", "customer_store_url", "clothes_fit"];
55
+ exports.requiredFaceScanMetaData = ["gender", "focal_length", "customer_store_url", "scan_type", "face_scan_id"];
56
56
  exports.REQUIRED_MESSAGE = "Please verify required parameters";
57
57
  exports.REQUIRED_MESSAGE_FOR_META_DATA = "Please verify required parameters in meta data";
58
58
  exports.REQUIRED_ERROR_MESSAGE_INVALID_EMAIL = "Invalid Email";
@@ -48,8 +48,8 @@ export const API_ENDPOINTS = {
48
48
  DEVICE_INFO: "/deviceinfo",
49
49
  TRY_ON_PRODUCT_IMAGE_ELIGIBILTY: "/tryon/product-image-eligibility"
50
50
  };
51
- export const requiredMetaData = ["gender", "focal_length", "height", "customer_store_url", "callback_url", "clothes_fit"];
52
- export const requiredFaceScanMetaData = ["gender", "focal_length", "customer_store_url", "scan_type", "callback_url", "face_scan_id"];
51
+ export const requiredMetaData = ["gender", "focal_length", "height", "customer_store_url", "clothes_fit"];
52
+ export const requiredFaceScanMetaData = ["gender", "focal_length", "customer_store_url", "scan_type", "face_scan_id"];
53
53
  export const REQUIRED_MESSAGE = "Please verify required parameters";
54
54
  export const REQUIRED_MESSAGE_FOR_META_DATA = "Please verify required parameters in meta data";
55
55
  export const REQUIRED_ERROR_MESSAGE_INVALID_EMAIL = "Invalid Email";
package/dist/esm/utils.js CHANGED
@@ -46,15 +46,15 @@ export function checkMetaDataValue(arr) {
46
46
  if (!checkValues(arr, requiredMetaData)) {
47
47
  return false;
48
48
  }
49
- let correctFormat = false;
50
- for (const obj of arr) {
51
- if (obj.callback_url && obj.callback_url.startsWith("https")) {
52
- correctFormat = true;
53
- }
54
- }
55
- if (!correctFormat) {
56
- return false;
57
- }
49
+ // let correctFormat = false;
50
+ // for (const obj of arr) {
51
+ // if (obj.callback_url && obj.callback_url.startsWith("https")) {
52
+ // correctFormat = true;
53
+ // }
54
+ // }
55
+ // if (!correctFormat) {
56
+ // return false;
57
+ // }
58
58
  return true;
59
59
  }
60
60
  export const checkValues = (arr, requiredMetaData) => {
package/dist/utils.js CHANGED
@@ -43,15 +43,15 @@ function checkMetaDataValue(arr) {
43
43
  if (!(0, exports.checkValues)(arr, constants_js_1.requiredMetaData)) {
44
44
  return false;
45
45
  }
46
- let correctFormat = false;
47
- for (const obj of arr) {
48
- if (obj.callback_url && obj.callback_url.startsWith("https")) {
49
- correctFormat = true;
50
- }
51
- }
52
- if (!correctFormat) {
53
- return false;
54
- }
46
+ // let correctFormat = false;
47
+ // for (const obj of arr) {
48
+ // if (obj.callback_url && obj.callback_url.startsWith("https")) {
49
+ // correctFormat = true;
50
+ // }
51
+ // }
52
+ // if (!correctFormat) {
53
+ // return false;
54
+ // }
55
55
  return true;
56
56
  }
57
57
  exports.checkMetaDataValue = checkMetaDataValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-admin/swan-ai-measurements",
3
- "version": "1.1.79",
3
+ "version": "1.1.82",
4
4
  "description": "provides ai measurement suggestion",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -21,7 +21,8 @@
21
21
  "socket.io": "^4.7.5",
22
22
  "socket.io-client": "^4.7.5",
23
23
  "tslib": "^2.6.2",
24
- "typescript": "^5.4.5"
24
+ "typescript": "^5.4.5",
25
+ "whoami": "^0.0.3"
25
26
  },
26
27
  "scripts": {
27
28
  "start": "nodemon dist/index.js",
package/src/constants.ts CHANGED
@@ -83,8 +83,8 @@ export interface FaceScanObjMetaData {
83
83
  export type RequiredMetaDataKeys = "gender" | "focal_length" | "height" | "customer_store_url" | "callback_url" | "clothes_fit";
84
84
  export type RequiredFaceScanMetaDataKeys = "gender" | "focal_length" | "customer_store_url" | "scan_type" | "callback_url" | "face_scan_id";
85
85
 
86
- export const requiredMetaData: RequiredMetaDataKeys[] = ["gender", "focal_length", "height", "customer_store_url", "callback_url", "clothes_fit"];
87
- export const requiredFaceScanMetaData: RequiredFaceScanMetaDataKeys[] = ["gender", "focal_length", "customer_store_url","scan_type","callback_url","face_scan_id"];
86
+ export const requiredMetaData: RequiredMetaDataKeys[] = ["gender", "focal_length", "height", "customer_store_url", "clothes_fit"];
87
+ export const requiredFaceScanMetaData: RequiredFaceScanMetaDataKeys[] = ["gender", "focal_length", "customer_store_url","scan_type","face_scan_id"];
88
88
 
89
89
  export const REQUIRED_MESSAGE: string = "Please verify required parameters";
90
90
  export const REQUIRED_MESSAGE_FOR_META_DATA: string = "Please verify required parameters in meta data";
package/src/utils.ts CHANGED
@@ -58,15 +58,15 @@ export function checkMetaDataValue(arr: Partial<BodyScanObjMetaData>[]): boolean
58
58
  if (!checkValues(arr, requiredMetaData)) {
59
59
  return false;
60
60
  }
61
- let correctFormat = false;
62
- for (const obj of arr) {
63
- if (obj.callback_url && obj.callback_url.startsWith("https")) {
64
- correctFormat = true;
65
- }
66
- }
67
- if (!correctFormat) {
68
- return false;
69
- }
61
+ // let correctFormat = false;
62
+ // for (const obj of arr) {
63
+ // if (obj.callback_url && obj.callback_url.startsWith("https")) {
64
+ // correctFormat = true;
65
+ // }
66
+ // }
67
+ // if (!correctFormat) {
68
+ // return false;
69
+ // }
70
70
  return true;
71
71
  }
72
72