@stackframe/stack 2.6.15 → 2.6.16

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
@@ -2,7 +2,7 @@ export { default as StackProvider } from './providers/stack-provider.mjs';
2
2
  export { useStackApp, useUser } from './lib/hooks.mjs';
3
3
  export { default as StackHandler } from './components-page/stack-handler.mjs';
4
4
  export { StackTheme } from './providers/theme-provider.mjs';
5
- export { AdminDomainConfig, AdminEmailConfig, AdminOAuthProviderConfig, AdminOwnedProject, AdminProject, AdminProjectConfig, AdminProjectConfigUpdateOptions, AdminProjectCreateOptions, AdminProjectUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions, ApiKey, ApiKeyBase, ApiKeyBaseCrudRead, ApiKeyCreateOptions, ApiKeyFirstView, Connection, CurrentInternalServerUser, CurrentInternalUser, CurrentServerUser, CurrentUser, EditableTeamMemberProfile, GetUserOptions, HandlerUrls, OAuthConnection, OAuthProviderConfig, OAuthScopesOnSignIn, Project, ProjectConfig, ServerTeam, ServerTeamCreateOptions, ServerTeamMemberProfile, ServerTeamUpdateOptions, ServerTeamUser, ServerUser, StackAdminApp, StackAdminAppConstructorOptions, StackClientApp, StackClientAppConstructorOptions, StackClientAppJson, StackServerApp, StackServerAppConstructorOptions, Team, TeamCreateOptions, TeamMemberProfile, TeamPermission, TeamUpdateOptions, TeamUser, TokenStoreInit, User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol } from './lib/stack-app.mjs';
5
+ export { AdminDomainConfig, AdminEmailConfig, AdminOAuthProviderConfig, AdminOwnedProject, AdminProject, AdminProjectConfig, AdminProjectConfigUpdateOptions, AdminProjectCreateOptions, AdminProjectUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions, ApiKey, ApiKeyBase, ApiKeyBaseCrudRead, ApiKeyCreateOptions, ApiKeyFirstView, Connection, CurrentInternalServerUser, CurrentInternalUser, CurrentServerUser, CurrentUser, EditableTeamMemberProfile, GetUserOptions, HandlerUrls, OAuthConnection, OAuthProviderConfig, OAuthScopesOnSignIn, Project, ProjectConfig, ServerListUsersOptions, ServerTeam, ServerTeamCreateOptions, ServerTeamMemberProfile, ServerTeamUpdateOptions, ServerTeamUser, ServerUser, StackAdminApp, StackAdminAppConstructorOptions, StackClientApp, StackClientAppConstructorOptions, StackClientAppJson, StackServerApp, StackServerAppConstructorOptions, Team, TeamCreateOptions, TeamMemberProfile, TeamPermission, TeamUpdateOptions, TeamUser, TokenStoreInit, User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol } from './lib/stack-app.mjs';
6
6
  export { SignIn } from './components-page/sign-in.mjs';
7
7
  export { SignUp } from './components-page/sign-up.mjs';
8
8
  export { EmailVerification } from './components-page/email-verification.mjs';
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export { default as StackProvider } from './providers/stack-provider.js';
2
2
  export { useStackApp, useUser } from './lib/hooks.js';
3
3
  export { default as StackHandler } from './components-page/stack-handler.js';
4
4
  export { StackTheme } from './providers/theme-provider.js';
