stack/packages/stack-shared
Zai Shi 0f7727b6ba
add permission webhooks (#533)
<!--

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>
2025-03-13 02:43:48 +01:00
..
src add permission webhooks (#533) 2025-03-13 02:43:48 +01:00
.eslintrc.cjs Move code (initial commit) 2024-02-28 14:35:30 +01:00
CHANGELOG.md chore: update package versions 2025-03-12 10:28:45 -07:00
LICENSE Licenses 2024-02-28 15:27:00 +01:00
package.json chore: update package versions 2025-03-12 10:28:45 -07:00
tsconfig.json In-source unit tests (#429) 2025-02-14 11:47:52 -08:00
vitest.config.ts In-source unit tests (#429) 2025-02-14 11:47:52 -08:00