@getlupa/client 1.3.7 → 1.3.8

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.
@@ -20714,7 +20714,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20714
20714
  return Env[environment] || Env["production"];
20715
20715
  };
20716
20716
  const suggestSearchChatPhrases = (options, request) => __async(void 0, null, function* () {
20717
- var _a, _b;
20717
+ var _a, _b, _c;
20718
20718
  const { environment, customBaseUrl } = options;
20719
20719
  try {
20720
20720
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20726,14 +20726,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20726
20726
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20727
20727
  }
20728
20728
  const errors = yield res.json();
20729
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20729
20730
  return { success: false, errors };
20730
20731
  } catch (e) {
20731
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20732
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20732
20733
  return { success: false, errors: [e] };
20733
20734
  }
20734
20735
  });
20735
20736
  const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20736
- var _a, _b;
20737
+ var _a, _b, _c;
20737
20738
  const { environment, customBaseUrl } = options;
20738
20739
  try {
20739
20740
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20745,14 +20746,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20745
20746
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20746
20747
  }
20747
20748
  const errors = yield res.json();
20749
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20748
20750
  return { success: false, errors };
20749
20751
  } catch (e) {
20750
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20752
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20751
20753
  return { success: false, errors: [e] };
20752
20754
  }
20753
20755
  });
20754
20756
  const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20755
- var _a, _b;
20757
+ var _a, _b, _c;
20756
20758
  const { environment, customBaseUrl } = options;
20757
20759
  try {
20758
20760
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20764,9 +20766,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20764
20766
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20765
20767
  }
20766
20768
  const errors = yield res.json();
20769
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20767
20770
  return { success: false, errors };
20768
20771
  } catch (e) {
20769
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20772
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20770
20773
  return { success: false, errors: [e] };
20771
20774
  }
20772
20775
  });
@@ -20775,7 +20778,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20775
20778
  productStrings,
20776
20779
  messageHistory
20777
20780
  }) {
20778
- var _a, _b;
20781
+ var _a, _b, _c;
20779
20782
  const { environment, customBaseUrl } = options;
20780
20783
  try {
20781
20784
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20787,9 +20790,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20787
20790
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20788
20791
  }
20789
20792
  const errors = yield res.json();
20793
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20790
20794
  return { success: false, errors };
20791
20795
  } catch (e) {
20792
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20796
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20793
20797
  return { success: false, errors: [e] };
20794
20798
  }
20795
20799
  });
@@ -20714,7 +20714,7 @@ const getApiUrl = (environment, customBaseUrl) => {
20714
20714
  return Env[environment] || Env["production"];
20715
20715
  };
20716
20716
  const suggestSearchChatPhrases = (options, request) => __async(void 0, null, function* () {
20717
- var _a, _b;
20717
+ var _a, _b, _c;
20718
20718
  const { environment, customBaseUrl } = options;
20719
20719
  try {
20720
20720
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20726,14 +20726,15 @@ const suggestSearchChatPhrases = (options, request) => __async(void 0, null, fun
20726
20726
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20727
20727
  }
20728
20728
  const errors = yield res.json();
20729
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20729
20730
  return { success: false, errors };
20730
20731
  } catch (e) {
20731
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20732
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20732
20733
  return { success: false, errors: [e] };
20733
20734
  }
20734
20735
  });
20735
20736
  const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20736
- var _a, _b;
20737
+ var _a, _b, _c;
20737
20738
  const { environment, customBaseUrl } = options;
20738
20739
  try {
20739
20740
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20745,14 +20746,15 @@ const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function
20745
20746
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20746
20747
  }
20747
20748
  const errors = yield res.json();
20749
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20748
20750
  return { success: false, errors };
20749
20751
  } catch (e) {
20750
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20752
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20751
20753
  return { success: false, errors: [e] };
20752
20754
  }
20753
20755
  });
20754
20756
  const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20755
- var _a, _b;
20757
+ var _a, _b, _c;
20756
20758
  const { environment, customBaseUrl } = options;
20757
20759
  try {
20758
20760
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20764,9 +20766,10 @@ const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function*
20764
20766
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20765
20767
  }
20766
20768
  const errors = yield res.json();
20769
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20767
20770
  return { success: false, errors };
20768
20771
  } catch (e) {
20769
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20772
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20770
20773
  return { success: false, errors: [e] };
20771
20774
  }
20772
20775
  });
@@ -20775,7 +20778,7 @@ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function
20775
20778
  productStrings,
20776
20779
  messageHistory
20777
20780
  }) {
20778
- var _a, _b;
20781
+ var _a, _b, _c;
20779
20782
  const { environment, customBaseUrl } = options;
20780
20783
  try {
20781
20784
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20787,9 +20790,10 @@ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function
20787
20790
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20788
20791
  }
20789
20792
  const errors = yield res.json();
20793
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20790
20794
  return { success: false, errors };
20791
20795
  } catch (e) {
20792
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20796
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20793
20797
  return { success: false, errors: [e] };
20794
20798
  }
20795
20799
  });
@@ -20712,7 +20712,7 @@ const getApiUrl = (environment, customBaseUrl) => {
20712
20712
  return Env[environment] || Env["production"];
20713
20713
  };
