@swan-admin/swan-ai-measurements 1.0.73 → 1.0.75

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.
@@ -59,6 +59,7 @@ class FileUpload {
59
59
  }
60
60
  uploadFile(_a) {
61
61
  return __awaiter(this, arguments, void 0, function* ({ file, arrayMetaData, scanId }) {
62
+ console.log(UPPY_FILE_UPLOAD_ENDPOINT);
62
63
  if (!checkParameters(file, arrayMetaData, scanId)) {
63
64
  throw new Error(REQUIRED_MESSAGE);
64
65
  }
package/dist/esm/utils.js CHANGED
@@ -12,6 +12,7 @@ import { APP_AUTH_BASE_URL, requiredMetaData } from "./constants.js";
12
12
  export function fetchData(options) {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  const { path, body, queryParams, baseUrl = APP_AUTH_BASE_URL, apiKey = "", headers = { "X-Api-Key": apiKey, "Content-Type": "application/json" }, } = options;
15
+ console.log(body, "body", path, "path");
15
16
  const apiUrl = `${baseUrl}${path}${queryParams ? `?${new URLSearchParams(queryParams)}` : ""}`;
16
17
  try {
17
18
  const res = yield axios.post(apiUrl, body, { headers });
@@ -11,6 +11,7 @@ class FileUpload {
11
11
  this.#accessKey = accessKey;
12
12
  }
13
13
  async uploadFile({ file, arrayMetaData, scanId }) {
14
+ console.log(constants_js_1.UPPY_FILE_UPLOAD_ENDPOINT);
14
15
  if (!(0, utils_js_1.checkParameters)(file, arrayMetaData, scanId)) {
15
16
  throw new Error(constants_js_1.REQUIRED_MESSAGE);
16
17
  }
package/dist/utils.js CHANGED
@@ -8,6 +8,7 @@ const axios_1 = __importDefault(require("axios"));
8
8
  const constants_js_1 = require("./constants.js");
9
9
  async function fetchData(options) {
10
10
  const { path, body, queryParams, baseUrl = constants_js_1.APP_AUTH_BASE_URL, apiKey = "", headers = { "X-Api-Key": apiKey, "Content-Type": "application/json" }, } = options;
11
+ console.log(body, "body", path, "path");
11
12
  const apiUrl = `${baseUrl}${path}${queryParams ? `?${new URLSearchParams(queryParams)}` : ""}`;
12
13
  try {
13
14
  const res = await axios_1.default.post(apiUrl, body, { headers });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-admin/swan-ai-measurements",
3
- "version": "1.0.73",
3
+ "version": "1.0.75",
4
4
  "description": "provides ai measurement suggestion",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/fileUpload.ts CHANGED
@@ -29,6 +29,8 @@ export default class FileUpload {
29
29
  }
30
30
 
31
31
  async uploadFile({ file, arrayMetaData, scanId }: UploadOptions) {
32
+ console.log(UPPY_FILE_UPLOAD_ENDPOINT);
33
+
32
34
  if (!checkParameters(file, arrayMetaData, scanId)) {
33
35
  throw new Error(REQUIRED_MESSAGE);
34
36
  }