@lunora/react 1.0.0-alpha.268 → 1.0.0-alpha.269

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
@@ -94,26 +94,26 @@ function MessageList({ room }: { room: string }) {
94
94
 
95
95
  ## Hooks
96
96
 
97
- | Hook | Returns | Notes |
98
- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
99
- | `useQuery(fn, args, options?)` | `T \| undefined` | Live query; shares one WS subscription across consumers of the same key. |
100
- | `useMutation(fn)` | `{ mutate, pending, data, error, reset, withOptimisticUpdate }` | Per-call `optimistic` / `optimisticUpdate` options pass through to the client; `onlineOnly` refuses rather than queues. |
101
- | `useSubscription(fn, args, options?)` | `{ data, error }` | No initial fetch — only server-pushed values. |
102
- | `usePaginatedQuery(fn, args, { initialNumItems, onError? })` | `{ results, status, isLoading, loadMore, error }` | Cursor-paginated feed that stays consistent under live edits. A failed tail page is dropped so `loadMore` can retry it. |
103
- | `useInfiniteQuery(fn, args, { initialNumItems, onError? })` | `{ pages, status, hasNextPage, fetchNextPage, error, … }` | Page-array variant of the same paginator. |
104
- | `usePreloadedQuery(preloaded, options?)` | `T \| undefined` | Reads a server `Preloaded` token, then goes live. Pass `onError` to see a session expiry instead of rendering the stale SSR snapshot. |
105
- | `usePresence(roomId, { heartbeat, listPresent, … })` | `{ present, sessionId, setData, error }` | Drives the `definePresence` heartbeat + list functions. `roomId` is a positional first argument, not an option. |
106
- | `useLiveTopic(topic, options?)` | `{ lastEvent, error }` | Follows one declared live topic over an SSE connection shared by stream route. See the note below the table. |
107
- | `useFlag(key, default)` | flag value (live) | Live OpenFeature flag over the WS; reads `default` until the server answers. Evaluated under the socket's server-verified identity. |
108
- | `useFlags(defaults)` | `{ [key]: value }` | Batch variant — one live value per key in the `defaults` map. |
109
- | `useStream(fn, args, options?)` | `{ chunks, status, error, cancel }` | Consumes a streamed action response chunk by chunk. |
110
- | `useRateLimit(config, options?)` | `{ ok, disabled, retryAfter, check, consume, reset }` | Client-side mirror of a `@lunora/ratelimit` budget for instant UX. |
111
- | `useConnectionStatus()` | `ConnectionStatus` | `idle` / `connecting` / `connected` / `offline`. |
112
- | `useAuth()` | `{ user, token, status, setToken }` | Call `setToken(jwt)` after sign-in; RPC then carries the token. |
113
- | `useAuthState()` | `{ isAuthenticated, isLoading }` | Hydration-safe three-state gate. |
114
- | `useAgentToolEvents({ api, threadKey, … })` | `{ events }` | One agent thread's tool lifecycle: call / result / awaiting-approval / progress. |
115
- | `useVoiceAgent({ voice, threadKey, … })` | `{ status, transcript, startCall, endCall, … }` | Full-duplex voice call: mic capture, playback, live transcripts, barge-in. |
116
- | `useAuthUsers` / `useAuthSessions` / `useOrganizations` / `useImpersonate` | `{ data, error, loading, hasMore, total, loadMore, refetch }` (`useImpersonate`: `{ data, error, pending, impersonate, reset }`) | Admin-plane auth reads for a console UI; each needs an admin-capable token. HTTP-only, so `refetch()` rather than a live subscription. |
97
+ | Hook | Returns | Notes |
98
+ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99
+ | `useQuery(fn, args, options?)` | `T \| undefined` | Live query; shares one WS subscription across consumers of the same key. |
100
+ | `useMutation(fn)` | `{ mutate, pending, data, error, reset, withOptimisticUpdate }` | Per-call `optimistic` / `optimisticUpdate` options pass through to the client; `onlineOnly` refuses rather than queues. |
101
+ | `useSubscription(fn, args, options?)` | `{ data, error }` | No initial fetch — only server-pushed values. |
102
+ | `usePaginatedQuery(fn, args, { initialNumItems, onError? })` | `{ results, status, isLoading, loadMore, error }` | Cursor-paginated feed that stays consistent under live edits. A failed tail page is dropped so `loadMore` can retry it. |
103
+ | `useInfiniteQuery(fn, args, { initialNumItems, onError? })` | `{ pages, status, hasNextPage, fetchNextPage, error, … }` | Page-array variant of the same paginator. |
104
+ | `usePreloadedQuery(preloaded, options?)` | `T \| undefined` | Reads a server `Preloaded` token, then goes live. Pass `onError` to see a session expiry instead of rendering the stale SSR snapshot. |
105
+ | `usePresence(roomId, { heartbeat, listPresent, … })` | `{ present, sessionId, setData, error }` | Drives the `definePresence` heartbeat + list functions. `roomId` is a positional first argument, not an option. |
106
+ | `useLiveTopic(topic, options?)` | `{ lastEvent, error }` | Follows one declared live topic over an SSE connection shared by stream route. See the note below the table. |
107
+ | `useFlag(key, default)` | flag value (live) | Live OpenFeature flag over the WS; reads `default` until the server answers. Evaluated under the socket's server-verified identity. |
108
+ | `useFlags(defaults)` | `{ [key]: value }` | Batch variant — one live value per key in the `defaults` map. |
109
+ | `useStream(fn, args, options?)` | `{ chunks, status, error, cancel }` | Consumes a streamed action response chunk by chunk. |
110
+ | `useRateLimit(config, options?)` | `{ ok, disabled, retryAfter, check, consume, reset }` | Client-side mirror of a `@lunora/ratelimit` budget for instant UX. |
111
+ | `useConnectionStatus()` | `ConnectionStatus` | `idle` / `connecting` / `connected` / `offline`. |
112
+ | `useAuth()` | `{ user, token, status, setToken }` | Call `setToken(jwt)` after sign-in; RPC then carries the token. |
113
+ | `useAuthState()` | `{ isAuthenticated, isLoading }` | Hydration-safe three-state gate. |
114
+ | `useAgentToolEvents({ api, threadKey, … })` | `{ events }` | One agent thread's tool lifecycle: call / result / awaiting-approval / progress. |
115
+ | `useVoiceAgent({ voice, threadKey, … })` | `{ status, transcript, startCall, endCall, … }` | Full-duplex voice call: mic capture, playback, live transcripts, barge-in. |
116
+ | `useAuthUsers` / `useAuthSessions` / `useOrganizations` / `useImpersonate` | `{ data, error, loading, hasMore, total, loadMore, refetch }` (`useImpersonate`: `{ data, error, pending, impersonate, reset }`) | Admin-plane auth reads for a console UI; each needs an admin-capable token and a provider client built with `new LunoraAdminClient(...)` from `@lunora/client/admin`. HTTP-only, so `refetch()` rather than a live subscription. |
117
117
 
118
118
  `Authenticated`, `Unauthenticated`, and `AuthLoading` are gate components built on `useAuthState`.
119
119
 
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{AuthLoading as o,Authenticated as t,Unauthenticated as u}from"./packem_shared/AuthLoading-Dqb9692o.mjs";import{useAuthState as a}from"./packem_shared/useAuthState-CFScqFAf.mjs";import{L as f,u as n}from"./packem_shared/lunora-provider-D15UPNFD.mjs";import{useAction as m}from"./packem_shared/useAction-CIlUzQVY.mjs";import{useAuthSessions as d,useAuthUsers as l,useImpersonate as A,useOrganizations as g,useSignUpInvitations as c}from"./packem_shared/useAuthSessions-BJNwMlyl.mjs";import{useAgent as U}from"./packem_shared/useAgent-BBuc2RNx.mjs";import{useAgentApprovals as S}from"./packem_shared/useAgentApprovals-yiIGlGck.mjs";import{useAgentChat as E}from"./packem_shared/useAgentChat-Igz_15YO.mjs";import{useAgentState as L}from"./packem_shared/useAgentState-DbQmCmhH.mjs";import{useAgentToolEvents as v}from"./packem_shared/useAgentToolEvents-vgG15IZX.mjs";import{default as F}from"./packem_shared/useAuth-DTiEKNfL.mjs";import{default as M}from"./packem_shared/useClientQuery-D01Sx8wn.mjs";import{default as b}from"./packem_shared/useConnectionStatus-VYjmmafS.mjs";import{useFlag as O,useFlags as k}from"./packem_shared/useFlag-CHzI2R8e.mjs";import{useHttpStream as V}from"./packem_shared/useHttpStream-B32eZ6DN.mjs";import{default as q}from"./packem_shared/useInfiniteQuery-CeMlqAp6.mjs";import{useLiveTopic as B}from"./packem_shared/useLiveTopic-DzP_8Gf3.mjs";import{useMutation as G}from"./packem_shared/useMutation-BfuQVXiY.mjs";import{useMutator as K}from"./packem_shared/useMutator-BtUd-xEA.mjs";import{usePaginatedQuery as W}from"./packem_shared/usePaginatedQuery-t6CEO-xB.mjs";import{hydratePreloaded as Y,default as Z}from"./packem_shared/hydratePreloaded-C94hJet3.mjs";import{usePresence as $}from"./packem_shared/usePresence-UDDcnYXw.mjs";import{default as re}from"./packem_shared/useQuery-BewsLSm_.mjs";import{useRateLimit as te}from"./packem_shared/useRateLimit-Cckxi8m9.mjs";import{useStream as se}from"./packem_shared/useStream-D__0Rgzf.mjs";import{default as pe}from"./packem_shared/useSubscription-P-_MNJm6.mjs";import{default as ne}from"./packem_shared/useSuspenseQuery-5wC1or5S.mjs";import{useVoiceAgent as me}from"./packem_shared/useVoiceAgent-iTIf7__2.mjs";import{createClientQuery as de,getErrorCode as le,getRetryAfterMs as Ae,isConflictError as ge,isForbiddenError as ce,isRateLimitedError as he,isUnauthorizedError as Ue}from"@lunora/client";import{lunoraQueryOptions as Se}from"@lunora/client/query";import{RestrictionError as Ee,UploadControl as Qe,UploadError as Le}from"@visulima/storage-client";import{useChunkedRestUpload as ve,useFileInput as Re,useMultipartUpload as Fe,usePasteUpload as Ie,useTusUpload as Me,useUpload as Te}from"@visulima/storage-client/react";export{o as AuthLoading,t as Authenticated,f as LunoraProvider,Ee as RestrictionError,u as Unauthenticated,Qe as UploadControl,Le as UploadError,de as createClientQuery,le as getErrorCode,Ae as getRetryAfterMs,Y as hydratePreloaded,ge as isConflictError,ce as isForbiddenError,he as isRateLimitedError,Ue as isUnauthorizedError,Se as lunoraQueryOptions,m as useAction,U as useAgent,S as useAgentApprovals,E as useAgentChat,L as useAgentState,v as useAgentToolEvents,F as useAuth,d as useAuthSessions,a as useAuthState,l as useAuthUsers,ve as useChunkedRestUpload,M as useClientQuery,b as useConnectionStatus,Re as useFileInput,O as useFlag,k as useFlags,V as useHttpStream,A as useImpersonate,q as useInfiniteQuery,B as useLiveTopic,n as useLunora,Fe as useMultipartUpload,G as useMutation,K as useMutator,g as useOrganizations,W as usePaginatedQuery,Ie as usePasteUpload,Z as usePreloadedQuery,$ as usePresence,re as useQuery,te as useRateLimit,c as useSignUpInvitations,se as useStream,pe as useSubscription,ne as useSuspenseQuery,Me as useTusUpload,Te as useUpload,me as useVoiceAgent};
2
+ import{AuthLoading as o,Authenticated as t,Unauthenticated as u}from"./packem_shared/AuthLoading-Dqb9692o.mjs";import{useAuthState as a}from"./packem_shared/useAuthState-CFScqFAf.mjs";import{L as f,u as n}from"./packem_shared/lunora-provider-D15UPNFD.mjs";import{useAction as m}from"./packem_shared/useAction-CIlUzQVY.mjs";import{useAuthSessions as d,useAuthUsers as l,useImpersonate as A,useOrganizations as g,useSignUpInvitations as c}from"./packem_shared/useAuthSessions-BSS2wfV4.mjs";import{useAgent as U}from"./packem_shared/useAgent-BBuc2RNx.mjs";import{useAgentApprovals as S}from"./packem_shared/useAgentApprovals-yiIGlGck.mjs";import{useAgentChat as E}from"./packem_shared/useAgentChat-Igz_15YO.mjs";import{useAgentState as L}from"./packem_shared/useAgentState-DbQmCmhH.mjs";import{useAgentToolEvents as v}from"./packem_shared/useAgentToolEvents-vgG15IZX.mjs";import{default as F}from"./packem_shared/useAuth-DTiEKNfL.mjs";import{default as M}from"./packem_shared/useClientQuery-D01Sx8wn.mjs";import{default as b}from"./packem_shared/useConnectionStatus-VYjmmafS.mjs";import{useFlag as O,useFlags as k}from"./packem_shared/useFlag-CHzI2R8e.mjs";import{useHttpStream as V}from"./packem_shared/useHttpStream-B32eZ6DN.mjs";import{default as q}from"./packem_shared/useInfiniteQuery-CeMlqAp6.mjs";import{useLiveTopic as B}from"./packem_shared/useLiveTopic-DzP_8Gf3.mjs";import{useMutation as G}from"./packem_shared/useMutation-BfuQVXiY.mjs";import{useMutator as K}from"./packem_shared/useMutator-BtUd-xEA.mjs";import{usePaginatedQuery as W}from"./packem_shared/usePaginatedQuery-t6CEO-xB.mjs";import{hydratePreloaded as Y,default as Z}from"./packem_shared/hydratePreloaded-C94hJet3.mjs";import{usePresence as $}from"./packem_shared/usePresence-UDDcnYXw.mjs";import{default as re}from"./packem_shared/useQuery-BewsLSm_.mjs";import{useRateLimit as te}from"./packem_shared/useRateLimit-Cckxi8m9.mjs";import{useStream as se}from"./packem_shared/useStream-D__0Rgzf.mjs";import{default as pe}from"./packem_shared/useSubscription-P-_MNJm6.mjs";import{default as ne}from"./packem_shared/useSuspenseQuery-5wC1or5S.mjs";import{useVoiceAgent as me}from"./packem_shared/useVoiceAgent-iTIf7__2.mjs";import{createClientQuery as de,getErrorCode as le,getRetryAfterMs as Ae,isConflictError as ge,isForbiddenError as ce,isRateLimitedError as he,isUnauthorizedError as Ue}from"@lunora/client";import{lunoraQueryOptions as Se}from"@lunora/client/query";import{RestrictionError as Ee,UploadControl as Qe,UploadError as Le}from"@visulima/storage-client";import{useChunkedRestUpload as ve,useFileInput as Re,useMultipartUpload as Fe,usePasteUpload as Ie,useTusUpload as Me,useUpload as Te}from"@visulima/storage-client/react";export{o as AuthLoading,t as Authenticated,f as LunoraProvider,Ee as RestrictionError,u as Unauthenticated,Qe as UploadControl,Le as UploadError,de as createClientQuery,le as getErrorCode,Ae as getRetryAfterMs,Y as hydratePreloaded,ge as isConflictError,ce as isForbiddenError,he as isRateLimitedError,Ue as isUnauthorizedError,Se as lunoraQueryOptions,m as useAction,U as useAgent,S as useAgentApprovals,E as useAgentChat,L as useAgentState,v as useAgentToolEvents,F as useAuth,d as useAuthSessions,a as useAuthState,l as useAuthUsers,ve as useChunkedRestUpload,M as useClientQuery,b as useConnectionStatus,Re as useFileInput,O as useFlag,k as useFlags,V as useHttpStream,A as useImpersonate,q as useInfiniteQuery,B as useLiveTopic,n as useLunora,Fe as useMultipartUpload,G as useMutation,K as useMutator,g as useOrganizations,W as usePaginatedQuery,Ie as usePasteUpload,Z as usePreloadedQuery,$ as usePresence,re as useQuery,te as useRateLimit,c as useSignUpInvitations,se as useStream,pe as useSubscription,ne as useSuspenseQuery,Me as useTusUpload,Te as useUpload,me as useVoiceAgent};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as m}from"react/compiler-runtime";import{isLunoraAdminClient as S}from"@lunora/client/admin";import{authSessionsList as v,authUsersList as I,authOrganizationsList as b,authSignUpInvitationsList as z,ADMIN_AUTH_DEFAULT_PAGE_SIZE as U,subscribeAdminAuthIdentity as w,adminAuthListQueryKey as E,adminAuthListHasMore as P}from"@lunora/client/auth";import{LunoraError as M}from"@lunora/errors";import{useMutation as T,useQuery as $,keepPreviousData as q}from"@tanstack/react-query";import{useState as C,useSyncExternalStore as D}from"react";import{u as _}from"./lunora-provider-D15UPNFD.mjs";const f=()=>{const e=_();if(!S(e))throw new M("INTERNAL","The admin auth hooks need a LunoraAdminClient: construct the provider's client with `new LunoraAdminClient(...)` from `@lunora/client/admin`.");return e};function p(e,t,i={}){const{enabled:r=!0,pageSize:o=U}=i,[s,a]=C(o),n=D(d=>w(e,d),()=>e.currentIdentity(),()=>e.currentIdentity()),c=E(n,t,s),u=$({enabled:r,placeholderData:(d,y)=>y?.queryKey[1]===c[1]?q(d):void 0,queryFn:()=>t.fetchPage(s),queryKey:c,staleTime:0}),l=u.data?.rows,A=u.data?.total,h=P(u.data),g=()=>{h&&a(d=>d+o)},L=()=>{u.refetch().catch(()=>{})};return{data:l,error:u.error??void 0,hasMore:h,loadMore:g,loading:u.isLoading,refetch:L,total:A}}const Q=e=>{const t=m(3),i=e===void 0?{}:e,r=f(),{enabled:o,pageSize:s,...a}=i;let n;return t[0]!==o||t[1]!==s?(n={enabled:o,pageSize:s},t[0]=o,t[1]=s,t[2]=n):n=t[2],p(r,I(r,a),n)},G=e=>{const t=m(7);let i;t[0]!==e?(i=e===void 0?{}:e,t[0]=e,t[1]=i):i=t[1];const r=i,o=f(),{enabled:s,pageSize:a}=r;let n;t[2]!==o?(n=b(o),t[2]=o,t[3]=n):n=t[3];let c;return t[4]!==s||t[5]!==a?(c={enabled:s,pageSize:a},t[4]=s,t[5]=a,t[6]=c):c=t[6],p(o,n,c)},R=e=>{const t=m(7);let i;t[0]!==e?(i=e===void 0?{}:e,t[0]=e,t[1]=i):i=t[1];const r=i,o=f(),{enabled:s,pageSize:a}=r;let n;t[2]!==o?(n=z(o),t[2]=o,t[3]=n):n=t[3];let c;return t[4]!==s||t[5]!==a?(c={enabled:s,pageSize:a},t[4]=s,t[5]=a,t[6]=c):c=t[6],p(o,n,c)},Z=e=>{const t=m(3),i=e===void 0?{}:e,r=f(),{enabled:o,pageSize:s,userId:a}=i;let n;return t[0]!==o||t[1]!==s?(n={enabled:o,pageSize:s},t[0]=o,t[1]=s,t[2]=n):n=t[2],p(r,v(r,{userId:a}),n)},j=()=>{const e=m(10),t=f();let i;e[0]!==t?(i={mutationFn:l=>t.impersonateAuthUser({userId:l})},e[0]=t,e[1]=i):i=e[1];const r=T(i),{mutateAsync:o,reset:s}=r;let a;e[2]!==o?(a=l=>o(l),e[2]=o,e[3]=a):a=e[3];const n=a,c=r.error??void 0;let u;return e[4]!==n||e[5]!==r.data||e[6]!==r.isPending||e[7]!==s||e[8]!==c?(u={data:r.data,error:c,impersonate:n,pending:r.isPending,reset:s},e[4]=n,e[5]=r.data,e[6]=r.isPending,e[7]=s,e[8]=c,e[9]=u):u=e[9],u};export{Z as useAuthSessions,Q as useAuthUsers,j as useImpersonate,G as useOrganizations,R as useSignUpInvitations};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/react",
3
- "version": "1.0.0-alpha.268",
3
+ "version": "1.0.0-alpha.269",
4
4
  "description": "React hooks for Lunora: useQuery, useMutation, useSubscription, and useAuth",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -57,10 +57,10 @@
