stack/packages/stack-shared/src
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
..
helpers Cap password length at 70 characters 2025-02-15 12:18:20 -08:00
hooks [DEVIN: Konsti] Add in-source unit tests to stack-shared utilities (#485) 2025-02-28 01:47:37 +00:00
interface add permission webhooks (#533) 2025-03-13 02:43:48 +01:00
utils Active Sessions Page (#528) 2025-03-12 22:35:32 +01:00
crud.tsx [DEVIN: Konsti] Add in-source unit tests to stack-shared utilities (#485) 2025-02-28 01:47:37 +00:00
global.d.ts Replace required() of yup schemas with defined() 2024-11-18 20:08:55 +01:00
index.ts New client (#135) 2024-07-19 22:07:44 -07:00
known-errors.tsx Active Sessions Page (#528) 2025-03-12 22:35:32 +01:00
schema-fields.ts Option for merging/blocking account creations with same email but different oauth provider (#502) 2025-03-10 21:25:12 +00:00
sessions.ts Bugfixes 2025-01-27 14:57:58 -08:00