nuxt-convex-module 0.9.1 → 0.11.0

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.
Files changed (57) hide show
  1. package/README.md +21 -4
  2. package/dist/chunks/index.mjs +37 -15
  3. package/dist/devtools-client/_nuxt/BbiHJLbN.js +4 -0
  4. package/dist/devtools-client/_nuxt/entry.CfoJPZu4.css +1 -0
  5. package/dist/devtools-client/index.html +1 -1
  6. package/dist/module.d.mts +20 -7
  7. package/dist/module.json +1 -1
  8. package/dist/module.mjs +75 -39
  9. package/dist/runtime/auth0/vue/index.js +1 -1
  10. package/dist/runtime/better-auth/nuxt/middleware.d.ts +1 -1
  11. package/dist/runtime/better-auth/nuxt/middleware.js +2 -13
  12. package/dist/runtime/better-auth/nuxt/server-guard.d.ts +12 -0
  13. package/dist/runtime/better-auth/nuxt/server-guard.js +13 -0
  14. package/dist/runtime/better-auth/vue/auth-boundary.js +2 -2
  15. package/dist/runtime/better-auth/vue/client.d.ts +5 -357
  16. package/dist/runtime/better-auth/vue/use-better-auth.d.ts +4 -65
  17. package/dist/runtime/clerk/vue/index.js +1 -1
  18. package/dist/runtime/nuxt/composables/use-async-paginated-query.js +12 -12
  19. package/dist/runtime/nuxt/composables/use-async-query.d.ts +2 -2
  20. package/dist/runtime/nuxt/index.d.ts +6 -6
  21. package/dist/runtime/polar/vue/components.js +2 -2
  22. package/dist/runtime/vue/auth/helpers.js +4 -4
  23. package/dist/runtime/vue/client.d.ts +6 -6
  24. package/dist/runtime/vue/components/convex-image.js +1 -1
  25. package/dist/runtime/vue/composables/use-action.d.ts +3 -3
  26. package/dist/runtime/vue/composables/use-mutation.d.ts +4 -4
  27. package/dist/runtime/vue/composables/use-queries.d.ts +14 -7
  28. package/dist/runtime/vue/composables/use-query.d.ts +5 -5
  29. package/dist/runtime/vue/hydration.d.ts +3 -3
  30. package/dist/runtime/vue/index.d.ts +1 -1
  31. package/dist/runtime/vue/queries-observer.d.ts +9 -9
  32. package/package.json +26 -25
  33. package/dist/devtools-client/200.html +0 -1
  34. package/dist/devtools-client/404.html +0 -1
  35. package/dist/devtools-client/_nuxt/71bSMC-_.js +0 -2
  36. package/dist/devtools-client/_nuxt/BAaUCl_m.js +0 -1
  37. package/dist/devtools-client/_nuxt/BhmjAr2Q.js +0 -1
  38. package/dist/devtools-client/_nuxt/BmBQNDID.js +0 -1
  39. package/dist/devtools-client/_nuxt/C6YdTgGl.js +0 -2
  40. package/dist/devtools-client/_nuxt/CKakiU_h.js +0 -1
  41. package/dist/devtools-client/_nuxt/Cm7YqZQ-.js +0 -1
  42. package/dist/devtools-client/_nuxt/DQmVr-EY.js +0 -1
  43. package/dist/devtools-client/_nuxt/D_Rij7MD.js +0 -1
  44. package/dist/devtools-client/_nuxt/EZ4-8Xzm.js +0 -3
  45. package/dist/devtools-client/_nuxt/Kba0XpjH.js +0 -1
  46. package/dist/devtools-client/_nuxt/OVE7s6ty.js +0 -1
  47. package/dist/devtools-client/_nuxt/_Lf3mfPR.js +0 -1
  48. package/dist/devtools-client/_nuxt/builds/latest.json +0 -1
  49. package/dist/devtools-client/_nuxt/builds/meta/f9d540d6-1746-4214-8384-31e7759da89f.json +0 -1
  50. package/dist/devtools-client/_nuxt/entry.HF8C6P11.css +0 -1
  51. package/dist/devtools-client/_nuxt/error-404.CLlwiMp-.css +0 -1
  52. package/dist/devtools-client/_nuxt/error-500.Bxr6fpDU.css +0 -1
  53. package/dist/devtools-client/_nuxt/queries.DNBUjWk2.css +0 -1
  54. package/dist/devtools-client/_nuxt/vZZlEX5A.js +0 -1
  55. package/dist/devtools-client/auth/index.html +0 -1
  56. package/dist/devtools-client/logs/index.html +0 -1
  57. package/dist/devtools-client/queries/index.html +0 -1