5
- export { AdminDomainConfig, AdminEmailConfig, AdminOAuthProviderConfig, AdminOwnedProject, AdminProject, AdminProjectConfig, AdminProjectConfigUpdateOptions, AdminProjectCreateOptions, AdminProjectUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions, ApiKey, ApiKeyBase, ApiKeyBaseCrudRead, ApiKeyCreateOptions, ApiKeyFirstView, Connection, CurrentInternalServerUser, CurrentInternalUser, CurrentServerUser, CurrentUser, EditableTeamMemberProfile, GetUserOptions, HandlerUrls, OAuthConnection, OAuthProviderConfig, OAuthScopesOnSignIn, Project, ProjectConfig, ServerTeam, ServerTeamCreateOptions, ServerTeamMemberProfile, ServerTeamUpdateOptions, ServerTeamUser, ServerUser, StackAdminApp, StackAdminAppConstructorOptions, StackClientApp, StackClientAppConstructorOptions, StackClientAppJson, StackServerApp, StackServerAppConstructorOptions, Team, TeamCreateOptions, TeamMemberProfile, TeamPermission, TeamUpdateOptions, TeamUser, TokenStoreInit, User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol } from './lib/stack-app.js';
5
+ export { AdminDomainConfig, AdminEmailConfig, AdminOAuthProviderConfig, AdminOwnedProject, AdminProject, AdminProjectConfig, AdminProjectConfigUpdateOptions, AdminProjectCreateOptions, AdminProjectUpdateOptions, AdminTeamPermission, AdminTeamPermissionDefinition, AdminTeamPermissionDefinitionCreateOptions, AdminTeamPermissionDefinitionUpdateOptions, ApiKey, ApiKeyBase, ApiKeyBaseCrudRead, ApiKeyCreateOptions, ApiKeyFirstView, Connection, CurrentInternalServerUser, CurrentInternalUser, CurrentServerUser, CurrentUser, EditableTeamMemberProfile, GetUserOptions, HandlerUrls, OAuthConnection, OAuthProviderConfig, OAuthScopesOnSignIn, Project, ProjectConfig, ServerListUsersOptions, ServerTeam, ServerTeamCreateOptions, ServerTeamMemberProfile, ServerTeamUpdateOptions, ServerTeamUser, ServerUser, StackAdminApp, StackAdminAppConstructorOptions, StackClientApp, StackClientAppConstructorOptions, StackClientAppJson, StackServerApp, StackServerAppConstructorOptions, Team, TeamCreateOptions, TeamMemberProfile, TeamPermission, TeamUpdateOptions, TeamUser, TokenStoreInit, User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol } from './lib/stack-app.js';
6
6
  export { SignIn } from './components-page/sign-in.js';
7
7
  export { SignUp } from './components-page/sign-up.js';
8
8
  export { EmailVerification } from './components-page/email-verification.js';
@@ -74,7 +74,7 @@ type ContactChannel = {
74
74
  isPrimary: boolean;
75
75
  isVerified: boolean;
76
76
  usedForAuth: boolean;
77
- sendVerificationEmail(): Promise<Result<undefined, KnownErrors["EmailAlreadyVerified"]>>;
77
+ sendVerificationEmail(): Promise<void>;
78
78
  update(data: ContactChannelUpdateOptions): Promise<void>;
79
79
  delete(): Promise<void>;
80
80
  };
@@ -88,7 +88,12 @@ type ContactChannelUpdateOptions = {
88
88
  value?: string;
89
89
  isPrimary?: boolean;
90
90
  };
91
- type ServerContactChannel = ContactChannel;
91
+ type ServerContactChannel = ContactChannel & {
92
+ update(data: ServerContactChannelUpdateOptions): Promise<void>;
93
+ };
94
+ type ServerContactChannelUpdateOptions = ContactChannelUpdateOptions & {
95
+ isVerified?: boolean;
96
+ };
92
97
  type ServerContactChannelCreateOptions = ContactChannelCreateOptions & {
93
98
  isVerified?: boolean;
94
99
  };
@@ -546,6 +551,13 @@ type ServerTeam = {
546
551
  }): Promise<void>;
547
552
  removeUser(userId: string): Promise<void>;
548
553
  } & Team;
554
+ type ServerListUsersOptions = {
555
+ cursor?: string;
556
+ limit?: number;
557
+ orderBy?: 'signedUpAt';
558
+ desc?: boolean;
559
+ query?: string;
560
+ };
549
561
  type ServerTeamCreateOptions = TeamCreateOptions;
550
562
  type ServerTeamUpdateOptions = TeamUpdateOptions & {
551
563
  clientReadOnlyMetadata?: ReadonlyJson;
@@ -672,7 +684,13 @@ type StackServerApp<HasTokenStore extends boolean = boolean, ProjectId extends s
672
684
  or: 'throw';
673
685
  }): Promise<ProjectCurrentServerUser<ProjectId>>;
