@react-pakistan/util-functions 1.23.26 → 1.23.27

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.
@@ -1,7 +1,7 @@
1
- export interface fetchSupabaseImageArgs {
1
+ export interface fetchSupabasePrivateImageArgs {
2
2
  apikey: string;
3
3
  callback: (url: string) => void;
4
4
  fetchUrl: string;
5
5
  token: string;
6
6
  }
7
- export declare const fetchSupabaseImage: ({ apikey, callback, fetchUrl, token, }: fetchSupabaseImageArgs) => Promise<void>;
7
+ export declare const fetchSupabasePrivateImage: ({ apikey, callback, fetchUrl, token, }: fetchSupabasePrivateImageArgs) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /* eslint-disable no-console */
2
+ /* eslint-disable @typescript-eslint/type-annotation-spacing */
3
3
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
4
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
5
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  });
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.fetchSupabaseImage = void 0;
13
+ exports.fetchSupabasePrivateImage = void 0;
14
14
  const constants_1 = require("../constants");
15
- const fetchSupabaseImage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ apikey, callback, fetchUrl, token, }) {
15
+ const fetchSupabasePrivateImage = (_a) => __awaiter(void 0, [_a], void 0, function* ({ apikey, callback, fetchUrl, token, }) {
16
16
  const response = yield fetch(fetchUrl, {
17
17
  method: constants_1.API_METHODS.GET,
18
18
  headers: {
@@ -26,8 +26,5 @@ const fetchSupabaseImage = (_a) => __awaiter(void 0, [_a], void 0, function* ({
26
26
  const url = URL.createObjectURL(blob);
27
27
  callback(url);
28
28
  }
29
- else {
30
- console.error(`Error fetching image: ${response.statusText}`);
31
- }
32
29
  });
33
- exports.fetchSupabaseImage = fetchSupabaseImage;
30
+ exports.fetchSupabasePrivateImage = fetchSupabasePrivateImage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.23.26",
3
+ "version": "1.23.27",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {