@orpc/vue-colada 0.0.0-next.f538070 → 0.0.0-next.f81b4a2
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/dist/index.d.mts +28 -1
- package/dist/index.d.ts +28 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
@@ -9,6 +9,11 @@ interface BuildKeyOptions<TInput> {
|
|
9
9
|
declare function buildKey<TInput>(path: string[], options?: BuildKeyOptions<TInput>): EntryKey;
|
10
10
|
|
11
11
|
interface GeneralUtils<TInput> {
|
12
|
+
/**
|
13
|
+
* Generate a query/mutation key for checking status, invalidate, set, get, etc.
|
14
|
+
*
|
15
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#query-mutation-key Pinia Colada Query/Mutation Key Docs}
|
16
|
+
*/
|
12
17
|
key(options?: BuildKeyOptions<TInput>): EntryKey;
|
13
18
|
}
|
14
19
|
declare function createGeneralUtils<TInput>(path: string[]): GeneralUtils<TInput>;
|
@@ -32,8 +37,23 @@ type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
|
|
32
37
|
type MutationOptions<TInput, TOutput, TError, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
|
33
38
|
|
34
39
|
interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError> {
|
40
|
+
/**
|
41
|
+
* Calling corresponding procedure client
|
42
|
+
*
|
43
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#calling-procedure-clients Pinia Colada Calling Procedure Client Docs}
|
44
|
+
*/
|
35
45
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
46
|
+
/**
|
47
|
+
* Generate options used for useQuery/...
|
48
|
+
*
|
49
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#query-options-utility Pinia Colada Query Options Utility Docs}
|
50
|
+
*/
|
36
51
|
queryOptions<UInitialData extends TOutput | undefined = TOutput | undefined>(...rest: MaybeOptionalOptions<QueryOptionsIn<TClientContext, TInput, TOutput, TError, UInitialData>>): QueryOptions<TOutput, TError, UInitialData>;
|
52
|
+
/**
|
53
|
+
* Generate options used for useMutation/...
|
54
|
+
*
|
55
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#mutation-options Pinia Colada Mutation Options Docs}
|
56
|
+
*/
|
37
57
|
mutationOptions<UMutationContext extends Record<any, any> = _EmptyObject>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
|
38
58
|
}
|
39
59
|
interface CreateProcedureUtilsOptions {
|
@@ -47,6 +67,13 @@ type RouterUtils<T extends NestedClient<any>> = T extends Client<infer UClientCo
|
|
47
67
|
interface CreateRouterUtilsOptions {
|
48
68
|
path?: string[];
|
49
69
|
}
|
70
|
+
/**
|
71
|
+
* Create a router utils from a client.
|
72
|
+
*
|
73
|
+
* @info Both client-side and server-side clients are supported.
|
74
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada Pinia Colada Docs}
|
75
|
+
*/
|
50
76
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions): RouterUtils<T>;
|
51
77
|
|
52
|
-
export {
|
78
|
+
export { buildKey, createGeneralUtils, createRouterUtils as createORPCVueColadaUtils, createProcedureUtils, createRouterUtils };
|
79
|
+
export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptions, QueryOptionsIn, RouterUtils, UseQueryFnContext };
|
package/dist/index.d.ts
CHANGED
@@ -9,6 +9,11 @@ interface BuildKeyOptions<TInput> {
|
|
9
9
|
declare function buildKey<TInput>(path: string[], options?: BuildKeyOptions<TInput>): EntryKey;
|
10
10
|
|
11
11
|
interface GeneralUtils<TInput> {
|
12
|
+
/**
|
13
|
+
* Generate a query/mutation key for checking status, invalidate, set, get, etc.
|
14
|
+
*
|
15
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#query-mutation-key Pinia Colada Query/Mutation Key Docs}
|
16
|
+
*/
|
12
17
|
key(options?: BuildKeyOptions<TInput>): EntryKey;
|
13
18
|
}
|
14
19
|
declare function createGeneralUtils<TInput>(path: string[]): GeneralUtils<TInput>;
|
@@ -32,8 +37,23 @@ type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TE
|
|
32
37
|
type MutationOptions<TInput, TOutput, TError, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
|
33
38
|
|
34
39
|
interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError> {
|
40
|
+
/**
|
41
|
+
* Calling corresponding procedure client
|
42
|
+
*
|
43
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#calling-procedure-clients Pinia Colada Calling Procedure Client Docs}
|
44
|
+
*/
|
35
45
|
call: Client<TClientContext, TInput, TOutput, TError>;
|
46
|
+
/**
|
47
|
+
* Generate options used for useQuery/...
|
48
|
+
*
|
49
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#query-options-utility Pinia Colada Query Options Utility Docs}
|
50
|
+
*/
|
36
51
|
queryOptions<UInitialData extends TOutput | undefined = TOutput | undefined>(...rest: MaybeOptionalOptions<QueryOptionsIn<TClientContext, TInput, TOutput, TError, UInitialData>>): QueryOptions<TOutput, TError, UInitialData>;
|
52
|
+
/**
|
53
|
+
* Generate options used for useMutation/...
|
54
|
+
*
|
55
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada#mutation-options Pinia Colada Mutation Options Docs}
|
56
|
+
*/
|
37
57
|
mutationOptions<UMutationContext extends Record<any, any> = _EmptyObject>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
|
38
58
|
}
|
39
59
|
interface CreateProcedureUtilsOptions {
|
@@ -47,6 +67,13 @@ type RouterUtils<T extends NestedClient<any>> = T extends Client<infer UClientCo
|
|
47
67
|
interface CreateRouterUtilsOptions {
|
48
68
|
path?: string[];
|
49
69
|
}
|
70
|
+
/**
|
71
|
+
* Create a router utils from a client.
|
72
|
+
*
|
73
|
+
* @info Both client-side and server-side clients are supported.
|
74
|
+
* @see {@link https://orpc.unnoq.com/docs/pinia-colada Pinia Colada Docs}
|
75
|
+
*/
|
50
76
|
declare function createRouterUtils<T extends NestedClient<any>>(client: T, options?: CreateRouterUtilsOptions): RouterUtils<T>;
|
51
77
|
|
52
|
-
export {
|
78
|
+
export { buildKey, createGeneralUtils, createRouterUtils as createORPCVueColadaUtils, createProcedureUtils, createRouterUtils };
|
79
|
+
export type { BuildKeyOptions, CreateProcedureUtilsOptions, CreateRouterUtilsOptions, GeneralUtils, MutationOptions, MutationOptionsIn, ProcedureUtils, QueryOptions, QueryOptionsIn, RouterUtils, UseQueryFnContext };
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/vue-colada",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next.
|
4
|
+
"version": "0.0.0-next.f81b4a2",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -32,11 +32,11 @@
|
|
32
32
|
"vue": ">=3.3.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@orpc/client": "0.0.0-next.
|
36
|
-
"@orpc/shared": "0.0.0-next.
|
35
|
+
"@orpc/client": "0.0.0-next.f81b4a2",
|
36
|
+
"@orpc/shared": "0.0.0-next.f81b4a2"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"pinia": "^
|
39
|
+
"pinia": "^3.0.0"
|
40
40
|
},
|
41
41
|
"scripts": {
|
42
42
|
"build": "unbuild",
|