@opengeoweb/api 6.0.1 → 6.0.2

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/index.esm.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
@@ -409,7 +409,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
409
409
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
410
410
  step((generator = generator.apply(thisArg, _arguments || [])).next());
411
411
  });
412
- }
412
+ }
413
+
414
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
415
+ var e = new Error(message);
416
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
417
+ };
413
418
 
414
419
  var generateRandomId = function generateRandomId() {
415
420
  return "-".concat(Math.random().toString(36).substr(2, 9));
package/package.json CHANGED
@@ -1,20 +1,19 @@
1
1
  {
2
2
  "name": "@opengeoweb/api",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "GeoWeb API library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
- "module": "./index.js",
11
- "main": "./index.js",
10
+ "module": "./index.esm.js",
12
11
  "type": "module",
13
- "types": "./src/index.d.ts",
12
+ "main": "./index.esm.js",
14
13
  "dependencies": {},
15
14
  "peerDependencies": {
16
- "@opengeoweb/shared": "6.0.1",
17
- "axios": "1.2.0",
15
+ "@opengeoweb/shared": "6.0.2",
16
+ "axios": "1.4.0",
18
17
  "react": "18.2.0"
19
18
  }
20
19
  }
@@ -12,7 +12,7 @@ export interface Credentials {
12
12
  keep_session_alive_at?: number;
13
13
  has_connection_issue?: boolean;
14
14
  }
15
- export declare type ApiUrls = {
15
+ export type ApiUrls = {
16
16
  baseURL?: string;
17
17
  appURL?: string;
18
18
  authTokenURL?: string;
@@ -27,4 +27,4 @@ export interface ApiModule {
27
27
  export interface CreateApiProps extends ApiModule {
28
28
  timeout?: number;
29
29
  }
30
- export declare type CreateApiFn = (props: CreateApiProps) => void;
30
+ export type CreateApiFn = (props: CreateApiProps) => void;
@@ -17,6 +17,6 @@ export declare const refreshAccessToken: ({ auth, config: { authTokenURL, authCl
17
17
  export declare const refreshAccessTokenAndSetAuthContext: ({ auth, onSetAuth, config, timeout, }: CreateApiProps) => Promise<void>;
18
18
  export declare const createApiInstance: ({ auth, onSetAuth, config: { baseURL, authTokenURL, authClientId, appURL }, timeout, }: CreateApiProps) => AxiosInstance;
19
19
  export declare const createNonAuthApiInstance: ({ config: { baseURL }, timeout, }: CreateApiProps) => AxiosInstance;
20
- export declare const fakeApiRequest: (signal?: AbortController | undefined) => Promise<void>;
20
+ export declare const fakeApiRequest: (signal?: AbortController) => Promise<void>;
21
21
  export declare const createFakeApiInstance: () => AxiosInstance;
22
22
  export declare const getCurrentTimeInSeconds: () => number;
@@ -1,5 +1,5 @@
1
1
  import { ConfigType } from '@opengeoweb/shared';
2
- export declare type ApiParams = string | ConfigType | {
2
+ export type ApiParams = string | ConfigType | {
3
3
  [key: string]: string | undefined;
4
4
  } | null;
5
5
  export interface ApiHookProps {
@@ -9,4 +9,4 @@ export interface ApiHookProps {
9
9
  fetchApiData?: (params: ApiParams) => Promise<void>;
10
10
  clearResults?: () => void;
11
11
  }
12
- export declare const useApi: (apiCall?: ((params?: ApiParams | undefined, id?: string | undefined) => Promise<any>) | undefined, params?: ApiParams | undefined) => ApiHookProps;
12
+ export declare const useApi: (apiCall?: ((params?: ApiParams, id?: string) => Promise<any>) | undefined, params?: ApiParams) => ApiHookProps;