@mediaviz/sdk 1.0.77 → 1.0.79

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 CHANGED
@@ -1125,6 +1125,17 @@ class Person {
1125
1125
  return data;
1126
1126
  }
1127
1127
 
1128
+ async getPhotoIdsByPersons(projectTableName, { personId } = {}) {
1129
+ this._ctx.requireTokens();
1130
+ let path = `/api/v1/person/${encodeURIComponent(projectTableName)}/photos`;
1131
+ const query = new URLSearchParams();
1132
+ if (personId !== undefined) (Array.isArray(personId) ? personId : [personId]).forEach(v => query.append('person_id', v));
1133
+ const qs = query.toString();
1134
+ if (qs) path += '?' + qs;
1135
+ const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1136
+ return data;
1137
+ }
1138
+
1128
1139
  async getAllPersonsFromPhoto(projectTableName, photoId) {
1129
1140
  this._ctx.requireTokens();
1130
1141
  const path = `/api/v1/person/${encodeURIComponent(projectTableName)}/photo/${encodeURIComponent(photoId)}`;
@@ -1487,11 +1498,12 @@ class Search {
1487
1498
  return data;
1488
1499
  }
1489
1500
 
1490
- async searchProjectPhotosParametrized(projectTableName, { searchText, notSearchText, city, country, state, albums, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, bestOfSimilarSetsOnly, splitByTier, size } = {}) {
1501
+ async searchProjectPhotosParametrized(projectTableName, { andSearchText, orSearchText, notSearchText, city, country, state, albums, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, bestOfSimilarSetsOnly, splitByTier, size } = {}) {
1491
1502
  this._ctx.requireTokens();
1492
1503
  let path = `/api/v1/search/parametrized/${encodeURIComponent(projectTableName)}/`;
1493
1504
  const query = new URLSearchParams();
1494
- if (searchText !== undefined) (Array.isArray(searchText) ? searchText : [searchText]).forEach(v => query.append('search_text', v));
1505
+ if (andSearchText !== undefined) (Array.isArray(andSearchText) ? andSearchText : [andSearchText]).forEach(v => query.append('and_search_text', v));
1506
+ if (orSearchText !== undefined) (Array.isArray(orSearchText) ? orSearchText : [orSearchText]).forEach(v => query.append('or_search_text', v));
1495
1507
  if (notSearchText !== undefined) (Array.isArray(notSearchText) ? notSearchText : [notSearchText]).forEach(v => query.append('not_search_text', v));
1496
1508
  if (city !== undefined) (Array.isArray(city) ? city : [city]).forEach(v => query.append('city', v));
1497
1509
  if (country !== undefined) (Array.isArray(country) ? country : [country]).forEach(v => query.append('country', v));
package/dist/sdk.d.cts CHANGED
@@ -411,6 +411,7 @@ export class Person {
411
411
  splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
412
412
  getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
413
413
  getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
414
+ getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
414
415
  getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
415
416
  }
416
417
 
@@ -454,7 +455,7 @@ export class Projects {
454
455
 
455
456
  export class Search {
456
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>>;
457
- searchProjectPhotosParametrized(projectTableName: string, options?: { searchText?: string | string[], notSearchText?: string | string[], city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], size?: number | number[] }): Promise<Record<string, any>>;
458
+ 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[], dateOrder?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], size?: number | number[] }): Promise<Record<string, any>>;
458
459
  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>>;
459
460
  getProjectSavedSearches(projectTableName: string): Promise<any>;
460
461
  getSavedSearchById(searchId: number): Promise<SearchDisplay>;
package/dist/sdk.d.ts CHANGED
@@ -411,6 +411,7 @@ export class Person {
411
411
  splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
412
412
  getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
413
413
  getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
414
+ getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
414
415
  getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
415
416
  }
416
417
 
@@ -454,7 +455,7 @@ export class Projects {
454
455
 
455
456
  export class Search {
456
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>>;
457
- searchProjectPhotosParametrized(projectTableName: string, options?: { searchText?: string | string[], notSearchText?: string | string[], city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], size?: number | number[] }): Promise<Record<string, any>>;
458
+ 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[], dateOrder?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], size?: number | number[] }): Promise<Record<string, any>>;
458
459
  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>>;
