mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
## Summary Refactors the dashboard data-grid into a smaller, URL-state-aware primitive and lands several new dashboard surfaces around it: per-user session replays, team-level analytics and payments, and pagination for permission definitions. Also moves session replays out from under `/analytics` to a top-level surface and adds a `project_user.last_active_at` index that the new weekly-active metrics depend on. **Base:** `dev` → **Head:** `refactor/data-grid-and-dashboard-surfaces` **Scope:** 91 files, +5,644 / −1,858. Assets in [this gist](https://gist.github.com/mantrakp04/01bf8db4c71ec7a119b73d6ee60717a7). ## Screenshots Captured from a local dev server (dashboard at `:8101`, dummy project seeded with 26 users). Standard viewport **1920×1200**, widescreen **2560×1440**. ### Users list — data-grid overhaul in context | Light | Dark | | --- | --- | |  |  | Widescreen: | Light | Dark | | --- | --- | |  |  | ### User detail — new session-replays card + weekly metrics | Light | Dark | | --- | --- | |  |  | Widescreen: | Light | Dark | | --- | --- | |  |  | ### Session replays — moved out of `/analytics` | Light | Dark | | --- | --- | |  |  | Widescreen: | Light | Dark | | --- | --- | |  |  | ### Project permissions — new pagination | Light | Dark | | --- | --- | |  |  | Widescreen: | Light | Dark | | --- | --- | |  |  | ### Other migrated surfaces | Page | Light | Dark | | --- | --- | --- | | Project picker |  |  | | Overview / setup |  |  | | Teams list |  |  | | Team permissions |  |  | | API keys |  |  | ### Scroll behaviour — new data-grid on the users list | Light | Dark | | --- | --- | |  |  | ## What's new - **`packages/dashboard-ui-components/src/components/data-grid`** — rewritten. Trimmed `data-grid.tsx` from ~1.7k LOC, split sizing logic into `data-grid-sizing.ts`, added `use-url-state.ts` for URL-synced state, and added `data-grid.test.tsx`. - **Session replays** moved from `…/analytics/replays` to `…/session-replays` (top-level surface). New `user-session-replays.tsx` card on the user detail page; new internal `route.tsx` to feed it. - **Teams** detail page gains `team-analytics.tsx` and `team-payments.tsx`. - **Permissions** — new shared `permission-definitions-pagination.ts` consumed by both project and team permission CRUD routes. - **Backend** — Prisma migration `add_project_user_last_active_at_idx` + a `lastActiveAt` index that backs the new weekly-active metrics. - **Polish** — `editable-input`, `inline-save-discard`, `settings.tsx`, walkthrough steps, and several data-table components touched in line with the data-grid rewrite. ## Notes for reviewers - The data-grid rewrite changes the *shape* of state (now URL-synced), not just internals. Consumers in `apps/dashboard/src/components/data-table/*` were updated to match — please scan those for any missed knobs. - The `analytics/replays` → `session-replays` rename is git-tracked as renames; diffs should be small in those files. - New SDK surface in `packages/template/src/lib/stack-app/session-replays/index.ts` and additions in `admin-app-impl.ts` / `server-app-impl.ts` mean OpenAPI specs (`docs-mintlify/openapi/{admin,client}.json`) regenerate; the diff is mostly mechanical. ## Test plan - [ ] `pnpm typecheck` clean - [ ] `pnpm lint` clean - [ ] Data-grid unit tests pass (`packages/dashboard-ui-components`) - [ ] Manual: users list — column resize, sort, filter, paginate; URL state reflects each change and survives reload - [ ] Manual: user detail — session-replays card lists replays; weekly-metrics card renders without `lastActiveAt` index migration applied (i.e. on a fresh DB) and after applying it - [ ] Manual: project + team permissions — pagination cursor advances and stays consistent under search - [ ] Manual: session-replays top-level page loads; old `/analytics/replays/...` URL path is no longer expected to be linked anywhere <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Session Replays app (embedded mode, search, sorting, share links) * Tabbed Team pages with Team Analytics and Team Payments dashboards * Server-backed cursor pagination, debounced search, and infinite-scroll for teams/users/permissions * **UX** * Permission and member tables refresh after edits; permission creation triggers table refresh * Users list supports sorting by last-active * **Performance** * Index added to speed ProjectUser last-active queries * **Documentation** * API/SDK docs updated for pagination and new query params * Contributor guidance: explicit git-safety rules added (no destructive git ops without consent) * **Tests** * Added e2e tests for pagination and filtering on list endpoints <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1110 lines
45 KiB
JSON
1110 lines
45 KiB
JSON
{
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "Stack Webhooks API",
|
|
"version": "1.0.0"
|
|
},
|
|
"webhooks": {
|
|
"user.created": {
|
|
"post": {
|
|
"summary": "user.created",
|
|
"description": "This event is triggered when a user is created.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "user.created",
|
|
"description": "user.created"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
|
|
"description": "The unique identifier of the user"
|
|
},
|
|
"primary_email": {
|
|
"type": "string",
|
|
"example": "johndoe@example.com",
|
|
"description": "Primary email"
|
|
},
|
|
"primary_email_verified": {
|
|
"type": "boolean",
|
|
"example": true,
|
|
"description": "Whether the primary email has been verified to belong to this user"
|
|
},
|
|
"primary_email_auth_enabled": {
|
|
"type": "boolean",
|
|
"example": true,
|
|
"description": "Whether the primary email is used for authentication. If this is set to `false`, the user will not be able to sign in with the primary email with password or OTP"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"example": "John Doe",
|
|
"description": "Human-readable user display name. This is not a unique identifier."
|
|
},
|
|
"selected_team": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the team was created (the number of milliseconds since epoch, January 1, 1970, UTC)"
|
|
},
|
|
"server_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the team here."
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
|
|
"description": "The unique identifier of the team"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"example": "My Team",
|
|
"description": "Human-readable team display name. This is not a unique identifier."
|
|
},
|
|
"profile_image_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/image.jpg",
|
|
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
|
|
},
|
|
"client_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
|
|
},
|
|
"client_read_only_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
|
|
}
|
|
},
|
|
"required": [
|
|
"created_at_millis",
|
|
"id",
|
|
"display_name"
|
|
]
|
|
},
|
|
"selected_team_id": {
|
|
"type": "string",
|
|
"example": "team-id",
|
|
"description": "ID of the team currently selected by the user"
|
|
},
|
|
"profile_image_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/image.jpg",
|
|
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
|
|
},
|
|
"signed_up_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the user signed up (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
|
|
},
|
|
"client_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
|
|
},
|
|
"client_read_only_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
|
|
},
|
|
"server_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the user here."
|
|
},
|
|
"last_active_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the user was last active (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
|
|
},
|
|
"is_anonymous": {
|
|
"type": "boolean"
|
|
},
|
|
"is_restricted": {
|
|
"type": "boolean",
|
|
"example": false,
|
|
"description": "Whether the user is in restricted state (has signed up but not completed onboarding requirements)"
|
|
},
|
|
"restricted_reason": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"anonymous",
|
|
"email_not_verified",
|
|
"restricted_by_administrator"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"example": null,
|
|
"description": "The reason why the user is restricted (e.g., type: \"email_not_verified\", \"anonymous\", or \"restricted_by_administrator\"), null if not restricted"
|
|
},
|
|
"restricted_by_admin": {
|
|
"type": "boolean",
|
|
"example": false,
|
|
"description": "Whether the user is restricted by an administrator. Can be set manually or by sign-up rules."
|
|
},
|
|
"restricted_by_admin_reason": {
|
|
"type": "string",
|
|
"example": null,
|
|
"description": "Public reason shown to the user explaining why they are restricted. Optional."
|
|
},
|
|
"restricted_by_admin_private_details": {
|
|
"type": "string",
|
|
"example": null,
|
|
"description": "Private details about the restriction (e.g., which sign-up rule triggered). Only visible to server access and above."
|
|
},
|
|
"country_code": {
|
|
"type": "string",
|
|
"example": "US",
|
|
"description": "Best-effort ISO country code captured at sign-up time from request geo headers."
|
|
},
|
|
"risk_scores": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sign_up": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bot": {
|
|
"type": "integer"
|
|
},
|
|
"free_trial_abuse": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"bot",
|
|
"free_trial_abuse"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"sign_up"
|
|
],
|
|
"example": {
|
|
"sign_up": {
|
|
"bot": 0,
|
|
"free_trial_abuse": 0
|
|
}
|
|
},
|
|
"description": "User risk scores used for sign-up risk evaluation."
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"primary_email_verified",
|
|
"primary_email_auth_enabled",
|
|
"signed_up_at_millis",
|
|
"last_active_at_millis",
|
|
"is_anonymous",
|
|
"is_restricted",
|
|
"restricted_by_admin",
|
|
"risk_scores"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "user.created"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/user.created",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "user.created"
|
|
}
|
|
},
|
|
"user.updated": {
|
|
"post": {
|
|
"summary": "user.updated",
|
|
"description": "This event is triggered when a user is updated.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "user.updated",
|
|
"description": "user.updated"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
|
|
"description": "The unique identifier of the user"
|
|
},
|
|
"primary_email": {
|
|
"type": "string",
|
|
"example": "johndoe@example.com",
|
|
"description": "Primary email"
|
|
},
|
|
"primary_email_verified": {
|
|
"type": "boolean",
|
|
"example": true,
|
|
"description": "Whether the primary email has been verified to belong to this user"
|
|
},
|
|
"primary_email_auth_enabled": {
|
|
"type": "boolean",
|
|
"example": true,
|
|
"description": "Whether the primary email is used for authentication. If this is set to `false`, the user will not be able to sign in with the primary email with password or OTP"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"example": "John Doe",
|
|
"description": "Human-readable user display name. This is not a unique identifier."
|
|
},
|
|
"selected_team": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the team was created (the number of milliseconds since epoch, January 1, 1970, UTC)"
|
|
},
|
|
"server_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the team here."
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
|
|
"description": "The unique identifier of the team"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"example": "My Team",
|
|
"description": "Human-readable team display name. This is not a unique identifier."
|
|
},
|
|
"profile_image_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/image.jpg",
|
|
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
|
|
},
|
|
"client_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
|
|
},
|
|
"client_read_only_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
|
|
}
|
|
},
|
|
"required": [
|
|
"created_at_millis",
|
|
"id",
|
|
"display_name"
|
|
]
|
|
},
|
|
"selected_team_id": {
|
|
"type": "string",
|
|
"example": "team-id",
|
|
"description": "ID of the team currently selected by the user"
|
|
},
|
|
"profile_image_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/image.jpg",
|
|
"description": "URL of the profile image for user. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
|
|
},
|
|
"signed_up_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the user signed up (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
|
|
},
|
|
"client_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
|
|
},
|
|
"client_read_only_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
|
|
},
|
|
"server_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the user here."
|
|
},
|
|
"last_active_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the user was last active (identify) => `(the number of milliseconds since epoch, January 1, 1970, UTC)`"
|
|
},
|
|
"is_anonymous": {
|
|
"type": "boolean"
|
|
},
|
|
"is_restricted": {
|
|
"type": "boolean",
|
|
"example": false,
|
|
"description": "Whether the user is in restricted state (has signed up but not completed onboarding requirements)"
|
|
},
|
|
"restricted_reason": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"anonymous",
|
|
"email_not_verified",
|
|
"restricted_by_administrator"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"example": null,
|
|
"description": "The reason why the user is restricted (e.g., type: \"email_not_verified\", \"anonymous\", or \"restricted_by_administrator\"), null if not restricted"
|
|
},
|
|
"restricted_by_admin": {
|
|
"type": "boolean",
|
|
"example": false,
|
|
"description": "Whether the user is restricted by an administrator. Can be set manually or by sign-up rules."
|
|
},
|
|
"restricted_by_admin_reason": {
|
|
"type": "string",
|
|
"example": null,
|
|
"description": "Public reason shown to the user explaining why they are restricted. Optional."
|
|
},
|
|
"restricted_by_admin_private_details": {
|
|
"type": "string",
|
|
"example": null,
|
|
"description": "Private details about the restriction (e.g., which sign-up rule triggered). Only visible to server access and above."
|
|
},
|
|
"country_code": {
|
|
"type": "string",
|
|
"example": "US",
|
|
"description": "Best-effort ISO country code captured at sign-up time from request geo headers."
|
|
},
|
|
"risk_scores": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sign_up": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bot": {
|
|
"type": "integer"
|
|
},
|
|
"free_trial_abuse": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"bot",
|
|
"free_trial_abuse"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"sign_up"
|
|
],
|
|
"example": {
|
|
"sign_up": {
|
|
"bot": 0,
|
|
"free_trial_abuse": 0
|
|
}
|
|
},
|
|
"description": "User risk scores used for sign-up risk evaluation."
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"primary_email_verified",
|
|
"primary_email_auth_enabled",
|
|
"signed_up_at_millis",
|
|
"last_active_at_millis",
|
|
"is_anonymous",
|
|
"is_restricted",
|
|
"restricted_by_admin",
|
|
"risk_scores"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "user.updated"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/user.updated",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "user.updated"
|
|
}
|
|
},
|
|
"user.deleted": {
|
|
"post": {
|
|
"summary": "user.deleted",
|
|
"description": "This event is triggered when a user is deleted.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "user.deleted",
|
|
"description": "user.deleted"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
|
|
"description": "The unique identifier of the user"
|
|
},
|
|
"teams": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"id"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"teams"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "user.deleted"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/user.deleted",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "user.deleted"
|
|
}
|
|
},
|
|
"team.created": {
|
|
"post": {
|
|
"summary": "team.created",
|
|
"description": "This event is triggered when a team is created.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "team.created",
|
|
"description": "team.created"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the team was created (the number of milliseconds since epoch, January 1, 1970, UTC)"
|
|
},
|
|
"server_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the team here."
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
|
|
"description": "The unique identifier of the team"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"example": "My Team",
|
|
"description": "Human-readable team display name. This is not a unique identifier."
|
|
},
|
|
"profile_image_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/image.jpg",
|
|
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
|
|
},
|
|
"client_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
|
|
},
|
|
"client_read_only_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
|
|
}
|
|
},
|
|
"required": [
|
|
"created_at_millis",
|
|
"id",
|
|
"display_name"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "team.created"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Teams"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/team.created",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "team.created"
|
|
}
|
|
},
|
|
"team.updated": {
|
|
"post": {
|
|
"summary": "team.updated",
|
|
"description": "This event is triggered when a team is updated.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "team.updated",
|
|
"description": "team.updated"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at_millis": {
|
|
"type": "number",
|
|
"example": 1630000000000,
|
|
"description": "The time the team was created (the number of milliseconds since epoch, January 1, 1970, UTC)"
|
|
},
|
|
"server_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Server metadata. Used as a data store, only accessible from the server side. You can store secret information related to the team here."
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
|
|
"description": "The unique identifier of the team"
|
|
},
|
|
"display_name": {
|
|
"type": "string",
|
|
"example": "My Team",
|
|
"description": "Human-readable team display name. This is not a unique identifier."
|
|
},
|
|
"profile_image_url": {
|
|
"type": "string",
|
|
"example": "https://example.com/image.jpg",
|
|
"description": "URL of the profile image for team. Can be a Base64 encoded image. Must be smaller than 100KB. Please compress and crop to a square before passing in."
|
|
},
|
|
"client_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client."
|
|
},
|
|
"client_read_only_metadata": {
|
|
"type": "object",
|
|
"example": {
|
|
"key": "value"
|
|
},
|
|
"description": "Client read-only, server-writable metadata. Used as a data store, accessible from the client side. Do not store information that should not be exposed to the client. The client can read this data, but cannot modify it. This is useful for things like subscription status."
|
|
}
|
|
},
|
|
"required": [
|
|
"created_at_millis",
|
|
"id",
|
|
"display_name"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "team.updated"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Teams"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/team.updated",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "team.updated"
|
|
}
|
|
},
|
|
"team.deleted": {
|
|
"post": {
|
|
"summary": "team.deleted",
|
|
"description": "This event is triggered when a team is deleted.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "team.deleted",
|
|
"description": "team.deleted"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
|
|
"description": "The unique identifier of the user"
|
|
}
|
|
},
|
|
"required": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "team.deleted"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Teams"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/team.deleted",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "team.deleted"
|
|
}
|
|
},
|
|
"team_membership.created": {
|
|
"post": {
|
|
"summary": "team_membership.created",
|
|
"description": "This event is triggered when a user is added to a team.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "team_membership.created",
|
|
"description": "team_membership.created"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"team_id": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"team_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "team_membership.created"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Teams"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/team_membership.created",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "team_membership.created"
|
|
}
|
|
},
|
|
"team_membership.deleted": {
|
|
"post": {
|
|
"summary": "team_membership.deleted",
|
|
"description": "This event is triggered when a user is removed from a team.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "team_membership.deleted",
|
|
"description": "team_membership.deleted"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"team_id": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"team_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "team_membership.deleted"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Teams"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/team_membership.deleted",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "team_membership.deleted"
|
|
}
|
|
},
|
|
"team_permission.created": {
|
|
"post": {
|
|
"summary": "team_permission.created",
|
|
"description": "This event is triggered when a team permission is created.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "team_permission.created",
|
|
"description": "team_permission.created"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "read_secret_info",
|
|
"description": "The permission ID used to uniquely identify a permission. Can either be a custom permission with lowercase letters, numbers, `:`, and `_` characters, or one of the system permissions: `$update_team`, `$delete_team`, `$read_members`, `$remove_members`, `$invite_members`, `$manage_api_keys`"
|
|
},
|
|
"user_id": {
|
|
"type": "string",
|
|
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
|
|
"description": "The unique identifier of the user"
|
|
},
|
|
"team_id": {
|
|
"type": "string",
|
|
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
|
|
"description": "The unique identifier of the team"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"user_id",
|
|
"team_id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "team_permission.created"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Teams"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/team_permission.created",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "team_permission.created"
|
|
}
|
|
},
|
|
"team_permission.deleted": {
|
|
"post": {
|
|
"summary": "team_permission.deleted",
|
|
"description": "This event is triggered when a team permission is deleted.",
|
|
"parameters": [],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"example": "team_permission.deleted",
|
|
"description": "team_permission.deleted"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"example": "read_secret_info",
|
|
"description": "The permission ID used to uniquely identify a permission. Can either be a custom permission with lowercase letters, numbers, `:`, and `_` characters, or one of the system permissions: `$update_team`, `$delete_team`, `$read_members`, `$remove_members`, `$invite_members`, `$manage_api_keys`"
|
|
},
|
|
"user_id": {
|
|
"type": "string",
|
|
"example": "3241a285-8329-4d69-8f3d-316e08cf140c",
|
|
"description": "The unique identifier of the user"
|
|
},
|
|
"team_id": {
|
|
"type": "string",
|
|
"example": "ad962777-8244-496a-b6a2-e0c6a449c79e",
|
|
"description": "The unique identifier of the team"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"user_id",
|
|
"team_id"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"data"
|
|
],
|
|
"example": {
|
|
"type": "team_permission.deleted"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Teams"
|
|
],
|
|
"x-full-url": "https://api.stack-auth.com/api/v1/webhooks/team_permission.deleted",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"operationId": "team_permission.deleted"
|
|
}
|
|
}
|
|
}
|
|
} |