@@ -1,358 +1,6 @@
1
- export declare const authClient: import("better-auth/vue").VueAuthClient<{
2
- plugins: {
3
- id: "convex";
4
- version: string;
5
- $InferServerPlugin: ReturnType<(opts: {
6
- authConfig: import("convex/server").AuthConfig;
7
- jwt?: {
8
- expirationSeconds?: number;
9
- definePayload?: (session: {
10
- user: import("better-auth").User & Record<string, any>;
11
- session: import("better-auth").Session & Record<string, any>;
12
- }) => Promise<Record<string, any>> | Record<string, any> | undefined;
13
- };
14
- jwtExpirationSeconds?: number;
15
- jwks?: string;
16
- jwksRotateOnTokenGenerationError?: boolean;
17
- options?: import("better-auth").BetterAuthOptions;
18
- }) => {
19
- id: "convex";
20
- version: string;
21
- init: (ctx: import("better-auth").AuthContext) => void;
22
- hooks: {
23
- before: ({
24
- matcher(context: import("better-auth").HookEndpointContext): boolean;
25
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
26
- context: {
27
- headers: Headers;
28
- };
29
- } | undefined>;
30
- } | {
31
- matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
32
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
33
- context: import("better-auth").MiddlewareContext<import("better-auth").MiddlewareOptions, {
34
- returned?: unknown | undefined;
35
- responseHeaders?: Headers | undefined;
36
- } & import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
37
- options: import("better-auth").BetterAuthOptions;
38
- trustedOrigins: string[];
39
- trustedProviders: string[];
40
- isTrustedOrigin: (url: string, settings?: {
41
- allowRelativePaths: boolean;
42
- }) => boolean;
43
- oauthConfig: {
44
- skipStateCookieCheck?: boolean | undefined;
45
- storeStateStrategy: "database" | "cookie";
46
- };
47
- newSession: {
48
- session: {
49
- id: string;
50
- createdAt: Date;
51
- updatedAt: Date;
52
- userId: string;
53
- expiresAt: Date;
54
- token: string;
55
- ipAddress?: string | null | undefined;
56
- userAgent?: string | null | undefined;
57
- } & Record<string, any>;
58
- user: {
59
- id: string;
60
- createdAt: Date;
61
- updatedAt: Date;
62
- email: string;
63
- emailVerified: boolean;
64
- name: string;
65
- image?: string | null | undefined;
66
- } & Record<string, any>;
67
- } | null;
68
- session: {
69
- session: {
70
- id: string;
71
- createdAt: Date;
72
- updatedAt: Date;
73
- userId: string;
74
- expiresAt: Date;
75
- token: string;
76
- ipAddress?: string | null | undefined;
77
- userAgent?: string | null | undefined;
78
- } & Record<string, any>;
79
- user: {
80
- id: string;
81
- createdAt: Date;
82
- updatedAt: Date;
83
- email: string;
84
- emailVerified: boolean;
85
- name: string;
86
- image?: string | null | undefined;
87
- } & Record<string, any>;
88
- } | null;
89
- setNewSession: (session: {
90
- session: {
91
- id: string;
92
- createdAt: Date;
93
- updatedAt: Date;
94
- userId: string;
95
- expiresAt: Date;
96
- token: string;
97
- ipAddress?: string | null | undefined;
98
- userAgent?: string | null | undefined;
99
- } & Record<string, any>;
100
- user: {
101
- id: string;
102
- createdAt: Date;
103
- updatedAt: Date;
104
- email: string;
105
- emailVerified: boolean;
106
- name: string;
107
- image?: string | null | undefined;
108
- } & Record<string, any>;
109
- } | null) => void;
110
- socialProviders: import("better-auth").OAuthProvider[];
111
- authCookies: import("better-auth").BetterAuthCookies;
112
- logger: ReturnType<(options?: import("better-auth").Logger | undefined) => import("better-auth").InternalLogger>;
113
- rateLimit: {
114
- enabled: boolean;
115
- window: number;
116
- max: number;
117
- storage: "memory" | "database" | "secondary-storage";
118
- } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
119
- adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
120
- internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
121
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
122
- secret: string;
123
- secretConfig: string | import("better-auth").SecretConfig;
124
- sessionConfig: {
125
- updateAge: number;
126
- expiresIn: number;
127
- freshAge: number;
128
- cookieRefreshCache: false | {
129
- enabled: true;
130
- updateAge: number;
131
- };
132
- };
133
- generateId: (options: {
134
- model: import("better-auth").ModelNames;
135
- size?: number | undefined;
136
- }) => string | false;
137
- secondaryStorage: import("better-auth").SecondaryStorage | undefined;
138
- password: {
139
- hash: (password: string) => Promise<string>;
140
- verify: (data: {
141
- password: string;
142
- hash: string;
143
- }) => Promise<boolean>;
144
- config: {
145
- minPasswordLength: number;
146
- maxPasswordLength: number;
147
- };
148
- checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
149
- };
150
- tables: import("better-auth").BetterAuthDBSchema;
151
- runMigrations: () => Promise<void>;
152
- publishTelemetry: (event: {
153
- type: string;
154
- anonymousId?: string | undefined;
155
- payload: Record<string, any>;
156
- }) => Promise<void>;
157
- skipOriginCheck: boolean | string[];
158
- skipCSRFCheck: boolean;
159
- runInBackground: (promise: Promise<unknown>) => void;
160
- runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
161
- }>;
162
- }>;
163
- })[];
164
- after: {
165
- matcher: (context: import("better-auth").HookEndpointContext) => boolean;
166
- handler: import("better-auth/api").AuthMiddleware;
167
- }[];
168
- };
169
- endpoints: {
170
- getOpenIdConfig: import("better-auth").StrictEndpoint<"/convex/.well-known/openid-configuration", {
171
- method: "GET";
172
- metadata: {
173
- isAction: false;
174
- };
175
- }, import("better-auth/plugins/oidc-provider").OIDCMetadata>;
176
- getJwks: import("better-auth").StrictEndpoint<"/convex/jwks", {
177
- method: "GET";
178
- metadata: {
179
- openapi: {
180
- description: string;
181
- responses: {
182
- "200": {
183
- description: string;
184
- content: {
185
- "application/json": {
186
- schema: {
187
- type: "object";
188
- properties: {
189
- keys: {
190
- type: string;
191
- description: string;
192
- items: {
193
- type: string;
194
- properties: {
195
- kid: {
196
- type: string;
197
- description: string;
198
- };
199
- kty: {
200
- type: string;
201
- description: string;
202
- };
203
- alg: {
204
- type: string;
205
- description: string;
206
- };
207
- use: {
208
- type: string;
209
- description: string;
210
- enum: string[];
211
- nullable: boolean;
212
- };
213
- n: {
214
- type: string;
215
- description: string;
216
- nullable: boolean;
217
- };
218
- e: {
219
- type: string;
220
- description: string;
221
- nullable: boolean;
222
- };
223
- crv: {
224
- type: string;
225
- description: string;
226
- nullable: boolean;
227
- };
228
- x: {
229
- type: string;
230
- description: string;
231
- nullable: boolean;
232
- };
233
- y: {
234
- type: string;
235
- description: string;
236
- nullable: boolean;
237
- };
238
- };
239
- required: string[];
240
- };
241
- };
242
- };
243
- required: string[];
244
- };
245
- };
246
- };
247
- };
248
- };
249
- };
250
- };
251
- }, import("better-auth").JSONWebKeySet>;
252
- getLatestJwks: import("better-auth").StrictEndpoint<"/convex/latest-jwks", {
253
- isAction: boolean;
254
- method: "POST";
255
- metadata: {
256
- SERVER_ONLY: true;
257
- openapi: {
258
- description: string;
259
- };
260
- };
261
- }, any[]>;
262
- rotateKeys: import("better-auth").StrictEndpoint<"/convex/rotate-keys", {
263
- isAction: boolean;
264
- method: "POST";
265
- metadata: {
266
- SERVER_ONLY: true;
267
- openapi: {
268
- description: string;
269
- };
270
- };
271
- }, any[]>;
272
- getToken: import("better-auth").StrictEndpoint<"/convex/token", {
273
- method: "GET";
274
- requireHeaders: true;
275
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
276
- session: {
277
- session: Record<string, any> & {
278
- id: string;
279
- createdAt: Date;
280
- updatedAt: Date;
281
- userId: string;
282
- expiresAt: Date;
283
- token: string;
284
- ipAddress?: string | null | undefined;
285
- userAgent?: string | null | undefined;
286
- };
287
- user: Record<string, any> & {
288
- id: string;
289
- createdAt: Date;
290
- updatedAt: Date;
291
- email: string;
292
- emailVerified: boolean;
293
- name: string;
294
- image?: string | null | undefined;
295
- };
296
- };
297
- }>)[];
298
- metadata: {
299
- openapi: {
300
- description: string;
301
- responses: {
302
- 200: {
303
- description: string;
304
- content: {
305
- "application/json": {
306
- schema: {
307
- type: "object";
308
- properties: {
309
- token: {
310
- type: string;
311
- };
312
- };
313
- };
314
- };
315
- };
316
- };
317
- };
318
- };
319
- };
320
- }, {
321
- token: string;
322
- }>;
323
- };
324
- schema: {
325
- jwks: {
326
- fields: {
327
- publicKey: {
328
- type: "string";
329
- required: true;
330
- };
331
- privateKey: {
332
- type: "string";
333
- required: true;
334
- };
335
- createdAt: {
336
- type: "date";
337
- required: true;
338
- };
339
- expiresAt: {
340
- type: "date";
341
- required: false;
342
- };
343
- };
344
- };
345
- user: {
346
- readonly fields: {
347
- readonly userId: {
348
- readonly type: "string";
349
- readonly required: false;
350
- readonly input: false;
351
- };
352
- };
353
- };
354
- };
355
- }>;
356
- }[];
357
- }>;
1
+ import { convexClient } from '@convex-dev/better-auth/client/plugins';
2
+ import { createAuthClient } from 'better-auth/vue';
3
+ export declare const authClient: ReturnType<typeof createAuthClient<{
4
+ plugins: ReturnType<typeof convexClient>[];
5
+ }>>;
358
6
  export type AuthClient = typeof authClient;
