@orpc/solid-query 0.0.0-next.19c2a69 → 0.0.0-next.1b6aaae
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 +5 -7
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -49,21 +49,19 @@ You can find the full documentation [here](https://orpc.unnoq.com).
|
|
|
49
49
|
- [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
|
|
50
50
|
- [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
|
|
51
51
|
- [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
|
|
52
|
-
- [@orpc/
|
|
52
|
+
- [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
|
|
53
|
+
- [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
|
|
53
54
|
- [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
|
|
54
|
-
- [@orpc/
|
|
55
|
-
- [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
|
|
56
|
-
- [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
|
|
57
|
-
- [@orpc/svelte-query](https://www.npmjs.com/package/@orpc/svelte-query): Integration with [Svelte Query](https://tanstack.com/query/latest/docs/framework/svelte/overview).
|
|
55
|
+
- [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
|
|
58
56
|
- [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
|
|
59
|
-
- [@orpc/
|
|
57
|
+
- [@orpc/hey-api](https://www.npmjs.com/package/@orpc/hey-api): [Hey API](https://heyapi.dev/) integration.
|
|
60
58
|
- [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
|
|
61
59
|
- [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot): OpenAPI spec generation from [Valibot](https://valibot.dev/).
|
|
62
60
|
- [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype): OpenAPI spec generation from [ArkType](https://arktype.io/).
|
|
63
61
|
|
|
64
62
|
## `@orpc/solid-query`
|
|
65
63
|
|
|
66
|
-
Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview). Read the [documentation](https://orpc.unnoq.com/docs/tanstack-query/solid) for more information.
|
|
64
|
+
Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview). Read the [documentation](https://orpc.unnoq.com/docs/integrations/tanstack-query-old/solid) for more information.
|
|
67
65
|
|
|
68
66
|
```ts
|
|
69
67
|
export function Example() {
|
package/dist/index.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ interface GeneralUtils<TInput> {
|
|
|
11
11
|
/**
|
|
12
12
|
* Generate a query/mutation key for checking status, invalidate, set, get, etc.
|
|
13
13
|
*
|
|
14
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
14
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
15
15
|
*/
|
|
16
16
|
key<UType extends OperationType>(options?: OperationKeyOptions<UType, TInput>): QueryKey;
|
|
17
17
|
}
|
|
@@ -46,7 +46,7 @@ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
|
|
|
46
46
|
context?: TClientContext;
|
|
47
47
|
} : {
|
|
48
48
|
context: TClientContext;
|
|
49
|
-
}) & SetOptional<SolidInfiniteQueryOptions<TOutput, TError, TSelectData,
|
|
49
|
+
}) & SetOptional<SolidInfiniteQueryOptions<TOutput, TError, TSelectData, QueryKey, TPageParam>, 'queryKey'>;
|
|
50
50
|
interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
|
|
51
51
|
queryKey: QueryKey;
|
|
52
52
|
queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
|
|
@@ -65,32 +65,32 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
|
|
|
65
65
|
/**
|
|
66
66
|
* Calling corresponding procedure client
|
|
67
67
|
*
|
|
68
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#calling-procedure-clients Tanstack Calling Procedure Client Docs}
|
|
68
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#calling-procedure-clients Tanstack Calling Procedure Client Docs}
|
|
69
69
|
*/
|
|
70
70
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
|
71
71
|
/**
|
|
72
72
|
* Generate options used for createQuery/prefetchQuery/...
|
|
73
73
|
*
|
|
74
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#query-options-utility Tanstack Query Options Utility Docs}
|
|
74
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#query-options-utility Tanstack Query Options Utility Docs}
|
|
75
75
|
*/
|
|
76
76
|
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
|
|
77
77
|
/**
|
|
78
78
|
* Generate [Event Iterator](https://orpc.unnoq.com/docs/event-iterator) options used for useQuery/prefetchQuery/...
|
|
79
79
|
* Built on top of [steamedQuery](https://tanstack.com/query/latest/docs/reference/streamedQuery)
|
|
80
80
|
*
|
|
81
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#streamed-query-options-utility Tanstack Streamed Query Options Utility Docs}
|
|
81
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#streamed-query-options-utility Tanstack Streamed Query Options Utility Docs}
|
|
82
82
|
*/
|
|
83
83
|
experimental_streamedOptions<U, USelectData = experimental_InferStreamedOutput<TOutput>>(...rest: MaybeOptionalOptions<U & experimental_StreamedOptionsIn<TClientContext, TInput, experimental_InferStreamedOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<experimental_StreamedOptionsBase<experimental_InferStreamedOutput<TOutput>, TError>, keyof U>>;
|
|
84
84
|
/**
|
|
85
85
|
* Generate options used for createInfiniteQuery/prefetchInfiniteQuery/...
|
|
86
86
|
*
|
|
87
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#infinite-query-options-utility Tanstack Infinite Query Options Utility Docs}
|
|
87
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#infinite-query-options-utility Tanstack Infinite Query Options Utility Docs}
|
|
88
88
|
*/
|
|
89
89
|
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & Omit<InfiniteOptionsBase<TOutput, TError, UPageParam>, keyof U>>;
|
|
90
90
|
/**
|
|
91
91
|
* Generate options used for createMutation/...
|
|
92
92
|
*
|
|
93
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#mutation-options Tanstack Mutation Options Docs}
|
|
93
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#mutation-options Tanstack Mutation Options Docs}
|
|
94
94
|
*/
|
|
95
95
|
mutationOptions<UMutationContext>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
|
|
96
96
|
}
|
|
@@ -109,7 +109,7 @@ interface CreateRouterUtilsOptions {
|
|
|
109
109
|
* Create a router utils from a client.
|
|
110
110
|
*
|
|
111
111
|
* @info Both client-side and server-side clients are supported.
|
|
112
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/solid Tanstack Query Solid Docs}
|
|
112
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/solid Tanstack Query Solid Docs}
|
|
113
113
|
*/
|
|
114
114
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions): RouterUtils<T>;
|
|
115
115
|
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface GeneralUtils<TInput> {
|
|
|
11
11
|
/**
|
|
12
12
|
* Generate a query/mutation key for checking status, invalidate, set, get, etc.
|
|
13
13
|
*
|
|
14
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
14
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#query-mutation-key Tanstack Query/Mutation Key Docs}
|
|
15
15
|
*/
|
|
16
16
|
key<UType extends OperationType>(options?: OperationKeyOptions<UType, TInput>): QueryKey;
|
|
17
17
|
}
|
|
@@ -46,7 +46,7 @@ type InfiniteOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
|
|
|
46
46
|
context?: TClientContext;
|
|
47
47
|
} : {
|
|
48
48
|
context: TClientContext;
|
|
49
|
-
}) & SetOptional<SolidInfiniteQueryOptions<TOutput, TError, TSelectData,
|
|
49
|
+
}) & SetOptional<SolidInfiniteQueryOptions<TOutput, TError, TSelectData, QueryKey, TPageParam>, 'queryKey'>;
|
|
50
50
|
interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
|
|
51
51
|
queryKey: QueryKey;
|
|
52
52
|
queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
|
|
@@ -65,32 +65,32 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
|
|
|
65
65
|
/**
|
|
66
66
|
* Calling corresponding procedure client
|
|
67
67
|
*
|
|
68
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#calling-procedure-clients Tanstack Calling Procedure Client Docs}
|
|
68
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#calling-procedure-clients Tanstack Calling Procedure Client Docs}
|
|
69
69
|
*/
|
|
70
70
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
|
71
71
|
/**
|
|
72
72
|
* Generate options used for createQuery/prefetchQuery/...
|
|
73
73
|
*
|
|
74
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#query-options-utility Tanstack Query Options Utility Docs}
|
|
74
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#query-options-utility Tanstack Query Options Utility Docs}
|
|
75
75
|
*/
|
|
76
76
|
queryOptions<U, USelectData = TOutput>(...rest: MaybeOptionalOptions<U & QueryOptionsIn<TClientContext, TInput, TOutput, TError, USelectData>>): NoInfer<U & Omit<QueryOptionsBase<TOutput, TError>, keyof U>>;
|
|
77
77
|
/**
|
|
78
78
|
* Generate [Event Iterator](https://orpc.unnoq.com/docs/event-iterator) options used for useQuery/prefetchQuery/...
|
|
79
79
|
* Built on top of [steamedQuery](https://tanstack.com/query/latest/docs/reference/streamedQuery)
|
|
80
80
|
*
|
|
81
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#streamed-query-options-utility Tanstack Streamed Query Options Utility Docs}
|
|
81
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#streamed-query-options-utility Tanstack Streamed Query Options Utility Docs}
|
|
82
82
|
*/
|
|
83
83
|
experimental_streamedOptions<U, USelectData = experimental_InferStreamedOutput<TOutput>>(...rest: MaybeOptionalOptions<U & experimental_StreamedOptionsIn<TClientContext, TInput, experimental_InferStreamedOutput<TOutput>, TError, USelectData>>): NoInfer<U & Omit<experimental_StreamedOptionsBase<experimental_InferStreamedOutput<TOutput>, TError>, keyof U>>;
|
|
84
84
|
/**
|
|
85
85
|
* Generate options used for createInfiniteQuery/prefetchInfiniteQuery/...
|
|
86
86
|
*
|
|
87
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#infinite-query-options-utility Tanstack Infinite Query Options Utility Docs}
|
|
87
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#infinite-query-options-utility Tanstack Infinite Query Options Utility Docs}
|
|
88
88
|
*/
|
|
89
89
|
infiniteOptions<U, UPageParam, USelectData = InfiniteData<TOutput, UPageParam>>(options: U & InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, USelectData, UPageParam>): NoInfer<U & Omit<InfiniteOptionsBase<TOutput, TError, UPageParam>, keyof U>>;
|
|
90
90
|
/**
|
|
91
91
|
* Generate options used for createMutation/...
|
|
92
92
|
*
|
|
93
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/basic#mutation-options Tanstack Mutation Options Docs}
|
|
93
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/basic#mutation-options Tanstack Mutation Options Docs}
|
|
94
94
|
*/
|
|
95
95
|
mutationOptions<UMutationContext>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
|
|
96
96
|
}
|
|
@@ -109,7 +109,7 @@ interface CreateRouterUtilsOptions {
|
|
|
109
109
|
* Create a router utils from a client.
|
|
110
110
|
*
|
|
111
111
|
* @info Both client-side and server-side clients are supported.
|
|
112
|
-
* @see {@link https://orpc.unnoq.com/docs/tanstack-query/solid Tanstack Query Solid Docs}
|
|
112
|
+
* @see {@link https://orpc.unnoq.com/docs/integrations/tanstack-query-old/solid Tanstack Query Solid Docs}
|
|
113
113
|
*/
|
|
114
114
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions): RouterUtils<T>;
|
|
115
115
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/solid-query",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.1b6aaae",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@tanstack/solid-query": ">=5.
|
|
30
|
+
"@tanstack/solid-query": ">=5.80.2",
|
|
31
31
|
"solid-js": ">=1.9.0",
|
|
32
|
-
"@orpc/client": "0.0.0-next.
|
|
32
|
+
"@orpc/client": "0.0.0-next.1b6aaae"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@orpc/
|
|
36
|
-
"@orpc/
|
|
35
|
+
"@orpc/shared": "0.0.0-next.1b6aaae",
|
|
36
|
+
"@orpc/tanstack-query": "0.0.0-next.1b6aaae"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@tanstack/solid-query": "^5.
|
|
40
|
-
"zod": "^3.25.
|
|
39
|
+
"@tanstack/solid-query": "^5.80.2",
|
|
40
|
+
"zod": "^3.25.49"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "unbuild",
|