@ventlio/tanstack-query 0.5.12 → 0.5.14
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/config/bootstrapQueryRequest.d.ts +6 -0
- package/dist/config/useEnvironmentVariables.d.ts +4 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/result.d.ts +23 -0
- package/dist/index.mjs +368 -95
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/@tanstack/react-store/dist/esm/index.js +1 -1
- package/dist/node_modules/{@tanstack/react-store/node_modules/use-sync-external-store → use-sync-external-store}/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +1 -0
- package/dist/node_modules/{@tanstack/react-store/node_modules/use-sync-external-store → use-sync-external-store}/cjs/use-sync-external-store-shim/with-selector.production.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +1 -0
- package/dist/node_modules/{@tanstack/react-store/node_modules/use-sync-external-store → use-sync-external-store}/cjs/use-sync-external-store-shim.development.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/{@tanstack/react-store/node_modules/use-sync-external-store → use-sync-external-store}/cjs/use-sync-external-store-shim.production.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/{@tanstack/react-store/node_modules/use-sync-external-store → use-sync-external-store}/shim/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/node_modules/{@tanstack/react-store/node_modules/use-sync-external-store → use-sync-external-store}/shim/with-selector.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +1 -0
- package/dist/queries/useGetRequest.d.ts +12 -2
- package/dist/request/make-request.d.ts +12 -1
- package/dist/src/config/bootstrapQueryRequest.js +41 -1
- package/dist/src/config/bootstrapQueryRequest.js.map +1 -1
- package/dist/src/config/useEnvironmentVariables.js +35 -4
- package/dist/src/config/useEnvironmentVariables.js.map +1 -1
- package/dist/src/helpers/result.js +59 -0
- package/dist/src/helpers/result.js.map +1 -0
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/model/useQueryModel.js +1 -1
- package/dist/src/queries/useDeleteRequest.js +19 -14
- package/dist/src/queries/useDeleteRequest.js.map +1 -1
- package/dist/src/queries/useGetInfiniteRequest.js +17 -12
- package/dist/src/queries/useGetInfiniteRequest.js.map +1 -1
- package/dist/src/queries/useGetRequest.js +86 -28
- package/dist/src/queries/useGetRequest.js.map +1 -1
- package/dist/src/queries/usePatchRequest.js +19 -14
- package/dist/src/queries/usePatchRequest.js.map +1 -1
- package/dist/src/queries/usePostRequest.js +18 -13
- package/dist/src/queries/usePostRequest.js.map +1 -1
- package/dist/src/request/make-request.js +75 -6
- package/dist/src/request/make-request.js.map +1 -1
- package/dist/types/index.d.ts +24 -5
- package/package.json +2 -4
- package/src/config/bootstrapQueryRequest.ts +47 -2
- package/src/config/useEnvironmentVariables.ts +42 -4
- package/src/helpers/index.ts +1 -0
- package/src/helpers/result.ts +65 -0
- package/src/model/useQueryModel.ts +2 -2
- package/src/queries/useDeleteRequest.ts +18 -20
- package/src/queries/useGetInfiniteRequest.ts +17 -17
- package/src/queries/useGetRequest.ts +109 -33
- package/src/queries/usePatchRequest.ts +19 -16
- package/src/queries/usePostRequest.ts +18 -15
- package/src/queries/usePutRequest.ts +16 -15
- package/src/request/make-request.ts +112 -15
- package/src/types/index.ts +38 -4
- package/dist/node_modules/@tanstack/react-store/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node_modules/@tanstack/react-store/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node_modules/@tanstack/react-store/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node_modules/@tanstack/react-store/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/@tanstack/react-store/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node_modules/@tanstack/react-store/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import 'url-search-params-polyfill';
|
|
3
3
|
import type { BootstrapConfig } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Bootstrap the query request system with configuration options
|
|
6
|
+
*
|
|
7
|
+
* @param queryClient - TanStack Query client instance
|
|
8
|
+
* @param options - Configuration options
|
|
9
|
+
*/
|
|
4
10
|
export declare const bootstrapQueryRequest: (queryClient: QueryClient, options?: BootstrapConfig) => Promise<void>;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the value at path of object. If the resolved value is a function,
|
|
3
|
+
* it's invoked with the this binding of its parent object and its result is returned.
|
|
4
|
+
* Similar to lodash.result functionality.
|
|
5
|
+
*
|
|
6
|
+
* @param object - The object to query
|
|
7
|
+
* @param path - The path of the property to get (supports dot notation)
|
|
8
|
+
* @param defaultValue - The value returned if the resolved value is undefined
|
|
9
|
+
* @returns The resolved value
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const obj = { a: { b: { c: 'value' } } };
|
|
13
|
+
* result(obj, 'a.b.c'); // => 'value'
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const obj = { a: { b: () => 'computed' } };
|
|
17
|
+
* result(obj, 'a.b'); // => 'computed'
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* result({}, 'a.b.c', 'default'); // => 'default'
|
|
21
|
+
*/
|
|
22
|
+
export declare function result<T = any>(object: any, path: string | string[], defaultValue?: T): T | undefined;
|
|
23
|
+
export default result;
|