@mediaviz/sdk 1.9.0-rc.5 → 1.10.0-dev.118
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/sdk.cjs +31 -29
- package/dist/sdk.d.cts +18 -8
- package/dist/sdk.d.ts +18 -8
- package/dist/sdk.esm.d.ts +18 -8
- package/dist/sdk.esm.js +31 -29
- package/dist/sdk.umd.js +31 -29
- package/package.json +1 -1
package/dist/sdk.cjs
CHANGED
|
@@ -1149,7 +1149,7 @@ class Company {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
function stripUndef$
|
|
1152
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1153
1153
|
|
|
1154
1154
|
class CuratedAlbums {
|
|
1155
1155
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1157,7 +1157,7 @@ class CuratedAlbums {
|
|
|
1157
1157
|
async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
1158
1158
|
this._ctx.requireTokens();
|
|
1159
1159
|
const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1160
|
-
const body = stripUndef$
|
|
1160
|
+
const body = stripUndef$8({
|
|
1161
1161
|
name: name,
|
|
1162
1162
|
description: description,
|
|
1163
1163
|
confidence_value: confidenceValue,
|
|
@@ -1211,7 +1211,7 @@ class CuratedAlbums {
|
|
|
1211
1211
|
async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
1212
1212
|
this._ctx.requireTokens();
|
|
1213
1213
|
const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
|
|
1214
|
-
const body = stripUndef$
|
|
1214
|
+
const body = stripUndef$8({
|
|
1215
1215
|
name: name,
|
|
1216
1216
|
description: description,
|
|
1217
1217
|
confidence_value: confidenceValue,
|
|
@@ -1235,7 +1235,7 @@ class CuratedAlbums {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
|
|
1238
|
-
function stripUndef$
|
|
1238
|
+
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1239
1239
|
|
|
1240
1240
|
class CustomAlbums {
|
|
1241
1241
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1283,7 +1283,7 @@ class CustomAlbums {
|
|
|
1283
1283
|
async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1284
1284
|
this._ctx.requireTokens();
|
|
1285
1285
|
const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1286
|
-
const body = stripUndef$
|
|
1286
|
+
const body = stripUndef$7({
|
|
1287
1287
|
name: name,
|
|
1288
1288
|
description: description,
|
|
1289
1289
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1296,7 +1296,7 @@ class CustomAlbums {
|
|
|
1296
1296
|
async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1297
1297
|
this._ctx.requireTokens();
|
|
1298
1298
|
const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
|
|
1299
|
-
const body = stripUndef$
|
|
1299
|
+
const body = stripUndef$7({
|
|
1300
1300
|
name: name,
|
|
1301
1301
|
description: description,
|
|
1302
1302
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1396,7 +1396,7 @@ async function handleResponse(response) {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
|
|
1399
|
-
function stripUndef$
|
|
1399
|
+
function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1400
1400
|
|
|
1401
1401
|
class EmailTokens {
|
|
1402
1402
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1427,7 +1427,7 @@ class EmailTokens {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
|
|
1429
1429
|
async validateToken(token) {
|
|
1430
|
-
const body = stripUndef$
|
|
1430
|
+
const body = stripUndef$6({
|
|
1431
1431
|
token: token,
|
|
1432
1432
|
});
|
|
1433
1433
|
const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
|
|
@@ -1439,7 +1439,7 @@ class EmailTokens {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
|
|
1441
1441
|
async resetPassword(token, newPassword) {
|
|
1442
|
-
const body = stripUndef$
|
|
1442
|
+
const body = stripUndef$6({
|
|
1443
1443
|
token: token,
|
|
1444
1444
|
new_password: newPassword,
|
|
1445
1445
|
});
|
|
@@ -1478,7 +1478,7 @@ class Health {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
|
|
1481
|
-
function stripUndef$
|
|
1481
|
+
function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1482
1482
|
|
|
1483
1483
|
class Keywords {
|
|
1484
1484
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1486,7 +1486,7 @@ class Keywords {
|
|
|
1486
1486
|
async createKeywordFilteringList(name, projectList = undefined) {
|
|
1487
1487
|
this._ctx.requireTokens();
|
|
1488
1488
|
const path = `/api/v1/keyword/`;
|
|
1489
|
-
const body = stripUndef$
|
|
1489
|
+
const body = stripUndef$5({
|
|
1490
1490
|
name: name,
|
|
1491
1491
|
project_list: projectList,
|
|
1492
1492
|
});
|
|
@@ -1539,7 +1539,7 @@ class Keywords {
|
|
|
1539
1539
|
async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
|
|
1540
1540
|
this._ctx.requireTokens();
|
|
1541
1541
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
1542
|
-
const body = stripUndef$
|
|
1542
|
+
const body = stripUndef$5({
|
|
1543
1543
|
list_keywords_to_include: listKeywordsToInclude,
|
|
1544
1544
|
list_keywords_to_exclude: listKeywordsToExclude,
|
|
1545
1545
|
});
|
|
@@ -1550,7 +1550,7 @@ class Keywords {
|
|
|
1550
1550
|
async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
|
|
1551
1551
|
this._ctx.requireTokens();
|
|
1552
1552
|
const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
|
|
1553
|
-
const body = stripUndef$
|
|
1553
|
+
const body = stripUndef$5({
|
|
1554
1554
|
name: name,
|
|
1555
1555
|
project_list: projectList,
|
|
1556
1556
|
});
|
|
@@ -1815,7 +1815,7 @@ class Person {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
1817
|
|
|
1818
|
-
function stripUndef$
|
|
1818
|
+
function stripUndef$4(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1819
1819
|
|
|
1820
1820
|
class Projects {
|
|
1821
1821
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1828,7 +1828,7 @@ class Projects {
|
|
|
1828
1828
|
if (models !== undefined) (Array.isArray(models) ? models : [models]).forEach(v => query.append('models', v));
|
|
1829
1829
|
const qs = query.toString();
|
|
1830
1830
|
if (qs) path += '?' + qs;
|
|
1831
|
-
const body = stripUndef$
|
|
1831
|
+
const body = stripUndef$4({
|
|
1832
1832
|
name: name,
|
|
1833
1833
|
private: private_,
|
|
1834
1834
|
type: type,
|
|
@@ -1898,7 +1898,7 @@ class Projects {
|
|
|
1898
1898
|
async updateProject(projectId, { private: private_, type, description, directory, name, thumbnail } = {}) {
|
|
1899
1899
|
this._ctx.requireTokens();
|
|
1900
1900
|
const path = `/api/v1/projects/${encodeURIComponent(projectId)}`;
|
|
1901
|
-
const body = stripUndef$
|
|
1901
|
+
const body = stripUndef$4({
|
|
1902
1902
|
private: private_,
|
|
1903
1903
|
type: type,
|
|
1904
1904
|
description: description,
|
|
@@ -1977,7 +1977,7 @@ class Projects {
|
|
|
1977
1977
|
async addProjectEvent(projectTableName, event, detail = undefined) {
|
|
1978
1978
|
this._ctx.requireTokens();
|
|
1979
1979
|
const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/event`;
|
|
1980
|
-
const body = stripUndef$
|
|
1980
|
+
const body = stripUndef$4({
|
|
1981
1981
|
event: event,
|
|
1982
1982
|
detail: detail,
|
|
1983
1983
|
});
|
|
@@ -1996,7 +1996,7 @@ class Projects {
|
|
|
1996
1996
|
class Photoupload {
|
|
1997
1997
|
constructor(ctx) { this._ctx = ctx; this._caches = {}; }
|
|
1998
1998
|
|
|
1999
|
-
async uploadPhotoToMediaviz(fileContent, filePath, mimetype, companyId, userId, projectTableName, blur, colors, faceRecognition, imageClassification, imageComparison, imageDescribe, ocr, { clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude } = {}) {
|
|
1999
|
+
async uploadPhotoToMediaviz(fileContent, filePath, mimetype, companyId, userId, projectTableName, blur, colors, faceRecognition, imageClassification, imageComparison, imageDescribe, ocr, judgment, { clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude } = {}) {
|
|
2000
2000
|
this._ctx.requireTokens();
|
|
2001
2001
|
const baseUrl = this._ctx.requireHost('photoUpload');
|
|
2002
2002
|
const headers = {
|
|
@@ -2006,7 +2006,7 @@ class Photoupload {
|
|
|
2006
2006
|
const resp = await fetch(baseUrl + `/photo_upload`, {
|
|
2007
2007
|
method: 'POST',
|
|
2008
2008
|
headers,
|
|
2009
|
-
body: JSON.stringify({ file_content: fileContent, file_path: filePath, mimetype, company_id: companyId, user_id: userId, project_table_name: projectTableName, blur, colors, face_recognition: faceRecognition, image_classification: imageClassification, image_comparison: imageComparison, image_describe: imageDescribe, ocr, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude }),
|
|
2009
|
+
body: JSON.stringify({ file_content: fileContent, file_path: filePath, mimetype, company_id: companyId, user_id: userId, project_table_name: projectTableName, blur, colors, face_recognition: faceRecognition, image_classification: imageClassification, image_comparison: imageComparison, image_describe: imageDescribe, ocr, judgment, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude }),
|
|
2010
2010
|
});
|
|
2011
2011
|
return handleResponse(resp);
|
|
2012
2012
|
}
|
|
@@ -2022,12 +2022,14 @@ class Photoupload {
|
|
|
2022
2022
|
this._caches['_get_template'].set(_cacheKey_get_template, template);
|
|
2023
2023
|
}
|
|
2024
2024
|
|
|
2025
|
-
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2025
|
+
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), (((template?.body?.['judgment'] ?? template?.headers?.['x-judgment']) === true || (template?.body?.['judgment'] ?? template?.headers?.['x-judgment']) === 'true') ? 'true' : undefined), { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2026
2026
|
|
|
2027
2027
|
return upload_result;
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
|
|
2031
|
+
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2032
|
+
|
|
2031
2033
|
class Photos {
|
|
2032
2034
|
constructor(ctx) { this._ctx = ctx; }
|
|
2033
2035
|
|
|
@@ -2089,16 +2091,16 @@ class Photos {
|
|
|
2089
2091
|
return data;
|
|
2090
2092
|
}
|
|
2091
2093
|
|
|
2092
|
-
async updatePhotoInProject(
|
|
2094
|
+
async updatePhotoInProject(tableName, photoId, { filePath, title, description, tags } = {}) {
|
|
2093
2095
|
this._ctx.requireTokens();
|
|
2094
|
-
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2096
|
+
const path = `/api/v1/photos_update/${encodeURIComponent(tableName)}/id/${encodeURIComponent(photoId)}`;
|
|
2097
|
+
const body = stripUndef$3({
|
|
2098
|
+
file_path: filePath,
|
|
2099
|
+
title: title,
|
|
2100
|
+
description: description,
|
|
2101
|
+
tags: tags,
|
|
2102
|
+
});
|
|
2103
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2102
2104
|
return data;
|
|
2103
2105
|
}
|
|
2104
2106
|
|
package/dist/sdk.d.cts
CHANGED
|
@@ -268,6 +268,15 @@ export interface PhotoDisplay {
|
|
|
268
268
|
hue_values?: number[];
|
|
269
269
|
light_values?: number[];
|
|
270
270
|
saturation_values?: number[];
|
|
271
|
+
aesthetic_appeal?: number;
|
|
272
|
+
lighting?: number;
|
|
273
|
+
subject_significance?: number;
|
|
274
|
+
emotional_intensity?: number;
|
|
275
|
+
positive_emotion?: number;
|
|
276
|
+
universal_relatability?: number;
|
|
277
|
+
memorability?: number;
|
|
278
|
+
composition?: number;
|
|
279
|
+
judgment_overall_score?: number;
|
|
271
280
|
user_id: number;
|
|
272
281
|
company_id: number;
|
|
273
282
|
id: number;
|
|
@@ -356,6 +365,7 @@ export interface ProjectRunDisplay {
|
|
|
356
365
|
image_comparison_model?: boolean;
|
|
357
366
|
image_describe_model?: boolean;
|
|
358
367
|
ocr_model?: boolean;
|
|
368
|
+
judgment_model?: boolean;
|
|
359
369
|
similarity_model?: boolean;
|
|
360
370
|
personhood_model?: boolean;
|
|
361
371
|
evidence_model?: boolean;
|
|
@@ -431,7 +441,7 @@ export class Admin {
|
|
|
431
441
|
|
|
432
442
|
export class Company {
|
|
433
443
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
434
|
-
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?:
|
|
444
|
+
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: any }): Promise<CreditBalanceOutput>;
|
|
435
445
|
}
|
|
436
446
|
|
|
437
447
|
export class CuratedAlbums {
|
|
@@ -484,7 +494,7 @@ export class Keywords {
|
|
|
484
494
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
485
495
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
486
496
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
487
|
-
getKeywordsAndIds(): Promise<any
|
|
497
|
+
getKeywordsAndIds(): Promise<Record<string, any>>;
|
|
488
498
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
489
499
|
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
490
500
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -516,13 +526,13 @@ export class Person {
|
|
|
516
526
|
splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
|
|
517
527
|
getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
|
|
518
528
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
519
|
-
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any
|
|
529
|
+
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<Record<string, any>>;
|
|
520
530
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
521
531
|
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
522
532
|
}
|
|
523
533
|
|
|
524
534
|
export class Photoupload {
|
|
525
|
-
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
535
|
+
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment: boolean | string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
526
536
|
uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
|
|
527
537
|
}
|
|
528
538
|
|
|
@@ -532,7 +542,7 @@ export class Photos {
|
|
|
532
542
|
getProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], includeAll?: boolean | boolean[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<any>;
|
|
533
543
|
getRankedProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
534
544
|
getProjectMonthYearsWithPhotos(tableName: string): Promise<any>;
|
|
535
|
-
updatePhotoInProject(
|
|
545
|
+
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?: string[] }): Promise<PhotoDisplay>;
|
|
536
546
|
updatePhotoRanking(tableName: string, photoId: number, newCategory: string): Promise<Record<string, any>>;
|
|
537
547
|
deletePhotoFromProject(tableName: string, options?: { photoIds?: any }): Promise<Record<string, any>>;
|
|
538
548
|
}
|
|
@@ -547,7 +557,7 @@ export class Projects {
|
|
|
547
557
|
getProjectById(projectId: string): Promise<ProjectRunDisplay>;
|
|
548
558
|
getProjectByDirectory(directory: string): Promise<ProjectRunDisplay>;
|
|
549
559
|
updateProject(projectId: string, body?: { private?: boolean, type?: number, description?: string, directory?: string, name?: string, thumbnail?: string }): Promise<ProjectRunDisplay>;
|
|
550
|
-
updateProjectPhotoCount(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<any
|
|
560
|
+
updateProjectPhotoCount(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<Record<string, any>>;
|
|
551
561
|
updateProjectCreateUploadReport(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<any>;
|
|
552
562
|
requestProjectSimilarityQueue(projectTableName: string, level: string): Promise<Record<string, any>>;
|
|
553
563
|
requestProjectEvidenceQueue(projectTableName: string): Promise<Record<string, any>>;
|
|
@@ -562,9 +572,9 @@ export class Projects {
|
|
|
562
572
|
export class Search {
|
|
563
573
|
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
564
574
|
searchProjectPhotosParametrized(projectTableName: string, options?: { andSearchText?: any, orSearchText?: any, notSearchText?: any, city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
565
|
-
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
575
|
+
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>[]>;
|
|
566
576
|
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
567
|
-
getProjectSavedSearches(projectTableName: string): Promise<any
|
|
577
|
+
getProjectSavedSearches(projectTableName: string): Promise<Record<string, any>>;
|
|
568
578
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
569
579
|
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
570
580
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
package/dist/sdk.d.ts
CHANGED
|
@@ -268,6 +268,15 @@ export interface PhotoDisplay {
|
|
|
268
268
|
hue_values?: number[];
|
|
269
269
|
light_values?: number[];
|
|
270
270
|
saturation_values?: number[];
|
|
271
|
+
aesthetic_appeal?: number;
|
|
272
|
+
lighting?: number;
|
|
273
|
+
subject_significance?: number;
|
|
274
|
+
emotional_intensity?: number;
|
|
275
|
+
positive_emotion?: number;
|
|
276
|
+
universal_relatability?: number;
|
|
277
|
+
memorability?: number;
|
|
278
|
+
composition?: number;
|
|
279
|
+
judgment_overall_score?: number;
|
|
271
280
|
user_id: number;
|
|
272
281
|
company_id: number;
|
|
273
282
|
id: number;
|
|
@@ -356,6 +365,7 @@ export interface ProjectRunDisplay {
|
|
|
356
365
|
image_comparison_model?: boolean;
|
|
357
366
|
image_describe_model?: boolean;
|
|
358
367
|
ocr_model?: boolean;
|
|
368
|
+
judgment_model?: boolean;
|
|
359
369
|
similarity_model?: boolean;
|
|
360
370
|
personhood_model?: boolean;
|
|
361
371
|
evidence_model?: boolean;
|
|
@@ -431,7 +441,7 @@ export class Admin {
|
|
|
431
441
|
|
|
432
442
|
export class Company {
|
|
433
443
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
434
|
-
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?:
|
|
444
|
+
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: any }): Promise<CreditBalanceOutput>;
|
|
435
445
|
}
|
|
436
446
|
|
|
437
447
|
export class CuratedAlbums {
|
|
@@ -484,7 +494,7 @@ export class Keywords {
|
|
|
484
494
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
485
495
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
486
496
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
487
|
-
getKeywordsAndIds(): Promise<any
|
|
497
|
+
getKeywordsAndIds(): Promise<Record<string, any>>;
|
|
488
498
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
489
499
|
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
490
500
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -516,13 +526,13 @@ export class Person {
|
|
|
516
526
|
splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
|
|
517
527
|
getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
|
|
518
528
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
519
|
-
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any
|
|
529
|
+
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<Record<string, any>>;
|
|
520
530
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
521
531
|
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
522
532
|
}
|
|
523
533
|
|
|
524
534
|
export class Photoupload {
|
|
525
|
-
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
535
|
+
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment: boolean | string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
526
536
|
uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
|
|
527
537
|
}
|
|
528
538
|
|
|
@@ -532,7 +542,7 @@ export class Photos {
|
|
|
532
542
|
getProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], includeAll?: boolean | boolean[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<any>;
|
|
533
543
|
getRankedProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
534
544
|
getProjectMonthYearsWithPhotos(tableName: string): Promise<any>;
|
|
535
|
-
updatePhotoInProject(
|
|
545
|
+
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?: string[] }): Promise<PhotoDisplay>;
|
|
536
546
|
updatePhotoRanking(tableName: string, photoId: number, newCategory: string): Promise<Record<string, any>>;
|
|
537
547
|
deletePhotoFromProject(tableName: string, options?: { photoIds?: any }): Promise<Record<string, any>>;
|
|
538
548
|
}
|
|
@@ -547,7 +557,7 @@ export class Projects {
|
|
|
547
557
|
getProjectById(projectId: string): Promise<ProjectRunDisplay>;
|
|
548
558
|
getProjectByDirectory(directory: string): Promise<ProjectRunDisplay>;
|
|
549
559
|
updateProject(projectId: string, body?: { private?: boolean, type?: number, description?: string, directory?: string, name?: string, thumbnail?: string }): Promise<ProjectRunDisplay>;
|
|
550
|
-
updateProjectPhotoCount(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<any
|
|
560
|
+
updateProjectPhotoCount(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<Record<string, any>>;
|
|
551
561
|
updateProjectCreateUploadReport(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<any>;
|
|
552
562
|
requestProjectSimilarityQueue(projectTableName: string, level: string): Promise<Record<string, any>>;
|
|
553
563
|
requestProjectEvidenceQueue(projectTableName: string): Promise<Record<string, any>>;
|
|
@@ -562,9 +572,9 @@ export class Projects {
|
|
|
562
572
|
export class Search {
|
|
563
573
|
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
564
574
|
searchProjectPhotosParametrized(projectTableName: string, options?: { andSearchText?: any, orSearchText?: any, notSearchText?: any, city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
565
|
-
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
575
|
+
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>[]>;
|
|
566
576
|
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
567
|
-
getProjectSavedSearches(projectTableName: string): Promise<any
|
|
577
|
+
getProjectSavedSearches(projectTableName: string): Promise<Record<string, any>>;
|
|
568
578
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
569
579
|
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
570
580
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
package/dist/sdk.esm.d.ts
CHANGED
|
@@ -268,6 +268,15 @@ export interface PhotoDisplay {
|
|
|
268
268
|
hue_values?: number[];
|
|
269
269
|
light_values?: number[];
|
|
270
270
|
saturation_values?: number[];
|
|
271
|
+
aesthetic_appeal?: number;
|
|
272
|
+
lighting?: number;
|
|
273
|
+
subject_significance?: number;
|
|
274
|
+
emotional_intensity?: number;
|
|
275
|
+
positive_emotion?: number;
|
|
276
|
+
universal_relatability?: number;
|
|
277
|
+
memorability?: number;
|
|
278
|
+
composition?: number;
|
|
279
|
+
judgment_overall_score?: number;
|
|
271
280
|
user_id: number;
|
|
272
281
|
company_id: number;
|
|
273
282
|
id: number;
|
|
@@ -356,6 +365,7 @@ export interface ProjectRunDisplay {
|
|
|
356
365
|
image_comparison_model?: boolean;
|
|
357
366
|
image_describe_model?: boolean;
|
|
358
367
|
ocr_model?: boolean;
|
|
368
|
+
judgment_model?: boolean;
|
|
359
369
|
similarity_model?: boolean;
|
|
360
370
|
personhood_model?: boolean;
|
|
361
371
|
evidence_model?: boolean;
|
|
@@ -431,7 +441,7 @@ export class Admin {
|
|
|
431
441
|
|
|
432
442
|
export class Company {
|
|
433
443
|
getCompanyById(companyId: number): Promise<CompanyDisplay>;
|
|
434
|
-
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?:
|
|
444
|
+
confirmCompanyCreditBalance(companyId: number, options?: { photoCount?: number | number[], modelsList?: any }): Promise<CreditBalanceOutput>;
|
|
435
445
|
}
|
|
436
446
|
|
|
437
447
|
export class CuratedAlbums {
|
|
@@ -484,7 +494,7 @@ export class Keywords {
|
|
|
484
494
|
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
485
495
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
486
496
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
487
|
-
getKeywordsAndIds(): Promise<any
|
|
497
|
+
getKeywordsAndIds(): Promise<Record<string, any>>;
|
|
488
498
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
489
499
|
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
490
500
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
@@ -516,13 +526,13 @@ export class Person {
|
|
|
516
526
|
splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
|
|
517
527
|
getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
|
|
518
528
|
getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
|
|
519
|
-
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any
|
|
529
|
+
getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<Record<string, any>>;
|
|
520
530
|
getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
|
|
521
531
|
removePerson(projectTableName: string, personId: string): Promise<Record<string, any>>;
|
|
522
532
|
}
|
|
523
533
|
|
|
524
534
|
export class Photoupload {
|
|
525
|
-
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
535
|
+
uploadPhotoToMediaviz(fileContent: string, filePath: string, mimetype: string, companyId: string, userId: string, projectTableName: string, blur: boolean | string, colors: boolean | string, faceRecognition: boolean | string, imageClassification: boolean | string, imageComparison: boolean | string, imageDescribe: boolean | string, ocr: boolean | string, judgment: boolean | string, options?: { clientSideId?: string, format?: string, size?: string, sourceResolutionX?: number | string, sourceResolutionY?: number | string, dateTaken?: string, latitude?: number | string, longitude?: number | string }): Promise<any>;
|
|
526
536
|
uploadPhoto(companyId: string, userId: string, projectTableName: string, photo: Record<string, any>): Promise<any>;
|
|
527
537
|
}
|
|
528
538
|
|
|
@@ -532,7 +542,7 @@ export class Photos {
|
|
|
532
542
|
getProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], includeAll?: boolean | boolean[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<any>;
|
|
533
543
|
getRankedProjectPhotoIdsByTableName(tableName: string, options?: { ascOrDesc?: string | string[], lastId?: number | number[], limit?: number | number[], startDate?: string | string[], endDate?: string | string[], noDateTaken?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
534
544
|
getProjectMonthYearsWithPhotos(tableName: string): Promise<any>;
|
|
535
|
-
updatePhotoInProject(
|
|
545
|
+
updatePhotoInProject(tableName: string, photoId: number, body?: { filePath?: string, title?: string, description?: string, tags?: string[] }): Promise<PhotoDisplay>;
|
|
536
546
|
updatePhotoRanking(tableName: string, photoId: number, newCategory: string): Promise<Record<string, any>>;
|
|
537
547
|
deletePhotoFromProject(tableName: string, options?: { photoIds?: any }): Promise<Record<string, any>>;
|
|
538
548
|
}
|
|
@@ -547,7 +557,7 @@ export class Projects {
|
|
|
547
557
|
getProjectById(projectId: string): Promise<ProjectRunDisplay>;
|
|
548
558
|
getProjectByDirectory(directory: string): Promise<ProjectRunDisplay>;
|
|
549
559
|
updateProject(projectId: string, body?: { private?: boolean, type?: number, description?: string, directory?: string, name?: string, thumbnail?: string }): Promise<ProjectRunDisplay>;
|
|
550
|
-
updateProjectPhotoCount(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<any
|
|
560
|
+
updateProjectPhotoCount(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<Record<string, any>>;
|
|
551
561
|
updateProjectCreateUploadReport(tableName: string, options?: { filesFailedCount?: number | number[] }): Promise<any>;
|
|
552
562
|
requestProjectSimilarityQueue(projectTableName: string, level: string): Promise<Record<string, any>>;
|
|
553
563
|
requestProjectEvidenceQueue(projectTableName: string): Promise<Record<string, any>>;
|
|
@@ -562,9 +572,9 @@ export class Projects {
|
|
|
562
572
|
export class Search {
|
|
563
573
|
searchProjectPhotos(projectTableName: string, options?: { andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
564
574
|
searchProjectPhotosParametrized(projectTableName: string, options?: { andSearchText?: any, orSearchText?: any, notSearchText?: any, city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>>;
|
|
565
|
-
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<any>;
|
|
575
|
+
recallProjectPhotos(projectTableName: string, options?: { ascOrDesc?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], lastId?: number | number[], limit?: number | number[] }): Promise<Record<string, any>[]>;
|
|
566
576
|
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
567
|
-
getProjectSavedSearches(projectTableName: string): Promise<any
|
|
577
|
+
getProjectSavedSearches(projectTableName: string): Promise<Record<string, any>>;
|
|
568
578
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
569
579
|
saveProjectPhotosSearch(projectTableName: string, options?: { searchName?: string | string[], andParams?: any, andStringParams?: any, orParams?: any, orStringParams?: any, notParams?: any, notStringParams?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], customAlbumId?: number | number[], bestOfSimilarSetsOnly?: boolean | boolean[], curatedAlbumId?: number | number[], splitByTier?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
570
580
|
deleteSavedSearchById(searchId: number): Promise<Record<string, any>>;
|
package/dist/sdk.esm.js
CHANGED
|
@@ -1147,7 +1147,7 @@ class Company {
|
|
|
1147
1147
|
}
|
|
1148
1148
|
}
|
|
1149
1149
|
|
|
1150
|
-
function stripUndef$
|
|
1150
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1151
1151
|
|
|
1152
1152
|
class CuratedAlbums {
|
|
1153
1153
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1155,7 +1155,7 @@ class CuratedAlbums {
|
|
|
1155
1155
|
async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
1156
1156
|
this._ctx.requireTokens();
|
|
1157
1157
|
const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1158
|
-
const body = stripUndef$
|
|
1158
|
+
const body = stripUndef$8({
|
|
1159
1159
|
name: name,
|
|
1160
1160
|
description: description,
|
|
1161
1161
|
confidence_value: confidenceValue,
|
|
@@ -1209,7 +1209,7 @@ class CuratedAlbums {
|
|
|
1209
1209
|
async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
1210
1210
|
this._ctx.requireTokens();
|
|
1211
1211
|
const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
|
|
1212
|
-
const body = stripUndef$
|
|
1212
|
+
const body = stripUndef$8({
|
|
1213
1213
|
name: name,
|
|
1214
1214
|
description: description,
|
|
1215
1215
|
confidence_value: confidenceValue,
|
|
@@ -1233,7 +1233,7 @@ class CuratedAlbums {
|
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
1235
|
|
|
1236
|
-
function stripUndef$
|
|
1236
|
+
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1237
1237
|
|
|
1238
1238
|
class CustomAlbums {
|
|
1239
1239
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1281,7 +1281,7 @@ class CustomAlbums {
|
|
|
1281
1281
|
async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1282
1282
|
this._ctx.requireTokens();
|
|
1283
1283
|
const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1284
|
-
const body = stripUndef$
|
|
1284
|
+
const body = stripUndef$7({
|
|
1285
1285
|
name: name,
|
|
1286
1286
|
description: description,
|
|
1287
1287
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1294,7 +1294,7 @@ class CustomAlbums {
|
|
|
1294
1294
|
async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1295
1295
|
this._ctx.requireTokens();
|
|
1296
1296
|
const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
|
|
1297
|
-
const body = stripUndef$
|
|
1297
|
+
const body = stripUndef$7({
|
|
1298
1298
|
name: name,
|
|
1299
1299
|
description: description,
|
|
1300
1300
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1394,7 +1394,7 @@ async function handleResponse(response) {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
|
|
1397
|
-
function stripUndef$
|
|
1397
|
+
function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1398
1398
|
|
|
1399
1399
|
class EmailTokens {
|
|
1400
1400
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1425,7 +1425,7 @@ class EmailTokens {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
|
|
1427
1427
|
async validateToken(token) {
|
|
1428
|
-
const body = stripUndef$
|
|
1428
|
+
const body = stripUndef$6({
|
|
1429
1429
|
token: token,
|
|
1430
1430
|
});
|
|
1431
1431
|
const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
|
|
@@ -1437,7 +1437,7 @@ class EmailTokens {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
|
|
1439
1439
|
async resetPassword(token, newPassword) {
|
|
1440
|
-
const body = stripUndef$
|
|
1440
|
+
const body = stripUndef$6({
|
|
1441
1441
|
token: token,
|
|
1442
1442
|
new_password: newPassword,
|
|
1443
1443
|
});
|
|
@@ -1476,7 +1476,7 @@ class Health {
|
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
1478
|
|
|
1479
|
-
function stripUndef$
|
|
1479
|
+
function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1480
1480
|
|
|
1481
1481
|
class Keywords {
|
|
1482
1482
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1484,7 +1484,7 @@ class Keywords {
|
|
|
1484
1484
|
async createKeywordFilteringList(name, projectList = undefined) {
|
|
1485
1485
|
this._ctx.requireTokens();
|
|
1486
1486
|
const path = `/api/v1/keyword/`;
|
|
1487
|
-
const body = stripUndef$
|
|
1487
|
+
const body = stripUndef$5({
|
|
1488
1488
|
name: name,
|
|
1489
1489
|
project_list: projectList,
|
|
1490
1490
|
});
|
|
@@ -1537,7 +1537,7 @@ class Keywords {
|
|
|
1537
1537
|
async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
|
|
1538
1538
|
this._ctx.requireTokens();
|
|
1539
1539
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
1540
|
-
const body = stripUndef$
|
|
1540
|
+
const body = stripUndef$5({
|
|
1541
1541
|
list_keywords_to_include: listKeywordsToInclude,
|
|
1542
1542
|
list_keywords_to_exclude: listKeywordsToExclude,
|
|
1543
1543
|
});
|
|
@@ -1548,7 +1548,7 @@ class Keywords {
|
|
|
1548
1548
|
async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
|
|
1549
1549
|
this._ctx.requireTokens();
|
|
1550
1550
|
const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
|
|
1551
|
-
const body = stripUndef$
|
|
1551
|
+
const body = stripUndef$5({
|
|
1552
1552
|
name: name,
|
|
1553
1553
|
project_list: projectList,
|
|
1554
1554
|
});
|
|
@@ -1813,7 +1813,7 @@ class Person {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
1815
1815
|
|
|
1816
|
-
function stripUndef$
|
|
1816
|
+
function stripUndef$4(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1817
1817
|
|
|
1818
1818
|
class Projects {
|
|
1819
1819
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1826,7 +1826,7 @@ class Projects {
|
|
|
1826
1826
|
if (models !== undefined) (Array.isArray(models) ? models : [models]).forEach(v => query.append('models', v));
|
|
1827
1827
|
const qs = query.toString();
|
|
1828
1828
|
if (qs) path += '?' + qs;
|
|
1829
|
-
const body = stripUndef$
|
|
1829
|
+
const body = stripUndef$4({
|
|
1830
1830
|
name: name,
|
|
1831
1831
|
private: private_,
|
|
1832
1832
|
type: type,
|
|
@@ -1896,7 +1896,7 @@ class Projects {
|
|
|
1896
1896
|
async updateProject(projectId, { private: private_, type, description, directory, name, thumbnail } = {}) {
|
|
1897
1897
|
this._ctx.requireTokens();
|
|
1898
1898
|
const path = `/api/v1/projects/${encodeURIComponent(projectId)}`;
|
|
1899
|
-
const body = stripUndef$
|
|
1899
|
+
const body = stripUndef$4({
|
|
1900
1900
|
private: private_,
|
|
1901
1901
|
type: type,
|
|
1902
1902
|
description: description,
|
|
@@ -1975,7 +1975,7 @@ class Projects {
|
|
|
1975
1975
|
async addProjectEvent(projectTableName, event, detail = undefined) {
|
|
1976
1976
|
this._ctx.requireTokens();
|
|
1977
1977
|
const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/event`;
|
|
1978
|
-
const body = stripUndef$
|
|
1978
|
+
const body = stripUndef$4({
|
|
1979
1979
|
event: event,
|
|
1980
1980
|
detail: detail,
|
|
1981
1981
|
});
|
|
@@ -1994,7 +1994,7 @@ class Projects {
|
|
|
1994
1994
|
class Photoupload {
|
|
1995
1995
|
constructor(ctx) { this._ctx = ctx; this._caches = {}; }
|
|
1996
1996
|
|
|
1997
|
-
async uploadPhotoToMediaviz(fileContent, filePath, mimetype, companyId, userId, projectTableName, blur, colors, faceRecognition, imageClassification, imageComparison, imageDescribe, ocr, { clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude } = {}) {
|
|
1997
|
+
async uploadPhotoToMediaviz(fileContent, filePath, mimetype, companyId, userId, projectTableName, blur, colors, faceRecognition, imageClassification, imageComparison, imageDescribe, ocr, judgment, { clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude } = {}) {
|
|
1998
1998
|
this._ctx.requireTokens();
|
|
1999
1999
|
const baseUrl = this._ctx.requireHost('photoUpload');
|
|
2000
2000
|
const headers = {
|
|
@@ -2004,7 +2004,7 @@ class Photoupload {
|
|
|
2004
2004
|
const resp = await fetch(baseUrl + `/photo_upload`, {
|
|
2005
2005
|
method: 'POST',
|
|
2006
2006
|
headers,
|
|
2007
|
-
body: JSON.stringify({ file_content: fileContent, file_path: filePath, mimetype, company_id: companyId, user_id: userId, project_table_name: projectTableName, blur, colors, face_recognition: faceRecognition, image_classification: imageClassification, image_comparison: imageComparison, image_describe: imageDescribe, ocr, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude }),
|
|
2007
|
+
body: JSON.stringify({ file_content: fileContent, file_path: filePath, mimetype, company_id: companyId, user_id: userId, project_table_name: projectTableName, blur, colors, face_recognition: faceRecognition, image_classification: imageClassification, image_comparison: imageComparison, image_describe: imageDescribe, ocr, judgment, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude }),
|
|
2008
2008
|
});
|
|
2009
2009
|
return handleResponse(resp);
|
|
2010
2010
|
}
|
|
@@ -2020,12 +2020,14 @@ class Photoupload {
|
|
|
2020
2020
|
this._caches['_get_template'].set(_cacheKey_get_template, template);
|
|
2021
2021
|
}
|
|
2022
2022
|
|
|
2023
|
-
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2023
|
+
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), (((template?.body?.['judgment'] ?? template?.headers?.['x-judgment']) === true || (template?.body?.['judgment'] ?? template?.headers?.['x-judgment']) === 'true') ? 'true' : undefined), { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2024
2024
|
|
|
2025
2025
|
return upload_result;
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
|
+
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2030
|
+
|
|
2029
2031
|
class Photos {
|
|
2030
2032
|
constructor(ctx) { this._ctx = ctx; }
|
|
2031
2033
|
|
|
@@ -2087,16 +2089,16 @@ class Photos {
|
|
|
2087
2089
|
return data;
|
|
2088
2090
|
}
|
|
2089
2091
|
|
|
2090
|
-
async updatePhotoInProject(
|
|
2092
|
+
async updatePhotoInProject(tableName, photoId, { filePath, title, description, tags } = {}) {
|
|
2091
2093
|
this._ctx.requireTokens();
|
|
2092
|
-
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2094
|
+
const path = `/api/v1/photos_update/${encodeURIComponent(tableName)}/id/${encodeURIComponent(photoId)}`;
|
|
2095
|
+
const body = stripUndef$3({
|
|
2096
|
+
file_path: filePath,
|
|
2097
|
+
title: title,
|
|
2098
|
+
description: description,
|
|
2099
|
+
tags: tags,
|
|
2100
|
+
});
|
|
2101
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2100
2102
|
return data;
|
|
2101
2103
|
}
|
|
2102
2104
|
|
package/dist/sdk.umd.js
CHANGED
|
@@ -1153,7 +1153,7 @@
|
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
1155
|
|
|
1156
|
-
function stripUndef$
|
|
1156
|
+
function stripUndef$8(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1157
1157
|
|
|
1158
1158
|
class CuratedAlbums {
|
|
1159
1159
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1161,7 +1161,7 @@
|
|
|
1161
1161
|
async createCuratedAlbum(projectTableName, name, description = undefined, confidenceValue = undefined) {
|
|
1162
1162
|
this._ctx.requireTokens();
|
|
1163
1163
|
const path = `/api/v1/curated_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1164
|
-
const body = stripUndef$
|
|
1164
|
+
const body = stripUndef$8({
|
|
1165
1165
|
name: name,
|
|
1166
1166
|
description: description,
|
|
1167
1167
|
confidence_value: confidenceValue,
|
|
@@ -1215,7 +1215,7 @@
|
|
|
1215
1215
|
async updateCuratedAlbum(albumId, { name, description, confidenceValue } = {}) {
|
|
1216
1216
|
this._ctx.requireTokens();
|
|
1217
1217
|
const path = `/api/v1/curated_album/${encodeURIComponent(albumId)}`;
|
|
1218
|
-
const body = stripUndef$
|
|
1218
|
+
const body = stripUndef$8({
|
|
1219
1219
|
name: name,
|
|
1220
1220
|
description: description,
|
|
1221
1221
|
confidence_value: confidenceValue,
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
1241
|
|
|
1242
|
-
function stripUndef$
|
|
1242
|
+
function stripUndef$7(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1243
1243
|
|
|
1244
1244
|
class CustomAlbums {
|
|
1245
1245
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1287,7 +1287,7 @@
|
|
|
1287
1287
|
async createProjectCustomAlbum(projectTableName, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1288
1288
|
this._ctx.requireTokens();
|
|
1289
1289
|
const path = `/api/v1/custom_album/project/${encodeURIComponent(projectTableName)}`;
|
|
1290
|
-
const body = stripUndef$
|
|
1290
|
+
const body = stripUndef$7({
|
|
1291
1291
|
name: name,
|
|
1292
1292
|
description: description,
|
|
1293
1293
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1300,7 +1300,7 @@
|
|
|
1300
1300
|
async updateCustomAlbum(albumId, { name, description, photoIdInclusionList, photoIdRemovalList } = {}) {
|
|
1301
1301
|
this._ctx.requireTokens();
|
|
1302
1302
|
const path = `/api/v1/custom_album/${encodeURIComponent(albumId)}`;
|
|
1303
|
-
const body = stripUndef$
|
|
1303
|
+
const body = stripUndef$7({
|
|
1304
1304
|
name: name,
|
|
1305
1305
|
description: description,
|
|
1306
1306
|
photo_id_inclusion_list: photoIdInclusionList,
|
|
@@ -1400,7 +1400,7 @@
|
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
1402
|
|
|
1403
|
-
function stripUndef$
|
|
1403
|
+
function stripUndef$6(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1404
1404
|
|
|
1405
1405
|
class EmailTokens {
|
|
1406
1406
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1431,7 +1431,7 @@
|
|
|
1431
1431
|
}
|
|
1432
1432
|
|
|
1433
1433
|
async validateToken(token) {
|
|
1434
|
-
const body = stripUndef$
|
|
1434
|
+
const body = stripUndef$6({
|
|
1435
1435
|
token: token,
|
|
1436
1436
|
});
|
|
1437
1437
|
const resp = await fetch(this._ctx.baseUrl + `/api/v1/validate-token`, {
|
|
@@ -1443,7 +1443,7 @@
|
|
|
1443
1443
|
}
|
|
1444
1444
|
|
|
1445
1445
|
async resetPassword(token, newPassword) {
|
|
1446
|
-
const body = stripUndef$
|
|
1446
|
+
const body = stripUndef$6({
|
|
1447
1447
|
token: token,
|
|
1448
1448
|
new_password: newPassword,
|
|
1449
1449
|
});
|
|
@@ -1482,7 +1482,7 @@
|
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
1484
|
|
|
1485
|
-
function stripUndef$
|
|
1485
|
+
function stripUndef$5(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1486
1486
|
|
|
1487
1487
|
class Keywords {
|
|
1488
1488
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1490,7 +1490,7 @@
|
|
|
1490
1490
|
async createKeywordFilteringList(name, projectList = undefined) {
|
|
1491
1491
|
this._ctx.requireTokens();
|
|
1492
1492
|
const path = `/api/v1/keyword/`;
|
|
1493
|
-
const body = stripUndef$
|
|
1493
|
+
const body = stripUndef$5({
|
|
1494
1494
|
name: name,
|
|
1495
1495
|
project_list: projectList,
|
|
1496
1496
|
});
|
|
@@ -1543,7 +1543,7 @@
|
|
|
1543
1543
|
async updateKeywordFilteringListLabels(keywordListId, listKeywordsToInclude, listKeywordsToExclude) {
|
|
1544
1544
|
this._ctx.requireTokens();
|
|
1545
1545
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
1546
|
-
const body = stripUndef$
|
|
1546
|
+
const body = stripUndef$5({
|
|
1547
1547
|
list_keywords_to_include: listKeywordsToInclude,
|
|
1548
1548
|
list_keywords_to_exclude: listKeywordsToExclude,
|
|
1549
1549
|
});
|
|
@@ -1554,7 +1554,7 @@
|
|
|
1554
1554
|
async updateKeywordFilteringListDetails(keywordListId, { name, projectList } = {}) {
|
|
1555
1555
|
this._ctx.requireTokens();
|
|
1556
1556
|
const path = `/api/v1/keyword/details/${encodeURIComponent(keywordListId)}`;
|
|
1557
|
-
const body = stripUndef$
|
|
1557
|
+
const body = stripUndef$5({
|
|
1558
1558
|
name: name,
|
|
1559
1559
|
project_list: projectList,
|
|
1560
1560
|
});
|
|
@@ -1819,7 +1819,7 @@
|
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
1821
|
|
|
1822
|
-
function stripUndef$
|
|
1822
|
+
function stripUndef$4(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
1823
1823
|
|
|
1824
1824
|
class Projects {
|
|
1825
1825
|
constructor(ctx) { this._ctx = ctx; }
|
|
@@ -1832,7 +1832,7 @@
|
|
|
1832
1832
|
if (models !== undefined) (Array.isArray(models) ? models : [models]).forEach(v => query.append('models', v));
|
|
1833
1833
|
const qs = query.toString();
|
|
1834
1834
|
if (qs) path += '?' + qs;
|
|
1835
|
-
const body = stripUndef$
|
|
1835
|
+
const body = stripUndef$4({
|
|
1836
1836
|
name: name,
|
|
1837
1837
|
private: private_,
|
|
1838
1838
|
type: type,
|
|
@@ -1902,7 +1902,7 @@
|
|
|
1902
1902
|
async updateProject(projectId, { private: private_, type, description, directory, name, thumbnail } = {}) {
|
|
1903
1903
|
this._ctx.requireTokens();
|
|
1904
1904
|
const path = `/api/v1/projects/${encodeURIComponent(projectId)}`;
|
|
1905
|
-
const body = stripUndef$
|
|
1905
|
+
const body = stripUndef$4({
|
|
1906
1906
|
private: private_,
|
|
1907
1907
|
type: type,
|
|
1908
1908
|
description: description,
|
|
@@ -1981,7 +1981,7 @@
|
|
|
1981
1981
|
async addProjectEvent(projectTableName, event, detail = undefined) {
|
|
1982
1982
|
this._ctx.requireTokens();
|
|
1983
1983
|
const path = `/api/v1/projects/${encodeURIComponent(projectTableName)}/event`;
|
|
1984
|
-
const body = stripUndef$
|
|
1984
|
+
const body = stripUndef$4({
|
|
1985
1985
|
event: event,
|
|
1986
1986
|
detail: detail,
|
|
1987
1987
|
});
|
|
@@ -2000,7 +2000,7 @@
|
|
|
2000
2000
|
class Photoupload {
|
|
2001
2001
|
constructor(ctx) { this._ctx = ctx; this._caches = {}; }
|
|
2002
2002
|
|
|
2003
|
-
async uploadPhotoToMediaviz(fileContent, filePath, mimetype, companyId, userId, projectTableName, blur, colors, faceRecognition, imageClassification, imageComparison, imageDescribe, ocr, { clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude } = {}) {
|
|
2003
|
+
async uploadPhotoToMediaviz(fileContent, filePath, mimetype, companyId, userId, projectTableName, blur, colors, faceRecognition, imageClassification, imageComparison, imageDescribe, ocr, judgment, { clientSideId, format, size, sourceResolutionX, sourceResolutionY, dateTaken, latitude, longitude } = {}) {
|
|
2004
2004
|
this._ctx.requireTokens();
|
|
2005
2005
|
const baseUrl = this._ctx.requireHost('photoUpload');
|
|
2006
2006
|
const headers = {
|
|
@@ -2010,7 +2010,7 @@
|
|
|
2010
2010
|
const resp = await fetch(baseUrl + `/photo_upload`, {
|
|
2011
2011
|
method: 'POST',
|
|
2012
2012
|
headers,
|
|
2013
|
-
body: JSON.stringify({ file_content: fileContent, file_path: filePath, mimetype, company_id: companyId, user_id: userId, project_table_name: projectTableName, blur, colors, face_recognition: faceRecognition, image_classification: imageClassification, image_comparison: imageComparison, image_describe: imageDescribe, ocr, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude }),
|
|
2013
|
+
body: JSON.stringify({ file_content: fileContent, file_path: filePath, mimetype, company_id: companyId, user_id: userId, project_table_name: projectTableName, blur, colors, face_recognition: faceRecognition, image_classification: imageClassification, image_comparison: imageComparison, image_describe: imageDescribe, ocr, judgment, client_side_id: clientSideId, format, size, source_resolution_x: sourceResolutionX, source_resolution_y: sourceResolutionY, date_taken: dateTaken, latitude, longitude }),
|
|
2014
2014
|
});
|
|
2015
2015
|
return handleResponse(resp);
|
|
2016
2016
|
}
|
|
@@ -2026,12 +2026,14 @@
|
|
|
2026
2026
|
this._caches['_get_template'].set(_cacheKey_get_template, template);
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
|
-
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2029
|
+
const upload_result = await this.uploadPhotoToMediaviz(photo.fileContent, photo.filePath, photo.mimetype, companyId, userId, projectTableName, (((template?.body?.['blur'] ?? template?.headers?.['x-blur']) === true || (template?.body?.['blur'] ?? template?.headers?.['x-blur']) === 'true') ? 'true' : undefined), (((template?.body?.['colors'] ?? template?.headers?.['x-colors']) === true || (template?.body?.['colors'] ?? template?.headers?.['x-colors']) === 'true') ? 'true' : undefined), (((template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === true || (template?.body?.['face_recognition'] ?? template?.headers?.['x-face-recognition']) === 'true') ? 'true' : undefined), (((template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === true || (template?.body?.['image_classification'] ?? template?.headers?.['x-image-classification']) === 'true') ? 'true' : undefined), (((template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === true || (template?.body?.['image_comparison'] ?? template?.headers?.['x-image-comparison']) === 'true') ? 'true' : undefined), (((template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === true || (template?.body?.['image_describe'] ?? template?.headers?.['x-image-describe']) === 'true') ? 'true' : undefined), (((template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === true || (template?.body?.['ocr'] ?? template?.headers?.['x-ocr']) === 'true') ? 'true' : undefined), (((template?.body?.['judgment'] ?? template?.headers?.['x-judgment']) === true || (template?.body?.['judgment'] ?? template?.headers?.['x-judgment']) === 'true') ? 'true' : undefined), { clientSideId: photo.clientSideId, format: photo.format, size: photo.size, sourceResolutionX: photo.sourceResolutionX, sourceResolutionY: photo.sourceResolutionY, dateTaken: photo.dateTaken, latitude: photo.latitude, longitude: photo.longitude });
|
|
2030
2030
|
|
|
2031
2031
|
return upload_result;
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
2034
|
|
|
2035
|
+
function stripUndef$3(o) { const r = {}; for (const k in o) if (o[k] !== undefined) r[k] = o[k]; return r; }
|
|
2036
|
+
|
|
2035
2037
|
class Photos {
|
|
2036
2038
|
constructor(ctx) { this._ctx = ctx; }
|
|
2037
2039
|
|
|
@@ -2093,16 +2095,16 @@
|
|
|
2093
2095
|
return data;
|
|
2094
2096
|
}
|
|
2095
2097
|
|
|
2096
|
-
async updatePhotoInProject(
|
|
2098
|
+
async updatePhotoInProject(tableName, photoId, { filePath, title, description, tags } = {}) {
|
|
2097
2099
|
this._ctx.requireTokens();
|
|
2098
|
-
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken);
|
|
2100
|
+
const path = `/api/v1/photos_update/${encodeURIComponent(tableName)}/id/${encodeURIComponent(photoId)}`;
|
|
2101
|
+
const body = stripUndef$3({
|
|
2102
|
+
file_path: filePath,
|
|
2103
|
+
title: title,
|
|
2104
|
+
description: description,
|
|
2105
|
+
tags: tags,
|
|
2106
|
+
});
|
|
2107
|
+
const { data } = await this._ctx.client.request(path, 'PUT', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
2106
2108
|
return data;
|
|
2107
2109
|
}
|
|
2108
2110
|
|