@@ -1,70 +1,10 @@
1
1
  import type { AuthTokenFetcher } from 'convex/browser';
2
2
  import { type ComputedRef } from 'vue';
3
3
  import { type AuthClient } from '#convex/auth-client';
4
- declare const useClientSession: () => Readonly<import("vue").Ref<{
5
- readonly data: {
6
- readonly user: {
7
- readonly id: string;
8
- readonly createdAt: Date;
9
- readonly updatedAt: Date;
10
- readonly email: string;
11
- readonly emailVerified: boolean;
12
- readonly name: string;
13
- readonly image?: string | null | undefined;
14
- readonly userId?: string | null | undefined;
15
- };
16
- readonly session: {
17
- readonly id: string;
18
- readonly createdAt: Date;
19
- readonly updatedAt: Date;
20
- readonly userId: string;
21
- readonly expiresAt: Date;
22
- readonly token: string;
23
- readonly ipAddress?: string | null | undefined;
24
- readonly userAgent?: string | null | undefined;
25
- };
26
- } | null;
27
- readonly isPending: boolean;
28
- readonly isRefetching: boolean;
29
- readonly error: import("better-auth/client").BetterFetchError | null;
30
- readonly refetch: (queryParams
31
- /** The Better Auth client from `#convex/auth-client` — sign-in, sign-out and every plugin flow live here. */
32
- ?: {
33
- query?: import("better-auth").SessionQueryParams;
34
- } | undefined) => Promise<void>;
35
- }, {
36
- readonly data: {
37
- readonly user: {
38
- readonly id: string;
39
- readonly createdAt: Date;
40
- readonly updatedAt: Date;
41
- readonly email: string;
42
- readonly emailVerified: boolean;
43
- readonly name: string;
44
- readonly image?: string | null | undefined;
45
- readonly userId?: string | null | undefined;
46
- };
47
- readonly session: {
48
- readonly id: string;
49
- readonly createdAt: Date;
50
- readonly updatedAt: Date;
51
- readonly userId: string;
52
- readonly expiresAt: Date;
53
- readonly token: string;
54
- readonly ipAddress?: string | null | undefined;
55
- readonly userAgent?: string | null | undefined;
56
- };
57
- } | null;
58
- readonly isPending: boolean;
59
- readonly isRefetching: boolean;
60
- readonly error: import("better-auth/client").BetterFetchError | null;
61
- readonly refetch: (queryParams
62
- /** The Better Auth client from `#convex/auth-client` — sign-in, sign-out and every plugin flow live here. */
63
- ?: {
64
- query?: import("better-auth").SessionQueryParams;
65
- } | undefined) => Promise<void>;
66
- }>>;
67
- export type BetterAuthSession = ReturnType<typeof useClientSession>;
4
+ export type BetterAuthSession = AuthClient['useSession'] extends {
5
+ (): infer R;
6
+ (useFetch: any): any;
7
+ } ? R : never;
68
8
  /** The signed-in user (loose — exact fields depend on your auth schema). */
