@orpc/pinia-colada 2.0.0-beta.47 → 2.0.0-beta.49

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.
@@ -0,0 +1,38 @@
1
+ import { stringifyJSON, throwIfAborted } from '@orpc/shared';
2
+ /**
3
+ * A Pinia Colada query function that publishes each streamed chunk to the
4
+ * cache entry as it arrives, replacing the previous value.
5
+ */
6
+ export function liveQuery(queryFn, { settleOnFirstData = false } = {}) {
7
+ return async (context) => {
8
+ const { entry, signal } = context;
9
+ // a fetch cut short (cancelled, superseded, or its last component left) reopens when used again
10
+ const markStale = () => {
11
+ entry.when = 0;
12
+ };
13
+ if (signal.aborted) {
14
+ markStale();
15
+ }
16
+ signal.addEventListener('abort', markStale, { once: true });
17
+ const stream = await queryFn(context);
18
+ if (signal.aborted) {
19
+ await stream[Symbol.asyncIterator]().return?.();
20
+ throw signal.reason;
21
+ }
22
+ let last;
23
+ for await (const chunk of stream) {
24
+ throwIfAborted(signal);
25
+ last = { chunk };
26
+ entry.state.value = { status: 'success', data: chunk, error: null };
27
+ if (settleOnFirstData) {
28
+ break;
29
+ }
30
+ }
31
+ // a stream that ends on abort must not be stored as fresh data
32
+ throwIfAborted(signal);
33
+ if (!last) {
34
+ throw new TypeError(`Live query for ${stringifyJSON(entry.key)} did not yield any data. Ensure the query function returns an AsyncIterable with at least one chunk.`);
35
+ }
36
+ return last.chunk;
37
+ };
38
+ }
package/dist/meta.d.ts ADDED
@@ -0,0 +1,42 @@
1
+ import type { AnyNestedClient, ClientContext, InferClientContext, InferClientError } from '@orpc/client';
2
+ import type { AnySchema, ErrorMap, InferSchemaInput, InferSchemaOutput, Meta, MetaPlugin, ORPCErrorFromErrorMap, RouterContract } from '@orpc/contract';
3
+ import type { ThrowableError } from '@orpc/shared';
4
+ import type { OperationKeyBaseOptions } from './key.ts';
5
+ import type { RouterUtilsPlugin } from './plugin.ts';
6
+ import type { ProcedureUtilsOptions } from './procedure-utils.ts';
7
+ export type PiniaColadaMetaOptions<TClientContext extends ClientContext, TInput, TOutput, TError> = Omit<ProcedureUtilsOptions<TClientContext, TInput, TOutput, TError>, keyof OperationKeyBaseOptions>;
8
+ export interface PiniaColadaMetaPlugin<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap> extends MetaPlugin<TInputSchema, TOutputSchema, TErrorMap> {
9
+ name: '~pinia-colada';
10
+ }
11
+ /**
12
+ * Define base Pinia Colada options and interceptors on a procedure contract.
13
+ * Applied multiple times, later options are spread-merged with higher priority
14
+ * while interceptors are concatenated. A key explicitly set to `undefined`
15
+ * resets the value from earlier applications instead of merging.
16
+ *
17
+ * Apply them to router utils with {@link ContractOptionsUtilsPlugin}.
18
+ *
19
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#contract-options-plugin | Pinia Colada Integration - Contract Options Plugin}
20
+ */
21
+ export declare function piniaColada<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap>(options: PiniaColadaMetaOptions<ClientContext, InferSchemaInput<TInputSchema>, InferSchemaOutput<TOutputSchema>, ORPCErrorFromErrorMap<TErrorMap> | ThrowableError>): PiniaColadaMetaPlugin<TInputSchema, TOutputSchema, TErrorMap>;
22
+ export declare function getPiniaColadaMeta(procedureOrLazy: {
23
+ '~orpc': {
24
+ meta: Meta;
25
+ };
26
+ }): PiniaColadaMetaOptions<ClientContext, unknown, unknown, ThrowableError> | undefined;
27
+ /**
28
+ * Router utils plugin that applies base options defined via {@link piniaColada}
29
+ * on the given router contract. Meta options act as the base layer: options defined
30
+ * on the utils override them, and utils interceptors run after meta interceptors.
31
+ *
32
+ * The contract shape must match the client the utils are created from,
33
+ * so pass the root router contract when utils paths start from the root.
34
+ *
35
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#contract-options-plugin | Pinia Colada Integration - Contract Options Plugin}
36
+ */
37
+ export declare class ContractOptionsUtilsPlugin<T extends AnyNestedClient = AnyNestedClient> implements RouterUtilsPlugin<T> {
38
+ private readonly contract;
39
+ readonly name = "~contract-options";
40
+ constructor(contract: RouterContract);
41
+ initProcedureOptions(path: string[], options: ProcedureUtilsOptions<InferClientContext<T>, any, any, InferClientError<T>>): ProcedureUtilsOptions<InferClientContext<T>, any, any, InferClientError<T>>;
42
+ }
package/dist/meta.js ADDED
@@ -0,0 +1,55 @@
1
+ import { getRouterContract, ProcedureContract } from '@orpc/contract';
2
+ import { mergeProcedureUtilsOptions } from './procedure-utils.js';
3
+ /**
4
+ * Define base Pinia Colada options and interceptors on a procedure contract.
5
+ * Applied multiple times, later options are spread-merged with higher priority
6
+ * while interceptors are concatenated. A key explicitly set to `undefined`
7
+ * resets the value from earlier applications instead of merging.
8
+ *
9
+ * Apply them to router utils with {@link ContractOptionsUtilsPlugin}.
10
+ *
11
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#contract-options-plugin | Pinia Colada Integration - Contract Options Plugin}
12
+ */
13
+ export function piniaColada(options) {
14
+ return {
15
+ name: '~pinia-colada',
16
+ init(meta) {
17
+ const current = meta['~pinia-colada'];
18
+ return {
19
+ ...meta,
20
+ '~pinia-colada': current ? mergeProcedureUtilsOptions(current, options) : options,
21
+ };
22
+ },
23
+ };
24
+ }
25
+ export function getPiniaColadaMeta(procedureOrLazy) {
26
+ return procedureOrLazy['~orpc'].meta['~pinia-colada'];
27
+ }
28
+ /**
29
+ * Router utils plugin that applies base options defined via {@link piniaColada}
30
+ * on the given router contract. Meta options act as the base layer: options defined
31
+ * on the utils override them, and utils interceptors run after meta interceptors.
32
+ *
33
+ * The contract shape must match the client the utils are created from,
34
+ * so pass the root router contract when utils paths start from the root.
35
+ *
36
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#contract-options-plugin | Pinia Colada Integration - Contract Options Plugin}
37
+ */
38
+ export class ContractOptionsUtilsPlugin {
39
+ contract;
40
+ name = '~contract-options';
41
+ constructor(contract) {
42
+ this.contract = contract;
43
+ }
44
+ initProcedureOptions(path, options) {
45
+ const procedure = getRouterContract(this.contract, path);
46
+ if (!(procedure instanceof ProcedureContract)) {
47
+ return options;
48
+ }
49
+ const base = getPiniaColadaMeta(procedure);
50
+ if (!base) {
51
+ return options;
52
+ }
53
+ return mergeProcedureUtilsOptions(base, options);
54
+ }
55
+ }
@@ -0,0 +1,46 @@
1
+ import type { AnyNestedClient, InferClientContext, InferClientError } from '@orpc/client';
2
+ import type { OrderablePlugin } from '@orpc/shared';
3
+ import type { ProcedureUtilsOptions } from './procedure-utils.ts';
4
+ import type { RouterUtilsOptions } from './router-utils.ts';
5
+ export interface RouterUtilsPlugin<T extends AnyNestedClient> extends OrderablePlugin {
6
+ /**
7
+ * Initializes the router utils plugin and returns updated router utils options.
8
+ * Called once per plugin instance during composition.
9
+ *
10
+ * This method allows plugins to wrap, extend, or transform router utils options,
11
+ * such as interceptors or configuration.
12
+ *
13
+ * @param options - The current router utils options from previous plugins or base configuration
14
+ * @returns Transformed router utils options with this plugin's modifications applied
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * init(options) {
19
+ * return {
20
+ * ...options,
21
+ * mutationInterceptors: [...(options.mutationInterceptors ?? []), myInterceptor]
22
+ * }
23
+ * }
24
+ * ```
25
+ */
26
+ init?(options: RouterUtilsOptions<T>): RouterUtilsOptions<T>;
27
+ /**
28
+ * Initializes per-procedure router utils options and returns updated options.
29
+ * Called once per procedure utils instance during composition.
30
+ *
31
+ * This method allows plugins to customize merged procedure-specific defaults,
32
+ * such as query or mutation options, for the current path.
33
+ *
34
+ * @param path - The current procedure path
35
+ * @param options - The merged procedure utils options for the current procedure
36
+ * @returns Transformed procedure utils options with this plugin's modifications applied
37
+ */
38
+ initProcedureOptions?(path: string[], options: ProcedureUtilsOptions<InferClientContext<T>, any, any, InferClientError<T>>): ProcedureUtilsOptions<InferClientContext<T>, any, any, InferClientError<T>>;
39
+ }
40
+ export declare class CompositeRouterUtilsPlugin<T extends AnyNestedClient> implements RouterUtilsPlugin<T> {
41
+ protected readonly plugins: RouterUtilsPlugin<T>[];
42
+ readonly name = "~composite";
43
+ constructor(plugins?: RouterUtilsPlugin<T>[]);
44
+ init(options: RouterUtilsOptions<T>): RouterUtilsOptions<T>;
45
+ initProcedureOptions(path: string[], options: ProcedureUtilsOptions<InferClientContext<T>, any, any, InferClientError<T>>): ProcedureUtilsOptions<InferClientContext<T>, any, any, InferClientError<T>>;
46
+ }
package/dist/plugin.js ADDED
@@ -0,0 +1,25 @@
1
+ import { sortPlugins } from '@orpc/shared';
2
+ export class CompositeRouterUtilsPlugin {
3
+ plugins;
4
+ name = '~composite';
5
+ constructor(plugins = []) {
6
+ this.plugins = plugins;
7
+ this.plugins = sortPlugins(plugins);
8
+ }
9
+ init(options) {
10
+ for (const plugin of this.plugins) {
11
+ if (plugin.init) {
12
+ options = plugin.init(options);
13
+ }
14
+ }
15
+ return options;
16
+ }
17
+ initProcedureOptions(path, options) {
18
+ for (const plugin of this.plugins) {
19
+ if (plugin.initProcedureOptions) {
20
+ options = plugin.initProcedureOptions(path, options);
21
+ }
22
+ }
23
+ return options;
24
+ }
25
+ }
@@ -0,0 +1,190 @@
1
+ import type { Client, ClientContext } from '@orpc/client';
2
+ import type { Interceptor, MaybeOptionalOptions, PromiseWithError } from '@orpc/shared';
3
+ import type { _EmptyObject, EntryKeyTagged, UseInfiniteQueryData, UseInfiniteQueryFnContext } from '@pinia/colada';
4
+ import type { OperationKeyBaseOptions } from './key.ts';
5
+ import { SharedUtils } from './shared-utils.ts';
6
+ import type { InferLiveQueryOutput, InferStreamedQueryOutput, InfiniteKeyOptions, InfiniteOptionsIn, InfiniteOptionsOut, LiveOptionsIn, MutationKeyOptions, MutationOptionsIn, MutationOptionsOut, OperationContext, QueryKeyOptions, QueryOptionsIn, QueryOptionsOut, StreamedKeyOptions, StreamedOptionsIn, StreamedOptionsOut, UseMutationFnContext, UseQueryFnContext } from './types.ts';
7
+ export interface ProcedureUtilsQueryInterceptorOptions<TClientContext extends ClientContext, TInput> {
8
+ path: string[];
9
+ context: TClientContext & OperationContext;
10
+ input: TInput;
11
+ fnContext: UseQueryFnContext;
12
+ }
13
+ export type ProcedureUtilsQueryInterceptor<TClientContext extends ClientContext, TInput, TOutput, TError> = Interceptor<ProcedureUtilsQueryInterceptorOptions<TClientContext, TInput>, PromiseWithError<TOutput, TError>>;
14
+ export interface ProcedureUtilsStreamedInterceptorOptions<TClientContext extends ClientContext, TInput> extends ProcedureUtilsQueryInterceptorOptions<TClientContext, TInput> {
15
+ }
16
+ export type ProcedureUtilsStreamedInterceptor<TClientContext extends ClientContext, TInput, TOutput, TError> = Interceptor<ProcedureUtilsStreamedInterceptorOptions<TClientContext, TInput>, PromiseWithError<InferStreamedQueryOutput<TOutput>, TError>>;
17
+ export interface ProcedureUtilsLiveInterceptorOptions<TClientContext extends ClientContext, TInput> extends ProcedureUtilsQueryInterceptorOptions<TClientContext, TInput> {
18
+ }
19
+ export type ProcedureUtilsLiveInterceptor<TClientContext extends ClientContext, TInput, TOutput, TError> = Interceptor<ProcedureUtilsLiveInterceptorOptions<TClientContext, TInput>, PromiseWithError<InferLiveQueryOutput<TOutput>, TError>>;
20
+ export interface ProcedureUtilsInfiniteInterceptorOptions<TClientContext extends ClientContext, TInput> {
21
+ path: string[];
22
+ context: TClientContext & OperationContext;
23
+ input: TInput;
24
+ fnContext: UseInfiniteQueryFnContext<any, any, any, any>;
25
+ }
26
+ export type ProcedureUtilsInfiniteInterceptor<TClientContext extends ClientContext, TInput, TOutput, TError> = Interceptor<ProcedureUtilsInfiniteInterceptorOptions<TClientContext, TInput>, PromiseWithError<TOutput, TError>>;
27
+ export interface ProcedureUtilsMutationInterceptorOptions<TClientContext extends ClientContext, TInput> {
28
+ path: string[];
29
+ context: TClientContext & OperationContext;
30
+ input: TInput;
31
+ fnContext: UseMutationFnContext;
32
+ }
33
+ export type ProcedureUtilsMutationInterceptor<TClientContext extends ClientContext, TInput, TOutput, TError> = Interceptor<ProcedureUtilsMutationInterceptorOptions<TClientContext, TInput>, PromiseWithError<TOutput, TError>>;
34
+ /**
35
+ * Can be partial options for spread-merged options,
36
+ * or a function that receives per-call options and returns overridden this.options.
37
+ */
38
+ export type ProcedureUtilsModifier<T extends object> = Partial<T> | ((options: T) => T);
39
+ export interface ProcedureUtilsOptions<TClientContext extends ClientContext, TInput, TOutput, TError> extends OperationKeyBaseOptions {
40
+ /**
41
+ * Key options modifier for .queryKey and .queryOptions
42
+ * Can be partial options or a function that receives per-call options and returns override this.options.
43
+ */
44
+ queryKey?: ProcedureUtilsModifier<QueryKeyOptions<TInput>> | undefined;
45
+ /**
46
+ * Interceptors that intercept query inside .queryOptions, guaranteed to be executed.
47
+ */
48
+ queryInterceptors?: ProcedureUtilsQueryInterceptor<TClientContext, TInput, TOutput, TError>[] | undefined;
49
+ /**
50
+ * Options modifier for .queryOptions
51
+ * Can be partial options or a function that receives per-call options and returns override this.options.
52
+ */
53
+ queryOptions?: ProcedureUtilsModifier<QueryOptionsIn<TClientContext, TInput, TOutput, TError, TOutput | undefined>> | undefined;
54
+ /**
55
+ * Key options modifier for .streamedKey and .streamedOptions
56
+ * Can be partial options or a function that receives per-call options and returns override this.options.
57
+ */
58
+ streamedKey?: ProcedureUtilsModifier<StreamedKeyOptions<TInput>> | undefined;
59
+ /**
60
+ * Interceptors that intercept query inside .streamedOptions, guaranteed to be executed.
61
+ */
62
+ streamedInterceptors?: ProcedureUtilsStreamedInterceptor<TClientContext, TInput, TOutput, TError>[] | undefined;
63
+ /**
64
+ * Options modifier for .streamedOptions
65
+ * Can be partial options or a function that receives per-call options and returns override this.options.
66
+ */
67
+ streamedOptions?: ProcedureUtilsModifier<StreamedOptionsIn<TClientContext, TInput, InferStreamedQueryOutput<TOutput>, TError, InferStreamedQueryOutput<TOutput> | undefined>> | undefined;
68
+ /**
69
+ * Key options modifier for .liveKey and .liveOptions
70
+ * Can be partial options or a function that receives per-call options and returns override this.options.
71
+ */
72
+ liveKey?: ProcedureUtilsModifier<QueryKeyOptions<TInput>> | undefined;
73
+ /**
74
+ * Interceptors that intercept query inside .liveOptions, guaranteed to be executed.
75
+ */
76
+ liveInterceptors?: ProcedureUtilsLiveInterceptor<TClientContext, TInput, TOutput, TError>[] | undefined;
77
+ /**
78
+ * Options modifier for .liveOptions
79
+ * Can be partial options or a function that receives per-call options and returns override this.options.
80
+ */
81
+ liveOptions?: ProcedureUtilsModifier<LiveOptionsIn<TClientContext, TInput, InferLiveQueryOutput<TOutput>, TError, InferLiveQueryOutput<TOutput> | undefined>> | undefined;
82
+ /**
83
+ * Key options modifier for .infiniteKey and .infiniteOptions
84
+ * Can be partial options or a function that receives per-call options and returns override this.options.
85
+ */
86
+ infiniteKey?: ProcedureUtilsModifier<InfiniteKeyOptions<TInput, unknown>> | undefined;
87
+ /**
88
+ * Interceptors that intercept query inside .infiniteOptions, guaranteed to be executed.
89
+ */
90
+ infiniteInterceptors?: ProcedureUtilsInfiniteInterceptor<TClientContext, TInput, TOutput, TError>[] | undefined;
91
+ /**
92
+ * Options modifier for .infiniteOptions
93
+ * Can be partial options or a function that receives per-call options and returns override this.options.
94
+ */
95
+ infiniteOptions?: ProcedureUtilsModifier<InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, unknown, UseInfiniteQueryData<TOutput, unknown> | undefined>> | undefined;
96
+ /**
97
+ * Key options modifier for .mutationKey and .mutationOptions
98
+ * Can be partial options or a function that receives per-call options and returns override this.options.
99
+ */
100
+ mutationKey?: ProcedureUtilsModifier<MutationKeyOptions<TInput>> | undefined;
101
+ /**
102
+ * Interceptors that intercept mutation inside .mutationOptions, guaranteed to be executed.
103
+ */
104
+ mutationInterceptors?: ProcedureUtilsMutationInterceptor<TClientContext, TInput, TOutput, TError>[] | undefined;
105
+ /**
106
+ * Options modifier for .mutationOptions
107
+ * Can be partial options or a function that receives per-call options and returns override this.options.
108
+ */
109
+ mutationOptions?: ProcedureUtilsModifier<MutationOptionsIn<TClientContext, TInput, TOutput, TError, Record<any, any>>> | undefined;
110
+ }
111
+ export declare function isProcedureUtilsOptions(value: unknown): value is ProcedureUtilsOptions<any, any, any, any>;
112
+ /**
113
+ * Merge two procedure utils options where `override` takes priority.
114
+ * A key explicitly set to `undefined` in `override` resets the base value.
115
+ * When both sides define a key, interceptors are concatenated (base ones run first) and
116
+ * modifiers are combined so that, for object values, per-call options beat `override`,
117
+ * which beats `base`. A function modifier receives the merged options and its result wins.
118
+ */
119
+ export declare function mergeProcedureUtilsOptions<TClientContext extends ClientContext, TInput, TOutput, TError>(base: ProcedureUtilsOptions<TClientContext, TInput, TOutput, TError>, override: ProcedureUtilsOptions<TClientContext, TInput, TOutput, TError>): ProcedureUtilsOptions<TClientContext, TInput, TOutput, TError>;
120
+ export declare class ProcedureUtils<TClientContext extends ClientContext, TInput, TOutput, TError> extends SharedUtils<TInput> {
121
+ protected readonly options: ProcedureUtilsOptions<TClientContext, TInput, TOutput, TError>;
122
+ /**
123
+ * Calling corresponding procedure client
124
+ *
125
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#calling-procedure-clients | Pinia Colada Integration - Calling Procedure Clients}
126
+ */
127
+ call: Client<TClientContext, TInput, TOutput, TError>;
128
+ constructor(path: string[], client: Client<TClientContext, TInput, TOutput, TError>, options?: ProcedureUtilsOptions<TClientContext, TInput, TOutput, TError>);
129
+ /**
130
+ * Generate a **full matching** key for useQuery/...
131
+ *
132
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#querymutation-key | Pinia Colada Integration - Query/Mutation Key}
133
+ */
134
+ queryKey(...rest: MaybeOptionalOptions<QueryKeyOptions<TInput>>): EntryKeyTagged<TOutput, TError>;
135
+ /**
136
+ * Generate options used for useQuery/...
137
+ *
138
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#query-options-utility | Pinia Colada Integration - Query Options Utility}
139
+ */
140
+ queryOptions<UInitialData extends TOutput | undefined = TOutput | undefined>(...rest: MaybeOptionalOptions<QueryOptionsIn<TClientContext, TInput, TOutput, TError, UInitialData>>): NoInfer<QueryOptionsOut<TOutput, TError, UInitialData>>;
141
+ /**
142
+ * Generate a **full matching** key for [Streamed Query Options](https://orpc.dev/docs/integrations/pinia-colada#streamed-query-options-utility).
143
+ *
144
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#querymutation-key | Pinia Colada Integration - Query/Mutation Key}
145
+ */
146
+ streamedKey(...rest: MaybeOptionalOptions<StreamedKeyOptions<TInput>>): EntryKeyTagged<InferStreamedQueryOutput<TOutput>, TError>;
147
+ /**
148
+ * Configure queries for [AsyncIteratorObject](https://orpc.dev/docs/async-iterator-object).
149
+ * The resulting data is an array of chunks, and each new chunk is appended as it arrives.
150
+ * It never returns to pending once it has data.
151
+ * Works with `useQuery` and any other API that accepts query options.
152
+ */
153
+ streamedOptions<UInitialData extends InferStreamedQueryOutput<TOutput> | undefined = undefined>(...rest: MaybeOptionalOptions<StreamedOptionsIn<TClientContext, TInput, InferStreamedQueryOutput<TOutput>, TError, UInitialData>>): NoInfer<StreamedOptionsOut<InferStreamedQueryOutput<TOutput>, TError, UInitialData>>;
154
+ /**
155
+ * Generate a **full matching** key for [Live Query Options](https://orpc.dev/docs/integrations/pinia-colada#live-query-options-utility).
156
+ *
157
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#querymutation-key | Pinia Colada Integration - Query/Mutation Key}
158
+ */
159
+ liveKey(...rest: MaybeOptionalOptions<QueryKeyOptions<TInput>>): EntryKeyTagged<InferLiveQueryOutput<TOutput>, TError>;
160
+ /**
161
+ * Configure live queries for [AsyncIteratorObject](https://orpc.dev/docs/async-iterator-object).
162
+ * Unlike `.streamedOptions` which accumulates chunks, live queries replace the entire result with each new chunk received.
163
+ * Works with `useQuery` and any other API that accepts query options.
164
+ */
165
+ liveOptions<UInitialData extends InferLiveQueryOutput<TOutput> | undefined = undefined>(...rest: MaybeOptionalOptions<LiveOptionsIn<TClientContext, TInput, InferLiveQueryOutput<TOutput>, TError, UInitialData>>): NoInfer<QueryOptionsOut<InferLiveQueryOutput<TOutput>, TError, UInitialData>>;
166
+ /**
167
+ * Generate a **full matching** key for useInfiniteQuery/...
168
+ *
169
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#querymutation-key | Pinia Colada Integration - Query/Mutation Key}
170
+ */
171
+ infiniteKey<UPageParam>(optionsIn: InfiniteKeyOptions<TInput, UPageParam>): EntryKeyTagged<UseInfiniteQueryData<TOutput, UPageParam>, TError>;
172
+ /**
173
+ * Generate options used for useInfiniteQuery/...
174
+ *
175
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#infinite-query-options-utility | Pinia Colada Integration - Infinite Query Options Utility}
176
+ */
177
+ infiniteOptions<UPageParam, UInitialData extends UseInfiniteQueryData<TOutput, UPageParam> | undefined = undefined>(optionsIn: InfiniteOptionsIn<TClientContext, TInput, TOutput, TError, UPageParam, UInitialData>): NoInfer<InfiniteOptionsOut<TOutput, TError, UPageParam, UInitialData>>;
178
+ /**
179
+ * Generate a **full matching** key for useMutation/...
180
+ *
181
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#querymutation-key | Pinia Colada Integration - Query/Mutation Key}
182
+ */
183
+ mutationKey(...rest: MaybeOptionalOptions<MutationKeyOptions<TInput>>): MutationOptionsOut<TInput, TOutput, TError, _EmptyObject>['key'];
184
+ /**
185
+ * Generate options used for useMutation/...
186
+ *
187
+ * @see {@link https://orpc.dev/docs/integrations/pinia-colada#mutation-options | Pinia Colada Integration - Mutation Options}
188
+ */
189
+ mutationOptions<UMutationContext extends Record<any, any> = _EmptyObject>(...rest: MaybeOptionalOptions<MutationOptionsIn<TClientContext, TInput, TOutput, TError, UMutationContext>>): NoInfer<MutationOptionsOut<TInput, TOutput, TError, UMutationContext>>;
190
+ }