@mediaviz/sdk 1.0.59 → 1.0.61

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
@@ -1492,6 +1492,22 @@ class Search {
1492
1492
  return data;
1493
1493
  }
1494
1494
 
1495
+ async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine } = {}) {
1496
+ this._ctx.requireTokens();
1497
+ let path = `/api/v1/search/auto/${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
+
1495
1511
  async getProjectSavedSearches(projectTableName) {
1496
1512
  this._ctx.requireTokens();
1497
1513
  const path = `/api/v1/search/saved/${encodeURIComponent(projectTableName)}/`;
package/dist/sdk.esm.js CHANGED
@@ -1490,6 +1490,22 @@ class Search {
1490
1490
  return data;
1491
1491
  }
1492
1492
 
1493
+ async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine } = {}) {
1494
+ this._ctx.requireTokens();
1495
+ let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
1496
+ const query = new URLSearchParams();
1497
+ if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
1498
+ if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
1499
+ const qs = query.toString();
1500
+ if (qs) path += '?' + qs;
1501
+ const body = stripUndef$1({
1502
+ search_text: searchText,
1503
+ size: size,
1504
+ });
1505
+ const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
1506
+ return data;
1507
+ }
1508
+
1493
1509
  async getProjectSavedSearches(projectTableName) {
1494
1510
  this._ctx.requireTokens();
1495
1511
  const path = `/api/v1/search/saved/${encodeURIComponent(projectTableName)}/`;
package/dist/sdk.umd.js CHANGED
@@ -1496,6 +1496,22 @@
1496
1496
  return data;
1497
1497
  }
1498
1498
 
1499
+ async searchProjectPhotosNaturalLanguageAuto(projectTableName, searchText, size = undefined, { blend, minCosine } = {}) {
1500
+ this._ctx.requireTokens();
1501
+ let path = `/api/v1/search/auto/${encodeURIComponent(projectTableName)}/`;
1502
+ const query = new URLSearchParams();
1503
+ if (blend !== undefined) (Array.isArray(blend) ? blend : [blend]).forEach(v => query.append('blend', v));
1504
+ if (minCosine !== undefined) (Array.isArray(minCosine) ? minCosine : [minCosine]).forEach(v => query.append('min_cosine', v));
1505
+ const qs = query.toString();
1506
+ if (qs) path += '?' + qs;
1507
+ const body = stripUndef$1({
1508
+ search_text: searchText,
1509
+ size: size,
1510
+ });
1511
+ const { data } = await this._ctx.client.request(path, 'POST', this._ctx.accessToken, this._ctx.refreshToken, body);
1512
+ return data;
1513
+ }
1514
+
1499
1515
  async getProjectSavedSearches(projectTableName) {
1500
1516
  this._ctx.requireTokens();
1501
1517
  const path = `/api/v1/search/saved/${encodeURIComponent(projectTableName)}/`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediaviz/sdk",
3
- "version": "1.0.59",
3
+ "version": "1.0.61",
4
4
  "description": "MediaViz JavaScript SDK \u2014 auto-generated public endpoint client.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,7 +27,15 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
+ "scripts": {
31
+ "build": "rollup -c"
32
+ },
30
33
  "optionalDependencies": {
31
34
  "sharp": "^0.33.0"
35
+ },
36
+ "devDependencies": {
37
+ "rollup": "^4.0.0",
38
+ "@rollup/plugin-node-resolve": "^16.0.0",
39
+ "@rollup/plugin-commonjs": "^29.0.0"
32
40
  }
33
41
  }