69
9
  export type BetterAuthUser = {
70
10
  id: string;
@@ -109,4 +49,3 @@ export interface UseBetterAuthReturn {
109
49
  * @public
110
50
  */
111
51
  export declare function useBetterAuth(initialToken?: string | null): UseBetterAuthReturn;
112
- export {};
@@ -7,7 +7,7 @@ export function provideConvexAuthFromClerk(options = {}) {
7
7
  const useAuth = options.useAuth ?? useClerkAuth;
8
8
  return provideConvexAuth({ client, useAuth: () => useAuthFromClerk(useAuth) });
9
9
  }
10
- export const ConvexProviderWithClerk = defineComponent({
10
+ export const ConvexProviderWithClerk = /* @__PURE__ */ defineComponent({
11
11
  name: "ConvexProviderWithClerk",
12
12
  props: {
13
13
  client: { type: Object, default: void 0 },
@@ -17,20 +17,20 @@ export function useAsyncPaginatedQuery(query, args, options) {
17
17
  key,
18
18
  async () => {
19
19
  const currentArgs = toValue(args);
20
- if (currentArgs === "skip" || !import.meta.server) {
21
- return null;
22
- }
23
- if (!deploymentUrl) {
24
- throw new Error(
25
- "`useAsyncPaginatedQuery` could not fetch during SSR: no Convex deployment URL is configured. Set NUXT_PUBLIC_CONVEX_URL or `convex.url` in nuxt.config."
20
+ if (import.meta.server && currentArgs !== "skip") {
21
+ if (!deploymentUrl) {
22
+ throw new Error(
23
+ "`useAsyncPaginatedQuery` could not fetch during SSR: no Convex deployment URL is configured. Set NUXT_PUBLIC_CONVEX_URL or `convex.url` in nuxt.config."
24
+ );
25
+ }
26
+ const result2 = await fetchQuery(
27
+ query,
28
+ { ...currentArgs, paginationOpts: { numItems: initialNumItems, cursor: null } },
29
+ { token: await resolveToken(), url: deploymentUrl }
26
30
  );
31
+ return { page: convexToJson(result2.page), isDone: result2.isDone };
27
32
  }
28
- const result2 = await fetchQuery(
29
- query,
30
- { ...currentArgs, paginationOpts: { numItems: initialNumItems, cursor: null } },
31
- { token: await resolveToken(), url: deploymentUrl }
32
- );
33
- return { page: convexToJson(result2.page), isDone: result2.isDone };
33
+ return null;
34
34
  },
35
35
  { server, lazy, deep: false, immediate: initialArgs !== "skip" }
36
36
  );
@@ -1,5 +1,5 @@
1
1
  import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
2
- import type { FunctionArgs, FunctionReference, FunctionReturnType } from 'convex/server';
2
+ import type { FunctionArgs, FunctionReference, FunctionReference_future, FunctionReturnType } from 'convex/server';
3
3
  /**
4
4
  * Request status of a {@link useAsyncQuery} call — mirrors Nuxt's
5
5
  * `useAsyncData` statuses.
@@ -130,6 +130,6 @@ export type AsyncQueryData<T> = Pick<AsyncQueryReturn<T>, 'data' | 'error' | 'st
130
130
  *
131
131
  * @public
132
132
  */
133
- export declare function useAsyncQuery<Query extends FunctionReference<'query'>>(query: Query, args?: MaybeRefOrGetter<FunctionArgs<Query> | 'skip'>, options?: AsyncQueryOptions): AsyncQueryReturn<FunctionReturnType<Query>>;
133
+ export declare function useAsyncQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, args?: MaybeRefOrGetter<FunctionArgs<Query> | 'skip'>, options?: AsyncQueryOptions): AsyncQueryReturn<FunctionReturnType<Query>>;
134
134
  /** @public */
135
135
  export declare const useConvexAsyncQuery: typeof useAsyncQuery;
@@ -40,7 +40,7 @@
40
40
  *
41
41
  * @module server
42
42
  */
43
- import type { ArgsAndOptions, FunctionReference, FunctionReturnType } from 'convex/server';
43
+ import type { ArgsAndOptions, FunctionReference, FunctionReference_future, FunctionReturnType } from 'convex/server';
44
44
  import type { Preloaded } from '../vue/index.js';
45
45
  /**
46
46
  * Options to {@link preloadQuery}, {@link fetchQuery}, {@link fetchMutation} and {@link fetchAction}.
@@ -85,7 +85,7 @@ export type NuxtOptions = {
85
85
  *
86
86
  * @public
87
87
  */
88
- export declare function preloadQuery<Query extends FunctionReference<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<Preloaded<Query>>;
88
+ export declare function preloadQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<Preloaded<Query>>;
89
89
  /**
90
90
  * Returns the result of executing a query via {@link preloadQuery}.
91
91
  *
@@ -94,7 +94,7 @@ export declare function preloadQuery<Query extends FunctionReference<'query'>>(q
94
94
  *
95
95
  * @public
96
96
  */
97
- export declare function preloadedQueryResult<Query extends FunctionReference<'query'>>(preloaded: Preloaded<Query>): FunctionReturnType<Query>;
97
+ export declare function preloadedQueryResult<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(preloaded: Preloaded<Query>): FunctionReturnType<Query>;
98
98
  /**
99
99
  * Execute a Convex query function.
100
100
  *
@@ -107,7 +107,7 @@ export declare function preloadedQueryResult<Query extends FunctionReference<'qu
107
107
  *
108
108
  * @public
109
109
  */
110
- export declare function fetchQuery<Query extends FunctionReference<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<FunctionReturnType<Query>>;
110
+ export declare function fetchQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<FunctionReturnType<Query>>;
111
111
  /**
112
112
  * Execute a Convex mutation function.
113
113
  *
@@ -120,7 +120,7 @@ export declare function fetchQuery<Query extends FunctionReference<'query'>>(que
120
120
  *
121
121
  * @public
122
122
  */
123
- export declare function fetchMutation<Mutation extends FunctionReference<'mutation'>>(mutation: Mutation, ...args: ArgsAndOptions<Mutation, NuxtOptions>): Promise<FunctionReturnType<Mutation>>;
123
+ export declare function fetchMutation<Mutation extends FunctionReference<'mutation'> | FunctionReference_future<'mutation'>>(mutation: Mutation, ...args: ArgsAndOptions<Mutation, NuxtOptions>): Promise<FunctionReturnType<Mutation>>;
124
124
  /**
125
125
  * Execute a Convex action function.
126
126
  *
@@ -133,4 +133,4 @@ export declare function fetchMutation<Mutation extends FunctionReference<'mutati
133
133
  *
134
134
  * @public
135
135
  */
136
- export declare function fetchAction<Action extends FunctionReference<'action'>>(action: Action, ...args: ArgsAndOptions<Action, NuxtOptions>): Promise<FunctionReturnType<Action>>;
136
+ export declare function fetchAction<Action extends FunctionReference<'action'> | FunctionReference_future<'action'>>(action: Action, ...args: ArgsAndOptions<Action, NuxtOptions>): Promise<FunctionReturnType<Action>>;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, h, mergeProps, ref, watch } from "vue";
2
2
  import { useAction } from "../../vue/composables/use-action.js";
3
3
  import { useConvexNamespace } from "../../vue/provide.js";
4
- export const CustomerPortalLink = defineComponent({
4
+ export const CustomerPortalLink = /* @__PURE__ */ defineComponent({
5
5
  name: "CustomerPortalLink",
6
6
  inheritAttrs: false,
7
7
  props: {
@@ -34,7 +34,7 @@ export const CustomerPortalLink = defineComponent({
34
34
  };
35
35
  }
36
36
  });
37
- export const CheckoutLink = defineComponent({
37
+ export const CheckoutLink = /* @__PURE__ */ defineComponent({
38
38
  name: "CheckoutLink",
39
39
  inheritAttrs: false,
40
40
  props: {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from "vue";
2
2
  import { useConvexAuth } from "./index.js";
3
- export const Authenticated = defineComponent({
3
+ export const Authenticated = /* @__PURE__ */ defineComponent({
4
4
  name: "Authenticated",
5
5
  setup(_, { slots }) {
6
6
  const { isLoading, isAuthenticated } = useConvexAuth();
@@ -12,7 +12,7 @@ export const Authenticated = defineComponent({
12
12
  };
13
13
  }
14
14
  });
15
- export const Unauthenticated = defineComponent({
15
+ export const Unauthenticated = /* @__PURE__ */ defineComponent({
16
16
  name: "Unauthenticated",
17
17
  setup(_, { slots }) {
18
18
  const { isLoading, isAuthenticated } = useConvexAuth();
@@ -24,7 +24,7 @@ export const Unauthenticated = defineComponent({
24
24
  };
25
25
  }
26
26
  });
27
- export const AuthLoading = defineComponent({
27
+ export const AuthLoading = /* @__PURE__ */ defineComponent({
28
28
  name: "AuthLoading",
29
29
  setup(_, { slots }) {
30
30
  const { isLoading } = useConvexAuth();
@@ -36,7 +36,7 @@ export const AuthLoading = defineComponent({
36
36
  };
37
37
  }
38
38
  });
39
- export const AuthRefreshing = defineComponent({
39
+ export const AuthRefreshing = /* @__PURE__ */ defineComponent({
40
40
  name: "AuthRefreshing",
41
41
  setup(_, { slots }) {
42
42
  const { isAuthenticated, isRefreshing } = useConvexAuth();
@@ -1,7 +1,7 @@
1
1
  import type { InjectionKey } from 'vue';
2
2
  import type { AuthTokenFetcher, BaseConvexClientOptions, ConnectionState, OptimisticUpdate, PaginationStatus, QueryJournal, QueryOptions } from 'convex/browser';
3
3
  import type { Watch as ConvexWatch } from 'convex/react';
4
- import type { ArgsAndOptions, FunctionArgs, FunctionReference, FunctionReturnType, OptionalRestArgs } from 'convex/server';
4
+ import type { ArgsAndOptions, FunctionArgs, FunctionReference, FunctionReference_future, FunctionReturnType, OptionalRestArgs } from 'convex/server';
5
5
  import type { Value } from 'convex/values';
6
6
  export type { AuthTokenFetcher, ConnectionState, OptimisticUpdate };
7
7
  /**
@@ -147,7 +147,7 @@ export declare class ConvexVueClient {
147
147
  *
148
148
  * @returns The {@link Watch} object.
149
149
  */
150
- watchQuery<Query extends FunctionReference<'query'>>(query: Query, ...argsAndOptions: ArgsAndOptions<Query, WatchQueryOptions>): Watch<FunctionReturnType<Query>>;
150
+ watchQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...argsAndOptions: ArgsAndOptions<Query, WatchQueryOptions>): Watch<FunctionReturnType<Query>>;
151
151
  /**
152
152
  * Indicates likely future interest in a query subscription.
153
153
  *
@@ -160,7 +160,7 @@ export declare class ConvexVueClient {
160
160
  * @param queryOptions - A query (function reference from an api object) and its args, plus
161
161
  * an optional extendSubscriptionFor for how long to subscribe to the query.
162
162
  */
163
- prewarmQuery<Query extends FunctionReference<'query'>>(queryOptions: QueryOptions<Query> & {
163
+ prewarmQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(queryOptions: QueryOptions<Query> & {
164
164
  extendSubscriptionFor?: number;
165
165
  }): void;
166
166
  /**
@@ -173,7 +173,7 @@ export declare class ConvexVueClient {
173
173
  * @param options - A {@link MutationOptions} options object for the mutation.
174
174
  * @returns A promise of the mutation's result.
175
175
  */
176
- mutation<Mutation extends FunctionReference<'mutation'>>(mutation: Mutation, ...argsAndOptions: ArgsAndOptions<Mutation, MutationOptions<FunctionArgs<Mutation>>>): Promise<FunctionReturnType<Mutation>>;
176
+ mutation<Mutation extends FunctionReference<'mutation'> | FunctionReference_future<'mutation'>>(mutation: Mutation, ...argsAndOptions: ArgsAndOptions<Mutation, MutationOptions<FunctionArgs<Mutation>>>): Promise<FunctionReturnType<Mutation>>;
177
177
  /**
178
178
  * Execute an action function.
179
179
  *
@@ -183,7 +183,7 @@ export declare class ConvexVueClient {
183
183
  * the arguments will be `{}`.
184
184
  * @returns A promise of the action's result.
185
185
  */
186
- action<Action extends FunctionReference<'action'>>(action: Action, ...args: OptionalRestArgs<Action>): Promise<FunctionReturnType<Action>>;
186
+ action<Action extends FunctionReference<'action'> | FunctionReference_future<'action'>>(action: Action, ...args: OptionalRestArgs<Action>): Promise<FunctionReturnType<Action>>;
187
187
  /**
188
188
  * Fetch a query result once.
189
189
  *
@@ -196,7 +196,7 @@ export declare class ConvexVueClient {
196
196
  * the arguments will be `{}`.
197
197
  * @returns A promise of the query's result.
198
198
  */
199
- query<Query extends FunctionReference<'query'>>(query: Query, ...args: OptionalRestArgs<Query>): Promise<FunctionReturnType<Query>>;
199
+ query<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...args: OptionalRestArgs<Query>): Promise<FunctionReturnType<Query>>;
200
200
  /**
201
201
  * Get the current {@link ConnectionState} between the client and the Convex
202
202
  * deployment.