cauthy-auth 0.31.0 → 0.32.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.
package/README.md CHANGED
@@ -56,6 +56,7 @@ export const auth = createCauthy({ pages: { signIn: '/sign-in', resetPassword: '
56
56
  ```tsx
57
57
  import { AcceptInvite, ResetPassword, VerifyEmail } from 'cauthy-auth/react'
58
58
  <AcceptInvite links={{ signIn: '/sign-in' }} returnTo="/" /> // "You've been invited to Acme", a password, signed in
59
+ <AcceptInvite onSaved={(e) => track(e.kind)} /> // 'invitation.accepted', with the address
59
60
 
60
61
  const { invitation, acceptInvitation } = useAuth() // or with your own form
61
62
  ```
@@ -65,8 +66,19 @@ The forms follow what the workspace turned on in Cauthy's dashboard: each provid
65
66
  And the person's account, in your application: name, password, second step, sessions.
66
67
 
67
68
  ```tsx
68
- import { Account } from 'cauthy-auth/react'
69
+ import { Account, AccountPasskeys } from 'cauthy-auth/react'
69
70
  <Account /> // or: const { account } = useAuth()
71
+ <Account sections={['profile', 'password', 'sessions']} onSaved={(e) => toast(e.kind)} />
72
+ <AccountPasskeys /> // each part on its own card
73
+ ```
74
+
75
+ `sections` lists the parts shown, in that order: `profile`, `email`, `password`, `linked`, `secondStep`, `phone`, `passkeys`, `agents`, `sessions` (default: all). Each is also its own component: `AccountProfile`, `AccountEmail`, `AccountPassword`, `AccountLinked`, `AccountSecondStep`, `AccountPhone`, `AccountPasskeys`, `AccountAgents`, `AccountSessions`. `onSaved` is called after every change saved, with `{ kind, ... }`: `profile.saved`, `email.change_requested`, `password.changed`, `identity.linked`, `identity.unlinked`, `mfa.enabled`, `mfa.disabled`, `recovery_codes.regenerated`, `phone.added`, `phone.removed`, `passkey.added`, `passkey.removed`, `agent.disconnected`, `sessions.ended`.
76
+
77
+ The legal documents a signed-in person still owes (a new version of the terms), with the action that accepts them. It shows nothing when nothing is owed:
78
+
79
+ ```tsx
80
+ import { PendingTerms } from 'cauthy-auth/react'
81
+ <PendingTerms onSuccess={() => refresh()} /> // or: account.legal(), account.acceptLegal()
70
82
  ```
71
83
 
72
84
  And the person's organizations, run by their own members: the people of one, and the organization itself. Cauthy decides each change by the person's role in the system's catalog, with their own session:
@@ -74,6 +86,12 @@ And the person's organizations, run by their own members: the people of one, and
74
86
  ```tsx
75
87
  import { OrganizationMembers } from 'cauthy-auth/react'
76
88
  <OrganizationMembers organizationId={org.id} /> // shows only what the person's role allows
89
+ <OrganizationMembers
90
+ organizationId={org.id}
91
+ roles={(role) => role !== 'billing'} // the roles offered when adding or changing one
92
+ hide={['archive', 'delete']} // never offered: 'archive', 'delete', 'rename', 'leave'
93
+ onSaved={(e) => toast(e.kind)} // member.added, member.role_changed, member.removed, member.left,
94
+ /> // member.invited_again, organization.renamed, .archived, .deleted
77
95
 
78
96
  const { organizations } = useAuth()
79
97
  const [org] = await organizations.list() // org.can: { readMembers, manageMembers, removeMembers, update, archive, delete }
@@ -155,7 +173,27 @@ The ready-made forms wear the look set for your application in Cauthy's dashboar
155
173
  import 'cauthy-auth/styles.css'
156
174
  ```
157
175
 
158
- Or draw them with your own `components` and `classNames`, and pass `unstyled`. The dashboard can start the look from your stylesheet (shadcn/ui and Tailwind, Stackmyth, or variables of your own); `npx cauthy-auth theme --css src/app/globals.css` reads it the same way from a terminal.
176
+ Or draw them with your own `components` and `classNames`, and pass `unstyled`. Every part the forms draw can be yours; a part not given is drawn as before. With every part given and `unstyled`, the forms add only structural wrappers (`div`, `form`, `section`, lists):
177
+
178
+ ```tsx
179
+ <SignIn unstyled components={{ Button, Input, Checkbox, Select, Field, Text, Badge, Link, Divider, Alert, Confirm }} />
180
+ ```
181
+
182
+ | Part | Is given |
183
+ | --- | --- |
184
+ | `Button` | `type`, `disabled`, `className`, `onClick`, `children` |
185
+ | `Input` | `id`, `name`, `type`, `value`, `autoComplete`, `required`, `className`, `aria-invalid`, `aria-describedby`, `onChange(e)` |
186
+ | `Checkbox` | `id`, `name`, `checked`, `required`, `disabled`, `className`, `onChange(checked)`, `children` (its label) |
187
+ | `Select` | `id`, `name`, `value`, `options: { value, label }[]`, `disabled`, `className`, `aria-label`, `onChange(value)` |
188
+ | `Field` | `id`, `label`, `aside`, `help`, `error`, `required`, `className`, `children` (the control). Give the help the id `${id}-hint` and the error `${id}-error` |
189
+ | `Text` | `as` (`p`, `span`, `h2`), `tone` (`muted`, `danger`, `success`), `size` (`sm`, `md`, `lg`), `children` |
190
+ | `Badge` | `tone` (`neutral`, `success`, `warning`, `danger`), `children` |
191
+ | `Link` | `href`, `onClick`, `newTab`, `children` |
192
+ | `Divider` | `label` |
193
+ | `Alert` | `tone` (`danger`, `info`, `success`), `children`. Announce it: `role="alert"` or `role="status"` |
194
+ | `Confirm` | A function, `({ title, body, confirmLabel, cancelLabel, danger }) => Promise<boolean>`: your own dialog before removing a member, leaving, archiving or deleting. Without it, the question shows inline |
195
+
196
+ `texts` changes any sentence. Its keys are stable: `email`, `password`, `name`, `code`, `signIn`, `signUp`, `continueWith`, `orWithEmail`, `forgotPassword`, `noAccount`, `createAccount`, `company`, `iAccept`, `and`, `termsOfService`, `privacyPolicy`, `haveAccount`, `sendLink`, `linkSent`, `codeHelp`, `codeHelpPhone`, `codeHelpEmail`, `sendEmailAgain`, `sendCodeSms`, `sendCodeWhatsapp`, `codeSent`, `pushSend`, `pushPick`, `pushWaiting`, `phone`, `phoneHelp`, `phoneOn`, `phoneOff`, `addPhone`, `removePhone`, `bySms`, `byWhatsapp`, `channel`, `verify`, `checkEmail`, `backToSignIn`, `emailMeALink`, `usePasskey`, `codeFromMail`, `signInLinkSent`, `newPassword`, `savePassword`, `passwordChanged`, `confirming`, `emailConfirmed`, `invitedTo`, `invitedToOrganization`, `invitedAs`, `choosePassword`, `acceptInvite`, `openingInvitation`, `invitationInvalid`, `profile`, `save`, `saved`, `currentPassword`, `changePassword`, `passwordChangedHere`, `secondStep`, `secondStepOn`, `secondStepOff`, `turnOn`, `turnOff`, `addToApp`, `openInApp`, `recoveryCodes`, `newRecoveryCodes`, `keepCodes`, `passkeys`, `managePasskeys`, `passkeysHelp`, `noPasskeys`, `passkeyName`, `addPasskey` (unused), `addPasskeyDevice`, `addSecurityKey`, `passkeyKinds`, `removePasskey`, `passkeyAdded`, `passkeyUnnamed`, `sessions`, `signOutEverywhere`, `agents`, `agentsHelp`, `disconnect`, `anAgent`, `unknownDevice`, `emailAddress`, `newEmail`, `changeEmail`, `emailSent`, `linkedAccounts`, `noLinkedAccounts`, `linkWith`, `unlink`, `linked`, `ssoOnly`, `members`, `membersHidden`, `organizationMissing`, `memberYou`, `memberInvited`, `memberManager`, `memberRole`, `memberAdd`, `memberAdded`, `memberRemove`, `memberRemoveConfirm`, `memberLeave`, `memberLeaveConfirm`, `memberInviteAgain`, `memberInvitationSent`, `organization`, `organizationRename`, `organizationRenamed`, `organizationArchive`, `organizationArchiveConfirm`, `organizationArchived`, `organizationDelete`, `organizationDeleteConfirm`, `organizationDeleted`, `yes`, `cancel`, `termsChanged`, `termsChangedHelp`, `acceptTerms`, and `errors` by error code. Built in: English and Spanish (`locale`). The dashboard can start the look from your stylesheet (shadcn/ui and Tailwind, Stackmyth, or variables of your own); `npx cauthy-auth theme --css src/app/globals.css` reads it the same way from a terminal.
159
197
 
160
198
  Connect your application to Cauthy in one step, from Cauthy's dashboard ("Connect a System") or from a terminal. In the application's folder, `init` reads its framework (Next.js, TanStack Start, React Router or Remix, SvelteKit, Vite + React, Express, Hono, Fastify), makes the client, writes every variable to its env file, `CAUTHY_SECRET` included, and lays down the route and a sign-in page, never over a file that is there:
161
199
 
package/dist/react.d.mts CHANGED
@@ -1180,6 +1180,8 @@ interface AuthTexts {
1180
1180
  removePhone: string;
1181
1181
  bySms: string;
1182
1182
  byWhatsapp: string;
1183
+ /** The label of the channel phone codes go by, where the application draws it as a select. */
1184
+ channel: string;
1183
1185
  verify: string;
1184
1186
  checkEmail: string;
1185
1187
  backToSignIn: string;
@@ -1271,6 +1273,9 @@ interface AuthTexts {
1271
1273
  organizationDeleted: string;
1272
1274
  yes: string;
1273
1275
  cancel: string;
1276
+ termsChanged: string;
1277
+ termsChangedHelp: string;
1278
+ acceptTerms: string;
1274
1279
  /** By error code; one missing shows what the server said. */
1275
1280
  errors: Record<string, string>;
1276
1281
  }
@@ -1313,34 +1318,138 @@ interface AuthFormProps {
1313
1318
  */
1314
1319
  workspaceLook?: boolean;
1315
1320
  /**
1316
- * The application's own button and input, to draw the form with. Each is
1317
- * given what a `<button>` or an `<input>` would be.
1321
+ * The application's own parts, to draw the form with: its button, input,
1322
+ * checkbox, select, field, text, badge, link, divider, alert and
1323
+ * confirmation. A part not given is drawn as before; with every part given
1324
+ * and `unstyled`, the form adds no element that carries a look of its own.
1318
1325
  */
1319
- components?: {
1320
- Button?: ComponentType<{
1321
- type: 'submit' | 'button';
1322
- disabled?: boolean;
1323
- className?: string;
1324
- onClick?: () => void;
1325
- children: ReactNode;
1326
- }>;
1327
- Input?: ComponentType<{
1328
- id: string;
1329
- name: string;
1330
- type: string;
1326
+ components?: AuthComponents;
1327
+ }
1328
+ /** What the application's button is given: what a `<button>` would be. */
1329
+ interface AuthButtonProps {
1330
+ type: 'submit' | 'button';
1331
+ disabled?: boolean;
1332
+ className?: string;
1333
+ onClick?: () => void;
1334
+ children: ReactNode;
1335
+ }
1336
+ /** What the application's input is given: what an `<input>` would be. */
1337
+ interface AuthInputProps {
1338
+ id: string;
1339
+ name: string;
1340
+ type: string;
1341
+ value: string;
1342
+ autoComplete?: string;
1343
+ required?: boolean;
1344
+ className?: string;
1345
+ 'aria-invalid'?: boolean;
1346
+ 'aria-describedby'?: string;
1347
+ onChange: (e: {
1348
+ target: {
1331
1349
  value: string;
1332
- autoComplete?: string;
1333
- required?: boolean;
1334
- className?: string;
1335
- 'aria-invalid'?: boolean;
1336
- 'aria-describedby'?: string;
1337
- onChange: (e: {
1338
- target: {
1339
- value: string;
1340
- };
1341
- }) => void;
1342
- }>;
1343
- };
1350
+ };
1351
+ }) => void;
1352
+ }
1353
+ /** A box to tick: the legal documents and each consent of a sign-up. `children` is its label. */
1354
+ interface AuthCheckboxProps {
1355
+ id: string;
1356
+ name: string;
1357
+ checked: boolean;
1358
+ required?: boolean;
1359
+ disabled?: boolean;
1360
+ className?: string;
1361
+ onChange: (checked: boolean) => void;
1362
+ children: ReactNode;
1363
+ }
1364
+ /** One choice of a few: a member's role, the channel of phone codes. Without a visible label it carries `aria-label`. */
1365
+ interface AuthSelectProps {
1366
+ id: string;
1367
+ name: string;
1368
+ value: string;
1369
+ options: {
1370
+ value: string;
1371
+ label: string;
1372
+ }[];
1373
+ disabled?: boolean;
1374
+ className?: string;
1375
+ 'aria-label'?: string;
1376
+ onChange: (value: string) => void;
1377
+ }
1378
+ /**
1379
+ * A label, its control (`children`) and what is said under it. The control's
1380
+ * `aria-describedby` names `${id}-hint` and `${id}-error`: give the help and
1381
+ * the error those ids for a screen reader to read them with it.
1382
+ */
1383
+ interface AuthFieldProps {
1384
+ id: string;
1385
+ label: ReactNode;
1386
+ children: ReactNode;
1387
+ /** Beside the label: "Forgot your password?". */
1388
+ aside?: ReactNode;
1389
+ /** What the field takes (a new password's rule). Not given while there is an error. */
1390
+ help?: ReactNode;
1391
+ error?: ReactNode;
1392
+ required?: boolean;
1393
+ className?: string;
1394
+ }
1395
+ /** A sentence of the form: help, a state, the footer (`size: 'sm'`), a section's heading (`as: 'h2'`). */
1396
+ interface AuthTextProps {
1397
+ as?: 'p' | 'span' | 'h2';
1398
+ tone?: 'muted' | 'danger' | 'success';
1399
+ size?: 'sm' | 'md' | 'lg';
1400
+ children: ReactNode;
1401
+ }
1402
+ /** A short mark beside a name: "you", "invited", a role, a passkey's kind. */
1403
+ interface AuthBadgeProps {
1404
+ tone?: 'neutral' | 'success' | 'warning' | 'danger';
1405
+ children: ReactNode;
1406
+ }
1407
+ /** A link: to another screen, or a legal document (`newTab`). */
1408
+ interface AuthLinkProps {
1409
+ href?: string;
1410
+ onClick?: () => void;
1411
+ newTab?: boolean;
1412
+ children: ReactNode;
1413
+ }
1414
+ /** The line between the providers and the address: "or with your email". */
1415
+ interface AuthDividerProps {
1416
+ label?: ReactNode;
1417
+ }
1418
+ /**
1419
+ * What went wrong (`danger`), what was done (`success`) or what to know
1420
+ * (`info`). The built-in one is announced: `role="alert"` for danger,
1421
+ * `role="status"` otherwise; the application's should be too.
1422
+ */
1423
+ interface AuthAlertProps {
1424
+ tone: 'danger' | 'info' | 'success';
1425
+ children: ReactNode;
1426
+ }
1427
+ /** What a confirmation asks: removing a member, leaving, archiving or deleting the organization. */
1428
+ interface AuthConfirmOptions {
1429
+ title: string;
1430
+ body?: string;
1431
+ confirmLabel: string;
1432
+ cancelLabel: string;
1433
+ danger?: boolean;
1434
+ }
1435
+ /** The parts a form may be drawn with. See `AuthFormProps.components`. */
1436
+ interface AuthComponents {
1437
+ Button?: ComponentType<AuthButtonProps>;
1438
+ Input?: ComponentType<AuthInputProps>;
1439
+ Checkbox?: ComponentType<AuthCheckboxProps>;
1440
+ Select?: ComponentType<AuthSelectProps>;
1441
+ Field?: ComponentType<AuthFieldProps>;
1442
+ Text?: ComponentType<AuthTextProps>;
1443
+ Badge?: ComponentType<AuthBadgeProps>;
1444
+ Link?: ComponentType<AuthLinkProps>;
1445
+ Divider?: ComponentType<AuthDividerProps>;
1446
+ Alert?: ComponentType<AuthAlertProps>;
1447
+ /**
1448
+ * Asks before something that cannot be undone, and answers whether to go
1449
+ * on: the application's own dialog. Not given: the question shows inline,
1450
+ * with a yes and a cancel button. Never the browser's own dialog.
1451
+ */
1452
+ Confirm?: (options: AuthConfirmOptions) => Promise<boolean>;
1344
1453
  }
1345
1454
  declare function SignIn(props: AuthFormProps): react.JSX.Element;
1346
1455
  interface GoogleOneTapProps {
@@ -1371,12 +1480,84 @@ declare function VerifyEmail(props: AuthFormProps): react.JSX.Element;
1371
1480
  * `returnTo`. The invitation is good until it is accepted: reading it, or a
1372
1481
  * password refused, does not spend it.
1373
1482
  */
1374
- declare function AcceptInvite(props: AuthFormProps): react.JSX.Element;
1483
+ /** What `<AcceptInvite />` tells the application once the invitation is accepted. */
1484
+ type AcceptInviteEvent = {
1485
+ kind: 'invitation.accepted';
1486
+ email: string;
1487
+ organization?: string;
1488
+ };
1489
+ interface AcceptInviteProps extends AuthFormProps {
1490
+ /** Called once the invitation is accepted, before the second step when the account owes one. */
1491
+ onSaved?: (event: AcceptInviteEvent) => void;
1492
+ }
1493
+ declare function AcceptInvite(props: AcceptInviteProps): react.JSX.Element;
1494
+ interface PendingTermsProps extends Omit<AuthFormProps, 'links' | 'returnTo' | 'createAccounts'> {
1495
+ /** Called once the person accepted. Nothing else happens: the application decides what follows. */
1496
+ onSuccess?: () => void;
1497
+ }
1498
+ /**
1499
+ * The legal documents the signed-in person still owes (a new version of the
1500
+ * terms, say), linked, with the action that accepts them. It shows nothing
1501
+ * while it reads them, when nothing is owed, and once they are accepted.
1502
+ * Nothing stops the person meanwhile: the application decides what waits.
1503
+ */
1504
+ declare function PendingTerms(props: PendingTermsProps): react.JSX.Element | null;
1505
+ /** The parts of `<Account />`, by name: what `sections` lists. */
1506
+ type AccountSection = 'profile' | 'email' | 'password' | 'linked' | 'secondStep' | 'phone' | 'passkeys' | 'agents' | 'sessions';
1507
+ /**
1508
+ * What `<Account />` tells the application after each change it saved, for
1509
+ * the application's own toast or its own data to follow.
1510
+ */
1511
+ type AccountEvent = {
1512
+ kind: 'profile.saved';
1513
+ name: string;
1514
+ } | {
1515
+ kind: 'email.change_requested';
1516
+ email: string;
1517
+ } | {
1518
+ kind: 'password.changed';
1519
+ } | {
1520
+ kind: 'identity.linked';
1521
+ provider: string;
1522
+ } | {
1523
+ kind: 'identity.unlinked';
1524
+ provider: string;
1525
+ } | {
1526
+ kind: 'mfa.enabled';
1527
+ } | {
1528
+ kind: 'mfa.disabled';
1529
+ } | {
1530
+ kind: 'recovery_codes.regenerated';
1531
+ } | {
1532
+ kind: 'phone.added';
1533
+ channel: 'sms' | 'whatsapp';
1534
+ } | {
1535
+ kind: 'phone.removed';
1536
+ } | {
1537
+ kind: 'passkey.added';
1538
+ id: string;
1539
+ } | {
1540
+ kind: 'passkey.removed';
1541
+ id: string;
1542
+ } | {
1543
+ kind: 'agent.disconnected';
1544
+ id: string;
1545
+ } | {
1546
+ kind: 'sessions.ended';
1547
+ };
1375
1548
  interface AccountProps extends Omit<AuthFormProps, 'links' | 'returnTo' | 'onSuccess'> {
1376
1549
  /** Called after "sign out everywhere". Default: go to `/`. */
1377
1550
  onSignedOut?: () => void;
1378
1551
  /** The moment of a session, as the application writes dates. Default: the browser's own way, in the reader's time zone. */
1379
1552
  formatDate?: (iso: string) => string;
1553
+ /**
1554
+ * The parts shown, in this order. Default: all of them, as listed in
1555
+ * `AccountSection`. A part with nothing to show (the password of an account
1556
+ * without one, agents when none is connected) stays out either way.
1557
+ */
1558
+ sections?: AccountSection[];
1559
+ /** Called after every change saved, with what changed. */
1560
+ onSaved?: (event: AccountEvent) => void;
1380
1561
  }
1381
1562
  /**
1382
1563
  * The signed-in person's account, in the application: their name, their
@@ -1384,11 +1565,82 @@ interface AccountProps extends Omit<AuthFormProps, 'links' | 'returnTo' | 'onSuc
1384
1565
  * its own. Like the other forms, it carries no styles.
1385
1566
  */
1386
1567
  declare function Account(props: AccountProps): react.JSX.Element;
1568
+ /** What each part of the account screen takes, shown on its own: `<Account />`'s props but `sections`. */
1569
+ type AccountPartProps = Omit<AccountProps, 'sections'>;
1570
+ /** The person's name. */
1571
+ declare function AccountProfile(props: AccountPartProps): react.JSX.Element;
1572
+ /** Changing the address: a link goes to the new one. */
1573
+ declare function AccountEmail(props: AccountPartProps): react.JSX.Element;
1574
+ /** Changing the password, for an account that has one. */
1575
+ declare function AccountPassword(props: AccountPartProps): react.JSX.Element;
1576
+ /** The providers the account signs in with. */
1577
+ declare function AccountLinked(props: AccountPartProps): react.JSX.Element;
1578
+ /** The second step with an authenticator app, and the recovery codes. */
1579
+ declare function AccountSecondStep(props: AccountPartProps): react.JSX.Element;
1580
+ /** The phone codes go to, where the workspace sends them. */
1581
+ declare function AccountPhone(props: AccountPartProps): react.JSX.Element;
1582
+ /** The account's passkeys. */
1583
+ declare function AccountPasskeys(props: AccountPartProps): react.JSX.Element;
1584
+ /** The AI agents the person connected, when there is one. */
1585
+ declare function AccountAgents(props: AccountPartProps): react.JSX.Element;
1586
+ /** Where the person is signed in, and "sign out everywhere". */
1587
+ declare function AccountSessions(props: AccountPartProps): react.JSX.Element;
1588
+ /** An action `<OrganizationMembers hide={...} />` never offers. */
1589
+ type OrganizationMembersAction = 'archive' | 'delete' | 'rename' | 'leave';
1590
+ /**
1591
+ * What `<OrganizationMembers />` tells the application after each change it
1592
+ * saved, for the application's own toast or its own data to follow.
1593
+ */
1594
+ type OrganizationMembersEvent = {
1595
+ kind: 'member.added';
1596
+ organizationId: string;
1597
+ userId: string;
1598
+ email: string;
1599
+ role: string;
1600
+ } | {
1601
+ kind: 'member.role_changed';
1602
+ organizationId: string;
1603
+ userId: string;
1604
+ role: string;
1605
+ previousRole: string;
1606
+ } | {
1607
+ kind: 'member.removed';
1608
+ organizationId: string;
1609
+ userId: string;
1610
+ } | {
1611
+ kind: 'member.left';
1612
+ organizationId: string;
1613
+ userId: string;
1614
+ } | {
1615
+ kind: 'member.invited_again';
1616
+ organizationId: string;
1617
+ userId: string;
1618
+ } | {
1619
+ kind: 'organization.renamed';
1620
+ organizationId: string;
1621
+ name: string;
1622
+ } | {
1623
+ kind: 'organization.archived';
1624
+ organizationId: string;
1625
+ } | {
1626
+ kind: 'organization.deleted';
1627
+ organizationId: string;
1628
+ };
1387
1629
  interface OrganizationMembersProps extends Omit<AuthFormProps, 'links' | 'returnTo' | 'onSuccess' | 'createAccounts'> {
1388
1630
  /** The organization, by the id Cauthy gave it. */
1389
1631
  organizationId: string;
1390
1632
  /** The moment of a membership, as the application writes dates. Default: the browser's own way. */
1391
1633
  formatDate?: (iso: string) => string;
1634
+ /**
1635
+ * The roles offered when adding a member or changing one's role: those for
1636
+ * which it answers true. A member already holding another role keeps it,
1637
+ * and it shows. Default: every role the person may give.
1638
+ */
1639
+ roles?: (role: string, choice: OrganizationRoleChoice) => boolean;
1640
+ /** Actions never offered, whatever the person's role allows. */
1641
+ hide?: OrganizationMembersAction[];
1642
+ /** Called after every change saved, with what changed. */
1643
+ onSaved?: (event: OrganizationMembersEvent) => void;
1392
1644
  }
1393
1645
  /**
1394
1646
  * The people of one of the signed-in person's organizations, administered
@@ -1446,4 +1698,4 @@ declare function useSession(): SessionContext;
1446
1698
  */
1447
1699
  declare function useAuth(): AuthClient & Pick<SessionContext, 'session' | 'status' | 'refresh'>;
1448
1700
 
1449
- export { AcceptInvite, Account, type AccountClient, type Account$1 as AccountDetails, type AccountProps, type AccountSession, type AuthClient, type AuthError, type AuthFormProps, type AuthMethods, type AuthResult, type AuthTexts, CauthyProvider, type CauthyProviderProps, type ConnectedAgent, ForgotPassword, GoogleOneTap, type GoogleOneTapProps, type Invitation, type JsonValue, type LinkedIdentity, OrganizationMembers, type OrganizationMembersProps, type OrganizationPerson, type OrganizationRoleChoice, type OrganizationSeat, type OrganizationsClient, type Passkey, type PasskeyKind, type PermissionOf, type Policy, type PublicSession, ResetPassword, type RoleOf, type SSOConnection, type SecondStep, type SessionContext, type SessionOrganization, type SessionUser, SignIn, SignUp, VerifyEmail, can, canAutofillPasskeys, canUsePasskeys, createAuthClient, definePolicy, useAuth, useSession };
1701
+ export { AcceptInvite, type AcceptInviteEvent, type AcceptInviteProps, Account, AccountAgents, type AccountClient, type Account$1 as AccountDetails, AccountEmail, type AccountEvent, AccountLinked, type AccountPartProps, AccountPasskeys, AccountPassword, AccountPhone, AccountProfile, type AccountProps, AccountSecondStep, type AccountSection, type AccountSession, AccountSessions, type AuthAlertProps, type AuthBadgeProps, type AuthButtonProps, type AuthCheckboxProps, type AuthClient, type AuthComponents, type AuthConfirmOptions, type AuthDividerProps, type AuthError, type AuthFieldProps, type AuthFormProps, type AuthInputProps, type AuthLinkProps, type AuthMethods, type AuthResult, type AuthSelectProps, type AuthTextProps, type AuthTexts, CauthyProvider, type CauthyProviderProps, type ConnectedAgent, ForgotPassword, GoogleOneTap, type GoogleOneTapProps, type Invitation, type JsonValue, type LinkedIdentity, OrganizationMembers, type OrganizationMembersAction, type OrganizationMembersEvent, type OrganizationMembersProps, type OrganizationPerson, type OrganizationRoleChoice, type OrganizationSeat, type OrganizationsClient, type Passkey, type PasskeyKind, type PendingLegal, PendingTerms, type PendingTermsProps, type PermissionOf, type Policy, type PublicSession, ResetPassword, type RoleOf, type SSOConnection, type SecondStep, type SessionContext, type SessionOrganization, type SessionUser, SignIn, SignUp, VerifyEmail, can, canAutofillPasskeys, canUsePasskeys, createAuthClient, definePolicy, useAuth, useSession };