674
686
  getUser(options?: GetUserOptions<HasTokenStore>): Promise<ProjectCurrentServerUser<ProjectId> | null>;
675
- } & AsyncStoreProperty<"user", [id: string], ServerUser | null, false> & AsyncStoreProperty<"users", [], ServerUser[], true> & AsyncStoreProperty<"team", [id: string], ServerTeam | null, false> & AsyncStoreProperty<"teams", [], ServerTeam[], true> & StackClientApp<HasTokenStore, ProjectId>);
687
+ listUsers(options?: ServerListUsersOptions): Promise<ServerUser[] & {
688
+ nextCursor: string | null;
689
+ }>;
690
+ useUsers(options?: ServerListUsersOptions): ServerUser[] & {
691
+ nextCursor: string | null;
692
+ };
693
+ } & AsyncStoreProperty<"user", [id: string], ServerUser | null, false> & Omit<AsyncStoreProperty<"users", [], ServerUser[], true>, "listUsers" | "useUsers"> & AsyncStoreProperty<"team", [id: string], ServerTeam | null, false> & AsyncStoreProperty<"teams", [], ServerTeam[], true> & StackClientApp<HasTokenStore, ProjectId>);
676
694
  declare const StackServerApp: StackServerAppConstructor;
677
695
  type StackAdminAppConstructor = {
678
696
  new <HasTokenStore extends boolean, ProjectId extends string>(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>;
@@ -710,4 +728,4 @@ type AsyncStoreProperty<Name extends string, Args extends any[], Value, IsMultip
710
728
  [key in `use${Capitalize<Name>}`]: (...args: Args) => Value;
711
729
  };
712
730
 
713
- export { type AdminDomainConfig, type AdminEmailConfig, type AdminOAuthProviderConfig, type AdminOwnedProject, type AdminProject, type AdminProjectConfig, type AdminProjectConfigUpdateOptions, type AdminProjectCreateOptions, type AdminProjectUpdateOptions, type AdminTeamPermission, type AdminTeamPermissionDefinition, type AdminTeamPermissionDefinitionCreateOptions, type AdminTeamPermissionDefinitionUpdateOptions, type ApiKey, type ApiKeyBase, type ApiKeyBaseCrudRead, type ApiKeyCreateOptions, type ApiKeyFirstView, type Connection, type CurrentInternalServerUser, type CurrentInternalUser, type CurrentServerUser, type CurrentUser, type EditableTeamMemberProfile, type GetUserOptions, type HandlerUrls, type OAuthConnection, type OAuthProviderConfig, type OAuthScopesOnSignIn, type Project, type ProjectConfig, type ServerTeam, type ServerTeamCreateOptions, type ServerTeamMemberProfile, type ServerTeamUpdateOptions, type ServerTeamUser, type ServerUser, StackAdminApp, type StackAdminAppConstructorOptions, StackClientApp, type StackClientAppConstructorOptions, type StackClientAppJson, StackServerApp, type StackServerAppConstructorOptions, type Team, type TeamCreateOptions, type TeamMemberProfile, type TeamPermission, type TeamUpdateOptions, type TeamUser, type TokenStoreInit, type User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol };
731
+ export { type AdminDomainConfig, type AdminEmailConfig, type AdminOAuthProviderConfig, type AdminOwnedProject, type AdminProject, type AdminProjectConfig, type AdminProjectConfigUpdateOptions, type AdminProjectCreateOptions, type AdminProjectUpdateOptions, type AdminTeamPermission, type AdminTeamPermissionDefinition, type AdminTeamPermissionDefinitionCreateOptions, type AdminTeamPermissionDefinitionUpdateOptions, type ApiKey, type ApiKeyBase, type ApiKeyBaseCrudRead, type ApiKeyCreateOptions, type ApiKeyFirstView, type Connection, type CurrentInternalServerUser, type CurrentInternalUser, type CurrentServerUser, type CurrentUser, type EditableTeamMemberProfile, type GetUserOptions, type HandlerUrls, type OAuthConnection, type OAuthProviderConfig, type OAuthScopesOnSignIn, type Project, type ProjectConfig, type ServerListUsersOptions, type ServerTeam, type ServerTeamCreateOptions, type ServerTeamMemberProfile, type ServerTeamUpdateOptions, type ServerTeamUser, type ServerUser, StackAdminApp, type StackAdminAppConstructorOptions, StackClientApp, type StackClientAppConstructorOptions, type StackClientAppJson, StackServerApp, type StackServerAppConstructorOptions, type Team, type TeamCreateOptions, type TeamMemberProfile, type TeamPermission, type TeamUpdateOptions, type TeamUser, type TokenStoreInit, type User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol };
@@ -74,7 +74,7 @@ type ContactChannel = {
74
74
  isPrimary: boolean;
75
75
  isVerified: boolean;
76
76
  usedForAuth: boolean;
77
- sendVerificationEmail(): Promise<Result<undefined, KnownErrors["EmailAlreadyVerified"]>>;
77
+ sendVerificationEmail(): Promise<void>;
78
78
  update(data: ContactChannelUpdateOptions): Promise<void>;
79
79
  delete(): Promise<void>;
80
80
  };
@@ -88,7 +88,12 @@ type ContactChannelUpdateOptions = {
88
88
  value?: string;
89
89
  isPrimary?: boolean;
90
90
  };
91
- type ServerContactChannel = ContactChannel;
91
+ type ServerContactChannel = ContactChannel & {
92
+ update(data: ServerContactChannelUpdateOptions): Promise<void>;
93
+ };
94
+ type ServerContactChannelUpdateOptions = ContactChannelUpdateOptions & {
95
+ isVerified?: boolean;
96
+ };
92
97
  type ServerContactChannelCreateOptions = ContactChannelCreateOptions & {
93
98
  isVerified?: boolean;
94
99
  };
@@ -546,6 +551,13 @@ type ServerTeam = {
546
551
  }): Promise<void>;
