@miso.ai/client-sdk-core 1.12.3-beta.6 → 1.12.4-beta.0

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.
@@ -43,6 +43,14 @@ class Ask extends _base.default {
43
43
  return this._run(NAME.TRENDING_QUESTIONS, payload, options);
44
44
  }
45
45
  async search(payload, options = {}) {
46
+ if (isId(payload)) {
47
+ payload = {
48
+ question_id: payload
49
+ };
50
+ }
51
+ if (payload.question_id) {
52
+ return new SearchResult(this, payload, options);
53
+ }
46
54
  const response = await this._run(NAME.SEARCH, payload, options);
47
55
  return response.question_id ? new SearchResult(this, response, options) : response;
48
56
  }
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = exports.default = '1.12.3-beta.6';
7
+ var _default = exports.default = '1.12.4-beta.0';
package/package.json CHANGED
@@ -29,7 +29,7 @@
29
29
  "url": "https://github.com/MisoAI/miso-client-js-sdk/issues"
30
30
  },
31
31
  "dependencies": {
32
- "@miso.ai/commons": "1.12.3-beta.6"
32
+ "@miso.ai/commons": "1.12.4-beta.0"
33
33
  },
34
- "version": "1.12.3-beta.6"
34
+ "version": "1.12.4-beta.0"
35
35
  }
package/src/api/ask.js CHANGED
@@ -38,6 +38,12 @@ export default class Ask extends ApiBase {
38
38
  }
39
39
 
40
40
  async search(payload, options = {}) {
41
+ if (isId(payload)) {
42
+ payload = { question_id: payload };
43
+ }
44
+ if (payload.question_id) {
45
+ return new SearchResult(this, payload, options);
46
+ }
41
47
  const response = await this._run(NAME.SEARCH, payload, options);
42
48
  return response.question_id ? new SearchResult(this, response, options) : response;
43
49
  }
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export default '1.12.3-beta.6';
1
+ export default '1.12.4-beta.0';