@swan-admin/swan-ai-measurements 1.1.81 → 1.1.83
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.d.ts +2 -2
- package/dist/esm/constants.d.ts +2 -2
- package/dist/esm/utils.js +9 -9
- package/dist/utils.js +9 -9
- package/package.json +1 -1
- package/src/constants.ts +2 -2
- package/src/utils.ts +9 -9
package/dist/constants.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface BodyScanObjMetaData {
|
|
|
23
23
|
customer_store_url: string;
|
|
24
24
|
clothes_fit: string;
|
|
25
25
|
scan_type?: string;
|
|
26
|
-
callback_url
|
|
26
|
+
callback_url?: string;
|
|
27
27
|
}
|
|
28
28
|
export interface FaceScanObjMetaData {
|
|
29
29
|
gender: string;
|
|
@@ -32,7 +32,7 @@ export interface FaceScanObjMetaData {
|
|
|
32
32
|
focal_length: string;
|
|
33
33
|
customer_store_url: string;
|
|
34
34
|
scan_type: string;
|
|
35
|
-
callback_url
|
|
35
|
+
callback_url?: string;
|
|
36
36
|
}
|
|
37
37
|
export type RequiredMetaDataKeys = "gender" | "focal_length" | "height" | "customer_store_url" | "callback_url" | "clothes_fit";
|
|
38
38
|
export type RequiredFaceScanMetaDataKeys = "gender" | "focal_length" | "customer_store_url" | "scan_type" | "callback_url" | "face_scan_id";
|
package/dist/esm/constants.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface BodyScanObjMetaData {
|
|
|
23
23
|
customer_store_url: string;
|
|
24
24
|
clothes_fit: string;
|
|
25
25
|
scan_type?: string;
|
|
26
|
-
callback_url
|
|
26
|
+
callback_url?: string;
|
|
27
27
|
}
|
|
28
28
|
export interface FaceScanObjMetaData {
|
|
29
29
|
gender: string;
|
|
@@ -32,7 +32,7 @@ export interface FaceScanObjMetaData {
|
|
|
32
32
|
focal_length: string;
|
|
33
33
|
customer_store_url: string;
|
|
34
34
|
scan_type: string;
|
|
35
|
-
callback_url
|
|
35
|
+
callback_url?: string;
|
|
36
36
|
}
|
|
37
37
|
export type RequiredMetaDataKeys = "gender" | "focal_length" | "height" | "customer_store_url" | "callback_url" | "clothes_fit";
|
|
38
38
|
export type RequiredFaceScanMetaDataKeys = "gender" | "focal_length" | "customer_store_url" | "scan_type" | "callback_url" | "face_scan_id";
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
if (!correctFormat) {
|
|
56
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
if (!correctFormat) {
|
|
53
|
-
|
|
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
package/src/constants.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface BodyScanObjMetaData {
|
|
|
69
69
|
customer_store_url: string;
|
|
70
70
|
clothes_fit: string;
|
|
71
71
|
scan_type?: string;
|
|
72
|
-
callback_url
|
|
72
|
+
callback_url?: string;
|
|
73
73
|
}
|
|
74
74
|
export interface FaceScanObjMetaData {
|
|
75
75
|
gender: string;
|
|
@@ -78,7 +78,7 @@ export interface FaceScanObjMetaData {
|
|
|
78
78
|
focal_length: string;
|
|
79
79
|
customer_store_url: string;
|
|
80
80
|
scan_type: string;
|
|
81
|
-
callback_url
|
|
81
|
+
callback_url?:string
|
|
82
82
|
}
|
|
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";
|
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
if (!correctFormat) {
|
|
68
|
-
|
|
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
|
|