547
552
  removeUser(userId: string): Promise<void>;
548
553
  } & Team;
554
+ type ServerListUsersOptions = {
555
+ cursor?: string;
556
+ limit?: number;
557
+ orderBy?: 'signedUpAt';
558
+ desc?: boolean;
559
+ query?: string;
560
+ };
549
561
  type ServerTeamCreateOptions = TeamCreateOptions;
550
562
  type ServerTeamUpdateOptions = TeamUpdateOptions & {
551
563
  clientReadOnlyMetadata?: ReadonlyJson;
@@ -672,7 +684,13 @@ type StackServerApp<HasTokenStore extends boolean = boolean, ProjectId extends s
672
684
  or: 'throw';
673
685
  }): Promise<ProjectCurrentServerUser<ProjectId>>;
674
686
  getUser(options?: GetUserOptions<HasTokenStore>): Promise<ProjectCurrentServerUser<ProjectId> | null>;
675
- } & AsyncStoreProperty<"user", [id: string], ServerUser | null, false> & AsyncStoreProperty<"users", [], ServerUser[], true> & AsyncStoreProperty<"team", [id: string], ServerTeam | null, false> & AsyncStoreProperty<"teams", [], ServerTeam[], true> & StackClientApp<HasTokenStore, ProjectId>);
687
+ listUsers(options?: ServerListUsersOptions): Promise<ServerUser[] & {
688
+ nextCursor: string | null;
689
+ }>;
690
+ useUsers(options?: ServerListUsersOptions): ServerUser[] & {
691
+ nextCursor: string | null;
692
+ };
693
+ } & AsyncStoreProperty<"user", [id: string], ServerUser | null, false> & Omit<AsyncStoreProperty<"users", [], ServerUser[], true>, "listUsers" | "useUsers"> & AsyncStoreProperty<"team", [id: string], ServerTeam | null, false> & AsyncStoreProperty<"teams", [], ServerTeam[], true> & StackClientApp<HasTokenStore, ProjectId>);
676
694
  declare const StackServerApp: StackServerAppConstructor;
