@opengeoweb/api 15.3.0 → 16.0.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/index.esm.js +6 -1
- package/package.json +3 -3
- package/src/utils.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -287,6 +287,11 @@ var getHeaders = function getHeaders(auth) {
|
|
|
287
287
|
Accept: 'application/json'
|
|
288
288
|
}, auth ? [] : ['Authorization']);
|
|
289
289
|
};
|
|
290
|
+
var withJsonFormat = function withJsonFormat(url) {
|
|
291
|
+
var urlObj = new URL(url);
|
|
292
|
+
urlObj.searchParams.set('f', 'json');
|
|
293
|
+
return urlObj.toString();
|
|
294
|
+
};
|
|
290
295
|
// This function has a copy in libs/webmap-react/src/lib/edr-layer-api/api.ts. This cannot be used there due to circular dependency
|
|
291
296
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
292
297
|
var handleResponse = /*#__PURE__*/function () {
|
|
@@ -694,4 +699,4 @@ var QueryClientProviderWrapper = function QueryClientProviderWrapper(_ref) {
|
|
|
694
699
|
var API_NAMESPACE = 'api';
|
|
695
700
|
// Initialize and create provider if needed
|
|
696
701
|
|
|
697
|
-
export { API_NAMESPACE, AirmetPhenomena, CloudLevelUnits, Direction, LevelUnits, MovementUnit, ProductStatus, QueryClientProviderWrapper, SigmetPhenomena, VisibilityCause, WindUnit, configureLibraryDefaults, createTestQueryClient, getHeaders, getQueryClient, handleResponse, makeMockApiCall, optimisticUpdate, resetQueryClient, setQueryClient, useAuthQuery };
|
|
702
|
+
export { API_NAMESPACE, AirmetPhenomena, CloudLevelUnits, Direction, LevelUnits, MovementUnit, ProductStatus, QueryClientProviderWrapper, SigmetPhenomena, VisibilityCause, WindUnit, configureLibraryDefaults, createTestQueryClient, getHeaders, getQueryClient, handleResponse, makeMockApiCall, optimisticUpdate, resetQueryClient, setQueryClient, useAuthQuery, withJsonFormat };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "GeoWeb API library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/authentication": "
|
|
12
|
-
"@opengeoweb/store": "
|
|
11
|
+
"@opengeoweb/authentication": "16.0.0",
|
|
12
|
+
"@opengeoweb/store": "16.0.0",
|
|
13
13
|
"lodash": "^4.17.21",
|
|
14
14
|
"@tanstack/react-query": "^5.85.5",
|
|
15
15
|
"@tanstack/query-core": "^5.79.0",
|
package/src/utils.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MutationOptions, QueryClient, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import type { Credentials } from '@opengeoweb/authentication';
|
|
3
3
|
export declare const getHeaders: (auth?: Credentials) => HeadersInit;
|
|
4
|
+
export declare const withJsonFormat: (url: string) => string;
|
|
4
5
|
export declare const handleResponse: (response: Response) => Promise<any>;
|
|
5
6
|
export declare const useAuthQuery: <T>(queryKey: string[], queryFn: (auth: Credentials) => Promise<T>, disabled?: boolean, refetchInterval?: number | false) => UseQueryResult<T>;
|
|
6
7
|
export declare const optimisticUpdate: <U extends {
|