459
460
  getProjectSavedSearches(projectTableName: string): Promise<any>;
460
461
  getSavedSearchById(searchId: number): Promise<SearchDisplay>;
package/dist/sdk.esm.d.ts CHANGED
@@ -411,6 +411,7 @@ export class Person {
411
411
  splitPersons(projectTableName: string, id: number, options?: { newName?: string | string[], destinationPersonId?: string | string[] }): Promise<PhotoPersonLight>;
412
412
  getAllPersonsFromProject(projectTableName: string): Promise<PhotoPersonWithS3Link[]>;
413
413
  getAllPersonNamesFromProject(projectTableName: string): Promise<any>;
414
+ getPhotoIdsByPersons(projectTableName: string, options?: { personId?: string[] | string[][] }): Promise<any>;
414
415
  getAllPersonsFromPhoto(projectTableName: string, photoId: number): Promise<PhotoPersonLight[]>;
415
416
  }
416
417
 
@@ -454,7 +455,7 @@ export class Projects {
454
455
 
455
456
  export class Search {
456
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>>;
457
- searchProjectPhotosParametrized(projectTableName: string, options?: { searchText?: string | string[], notSearchText?: string | string[], city?: any, country?: any, state?: any, albums?: any, dateMin?: string | string[], dateMax?: string | string[], dateNullAnd?: boolean | boolean[], dateNullOr?: boolean | boolean[], dateOrder?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], size?: number | number[] }): Promise<Record<string, any>>;
458
+ 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[], dateOrder?: string | string[], bestOfSimilarSetsOnly?: boolean | boolean[], splitByTier?: boolean | boolean[], size?: number | number[] }): Promise<Record<string, any>>;
458
459
  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>>;
459
460
  getProjectSavedSearches(projectTableName: string): Promise<any>;
460
461
  getSavedSearchById(searchId: number): Promise<SearchDisplay>;
package/dist/sdk.esm.js CHANGED
@@ -1123,6 +1123,17 @@ class Person {
1123
1123
  return data;
1124
1124
  }
1125
1125
 
