@orpc/vue-colada 1.0.0-beta.3 → 1.0.0-beta.5

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 CHANGED
@@ -53,6 +53,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
53
53
  - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Build your API contract.
54
54
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
55
55
  - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
56
+ - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
56
57
  - [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
57
58
  - [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
58
59
  - [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
@@ -96,6 +97,14 @@ export function Setup() {
96
97
  }
97
98
  ```
98
99
 
100
+ ## Sponsors
101
+
102
+ <p align="center">
103
+ <a href="https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg">
104
+ <img src='https://cdn.jsdelivr.net/gh/unnoq/unnoq/sponsors.svg'/>
105
+ </a>
106
+ </p>
107
+
99
108
  ## License
100
109
 
101
110
  Distributed under the MIT License. See [LICENSE](https://github.com/unnoq/orpc/blob/main/LICENSE) for more information.
package/dist/index.d.mts CHANGED
@@ -14,7 +14,7 @@ interface GeneralUtils<TInput> {
14
14
  declare function createGeneralUtils<TInput>(path: string[]): GeneralUtils<TInput>;
15
15
 
16
16
  type UseQueryFnContext = Parameters<UseQueryOptions<any>['query']>[0];
17
- type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TInitialData extends TOutput | undefined> = (undefined extends TInput ? {
17
+ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TInitialData extends TOutput | undefined> = (undefined extends TInput ? {
18
18
  input?: MaybeRefOrGetter<TInput>;
19
19
  } : {
20
20
  input: MaybeRefOrGetter<TInput>;
@@ -23,15 +23,15 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
23
23
  } : {
24
24
  context: MaybeRefOrGetter<TClientContext>;
25
25
  }) & SetOptional<QueryOptions<TOutput, TError, TInitialData>, 'key' | 'query'>;
26
- type QueryOptions<TOutput, TError extends Error, TInitialData extends TOutput | undefined> = UseQueryOptions<TOutput, TError, TInitialData>;
27
- type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = (Record<never, never> extends TClientContext ? {
26
+ type QueryOptions<TOutput, TError, TInitialData extends TOutput | undefined> = UseQueryOptions<TOutput, TError, TInitialData>;
27
+ type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext extends Record<any, any>> = (Record<never, never> extends TClientContext ? {
28
28
  context?: MaybeRefOrGetter<TClientContext>;
29
29
  } : {
30
30
  context: MaybeRefOrGetter<TClientContext>;
31
31
  }) & SetOptional<UseMutationOptions<TOutput, TInput, TError, TMutationContext>, 'mutation'>;
32
- type MutationOptions<TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
32
+ type MutationOptions<TInput, TOutput, TError, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
33
33
 
34
- interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
34
+ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError> {
35
35
  call: Client<TClientContext, TInput, TOutput, TError>;
36
36
  queryOptions<UInitialData extends TOutput | undefined = TOutput | undefined>(...rest: MaybeOptionalOptions<QueryOptionsIn<TClientContext, TInput, TOutput, TError, UInitialData>>): QueryOptions<TOutput, TError, UInitialData>;
37
37
  mutationOptions<UMutationContext extends Record<any, any> = _EmptyObject>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
@@ -39,7 +39,7 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
39
39
  interface CreateProcedureUtilsOptions {
40
40
  path: string[];
41
41
  }
42
- declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error>(client: Client<TClientContext, TInput, TOutput, TError>, options: CreateProcedureUtilsOptions): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
42
+ declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError>(client: Client<TClientContext, TInput, TOutput, TError>, options: CreateProcedureUtilsOptions): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
43
43
 
44
44
  type RouterUtils<T extends NestedClient<any>> = T extends Client<infer UClientContext, infer UInput, infer UOutput, infer UError> ? ProcedureUtils<UClientContext, UInput, UOutput, UError> & GeneralUtils<UInput> : {
45
45
  [K in keyof T]: T[K] extends NestedClient<any> ? RouterUtils<T[K]> : never;
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ interface GeneralUtils<TInput> {
14
14
  declare function createGeneralUtils<TInput>(path: string[]): GeneralUtils<TInput>;
15
15
 
16
16
  type UseQueryFnContext = Parameters<UseQueryOptions<any>['query']>[0];
17
- type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TInitialData extends TOutput | undefined> = (undefined extends TInput ? {
17
+ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TInitialData extends TOutput | undefined> = (undefined extends TInput ? {
18
18
  input?: MaybeRefOrGetter<TInput>;
19
19
  } : {
20
20
  input: MaybeRefOrGetter<TInput>;
@@ -23,15 +23,15 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
23
23
  } : {
24
24
  context: MaybeRefOrGetter<TClientContext>;
25
25
  }) & SetOptional<QueryOptions<TOutput, TError, TInitialData>, 'key' | 'query'>;
26
- type QueryOptions<TOutput, TError extends Error, TInitialData extends TOutput | undefined> = UseQueryOptions<TOutput, TError, TInitialData>;
27
- type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = (Record<never, never> extends TClientContext ? {
26
+ type QueryOptions<TOutput, TError, TInitialData extends TOutput | undefined> = UseQueryOptions<TOutput, TError, TInitialData>;
27
+ type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext extends Record<any, any>> = (Record<never, never> extends TClientContext ? {
28
28
  context?: MaybeRefOrGetter<TClientContext>;
29
29
  } : {
30
30
  context: MaybeRefOrGetter<TClientContext>;
31
31
  }) & SetOptional<UseMutationOptions<TOutput, TInput, TError, TMutationContext>, 'mutation'>;
32
- type MutationOptions<TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
32
+ type MutationOptions<TInput, TOutput, TError, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
33
33
 
34
- interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
34
+ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError> {
35
35
  call: Client<TClientContext, TInput, TOutput, TError>;
36
36
  queryOptions<UInitialData extends TOutput | undefined = TOutput | undefined>(...rest: MaybeOptionalOptions<QueryOptionsIn<TClientContext, TInput, TOutput, TError, UInitialData>>): QueryOptions<TOutput, TError, UInitialData>;
37
37
  mutationOptions<UMutationContext extends Record<any, any> = _EmptyObject>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
@@ -39,7 +39,7 @@ interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput,
39
39
  interface CreateProcedureUtilsOptions {
40
40
  path: string[];
41
41
  }
42
- declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error>(client: Client<TClientContext, TInput, TOutput, TError>, options: CreateProcedureUtilsOptions): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
42
+ declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError>(client: Client<TClientContext, TInput, TOutput, TError>, options: CreateProcedureUtilsOptions): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
43
43
 
44
44
  type RouterUtils<T extends NestedClient<any>> = T extends Client<infer UClientContext, infer UInput, infer UOutput, infer UError> ? ProcedureUtils<UClientContext, UInput, UOutput, UError> & GeneralUtils<UInput> : {
45
45
  [K in keyof T]: T[K] extends NestedClient<any> ? RouterUtils<T[K]> : never;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/vue-colada",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.3",
4
+ "version": "1.0.0-beta.5",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -32,8 +32,8 @@
32
32
  "vue": ">=3.3.0"
33
33
  },
34
34
  "dependencies": {
35
- "@orpc/client": "1.0.0-beta.3",
36
- "@orpc/shared": "1.0.0-beta.3"
35
+ "@orpc/client": "1.0.0-beta.5",
36
+ "@orpc/shared": "1.0.0-beta.5"
37
37
  },
38
38
  "devDependencies": {
39
39
  "pinia": "^2.3.0"