@wix/vibe-forms-app-plugin 0.29.0 → 0.32.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.
package/dist/index.cjs CHANGED
@@ -158931,15 +158931,13 @@ var callWixAPI = async ({
158931
158931
  env.logger.warn("[wix-apis] WIX_TOKEN is not set");
158932
158932
  }
158933
158933
  try {
158934
+ const bodyString = method === "GET" ? void 0 : JSON.stringify(body);
158934
158935
  env.logger.debug("[wix-apis] Calling Wix API...", {
158935
158936
  url,
158936
158937
  method,
158937
158938
  additionalHeaders,
158938
158939
  hasWixToken: !!env.WIX_TOKEN,
158939
- wixToken: env.WIX_TOKEN,
158940
- hasEnvToken: !!process.env.WIX_TOKEN,
158941
- envToken: process.env.WIX_TOKEN,
158942
- wixTokenLength: env.WIX_TOKEN?.length || 0
158940
+ body: bodyString
158943
158941
  });
158944
158942
  const response = await fetch(url, {
158945
158943
  method,
@@ -158948,7 +158946,12 @@ var callWixAPI = async ({
158948
158946
  Authorization: env.WIX_TOKEN,
158949
158947
  ...additionalHeaders
158950
158948
  },
158951
- ...method === "GET" ? {} : { body: JSON.stringify(body) }
158949
+ ...method === "GET" ? {} : { body: bodyString }
158950
+ });
158951
+ env.logger.debug("[wix-apis] Wix API response...", {
158952
+ url,
158953
+ method,
158954
+ response
158952
158955
  });
158953
158956
  return await handleWixAPIResponse(response, env.logger, {
158954
158957
  url,
@@ -159014,7 +159017,7 @@ async function generateForm(prompt, env) {
159014
159017
  `[${VERTICAL_NAME}-plugin-generateForm] Generating form by prompt: ${prompt}`
159015
159018
  );
159016
159019
  const response = await callWixAPI({
159017
- url: "https://bo.wix.com/_api/form-ai-generation-service/v1/generate-form",
159020
+ url: "https://www.wixapis.com/forms/v1/generate-form",
159018
159021
  method: "POST",
159019
159022
  body: { prompt },
159020
159023
  additionalHeaders: {