@mediaviz/sdk 1.0.69 → 1.0.71
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 +23 -40
- package/dist/sdk.d.ts +3 -4
- package/dist/sdk.esm.d.ts +3 -4
- package/dist/sdk.esm.js +23 -40
- package/dist/sdk.umd.js +23 -40
- package/package.json +1 -1
package/dist/sdk.cjs
CHANGED
|
@@ -912,6 +912,17 @@ class Keywords {
|
|
|
912
912
|
return data;
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
+
async addCompanyToKeywordFilteringList(keywordListId, { companyId } = {}) {
|
|
916
|
+
this._ctx.requireTokens();
|
|
917
|
+
let path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}/company`;
|
|
918
|
+
const query = new URLSearchParams();
|
|
919
|
+
if (companyId !== undefined) (Array.isArray(companyId) ? companyId : [companyId]).forEach(v => query.append('company_id', v));
|
|
920
|
+
const qs = query.toString();
|
|
921
|
+
if (qs) path += '?' + qs;
|
|
922
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
|
|
923
|
+
return data;
|
|
924
|
+
}
|
|
925
|
+
|
|
915
926
|
async requestKeywordListExport(keywordListId) {
|
|
916
927
|
this._ctx.requireTokens();
|
|
917
928
|
const path = `/api/v1/keyword/export/${encodeURIComponent(keywordListId)}`;
|
|
@@ -944,6 +955,17 @@ class Keywords {
|
|
|
944
955
|
return data;
|
|
945
956
|
}
|
|
946
957
|
|
|
958
|
+
async removeCompanyFromKeywordFilteringList(keywordListId, { companyId } = {}) {
|
|
959
|
+
this._ctx.requireTokens();
|
|
960
|
+
let path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}/company`;
|
|
961
|
+
const query = new URLSearchParams();
|
|
962
|
+
if (companyId !== undefined) (Array.isArray(companyId) ? companyId : [companyId]).forEach(v => query.append('company_id', v));
|
|
963
|
+
const qs = query.toString();
|
|
964
|
+
if (qs) path += '?' + qs;
|
|
965
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
966
|
+
return data;
|
|
967
|
+
}
|
|
968
|
+
|
|
947
969
|
async deleteKeywordFilteringListById(keywordListId) {
|
|
948
970
|
this._ctx.requireTokens();
|
|
949
971
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
@@ -1472,49 +1494,10 @@ class Search {
|
|
|
1472
1494
|
return data;
|
|
1473
1495
|
}
|
|
1474
1496
|
|
|
1475
|
-
async
|
|
1476
|
-
this._ctx.requireTokens();
|
|
1477
|
-
const path = `/api/v1/search/text/${encodeURIComponent(projectTableName)}/`;
|
|
1478
|
-
const body = stripUndef$1({
|
|
1479
|
-
search_text: searchText,
|
|
1480
|
-
size: size,
|
|
1481
|
-
});
|
|
1482
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1483
|
-
return data;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, size = undefined) {
|
|
1487
|
-
this._ctx.requireTokens();
|
|
1488
|
-
const path = `/api/v1/search/nl/${encodeURIComponent(projectTableName)}/`;
|
|
1489
|
-
const body = stripUndef$1({
|
|
1490
|
-
search_text: searchText,
|
|
1491
|
-
size: size,
|
|
1492
|
-
});
|
|
1493
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1494
|
-
return data;
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
async searchProjectPhotosNaturalLanguageHybrid(projectTableName, searchText, size = undefined, { blend, minCosine } = {}) {
|
|
1498
|
-
this._ctx.requireTokens();
|
|
1499
|
-
let path = `/api/v1/search/nl_hybrid/${encodeURIComponent(projectTableName)}/`;
|
|
1500
|
-
const query = new URLSearchParams();
|
|
1501
|
-
if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
|
|
1502
|
-
if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
|
|
1503
|
-
const qs = query.toString();
|
|
1504
|
-
if (qs) path += '?' + qs;
|
|
1505
|
-
const body = stripUndef$1({
|
|
1506
|
-
search_text: searchText,
|
|
1507
|
-
size: size,
|
|
1508
|
-
});
|
|
1509
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1510
|
-
return data;
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1497
|
+
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1514
1498
|
this._ctx.requireTokens();
|
|
1515
1499
|
let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
|
|
1516
1500
|
const query = new URLSearchParams();
|
|
1517
|
-
if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
|
|
1518
1501
|
if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
|
|
1519
1502
|
if (labelMinCosine !== undefined) (Array.isArray(labelMinCosine) ? labelMinCosine : [labelMinCosine]).forEach(v => query.append('label_min_cosine', v));
|
|
1520
1503
|
if (labelTopK !== undefined) (Array.isArray(labelTopK) ? labelTopK : [labelTopK]).forEach(v => query.append('label_top_k', v));
|
package/dist/sdk.d.ts
CHANGED
|
@@ -377,10 +377,12 @@ export class Keywords {
|
|
|
377
377
|
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude: number[], listKeywordsToExclude: number[]): Promise<KeywordListDisplayWithList>;
|
|
378
378
|
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?: string[] }): Promise<KeywordListDisplayWithProjects>;
|
|
379
379
|
addProjectsToKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
380
|
+
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
380
381
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
381
382
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
382
383
|
getKeywordsAndIds(): Promise<any>;
|
|
383
384
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
385
|
+
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
384
386
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
385
387
|
}
|
|
386
388
|
|
|
@@ -453,10 +455,7 @@ export class Projects {
|
|
|
453
455
|
|
|
454
456
|
export class Search {
|
|
455
457
|
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>>;
|
|
456
|
-
|
|
457
|
-
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number): Promise<any>;
|
|
458
|
-
searchProjectPhotosNaturalLanguageHybrid(projectTableName: string, searchText: string, size?: number, options?: { blend?: string | string[], minCosine?: number | number[] }): Promise<Record<string, any>>;
|
|
459
|
-
searchProjectPhotosNaturalLanguageAuto(projectTableName: string, searchText: string, size?: number, options?: { blend?: string | string[], minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], debugScores?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
458
|
+
searchProjectPhotosNaturalLanguageAuto(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], debugScores?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
460
459
|
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
461
460
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
462
461
|
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>>;
|
package/dist/sdk.esm.d.ts
CHANGED
|
@@ -377,10 +377,12 @@ export class Keywords {
|
|
|
377
377
|
updateKeywordFilteringListLabels(keywordListId: number, listKeywordsToInclude: number[], listKeywordsToExclude: number[]): Promise<KeywordListDisplayWithList>;
|
|
378
378
|
updateKeywordFilteringListDetails(keywordListId: number, body?: { name?: string, projectList?: string[] }): Promise<KeywordListDisplayWithProjects>;
|
|
379
379
|
addProjectsToKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
380
|
+
addCompanyToKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
380
381
|
requestKeywordListExport(keywordListId: number): Promise<Record<string, any>>;
|
|
381
382
|
requestKeywordListExportStatus(keywordListId: number): Promise<AnalysisStatusResponse>;
|
|
382
383
|
getKeywordsAndIds(): Promise<any>;
|
|
383
384
|
removeProjectsFromKeywordFilteringList(keywordListId: number, options?: { projectIds?: any }): Promise<Record<string, any>>;
|
|
385
|
+
removeCompanyFromKeywordFilteringList(keywordListId: number, options?: { companyId?: number | number[] }): Promise<Record<string, any>>;
|
|
384
386
|
deleteKeywordFilteringListById(keywordListId: number): Promise<Record<string, any>>;
|
|
385
387
|
}
|
|
386
388
|
|
|
@@ -453,10 +455,7 @@ export class Projects {
|
|
|
453
455
|
|
|
454
456
|
export class Search {
|
|
455
457
|
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>>;
|
|
456
|
-
|
|
457
|
-
searchProjectPhotosNaturalLanguage(projectTableName: string, searchText: string, size?: number): Promise<any>;
|
|
458
|
-
searchProjectPhotosNaturalLanguageHybrid(projectTableName: string, searchText: string, size?: number, options?: { blend?: string | string[], minCosine?: number | number[] }): Promise<Record<string, any>>;
|
|
459
|
-
searchProjectPhotosNaturalLanguageAuto(projectTableName: string, searchText: string, size?: number, options?: { blend?: string | string[], minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], debugScores?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
458
|
+
searchProjectPhotosNaturalLanguageAuto(projectTableName: string, searchText: string, size?: number, options?: { minCosine?: number | number[], labelMinCosine?: number | number[], labelTopK?: number | number[], labelDelta?: number | number[], debugScores?: boolean | boolean[] }): Promise<Record<string, any>>;
|
|
460
459
|
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
461
460
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
462
461
|
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>>;
|
package/dist/sdk.esm.js
CHANGED
|
@@ -910,6 +910,17 @@ class Keywords {
|
|
|
910
910
|
return data;
|
|
911
911
|
}
|
|
912
912
|
|
|
913
|
+
async addCompanyToKeywordFilteringList(keywordListId, { companyId } = {}) {
|
|
914
|
+
this._ctx.requireTokens();
|
|
915
|
+
let path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}/company`;
|
|
916
|
+
const query = new URLSearchParams();
|
|
917
|
+
if (companyId !== undefined) (Array.isArray(companyId) ? companyId : [companyId]).forEach(v => query.append('company_id', v));
|
|
918
|
+
const qs = query.toString();
|
|
919
|
+
if (qs) path += '?' + qs;
|
|
920
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
|
|
921
|
+
return data;
|
|
922
|
+
}
|
|
923
|
+
|
|
913
924
|
async requestKeywordListExport(keywordListId) {
|
|
914
925
|
this._ctx.requireTokens();
|
|
915
926
|
const path = `/api/v1/keyword/export/${encodeURIComponent(keywordListId)}`;
|
|
@@ -942,6 +953,17 @@ class Keywords {
|
|
|
942
953
|
return data;
|
|
943
954
|
}
|
|
944
955
|
|
|
956
|
+
async removeCompanyFromKeywordFilteringList(keywordListId, { companyId } = {}) {
|
|
957
|
+
this._ctx.requireTokens();
|
|
958
|
+
let path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}/company`;
|
|
959
|
+
const query = new URLSearchParams();
|
|
960
|
+
if (companyId !== undefined) (Array.isArray(companyId) ? companyId : [companyId]).forEach(v => query.append('company_id', v));
|
|
961
|
+
const qs = query.toString();
|
|
962
|
+
if (qs) path += '?' + qs;
|
|
963
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
964
|
+
return data;
|
|
965
|
+
}
|
|
966
|
+
|
|
945
967
|
async deleteKeywordFilteringListById(keywordListId) {
|
|
946
968
|
this._ctx.requireTokens();
|
|
947
969
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
@@ -1470,49 +1492,10 @@ class Search {
|
|
|
1470
1492
|
return data;
|
|
1471
1493
|
}
|
|
1472
1494
|
|
|
1473
|
-
async
|
|
1474
|
-
this._ctx.requireTokens();
|
|
1475
|
-
const path = `/api/v1/search/text/${encodeURIComponent(projectTableName)}/`;
|
|
1476
|
-
const body = stripUndef$1({
|
|
1477
|
-
search_text: searchText,
|
|
1478
|
-
size: size,
|
|
1479
|
-
});
|
|
1480
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1481
|
-
return data;
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, size = undefined) {
|
|
1485
|
-
this._ctx.requireTokens();
|
|
1486
|
-
const path = `/api/v1/search/nl/${encodeURIComponent(projectTableName)}/`;
|
|
1487
|
-
const body = stripUndef$1({
|
|
1488
|
-
search_text: searchText,
|
|
1489
|
-
size: size,
|
|
1490
|
-
});
|
|
1491
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1492
|
-
return data;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
async searchProjectPhotosNaturalLanguageHybrid(projectTableName, searchText, size = undefined, { blend, minCosine } = {}) {
|
|
1496
|
-
this._ctx.requireTokens();
|
|
1497
|
-
let path = `/api/v1/search/nl_hybrid/${encodeURIComponent(projectTableName)}/`;
|
|
1498
|
-
const query = new URLSearchParams();
|
|
1499
|
-
if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
|
|
1500
|
-
if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
|
|
1501
|
-
const qs = query.toString();
|
|
1502
|
-
if (qs) path += '?' + qs;
|
|
1503
|
-
const body = stripUndef$1({
|
|
1504
|
-
search_text: searchText,
|
|
1505
|
-
size: size,
|
|
1506
|
-
});
|
|
1507
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1508
|
-
return data;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1495
|
+
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1512
1496
|
this._ctx.requireTokens();
|
|
1513
1497
|
let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
|
|
1514
1498
|
const query = new URLSearchParams();
|
|
1515
|
-
if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
|
|
1516
1499
|
if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
|
|
1517
1500
|
if (labelMinCosine !== undefined) (Array.isArray(labelMinCosine) ? labelMinCosine : [labelMinCosine]).forEach(v => query.append('label_min_cosine', v));
|
|
1518
1501
|
if (labelTopK !== undefined) (Array.isArray(labelTopK) ? labelTopK : [labelTopK]).forEach(v => query.append('label_top_k', v));
|
package/dist/sdk.umd.js
CHANGED
|
@@ -916,6 +916,17 @@
|
|
|
916
916
|
return data;
|
|
917
917
|
}
|
|
918
918
|
|
|
919
|
+
async addCompanyToKeywordFilteringList(keywordListId, { companyId } = {}) {
|
|
920
|
+
this._ctx.requireTokens();
|
|
921
|
+
let path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}/company`;
|
|
922
|
+
const query = new URLSearchParams();
|
|
923
|
+
if (companyId !== undefined) (Array.isArray(companyId) ? companyId : [companyId]).forEach(v => query.append('company_id', v));
|
|
924
|
+
const qs = query.toString();
|
|
925
|
+
if (qs) path += '?' + qs;
|
|
926
|
+
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken);
|
|
927
|
+
return data;
|
|
928
|
+
}
|
|
929
|
+
|
|
919
930
|
async requestKeywordListExport(keywordListId) {
|
|
920
931
|
this._ctx.requireTokens();
|
|
921
932
|
const path = `/api/v1/keyword/export/${encodeURIComponent(keywordListId)}`;
|
|
@@ -948,6 +959,17 @@
|
|
|
948
959
|
return data;
|
|
949
960
|
}
|
|
950
961
|
|
|
962
|
+
async removeCompanyFromKeywordFilteringList(keywordListId, { companyId } = {}) {
|
|
963
|
+
this._ctx.requireTokens();
|
|
964
|
+
let path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}/company`;
|
|
965
|
+
const query = new URLSearchParams();
|
|
966
|
+
if (companyId !== undefined) (Array.isArray(companyId) ? companyId : [companyId]).forEach(v => query.append('company_id', v));
|
|
967
|
+
const qs = query.toString();
|
|
968
|
+
if (qs) path += '?' + qs;
|
|
969
|
+
const { data } = await this._ctx.client.request(path, 'DELETE', this._ctx.accessToken, this._ctx.refreshToken);
|
|
970
|
+
return data;
|
|
971
|
+
}
|
|
972
|
+
|
|
951
973
|
async deleteKeywordFilteringListById(keywordListId) {
|
|
952
974
|
this._ctx.requireTokens();
|
|
953
975
|
const path = `/api/v1/keyword/${encodeURIComponent(keywordListId)}`;
|
|
@@ -1476,49 +1498,10 @@
|
|
|
1476
1498
|
return data;
|
|
1477
1499
|
}
|
|
1478
1500
|
|
|
1479
|
-
async
|
|
1480
|
-
this._ctx.requireTokens();
|
|
1481
|
-
const path = `/api/v1/search/text/${encodeURIComponent(projectTableName)}/`;
|
|
1482
|
-
const body = stripUndef$1({
|
|
1483
|
-
search_text: searchText,
|
|
1484
|
-
size: size,
|
|
1485
|
-
});
|
|
1486
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1487
|
-
return data;
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
async searchProjectPhotosNaturalLanguage(projectTableName, searchText, size = undefined) {
|
|
1491
|
-
this._ctx.requireTokens();
|
|
1492
|
-
const path = `/api/v1/search/nl/${encodeURIComponent(projectTableName)}/`;
|
|
1493
|
-
const body = stripUndef$1({
|
|
1494
|
-
search_text: searchText,
|
|
1495
|
-
size: size,
|
|
1496
|
-
});
|
|
1497
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1498
|
-
return data;
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
async searchProjectPhotosNaturalLanguageHybrid(projectTableName, searchText, size = undefined, { blend, minCosine } = {}) {
|
|
1502
|
-
this._ctx.requireTokens();
|
|
1503
|
-
let path = `/api/v1/search/nl_hybrid/${encodeURIComponent(projectTableName)}/`;
|
|
1504
|
-
const query = new URLSearchParams();
|
|
1505
|
-
if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
|
|
1506
|
-
if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
|
|
1507
|
-
const qs = query.toString();
|
|
1508
|
-
if (qs) path += '?' + qs;
|
|
1509
|
-
const body = stripUndef$1({
|
|
1510
|
-
search_text: searchText,
|
|
1511
|
-
size: size,
|
|
1512
|
-
});
|
|
1513
|
-
const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
|
|
1514
|
-
return data;
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1501
|
+
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1518
1502
|
this._ctx.requireTokens();
|
|
1519
1503
|
let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
|
|
1520
1504
|
const query = new URLSearchParams();
|
|
1521
|
-
if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
|
|
1522
1505
|
if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
|
|
1523
1506
|
if (labelMinCosine !== undefined) (Array.isArray(labelMinCosine) ? labelMinCosine : [labelMinCosine]).forEach(v => query.append('label_min_cosine', v));
|
|
1524
1507
|
if (labelTopK !== undefined) (Array.isArray(labelTopK) ? labelTopK : [labelTopK]).forEach(v => query.append('label_top_k', v));
|