57
57
  "access": "public"
58
58
  },
59
59
  "dependencies": {
60
- "@lunora/client": "1.0.0-alpha.256",
60
+ "@lunora/client": "1.0.0-alpha.257",
61
61
  "@lunora/errors": ">=1.0.0-alpha.51 <2.0.0-0",
62
- "@lunora/ratelimit": "1.0.0-alpha.174",
63
- "@lunora/wire": "1.0.0-alpha.2",
62
+ "@lunora/ratelimit": "1.0.0-alpha.175",
63
+ "@lunora/wire": "1.0.0-alpha.3",
64
64
  "@visulima/storage-client": "1.0.9"
65
65
  },
66
66
  "peerDependencies": {
@@ -1,2 +0,0 @@
1
- 'use client';
2
- import{c as m}from"react/compiler-runtime";import{authSessionsList as v,authUsersList as L,authOrganizationsList as I,authSignUpInvitationsList as b,ADMIN_AUTH_DEFAULT_PAGE_SIZE as z,subscribeAdminAuthIdentity as U,adminAuthListQueryKey as P,adminAuthListHasMore as M}from"@lunora/client/auth";import{useMutation as $,useQuery as q,keepPreviousData as D}from"@tanstack/react-query";import{useState as E,useSyncExternalStore as _}from"react";import{u as p}from"./lunora-provider-D15UPNFD.mjs";function f(e,t,i={}){const{enabled:r=!0,pageSize:n=z}=i,[o,a]=E(n),s=_(d=>U(e,d),()=>e.currentIdentity(),()=>e.currentIdentity()),c=P(s,t,o),u=q({enabled:r,placeholderData:(d,S)=>S?.queryKey[1]===c[1]?D(d):void 0,queryFn:()=>t.fetchPage(o),queryKey:c,staleTime:0}),l=u.data?.rows,g=u.data?.total,h=M(u.data),y=()=>{h&&a(d=>d+n)},A=()=>{u.refetch().catch(()=>{})};return{data:l,error:u.error??void 0,hasMore:h,loadMore:y,loading:u.isLoading,refetch:A,total:g}}const H=e=>{const t=m(3),i=e===void 0?{}:e,r=p(),{enabled:n,pageSize:o,...a}=i;let s;return t[0]!==n||t[1]!==o?(s={enabled:n,pageSize:o},t[0]=n,t[1]=o,t[2]=s):s=t[2],f(r,L(r,a),s)},O=e=>{const t=m(7);let i;t[0]!==e?(i=e===void 0?{}:e,t[0]=e,t[1]=i):i=t[1];const r=i,n=p(),{enabled:o,pageSize:a}=r;let s;t[2]!==n?(s=I(n),t[2]=n,t[3]=s):s=t[3];let c;return t[4]!==o||t[5]!==a?(c={enabled:o,pageSize:a},t[4]=o,t[5]=a,t[6]=c):c=t[6],f(n,s,c)},Q=e=>{const t=m(7);let i;t[0]!==e?(i=e===void 0?{}:e,t[0]=e,t[1]=i):i=t[1];const r=i,n=p(),{enabled:o,pageSize:a}=r;let s;t[2]!==n?(s=b(n),t[2]=n,t[3]=s):s=t[3];let c;return t[4]!==o||t[5]!==a?(c={enabled:o,pageSize:a},t[4]=o,t[5]=a,t[6]=c):c=t[6],f(n,s,c)},k=e=>{const t=m(3),i=e===void 0?{}:e,r=p(),{enabled:n,pageSize:o,userId:a}=i;let s;return t[0]!==n||t[1]!==o?(s={enabled:n,pageSize:o},t[0]=n,t[1]=o,t[2]=s):s=t[2],f(r,v(r,{userId:a}),s)},G=()=>{const e=m(10),t=p();let i;e[0]!==t?(i={mutationFn:l=>t.impersonateAuthUser({userId:l})},e[0]=t,e[1]=i):i=e[1];const r=$(i),{mutateAsync:n,reset:o}=r;let a;e[2]!==n?(a=l=>n(l),e[2]=n,e[3]=a):a=e[3];const s=a,c=r.error??void 0;let u;return e[4]!==s||e[5]!==r.data||e[6]!==r.isPending||e[7]!==o||e[8]!==c?(u={data:r.data,error:c,impersonate:s,pending:r.isPending,reset:o},e[4]=s,e[5]=r.data,e[6]=r.isPending,e[7]=o,e[8]=c,e[9]=u):u=e[9],u};export{k as useAuthSessions,H as useAuthUsers,G as useImpersonate,O as useOrganizations,Q as useSignUpInvitations};