@getlupa/vue 0.3.3 → 0.3.4

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.
@@ -16086,9 +16086,11 @@ const getApiUrl = (environment, customBaseUrl) => {
16086
16086
  return Env[environment] || Env["production"];
16087
16087
  };
16088
16088
  const suggestSearchChatPhrases = (options, request) => __async(exports, null, function* () {
16089
+ var _a;
16089
16090
  const { environment, customBaseUrl } = options;
16090
16091
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps(__spreadValues({}, defaultConfig), {
16091
- body: JSON.stringify(request)
16092
+ body: JSON.stringify(request),
16093
+ headers: (_a = options.customHeaders) != null ? _a : {}
16092
16094
  }));
16093
16095
  if (res.status < 400) {
16094
16096
  const data = yield res.json();
@@ -16098,9 +16100,11 @@ const suggestSearchChatPhrases = (options, request) => __async(exports, null, fu
16098
16100
  return { success: false, errors };
16099
16101
  });
16100
16102
  const suggestPhraseAlternatives = (_0, _1) => __async(exports, [_0, _1], function* (options, { phrases }) {
16103
+ var _a;
16101
16104
  const { environment, customBaseUrl } = options;
16102
16105
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps(__spreadValues({}, defaultConfig), {
16103
- body: JSON.stringify({ phrases })
16106
+ body: JSON.stringify({ phrases }),
16107
+ headers: (_a = options.customHeaders) != null ? _a : {}
16104
16108
  }));
16105
16109
  if (res.status < 400) {
16106
16110
  const data = yield res.json();
@@ -16110,9 +16114,11 @@ const suggestPhraseAlternatives = (_0, _1) => __async(exports, [_0, _1], functio
16110
16114
  return { success: false, errors };
16111
16115
  });
16112
16116
  const suggestSimplifiedPhrases = (_0, _1) => __async(exports, [_0, _1], function* (options, { phrases }) {
16117
+ var _a;
16113
16118
  const { environment, customBaseUrl } = options;
16114
16119
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps(__spreadValues({}, defaultConfig), {
16115
- body: JSON.stringify({ phrases })
16120
+ body: JSON.stringify({ phrases }),
16121
+ headers: (_a = options.customHeaders) != null ? _a : {}
16116
16122
  }));
16117
16123
  if (res.status < 400) {
16118
16124
  const data = yield res.json();
@@ -16127,9 +16133,11 @@ const suggestBestProductMatches = (_0, _1) => __async(exports, [_0, _1], functio
16127
16133
  productStrings,
16128
16134
  messageHistory
16129
16135
  }) {
16136
+ var _a;
16130
16137
  const { environment, customBaseUrl } = options;
16131
16138
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps(__spreadValues({}, defaultConfig), {
16132
- body: JSON.stringify({ initialQuery, messageHistory, productStrings })
16139
+ body: JSON.stringify({ initialQuery, messageHistory, productStrings }),
16140
+ headers: (_a = options.customHeaders) != null ? _a : {}
16133
16141
  }));
16134
16142
  if (res.status < 400) {
16135
16143
  const data = yield res.json();
@@ -16084,9 +16084,11 @@ const getApiUrl = (environment, customBaseUrl) => {
16084
16084
  return Env[environment] || Env["production"];
16085
16085
  };
16086
16086
  const suggestSearchChatPhrases = (options, request) => __async(void 0, null, function* () {
16087
+ var _a;
16087
16088
  const { environment, customBaseUrl } = options;
16088
16089
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/`, __spreadProps(__spreadValues({}, defaultConfig), {
16089
- body: JSON.stringify(request)
16090
+ body: JSON.stringify(request),
16091
+ headers: (_a = options.customHeaders) != null ? _a : {}
16090
16092
  }));
16091
16093
  if (res.status < 400) {
16092
16094
  const data = yield res.json();
@@ -16096,9 +16098,11 @@ const suggestSearchChatPhrases = (options, request) => __async(void 0, null, fun
16096
16098
  return { success: false, errors };
16097
16099
  });
16098
16100
  const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
16101
+ var _a;
16099
16102
  const { environment, customBaseUrl } = options;
16100
16103
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/phraseAlternatives`, __spreadProps(__spreadValues({}, defaultConfig), {
16101
- body: JSON.stringify({ phrases })
16104
+ body: JSON.stringify({ phrases }),
16105
+ headers: (_a = options.customHeaders) != null ? _a : {}
16102
16106
  }));
16103
16107
  if (res.status < 400) {
16104
16108
  const data = yield res.json();
@@ -16108,9 +16112,11 @@ const suggestPhraseAlternatives = (_0, _1) => __async(void 0, [_0, _1], function
16108
16112
  return { success: false, errors };
16109
16113
  });
16110
16114
  const suggestSimplifiedPhrases = (_0, _1) => __async(void 0, [_0, _1], function* (options, { phrases }) {
16115
+ var _a;
16111
16116
  const { environment, customBaseUrl } = options;
16112
16117
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/simplify`, __spreadProps(__spreadValues({}, defaultConfig), {
16113
- body: JSON.stringify({ phrases })
16118
+ body: JSON.stringify({ phrases }),
16119
+ headers: (_a = options.customHeaders) != null ? _a : {}
16114
16120
  }));
16115
16121
  if (res.status < 400) {
16116
16122
  const data = yield res.json();
@@ -16125,9 +16131,11 @@ const suggestBestProductMatches = (_0, _1) => __async(void 0, [_0, _1], function
16125
16131
  productStrings,
16126
16132
  messageHistory
16127
16133
  }) {
16134
+ var _a;
16128
16135
  const { environment, customBaseUrl } = options;
16129
16136
  const res = yield fetch(`${getApiUrl(environment, customBaseUrl)}chat/bestProducts`, __spreadProps(__spreadValues({}, defaultConfig), {
16130
- body: JSON.stringify({ initialQuery, messageHistory, productStrings })
16137
+ body: JSON.stringify({ initialQuery, messageHistory, productStrings }),
16138
+ headers: (_a = options.customHeaders) != null ? _a : {}
16131
16139
  }));
16132
16140
  if (res.status < 400) {
16133
16141
  const data = yield res.json();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/vue",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "main": "dist/lupaSearch.js",
5
5
  "module": "dist/lupaSearch.mjs",
6
6
  "types": "dist/src/index.d.ts",