@miso.ai/client-sdk-core 1.7.3-beta.0 → 1.7.3-beta.2

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.
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _commons = require("@miso.ai/commons");
8
8
  var _base = _interopRequireDefault(require("./base"));
9
- const _excluded = ["iterable"],
10
- _excluded2 = ["pollingInternal"];
9
+ const _excluded = ["pollingInternal"];
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
11
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
12
  class Ask extends _base.default {
@@ -15,11 +14,7 @@ class Ask extends _base.default {
15
14
  super(api, 'ask');
16
15
  }
17
16
  async questions(payload) {
18
- let _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
19
- let {
20
- iterable = false
21
- } = _ref,
22
- options = _objectWithoutPropertiesLoose(_ref, _excluded);
17
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
23
18
  const response = await this._run('questions', payload, options);
24
19
  return new Answer(this, response);
25
20
  }
@@ -32,11 +27,11 @@ class Ask extends _base.default {
32
27
  }));
33
28
  }
34
29
  _iterable(questionId) {
35
- let _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
30
+ let _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
36
31
  let {
37
32
  pollingInternal = 500
38
- } = _ref2,
39
- options = _objectWithoutPropertiesLoose(_ref2, _excluded2);
33
+ } = _ref,
34
+ options = _objectWithoutPropertiesLoose(_ref, _excluded);
40
35
  // TODO: abort signal
41
36
  let apiErrorCount = 0;
42
37
  const buffer = new _commons.ValueBuffer();
@@ -67,10 +62,10 @@ class Ask extends _base.default {
67
62
  }
68
63
  exports.default = Ask;
69
64
  class Answer {
70
- constructor(api, _ref3) {
65
+ constructor(api, _ref2) {
71
66
  let {
72
67
  question_id
73
- } = _ref3;
68
+ } = _ref2;
74
69
  let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
75
70
  this._api = api;
76
71
  this._id = question_id;
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _default = '1.7.3-beta.0';
7
+ var _default = '1.7.3-beta.2';
8
8
  exports.default = _default;
@@ -1,5 +1,4 @@
1
- const _excluded = ["iterable"],
2
- _excluded2 = ["pollingInternal"];
1
+ const _excluded = ["pollingInternal"];
3
2
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
3
  import { ValueBuffer } from '@miso.ai/commons';
5
4
  import ApiBase from './base';
@@ -8,11 +7,7 @@ export default class Ask extends ApiBase {
8
7
  super(api, 'ask');
9
8
  }
10
9
  async questions(payload) {
11
- let _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12
- let {
13
- iterable = false
14
- } = _ref,
15
- options = _objectWithoutPropertiesLoose(_ref, _excluded);
10
+ let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16
11
  const response = await this._run('questions', payload, options);
17
12
  return new Answer(this, response);
18
13
  }
@@ -25,11 +20,11 @@ export default class Ask extends ApiBase {
25
20
  }));
26
21
  }
27
22
  _iterable(questionId) {
28
- let _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
23
+ let _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29
24
  let {
30
25
  pollingInternal = 500
31
- } = _ref2,
32
- options = _objectWithoutPropertiesLoose(_ref2, _excluded2);
26
+ } = _ref,
27
+ options = _objectWithoutPropertiesLoose(_ref, _excluded);
33
28
  // TODO: abort signal
34
29
  let apiErrorCount = 0;
35
30
  const buffer = new ValueBuffer();
@@ -59,10 +54,10 @@ export default class Ask extends ApiBase {
59
54
  }
60
55
  }
61
56
  class Answer {
62
- constructor(api, _ref3) {
57
+ constructor(api, _ref2) {
63
58
  let {
64
59
  question_id
65
- } = _ref3;
60
+ } = _ref2;
66
61
  let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
67
62
  this._api = api;
68
63
  this._id = question_id;
@@ -1 +1 @@
1
- export default '1.7.3-beta.0';
1
+ export default '1.7.3-beta.2';
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.7.3-beta.0"
32
+ "@miso.ai/commons": "1.7.3-beta.2"
33
33
  },
34
- "version": "1.7.3-beta.0"
34
+ "version": "1.7.3-beta.2"
35
35
  }