@mediaviz/sdk 1.0.68 → 1.0.70
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 +24 -1
- package/dist/sdk.d.ts +4 -2
- package/dist/sdk.esm.d.ts +4 -2
- package/dist/sdk.esm.js +24 -1
- package/dist/sdk.umd.js +24 -1
- 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)}`;
|
|
@@ -1510,7 +1532,7 @@ class Search {
|
|
|
1510
1532
|
return data;
|
|
1511
1533
|
}
|
|
1512
1534
|
|
|
1513
|
-
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta } = {}) {
|
|
1535
|
+
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1514
1536
|
this._ctx.requireTokens();
|
|
1515
1537
|
let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
|
|
1516
1538
|
const query = new URLSearchParams();
|
|
@@ -1519,6 +1541,7 @@ class Search {
|
|
|
1519
1541
|
if (labelMinCosine !== undefined) (Array.isArray(labelMinCosine) ? labelMinCosine : [labelMinCosine]).forEach(v => query.append('label_min_cosine', v));
|
|
1520
1542
|
if (labelTopK !== undefined) (Array.isArray(labelTopK) ? labelTopK : [labelTopK]).forEach(v => query.append('label_top_k', v));
|
|
1521
1543
|
if (labelDelta !== undefined) (Array.isArray(labelDelta) ? labelDelta : [labelDelta]).forEach(v => query.append('label_delta', v));
|
|
1544
|
+
if (debugScores !== undefined) (Array.isArray(debugScores) ? debugScores : [debugScores]).forEach(v => query.append('debug_scores', v));
|
|
1522
1545
|
const qs = query.toString();
|
|
1523
1546
|
if (qs) path += '?' + qs;
|
|
1524
1547
|
const body = stripUndef$1({
|
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
|
|
|
@@ -455,8 +457,8 @@ 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
458
|
searchProjectPhotosText(projectTableName: string, searchText: string, size?: number): Promise<any>;
|
|
457
459
|
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<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[] }): Promise<Record<string, any>>;
|
|
460
|
+
searchProjectPhotosNaturalLanguageHybrid(projectTableName: string, searchText: string, size?: number, options?: { blend?: string | string[], minCosine?: number | number[] }): Promise<Record<string, any>>;
|
|
461
|
+
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>>;
|
|
460
462
|
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
461
463
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
462
464
|
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
|
|
|
@@ -455,8 +457,8 @@ 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
458
|
searchProjectPhotosText(projectTableName: string, searchText: string, size?: number): Promise<any>;
|
|
457
459
|
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<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[] }): Promise<Record<string, any>>;
|
|
460
|
+
searchProjectPhotosNaturalLanguageHybrid(projectTableName: string, searchText: string, size?: number, options?: { blend?: string | string[], minCosine?: number | number[] }): Promise<Record<string, any>>;
|
|
461
|
+
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>>;
|
|
460
462
|
getProjectSavedSearches(projectTableName: string): Promise<any>;
|
|
461
463
|
getSavedSearchById(searchId: number): Promise<SearchDisplay>;
|
|
462
464
|
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)}`;
|
|
@@ -1508,7 +1530,7 @@ class Search {
|
|
|
1508
1530
|
return data;
|
|
1509
1531
|
}
|
|
1510
1532
|
|
|
1511
|
-
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta } = {}) {
|
|
1533
|
+
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1512
1534
|
this._ctx.requireTokens();
|
|
1513
1535
|
let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
|
|
1514
1536
|
const query = new URLSearchParams();
|
|
@@ -1517,6 +1539,7 @@ class Search {
|
|
|
1517
1539
|
if (labelMinCosine !== undefined) (Array.isArray(labelMinCosine) ? labelMinCosine : [labelMinCosine]).forEach(v => query.append('label_min_cosine', v));
|
|
1518
1540
|
if (labelTopK !== undefined) (Array.isArray(labelTopK) ? labelTopK : [labelTopK]).forEach(v => query.append('label_top_k', v));
|
|
1519
1541
|
if (labelDelta !== undefined) (Array.isArray(labelDelta) ? labelDelta : [labelDelta]).forEach(v => query.append('label_delta', v));
|
|
1542
|
+
if (debugScores !== undefined) (Array.isArray(debugScores) ? debugScores : [debugScores]).forEach(v => query.append('debug_scores', v));
|
|
1520
1543
|
const qs = query.toString();
|
|
1521
1544
|
if (qs) path += '?' + qs;
|
|
1522
1545
|
const body = stripUndef$1({
|
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)}`;
|
|
@@ -1514,7 +1536,7 @@
|
|
|
1514
1536
|
return data;
|
|
1515
1537
|
}
|
|
1516
1538
|
|
|
1517
|
-
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta } = {}) {
|
|
1539
|
+
async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine, labelMinCosine, labelTopK, labelDelta, debugScores } = {}) {
|
|
1518
1540
|
this._ctx.requireTokens();
|
|
1519
1541
|
let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
|
|
1520
1542
|
const query = new URLSearchParams();
|
|
@@ -1523,6 +1545,7 @@
|
|
|
1523
1545
|
if (labelMinCosine !== undefined) (Array.isArray(labelMinCosine) ? labelMinCosine : [labelMinCosine]).forEach(v => query.append('label_min_cosine', v));
|
|
1524
1546
|
if (labelTopK !== undefined) (Array.isArray(labelTopK) ? labelTopK : [labelTopK]).forEach(v => query.append('label_top_k', v));
|
|
1525
1547
|
if (labelDelta !== undefined) (Array.isArray(labelDelta) ? labelDelta : [labelDelta]).forEach(v => query.append('label_delta', v));
|
|
1548
|
+
if (debugScores !== undefined) (Array.isArray(debugScores) ? debugScores : [debugScores]).forEach(v => query.append('debug_scores', v));
|
|
1526
1549
|
const qs = query.toString();
|
|
1527
1550
|
if (qs) path += '?' + qs;
|
|
1528
1551
|
const body = stripUndef$1({
|