@openapi-qraft/tanstack-query-react-types 2.0.0-next.10
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/CHANGELOG.md +7 -0
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperation.d.ts +98 -0
- package/dist/types/service-operation/ServiceOperation.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationCancelQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationFetchInfiniteQuery.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationFetchQuery.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationGetInfiniteQueryData.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts +15 -0
- package/dist/types/service-operation/ServiceOperationGetQueriesData.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationGetQueryData.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts +10 -0
- package/dist/types/service-operation/ServiceOperationGetQueryState.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationInvalidateQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationIsFetchingQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationIsMutatingQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationMutationFn.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationMutationFn.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationQueryFn.d.ts +12 -0
- package/dist/types/service-operation/ServiceOperationQueryFn.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationRefetchQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationRemoveQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationResetQueries.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationResetQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationSetInfiniteQueryData.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationSetQueriesData.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts +12 -0
- package/dist/types/service-operation/ServiceOperationUseInfiniteQuery.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationUseIsFetchingQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts +8 -0
- package/dist/types/service-operation/ServiceOperationUseIsMutating.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseMutation.d.ts +11 -0
- package/dist/types/service-operation/ServiceOperationUseMutation.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts +12 -0
- package/dist/types/service-operation/ServiceOperationUseMutationState.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseQueries.d.ts +12 -0
- package/dist/types/service-operation/ServiceOperationUseQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseQuery.d.ts +11 -0
- package/dist/types/service-operation/ServiceOperationUseQuery.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts +10 -0
- package/dist/types/service-operation/ServiceOperationUseSuspenseInfiniteQuery.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts +12 -0
- package/dist/types/service-operation/ServiceOperationUseSuspenseQueries.d.ts.map +1 -0
- package/dist/types/service-operation/ServiceOperationUseSuspenseQuery.d.ts +9 -0
- package/dist/types/service-operation/ServiceOperationUseSuspenseQuery.d.ts.map +1 -0
- package/dist/types/service-operation/index.d.ts +30 -0
- package/dist/types/service-operation/index.d.ts.map +1 -0
- package/dist/types/shared/AreAllOptional.d.ts +4 -0
- package/dist/types/shared/AreAllOptional.d.ts.map +1 -0
- package/dist/types/shared/FetchInfiniteQueryOptions.d.ts +54 -0
- package/dist/types/shared/FetchInfiniteQueryOptions.d.ts.map +1 -0
- package/dist/types/shared/InvalidateQueryFilters.d.ts +9 -0
- package/dist/types/shared/InvalidateQueryFilters.d.ts.map +1 -0
- package/dist/types/shared/MutationFilters.d.ts +52 -0
- package/dist/types/shared/MutationFilters.d.ts.map +1 -0
- package/dist/types/shared/OperationInfiniteData.d.ts +4 -0
- package/dist/types/shared/OperationInfiniteData.d.ts.map +1 -0
- package/dist/types/shared/PartialParameters.d.ts +13 -0
- package/dist/types/shared/PartialParameters.d.ts.map +1 -0
- package/dist/types/shared/QueryFilters.d.ts +123 -0
- package/dist/types/shared/QueryFilters.d.ts.map +1 -0
- package/dist/types/shared/RequestFn.d.ts +92 -0
- package/dist/types/shared/RequestFn.d.ts.map +1 -0
- package/dist/types/shared/ServiceOperationFetchQueryOptions.d.ts +50 -0
- package/dist/types/shared/ServiceOperationFetchQueryOptions.d.ts.map +1 -0
- package/dist/types/shared/ServiceOperationKey.d.ts +16 -0
- package/dist/types/shared/ServiceOperationKey.d.ts.map +1 -0
- package/dist/types/shared/ServiceOperationMutation.d.ts +23 -0
- package/dist/types/shared/ServiceOperationMutation.d.ts.map +1 -0
- package/dist/types/shared/ServiceOperationQuery.d.ts +25 -0
- package/dist/types/shared/ServiceOperationQuery.d.ts.map +1 -0
- package/dist/types/shared/UseQueryOptionsForUseQueries.d.ts +16 -0
- package/dist/types/shared/UseQueryOptionsForUseQueries.d.ts.map +1 -0
- package/dist/types/shared/UseQueryOptionsForUseSuspenseQuery.d.ts +13 -0
- package/dist/types/shared/UseQueryOptionsForUseSuspenseQuery.d.ts.map +1 -0
- package/dist/types/shared/WithOptional.d.ts +2 -0
- package/dist/types/shared/WithOptional.d.ts.map +1 -0
- package/dist/types/shared/index.d.ts +16 -0
- package/dist/types/shared/index.d.ts.map +1 -0
- package/package.json +48 -0
- package/src/index.ts +2 -0
- package/src/service-operation/ServiceOperation.ts +170 -0
- package/src/service-operation/ServiceOperationCancelQueries.ts +31 -0
- package/src/service-operation/ServiceOperationFetchInfiniteQuery.ts +73 -0
- package/src/service-operation/ServiceOperationFetchQuery.ts +43 -0
- package/src/service-operation/ServiceOperationGetInfiniteQueryData.ts +17 -0
- package/src/service-operation/ServiceOperationGetQueriesData.ts +47 -0
- package/src/service-operation/ServiceOperationGetQueryData.ts +16 -0
- package/src/service-operation/ServiceOperationGetQueryState.ts +28 -0
- package/src/service-operation/ServiceOperationInvalidateQueries.ts +20 -0
- package/src/service-operation/ServiceOperationIsFetchingQueries.ts +29 -0
- package/src/service-operation/ServiceOperationIsMutatingQueries.ts +31 -0
- package/src/service-operation/ServiceOperationMutationFn.ts +20 -0
- package/src/service-operation/ServiceOperationQueryFn.ts +32 -0
- package/src/service-operation/ServiceOperationRefetchQueries.ts +31 -0
- package/src/service-operation/ServiceOperationRemoveQueries.ts +29 -0
- package/src/service-operation/ServiceOperationResetQueries.ts +31 -0
- package/src/service-operation/ServiceOperationSetInfiniteQueryData.ts +20 -0
- package/src/service-operation/ServiceOperationSetQueriesData.ts +35 -0
- package/src/service-operation/ServiceOperationSetQueryData.ts +17 -0
- package/src/service-operation/ServiceOperationUseInfiniteQuery.ts +76 -0
- package/src/service-operation/ServiceOperationUseIsFetchingQueries.ts +29 -0
- package/src/service-operation/ServiceOperationUseIsMutating.ts +31 -0
- package/src/service-operation/ServiceOperationUseMutation.ts +51 -0
- package/src/service-operation/ServiceOperationUseMutationState.ts +49 -0
- package/src/service-operation/ServiceOperationUseQueries.ts +21 -0
- package/src/service-operation/ServiceOperationUseQuery.ts +51 -0
- package/src/service-operation/ServiceOperationUseSuspenseInfiniteQuery.ts +45 -0
- package/src/service-operation/ServiceOperationUseSuspenseQueries.ts +26 -0
- package/src/service-operation/ServiceOperationUseSuspenseQuery.ts +30 -0
- package/src/service-operation/index.ts +29 -0
- package/src/shared/AreAllOptional.ts +8 -0
- package/src/shared/FetchInfiniteQueryOptions.ts +109 -0
- package/src/shared/InvalidateQueryFilters.ts +19 -0
- package/src/shared/MutationFilters.ts +93 -0
- package/src/shared/OperationInfiniteData.ts +7 -0
- package/src/shared/PartialParameters.ts +12 -0
- package/src/shared/QueryFilters.ts +226 -0
- package/src/shared/RequestFn.ts +129 -0
- package/src/shared/ServiceOperationFetchQueryOptions.ts +84 -0
- package/src/shared/ServiceOperationKey.ts +20 -0
- package/src/shared/ServiceOperationMutation.ts +32 -0
- package/src/shared/ServiceOperationQuery.ts +40 -0
- package/src/shared/UseQueryOptionsForUseQueries.ts +35 -0
- package/src/shared/UseQueryOptionsForUseSuspenseQuery.ts +28 -0
- package/src/shared/WithOptional.ts +2 -0
- package/src/shared/index.ts +15 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ServiceOperationQueryKey } from './ServiceOperationKey.js';
|
|
3
|
+
import { QueriesPlaceholderDataFunction } from '@tanstack/query-core';
|
|
4
|
+
export type UseQueryOptionsForUseQueries<TSchema extends {
|
|
5
|
+
url: string;
|
|
6
|
+
method: string;
|
|
7
|
+
}, TParams, TQueryFnData, TError, TData = TQueryFnData> = Omit<UseQueryOptions<TQueryFnData, TError, TData, ServiceOperationQueryKey<TSchema, TParams>>, 'placeholderData' | 'suspense' | 'queryKey'> & ({
|
|
8
|
+
parameters: TParams;
|
|
9
|
+
placeholderData?: TQueryFnData | QueriesPlaceholderDataFunction<TQueryFnData>;
|
|
10
|
+
queryKey?: never;
|
|
11
|
+
} | {
|
|
12
|
+
queryKey: ServiceOperationQueryKey<TSchema, TParams>;
|
|
13
|
+
placeholderData?: TQueryFnData | QueriesPlaceholderDataFunction<TQueryFnData>;
|
|
14
|
+
parameters?: never;
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=UseQueryOptionsForUseQueries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseQueryOptionsForUseQueries.d.ts","sourceRoot":"","sources":["../../../src/shared/UseQueryOptionsForUseQueries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,MAAM,4BAA4B,CACtC,OAAO,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/C,OAAO,EACP,YAAY,EACZ,MAAM,EACN,KAAK,GAAG,YAAY,IAClB,IAAI,CACN,eAAe,CACb,YAAY,EACZ,MAAM,EACN,KAAK,EACL,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAC3C,EACD,iBAAiB,GAAG,UAAU,GAAG,UAAU,CAC5C,GACC,CACI;IACE,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EACZ,YAAY,GACZ,8BAA8B,CAAC,YAAY,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,QAAQ,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrD,eAAe,CAAC,EACZ,YAAY,GACZ,8BAA8B,CAAC,YAAY,CAAC,CAAC;IACjD,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ServiceOperationQueryKey } from './ServiceOperationKey.js';
|
|
3
|
+
export type UseQueryOptionsForUseSuspenseQuery<TSchema extends {
|
|
4
|
+
url: string;
|
|
5
|
+
method: string;
|
|
6
|
+
}, TParams, TQueryFnData, TError, TData = TQueryFnData> = Omit<UseQueryOptions<TQueryFnData, TError, TData, ServiceOperationQueryKey<TSchema, TParams>>, 'enabled' | 'throwOnError' | 'placeholderData' | 'queryKey'> & ({
|
|
7
|
+
parameters: TParams;
|
|
8
|
+
queryKey?: never;
|
|
9
|
+
} | {
|
|
10
|
+
queryKey: ServiceOperationQueryKey<TSchema, TParams>;
|
|
11
|
+
parameters?: never;
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=UseQueryOptionsForUseSuspenseQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UseQueryOptionsForUseSuspenseQuery.d.ts","sourceRoot":"","sources":["../../../src/shared/UseQueryOptionsForUseSuspenseQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,MAAM,MAAM,kCAAkC,CAC5C,OAAO,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/C,OAAO,EACP,YAAY,EACZ,MAAM,EACN,KAAK,GAAG,YAAY,IAClB,IAAI,CACN,eAAe,CACb,YAAY,EACZ,MAAM,EACN,KAAK,EACL,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAC3C,EACD,SAAS,GAAG,cAAc,GAAG,iBAAiB,GAAG,UAAU,CAC5D,GACC,CACI;IACE,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,QAAQ,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrD,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithOptional.d.ts","sourceRoot":"","sources":["../../../src/shared/WithOptional.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACzD,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type * from './AreAllOptional.js';
|
|
2
|
+
export type * from './FetchInfiniteQueryOptions.js';
|
|
3
|
+
export type * from './InvalidateQueryFilters.js';
|
|
4
|
+
export type * from './MutationFilters.js';
|
|
5
|
+
export type * from './OperationInfiniteData.js';
|
|
6
|
+
export type * from './PartialParameters.js';
|
|
7
|
+
export type * from './QueryFilters.js';
|
|
8
|
+
export type * from './RequestFn.js';
|
|
9
|
+
export type * from './ServiceOperationFetchQueryOptions.js';
|
|
10
|
+
export type * from './ServiceOperationKey.js';
|
|
11
|
+
export type * from './ServiceOperationMutation.js';
|
|
12
|
+
export type * from './ServiceOperationQuery.js';
|
|
13
|
+
export type * from './UseQueryOptionsForUseQueries.js';
|
|
14
|
+
export type * from './UseQueryOptionsForUseSuspenseQuery.js';
|
|
15
|
+
export type * from './WithOptional.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,qBAAqB,CAAC;AACzC,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,sBAAsB,CAAC;AAC1C,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,gBAAgB,CAAC;AACpC,mBAAmB,wCAAwC,CAAC;AAC5D,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,+BAA+B,CAAC;AACnD,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,mCAAmC,CAAC;AACvD,mBAAmB,yCAAyC,CAAC;AAC7D,mBAAmB,mBAAmB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openapi-qraft/tanstack-query-react-types",
|
|
3
|
+
"version": "2.0.0-next.10",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build": "yarn clean && NODE_ENV=production rollup --config rollup.config.mjs && tsc --project tsconfig.build.json --emitDeclarationOnly",
|
|
6
|
+
"dev": "yarn clean && tsc --project tsconfig.build.json --watch --outDir ./dist/esm --noEmitOnError false",
|
|
7
|
+
"typecheck": "tsc --noEmit",
|
|
8
|
+
"lint": "eslint",
|
|
9
|
+
"clean": "rimraf dist/"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.cjs",
|
|
16
|
+
"types": "./dist/types/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"typesVersions": {
|
|
21
|
+
"*": {
|
|
22
|
+
"*": [
|
|
23
|
+
"dist/types/*"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@openapi-qraft/eslint-config": "1.0.0",
|
|
29
|
+
"@openapi-qraft/rollup-config": "1.1.0-next.0",
|
|
30
|
+
"eslint": "^9.10.0",
|
|
31
|
+
"rimraf": "^5.0.10",
|
|
32
|
+
"rollup": "~4.21.3",
|
|
33
|
+
"typescript": "^5.6.2"
|
|
34
|
+
},
|
|
35
|
+
"packageManager": "yarn@4.2.1",
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"src",
|
|
39
|
+
"!dist/**/*.test.*",
|
|
40
|
+
"!dist/**/*.spec.*",
|
|
41
|
+
"!src/**/__snapshots__/**",
|
|
42
|
+
"!src/**/*.test.*",
|
|
43
|
+
"!src/**/*.spec.*"
|
|
44
|
+
],
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type { ServiceOperationCancelQueries } from './ServiceOperationCancelQueries.js';
|
|
2
|
+
import type { ServiceOperationFetchInfiniteQuery } from './ServiceOperationFetchInfiniteQuery.js';
|
|
3
|
+
import type { ServiceOperationFetchQuery } from './ServiceOperationFetchQuery.js';
|
|
4
|
+
import type { ServiceOperationGetInfiniteQueryData } from './ServiceOperationGetInfiniteQueryData.js';
|
|
5
|
+
import type { ServiceOperationGetQueriesData } from './ServiceOperationGetQueriesData.js';
|
|
6
|
+
import type { ServiceOperationGetQueryData } from './ServiceOperationGetQueryData.js';
|
|
7
|
+
import type { ServiceOperationGetQueryState } from './ServiceOperationGetQueryState.js';
|
|
8
|
+
import type { ServiceOperationInvalidateQueries } from './ServiceOperationInvalidateQueries.js';
|
|
9
|
+
import type { ServiceOperationIsFetchingQueries } from './ServiceOperationIsFetchingQueries.js';
|
|
10
|
+
import type { ServiceOperationIsMutatingQueries } from './ServiceOperationIsMutatingQueries.js';
|
|
11
|
+
import type { ServiceOperationMutationFn } from './ServiceOperationMutationFn.js';
|
|
12
|
+
import type { ServiceOperationQueryFn } from './ServiceOperationQueryFn.js';
|
|
13
|
+
import type { ServiceOperationRefetchQueries } from './ServiceOperationRefetchQueries.js';
|
|
14
|
+
import type { ServiceOperationRemoveQueries } from './ServiceOperationRemoveQueries.js';
|
|
15
|
+
import type { ServiceOperationResetQueries } from './ServiceOperationResetQueries.js';
|
|
16
|
+
import type { ServiceOperationSetInfiniteQueryData } from './ServiceOperationSetInfiniteQueryData.js';
|
|
17
|
+
import type { ServiceOperationSetQueriesData } from './ServiceOperationSetQueriesData.js';
|
|
18
|
+
import type { ServiceOperationSetQueryData } from './ServiceOperationSetQueryData.js';
|
|
19
|
+
import type { ServiceOperationUseInfiniteQuery } from './ServiceOperationUseInfiniteQuery.js';
|
|
20
|
+
import type { ServiceOperationUseIsFetchingQueries } from './ServiceOperationUseIsFetchingQueries.js';
|
|
21
|
+
import type { ServiceOperationUseIsMutating } from './ServiceOperationUseIsMutating.js';
|
|
22
|
+
import type { ServiceOperationUseMutation } from './ServiceOperationUseMutation.js';
|
|
23
|
+
import type { ServiceOperationUseMutationState } from './ServiceOperationUseMutationState.js';
|
|
24
|
+
import type { ServiceOperationUseQueries } from './ServiceOperationUseQueries.js';
|
|
25
|
+
import type { ServiceOperationUseQuery } from './ServiceOperationUseQuery.js';
|
|
26
|
+
import type { ServiceOperationUseSuspenseInfiniteQuery } from './ServiceOperationUseSuspenseInfiniteQuery.js';
|
|
27
|
+
import type { ServiceOperationUseSuspenseQueries } from './ServiceOperationUseSuspenseQueries.js';
|
|
28
|
+
import type { ServiceOperationUseSuspenseQuery } from './ServiceOperationUseSuspenseQuery.js';
|
|
29
|
+
|
|
30
|
+
export interface ServiceOperationQuery<
|
|
31
|
+
TSchema extends { url: string; method: string },
|
|
32
|
+
TData,
|
|
33
|
+
TParams,
|
|
34
|
+
TError,
|
|
35
|
+
> extends ServiceOperationUseQuery<TSchema, TData, TParams, TError>,
|
|
36
|
+
ServiceOperationUseQueries<TSchema, TData, TParams, TError>,
|
|
37
|
+
ServiceOperationUseSuspenseQueries<TSchema, TData, TParams, TError>,
|
|
38
|
+
ServiceOperationUseInfiniteQuery<TSchema, TData, TParams, TError>,
|
|
39
|
+
ServiceOperationUseSuspenseQuery<TSchema, TData, TParams, TError>,
|
|
40
|
+
ServiceOperationUseSuspenseInfiniteQuery<TSchema, TData, TParams, TError>,
|
|
41
|
+
ServiceOperationUseIsFetchingQueries<TSchema, TData, TParams, TError>,
|
|
42
|
+
ServiceOperationQueryFn<TSchema, TData, TParams, TError>,
|
|
43
|
+
ServiceOperationFetchQuery<TSchema, TData, TParams, TError>,
|
|
44
|
+
ServiceOperationFetchInfiniteQuery<TSchema, TData, TParams, TError>,
|
|
45
|
+
ServiceOperationGetQueryData<TSchema, TData, TParams>,
|
|
46
|
+
ServiceOperationGetQueryState<TSchema, TData, TParams, TError>,
|
|
47
|
+
ServiceOperationGetQueriesData<TSchema, TData, TParams, TError>,
|
|
48
|
+
ServiceOperationGetInfiniteQueryData<TSchema, TData, TParams>,
|
|
49
|
+
ServiceOperationSetQueryData<TSchema, TData, TParams>,
|
|
50
|
+
ServiceOperationSetQueriesData<TSchema, TData, TParams, TError>,
|
|
51
|
+
ServiceOperationSetInfiniteQueryData<TSchema, TData, TParams>,
|
|
52
|
+
ServiceOperationInvalidateQueries<TSchema, TData, TParams, TError>,
|
|
53
|
+
ServiceOperationCancelQueries<TSchema, TData, TParams, TError>,
|
|
54
|
+
ServiceOperationRemoveQueries<TSchema, TData, TParams, TError>,
|
|
55
|
+
ServiceOperationResetQueries<TSchema, TData, TParams, TError>,
|
|
56
|
+
ServiceOperationRefetchQueries<TSchema, TData, TParams, TError>,
|
|
57
|
+
ServiceOperationIsFetchingQueries<TSchema, TData, TParams, TError> {
|
|
58
|
+
schema: TSchema;
|
|
59
|
+
types: {
|
|
60
|
+
parameters: TParams;
|
|
61
|
+
data: TData;
|
|
62
|
+
error: TError;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ServiceOperationMutation<
|
|
67
|
+
TSchema extends { url: string; method: string },
|
|
68
|
+
TBody,
|
|
69
|
+
TData,
|
|
70
|
+
TParams,
|
|
71
|
+
TError,
|
|
72
|
+
> extends ServiceOperationUseMutation<TSchema, TBody, TData, TParams, TError>,
|
|
73
|
+
ServiceOperationUseIsMutating<TSchema, TBody, TData, TParams, TError>,
|
|
74
|
+
ServiceOperationUseMutationState<TSchema, TBody, TData, TParams, TError>,
|
|
75
|
+
ServiceOperationIsMutatingQueries<TSchema, TBody, TData, TParams, TError>,
|
|
76
|
+
ServiceOperationMutationFn<TSchema, TBody, TData, TParams, TError> {
|
|
77
|
+
schema: TSchema;
|
|
78
|
+
types: {
|
|
79
|
+
parameters: TParams;
|
|
80
|
+
data: TData;
|
|
81
|
+
error: TError;
|
|
82
|
+
body: TBody;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ServiceOperationQuerySchema<
|
|
87
|
+
TSchema extends { url: string; method: string },
|
|
88
|
+
TQueryFnData,
|
|
89
|
+
TParams,
|
|
90
|
+
TError,
|
|
91
|
+
> {
|
|
92
|
+
schema: TSchema;
|
|
93
|
+
types: {
|
|
94
|
+
parameters: TParams;
|
|
95
|
+
data: TQueryFnData;
|
|
96
|
+
error: TError;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface ServiceOperationMutationSchema<
|
|
101
|
+
TSchema extends { url: string; method: string },
|
|
102
|
+
TBody,
|
|
103
|
+
TMutationData,
|
|
104
|
+
TParams,
|
|
105
|
+
TError,
|
|
106
|
+
> {
|
|
107
|
+
schema: TSchema;
|
|
108
|
+
types: {
|
|
109
|
+
parameters: TParams;
|
|
110
|
+
data: TMutationData;
|
|
111
|
+
error: TError;
|
|
112
|
+
body: TBody;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface ServiceOperationQuery<
|
|
117
|
+
TSchema extends { url: string; method: string },
|
|
118
|
+
TData,
|
|
119
|
+
TParams,
|
|
120
|
+
TError,
|
|
121
|
+
> extends ServiceOperationUseQuery<TSchema, TData, TParams, TError>,
|
|
122
|
+
ServiceOperationUseQueries<TSchema, TData, TParams, TError>,
|
|
123
|
+
ServiceOperationUseSuspenseQueries<TSchema, TData, TParams, TError>,
|
|
124
|
+
ServiceOperationUseInfiniteQuery<TSchema, TData, TParams, TError>,
|
|
125
|
+
ServiceOperationUseSuspenseQuery<TSchema, TData, TParams, TError>,
|
|
126
|
+
ServiceOperationUseSuspenseInfiniteQuery<TSchema, TData, TParams, TError>,
|
|
127
|
+
ServiceOperationUseIsFetchingQueries<TSchema, TData, TParams, TError>,
|
|
128
|
+
ServiceOperationQueryFn<TSchema, TData, TParams, TError>,
|
|
129
|
+
ServiceOperationFetchQuery<TSchema, TData, TParams, TError>,
|
|
130
|
+
ServiceOperationFetchInfiniteQuery<TSchema, TData, TParams, TError>,
|
|
131
|
+
ServiceOperationGetQueryData<TSchema, TData, TParams>,
|
|
132
|
+
ServiceOperationGetQueryState<TSchema, TData, TParams, TError>,
|
|
133
|
+
ServiceOperationGetQueriesData<TSchema, TData, TParams, TError>,
|
|
134
|
+
ServiceOperationGetInfiniteQueryData<TSchema, TData, TParams>,
|
|
135
|
+
ServiceOperationSetQueryData<TSchema, TData, TParams>,
|
|
136
|
+
ServiceOperationSetQueriesData<TSchema, TData, TParams, TError>,
|
|
137
|
+
ServiceOperationSetInfiniteQueryData<TSchema, TData, TParams>,
|
|
138
|
+
ServiceOperationInvalidateQueries<TSchema, TData, TParams, TError>,
|
|
139
|
+
ServiceOperationCancelQueries<TSchema, TData, TParams, TError>,
|
|
140
|
+
ServiceOperationRemoveQueries<TSchema, TData, TParams, TError>,
|
|
141
|
+
ServiceOperationResetQueries<TSchema, TData, TParams, TError>,
|
|
142
|
+
ServiceOperationRefetchQueries<TSchema, TData, TParams, TError>,
|
|
143
|
+
ServiceOperationIsFetchingQueries<TSchema, TData, TParams, TError> {
|
|
144
|
+
schema: TSchema;
|
|
145
|
+
types: {
|
|
146
|
+
parameters: TParams;
|
|
147
|
+
data: TData;
|
|
148
|
+
error: TError;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface ServiceOperationMutation<
|
|
153
|
+
TSchema extends { url: string; method: string },
|
|
154
|
+
TBody,
|
|
155
|
+
TData,
|
|
156
|
+
TParams,
|
|
157
|
+
TError,
|
|
158
|
+
> extends ServiceOperationUseMutation<TSchema, TBody, TData, TParams, TError>,
|
|
159
|
+
ServiceOperationUseIsMutating<TSchema, TBody, TData, TParams, TError>,
|
|
160
|
+
ServiceOperationUseMutationState<TSchema, TBody, TData, TParams, TError>,
|
|
161
|
+
ServiceOperationIsMutatingQueries<TSchema, TBody, TData, TParams, TError>,
|
|
162
|
+
ServiceOperationMutationFn<TSchema, TBody, TData, TParams, TError> {
|
|
163
|
+
schema: TSchema;
|
|
164
|
+
types: {
|
|
165
|
+
parameters: TParams;
|
|
166
|
+
data: TData;
|
|
167
|
+
error: TError;
|
|
168
|
+
body: TBody;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
QueryFiltersByParameters,
|
|
3
|
+
QueryFiltersByQueryKey,
|
|
4
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
5
|
+
import type { CancelOptions } from '@tanstack/query-core';
|
|
6
|
+
|
|
7
|
+
export interface ServiceOperationCancelQueries<
|
|
8
|
+
TSchema extends { url: string; method: string },
|
|
9
|
+
TQueryFnData,
|
|
10
|
+
TParams,
|
|
11
|
+
TError,
|
|
12
|
+
> {
|
|
13
|
+
cancelQueries<TInfinite extends boolean = false>(
|
|
14
|
+
filters?:
|
|
15
|
+
| QueryFiltersByParameters<
|
|
16
|
+
TSchema,
|
|
17
|
+
TQueryFnData,
|
|
18
|
+
TInfinite,
|
|
19
|
+
TParams,
|
|
20
|
+
TError
|
|
21
|
+
>
|
|
22
|
+
| QueryFiltersByQueryKey<
|
|
23
|
+
TSchema,
|
|
24
|
+
TQueryFnData,
|
|
25
|
+
TInfinite,
|
|
26
|
+
TParams,
|
|
27
|
+
TError
|
|
28
|
+
>,
|
|
29
|
+
options?: CancelOptions
|
|
30
|
+
): Promise<void>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
FetchInfiniteQueryOptionsByParameters,
|
|
3
|
+
FetchInfiniteQueryOptionsByQueryKey,
|
|
4
|
+
FetchInfiniteQueryOptionsQueryFn,
|
|
5
|
+
OperationInfiniteData,
|
|
6
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
7
|
+
|
|
8
|
+
export interface ServiceOperationFetchInfiniteQuery<
|
|
9
|
+
TSchema extends { url: string; method: string },
|
|
10
|
+
TQueryFnData,
|
|
11
|
+
TParams,
|
|
12
|
+
TError,
|
|
13
|
+
> {
|
|
14
|
+
fetchInfiniteQuery<TPageParam extends TParams>(
|
|
15
|
+
options:
|
|
16
|
+
| (FetchInfiniteQueryOptionsByQueryKey<
|
|
17
|
+
TSchema,
|
|
18
|
+
TQueryFnData,
|
|
19
|
+
TParams,
|
|
20
|
+
TPageParam,
|
|
21
|
+
TError
|
|
22
|
+
> &
|
|
23
|
+
FetchInfiniteQueryOptionsQueryFn<
|
|
24
|
+
TSchema,
|
|
25
|
+
TQueryFnData,
|
|
26
|
+
TParams,
|
|
27
|
+
TError
|
|
28
|
+
>)
|
|
29
|
+
| (FetchInfiniteQueryOptionsByParameters<
|
|
30
|
+
TSchema,
|
|
31
|
+
TQueryFnData,
|
|
32
|
+
TParams,
|
|
33
|
+
TPageParam,
|
|
34
|
+
TError
|
|
35
|
+
> &
|
|
36
|
+
FetchInfiniteQueryOptionsQueryFn<
|
|
37
|
+
TSchema,
|
|
38
|
+
TQueryFnData,
|
|
39
|
+
TParams,
|
|
40
|
+
TError
|
|
41
|
+
>)
|
|
42
|
+
): Promise<OperationInfiniteData<TQueryFnData, TParams>>;
|
|
43
|
+
|
|
44
|
+
prefetchInfiniteQuery<TPageParam extends TParams>(
|
|
45
|
+
options:
|
|
46
|
+
| (FetchInfiniteQueryOptionsByQueryKey<
|
|
47
|
+
TSchema,
|
|
48
|
+
TQueryFnData,
|
|
49
|
+
TParams,
|
|
50
|
+
TPageParam,
|
|
51
|
+
TError
|
|
52
|
+
> &
|
|
53
|
+
FetchInfiniteQueryOptionsQueryFn<
|
|
54
|
+
TSchema,
|
|
55
|
+
TQueryFnData,
|
|
56
|
+
TParams,
|
|
57
|
+
TError
|
|
58
|
+
>)
|
|
59
|
+
| (FetchInfiniteQueryOptionsByParameters<
|
|
60
|
+
TSchema,
|
|
61
|
+
TQueryFnData,
|
|
62
|
+
TParams,
|
|
63
|
+
TPageParam,
|
|
64
|
+
TError
|
|
65
|
+
> &
|
|
66
|
+
FetchInfiniteQueryOptionsQueryFn<
|
|
67
|
+
TSchema,
|
|
68
|
+
TQueryFnData,
|
|
69
|
+
TParams,
|
|
70
|
+
TError
|
|
71
|
+
>)
|
|
72
|
+
): Promise<void>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AreAllOptional,
|
|
3
|
+
ServiceOperationFetchQueryOptions,
|
|
4
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
5
|
+
|
|
6
|
+
export interface ServiceOperationFetchQuery<
|
|
7
|
+
TSchema extends { url: string; method: string },
|
|
8
|
+
TQueryFnData,
|
|
9
|
+
TParams,
|
|
10
|
+
TError,
|
|
11
|
+
> {
|
|
12
|
+
fetchQuery(
|
|
13
|
+
options: AreAllOptional<TParams> extends true
|
|
14
|
+
? ServiceOperationFetchQueryOptions<
|
|
15
|
+
TSchema,
|
|
16
|
+
TQueryFnData,
|
|
17
|
+
TParams,
|
|
18
|
+
TError
|
|
19
|
+
> | void
|
|
20
|
+
: ServiceOperationFetchQueryOptions<
|
|
21
|
+
TSchema,
|
|
22
|
+
TQueryFnData,
|
|
23
|
+
TParams,
|
|
24
|
+
TError
|
|
25
|
+
>
|
|
26
|
+
): Promise<TQueryFnData>;
|
|
27
|
+
|
|
28
|
+
prefetchQuery(
|
|
29
|
+
options: AreAllOptional<TParams> extends true
|
|
30
|
+
? ServiceOperationFetchQueryOptions<
|
|
31
|
+
TSchema,
|
|
32
|
+
TQueryFnData,
|
|
33
|
+
TParams,
|
|
34
|
+
TError
|
|
35
|
+
> | void
|
|
36
|
+
: ServiceOperationFetchQueryOptions<
|
|
37
|
+
TSchema,
|
|
38
|
+
TQueryFnData,
|
|
39
|
+
TParams,
|
|
40
|
+
TError
|
|
41
|
+
>
|
|
42
|
+
): Promise<void>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AreAllOptional,
|
|
3
|
+
OperationInfiniteData,
|
|
4
|
+
ServiceOperationInfiniteQueryKey,
|
|
5
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
6
|
+
|
|
7
|
+
export interface ServiceOperationGetInfiniteQueryData<
|
|
8
|
+
TSchema extends { url: string; method: string },
|
|
9
|
+
TQueryFnData,
|
|
10
|
+
TParams,
|
|
11
|
+
> {
|
|
12
|
+
getInfiniteQueryData(
|
|
13
|
+
parameters:
|
|
14
|
+
| ServiceOperationInfiniteQueryKey<TSchema, TParams>
|
|
15
|
+
| (AreAllOptional<TParams> extends true ? TParams | void : TParams)
|
|
16
|
+
): OperationInfiniteData<TQueryFnData, TParams> | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
OperationInfiniteData,
|
|
3
|
+
QueryFiltersByParameters,
|
|
4
|
+
QueryFiltersByQueryKey,
|
|
5
|
+
ServiceOperationInfiniteQueryKey,
|
|
6
|
+
ServiceOperationQueryKey,
|
|
7
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
8
|
+
import type { NoInfer } from '@tanstack/query-core';
|
|
9
|
+
|
|
10
|
+
export interface ServiceOperationGetQueriesData<
|
|
11
|
+
TSchema extends { url: string; method: string },
|
|
12
|
+
TQueryFnData,
|
|
13
|
+
TParams,
|
|
14
|
+
TError,
|
|
15
|
+
> {
|
|
16
|
+
getQueriesData<TInfinite extends boolean = false>(
|
|
17
|
+
filters?:
|
|
18
|
+
| QueryFiltersByParameters<
|
|
19
|
+
TSchema,
|
|
20
|
+
TQueryFnData,
|
|
21
|
+
TInfinite,
|
|
22
|
+
TParams,
|
|
23
|
+
TError
|
|
24
|
+
>
|
|
25
|
+
| QueryFiltersByQueryKey<
|
|
26
|
+
TSchema,
|
|
27
|
+
TQueryFnData,
|
|
28
|
+
TInfinite,
|
|
29
|
+
TParams,
|
|
30
|
+
TError
|
|
31
|
+
>
|
|
32
|
+
): TInfinite extends true
|
|
33
|
+
? Array<
|
|
34
|
+
[
|
|
35
|
+
queryKey: ServiceOperationInfiniteQueryKey<TSchema, TParams>,
|
|
36
|
+
data:
|
|
37
|
+
| NoInfer<OperationInfiniteData<TQueryFnData, TParams>>
|
|
38
|
+
| undefined,
|
|
39
|
+
]
|
|
40
|
+
>
|
|
41
|
+
: Array<
|
|
42
|
+
[
|
|
43
|
+
queryKey: ServiceOperationQueryKey<TSchema, TParams>,
|
|
44
|
+
data: TQueryFnData | undefined,
|
|
45
|
+
]
|
|
46
|
+
>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AreAllOptional,
|
|
3
|
+
ServiceOperationQueryKey,
|
|
4
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
5
|
+
|
|
6
|
+
export interface ServiceOperationGetQueryData<
|
|
7
|
+
TSchema extends { url: string; method: string },
|
|
8
|
+
TQueryFnData,
|
|
9
|
+
TParams,
|
|
10
|
+
> {
|
|
11
|
+
getQueryData(
|
|
12
|
+
parameters:
|
|
13
|
+
| ServiceOperationQueryKey<TSchema, TParams>
|
|
14
|
+
| (AreAllOptional<TParams> extends true ? TParams | void : TParams)
|
|
15
|
+
): TQueryFnData | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AreAllOptional,
|
|
3
|
+
OperationInfiniteData,
|
|
4
|
+
ServiceOperationInfiniteQueryKey,
|
|
5
|
+
ServiceOperationQueryKey,
|
|
6
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
7
|
+
import type { QueryState } from '@tanstack/query-core';
|
|
8
|
+
|
|
9
|
+
export interface ServiceOperationGetQueryState<
|
|
10
|
+
TSchema extends { url: string; method: string },
|
|
11
|
+
TQueryFnData,
|
|
12
|
+
TParams,
|
|
13
|
+
TError,
|
|
14
|
+
> {
|
|
15
|
+
getQueryState(
|
|
16
|
+
parameters:
|
|
17
|
+
| ServiceOperationQueryKey<TSchema, TParams>
|
|
18
|
+
| (AreAllOptional<TParams> extends true ? TParams | void : TParams)
|
|
19
|
+
): QueryState<TQueryFnData, TError> | undefined;
|
|
20
|
+
|
|
21
|
+
getInfiniteQueryState(
|
|
22
|
+
parameters: AreAllOptional<TParams> extends true
|
|
23
|
+
? TParams | ServiceOperationInfiniteQueryKey<TSchema, TParams> | void
|
|
24
|
+
: TParams | ServiceOperationInfiniteQueryKey<TSchema, TParams>
|
|
25
|
+
):
|
|
26
|
+
| QueryState<OperationInfiniteData<TQueryFnData, TParams>, TError>
|
|
27
|
+
| undefined;
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InvalidateQueryFilters } from '@openapi-qraft/tanstack-query-react-types';
|
|
2
|
+
import type { InvalidateOptions } from '@tanstack/query-core';
|
|
3
|
+
|
|
4
|
+
export interface ServiceOperationInvalidateQueries<
|
|
5
|
+
TSchema extends { url: string; method: string },
|
|
6
|
+
TQueryFnData,
|
|
7
|
+
TParams,
|
|
8
|
+
TError,
|
|
9
|
+
> {
|
|
10
|
+
invalidateQueries<TInfinite extends boolean = false>(
|
|
11
|
+
filters?: InvalidateQueryFilters<
|
|
12
|
+
TSchema,
|
|
13
|
+
TQueryFnData,
|
|
14
|
+
TInfinite,
|
|
15
|
+
TParams,
|
|
16
|
+
TError
|
|
17
|
+
>,
|
|
18
|
+
options?: InvalidateOptions
|
|
19
|
+
): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
QueryFiltersByParameters,
|
|
3
|
+
QueryFiltersByQueryKey,
|
|
4
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
5
|
+
|
|
6
|
+
export interface ServiceOperationIsFetchingQueries<
|
|
7
|
+
TSchema extends { url: string; method: string },
|
|
8
|
+
TQueryFnData,
|
|
9
|
+
TParams,
|
|
10
|
+
TError,
|
|
11
|
+
> {
|
|
12
|
+
isFetching<TInfinite extends boolean = false>(
|
|
13
|
+
filters?:
|
|
14
|
+
| QueryFiltersByParameters<
|
|
15
|
+
TSchema,
|
|
16
|
+
TQueryFnData,
|
|
17
|
+
TInfinite,
|
|
18
|
+
TParams,
|
|
19
|
+
TError
|
|
20
|
+
>
|
|
21
|
+
| QueryFiltersByQueryKey<
|
|
22
|
+
TSchema,
|
|
23
|
+
TQueryFnData,
|
|
24
|
+
TInfinite,
|
|
25
|
+
TParams,
|
|
26
|
+
TError
|
|
27
|
+
>
|
|
28
|
+
): number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
MutationFiltersByMutationKey,
|
|
3
|
+
MutationFiltersByParameters,
|
|
4
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
5
|
+
|
|
6
|
+
export interface ServiceOperationIsMutatingQueries<
|
|
7
|
+
TSchema extends { url: string; method: string },
|
|
8
|
+
TBody,
|
|
9
|
+
TMutationData,
|
|
10
|
+
TParams,
|
|
11
|
+
TError,
|
|
12
|
+
> {
|
|
13
|
+
isMutating<TContext>(
|
|
14
|
+
filters?:
|
|
15
|
+
| MutationFiltersByParameters<
|
|
16
|
+
TBody,
|
|
17
|
+
TMutationData,
|
|
18
|
+
TParams,
|
|
19
|
+
TError,
|
|
20
|
+
TContext
|
|
21
|
+
>
|
|
22
|
+
| MutationFiltersByMutationKey<
|
|
23
|
+
TSchema,
|
|
24
|
+
TBody,
|
|
25
|
+
TMutationData,
|
|
26
|
+
TParams,
|
|
27
|
+
TError,
|
|
28
|
+
TContext
|
|
29
|
+
>
|
|
30
|
+
): number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
RequestFnResponse,
|
|
3
|
+
ServiceOperationMutationFnOptions,
|
|
4
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
5
|
+
|
|
6
|
+
export interface ServiceOperationMutationFn<
|
|
7
|
+
TSchema extends { url: string; method: string },
|
|
8
|
+
TBody,
|
|
9
|
+
TMutationData,
|
|
10
|
+
TParams,
|
|
11
|
+
TError,
|
|
12
|
+
> {
|
|
13
|
+
<TOptions extends ServiceOperationMutationFnOptions<TBody, TParams>>(
|
|
14
|
+
options: TOptions,
|
|
15
|
+
client?: (
|
|
16
|
+
schema: TSchema,
|
|
17
|
+
options: TOptions
|
|
18
|
+
) => Promise<RequestFnResponse<TMutationData, TError>>
|
|
19
|
+
): Promise<RequestFnResponse<TMutationData, TError>>;
|
|
20
|
+
}
|