1126
+ async getPhotoIdsByPersons(projectTableName, { personId } = {}) {
1127
+ this._ctx.requireTokens();
1128
+ let path = `/api/v1/person/${encodeURIComponent(projectTableName)}/photos`;
1129
+ const query = new URLSearchParams();
1130
+ if (personId !== undefined) (Array.isArray(personId) ? personId : [personId]).forEach(v => query.append('person_id', v));
1131
+ const qs = query.toString();
1132
+ if (qs) path += '?' + qs;
1133
+ const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1134
+ return data;
1135
+ }
1136
+
1126
1137
  async getAllPersonsFromPhoto(projectTableName, photoId) {
1127
1138
  this._ctx.requireTokens();
1128
1139
  const path = `/api/v1/person/${encodeURIComponent(projectTableName)}/photo/${encodeURIComponent(photoId)}`;
@@ -1485,11 +1496,12 @@ class Search {
1485
1496
  return data;
1486
1497
  }
1487
1498
 
1488
- async searchProjectPhotosParametrized(projectTableName, { searchText, notSearchText, city, country, state, albums, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, bestOfSimilarSetsOnly, splitByTier, size } = {}) {
1499
+ async searchProjectPhotosParametrized(projectTableName, { andSearchText, orSearchText, notSearchText, city, country, state, albums, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, bestOfSimilarSetsOnly, splitByTier, size } = {}) {
1489
1500
  this._ctx.requireTokens();
1490
1501
  let path = `/api/v1/search/parametrized/${encodeURIComponent(projectTableName)}/`;
1491
1502
  const query = new URLSearchParams();
1492
- if (searchText !== undefined) (Array.isArray(searchText) ? searchText : [searchText]).forEach(v => query.append('search_text', v));
1503
+ if (andSearchText !== undefined) (Array.isArray(andSearchText) ? andSearchText : [andSearchText]).forEach(v => query.append('and_search_text', v));
1504
+ if (orSearchText !== undefined) (Array.isArray(orSearchText) ? orSearchText : [orSearchText]).forEach(v => query.append('or_search_text', v));
1493
1505
  if (notSearchText !== undefined) (Array.isArray(notSearchText) ? notSearchText : [notSearchText]).forEach(v => query.append('not_search_text', v));
1494
1506
  if (city !== undefined) (Array.isArray(city) ? city : [city]).forEach(v => query.append('city', v));
1495
1507
  if (country !== undefined) (Array.isArray(country) ? country : [country]).forEach(v => query.append('country', v));
package/dist/sdk.umd.js CHANGED
@@ -1129,6 +1129,17 @@
1129
1129
  return data;
1130
1130
  }
1131
1131
 
1132
+ async getPhotoIdsByPersons(projectTableName, { personId } = {}) {
1133
+ this._ctx.requireTokens();
1134
+ let path = `/api/v1/person/${encodeURIComponent(projectTableName)}/photos`;
1135
+ const query = new URLSearchParams();
1136
+ if (personId !== undefined) (Array.isArray(personId) ? personId : [personId]).forEach(v => query.append('person_id', v));
1137
+ const qs = query.toString();
1138
+ if (qs) path += '?' + qs;
1139
+ const { data } = await this._ctx.client.request(path, 'GET', this._ctx.accessToken, this._ctx.refreshToken);
1140
+ return data;
1141
+ }
1142
+
1132
1143
  async getAllPersonsFromPhoto(projectTableName, photoId) {
1133
1144
  this._ctx.requireTokens();
1134
1145
  const path = `/api/v1/person/${encodeURIComponent(projectTableName)}/photo/${encodeURIComponent(photoId)}`;
@@ -1491,11 +1502,12 @@
1491
1502
  return data;
1492
1503
  }
1493
1504
 
1494
- async searchProjectPhotosParametrized(projectTableName, { searchText, notSearchText, city, country, state, albums, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, bestOfSimilarSetsOnly, splitByTier, size } = {}) {
1505
+ async searchProjectPhotosParametrized(projectTableName, { andSearchText, orSearchText, notSearchText, city, country, state, albums, dateMin, dateMax, dateNullAnd, dateNullOr, dateOrder, bestOfSimilarSetsOnly, splitByTier, size } = {}) {
1495
1506
  this._ctx.requireTokens();
1496
1507
  let path = `/api/v1/search/parametrized/${encodeURIComponent(projectTableName)}/`;
1497
1508
  const query = new URLSearchParams();
1498
- if (searchText !== undefined) (Array.isArray(searchText) ? searchText : [searchText]).forEach(v => query.append('search_text', v));
1509
+ if (andSearchText !== undefined) (Array.isArray(andSearchText) ? andSearchText : [andSearchText]).forEach(v => query.append('and_search_text', v));
1510
+ if (orSearchText !== undefined) (Array.isArray(orSearchText) ? orSearchText : [orSearchText]).forEach(v => query.append('or_search_text', v));
1499
1511
  if (notSearchText !== undefined) (Array.isArray(notSearchText) ? notSearchText : [notSearchText]).forEach(v => query.append('not_search_text', v));
1500
1512
  if (city !== undefined) (Array.isArray(city) ? city : [city]).forEach(v => query.append('city', v));
1501
1513
  if (country !== undefined) (Array.isArray(country) ? country : [country]).forEach(v => query.append('country', v));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediaviz/sdk",
3
- "version": "1.0.77",
3
+ "version": "1.0.79",
4
4
  "description": "MediaViz JavaScript SDK \u2014 auto-generated public endpoint client.",
5
5
  "license": "MIT",
6
6
  "repository": {