@orpc/vue-colada 0.44.0 → 0.45.1

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ClientContext, Client, NestedClient } from '@orpc/client';
2
- import { EntryKey, UseQueryOptions, UseMutationOptions } from '@pinia/colada';
2
+ import { EntryKey, UseQueryOptions, UseMutationOptions, _EmptyObject } from '@pinia/colada';
3
3
  import { AnyFunction, SetOptional, MaybeOptionalOptions } from '@orpc/shared';
4
4
  import { MaybeRef } from 'vue';
5
5
 
@@ -27,17 +27,17 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
27
27
  context: MaybeRefDeep<TClientContext>;
28
28
  }) & SetOptional<UseQueryOptions<TOutput, TError>, 'key' | 'query'>;
29
29
  type QueryOptions<TOutput, TError extends Error> = UseQueryOptions<TOutput, TError>;
30
- type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> = (Record<never, never> extends TClientContext ? {
30
+ type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = (Record<never, never> extends TClientContext ? {
31
31
  context?: MaybeRefDeep<TClientContext>;
32
32
  } : {
33
33
  context: MaybeRefDeep<TClientContext>;
34
- }) & SetOptional<UseMutationOptions<TOutput, TInput, TError>, 'mutation'>;
35
- type MutationOptions<TInput, TOutput, TError extends Error> = UseMutationOptions<TOutput, TInput, TError>;
34
+ }) & SetOptional<UseMutationOptions<TOutput, TInput, TError, TMutationContext>, 'mutation'>;
35
+ type MutationOptions<TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
36
36
 
37
37
  interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
38
38
  call: Client<TClientContext, TInput, TOutput, TError>;
39
39
  queryOptions(...rest: MaybeOptionalOptions<QueryOptionsIn<TClientContext, TInput, TOutput, TError>>): QueryOptions<TOutput, TError>;
40
- mutationOptions(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError>>): MutationOptions<TInput, TOutput, TError>;
40
+ mutationOptions<UMutationContext extends Record<any, any> = _EmptyObject>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
41
41
  }
42
42
  declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error>(client: Client<TClientContext, TInput, TOutput, TError>, path: string[]): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
43
43
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ClientContext, Client, NestedClient } from '@orpc/client';
2
- import { EntryKey, UseQueryOptions, UseMutationOptions } from '@pinia/colada';
2
+ import { EntryKey, UseQueryOptions, UseMutationOptions, _EmptyObject } from '@pinia/colada';
3
3
  import { AnyFunction, SetOptional, MaybeOptionalOptions } from '@orpc/shared';
4
4
  import { MaybeRef } from 'vue';
5
5
 
@@ -27,17 +27,17 @@ type QueryOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TErro
27
27
  context: MaybeRefDeep<TClientContext>;
28
28
  }) & SetOptional<UseQueryOptions<TOutput, TError>, 'key' | 'query'>;
29
29
  type QueryOptions<TOutput, TError extends Error> = UseQueryOptions<TOutput, TError>;
30
- type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> = (Record<never, never> extends TClientContext ? {
30
+ type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = (Record<never, never> extends TClientContext ? {
31
31
  context?: MaybeRefDeep<TClientContext>;
32
32
  } : {
33
33
  context: MaybeRefDeep<TClientContext>;
34
- }) & SetOptional<UseMutationOptions<TOutput, TInput, TError>, 'mutation'>;
35
- type MutationOptions<TInput, TOutput, TError extends Error> = UseMutationOptions<TOutput, TInput, TError>;
34
+ }) & SetOptional<UseMutationOptions<TOutput, TInput, TError, TMutationContext>, 'mutation'>;
35
+ type MutationOptions<TInput, TOutput, TError extends Error, TMutationContext extends Record<any, any>> = UseMutationOptions<TOutput, TInput, TError, TMutationContext>;
36
36
 
37
37
  interface ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error> {
38
38
  call: Client<TClientContext, TInput, TOutput, TError>;
39
39
  queryOptions(...rest: MaybeOptionalOptions<QueryOptionsIn<TClientContext, TInput, TOutput, TError>>): QueryOptions<TOutput, TError>;
40
- mutationOptions(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError>>): MutationOptions<TInput, TOutput, TError>;
40
+ mutationOptions<UMutationContext extends Record<any, any> = _EmptyObject>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): MutationOptions<TInput, TOutput, TError, UMutationContext>;
41
41
  }
42
42
  declare function createProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError extends Error>(client: Client<TClientContext, TInput, TOutput, TError>, path: string[]): ProcedureUtils<TClientContext, TInput, TOutput, TError>;
43
43
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/vue-colada",
3
3
  "type": "module",
4
- "version": "0.44.0",
4
+ "version": "0.45.1",
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": "0.44.0",
36
- "@orpc/shared": "0.44.0"
35
+ "@orpc/client": "0.45.1",
36
+ "@orpc/shared": "0.45.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "pinia": "^2.3.0"