677
695
  type StackAdminAppConstructor = {
678
696
  new <HasTokenStore extends boolean, ProjectId extends string>(options: StackAdminAppConstructorOptions<HasTokenStore, ProjectId>): StackAdminApp<HasTokenStore, ProjectId>;
@@ -710,4 +728,4 @@ type AsyncStoreProperty<Name extends string, Args extends any[], Value, IsMultip
710
728
  [key in `use${Capitalize<Name>}`]: (...args: Args) => Value;
711
729
  };
712
730
 
713
- export { type AdminDomainConfig, type AdminEmailConfig, type AdminOAuthProviderConfig, type AdminOwnedProject, type AdminProject, type AdminProjectConfig, type AdminProjectConfigUpdateOptions, type AdminProjectCreateOptions, type AdminProjectUpdateOptions, type AdminTeamPermission, type AdminTeamPermissionDefinition, type AdminTeamPermissionDefinitionCreateOptions, type AdminTeamPermissionDefinitionUpdateOptions, type ApiKey, type ApiKeyBase, type ApiKeyBaseCrudRead, type ApiKeyCreateOptions, type ApiKeyFirstView, type Connection, type CurrentInternalServerUser, type CurrentInternalUser, type CurrentServerUser, type CurrentUser, type EditableTeamMemberProfile, type GetUserOptions, type HandlerUrls, type OAuthConnection, type OAuthProviderConfig, type OAuthScopesOnSignIn, type Project, type ProjectConfig, type ServerTeam, type ServerTeamCreateOptions, type ServerTeamMemberProfile, type ServerTeamUpdateOptions, type ServerTeamUser, type ServerUser, StackAdminApp, type StackAdminAppConstructorOptions, StackClientApp, type StackClientAppConstructorOptions, type StackClientAppJson, StackServerApp, type StackServerAppConstructorOptions, type Team, type TeamCreateOptions, type TeamMemberProfile, type TeamPermission, type TeamUpdateOptions, type TeamUser, type TokenStoreInit, type User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol };
731
+ export { type AdminDomainConfig, type AdminEmailConfig, type AdminOAuthProviderConfig, type AdminOwnedProject, type AdminProject, type AdminProjectConfig, type AdminProjectConfigUpdateOptions, type AdminProjectCreateOptions, type AdminProjectUpdateOptions, type AdminTeamPermission, type AdminTeamPermissionDefinition, type AdminTeamPermissionDefinitionCreateOptions, type AdminTeamPermissionDefinitionUpdateOptions, type ApiKey, type ApiKeyBase, type ApiKeyBaseCrudRead, type ApiKeyCreateOptions, type ApiKeyFirstView, type Connection, type CurrentInternalServerUser, type CurrentInternalUser, type CurrentServerUser, type CurrentUser, type EditableTeamMemberProfile, type GetUserOptions, type HandlerUrls, type OAuthConnection, type OAuthProviderConfig, type OAuthScopesOnSignIn, type Project, type ProjectConfig, type ServerListUsersOptions, type ServerTeam, type ServerTeamCreateOptions, type ServerTeamMemberProfile, type ServerTeamUpdateOptions, type ServerTeamUser, type ServerUser, StackAdminApp, type StackAdminAppConstructorOptions, StackClientApp, type StackClientAppConstructorOptions, type StackClientAppJson, StackServerApp, type StackServerAppConstructorOptions, type Team, type TeamCreateOptions, type TeamMemberProfile, type TeamPermission, type TeamUpdateOptions, type TeamUser, type TokenStoreInit, type User, serverTeamPermissionDefinitionCreateOptionsToCrud, serverTeamPermissionDefinitionUpdateOptionsToCrud, stackAppInternalsSymbol };
@@ -64,7 +64,7 @@ var import_url = require("../utils/url");
64
64
  var import_auth = require("./auth");
65
65
  var import_cookie = require("./cookie");
66
66
  var NextNavigation = (0, import_compile_time.scrambleDuringCompileTime)(NextNavigationUnscrambled);
