@tramvai/tokens-react-query 2.20.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/README.md +7 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.es.js +20 -0
- package/lib/index.js +27 -0
- package/package.json +30 -0
package/README.md
ADDED
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ActionConditionsParameters } from '@tramvai/core';
|
|
2
|
+
import type { QueryClient, DefaultOptions } from 'react-query';
|
|
3
|
+
import type { DehydratedState } from 'react-query/hydration';
|
|
4
|
+
declare module 'react-query' {
|
|
5
|
+
interface QueryOptions {
|
|
6
|
+
tramvaiOptions?: {
|
|
7
|
+
conditions?: ActionConditionsParameters;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* [react-query client](https://react-query.tanstack.com/reference/QueryClient)
|
|
14
|
+
*/
|
|
15
|
+
export declare const QUERY_CLIENT_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<QueryClient>;
|
|
16
|
+
/**
|
|
17
|
+
* @description
|
|
18
|
+
* [default options for the react-query](https://react-query.tanstack.com/guides/important-defaults)
|
|
19
|
+
*/
|
|
20
|
+
export declare const QUERY_CLIENT_DEFAULT_OPTIONS_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<DefaultOptions<unknown>>;
|
|
21
|
+
/**
|
|
22
|
+
* @description
|
|
23
|
+
* [react-query state](https://react-query.tanstack.com/reference/hydration/dehydrate) that was initialized on the server
|
|
24
|
+
*/
|
|
25
|
+
export declare const QUERY_CLIENT_DEHYDRATED_STATE_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<DehydratedState>;
|
|
26
|
+
export declare const QUERY_DEHYDRATE_STATE_NAME_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<string>;
|
package/lib/index.es.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createToken } from '@tinkoff/dippy';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* [react-query client](https://react-query.tanstack.com/reference/QueryClient)
|
|
6
|
+
*/
|
|
7
|
+
const QUERY_CLIENT_TOKEN = createToken('reactQuery queryClient');
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* [default options for the react-query](https://react-query.tanstack.com/guides/important-defaults)
|
|
11
|
+
*/
|
|
12
|
+
const QUERY_CLIENT_DEFAULT_OPTIONS_TOKEN = createToken('reactQuery queryClientDefaultOptions');
|
|
13
|
+
/**
|
|
14
|
+
* @description
|
|
15
|
+
* [react-query state](https://react-query.tanstack.com/reference/hydration/dehydrate) that was initialized on the server
|
|
16
|
+
*/
|
|
17
|
+
const QUERY_CLIENT_DEHYDRATED_STATE_TOKEN = createToken('reactQuery queryClientDehydratedState');
|
|
18
|
+
const QUERY_DEHYDRATE_STATE_NAME_TOKEN = createToken('reactQuery dehydrate state name');
|
|
19
|
+
|
|
20
|
+
export { QUERY_CLIENT_DEFAULT_OPTIONS_TOKEN, QUERY_CLIENT_DEHYDRATED_STATE_TOKEN, QUERY_CLIENT_TOKEN, QUERY_DEHYDRATE_STATE_NAME_TOKEN };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var dippy = require('@tinkoff/dippy');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @description
|
|
9
|
+
* [react-query client](https://react-query.tanstack.com/reference/QueryClient)
|
|
10
|
+
*/
|
|
11
|
+
const QUERY_CLIENT_TOKEN = dippy.createToken('reactQuery queryClient');
|
|
12
|
+
/**
|
|
13
|
+
* @description
|
|
14
|
+
* [default options for the react-query](https://react-query.tanstack.com/guides/important-defaults)
|
|
15
|
+
*/
|
|
16
|
+
const QUERY_CLIENT_DEFAULT_OPTIONS_TOKEN = dippy.createToken('reactQuery queryClientDefaultOptions');
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* [react-query state](https://react-query.tanstack.com/reference/hydration/dehydrate) that was initialized on the server
|
|
20
|
+
*/
|
|
21
|
+
const QUERY_CLIENT_DEHYDRATED_STATE_TOKEN = dippy.createToken('reactQuery queryClientDehydratedState');
|
|
22
|
+
const QUERY_DEHYDRATE_STATE_NAME_TOKEN = dippy.createToken('reactQuery dehydrate state name');
|
|
23
|
+
|
|
24
|
+
exports.QUERY_CLIENT_DEFAULT_OPTIONS_TOKEN = QUERY_CLIENT_DEFAULT_OPTIONS_TOKEN;
|
|
25
|
+
exports.QUERY_CLIENT_DEHYDRATED_STATE_TOKEN = QUERY_CLIENT_DEHYDRATED_STATE_TOKEN;
|
|
26
|
+
exports.QUERY_CLIENT_TOKEN = QUERY_CLIENT_TOKEN;
|
|
27
|
+
exports.QUERY_DEHYDRATE_STATE_NAME_TOKEN = QUERY_DEHYDRATE_STATE_NAME_TOKEN;
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tramvai/tokens-react-query",
|
|
3
|
+
"version": "2.20.0",
|
|
4
|
+
"description": "Tramvai tokens for @tramvai/module-react-query",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "lib/index.es.js",
|
|
7
|
+
"typings": "lib/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib"
|
|
10
|
+
],
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git@github.com:Tinkoff/tramvai.git"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tramvai-build --for-publish",
|
|
18
|
+
"watch": "tsc -w",
|
|
19
|
+
"build-for-publish": "true"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"react-query": "^3.35.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@tinkoff/dippy": "0.8.2",
|
|
26
|
+
"@tramvai/core": "2.20.0",
|
|
27
|
+
"tslib": "^2.0.3"
|
|
28
|
+
},
|
|
29
|
+
"license": "Apache-2.0"
|
|
30
|
+
}
|