20714
20714
  const suggestSearchChatPhrases = (options, request) => __async(void 0, null, function* () {
20715
- var _a, _b;
20715
+ var _a, _b, _c;
20716
20716
  const { environment, customBaseUrl } = options;
20717
20717
  try {
20718
20718
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20724,14 +20724,15 @@ const suggestSearchChatPhrases = (options, request) => __async(void 0, null, fun
20724
20724
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20725
20725
  }
20726
20726
  const errors = yield res.json();
20727
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20727
20728
  return { success: false, errors };
20728
20729
  } catch (e) {
20729
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20730
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20730
20731
  return { success: false, errors: [e] };
20731
20732
  }
20732
20733
  });
20733
20734
  const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20734
- var _a, _b;
20735
+ var _a, _b, _c;
20735
20736
  const { environment, customBaseUrl } = options;
20736
20737
  try {
20737
20738
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20743,14 +20744,15 @@ const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function
20743
20744
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20744
20745
  }
20745
20746
  const errors = yield res.json();
20747
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20746
20748
  return { success: false, errors };
20747
20749
  } catch (e) {
20748
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20750
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20749
20751
  return { success: false, errors: [e] };
20750
20752
  }
20751
20753
  });
20752
20754
  const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20753
- var _a, _b;
20755
+ var _a, _b, _c;
20754
20756
  const { environment, customBaseUrl } = options;
20755
20757
  try {
20756
20758
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20762,9 +20764,10 @@ const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function*
20762
20764
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20763
20765
  }
20764
20766
  const errors = yield res.json();
20767
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20765
20768
  return { success: false, errors };
20766
20769
  } catch (e) {
20767
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20770
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20768
20771
  return { success: false, errors: [e] };
20769
20772
  }
20770
20773
  });
@@ -20773,7 +20776,7 @@ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function
20773
20776
  productStrings,
20774
20777
  messageHistory
20775
20778
  }) {
20776
- var _a, _b;
20779
+ var _a, _b, _c;
20777
20780
  const { environment, customBaseUrl } = options;
20778
20781
  try {
20779
20782
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20785,9 +20788,10 @@ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function
20785
20788
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20786
20789
  }
20787
20790
  const errors = yield res.json();
20791
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20788
20792
  return { success: false, errors };
20789
20793
  } catch (e) {
20790
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20794
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20791
20795
  return { success: false, errors: [e] };
20792
20796
  }
20793
20797
  });
@@ -20716,7 +20716,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20716
20716
  return Env[environment] || Env["production"];
20717
20717
  };
20718
20718
  const suggestSearchChatPhrases = (options, request) => __async(void 0, null, function* () {
20719
- var _a, _b;
20719
+ var _a, _b, _c;
20720
20720
  const { environment, customBaseUrl } = options;
20721
20721
  try {
20722
20722
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20728,14 +20728,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20728
20728
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20729
20729
  }
20730
20730
  const errors = yield res.json();
20731
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20731
20732
  return { success: false, errors };
20732
20733
  } catch (e) {
20733
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20734
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20734
20735
  return { success: false, errors: [e] };
20735
20736
  }
20736
20737
  });
20737
20738
  const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20738
- var _a, _b;
20739
+ var _a, _b, _c;
20739
20740
  const { environment, customBaseUrl } = options;
20740
20741
  try {
20741
20742
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20747,14 +20748,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20747
20748
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20748
20749
  }
20749
20750
  const errors = yield res.json();
20751
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20750
20752
  return { success: false, errors };
20751
20753
  } catch (e) {
20752
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20754
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20753
20755
  return { success: false, errors: [e] };
20754
20756
  }
20755
20757
  });
20756
20758
  const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
20757
- var _a, _b;
20759
+ var _a, _b, _c;
20758
20760
  const { environment, customBaseUrl } = options;
20759
20761
  try {
20760
20762
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20766,9 +20768,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20766
20768
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20767
20769
  }
20768
20770
  const errors = yield res.json();
20771
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20769
20772
  return { success: false, errors };
20770
20773
  } catch (e) {
20771
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20774
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20772
20775
  return { success: false, errors: [e] };
20773
20776
  }
20774
20777
  });
@@ -20777,7 +20780,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20777
20780
  productStrings,
20778
20781
  messageHistory
20779
20782
  }) {
20780
- var _a, _b;
20783
+ var _a, _b, _c;
20781
20784
  const { environment, customBaseUrl } = options;
20782
20785
  try {
20783
20786
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps2(__spreadValues2({}, defaultConfig), {
@@ -20789,9 +20792,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20789
20792
  return __spreadProps2(__spreadValues2({}, data), { success: true });
20790
20793
  }
20791
20794
  const errors = yield res.json();
20795
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
20792
20796
  return { success: false, errors };
20793
20797
  } catch (e) {
20794
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
20798
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
20795
20799
  return { success: false, errors: [e] };
20796
20800
  }
20797
20801
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "main": "dist/lupaSearch.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/src/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@getlupa/client-sdk": "^1.3.4",
23
- "@getlupa/vue": "0.3.5",
23
+ "@getlupa/vue": "0.3.6",
24
24
  "@rushstack/eslint-patch": "^1.3.2",
25
25
  "@tsconfig/node18": "^2.0.1",
26
26
  "@types/jsdom": "^21.1.1",