67
- var clientVersion = "js @stackframe/stack@2.6.15";
67
+ var clientVersion = "js @stackframe/stack@2.6.16";
68
68
  function getUrls(partial) {
69
69
  const handler = partial.handler ?? "/handler";
70
70
  const home = partial.home ?? "/";
@@ -606,7 +606,7 @@ var _StackClientAppImpl = class __StackClientAppImpl {
606
606
  isPrimary: crud.is_primary,
607
607
  usedForAuth: crud.used_for_auth,
608
608
  async sendVerificationEmail() {
609
- return await app._interface.sendCurrentUserContactChannelVerificationEmail(crud.id, (0, import_url.constructRedirectUrl)(app.urls.emailVerification), app._getSession());
609
+ await app._interface.sendCurrentUserContactChannelVerificationEmail(crud.id, (0, import_url.constructRedirectUrl)(app.urls.emailVerification), app._getSession());
610
610
  },
611
611
  async update(data) {
612
612
  await app._interface.updateClientContactChannel(crud.id, contactChannelUpdateOptionsToCrud(data), app._getSession());
@@ -1362,8 +1362,8 @@ var _StackServerAppImpl = class extends _StackClientAppImpl {
1362
1362
  this._currentServerUserCache = createCacheBySession(async (session) => {
1363
1363
  return await this._interface.getServerUserByToken(session);
1364
1364
  });
1365
- this._serverUsersCache = createCache(async () => {
1366
- return await this._interface.listServerUsers();
1365
+ this._serverUsersCache = createCache(async ([cursor, limit, orderBy, desc, query]) => {
1366
+ return await this._interface.listServerUsers({ cursor, limit, orderBy, desc, query });
1367
1367
  });
1368
1368
  this._serverUserCache = createCache(async ([userId]) => {
1369
1369
  const user = await this._interface.getServerUserById(userId);
@@ -1438,7 +1438,7 @@ var _StackServerAppImpl = class extends _StackClientAppImpl {
1438
1438
  return {
1439
1439
  ...this._clientContactChannelFromCrud(crud),
1440
1440
  async sendVerificationEmail() {
1441
- return await app._interface.sendServerContactChannelVerificationEmail(userId, crud.id, (0, import_url.constructRedirectUrl)(app.urls.emailVerification));
1441
+ await app._interface.sendServerContactChannelVerificationEmail(userId, crud.id, (0, import_url.constructRedirectUrl)(app.urls.emailVerification));
1442
1442
  },
1443
1443
  async update(data) {
1444
1444
  await app._interface.updateServerContactChannel(userId, crud.id, serverContactChannelUpdateOptionsToCrud(data));
@@ -1738,15 +1738,17 @@ var _StackServerAppImpl = class extends _StackClientAppImpl {
1738
1738
  return crud && this._serverUserFromCrud(crud);
1739
1739
  }, [crud]);
1740
1740
  }
1741
- async listUsers() {
1742
- const crud = await this._serverUsersCache.getOrWait([], "write-only");
1743
- return crud.map((j) => this._serverUserFromCrud(j));
1741
+ async listUsers(options) {
1742
+ const crud = await this._serverUsersCache.getOrWait([options?.cursor, options?.limit, options?.orderBy, options?.desc, options?.query], "write-only");
1743
+ const result = crud.items.map((j) => this._serverUserFromCrud(j));
1744
+ result.nextCursor = crud.pagination?.next_cursor ?? null;
1745
+ return result;
1744
1746
  }
1745
- useUsers() {
1746
- const crud = useAsyncCache(this._serverUsersCache, [], "useServerUsers()");
1747
- return (0, import_react2.useMemo)(() => {
1748
- return crud.map((j) => this._serverUserFromCrud(j));
1749
- }, [crud]);
1747
+ useUsers(options) {
1748
+ const crud = useAsyncCache(this._serverUsersCache, [options?.cursor, options?.limit, options?.orderBy, options?.desc, options?.query], "useServerUsers()");
1749
+ const result = crud.items.map((j) => this._serverUserFromCrud(j));
1750
+ result.nextCursor = crud.pagination?.next_cursor ?? null;
1751
+ return result;
1750
1752
  }
1751
1753
  _serverPermissionFromCrud(crud) {
1752
1754
  return {