@orpc/experimental-react-swr 0.0.0-next.f5149a8 → 0.0.0-next.f724c58
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 +2 -2
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<image align="center" src="https://orpc.
|
|
2
|
+
<image align="center" src="https://orpc.dev/logo.webp" width=280 alt="oRPC logo" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<h1></h1>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
## Documentation
|
|
47
47
|
|
|
48
|
-
You can find the full documentation [here](https://orpc.
|
|
48
|
+
You can find the full documentation [here](https://orpc.dev).
|
|
49
49
|
|
|
50
50
|
## Packages
|
|
51
51
|
|
package/dist/index.d.mts
CHANGED
|
@@ -64,7 +64,7 @@ interface GeneralUtils<TInput> {
|
|
|
64
64
|
/**
|
|
65
65
|
* Generate a matcher function that returns `true` if the key matches the specified conditions.
|
|
66
66
|
*
|
|
67
|
-
* @see {@link https://orpc.
|
|
67
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#manual-revalidation React SWR Manual Revalidation Docs}
|
|
68
68
|
*/
|
|
69
69
|
matcher<TStrategy extends MatcherStrategy>(...rest: MaybeOptionalOptions<CreateMatcherOptions<TStrategy, TInput>>): Matcher;
|
|
70
70
|
}
|
|
@@ -77,37 +77,37 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
|
|
|
77
77
|
/**
|
|
78
78
|
* Calling corresponding procedure client
|
|
79
79
|
*
|
|
80
|
-
* @see {@link https://orpc.
|
|
80
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#calling-clients React SWR Calling Procedure Client Docs}
|
|
81
81
|
*/
|
|
82
82
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
|
83
83
|
/**
|
|
84
84
|
* Generate a **full matching** key for SWR operations.
|
|
85
85
|
*
|
|
86
|
-
* @see {@link https://orpc.
|
|
86
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#data-fetching React SWR Key Docs}
|
|
87
87
|
*/
|
|
88
88
|
key(...rest: MaybeOptionalOptions<CreateKeyOptions<TInput>>): Key<TInput>;
|
|
89
89
|
/**
|
|
90
90
|
* Generate a fetcher function for use with useSWR, useSWRInfinite, and other SWR hooks.
|
|
91
91
|
*
|
|
92
|
-
* @see {@link https://orpc.
|
|
92
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#data-fetching React SWR Data Fetching Docs}
|
|
93
93
|
*/
|
|
94
94
|
fetcher(...rest: MaybeOptionalOptions<CreateFetcherOptions<TClientContext>>): Fetcher<TInput, TOutput>;
|
|
95
95
|
/**
|
|
96
|
-
* Generate a subscriber function that subscribes to an [Event Iterator](https://orpc.
|
|
96
|
+
* Generate a subscriber function that subscribes to an [Event Iterator](https://orpc.dev/docs/event-iterator) for use with useSWRSubscription, etc.
|
|
97
97
|
*
|
|
98
|
-
* @see {@link https://orpc.
|
|
98
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#subscriptions React SWR Subscriptions Docs}
|
|
99
99
|
*/
|
|
100
100
|
subscriber(...rest: MaybeOptionalOptions<CreateSubscriberOptions<TClientContext>>): Subscriber<TInput, InferAsyncIterableYield<TOutput>[], TError>;
|
|
101
101
|
/**
|
|
102
|
-
* Generate a live subscriber that subscribes to the latest events from an [Event Iterator](https://orpc.
|
|
102
|
+
* Generate a live subscriber that subscribes to the latest events from an [Event Iterator](https://orpc.dev/docs/event-iterator) for use with useSWRSubscription, etc.
|
|
103
103
|
*
|
|
104
|
-
* @see {@link https://orpc.
|
|
104
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#subscriptions React SWR Subscriptions Docs}
|
|
105
105
|
*/
|
|
106
106
|
liveSubscriber(...rest: MaybeOptionalOptions<CreateFetcherOptions<TClientContext>>): Subscriber<TInput, InferAsyncIterableYield<TOutput>, TError>;
|
|
107
107
|
/**
|
|
108
108
|
* Generate a mutator function for use with useSWRMutation, etc.
|
|
109
109
|
*
|
|
110
|
-
* @see {@link https://orpc.
|
|
110
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#mutations React SWR Mutations Docs}
|
|
111
111
|
*/
|
|
112
112
|
mutator(...rest: MaybeOptionalOptions<CreateFetcherOptions<TClientContext>>): Mutator<TInput, TOutput>;
|
|
113
113
|
}
|
|
@@ -123,7 +123,7 @@ interface CreateRouterUtilsOptions {
|
|
|
123
123
|
* Create a swr router utils from a client.
|
|
124
124
|
*
|
|
125
125
|
* @info Both client-side and server-side clients are supported.
|
|
126
|
-
* @see {@link https://orpc.
|
|
126
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr React SWR Integration}
|
|
127
127
|
*/
|
|
128
128
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions): RouterUtils<T>;
|
|
129
129
|
|
package/dist/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ interface GeneralUtils<TInput> {
|
|
|
64
64
|
/**
|
|
65
65
|
* Generate a matcher function that returns `true` if the key matches the specified conditions.
|
|
66
66
|
*
|
|
67
|
-
* @see {@link https://orpc.
|
|
67
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#manual-revalidation React SWR Manual Revalidation Docs}
|
|
68
68
|
*/
|
|
69
69
|
matcher<TStrategy extends MatcherStrategy>(...rest: MaybeOptionalOptions<CreateMatcherOptions<TStrategy, TInput>>): Matcher;
|
|
70
70
|
}
|
|
@@ -77,37 +77,37 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
|
|
|
77
77
|
/**
|
|
78
78
|
* Calling corresponding procedure client
|
|
79
79
|
*
|
|
80
|
-
* @see {@link https://orpc.
|
|
80
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#calling-clients React SWR Calling Procedure Client Docs}
|
|
81
81
|
*/
|
|
82
82
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
|
83
83
|
/**
|
|
84
84
|
* Generate a **full matching** key for SWR operations.
|
|
85
85
|
*
|
|
86
|
-
* @see {@link https://orpc.
|
|
86
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#data-fetching React SWR Key Docs}
|
|
87
87
|
*/
|
|
88
88
|
key(...rest: MaybeOptionalOptions<CreateKeyOptions<TInput>>): Key<TInput>;
|
|
89
89
|
/**
|
|
90
90
|
* Generate a fetcher function for use with useSWR, useSWRInfinite, and other SWR hooks.
|
|
91
91
|
*
|
|
92
|
-
* @see {@link https://orpc.
|
|
92
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#data-fetching React SWR Data Fetching Docs}
|
|
93
93
|
*/
|
|
94
94
|
fetcher(...rest: MaybeOptionalOptions<CreateFetcherOptions<TClientContext>>): Fetcher<TInput, TOutput>;
|
|
95
95
|
/**
|
|
96
|
-
* Generate a subscriber function that subscribes to an [Event Iterator](https://orpc.
|
|
96
|
+
* Generate a subscriber function that subscribes to an [Event Iterator](https://orpc.dev/docs/event-iterator) for use with useSWRSubscription, etc.
|
|
97
97
|
*
|
|
98
|
-
* @see {@link https://orpc.
|
|
98
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#subscriptions React SWR Subscriptions Docs}
|
|
99
99
|
*/
|
|
100
100
|
subscriber(...rest: MaybeOptionalOptions<CreateSubscriberOptions<TClientContext>>): Subscriber<TInput, InferAsyncIterableYield<TOutput>[], TError>;
|
|
101
101
|
/**
|
|
102
|
-
* Generate a live subscriber that subscribes to the latest events from an [Event Iterator](https://orpc.
|
|
102
|
+
* Generate a live subscriber that subscribes to the latest events from an [Event Iterator](https://orpc.dev/docs/event-iterator) for use with useSWRSubscription, etc.
|
|
103
103
|
*
|
|
104
|
-
* @see {@link https://orpc.
|
|
104
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#subscriptions React SWR Subscriptions Docs}
|
|
105
105
|
*/
|
|
106
106
|
liveSubscriber(...rest: MaybeOptionalOptions<CreateFetcherOptions<TClientContext>>): Subscriber<TInput, InferAsyncIterableYield<TOutput>, TError>;
|
|
107
107
|
/**
|
|
108
108
|
* Generate a mutator function for use with useSWRMutation, etc.
|
|
109
109
|
*
|
|
110
|
-
* @see {@link https://orpc.
|
|
110
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr#mutations React SWR Mutations Docs}
|
|
111
111
|
*/
|
|
112
112
|
mutator(...rest: MaybeOptionalOptions<CreateFetcherOptions<TClientContext>>): Mutator<TInput, TOutput>;
|
|
113
113
|
}
|
|
@@ -123,7 +123,7 @@ interface CreateRouterUtilsOptions {
|
|
|
123
123
|
* Create a swr router utils from a client.
|
|
124
124
|
*
|
|
125
125
|
* @info Both client-side and server-side clients are supported.
|
|
126
|
-
* @see {@link https://orpc.
|
|
126
|
+
* @see {@link https://orpc.dev/docs/integrations/react-swr React SWR Integration}
|
|
127
127
|
*/
|
|
128
128
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions): RouterUtils<T>;
|
|
129
129
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/experimental-react-swr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.f724c58",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://orpc.
|
|
6
|
+
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/unnoq/orpc.git",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
],
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"swr": ">=2.3.6",
|
|
28
|
-
"@orpc/client": "0.0.0-next.
|
|
28
|
+
"@orpc/client": "0.0.0-next.f724c58"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@orpc/shared": "0.0.0-next.
|
|
31
|
+
"@orpc/shared": "0.0.0-next.f724c58"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"swr": "^2.3.6"
|