@getlupa/vue 0.3.5 → 0.3.6

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.
@@ -16087,7 +16087,7 @@ const getApiUrl = (environment, customBaseUrl) => {
16087
16087
  return Env[environment] || Env["production"];
16088
16088
  };
16089
16089
  const suggestSearchChatPhrases = (options, request) => __async(exports, null, function* () {
16090
- var _a, _b;
16090
+ var _a, _b, _c;
16091
16091
  const { environment, customBaseUrl } = options;
16092
16092
  try {
16093
16093
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16099,14 +16099,15 @@ const suggestSearchChatPhrases = (options, request) => __async(exports, null, fu
16099
16099
  return __spreadProps(__spreadValues({}, data), { success: true });
16100
16100
  }
16101
16101
  const errors = yield res.json();
16102
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16102
16103
  return { success: false, errors };
16103
16104
  } catch (e) {
16104
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16105
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16105
16106
  return { success: false, errors: [e] };
16106
16107
  }
16107
16108
  });
16108
16109
  const suggestPhraseAlternatives = (_0, _1) => __async(exports, [_0, _1], function* (options, { phrases }) {
16109
- var _a, _b;
16110
+ var _a, _b, _c;
16110
16111
  const { environment, customBaseUrl } = options;
16111
16112
  try {
16112
16113
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16118,14 +16119,15 @@ const suggestPhraseAlternatives = (_0, _1) => __async(exports, [_0, _1], functio
16118
16119
  return __spreadProps(__spreadValues({}, data), { success: true });
16119
16120
  }
16120
16121
  const errors = yield res.json();
16122
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16121
16123
  return { success: false, errors };
16122
16124
  } catch (e) {
16123
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16125
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16124
16126
  return { success: false, errors: [e] };
16125
16127
  }
16126
16128
  });
16127
16129
  const suggestSimplifiedPhrases = (_0, _1) => __async(exports, [_0, _1], function* (options, { phrases }) {
16128
- var _a, _b;
16130
+ var _a, _b, _c;
16129
16131
  const { environment, customBaseUrl } = options;
16130
16132
  try {
16131
16133
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16137,9 +16139,10 @@ const suggestSimplifiedPhrases = (_0, _1) => __async(exports, [_0, _1], function
16137
16139
  return __spreadProps(__spreadValues({}, data), { success: true });
16138
16140
  }
16139
16141
  const errors = yield res.json();
16142
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16140
16143
  return { success: false, errors };
16141
16144
  } catch (e) {
16142
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16145
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16143
16146
  return { success: false, errors: [e] };
16144
16147
  }
16145
16148
  });
@@ -16148,7 +16151,7 @@ const suggestBestProductMatches = (_0, _1) => __async(exports, [_0, _1], functio
16148
16151
  productStrings,
16149
16152
  messageHistory
16150
16153
  }) {
16151
- var _a, _b;
16154
+ var _a, _b, _c;
16152
16155
  const { environment, customBaseUrl } = options;
16153
16156
  try {
16154
16157
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16160,9 +16163,10 @@ const suggestBestProductMatches = (_0, _1) => __async(exports, [_0, _1], functio
16160
16163
  return __spreadProps(__spreadValues({}, data), { success: true });
16161
16164
  }
16162
16165
  const errors = yield res.json();
16166
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16163
16167
  return { success: false, errors };
16164
16168
  } catch (e) {
16165
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16169
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16166
16170
  return { success: false, errors: [e] };
16167
16171
  }
16168
16172
  });
@@ -16085,7 +16085,7 @@ const getApiUrl = (environment, customBaseUrl) => {
16085
16085
  return Env[environment] || Env["production"];
16086
16086
  };
16087
16087
  const suggestSearchChatPhrases = (options, request) => __async(void 0, null, function* () {
16088
- var _a, _b;
16088
+ var _a, _b, _c;
16089
16089
  const { environment, customBaseUrl } = options;
16090
16090
  try {
16091
16091
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16097,14 +16097,15 @@ const suggestSearchChatPhrases = (options, request) => __async(void 0, null, fun
16097
16097
  return __spreadProps(__spreadValues({}, data), { success: true });
16098
16098
  }
16099
16099
  const errors = yield res.json();
16100
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16100
16101
  return { success: false, errors };
16101
16102
  } catch (e) {
16102
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16103
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16103
16104
  return { success: false, errors: [e] };
16104
16105
  }
16105
16106
  });
16106
16107
  const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
16107
- var _a, _b;
16108
+ var _a, _b, _c;
16108
16109
  const { environment, customBaseUrl } = options;
16109
16110
  try {
16110
16111
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16116,14 +16117,15 @@ const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function
16116
16117
  return __spreadProps(__spreadValues({}, data), { success: true });
16117
16118
  }
16118
16119
  const errors = yield res.json();
16120
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16119
16121
  return { success: false, errors };
16120
16122
  } catch (e) {
16121
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16123
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16122
16124
  return { success: false, errors: [e] };
16123
16125
  }
16124
16126
  });
16125
16127
  const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
16126
- var _a, _b;
16128
+ var _a, _b, _c;
16127
16129
  const { environment, customBaseUrl } = options;
16128
16130
  try {
16129
16131
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16135,9 +16137,10 @@ const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function*
16135
16137
  return __spreadProps(__spreadValues({}, data), { success: true });
16136
16138
  }
16137
16139
  const errors = yield res.json();
16140
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16138
16141
  return { success: false, errors };
16139
16142
  } catch (e) {
16140
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16143
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16141
16144
  return { success: false, errors: [e] };
16142
16145
  }
16143
16146
  });
@@ -16146,7 +16149,7 @@ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function
16146
16149
  productStrings,
16147
16150
  messageHistory
16148
16151
  }) {
16149
- var _a, _b;
16152
+ var _a, _b, _c;
16150
16153
  const { environment, customBaseUrl } = options;
16151
16154
  try {
16152
16155
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps(__spreadValues({}, defaultConfig), {
@@ -16158,9 +16161,10 @@ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function
16158
16161
  return __spreadProps(__spreadValues({}, data), { success: true });
16159
16162
  }
16160
16163
  const errors = yield res.json();
16164
+ (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, errors);
16161
16165
  return { success: false, errors };
16162
16166
  } catch (e) {
16163
- (_b = options == null ? void 0 : options.onError) == null ? void 0 : _b.call(options, e);
16167
+ (_c = options == null ? void 0 : options.onError) == null ? void 0 : _c.call(options, e);
16164
16168
  return { success: false, errors: [e] };
16165
16169
  }
16166
16170
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/vue",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "main": "dist/lupaSearch.js",
5
5
  "module": "dist/lupaSearch.mjs",
6
6
  "types": "dist/src/index.d.ts",