mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 02:15:05 +03:00
## I have read the CONTRIBUTING.md file. YES ## What kind of change does this PR introduce? This is an experimental spike that splits the Management API reference into one statically-generated page per endpoint, instead of the single monolithic page that currently renders all ~172 operations at `/reference/api`. Relates to DOCS-1268. ## What is the current behavior? - Linear item: Spike: chunk Management API reference into one page per endpoint - `/reference/api/introduction` (and every other API deep link) renders one ~35MB page containing all 172 endpoints, per `known-issues.md`'s "Reference page length" note — a known UX/LLM issue with no per-endpoint pages today - All API reference "navigation" is actually `preventDefault` + `pushState` + `scrollIntoView` within that one page (see `Reference.navigation.client.tsx`) ## What is the new behavior? - New `generateStaticParamsForApi()` in `Reference.utils.ts` emits one static param per API operation slug (~172 pages), independent of the SDK static-params generator - Fixed the permanent `/docs/reference/api` -> `/docs/reference/api/start` redirect in `apps/www/lib/redirects.js` (`start` was never a real content slug — it only worked because the old routing collapsed every sub-path to the monolith); now points straight at `introduction`, and `/start` itself still redirects there so old links/bookmarks don't 404 - `middleware.ts` only normalizes the bare `/reference/api` request now; `/reference/api/<slug>` falls through to the real per-operation page (or 404s if the slug is unknown) - `Reference.apiPage.tsx` branches on the resolved slug: no slug now redirects to `/reference/api/introduction` (the monolith-rendering branch is removed entirely — `ClientLibIntroduction`/`RefSections` are no longer used in this file), a slug renders just that one section via the existing `SectionSwitch`/`ApiEndpointSection`/`MarkdownSection` — no duplicated rendering logic - `Reference.navigation.tsx` / `Reference.navigation.client.tsx` gained an opt-in `realNavigation` prop; only the API reference's two `<ReferenceNavigation>` call sites set it, so SDK/CLI/self-hosting sidebar behavior is byte-for-byte unchanged - Per-operation page metadata (title/description/canonical URL) ### Explicitly out of scope for this spike - `internals/generate-reference-markdown.ts` (the LLM `api.md` export) — still a single file, not split per endpoint - Any change to SDK, CLI, or self-hosting reference rendering or navigation - A hypothetical 2+-segment API path (`/reference/api/foo/bar`) previously collapsed silently to the monolith; it now 404s. Not reachable by any existing internal link today. ## Additional context - Worktree: `~/GitHub/supabase/supabase-worktrees/nrichers/nikrichers/docs-1268-spike-chunk-management-api-reference-into-one-page-per` - Verification: | Check | Result | | --- | --- | | `pnpm typecheck` (apps/docs) | ✅ pass | | `GET /reference/api` (bare) | ✅ 307, redirects to `/reference/api/introduction` (monolith removed) | | `GET /reference/api/introduction` | ✅ 200, new chunked page | | `GET /reference/api/v1-get-performance-advisors` | ✅ 200, new chunked page — confirmed via content size (~1.5MB vs ~35.5MB monolith) and heading-count diffing that only one operation renders | | `GET /reference/api/not-a-real-slug` | ✅ 404, confirms new static params + `dynamicParams=false` work as designed | | `GET /reference/cli`, `GET /reference/self-hosting-storage` | ✅ 200, unaffected — same shared nav components, no `realNavigation` passed | | `GET /reference/javascript`, `GET /reference/python` | ⚠️ 404 locally — not a regression; these need `codegen:references:new` output + `dev:secrets:pull` (internal env vars) that weren't run in this sandbox, unrelated to any file this PR touches | ### Before & After **Example (left: prod; right: PR)** <img width="2664" height="1667" alt="image" src="https://github.com/user-attachments/assets/c00e59ab-208b-44fb-be52-80270404fcc5" /> Preview is deployed: https://vercel.com/supabase/docs/43RzVCY6MkAbUuaDxdf9dPz7qsBu | Before (production) | After (PR preview) | | --- | --- | | - [Bare `/reference/api` (redirects to Introduction)](https://supabase.com/docs/reference/api)<br>- [Introduction](https://supabase.com/docs/reference/api/introduction)<br>- [Get performance advisors](https://supabase.com/docs/reference/api/v1-get-performance-advisors)<br>- [Get security advisors](https://supabase.com/docs/reference/api/v1-get-security-advisors)<br>- [Create log drain](https://supabase.com/docs/reference/api/v2-create-log-drain)<br>- [Delete log drain](https://supabase.com/docs/reference/api/v2-delete-log-drain)<br>- [Get project function combined stats](https://supabase.com/docs/reference/api/v1-get-project-function-combined-stats)<br>- [Get project logs](https://supabase.com/docs/reference/api/v1-get-project-logs)<br>- [Get project logs all](https://supabase.com/docs/reference/api/v1-get-project-logs-all)<br>- [Get project usage api count](https://supabase.com/docs/reference/api/v1-get-project-usage-api-count)<br>- [Get project usage request count](https://supabase.com/docs/reference/api/v1-get-project-usage-request-count)<br>- [List log drains](https://supabase.com/docs/reference/api/v2-list-log-drains)<br>- [Update log drain](https://supabase.com/docs/reference/api/v2-update-log-drain)<br>- [Create a sso provider](https://supabase.com/docs/reference/api/v1-create-a-sso-provider)<br>- [Create legacy signing key](https://supabase.com/docs/reference/api/v1-create-legacy-signing-key)<br>- [Create project signing key](https://supabase.com/docs/reference/api/v1-create-project-signing-key)<br>- [Create project tpa integration](https://supabase.com/docs/reference/api/v1-create-project-tpa-integration)<br>- [Delete a sso provider](https://supabase.com/docs/reference/api/v1-delete-a-sso-provider)<br>- [Delete project tpa integration](https://supabase.com/docs/reference/api/v1-delete-project-tpa-integration)<br>- [Get a sso provider](https://supabase.com/docs/reference/api/v1-get-a-sso-provider)<br>- [Get auth service config](https://supabase.com/docs/reference/api/v1-get-auth-service-config)<br>- [Get legacy signing key](https://supabase.com/docs/reference/api/v1-get-legacy-signing-key)<br>- [Get project signing key](https://supabase.com/docs/reference/api/v1-get-project-signing-key)<br>- [Get project signing keys](https://supabase.com/docs/reference/api/v1-get-project-signing-keys)<br>- [Get project tpa integration](https://supabase.com/docs/reference/api/v1-get-project-tpa-integration)<br>- [List all sso provider](https://supabase.com/docs/reference/api/v1-list-all-sso-provider)<br>- [List project tpa integrations](https://supabase.com/docs/reference/api/v1-list-project-tpa-integrations)<br>- [Remove project signing key](https://supabase.com/docs/reference/api/v1-remove-project-signing-key)<br>- [Update a sso provider](https://supabase.com/docs/reference/api/v1-update-a-sso-provider)<br>- [Update auth service config](https://supabase.com/docs/reference/api/v1-update-auth-service-config)<br>- [Update project signing key](https://supabase.com/docs/reference/api/v1-update-project-signing-key)<br>- [Apply project addon](https://supabase.com/docs/reference/api/v1-apply-project-addon)<br>- [List project addons](https://supabase.com/docs/reference/api/v1-list-project-addons)<br>- [Remove project addon](https://supabase.com/docs/reference/api/v1-remove-project-addon)<br>- [Accept invite external jit access](https://supabase.com/docs/reference/api/v1-accept-invite-external-jit-access)<br>- [Apply a migration](https://supabase.com/docs/reference/api/v1-apply-a-migration)<br>- [Authorize jit access](https://supabase.com/docs/reference/api/v1-authorize-jit-access)<br>- [Create login role](https://supabase.com/docs/reference/api/v1-create-login-role)<br>- [Delete invite external jit access](https://supabase.com/docs/reference/api/v1-delete-invite-external-jit-access)<br>- [Delete jit access](https://supabase.com/docs/reference/api/v1-delete-jit-access)<br>- [Delete login roles](https://supabase.com/docs/reference/api/v1-delete-login-roles)<br>- [Disable readonly mode temporarily](https://supabase.com/docs/reference/api/v1-disable-readonly-mode-temporarily)<br>- [Enable database webhook](https://supabase.com/docs/reference/api/v1-enable-database-webhook)<br>- [Generate typescript types](https://supabase.com/docs/reference/api/v1-generate-typescript-types)<br>- [Get a migration](https://supabase.com/docs/reference/api/v1-get-a-migration)<br>- [Get a snippet](https://supabase.com/docs/reference/api/v1-get-a-snippet)<br>- [Get backup schedule](https://supabase.com/docs/reference/api/v1-get-backup-schedule)<br>- [Get database metadata](https://supabase.com/docs/reference/api/v1-get-database-metadata)<br>- [Get database openapi](https://supabase.com/docs/reference/api/v1-get-database-openapi)<br>- [Get jit access](https://supabase.com/docs/reference/api/v1-get-jit-access)<br>- [Get jit access config](https://supabase.com/docs/reference/api/v1-get-jit-access-config)<br>- [Get pooler config](https://supabase.com/docs/reference/api/v1-get-pooler-config)<br>- [Get postgres config](https://supabase.com/docs/reference/api/v1-get-postgres-config)<br>- [Get project pgbouncer config](https://supabase.com/docs/reference/api/v1-get-project-pgbouncer-config)<br>- [Get readonly mode status](https://supabase.com/docs/reference/api/v1-get-readonly-mode-status)<br>- [Get ssl enforcement config](https://supabase.com/docs/reference/api/v1-get-ssl-enforcement-config)<br>- [Invite external jit access](https://supabase.com/docs/reference/api/v1-invite-external-jit-access)<br>- [List all backups](https://supabase.com/docs/reference/api/v1-list-all-backups)<br>- [List all snippets](https://supabase.com/docs/reference/api/v1-list-all-snippets)<br>- [List jit access](https://supabase.com/docs/reference/api/v1-list-jit-access)<br>- [List migration history](https://supabase.com/docs/reference/api/v1-list-migration-history)<br>- [Patch a migration](https://supabase.com/docs/reference/api/v1-patch-a-migration)<br>- [Read only query](https://supabase.com/docs/reference/api/v1-read-only-query)<br>- [Remove a read replica](https://supabase.com/docs/reference/api/v1-remove-a-read-replica)<br>- [Restore pitr backup](https://supabase.com/docs/reference/api/v1-restore-pitr-backup)<br>- [Rollback migrations](https://supabase.com/docs/reference/api/v1-rollback-migrations)<br>- [Run a query](https://supabase.com/docs/reference/api/v1-run-a-query)<br>- [Setup a read replica](https://supabase.com/docs/reference/api/v1-setup-a-read-replica)<br>- [Update backup schedule](https://supabase.com/docs/reference/api/v1-update-backup-schedule)<br>- [Update database password](https://supabase.com/docs/reference/api/v1-update-database-password)<br>- [Update jit access](https://supabase.com/docs/reference/api/v1-update-jit-access)<br>- [Update jit access config](https://supabase.com/docs/reference/api/v1-update-jit-access-config)<br>- [Update pooler config](https://supabase.com/docs/reference/api/v1-update-pooler-config)<br>- [Update postgres config](https://supabase.com/docs/reference/api/v1-update-postgres-config)<br>- [Update ssl enforcement config](https://supabase.com/docs/reference/api/v1-update-ssl-enforcement-config)<br>- [Upsert a migration](https://supabase.com/docs/reference/api/v1-upsert-a-migration)<br>- [Activate custom hostname](https://supabase.com/docs/reference/api/v1-activate-custom-hostname)<br>- [Activate vanity subdomain config](https://supabase.com/docs/reference/api/v1-activate-vanity-subdomain-config)<br>- [Check vanity subdomain availability](https://supabase.com/docs/reference/api/v1-check-vanity-subdomain-availability)<br>- [Deactivate vanity subdomain config](https://supabase.com/docs/reference/api/v1-deactivate-vanity-subdomain-config)<br>- [Get hostname config](https://supabase.com/docs/reference/api/v1-get-hostname-config)<br>- [Get vanity subdomain config](https://supabase.com/docs/reference/api/v1-get-vanity-subdomain-config)<br>- [Update hostname config](https://supabase.com/docs/reference/api/v1-update-hostname-config)<br>- [Verify dns config](https://supabase.com/docs/reference/api/v1-verify-dns-config)<br>- [Bulk update functions](https://supabase.com/docs/reference/api/v1-bulk-update-functions)<br>- [Create a function](https://supabase.com/docs/reference/api/v1-create-a-function)<br>- [Delete a function](https://supabase.com/docs/reference/api/v1-delete-a-function)<br>- [Deploy a function](https://supabase.com/docs/reference/api/v1-deploy-a-function)<br>- [Get a function](https://supabase.com/docs/reference/api/v1-get-a-function)<br>- [Get a function body](https://supabase.com/docs/reference/api/v1-get-a-function-body)<br>- [List all functions](https://supabase.com/docs/reference/api/v1-list-all-functions)<br>- [Update a function](https://supabase.com/docs/reference/api/v1-update-a-function)<br>- [Count action runs](https://supabase.com/docs/reference/api/v1-count-action-runs)<br>- [Create a branch](https://supabase.com/docs/reference/api/v1-create-a-branch)<br>- [Delete a branch](https://supabase.com/docs/reference/api/v1-delete-a-branch)<br>- [Diff a branch](https://supabase.com/docs/reference/api/v1-diff-a-branch)<br>- [Disable preview branching](https://supabase.com/docs/reference/api/v1-disable-preview-branching)<br>- [Get a branch](https://supabase.com/docs/reference/api/v1-get-a-branch)<br>- [Get a branch config](https://supabase.com/docs/reference/api/v1-get-a-branch-config)<br>- [Get action run](https://supabase.com/docs/reference/api/v1-get-action-run)<br>- [Get action run logs](https://supabase.com/docs/reference/api/v1-get-action-run-logs)<br>- [List action runs](https://supabase.com/docs/reference/api/v1-list-action-runs)<br>- [List all branches](https://supabase.com/docs/reference/api/v1-list-all-branches)<br>- [Merge a branch](https://supabase.com/docs/reference/api/v1-merge-a-branch)<br>- [Push a branch](https://supabase.com/docs/reference/api/v1-push-a-branch)<br>- [Reset a branch](https://supabase.com/docs/reference/api/v1-reset-a-branch)<br>- [Restore a branch](https://supabase.com/docs/reference/api/v1-restore-a-branch)<br>- [Update a branch config](https://supabase.com/docs/reference/api/v1-update-a-branch-config)<br>- [Update action run status](https://supabase.com/docs/reference/api/v1-update-action-run-status)<br>- [Authorize user](https://supabase.com/docs/reference/api/v1-authorize-user)<br>- [Exchange oauth token](https://supabase.com/docs/reference/api/v1-exchange-oauth-token)<br>- [Oauth authorize project claim](https://supabase.com/docs/reference/api/v1-oauth-authorize-project-claim)<br>- [Revoke token](https://supabase.com/docs/reference/api/v1-revoke-token)<br>- [Assign organization member role](https://supabase.com/docs/reference/api/v2-assign-organization-member-role)<br>- [Create an organization](https://supabase.com/docs/reference/api/v1-create-an-organization)<br>- [Get an organization](https://supabase.com/docs/reference/api/v1-get-an-organization)<br>- [Get organization entitlements](https://supabase.com/docs/reference/api/v1-get-organization-entitlements)<br>- [List all organizations](https://supabase.com/docs/reference/api/v1-list-all-organizations)<br>- [List organization members](https://supabase.com/docs/reference/api/v1-list-organization-members)<br>- [List organization members](https://supabase.com/docs/reference/api/v2-list-organization-members)<br>- [List organization roles](https://supabase.com/docs/reference/api/v2-list-organization-roles)<br>- [Create organization invitations](https://supabase.com/docs/reference/api/v2-create-organization-invitations)<br>- [Get profile](https://supabase.com/docs/reference/api/v1-get-profile)<br>- [Cancel a project restoration](https://supabase.com/docs/reference/api/v1-cancel-a-project-restoration)<br>- [Create a project](https://supabase.com/docs/reference/api/v1-create-a-project)<br>- [Create private link association](https://supabase.com/docs/reference/api/v2-create-private-link-association)<br>- [Delete a project](https://supabase.com/docs/reference/api/v1-delete-a-project)<br>- [Delete network bans](https://supabase.com/docs/reference/api/v1-delete-network-bans)<br>- [Delete private link association](https://supabase.com/docs/reference/api/v2-delete-private-link-association)<br>- [Get all projects for organization](https://supabase.com/docs/reference/api/v1-get-all-projects-for-organization)<br>- [Get available regions](https://supabase.com/docs/reference/api/v1-get-available-regions)<br>- [Get database disk](https://supabase.com/docs/reference/api/v1-get-database-disk)<br>- [Get disk utilization](https://supabase.com/docs/reference/api/v1-get-disk-utilization)<br>- [Get network restrictions](https://supabase.com/docs/reference/api/v1-get-network-restrictions)<br>- [Get postgres upgrade eligibility](https://supabase.com/docs/reference/api/v1-get-postgres-upgrade-eligibility)<br>- [Get postgres upgrade status](https://supabase.com/docs/reference/api/v1-get-postgres-upgrade-status)<br>- [Get project](https://supabase.com/docs/reference/api/v1-get-project)<br>- [Get project disk autoscale config](https://supabase.com/docs/reference/api/v1-get-project-disk-autoscale-config)<br>- [Get services health](https://supabase.com/docs/reference/api/v1-get-services-health)<br>- [List all network bans](https://supabase.com/docs/reference/api/v1-list-all-network-bans)<br>- [List all network bans enriched](https://supabase.com/docs/reference/api/v1-list-all-network-bans-enriched)<br>- [List all projects](https://supabase.com/docs/reference/api/v1-list-all-projects)<br>- [List available restore versions](https://supabase.com/docs/reference/api/v1-list-available-restore-versions)<br>- [List private link associations](https://supabase.com/docs/reference/api/v2-list-private-link-associations)<br>- [Modify database disk](https://supabase.com/docs/reference/api/v1-modify-database-disk)<br>- [Patch network restrictions](https://supabase.com/docs/reference/api/v1-patch-network-restrictions)<br>- [Pause a project](https://supabase.com/docs/reference/api/v1-pause-a-project)<br>- [Preview a project transfer](https://supabase.com/docs/reference/api/v2-preview-a-project-transfer)<br>- [Restart a project](https://supabase.com/docs/reference/api/v1-restart-a-project)<br>- [Restore a project](https://supabase.com/docs/reference/api/v1-restore-a-project)<br>- [Transfer a project](https://supabase.com/docs/reference/api/v2-transfer-a-project)<br>- [Update a project](https://supabase.com/docs/reference/api/v1-update-a-project)<br>- [Update network restrictions](https://supabase.com/docs/reference/api/v1-update-network-restrictions)<br>- [Upgrade postgres version](https://supabase.com/docs/reference/api/v1-upgrade-postgres-version)<br>- [Get realtime config](https://supabase.com/docs/reference/api/v1-get-realtime-config)<br>- [Shutdown realtime](https://supabase.com/docs/reference/api/v1-shutdown-realtime)<br>- [Update realtime config](https://supabase.com/docs/reference/api/v1-update-realtime-config)<br>- [Get postgrest service config](https://supabase.com/docs/reference/api/v1-get-postgrest-service-config)<br>- [Update postgrest service config](https://supabase.com/docs/reference/api/v1-update-postgrest-service-config)<br>- [Bulk create secrets](https://supabase.com/docs/reference/api/v1-bulk-create-secrets)<br>- [Bulk delete secrets](https://supabase.com/docs/reference/api/v1-bulk-delete-secrets)<br>- [Create project api key](https://supabase.com/docs/reference/api/v1-create-project-api-key)<br>- [Delete project api key](https://supabase.com/docs/reference/api/v1-delete-project-api-key)<br>- [Get pgsodium config](https://supabase.com/docs/reference/api/v1-get-pgsodium-config)<br>- [Get project api key](https://supabase.com/docs/reference/api/v1-get-project-api-key)<br>- [Get project api keys](https://supabase.com/docs/reference/api/v1-get-project-api-keys)<br>- [Get project legacy api keys](https://supabase.com/docs/reference/api/v1-get-project-legacy-api-keys)<br>- [List all secrets](https://supabase.com/docs/reference/api/v1-list-all-secrets)<br>- [Update pgsodium config](https://supabase.com/docs/reference/api/v1-update-pgsodium-config)<br>- [Update project api key](https://supabase.com/docs/reference/api/v1-update-project-api-key)<br>- [Update project legacy api keys](https://supabase.com/docs/reference/api/v1-update-project-legacy-api-keys)<br>- [Get storage config](https://supabase.com/docs/reference/api/v1-get-storage-config)<br>- [List all buckets](https://supabase.com/docs/reference/api/v1-list-all-buckets)<br>- [Update storage config](https://supabase.com/docs/reference/api/v1-update-storage-config) | - [Bare `/reference/api` (redirects to Introduction)](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api)<br>- [Introduction](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/introduction)<br>- [Get performance advisors](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-performance-advisors)<br>- [Get security advisors](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-security-advisors)<br>- [Create log drain](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-create-log-drain)<br>- [Delete log drain](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-delete-log-drain)<br>- [Get project function combined stats](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-function-combined-stats)<br>- [Get project logs](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-logs)<br>- [Get project logs all](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-logs-all)<br>- [Get project usage api count](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-usage-api-count)<br>- [Get project usage request count](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-usage-request-count)<br>- [List log drains](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-list-log-drains)<br>- [Update log drain](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-update-log-drain)<br>- [Create a sso provider](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-a-sso-provider)<br>- [Create legacy signing key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-legacy-signing-key)<br>- [Create project signing key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-project-signing-key)<br>- [Create project tpa integration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-project-tpa-integration)<br>- [Delete a sso provider](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-a-sso-provider)<br>- [Delete project tpa integration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-project-tpa-integration)<br>- [Get a sso provider](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-a-sso-provider)<br>- [Get auth service config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-auth-service-config)<br>- [Get legacy signing key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-legacy-signing-key)<br>- [Get project signing key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-signing-key)<br>- [Get project signing keys](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-signing-keys)<br>- [Get project tpa integration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-tpa-integration)<br>- [List all sso provider](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-sso-provider)<br>- [List project tpa integrations](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-project-tpa-integrations)<br>- [Remove project signing key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-remove-project-signing-key)<br>- [Update a sso provider](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-a-sso-provider)<br>- [Update auth service config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-auth-service-config)<br>- [Update project signing key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-project-signing-key)<br>- [Apply project addon](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-apply-project-addon)<br>- [List project addons](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-project-addons)<br>- [Remove project addon](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-remove-project-addon)<br>- [Accept invite external jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-accept-invite-external-jit-access)<br>- [Apply a migration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-apply-a-migration)<br>- [Authorize jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-authorize-jit-access)<br>- [Create login role](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-login-role)<br>- [Delete invite external jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-invite-external-jit-access)<br>- [Delete jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-jit-access)<br>- [Delete login roles](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-login-roles)<br>- [Disable readonly mode temporarily](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-disable-readonly-mode-temporarily)<br>- [Enable database webhook](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-enable-database-webhook)<br>- [Generate typescript types](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-generate-typescript-types)<br>- [Get a migration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-a-migration)<br>- [Get a snippet](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-a-snippet)<br>- [Get backup schedule](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-backup-schedule)<br>- [Get database metadata](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-database-metadata)<br>- [Get database openapi](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-database-openapi)<br>- [Get jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-jit-access)<br>- [Get jit access config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-jit-access-config)<br>- [Get pooler config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-pooler-config)<br>- [Get postgres config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-postgres-config)<br>- [Get project pgbouncer config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-pgbouncer-config)<br>- [Get readonly mode status](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-readonly-mode-status)<br>- [Get ssl enforcement config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-ssl-enforcement-config)<br>- [Invite external jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-invite-external-jit-access)<br>- [List all backups](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-backups)<br>- [List all snippets](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-snippets)<br>- [List jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-jit-access)<br>- [List migration history](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-migration-history)<br>- [Patch a migration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-patch-a-migration)<br>- [Read only query](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-read-only-query)<br>- [Remove a read replica](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-remove-a-read-replica)<br>- [Restore pitr backup](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-restore-pitr-backup)<br>- [Rollback migrations](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-rollback-migrations)<br>- [Run a query](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-run-a-query)<br>- [Setup a read replica](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-setup-a-read-replica)<br>- [Update backup schedule](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-backup-schedule)<br>- [Update database password](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-database-password)<br>- [Update jit access](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-jit-access)<br>- [Update jit access config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-jit-access-config)<br>- [Update pooler config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-pooler-config)<br>- [Update postgres config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-postgres-config)<br>- [Update ssl enforcement config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-ssl-enforcement-config)<br>- [Upsert a migration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-upsert-a-migration)<br>- [Activate custom hostname](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-activate-custom-hostname)<br>- [Activate vanity subdomain config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-activate-vanity-subdomain-config)<br>- [Check vanity subdomain availability](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-check-vanity-subdomain-availability)<br>- [Deactivate vanity subdomain config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-deactivate-vanity-subdomain-config)<br>- [Get hostname config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-hostname-config)<br>- [Get vanity subdomain config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-vanity-subdomain-config)<br>- [Update hostname config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-hostname-config)<br>- [Verify dns config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-verify-dns-config)<br>- [Bulk update functions](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-bulk-update-functions)<br>- [Create a function](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-a-function)<br>- [Delete a function](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-a-function)<br>- [Deploy a function](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-deploy-a-function)<br>- [Get a function](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-a-function)<br>- [Get a function body](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-a-function-body)<br>- [List all functions](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-functions)<br>- [Update a function](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-a-function)<br>- [Count action runs](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-count-action-runs)<br>- [Create a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-a-branch)<br>- [Delete a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-a-branch)<br>- [Diff a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-diff-a-branch)<br>- [Disable preview branching](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-disable-preview-branching)<br>- [Get a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-a-branch)<br>- [Get a branch config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-a-branch-config)<br>- [Get action run](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-action-run)<br>- [Get action run logs](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-action-run-logs)<br>- [List action runs](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-action-runs)<br>- [List all branches](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-branches)<br>- [Merge a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-merge-a-branch)<br>- [Push a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-push-a-branch)<br>- [Reset a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-reset-a-branch)<br>- [Restore a branch](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-restore-a-branch)<br>- [Update a branch config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-a-branch-config)<br>- [Update action run status](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-action-run-status)<br>- [Authorize user](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-authorize-user)<br>- [Exchange oauth token](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-exchange-oauth-token)<br>- [Oauth authorize project claim](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-oauth-authorize-project-claim)<br>- [Revoke token](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-revoke-token)<br>- [Assign organization member role](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-assign-organization-member-role)<br>- [Create an organization](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-an-organization)<br>- [Get an organization](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-an-organization)<br>- [Get organization entitlements](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-organization-entitlements)<br>- [List all organizations](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-organizations)<br>- [List organization members](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-organization-members)<br>- [List organization members](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-list-organization-members)<br>- [List organization roles](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-list-organization-roles)<br>- [Create organization invitations](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-create-organization-invitations)<br>- [Get profile](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-profile)<br>- [Cancel a project restoration](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-cancel-a-project-restoration)<br>- [Create a project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-a-project)<br>- [Create private link association](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-create-private-link-association)<br>- [Delete a project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-a-project)<br>- [Delete network bans](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-network-bans)<br>- [Delete private link association](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-delete-private-link-association)<br>- [Get all projects for organization](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-all-projects-for-organization)<br>- [Get available regions](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-available-regions)<br>- [Get database disk](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-database-disk)<br>- [Get disk utilization](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-disk-utilization)<br>- [Get network restrictions](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-network-restrictions)<br>- [Get postgres upgrade eligibility](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-postgres-upgrade-eligibility)<br>- [Get postgres upgrade status](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-postgres-upgrade-status)<br>- [Get project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project)<br>- [Get project disk autoscale config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-disk-autoscale-config)<br>- [Get services health](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-services-health)<br>- [List all network bans](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-network-bans)<br>- [List all network bans enriched](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-network-bans-enriched)<br>- [List all projects](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-projects)<br>- [List available restore versions](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-available-restore-versions)<br>- [List private link associations](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-list-private-link-associations)<br>- [Modify database disk](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-modify-database-disk)<br>- [Patch network restrictions](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-patch-network-restrictions)<br>- [Pause a project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-pause-a-project)<br>- [Preview a project transfer](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-preview-a-project-transfer)<br>- [Restart a project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-restart-a-project)<br>- [Restore a project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-restore-a-project)<br>- [Transfer a project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v2-transfer-a-project)<br>- [Update a project](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-a-project)<br>- [Update network restrictions](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-network-restrictions)<br>- [Upgrade postgres version](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-upgrade-postgres-version)<br>- [Get realtime config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-realtime-config)<br>- [Shutdown realtime](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-shutdown-realtime)<br>- [Update realtime config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-realtime-config)<br>- [Get postgrest service config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-postgrest-service-config)<br>- [Update postgrest service config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-postgrest-service-config)<br>- [Bulk create secrets](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-bulk-create-secrets)<br>- [Bulk delete secrets](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-bulk-delete-secrets)<br>- [Create project api key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-create-project-api-key)<br>- [Delete project api key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-delete-project-api-key)<br>- [Get pgsodium config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-pgsodium-config)<br>- [Get project api key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-api-key)<br>- [Get project api keys](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-api-keys)<br>- [Get project legacy api keys](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-project-legacy-api-keys)<br>- [List all secrets](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-secrets)<br>- [Update pgsodium config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-pgsodium-config)<br>- [Update project api key](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-project-api-key)<br>- [Update project legacy api keys](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-project-legacy-api-keys)<br>- [Get storage config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-get-storage-config)<br>- [List all buckets](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-list-all-buckets)<br>- [Update storage config](https://docs-git-nikrichers-docs-1268-spike-chunk-manag-905bfb-supabase.vercel.app/docs/reference/api/v1-update-storage-config) | 174 links per column: the bare `/reference/api` route plus all 173 API reference sections (Introduction + 172 operations). The bare-route link now redirects to Introduction on *both* sides (production already did via the `apps/www` fix earlier in this PR; the preview now matches, since the monolith-rendering branch is removed). For the other 173 links, production still resolves every one to today's same ~35MB monolith (all 172 endpoints on one page, regardless of which slug you clicked), while the preview serves each as its own individual per-endpoint page — click through any pair to compare page weight/content directly. ### Test plan - [ ] Open the PR preview and confirm `/reference/api/introduction` and a handful of `/reference/api/<operation-slug>` URLs render as individual pages (not the full monolith) - [ ] Confirm the API reference sidebar navigates between real pages (URL changes, page reloads) without console errors - [ ] Confirm `/reference/javascript/...`, `/reference/cli`, and `/reference/self-hosting-*` render exactly as they do on production (no regression) - [ ] Confirm `/reference/api` (bare) now redirects to `/reference/api/introduction` instead of rendering all 172 operations <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added individual pages for Management API operations with operation-specific titles, descriptions, metadata, and share previews. * API reference navigation now supports full page navigation between sections and operations. * **Bug Fixes** * Updated API reference routing to preserve direct links to operation pages. * Unknown API operations now return a not-found page. * **Documentation** * Updated Management API links and redirects to use the new API introduction page. * Bare API reference URLs now redirect to the introduction. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Nik Richers <nik@validmind.ai>
379 lines
11 KiB
TypeScript
379 lines
11 KiB
TypeScript
'use client'
|
|
|
|
import type { AbbrevApiReferenceSection } from '~/features/docs/Reference.utils'
|
|
import { isElementInViewport } from '~/features/ui/helpers.dom'
|
|
import { BASE_PATH } from '~/lib/constants'
|
|
import { debounce } from 'lodash-es'
|
|
import { ChevronUp } from 'lucide-react'
|
|
import Link from 'next/link'
|
|
import { usePathname } from 'next/navigation'
|
|
import { Collapsible } from 'radix-ui'
|
|
import type { HTMLAttributes, MouseEvent, PropsWithChildren } from 'react'
|
|
import {
|
|
createContext,
|
|
useCallback,
|
|
useContext,
|
|
useEffect,
|
|
useMemo,
|
|
useRef,
|
|
useState,
|
|
useSyncExternalStore,
|
|
} from 'react'
|
|
import { cn } from 'ui'
|
|
|
|
export const ReferenceContentInitiallyScrolledContext = createContext<boolean>(false)
|
|
|
|
let patchCount = 0
|
|
let originalPushState: typeof history.pushState | null = null
|
|
let originalReplaceState: typeof history.replaceState | null = null
|
|
const pathnameListeners = new Set<() => void>()
|
|
|
|
function notifyPathnameListeners() {
|
|
pathnameListeners.forEach((callback) => callback())
|
|
}
|
|
|
|
function subscribeToPathname(callback: () => void) {
|
|
pathnameListeners.add(callback)
|
|
|
|
if (patchCount === 0) {
|
|
window.addEventListener('popstate', notifyPathnameListeners)
|
|
|
|
originalPushState = history.pushState.bind(history)
|
|
history.pushState = (...args) => {
|
|
originalPushState!(...args)
|
|
notifyPathnameListeners()
|
|
}
|
|
|
|
originalReplaceState = history.replaceState.bind(history)
|
|
history.replaceState = (...args) => {
|
|
originalReplaceState!(...args)
|
|
notifyPathnameListeners()
|
|
}
|
|
}
|
|
patchCount++
|
|
|
|
return () => {
|
|
pathnameListeners.delete(callback)
|
|
patchCount--
|
|
|
|
if (patchCount === 0) {
|
|
window.removeEventListener('popstate', notifyPathnameListeners)
|
|
history.pushState = originalPushState!
|
|
history.replaceState = originalReplaceState!
|
|
originalPushState = null
|
|
originalReplaceState = null
|
|
}
|
|
}
|
|
}
|
|
|
|
function getPathname() {
|
|
if (typeof window === 'undefined') return ''
|
|
const pathname = window.location.pathname
|
|
return pathname.startsWith(BASE_PATH) ? pathname.slice(BASE_PATH.length) : pathname
|
|
}
|
|
|
|
function getServerPathname() {
|
|
return ''
|
|
}
|
|
|
|
function useCurrentPathname() {
|
|
return useSyncExternalStore(subscribeToPathname, getPathname, getServerPathname)
|
|
}
|
|
|
|
export function ReferenceContentScrollHandler({
|
|
libPath,
|
|
version,
|
|
isLatestVersion,
|
|
children,
|
|
}: PropsWithChildren<{
|
|
libPath: string
|
|
version: string
|
|
isLatestVersion: boolean
|
|
}>) {
|
|
const [initiallyScrolled, setInitiallyScrolled] = useState(false)
|
|
|
|
const pathname = usePathname()
|
|
|
|
useEffect(() => {
|
|
if (!initiallyScrolled) {
|
|
const initialSelectedSection = pathname.replace(
|
|
`/reference/${libPath}/${isLatestVersion ? '' : `${version}/`}`,
|
|
''
|
|
)
|
|
if (initialSelectedSection) {
|
|
const section = document.getElementById(initialSelectedSection)
|
|
if (section) {
|
|
window.scrollTo(0, section.offsetTop - 60 /* space for header + padding */)
|
|
section.querySelector('h2')?.focus()
|
|
}
|
|
}
|
|
|
|
setInitiallyScrolled(true)
|
|
}
|
|
}, [pathname, libPath, version, isLatestVersion, initiallyScrolled])
|
|
|
|
return (
|
|
<ReferenceContentInitiallyScrolledContext.Provider value={initiallyScrolled}>
|
|
{children}
|
|
</ReferenceContentInitiallyScrolledContext.Provider>
|
|
)
|
|
}
|
|
|
|
export function ReferenceNavigationScrollHandler({
|
|
children,
|
|
...rest
|
|
}: PropsWithChildren & HTMLAttributes<HTMLDivElement>) {
|
|
const parentRef = useRef<HTMLElement | null>(null)
|
|
const ref = useRef<HTMLDivElement | null>(null)
|
|
const initialScrollHappened = useContext(ReferenceContentInitiallyScrolledContext)
|
|
|
|
useEffect(() => {
|
|
if (!ref.current) return
|
|
|
|
let scrollingParent: HTMLElement = ref.current
|
|
|
|
while (scrollingParent && !(scrollingParent.scrollHeight > scrollingParent.clientHeight)) {
|
|
const parent = scrollingParent.parentElement
|
|
if (!parent) break
|
|
scrollingParent = parent
|
|
}
|
|
|
|
parentRef.current = scrollingParent
|
|
}, [])
|
|
|
|
const scrollActiveIntoView = useCallback(() => {
|
|
const currentLink = ref.current?.querySelector('[aria-current=page]') as HTMLElement
|
|
if (currentLink && !isElementInViewport(currentLink)) {
|
|
// Calculate the offset of the current link relative to scrollingParent
|
|
// and scroll the parent to the top of the link.
|
|
const offsetTop = currentLink.offsetTop
|
|
const parentOffsetTop = parentRef.current?.offsetTop ?? 0
|
|
const scrollPosition = offsetTop - parentOffsetTop
|
|
|
|
parentRef.current?.scrollTo({
|
|
top: scrollPosition - 60 /* space for header + padding */,
|
|
})
|
|
}
|
|
}, [])
|
|
|
|
useEffect(() => {
|
|
if (initialScrollHappened) {
|
|
scrollActiveIntoView()
|
|
}
|
|
}, [initialScrollHappened, scrollActiveIntoView])
|
|
|
|
useEffect(() => {
|
|
const debouncedScrollActiveIntoView = debounce(scrollActiveIntoView, 150)
|
|
|
|
window.addEventListener('scrollend', debouncedScrollActiveIntoView)
|
|
return () => window.removeEventListener('scrollend', debouncedScrollActiveIntoView)
|
|
}, [scrollActiveIntoView])
|
|
|
|
return (
|
|
<div ref={ref} {...rest}>
|
|
{children}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
function deriveHref(basePath: string, section: AbbrevApiReferenceSection) {
|
|
return 'slug' in section ? `${basePath}/${section.slug}` : ''
|
|
}
|
|
|
|
function getLinkStyles(isActive: boolean, className?: string) {
|
|
return cn(
|
|
'text-sm text-foreground-lighter',
|
|
!isActive && 'hover:text-foreground',
|
|
isActive && 'text-brand',
|
|
'transition-colors',
|
|
className
|
|
)
|
|
}
|
|
|
|
/**
|
|
* Creates a function that navigates to a reference subsection.
|
|
*
|
|
* Since reference "pages" are actually an agglomeration of many "pages", we
|
|
* don't want to actually complete a full page navigation.
|
|
*
|
|
* @param href - The path to the navigation target.
|
|
* @param sectionSlug - The slug of the section to navigate to.
|
|
* @returns A function that navigates to the reference subsection.
|
|
*/
|
|
function createReferenceSubsectionNavigator(href: string, sectionSlug?: string) {
|
|
return function navigateToReferenceSubsection(evt: MouseEvent) {
|
|
if (sectionSlug) {
|
|
evt.preventDefault()
|
|
history.pushState({}, '', `${BASE_PATH}${href}`)
|
|
|
|
const domElement = document.getElementById(sectionSlug)
|
|
domElement?.scrollIntoView()
|
|
domElement?.querySelector('h2')?.focus()
|
|
}
|
|
}
|
|
}
|
|
|
|
export function RefInternalLink({
|
|
href,
|
|
sectionSlug,
|
|
children,
|
|
}: {
|
|
href: string
|
|
sectionSlug?: string
|
|
children: React.ReactNode
|
|
}) {
|
|
const onClick = useCallback(
|
|
(evt: MouseEvent) => createReferenceSubsectionNavigator(href, sectionSlug)(evt),
|
|
[href, sectionSlug]
|
|
)
|
|
|
|
return (
|
|
<Link href={href} onClick={onClick}>
|
|
{children}
|
|
</Link>
|
|
)
|
|
}
|
|
|
|
export function RefLink({
|
|
basePath,
|
|
section,
|
|
skipChildren = false,
|
|
className,
|
|
realNavigation,
|
|
}: {
|
|
basePath: string
|
|
section: AbbrevApiReferenceSection
|
|
skipChildren?: boolean
|
|
className?: string
|
|
// Spike (DOCS-1268): when true, this link does a real navigation instead of
|
|
// the scroll-hijack below — used only by the API reference, whose endpoints
|
|
// are now real pages. Undefined everywhere else preserves current behavior.
|
|
realNavigation?: boolean
|
|
}) {
|
|
const ref = useRef<HTMLAnchorElement>(null)
|
|
|
|
const pathname = useCurrentPathname()
|
|
const href = deriveHref(basePath, section)
|
|
const isActive =
|
|
pathname === href || (pathname === basePath && href.replace(basePath, '') === '/introduction')
|
|
|
|
useEffect(() => {
|
|
if (ref.current) {
|
|
ref.current.ariaCurrent = isActive ? 'page' : null
|
|
ref.current.className = getLinkStyles(isActive, className)
|
|
}
|
|
}, [isActive, className])
|
|
|
|
const onClick = useCallback(
|
|
(evt: MouseEvent) => {
|
|
if (realNavigation) return
|
|
createReferenceSubsectionNavigator(href, section.slug)(evt)
|
|
},
|
|
[href, section.slug, realNavigation]
|
|
)
|
|
|
|
if (!('title' in section)) return null
|
|
|
|
const isCompoundSection =
|
|
!skipChildren && 'items' in section && section.items && section.items.length > 0
|
|
|
|
return (
|
|
<>
|
|
{isCompoundSection ? (
|
|
<CompoundRefLink basePath={basePath} section={section} realNavigation={realNavigation} />
|
|
) : (
|
|
<Link
|
|
ref={ref}
|
|
// Scroll-hijack links never navigate, so disable prefetch. Real API
|
|
// pages omit the prop and keep Next.js's default prefetch behavior.
|
|
{...(!realNavigation ? { prefetch: false } : {})}
|
|
href={href}
|
|
className={getLinkStyles(isActive, className)}
|
|
onClick={onClick}
|
|
>
|
|
{section.title}
|
|
</Link>
|
|
)}
|
|
</>
|
|
)
|
|
}
|
|
|
|
function useCompoundRefLinkActive(basePath: string, section: AbbrevApiReferenceSection) {
|
|
const [open, _setOpen] = useState(false)
|
|
|
|
const pathname = useCurrentPathname()
|
|
const parentHref = deriveHref(basePath, section)
|
|
const isParentActive = pathname === parentHref
|
|
|
|
const childHrefs = useMemo(
|
|
() => new Set((section.items || []).map((item) => deriveHref(basePath, item))),
|
|
[basePath, section]
|
|
)
|
|
const isChildActive = childHrefs.has(pathname)
|
|
|
|
const isActive = isParentActive || isChildActive
|
|
|
|
const setOpen = (open: boolean) => {
|
|
// Disable closing if the section is active, to prevent the currently active
|
|
// link disappearing
|
|
if (open || !isActive) _setOpen(open)
|
|
}
|
|
|
|
if (isActive && !open) {
|
|
setOpen(true)
|
|
}
|
|
|
|
return { open, setOpen, isActive }
|
|
}
|
|
|
|
function CompoundRefLink({
|
|
basePath,
|
|
section,
|
|
realNavigation,
|
|
}: {
|
|
basePath: string
|
|
section: AbbrevApiReferenceSection
|
|
realNavigation?: boolean
|
|
}) {
|
|
const { open, setOpen, isActive } = useCompoundRefLinkActive(basePath, section)
|
|
|
|
return (
|
|
<Collapsible.Root open={open} onOpenChange={setOpen}>
|
|
<Collapsible.Trigger asChild disabled={isActive}>
|
|
<button
|
|
tabIndex={0}
|
|
className={cn(
|
|
'group',
|
|
'cursor-pointer',
|
|
'w-full',
|
|
'flex items-center justify-between gap-2'
|
|
)}
|
|
>
|
|
<span className={getLinkStyles(false)}>{section.title}</span>
|
|
<ChevronUp
|
|
width={16}
|
|
className={cn(
|
|
'group-disabled:cursor-not-allowed group-disabled:opacity-10',
|
|
'data-open-parent:rotate-0 data-closed-parent:rotate-90',
|
|
'transition'
|
|
)}
|
|
/>
|
|
</button>
|
|
</Collapsible.Trigger>
|
|
<Collapsible.Content
|
|
className={cn('border-l border-control pl-3 ml-1 data-open:mt-2 grid gap-2.5')}
|
|
>
|
|
<ul className="space-y-2">
|
|
{(section.items || []).map((item, idx) => {
|
|
return (
|
|
<li key={`${section.id}-${idx}`}>
|
|
<RefLink basePath={basePath} section={item} realNavigation={realNavigation} />
|
|
</li>
|
|
)
|
|
})}
|
|
</ul>
|
|
</Collapsible.Content>
|
|
</Collapsible.Root>
|
|
)
|
|
}
|