<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Add webhooks for team permission creation and deletion, updating CRUD
operations and tests to support this functionality.
>
> - **Webhooks**:
> - Add `sendTeamPermissionCreatedWebhook` and
`sendTeamPermissionDeletedWebhook` in `webhooks.tsx`.
> - Trigger `sendTeamPermissionCreatedWebhook` on permission creation in
`team-memberships/crud.tsx` and `team-permissions/crud.tsx`.
> - Trigger `sendTeamPermissionDeletedWebhook` on permission deletion in
`team-permissions/crud.tsx`.
> - **CRUD Operations**:
> - Modify `addUserToTeam` in `team-memberships/crud.tsx` to return
permission IDs.
> - Update `onCreate` and `onDelete` handlers in
`team-permissions/crud.tsx` to handle webhooks.
> - **Tests**:
> - Add tests in `team-memberships.test.ts` and
`team-permissions.test.ts` to verify webhook triggers for permission
creation and deletion.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 5067753761. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
---------
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Add some buttons to user details page
<img width="1443" alt="image"
src="https://github.com/user-attachments/assets/1c8fa865-29bc-43e7-ab77-f8ef55f934a4"
/>
<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Add impersonate and delete functionalities to user details page with
new dialogs and error handling.
>
> - **User Interface**:
> - Added `Impersonate` and `Delete` buttons to user details page in
`page-client.tsx`.
> - Introduced `DropdownMenu` for user actions in `page-client.tsx`.
> - **Dialogs**:
> - Moved `DeleteUserDialog` and `ImpersonateUserDialog` to
`user-dialogs.tsx`.
> - Updated `DeleteUserDialog` to redirect after deletion.
> - **Server Interface**:
> - Updated `getServerUserById()` in `serverInterface.ts` to handle
`UserNotFound` error.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 0576c20f76. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
---------
Co-authored-by: Zai Shi <zaishi00@outlook.com>

<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Add SentEmails dashboard table with backend API and frontend
components to display email logs.
>
> - **Backend**:
> - Add `crud.tsx` to define CRUD operations for `SentEmail` using
`prismaClient`.
> - Add `route.tsx` to expose `GET` endpoint for listing sent emails.
> - **Frontend**:
> - Update `page-client.tsx` to include `EmailSendDataTable` component
displaying email logs.
> - Define `emailTableColumns` for `DataTable` in `page-client.tsx`.
> - **Shared Interfaces**:
> - Add `InternalEmailsCrud` and `sentEmailReadSchema` in `emails.ts`.
> - Extend `StackAdminApp` to include `listSentEmails()` method.
> - Define `AdminSentEmail` type in `email/index.ts` and export it in
`index.ts`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for fe32ecbc33. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
---------
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: ryan@stack-auth.com <ryan@stack-auth.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
<img width="1443" alt="image"
src="https://github.com/user-attachments/assets/611ede72-4d46-41dc-adea-9546c04b199a"
/>
Adds new active sessions page to settings
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Adds an active sessions page to settings, enabling users to view and
manage their sessions, with backend support for session listing and
deletion.
>
> - **Active Sessions Page**:
> - Adds `ActiveSessionsPage` component in `account-settings.tsx` to
display active sessions.
> - Allows revoking individual sessions or all sessions except the
current one.
> - **Backend Changes**:
> - Adds `sessionsCrudHandlers` in `crud.tsx` for session management
(list, delete).
> - Updates `ProjectUserRefreshToken` model in `schema.prisma` to
include `id` and `isImpersonation` fields.
> - Implements session listing and deletion in `serverInterface.ts` and
`client-app-impl.ts`.
> - **Error Handling**:
> - Introduces `CannotDeleteCurrentSession` error in `known-errors.tsx`.
> - **Testing**:
> - Adds tests for session management in
`endpoints/api/v1/auth/sessions` tests.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for ba78df0928. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
---------
Co-authored-by: TheCactusBlue <thecactusblue@gmail.com>
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Add in-source unit tests to stack-shared utilities
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix type checking and linting issues
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix lint errors in results.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix remaining lint errors in results.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix lint warnings in results.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix wait function mocking in results.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix retry function test in results.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix React.forwardRef mock in react.tsx test
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix trailing spaces in react.tsx and results.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Revert to DependenciesMap and wrap rejected promise in ignoreUnhandledRejection
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix
* Revert changes to known-errors.tsx constructor
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Make rotateRight call rotateLeft per review feedback
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Remove redundant @ts-expect-error directive in known-errors.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix import order in promises.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Fix
* Fix CI failures: add back @ts-expect-error in known-errors.tsx and revert mapResult implementation in results.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Remove unused @ts-expect-error directive in known-errors.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Add back @ts-expect-error directive with explanation in known-errors.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* Change @ts-expect-error to @ts-ignore in known-errors.tsx
Co-Authored-By: Konstantin Wohlwend <n2d4xc@gmail.com>
* be honest
* vocabulary
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Konstantin Wohlwend <n2d4xc@gmail.com>
* add some description about contact channels
* add some examples of password reset
* update the doc
* rename things
* split examples
* remove custom for now
* fix error message
---------
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: Zai Shi <zaishi00@outlook.com>
* use urlString helper
* Update packages/stack-shared/src/utils/urls.tsx
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
* add import back again
* revert isLocalHost back to its original impl
---------
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>