@openapi-qraft/tanstack-query-react-types 2.0.0-next.12 → 2.0.0-next.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/CHANGELOG.md +8 -0
- package/dist/types/service-operation/ServiceOperationMutationFn.d.ts +1 -1
- package/dist/types/service-operation/ServiceOperationMutationFn.d.ts.map +1 -1
- package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts +3 -3
- package/dist/types/service-operation/ServiceOperationSetQueryData.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/service-operation/ServiceOperationMutationFn.ts +3 -3
- package/src/service-operation/ServiceOperationSetQueryData.ts +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @openapi-qraft/tanstack-query-react-types
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 34ff132: Added support for `void` and `undefined` arguments in mutation operations and `setQueryData`.
|
|
8
|
+
|
|
9
|
+
## 2.0.0-next.13
|
|
10
|
+
|
|
3
11
|
## 2.0.0-next.12
|
|
4
12
|
|
|
5
13
|
## 2.0.0-next.11
|
|
@@ -3,6 +3,6 @@ export interface ServiceOperationMutationFn<TSchema extends {
|
|
|
3
3
|
url: string;
|
|
4
4
|
method: string;
|
|
5
5
|
}, TBody, TMutationData, TParams, TError> {
|
|
6
|
-
|
|
6
|
+
(options: ServiceOperationMutationFnOptions<TBody, TParams>, client?: (schema: TSchema, options: ServiceOperationMutationFnOptions<TBody, TParams>) => Promise<RequestFnResponse<TMutationData, TError>>): Promise<RequestFnResponse<TMutationData, TError>>;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=ServiceOperationMutationFn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceOperationMutationFn.d.ts","sourceRoot":"","sources":["../../../src/service-operation/ServiceOperationMutationFn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iCAAiC,EAClC,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,0BAA0B,CACzC,OAAO,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/C,KAAK,EACL,aAAa,EACb,OAAO,EACP,MAAM;IAEN,
|
|
1
|
+
{"version":3,"file":"ServiceOperationMutationFn.d.ts","sourceRoot":"","sources":["../../../src/service-operation/ServiceOperationMutationFn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iCAAiC,EAClC,MAAM,2CAA2C,CAAC;AAEnD,MAAM,WAAW,0BAA0B,CACzC,OAAO,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/C,KAAK,EACL,aAAa,EACb,OAAO,EACP,MAAM;IAEN,CACE,OAAO,EAAE,iCAAiC,CAAC,KAAK,EAAE,OAAO,CAAC,EAC1D,MAAM,CAAC,EAAE,CACP,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,iCAAiC,CAAC,KAAK,EAAE,OAAO,CAAC,KACvD,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,GACrD,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ServiceOperationQueryKey } from '@openapi-qraft/tanstack-query-react-types';
|
|
1
|
+
import type { AreAllOptional, ServiceOperationQueryKey } from '@openapi-qraft/tanstack-query-react-types';
|
|
2
2
|
import type { NoInfer, SetDataOptions, Updater } from '@tanstack/query-core';
|
|
3
3
|
export interface ServiceOperationSetQueryData<TSchema extends {
|
|
4
4
|
url: string;
|
|
5
5
|
method: string;
|
|
6
|
-
}, TQueryFnData, TParams
|
|
7
|
-
setQueryData(parameters: TParams | ServiceOperationQueryKey<TSchema, TParams>, updater: Updater<NoInfer<TQueryFnData> | undefined, NoInfer<TQueryFnData> | undefined>, options?: SetDataOptions): TQueryFnData | undefined;
|
|
6
|
+
}, TQueryFnData, TParams> {
|
|
7
|
+
setQueryData(parameters: (AreAllOptional<TParams> extends true ? TParams | undefined : TParams) | ServiceOperationQueryKey<TSchema, TParams>, updater: Updater<NoInfer<TQueryFnData> | undefined, NoInfer<TQueryFnData> | undefined>, options?: SetDataOptions): TQueryFnData | undefined;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=ServiceOperationSetQueryData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceOperationSetQueryData.d.ts","sourceRoot":"","sources":["../../../src/service-operation/ServiceOperationSetQueryData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ServiceOperationSetQueryData.d.ts","sourceRoot":"","sources":["../../../src/service-operation/ServiceOperationSetQueryData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE7E,MAAM,WAAW,4BAA4B,CAC3C,OAAO,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC/C,YAAY,EACZ,OAAO;IAEP,YAAY,CACV,UAAU,EACN,CAAC,cAAc,CAAC,OAAO,CAAC,SAAS,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,GACtE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC9C,OAAO,EAAE,OAAO,CACd,OAAO,CAAC,YAAY,CAAC,GAAG,SAAS,EACjC,OAAO,CAAC,YAAY,CAAC,GAAG,SAAS,CAClC,EACD,OAAO,CAAC,EAAE,cAAc,GACvB,YAAY,GAAG,SAAS,CAAC;CAC7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openapi-qraft/tanstack-query-react-types",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn clean && NODE_ENV=production rollup --config rollup.config.mjs && tsc --project tsconfig.build.json --emitDeclarationOnly",
|
|
6
6
|
"dev": "yarn clean && tsc --project tsconfig.build.json --watch --outDir ./dist/esm --noEmitOnError false",
|
|
@@ -10,11 +10,11 @@ export interface ServiceOperationMutationFn<
|
|
|
10
10
|
TParams,
|
|
11
11
|
TError,
|
|
12
12
|
> {
|
|
13
|
-
|
|
14
|
-
options:
|
|
13
|
+
(
|
|
14
|
+
options: ServiceOperationMutationFnOptions<TBody, TParams>,
|
|
15
15
|
client?: (
|
|
16
16
|
schema: TSchema,
|
|
17
|
-
options:
|
|
17
|
+
options: ServiceOperationMutationFnOptions<TBody, TParams>
|
|
18
18
|
) => Promise<RequestFnResponse<TMutationData, TError>>
|
|
19
19
|
): Promise<RequestFnResponse<TMutationData, TError>>;
|
|
20
20
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
AreAllOptional,
|
|
3
|
+
ServiceOperationQueryKey,
|
|
4
|
+
} from '@openapi-qraft/tanstack-query-react-types';
|
|
2
5
|
import type { NoInfer, SetDataOptions, Updater } from '@tanstack/query-core';
|
|
3
6
|
|
|
4
7
|
export interface ServiceOperationSetQueryData<
|
|
5
8
|
TSchema extends { url: string; method: string },
|
|
6
9
|
TQueryFnData,
|
|
7
|
-
TParams
|
|
10
|
+
TParams,
|
|
8
11
|
> {
|
|
9
12
|
setQueryData(
|
|
10
|
-
parameters:
|
|
13
|
+
parameters:
|
|
14
|
+
| (AreAllOptional<TParams> extends true ? TParams | undefined : TParams)
|
|
15
|
+
| ServiceOperationQueryKey<TSchema, TParams>,
|
|
11
16
|
updater: Updater<
|
|
12
17
|
NoInfer<TQueryFnData> | undefined,
|
|
13
18
|
NoInfer<TQueryFnData> | undefined
|