From 30f950de11c70371ddfe711afa72b29ddb060367 Mon Sep 17 00:00:00 2001 From: Tyler Hogarth <5163494+tylerhogarth@users.noreply.github.com> Date: Wed, 19 Aug 2026 19:14:13 +0200 Subject: [PATCH 1/6] docs: vertical drill-in sidebar, Build/Deploy/Manage/Reference IA, REST API rename Replace the horizontal top tab strip with a Vercel-style left sidebar: a grouped "All docs" view (Start, Build, Deploy, Manage, Reference) that drills into each section's tree behind an always-visible "All docs" back link. The docs root pairs the top-level menu with the Get started content. Rename Management API to REST API (folder, generator, openapi key, llms prefixes, postman collection, CI workflow) with wildcard redirects. Move the Composer CLI reference to cli/v8/composer with a redirect. Reorder the root meta, drop the dangling "platform" entry, list console, and refresh section icons. Sidebar and TOC states use new global spectrum styles (hover fade-in text, active ring, gradient TOC thumb) built on the brand gradient tokens. Adds apps/docs/AGENTS.md recording the Reference/Concepts/Guides taxonomy and page-move mechanics. Co-Authored-By: Claude Fable 5 --- .../workflows/sync-management-api-docs.yml | 14 +- apps/docs/AGENTS.md | 37 +++ apps/docs/CLAUDE.md | 1 + apps/docs/content/docs/(index)/index.mdx | 3 +- apps/docs/content/docs/(index)/meta.json | 1 - apps/docs/content/docs/(index)/v8/index.mdx | 1 - apps/docs/content/docs/ai/prompts/nuxt.mdx | 2 +- apps/docs/content/docs/ai/tools/skills.mdx | 6 +- apps/docs/content/docs/cli/index.mdx | 2 +- .../cli-reference.mdx => cli/v8/composer.mdx} | 30 ++- apps/docs/content/docs/cli/v8/index.mdx | 4 +- apps/docs/content/docs/cli/v8/meta.json | 2 +- apps/docs/content/docs/composer/deploying.mdx | 13 +- apps/docs/content/docs/composer/index.mdx | 2 +- apps/docs/content/docs/composer/meta.json | 2 +- apps/docs/content/docs/compute/alchemy.mdx | 2 +- .../content/docs/compute/cli-reference.mdx | 4 +- .../docs/content/docs/compute/limitations.mdx | 2 +- .../content/docs/compute/object-storage.mdx | 24 +- .../guides/integrations/github-actions.mdx | 12 +- .../guides/integrations/vercel-deployment.mdx | 4 +- .../guides/v8/upgrade-prisma-orm/meta.json | 5 +- .../content/docs/management-api/index.mdx | 25 -- apps/docs/content/docs/meta.json | 16 +- apps/docs/content/docs/orm/meta.json | 1 + .../docs/content/docs/postgres/iac/pulumi.mdx | 2 +- .../content/docs/postgres/iac/terraform.mdx | 2 +- apps/docs/content/docs/postgres/meta.json | 2 +- .../content/docs/query-insights/meta.json | 1 + .../api-clients.mdx | 14 +- .../authentication.mdx | 16 +- ...te-buckets-by-bucket-id-keys-by-key-id.mdx | 6 +- .../buckets/delete-buckets-by-bucket-id.mdx | 6 +- .../buckets/get-buckets-by-bucket-id-keys.mdx | 6 +- .../buckets/get-buckets-by-bucket-id.mdx | 6 +- .../endpoints/buckets/get-buckets.mdx | 6 +- .../post-buckets-by-bucket-id-keys.mdx | 6 +- .../endpoints/buckets/post-buckets.mdx | 6 +- .../connections/delete-connections-by-id.mdx | 6 +- .../connections/get-connections-by-id.mdx | 6 +- .../endpoints/connections/get-connections.mdx | 6 +- .../post-connections-by-id-rotate.mdx | 6 +- .../connections/post-connections.mdx | 6 +- .../get-databases-by-database-id-backups.mdx | 6 +- .../get-databases-by-database-id-usage.mdx | 6 +- ...t-databases-by-database-id-connections.mdx | 6 +- ...t-databases-by-database-id-connections.mdx | 6 +- .../delete-databases-by-database-id.mdx | 6 +- .../get-databases-by-database-id.mdx | 6 +- .../endpoints/databases/get-databases.mdx | 6 +- .../get-projects-by-project-id-databases.mdx | 6 +- .../patch-databases-by-database-id.mdx | 6 +- ...atabases-by-target-database-id-restore.mdx | 6 +- .../endpoints/databases/post-databases.mdx | 6 +- .../post-projects-by-project-id-databases.mdx | 6 +- .../delete-integrations-by-id.mdx | 6 +- ...workspace-id-integrations-by-client-id.mdx | 6 +- .../integrations/get-integrations-by-id.mdx | 6 +- .../integrations/get-integrations.mdx | 6 +- ...orkspaces-by-workspace-id-integrations.mdx | 6 +- .../endpoints/meta.json | 0 .../endpoints/misc/get-me.mdx | 6 +- .../endpoints/misc/get-regions-accelerate.mdx | 6 +- .../endpoints/misc/get-regions-postgres.mdx | 6 +- .../projects/delete-projects-by-id.mdx | 6 +- .../endpoints/projects/get-projects-by-id.mdx | 6 +- .../endpoints/projects/get-projects.mdx | 6 +- .../projects/patch-projects-by-id.mdx | 6 +- .../projects/post-projects-by-id-transfer.mdx | 6 +- .../endpoints/projects/post-projects.mdx | 6 +- .../endpoints/regions/get-regions.mdx | 6 +- ...-id-service-tokens-by-service-token-id.mdx | 6 +- ...kspaces-by-workspace-id-service-tokens.mdx | 6 +- ...kspaces-by-workspace-id-service-tokens.mdx | 6 +- .../get-workspaces-by-id-subscription.mdx | 6 +- .../workspaces/get-workspaces-by-id.mdx | 6 +- .../endpoints/workspaces/get-workspaces.mdx | 6 +- .../getting-started.mdx | 18 +- apps/docs/content/docs/rest-api/index.mdx | 25 ++ .../{management-api => rest-api}/meta.json | 2 +- .../partner-integration.mdx | 28 +-- .../docs/{management-api => rest-api}/sdk.mdx | 14 +- apps/docs/content/docs/studio/meta.json | 2 +- apps/docs/next.config.mjs | 10 + apps/docs/package.json | 2 +- ...> prisma-rest-api.postman_collection.json} | 0 apps/docs/scripts/generate-docs.ts | 16 +- .../scripts/generate-postman-collection.ts | 2 +- apps/docs/scripts/lint-agent-ready.ts | 4 +- .../scripts/test-llm-markdown-fidelity.ts | 2 +- .../app/(docs)/(default)/[[...slug]]/page.tsx | 2 +- apps/docs/src/app/global.css | 120 +++++++++ .../src/components/chrome/paper-ground.tsx | 46 ++-- .../src/components/layout/notebook/client.tsx | 98 +------- .../src/components/layout/notebook/index.tsx | 106 +++----- .../layout/notebook/sidebar-nav.tsx | 236 ++++++++++++++++++ .../components/layout/notebook/sidebar.tsx | 12 +- .../layout/sidebar/tabs/dropdown.tsx | 191 -------------- .../components/layout/sidebar/tabs/index.tsx | 7 + apps/docs/src/components/toc/clerk.tsx | 4 +- apps/docs/src/components/toc/default.tsx | 4 +- apps/docs/src/lib/layout.shared.tsx | 59 +---- apps/docs/src/lib/llms.ts | 4 +- apps/docs/src/lib/openapi.ts | 2 +- apps/docs/src/lib/sidebar-sections.ts | 46 ++++ apps/docs/vercel.json | 12 +- apps/site/src/app/contact/page.tsx | 15 +- apps/site/src/app/layout.tsx | 6 +- apps/site/src/components/header.tsx | 36 +-- .../src/components/product/platform-stack.tsx | 10 +- .../src/components/sections/contact-hero.tsx | 25 +- .../sections/contact-message-form.tsx | 45 ++-- .../components/sections/contact-support.tsx | 12 +- .../src/components/sections/how-it-works.tsx | 65 ++--- 114 files changed, 928 insertions(+), 882 deletions(-) create mode 100644 apps/docs/AGENTS.md create mode 120000 apps/docs/CLAUDE.md rename apps/docs/content/docs/{composer/cli-reference.mdx => cli/v8/composer.mdx} (78%) delete mode 100644 apps/docs/content/docs/management-api/index.mdx rename apps/docs/content/docs/{management-api => rest-api}/api-clients.mdx (92%) rename apps/docs/content/docs/{management-api => rest-api}/authentication.mdx (89%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/buckets/delete-buckets-by-bucket-id.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/buckets/get-buckets-by-bucket-id-keys.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/buckets/get-buckets-by-bucket-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/buckets/get-buckets.mdx (70%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/buckets/post-buckets-by-bucket-id-keys.mdx (70%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/buckets/post-buckets.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/connections/delete-connections-by-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/connections/get-connections-by-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/connections/get-connections.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/connections/post-connections-by-id-rotate.mdx (70%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/connections/post-connections.mdx (68%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/database-backups/get-databases-by-database-id-backups.mdx (66%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/database-usage/get-databases-by-database-id-usage.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases-connections/get-databases-by-database-id-connections.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases-connections/post-databases-by-database-id-connections.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/delete-databases-by-database-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/get-databases-by-database-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/get-databases.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/get-projects-by-project-id-databases.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/patch-databases-by-database-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/post-databases-by-target-database-id-restore.mdx (72%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/post-databases.mdx (68%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/databases/post-projects-by-project-id-databases.mdx (66%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/integrations/delete-integrations-by-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx (66%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/integrations/get-integrations-by-id.mdx (68%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/integrations/get-integrations.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx (66%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/meta.json (100%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/misc/get-me.mdx (72%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/misc/get-regions-accelerate.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/misc/get-regions-postgres.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/projects/delete-projects-by-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/projects/get-projects-by-id.mdx (68%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/projects/get-projects.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/projects/patch-projects-by-id.mdx (68%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/projects/post-projects-by-id-transfer.mdx (68%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/projects/post-projects.mdx (70%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/regions/get-regions.mdx (70%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id.mdx (65%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/workspaces/get-workspaces-by-id-subscription.mdx (68%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/workspaces/get-workspaces-by-id.mdx (67%) rename apps/docs/content/docs/{management-api => rest-api}/endpoints/workspaces/get-workspaces.mdx (69%) rename apps/docs/content/docs/{management-api => rest-api}/getting-started.mdx (86%) create mode 100644 apps/docs/content/docs/rest-api/index.mdx rename apps/docs/content/docs/{management-api => rest-api}/meta.json (90%) rename apps/docs/content/docs/{management-api => rest-api}/partner-integration.mdx (84%) rename apps/docs/content/docs/{management-api => rest-api}/sdk.mdx (93%) rename apps/docs/public/{prisma-management-api.postman_collection.json => prisma-rest-api.postman_collection.json} (100%) create mode 100644 apps/docs/src/components/layout/notebook/sidebar-nav.tsx delete mode 100644 apps/docs/src/components/layout/sidebar/tabs/dropdown.tsx create mode 100644 apps/docs/src/lib/sidebar-sections.ts diff --git a/.github/workflows/sync-management-api-docs.yml b/.github/workflows/sync-management-api-docs.yml index f366c47288..4313f9d6b1 100644 --- a/.github/workflows/sync-management-api-docs.yml +++ b/.github/workflows/sync-management-api-docs.yml @@ -1,4 +1,4 @@ -name: Sync Management API Docs +name: Sync REST API Docs on: repository_dispatch: @@ -11,7 +11,7 @@ concurrency: jobs: sync: - name: Sync Management API Documentation + name: Sync REST API Documentation runs-on: ubuntu-latest steps: - name: Checkout repository @@ -33,18 +33,18 @@ jobs: - name: Generate docs and Postman collection working-directory: apps/docs - run: pnpm run generate:management-api-docs + run: pnpm run generate:rest-api-docs - name: Check for changes id: changes run: | - if [[ -z "$(git status --porcelain --untracked-files=all -- apps/docs/content/docs/management-api/ apps/docs/public/prisma-management-api.postman_collection.json apps/docs/vercel.json)" ]]; then + if [[ -z "$(git status --porcelain --untracked-files=all -- apps/docs/content/docs/rest-api/ apps/docs/public/prisma-rest-api.postman_collection.json apps/docs/vercel.json)" ]]; then echo "changed=false" >> $GITHUB_OUTPUT echo "No changes detected" else echo "changed=true" >> $GITHUB_OUTPUT echo "Changes detected:" - git status --short -- apps/docs/content/docs/management-api/ apps/docs/public/prisma-management-api.postman_collection.json apps/docs/vercel.json + git status --short -- apps/docs/content/docs/rest-api/ apps/docs/public/prisma-rest-api.postman_collection.json apps/docs/vercel.json fi - name: Commit and push @@ -52,8 +52,8 @@ jobs: run: | git config user.email "prismabots@gmail.com" git config user.name "Prismo" - git add apps/docs/content/docs/management-api/ apps/docs/public/prisma-management-api.postman_collection.json apps/docs/vercel.json - git commit -m "chore(docs): sync management API documentation" + git add apps/docs/content/docs/rest-api/ apps/docs/public/prisma-rest-api.postman_collection.json apps/docs/vercel.json + git commit -m "chore(docs): sync REST API documentation" git push "https://x-access-token:${{ secrets.BOT_TOKEN_DOCS_COMMIT }}@github.com/${{ github.repository }}.git" HEAD:${{ github.ref_name }} - name: Trigger Vercel deploy diff --git a/apps/docs/AGENTS.md b/apps/docs/AGENTS.md new file mode 100644 index 0000000000..d3c20d61b0 --- /dev/null +++ b/apps/docs/AGENTS.md @@ -0,0 +1,37 @@ +# AGENTS.md — Prisma docs app + +## Documentation taxonomy + +Classify every docs page as one of three kinds before writing or moving content: + +1. **Reference**: interface contracts. CLI commands, flags, REST API endpoints, parameters, config file fields, environment variables, API signatures. +2. **Concepts**: platform fundamentals. Projects, workspaces, branching, environment variables as a topic, how things work. +3. **Guides**: getting-started and structured step-by-step material. + +## Placement rules + +1. Reference material lives under `content/docs/cli/`, `content/docs/rest-api/`, or a section's `---Reference---` meta.json block. Never document flags, parameters, or endpoints in full inside a concept or guide page; link to the reference page instead. +2. A product section may keep a thin `cli-reference.mdx` pointer page that links into `cli/v8/*`. `content/docs/compute/cli-reference.mdx` is the canonical example. Full command references live in `cli/v8/`. +3. The section is named "REST API" (folder `rest-api`). Do not reintroduce "Management API" in titles, nav, prose, or new URLs. Code identifiers (`@prisma/management-api-sdk`, `createManagementApiClient`) keep their names. +4. Sidebar grouping (Build/Deploy/Manage/Reference) is UI config in `src/lib/sidebar-sections.ts`, not content structure. Do not add grouping separators to the root `content/docs/meta.json`. + +## Moving or renaming pages + +1. Add a redirect in the live region of `next.config.mjs` `redirects()` (near the `/llms/next.txt` entry). Do not add entries to the commented "Prisma 8 URL cutover" staging blocks unless working on that cutover. Run `pnpm audit:redirects:strict` after. +2. Re-run `npx tsx scripts/add-url-frontmatter.ts` after any file move; the required `url:` frontmatter goes stale silently and no linter catches it. +3. New top-level sections need an entry in `llmsSections` in `src/lib/llms.ts` (see `.claude/skills/docs-agent-ready`). +4. Do not rename the `orm/`, `cli/`, or `guides/` folders or their meta.json titles, and keep `cli/v8/meta.json` title exactly `"v8 (RC)"`: `src/lib/version.ts` path maps and `src/lib/versioned-sidebar-tree.ts` match on those strings and break the version switcher silently. + +## Generated content + +1. `content/docs/rest-api/endpoints/` and `public/prisma-rest-api.postman_collection.json` are generated. Never hand-edit; run `pnpm generate:rest-api-docs`. +2. The generator prepends redirects to `vercel.json` for endpoints that disappear from the OpenAPI spec; review them after each run. + +## Validation + +Run from `apps/docs`: + +1. `pnpm lint:links` — internal links, anchors, `Card` hrefs. It does not check redirect destinations, `version.ts` path maps, `llms.ts` prefixes, or `url:` frontmatter. +2. `pnpm audit:redirects:strict` after adding redirects. +3. `pnpm lint:agent-ready` after touching sections, llms surfaces, or the OpenAPI explorer. +4. `pnpm types:check` and `pnpm build` for code changes. diff --git a/apps/docs/CLAUDE.md b/apps/docs/CLAUDE.md new file mode 120000 index 0000000000..47dc3e3d86 --- /dev/null +++ b/apps/docs/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/apps/docs/content/docs/(index)/index.mdx b/apps/docs/content/docs/(index)/index.mdx index 8e28514a1f..f1aceced13 100644 --- a/apps/docs/content/docs/(index)/index.mdx +++ b/apps/docs/content/docs/(index)/index.mdx @@ -4,7 +4,6 @@ description: Scaffold an app with Prisma 8, create or connect Prisma Postgres, a url: / metaTitle: Get started with Prisma metaDescription: Scaffold an app with Prisma 8, create or connect Prisma Postgres, and deploy it on Prisma Compute. Quick setup, guided setup, and agent prompts. -hideSidebar: true full: true --- @@ -189,7 +188,7 @@ If you're using MongoDB, follow the [MongoDB quickstart](/v8/quickstart/mongodb) } /> - } /> + } /> } /> } /> } /> diff --git a/apps/docs/content/docs/(index)/meta.json b/apps/docs/content/docs/(index)/meta.json index 9261c40c1a..6219d2c5b3 100644 --- a/apps/docs/content/docs/(index)/meta.json +++ b/apps/docs/content/docs/(index)/meta.json @@ -2,7 +2,6 @@ "title": "Getting Started", "root": true, "pages": [ - "---Getting Started---", "index", "---Prisma 8 (recommended)---", "v8/index", diff --git a/apps/docs/content/docs/(index)/v8/index.mdx b/apps/docs/content/docs/(index)/v8/index.mdx index aa457c63e8..eb45318b09 100644 --- a/apps/docs/content/docs/(index)/v8/index.mdx +++ b/apps/docs/content/docs/(index)/v8/index.mdx @@ -5,7 +5,6 @@ url: /v8 metaTitle: Introduction to Prisma 8 metaDescription: Start here for Prisma 8, the TypeScript-native rebuild of Prisma ORM, now a Release Candidate. Quickstarts, framework guides, and agent prompts. badge: release-candidate -hideSidebar: true --- Prisma 8 is a ground-up rebuild of Prisma ORM, from the runtime and query APIs to the migration flow and project setup. diff --git a/apps/docs/content/docs/ai/prompts/nuxt.mdx b/apps/docs/content/docs/ai/prompts/nuxt.mdx index 57da4d06e3..f3ea49c45c 100644 --- a/apps/docs/content/docs/ai/prompts/nuxt.mdx +++ b/apps/docs/content/docs/ai/prompts/nuxt.mdx @@ -1,7 +1,7 @@ --- title: Nuxt + Prisma description: Step-by-step guide for integrating Prisma ORM and Prisma Postgres in a Nuxt project -url: /docs/ai/prompts/nuxt +url: /ai/prompts/nuxt metaTitle: How to Initialize a Nuxt App with Prisma ORM and Prisma Postgres metaDescription: Step-by-step guide for integrating Prisma ORM and Prisma Postgres in a Nuxt project. --- diff --git a/apps/docs/content/docs/ai/tools/skills.mdx b/apps/docs/content/docs/ai/tools/skills.mdx index c6e2326d44..e52ce03563 100644 --- a/apps/docs/content/docs/ai/tools/skills.mdx +++ b/apps/docs/content/docs/ai/tools/skills.mdx @@ -75,15 +75,15 @@ Covers PostgreSQL, Prisma Postgres, MySQL/MariaDB, SQLite, MongoDB, SQL Server, ### `prisma-postgres` -Prisma Postgres workflows across Console, CLI, Management API, and SDK. +Prisma Postgres workflows across Console, CLI, REST API, and SDK. -Covers `npx create-db`, Console operations, programmatic provisioning via the Management API, and the `@prisma/management-api-sdk`. Use this when creating or managing Prisma Postgres databases. +Covers `npx create-db`, Console operations, programmatic provisioning via the REST API, and the `@prisma/management-api-sdk`. Use this when creating or managing Prisma Postgres databases. ### `prisma-postgres-setup` Gets a new Prisma Postgres database up and connected to your project. -Covers authenticating with a service token, listing regions, creating a project and database via the Management API, obtaining a connection string, and configuring `prisma.config.ts`, the schema, and the driver adapter. Use this when setting up a database or connecting an app to Prisma Postgres. +Covers authenticating with a service token, listing regions, creating a project and database via the REST API, obtaining a connection string, and configuring `prisma.config.ts`, the schema, and the driver adapter. Use this when setting up a database or connecting an app to Prisma Postgres. ### `prisma-compute` diff --git a/apps/docs/content/docs/cli/index.mdx b/apps/docs/content/docs/cli/index.mdx index 8c0f639ab0..019aeb7b4a 100644 --- a/apps/docs/content/docs/cli/index.mdx +++ b/apps/docs/content/docs/cli/index.mdx @@ -24,7 +24,7 @@ npm install prisma --save-dev :::info -This page documents the Prisma 7 CLI that ships in the `prisma` package. Prisma 8 introduces a new, unified Prisma CLI that also includes commands for [Prisma Composer](/composer) and [Prisma Compute](/compute). The Prisma 8 RC publishes it as `prisma@next`. See the [Prisma 8 CLI reference](/cli/v8), the [Composer CLI reference](/composer/cli-reference), and the [Prisma Compute CLI reference](/compute/cli-reference). +This page documents the Prisma 7 CLI that ships in the `prisma` package. Prisma 8 introduces a new, unified Prisma CLI that also includes commands for [Prisma Composer](/composer) and [Prisma Compute](/compute). The Prisma 8 RC publishes it as `prisma@next`. See the [Prisma 8 CLI reference](/cli/v8), the [Composer CLI reference](/cli/v8/composer), and the [Prisma Compute CLI reference](/compute/cli-reference). ::: diff --git a/apps/docs/content/docs/composer/cli-reference.mdx b/apps/docs/content/docs/cli/v8/composer.mdx similarity index 78% rename from apps/docs/content/docs/composer/cli-reference.mdx rename to apps/docs/content/docs/cli/v8/composer.mdx index a2da67d50d..4d5bdb7711 100644 --- a/apps/docs/content/docs/composer/cli-reference.mdx +++ b/apps/docs/content/docs/cli/v8/composer.mdx @@ -1,18 +1,23 @@ --- -title: CLI reference -description: Every Composer command and flag in the Prisma CLI, plus the in-process control API. -url: /composer/cli-reference -metaTitle: CLI reference | Prisma Composer +title: composer +description: Deploy, tear down, and locally run Composer applications. +url: /cli/v8/composer +metaTitle: composer | Prisma 8 CLI metaDescription: Complete reference for the prisma composer command group, including deploy, destroy, dev, and log, their flags, credentials, and the in-process control API. --- -Composer ships as the `composer` command group of the unified Prisma CLI, published as `prisma@next` during the Prisma 8 RC: +Use `composer` commands to deploy and run [Prisma Composer](/composer) applications. Composer ships as the `composer` command group of the unified Prisma CLI, published as `prisma@next` during the Prisma 8 RC. + +Every command takes an `` argument: the module whose default export is the application root, typically `module.ts`. All four commands stream the underlying pipeline's own output to the terminal. + +## Usage ```npm -npx prisma@next composer +npx prisma@next composer deploy module.ts +npx prisma@next composer dev module.ts ``` -Every command takes an `` argument: the module whose default export is the application root, typically `module.ts`. All four commands stream the underlying pipeline's own output to the terminal. +## Commands | Command | Description | | --- | --- | @@ -101,7 +106,16 @@ The Prisma CLI's global flags also apply: `--format`, `--json`, `--log-level`, ` ## The control API -Everything the CLI does is also callable in-process from `@prisma/composer/control`: typed `deploy`, `destroy`, `dev`, and `log` operations that return `{ ok: true, value }` or `{ ok: false, failure }` instead of printing and exiting. The CLI commands are renderers over these operations. See [Driving deploys from code](/composer/deploying#driving-deploys-from-code). +Everything the CLI does is also callable in-process, from `@prisma/composer/control`: typed `deploy`, `destroy`, `dev`, and `log` operations that return structured results instead of printing and exiting. The CLI commands are thin renderers over these same operations, so both surfaces behave the same: + +```ts +import { deploy } from '@prisma/composer/control'; + +const result = await deploy({ entry: 'module.ts', stage: 'pr-42' }); +if (!result.ok) console.error(result.failure.message); +``` + +Operations return `{ ok: true, value }` or `{ ok: false, failure }`. Failures come back as structured errors with a dotted `failure.code` and the same fix-naming `message` the CLI renders. `destroy` takes an explicit target, `{ kind: 'production' }` or `{ kind: 'stage', stage }`. There is no default. The deploy engine's live output still streams to your process's stdio; the operations do not capture it. ## Next steps diff --git a/apps/docs/content/docs/cli/v8/index.mdx b/apps/docs/content/docs/cli/v8/index.mdx index 69c5f00207..0d15e22e5b 100644 --- a/apps/docs/content/docs/cli/v8/index.mdx +++ b/apps/docs/content/docs/cli/v8/index.mdx @@ -82,7 +82,7 @@ The `migration` group also has read-only inspection commands without dedicated p ## Platform commands -The same binary carries the platform command groups. Each group has its own page in this section, except `composer`, which is documented on the [Composer CLI reference](/composer/cli-reference): +The same binary carries the platform command groups. Each group has its own page in this section: | Command group | Purpose | | --- | --- | @@ -95,7 +95,7 @@ The same binary carries the platform command groups. Each group has its own page | [`branch`](/cli/v8/branch) | List platform branches for a project. | | [`postgres`](/cli/v8/postgres) | Create and manage Prisma Postgres databases. | | [`bucket`](/cli/v8/bucket) | Create and manage object-store buckets. | -| [`composer`](/composer/cli-reference) | Run and deploy applications composed from Prisma modules. | +| [`composer`](/cli/v8/composer) | Run and deploy applications composed from Prisma modules. | | [`agent`](/cli/v8/agent) | Install Prisma skills for AI coding agents. | | [`telemetry`](/cli/v8/telemetry) | Show, enable, or disable anonymous CLI telemetry. | | [`feedback`](/cli/v8/feedback) | Send feedback to the Prisma CLI team. | diff --git a/apps/docs/content/docs/cli/v8/meta.json b/apps/docs/content/docs/cli/v8/meta.json index dd68a6dfdc..cb6eb533ff 100644 --- a/apps/docs/content/docs/cli/v8/meta.json +++ b/apps/docs/content/docs/cli/v8/meta.json @@ -39,7 +39,7 @@ "branch", "postgres", "bucket", - "[composer](/composer/cli-reference)", + "composer", "agent", "telemetry", "feedback" diff --git a/apps/docs/content/docs/composer/deploying.mdx b/apps/docs/content/docs/composer/deploying.mdx index 7867abd20f..e47997ed5e 100644 --- a/apps/docs/content/docs/composer/deploying.mdx +++ b/apps/docs/content/docs/composer/deploying.mdx @@ -139,19 +139,10 @@ Behavior you will run into once the app is deployed, and what to do about it: ## Driving deploys from code -Everything the CLI does is also callable in-process, from `@prisma/composer/control`: typed `deploy`, `destroy`, `dev`, and `log` operations that return structured results instead of printing and exiting. The CLI commands are thin renderers over these same operations, so both surfaces behave the same: - -```ts -import { deploy } from '@prisma/composer/control'; - -const result = await deploy({ entry: 'module.ts', stage: 'pr-42' }); -if (!result.ok) console.error(result.failure.message); -``` - -Failures come back as structured errors with a dotted `failure.code` and the same fix-naming `message` the CLI renders. `destroy` takes an explicit target, `{ kind: 'production' }` or `{ kind: 'stage', stage }`. There is no default. The deploy engine's live output still streams to your process's stdio; the operations do not capture it. +Everything the CLI does is also callable in-process, from `@prisma/composer/control`: typed `deploy`, `destroy`, `dev`, and `log` operations that return structured results instead of printing and exiting. The operations and their result shapes are documented in [the control API](/cli/v8/composer#the-control-api) on the `composer` command reference. ## Next steps - [Local development](/composer/local-development): the same pipeline, no credentials. - [Service input](/composer/service-input): how per-stage configuration and secrets travel. -- [CLI reference](/composer/cli-reference): every flag on deploy, destroy, dev, and log. +- [`composer` command reference](/cli/v8/composer): every flag on deploy, destroy, dev, and log. diff --git a/apps/docs/content/docs/composer/index.mdx b/apps/docs/content/docs/composer/index.mdx index 41b8c0351d..768c9fcb92 100644 --- a/apps/docs/content/docs/composer/index.mdx +++ b/apps/docs/content/docs/composer/index.mdx @@ -13,7 +13,7 @@ You do not need Composer to deploy to Prisma Compute. If your application is a s :::info[Early Access] -Prisma Composer is in [Early Access](/console/more/feature-maturity#early-access). APIs and commands can change between releases. The Composer commands ship inside the [Prisma CLI](/composer/cli-reference): run them with `npx prisma@next composer `. +Prisma Composer is in [Early Access](/console/more/feature-maturity#early-access). APIs and commands can change between releases. The Composer commands ship inside the [Prisma CLI](/cli/v8/composer): run them with `npx prisma@next composer `. ::: diff --git a/apps/docs/content/docs/composer/meta.json b/apps/docs/content/docs/composer/meta.json index f3e5907cf2..b68b6d1cba 100644 --- a/apps/docs/content/docs/composer/meta.json +++ b/apps/docs/content/docs/composer/meta.json @@ -19,7 +19,7 @@ "deploying", "porting-an-app", "---Reference---", - "cli-reference", + "[CLI reference](/cli/v8/composer)", "limitations" ] } diff --git a/apps/docs/content/docs/compute/alchemy.mdx b/apps/docs/content/docs/compute/alchemy.mdx index b3df6ac777..f165af1095 100644 --- a/apps/docs/content/docs/compute/alchemy.mdx +++ b/apps/docs/content/docs/compute/alchemy.mdx @@ -21,7 +21,7 @@ npm install alchemy@next effect@beta @effect/platform-bun@beta @effect/platform- printf '\n.alchemy/\n' >> .gitignore ``` -Create a Prisma [service token](/management-api/authentication#service-tokens), then choose how Alchemy should read it. +Create a Prisma [service token](/rest-api/authentication#service-tokens), then choose how Alchemy should read it. To store the token in your local Alchemy profile: diff --git a/apps/docs/content/docs/compute/cli-reference.mdx b/apps/docs/content/docs/compute/cli-reference.mdx index 8996c07bf4..7ede2f0d1b 100644 --- a/apps/docs/content/docs/compute/cli-reference.mdx +++ b/apps/docs/content/docs/compute/cli-reference.mdx @@ -33,7 +33,7 @@ Deployments are created by a git push, the [Console](https://pris.ly/pdp), or [C | [`telemetry`](/cli/v8/telemetry) | Show, enable, or disable anonymous CLI telemetry. | | [`feedback`](/cli/v8/feedback) | Send feedback to the Prisma CLI team. | -The same binary also carries the [Prisma 8 data commands](/cli/v8#data-commands) and the [Composer commands](/composer/cli-reference). +The same binary also carries the [Prisma 8 data commands](/cli/v8#data-commands) and the [Composer commands](/cli/v8/composer). Global flags, the JSON output envelope, and the platform environment variables (`PRISMA_SERVICE_TOKEN`, `PRISMA_WORKSPACE_ID`, `PRISMA_PROJECT_ID`, `PRISMA_SERVICE_ID`) are documented on [CLI configuration](/cli/v8/configuration). @@ -41,5 +41,5 @@ Global flags, the JSON output envelope, and the platform environment variables ( - [Getting started](/compute/getting-started) - [Prisma 8 CLI reference](/cli/v8) for every command and flag -- [Prisma Composer CLI reference](/composer/cli-reference) for CLI-driven multi-service deploys +- [Prisma Composer CLI reference](/cli/v8/composer) for CLI-driven multi-service deploys - [Known limitations](/compute/limitations) diff --git a/apps/docs/content/docs/compute/limitations.mdx b/apps/docs/content/docs/compute/limitations.mdx index ebd92cfbcf..c903e690ad 100644 --- a/apps/docs/content/docs/compute/limitations.mdx +++ b/apps/docs/content/docs/compute/limitations.mdx @@ -11,7 +11,7 @@ Prisma Compute is in [Public Beta](/console/more/feature-maturity#public-beta). ## CLI - The quickest way to run the CLI is `npx prisma@next ` (or `bunx`/`pnpm dlx`), with Node.js 22.18 or newer. -- The platform command groups are `init`, `auth`, `project` (including `project env`), `postgres`, `bucket`, `branch`, `git`, `service` (including `service deployment` and `service domain`), `build`, and `agent`. The same binary also carries the [Prisma 8 data commands](/cli/v8) (`contract`, `db`, `migration`, `migrate`, `ref`) and the [`composer` commands](/composer/cli-reference). There is no `compute` namespace: Compute is managed through the resource groups above. +- The platform command groups are `init`, `auth`, `project` (including `project env`), `postgres`, `bucket`, `branch`, `git`, `service` (including `service deployment` and `service domain`), `build`, and `agent`. The same binary also carries the [Prisma 8 data commands](/cli/v8) (`contract`, `db`, `migration`, `migrate`, `ref`) and the [`composer` commands](/cli/v8/composer). There is no `compute` namespace: Compute is managed through the resource groups above. - There is no standalone `deploy`, `build`, or `run` verb in the unified CLI. Deployments come from a git push, the Console, or Composer; see [Deployments](/compute/deployments). - Committed configuration lives in [`prisma.compute.ts`](/compute/configuration) or `prisma.compute.json`. `.prisma/local.json` is gitignored and only stores your local link to the workspace and project. In CI, set `PRISMA_PROJECT_ID` / `PRISMA_SERVICE_ID` to override the linked project and service. diff --git a/apps/docs/content/docs/compute/object-storage.mdx b/apps/docs/content/docs/compute/object-storage.mdx index 0a3b1e2d5d..618bf60921 100644 --- a/apps/docs/content/docs/compute/object-storage.mdx +++ b/apps/docs/content/docs/compute/object-storage.mdx @@ -6,7 +6,7 @@ metaTitle: Object Storage | Prisma Compute metaDescription: Learn how to create an Object Store bucket, mint scoped access keys, and read, write, and serve files from a Prisma Compute app with any S3-compatible client. --- -Object Store buckets are S3-compatible file storage for your Prisma project: a place for user avatars, PDF exports, uploaded CSVs, generated images. A bucket lives inside the project, next to its [Prisma Postgres](/postgres) databases, and is managed from the same [Console](https://pris.ly/pdp) and [Management API](/management-api), so you don't need a separate storage provider or a second set of credentials. +Object Store buckets are S3-compatible file storage for your Prisma project: a place for user avatars, PDF exports, uploaded CSVs, generated images. A bucket lives inside the project, next to its [Prisma Postgres](/postgres) databases, and is managed from the same [Console](https://pris.ly/pdp) and [REST API](/rest-api), so you don't need a separate storage provider or a second set of credentials. This page walks the whole path: create a bucket, mint an access key, and deploy a Compute route that writes a file and serves it back over a presigned URL. @@ -18,19 +18,19 @@ Buckets speak the S3 API, so any S3 client or SDK works. Compute apps run on Bun - **Access keys are minted per bucket** with a `read` or `read_write` role, enforced by the storage layer: a write with a `read` key is rejected with `AccessDenied`. The `secretAccessKey` is returned exactly once at mint time and is not retrievable afterward. - **Deleting a bucket removes its contents and keys in the same call**, even when it is not empty. There is no empty-the-bucket-first step, so treat deletion as destructive and confirm it deliberately. -You can manage buckets from the [Console](https://pris.ly/pdp), with the CLI's [`bucket` commands](/cli/v8/bucket), or over the [Management API](/management-api) with a [service token](/management-api/authentication). This page uses the API, since that is what you would automate against. The Console and CLI cover the same operations, so the steps map one to one. +You can manage buckets from the [Console](https://pris.ly/pdp), with the CLI's [`bucket` commands](/cli/v8/bucket), or over the [REST API](/rest-api) with a [service token](/rest-api/authentication). This page uses the API, since that is what you would automate against. The Console and CLI cover the same operations, so the steps map one to one. The whole API surface is seven endpoints: | Operation | Endpoint | | ------------------ | ----------------------------------------------------------------------------------------------------- | -| Create a bucket | [`POST /v1/buckets`](/management-api/endpoints/buckets/post-buckets) | -| List buckets | [`GET /v1/buckets`](/management-api/endpoints/buckets/get-buckets) | -| Get a bucket | [`GET /v1/buckets/{bucketId}`](/management-api/endpoints/buckets/get-buckets-by-bucket-id) | -| Delete a bucket | [`DELETE /v1/buckets/{bucketId}`](/management-api/endpoints/buckets/delete-buckets-by-bucket-id) | -| Mint an access key | [`POST /v1/buckets/{bucketId}/keys`](/management-api/endpoints/buckets/post-buckets-by-bucket-id-keys) | -| List keys | [`GET /v1/buckets/{bucketId}/keys`](/management-api/endpoints/buckets/get-buckets-by-bucket-id-keys) | -| Revoke a key | [`DELETE /v1/buckets/{bucketId}/keys/{keyId}`](/management-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id) | +| Create a bucket | [`POST /v1/buckets`](/rest-api/endpoints/buckets/post-buckets) | +| List buckets | [`GET /v1/buckets`](/rest-api/endpoints/buckets/get-buckets) | +| Get a bucket | [`GET /v1/buckets/{bucketId}`](/rest-api/endpoints/buckets/get-buckets-by-bucket-id) | +| Delete a bucket | [`DELETE /v1/buckets/{bucketId}`](/rest-api/endpoints/buckets/delete-buckets-by-bucket-id) | +| Mint an access key | [`POST /v1/buckets/{bucketId}/keys`](/rest-api/endpoints/buckets/post-buckets-by-bucket-id-keys) | +| List keys | [`GET /v1/buckets/{bucketId}/keys`](/rest-api/endpoints/buckets/get-buckets-by-bucket-id-keys) | +| Revoke a key | [`DELETE /v1/buckets/{bucketId}/keys/{keyId}`](/rest-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id) | :::info @@ -41,8 +41,8 @@ Object Store pricing and plan limits are not published yet. Keep that in mind be ## Prerequisites - A Prisma project. The [deploy quickstart](/prisma-compute/deploy) creates one if you don't have one yet. -- A [service token](/management-api/authentication) for the API examples, created in the Console under your workspace's **Settings**, then **Service Tokens**. If you prefer clicking, you can create the bucket and key in the [Console](https://pris.ly/pdp) instead and skip to step 3. -- Your project id, visible in the project's Console URL or one [`GET /v1/projects`](/management-api/endpoints/projects/get-projects) call away. +- A [service token](/rest-api/authentication) for the API examples, created in the Console under your workspace's **Settings**, then **Service Tokens**. If you prefer clicking, you can create the bucket and key in the [Console](https://pris.ly/pdp) instead and skip to step 3. +- Your project id, visible in the project's Console URL or one [`GET /v1/projects`](/rest-api/endpoints/projects/get-projects) call away. ## 1. Create a bucket @@ -156,5 +156,5 @@ This succeeds even when the bucket still contains objects. That makes tearing do - [Environment variables](/compute/environment-variables): scope bucket credentials per branch. - [Branching](/compute/branching): give a preview environment its own bucket next to its own database. - [Image Transformations](/compute/image-transformations): resize and serve images from a bucket with `Bun.s3` sources. -- [Management API: buckets](/management-api/endpoints/buckets/get-buckets): the full endpoint reference. +- [REST API: buckets](/rest-api/endpoints/buckets/get-buckets): the full endpoint reference. - [Your AI agent needs file storage](https://www.prisma.io/blog/object-store-buckets): the launch post, with the full agent-driven lifecycle as one script. diff --git a/apps/docs/content/docs/guides/integrations/github-actions.mdx b/apps/docs/content/docs/guides/integrations/github-actions.mdx index 89da518edf..ee7c754392 100644 --- a/apps/docs/content/docs/guides/integrations/github-actions.mdx +++ b/apps/docs/content/docs/guides/integrations/github-actions.mdx @@ -1,15 +1,15 @@ --- title: GitHub Actions -description: Provision and manage Prisma Postgres databases per pull request using GitHub Actions and Prisma Management API +description: Provision and manage Prisma Postgres databases per pull request using GitHub Actions and Prisma REST API image: /img/guides/prisma-postgres-github-actions-cover.png url: /guides/integrations/github-actions metaTitle: How to provision preview databases with GitHub Actions and Prisma Postgres -metaDescription: Provision and manage Prisma Postgres databases per pull request using GitHub Actions and Prisma Management API +metaDescription: Provision and manage Prisma Postgres databases per pull request using GitHub Actions and Prisma REST API --- ## Overview -This guide shows you how to automatically create and delete [Prisma Postgres](https://www.prisma.io/postgres) databases using GitHub Actions and [the Prisma Postgres management API](https://api.prisma.io/v1/swagger-editor). The setup provisions a new database for every pull request, seeds it with sample data, and the `github-actions` bot leaves a comment with the database name and the status. +This guide shows you how to automatically create and delete [Prisma Postgres](https://www.prisma.io/postgres) databases using GitHub Actions and [the Prisma Postgres REST API](https://api.prisma.io/v1/swagger-editor). The setup provisions a new database for every pull request, seeds it with sample data, and the `github-actions` bot leaves a comment with the database name and the status. ![GitHub Actions comment](/img/guides/github-comment.png) @@ -266,7 +266,7 @@ This workflow uses `us-east-1` as the default region for Prisma Postgres. You ca Paste the following into `.github/workflows/prisma-postgres-management.yml`. This sets up when the workflow runs and provides required environment variables. ```yaml title=".github/workflows/prisma-postgres-management.yml" -name: Prisma Postgres Management API Workflow +name: Prisma Postgres REST API Workflow on: pull_request: @@ -570,7 +570,7 @@ To manage Prisma Postgres databases, you also need a service token. Follow these ### 5.2 Retrieve the project ID where you want to provision Prisma Postgres databases -To avoid conflicts with your development databases, you'll now create a dedicated project specifically for CI workflows. Use the following curl command to create a new Prisma Postgres project using the Prisma Postgres Management API: +To avoid conflicts with your development databases, you'll now create a dedicated project specifically for CI workflows. Use the following curl command to create a new Prisma Postgres project using the Prisma Postgres REST API: ```bash curl -X POST https://api.prisma.io/v1/projects \ @@ -636,7 +636,7 @@ You can test the setup in two ways: **Option 2: Manual trigger** 1. Go to the **Actions** tab in your repository. -2. Select the **Prisma Postgres Management API Workflow** on the left sidebar. +2. Select the **Prisma Postgres REST API Workflow** on the left sidebar. 3. Click the **Run workflow** dropdown 4. Choose `provision` as the action and optionally provide a custom database name. You can also choose `cleanup` to delete an _existing_ database. 5. Click **Run workflow**. diff --git a/apps/docs/content/docs/guides/integrations/vercel-deployment.mdx b/apps/docs/content/docs/guides/integrations/vercel-deployment.mdx index a66fa60da4..828e384823 100644 --- a/apps/docs/content/docs/guides/integrations/vercel-deployment.mdx +++ b/apps/docs/content/docs/guides/integrations/vercel-deployment.mdx @@ -17,7 +17,7 @@ This is the deployment pattern used by AI app builders, agent platforms, no-code - To deploy **your own app** that uses Prisma ORM to Vercel, see [Deploy to Vercel](/orm/prisma-client/deployment/serverless/deploy-to-vercel). - To add a **Prisma Postgres database to an existing Vercel project** via the Marketplace integration, see [Prisma Postgres on Vercel](/guides/postgres/vercel). -- To create and manage Prisma Postgres databases programmatically **outside of Vercel**, see the [Management API](/management-api). +- To create and manage Prisma Postgres databases programmatically **outside of Vercel**, see the [REST API](/rest-api). This guide covers **platforms deploying apps on behalf of their users** with Vercel's deployment API. @@ -640,7 +640,7 @@ No. Prisma Postgres includes connection pooling by default, so apps deployed thr ### Can I provision Prisma Postgres databases without Vercel? -Yes. The [Prisma Postgres Management API](/management-api) lets you create and manage databases directly, which is useful for platforms that host applications elsewhere but still want programmatic database provisioning. +Yes. The [Prisma Postgres REST API](/rest-api) lets you create and manage databases directly, which is useful for platforms that host applications elsewhere but still want programmatic database provisioning. ## Next steps diff --git a/apps/docs/content/docs/guides/v8/upgrade-prisma-orm/meta.json b/apps/docs/content/docs/guides/v8/upgrade-prisma-orm/meta.json index 4290efa555..8b696b5d45 100644 --- a/apps/docs/content/docs/guides/v8/upgrade-prisma-orm/meta.json +++ b/apps/docs/content/docs/guides/v8/upgrade-prisma-orm/meta.json @@ -1,7 +1,4 @@ { "title": "Upgrade Prisma ORM", - "pages": [ - "postgresql", - "mongodb" - ] + "pages": ["postgresql", "mongodb"] } diff --git a/apps/docs/content/docs/management-api/index.mdx b/apps/docs/content/docs/management-api/index.mdx deleted file mode 100644 index 685f86eca0..0000000000 --- a/apps/docs/content/docs/management-api/index.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Management API -description: 'Programmatically manage your Prisma Postgres databases, projects, and workspaces with the Management API' -url: /management-api -metaTitle: 'Prisma Postgres: Management API Reference' -metaDescription: Management API reference documentation for Prisma Postgres. ---- - -## Base URL - -``` -https://api.prisma.io/v1 -``` - -Append an endpoint path to construct the full URL. For example: `https://api.prisma.io/v1/projects/{projectId}` - -An interactive [OpenAPI 3.1 specification](https://api.prisma.io/v1/swagger-editor) is available for exploring endpoints and request/response formats. - -## Getting Started - -- **[Getting Started](/management-api/getting-started)** - Create your first project and database -- **[Authentication](/management-api/authentication)** - OAuth 2.0 and service tokens setup -- **[SDK](/management-api/sdk)** - TypeScript SDK with built-in OAuth and automatic token refresh -- **[Using API Clients](/management-api/api-clients)** - Use with Postman, Insomnia, and Yaak -- **[Partner Integration](/management-api/partner-integration)** - Build integrations that provision and transfer databases diff --git a/apps/docs/content/docs/meta.json b/apps/docs/content/docs/meta.json index c8e0d2773c..6063999a59 100644 --- a/apps/docs/content/docs/meta.json +++ b/apps/docs/content/docs/meta.json @@ -4,16 +4,16 @@ "pages": [ "(index)", "orm", - "postgres", - "compute", "composer", - "cli", - "guides", + "ai", + "compute", + "postgres", "studio", - "accelerate", "query-insights", - "ai", - "platform", - "management-api" + "console", + "guides", + "cli", + "rest-api", + "accelerate" ] } diff --git a/apps/docs/content/docs/orm/meta.json b/apps/docs/content/docs/orm/meta.json index add1600b3a..6906a85416 100644 --- a/apps/docs/content/docs/orm/meta.json +++ b/apps/docs/content/docs/orm/meta.json @@ -2,6 +2,7 @@ "title": "ORM", "defaultOpen": true, "root": true, + "icon": "Waypoints", "pages": [ "---Introduction---", "index", diff --git a/apps/docs/content/docs/postgres/iac/pulumi.mdx b/apps/docs/content/docs/postgres/iac/pulumi.mdx index eab4edd4c8..d3991f55d3 100644 --- a/apps/docs/content/docs/postgres/iac/pulumi.mdx +++ b/apps/docs/content/docs/postgres/iac/pulumi.mdx @@ -34,7 +34,7 @@ Pulumi is a strong fit when: - [Pulumi CLI](https://www.pulumi.com/docs/iac/download-install/) - A Pulumi TypeScript project (create one with `pulumi new typescript`) -- A Prisma service token (see [Management API authentication docs](/management-api/authentication#service-tokens)) +- A Prisma service token (see [REST API authentication docs](/rest-api/authentication#service-tokens)) ## 1. Optional: use Bun for dependency installs diff --git a/apps/docs/content/docs/postgres/iac/terraform.mdx b/apps/docs/content/docs/postgres/iac/terraform.mdx index 4260b6b8cd..51641a3d11 100644 --- a/apps/docs/content/docs/postgres/iac/terraform.mdx +++ b/apps/docs/content/docs/postgres/iac/terraform.mdx @@ -41,7 +41,7 @@ The provider currently supports: - [Terraform](https://developer.hashicorp.com/terraform/install) `>= 1.0` - A Prisma account and workspace in [Prisma Console](https://console.prisma.io) -- A Prisma service token (see [Management API authentication docs](/management-api/authentication#service-tokens)) +- A Prisma service token (see [REST API authentication docs](/rest-api/authentication#service-tokens)) ## 1. Set your service token diff --git a/apps/docs/content/docs/postgres/meta.json b/apps/docs/content/docs/postgres/meta.json index d6705bbab4..ab577e0a83 100644 --- a/apps/docs/content/docs/postgres/meta.json +++ b/apps/docs/content/docs/postgres/meta.json @@ -1,7 +1,7 @@ { "title": "Postgres", "root": true, - "icon": "TriangleDashed", + "icon": "Database", "pages": [ "---Introduction---", "index", diff --git a/apps/docs/content/docs/query-insights/meta.json b/apps/docs/content/docs/query-insights/meta.json index 4e2508a762..5129f0e3f5 100644 --- a/apps/docs/content/docs/query-insights/meta.json +++ b/apps/docs/content/docs/query-insights/meta.json @@ -1,5 +1,6 @@ { "title": "Query Insights", "root": true, + "icon": "Lightbulb", "pages": ["---Introduction---", "index"] } diff --git a/apps/docs/content/docs/management-api/api-clients.mdx b/apps/docs/content/docs/rest-api/api-clients.mdx similarity index 92% rename from apps/docs/content/docs/management-api/api-clients.mdx rename to apps/docs/content/docs/rest-api/api-clients.mdx index 217d9cca73..a304f68574 100644 --- a/apps/docs/content/docs/management-api/api-clients.mdx +++ b/apps/docs/content/docs/rest-api/api-clients.mdx @@ -1,14 +1,14 @@ --- title: Using API Clients -description: 'Use the Management API with popular API clients like Postman, Insomnia, and Yaak' -url: /management-api/api-clients -metaTitle: How to use the Management API with API Clients -metaDescription: Learn how to use the Management API with API Clients +description: 'Use the REST API with popular API clients like Postman, Insomnia, and Yaak' +url: /rest-api/api-clients +metaTitle: How to use the REST API with API Clients +metaDescription: Learn how to use the REST API with API Clients --- -This guide shows you how to configure popular API clients to work with the Management API using OAuth 2.0 authentication. +This guide shows you how to configure popular API clients to work with the REST API using OAuth 2.0 authentication. -Download the Postman collection to import all endpoints with OAuth2 auth pre-configured. Compatible with Postman, Yaak, Insomnia, and other clients that support the Postman Collection v2.1 format. +Download the Postman collection to import all endpoints with OAuth2 auth pre-configured. Compatible with Postman, Yaak, Insomnia, and other clients that support the Postman Collection v2.1 format. ## Postman @@ -52,7 +52,7 @@ Now you'll set up authentication in Postman: | Parameter | Value | | -------------------- | ------------------------------------ | -| Token Name | Management API Token | +| Token Name | REST API Token | | Grant Type | Authorization Code | | Callback URL | `https://oauth.pstmn.io/v1/callback` | | Authorize in Browser | `true` _(checked)_ | diff --git a/apps/docs/content/docs/management-api/authentication.mdx b/apps/docs/content/docs/rest-api/authentication.mdx similarity index 89% rename from apps/docs/content/docs/management-api/authentication.mdx rename to apps/docs/content/docs/rest-api/authentication.mdx index 17e15cce48..3f8b40c6c0 100644 --- a/apps/docs/content/docs/management-api/authentication.mdx +++ b/apps/docs/content/docs/rest-api/authentication.mdx @@ -1,12 +1,12 @@ --- title: Authentication -description: Learn how to authenticate with the Prisma Management API using service tokens or OAuth 2.0 -metaTitle: Management API Authentication | Service Tokens & OAuth 2.0 -metaDescription: 'Authenticate with Prisma Management API: service tokens for scripts and CI/CD, or OAuth 2.0 with PKCE for user-facing apps. Bearer token in Authorization header.' -url: /management-api/authentication +description: Learn how to authenticate with the Prisma REST API using service tokens or OAuth 2.0 +metaTitle: REST API Authentication | Service Tokens & OAuth 2.0 +metaDescription: 'Authenticate with Prisma REST API: service tokens for scripts and CI/CD, or OAuth 2.0 with PKCE for user-facing apps. Bearer token in Authorization header.' +url: /rest-api/authentication --- -The Management API supports two authentication methods: +The REST API supports two authentication methods: - **Service Tokens** - Simple bearer tokens for server-to-server integrations - **OAuth 2.0** - For user-facing applications requiring user consent @@ -149,7 +149,7 @@ curl -X POST https://auth.prisma.io/token \ -d "redirect_uri=$REDIRECT_URI" ``` -The response will include an access token that can be used to make authenticated requests to the Management API: +The response will include an access token that can be used to make authenticated requests to the REST API: ```json { @@ -187,8 +187,8 @@ Refresh tokens use single-use rotation with replay attack detection. When you ex ### Using OAuth with the SDK -The SDK handles the OAuth flow automatically. See the [SDK documentation](/management-api/sdk#oauth-authentication-flow) for implementation details. +The SDK handles the OAuth flow automatically. See the [SDK documentation](/rest-api/sdk#oauth-authentication-flow) for implementation details. ## Using API Clients -You can also authenticate using popular API clients like Postman, Insomnia, or Yaak. See the [Using API Clients](/management-api/api-clients) guide for step-by-step instructions. +You can also authenticate using popular API clients like Postman, Insomnia, or Yaak. See the [Using API Clients](/rest-api/api-clients) guide for step-by-step instructions. diff --git a/apps/docs/content/docs/management-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id.mdx b/apps/docs/content/docs/rest-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id.mdx index c384be596b..26427edb01 100644 --- a/apps/docs/content/docs/management-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Revokes and deletes the bucket key with the given ID. path: '/v1/buckets/{bucketId}/keys/{keyId}' -url: /management-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id +url: /rest-api/endpoints/buckets/delete-buckets-by-bucket-id-keys-by-key-id metaTitle: 'DELETE /v1/buckets/{bucketId}/keys/{keyId} | Delete bucket key' -metaDescription: 'Management API: Revokes and deletes the bucket key with the given ID.' +metaDescription: 'REST API: Revokes and deletes the bucket key with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Revokes and deletes the bucket key with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/buckets/delete-buckets-by-bucket-id.mdx b/apps/docs/content/docs/rest-api/endpoints/buckets/delete-buckets-by-bucket-id.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/buckets/delete-buckets-by-bucket-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/buckets/delete-buckets-by-bucket-id.mdx index 440a2defc1..67c61a7a98 100644 --- a/apps/docs/content/docs/management-api/endpoints/buckets/delete-buckets-by-bucket-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/buckets/delete-buckets-by-bucket-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: 'Permanently deletes the bucket with the given ID, all objects stored in it, and all its access keys. This action cannot be undone.' path: '/v1/buckets/{bucketId}' -url: /management-api/endpoints/buckets/delete-buckets-by-bucket-id +url: /rest-api/endpoints/buckets/delete-buckets-by-bucket-id metaTitle: 'DELETE /v1/buckets/{bucketId} | Delete bucket' -metaDescription: 'Management API: Permanently deletes the bucket with the given ID, all objects stored in it, and all its access keys. This action cannot be undone.' +metaDescription: 'REST API: Permanently deletes the bucket with the given ID, all objects stored in it, and all its access keys. This action cannot be undone.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Permanently deletes the bucket with the given ID, all objects stored in it, and all its access keys. This action cannot be undone. - + diff --git a/apps/docs/content/docs/management-api/endpoints/buckets/get-buckets-by-bucket-id-keys.mdx b/apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets-by-bucket-id-keys.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/buckets/get-buckets-by-bucket-id-keys.mdx rename to apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets-by-bucket-id-keys.mdx index 1727c6594a..e0e57e5526 100644 --- a/apps/docs/content/docs/management-api/endpoints/buckets/get-buckets-by-bucket-id-keys.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets-by-bucket-id-keys.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns all access keys for the given bucket. path: '/v1/buckets/{bucketId}/keys' -url: /management-api/endpoints/buckets/get-buckets-by-bucket-id-keys +url: /rest-api/endpoints/buckets/get-buckets-by-bucket-id-keys metaTitle: 'GET /v1/buckets/{bucketId}/keys | List bucket keys' -metaDescription: 'Management API: Returns all access keys for the given bucket.' +metaDescription: 'REST API: Returns all access keys for the given bucket.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all access keys for the given bucket. - + diff --git a/apps/docs/content/docs/management-api/endpoints/buckets/get-buckets-by-bucket-id.mdx b/apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets-by-bucket-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/buckets/get-buckets-by-bucket-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets-by-bucket-id.mdx index d907670cd3..d02ba25429 100644 --- a/apps/docs/content/docs/management-api/endpoints/buckets/get-buckets-by-bucket-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets-by-bucket-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns the bucket with the given ID. path: '/v1/buckets/{bucketId}' -url: /management-api/endpoints/buckets/get-buckets-by-bucket-id +url: /rest-api/endpoints/buckets/get-buckets-by-bucket-id metaTitle: 'GET /v1/buckets/{bucketId} | Get bucket' -metaDescription: 'Management API: Returns the bucket with the given ID.' +metaDescription: 'REST API: Returns the bucket with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the bucket with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/buckets/get-buckets.mdx b/apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets.mdx similarity index 70% rename from apps/docs/content/docs/management-api/endpoints/buckets/get-buckets.mdx rename to apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets.mdx index 7fba36bc0b..305c061416 100644 --- a/apps/docs/content/docs/management-api/endpoints/buckets/get-buckets.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/buckets/get-buckets.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns all object-store buckets the token has access to. Optionally filter by project ID. path: /v1/buckets -url: /management-api/endpoints/buckets/get-buckets +url: /rest-api/endpoints/buckets/get-buckets metaTitle: GET /v1/buckets | List buckets -metaDescription: 'Management API: Returns all object-store buckets the token has access to. Optionally filter by project ID.' +metaDescription: 'REST API: Returns all object-store buckets the token has access to. Optionally filter by project ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all object-store buckets the token has access to. Optionally filter by project ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/buckets/post-buckets-by-bucket-id-keys.mdx b/apps/docs/content/docs/rest-api/endpoints/buckets/post-buckets-by-bucket-id-keys.mdx similarity index 70% rename from apps/docs/content/docs/management-api/endpoints/buckets/post-buckets-by-bucket-id-keys.mdx rename to apps/docs/content/docs/rest-api/endpoints/buckets/post-buckets-by-bucket-id-keys.mdx index 38bb71dc12..8369cdbc59 100644 --- a/apps/docs/content/docs/management-api/endpoints/buckets/post-buckets-by-bucket-id-keys.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/buckets/post-buckets-by-bucket-id-keys.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new access key for the given bucket. The `secretAccessKey` field is returned exactly once in this response and is never stored — copy it immediately. path: '/v1/buckets/{bucketId}/keys' -url: /management-api/endpoints/buckets/post-buckets-by-bucket-id-keys +url: /rest-api/endpoints/buckets/post-buckets-by-bucket-id-keys metaTitle: 'POST /v1/buckets/{bucketId}/keys | Create bucket key' -metaDescription: 'Management API: Creates a new access key for the given bucket. The `secretAccessKey` field is returned exactly once in this response and is never stored — copy it immediately.' +metaDescription: 'REST API: Creates a new access key for the given bucket. The `secretAccessKey` field is returned exactly once in this response and is never stored — copy it immediately.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new access key for the given bucket. The `secretAccessKey` field is returned exactly once in this response and is never stored — copy it immediately. - + diff --git a/apps/docs/content/docs/management-api/endpoints/buckets/post-buckets.mdx b/apps/docs/content/docs/rest-api/endpoints/buckets/post-buckets.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/buckets/post-buckets.mdx rename to apps/docs/content/docs/rest-api/endpoints/buckets/post-buckets.mdx index a3aad7e33d..82e0be10a7 100644 --- a/apps/docs/content/docs/management-api/endpoints/buckets/post-buckets.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/buckets/post-buckets.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new object-store bucket in the specified project. path: /v1/buckets -url: /management-api/endpoints/buckets/post-buckets +url: /rest-api/endpoints/buckets/post-buckets metaTitle: POST /v1/buckets | Create bucket -metaDescription: 'Management API: Creates a new object-store bucket in the specified project.' +metaDescription: 'REST API: Creates a new object-store bucket in the specified project.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new object-store bucket in the specified project. - + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/connections/delete-connections-by-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/connections/delete-connections-by-id.mdx index e005accaf6..1168436b22 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/connections/delete-connections-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Deletes the connection with the given ID. path: '/v1/connections/{id}' -url: /management-api/endpoints/connections/delete-connections-by-id +url: /rest-api/endpoints/connections/delete-connections-by-id metaTitle: 'DELETE /v1/connections/{id} | Delete connection' -metaDescription: 'Management API: Deletes the connection with the given ID.' +metaDescription: 'REST API: Deletes the connection with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Deletes the connection with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/connections/get-connections-by-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/connections/get-connections-by-id.mdx index 1cc3cd0e93..cf720793ed 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/connections/get-connections-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns the connection with the given ID. path: '/v1/connections/{id}' -url: /management-api/endpoints/connections/get-connections-by-id +url: /rest-api/endpoints/connections/get-connections-by-id metaTitle: 'GET /v1/connections/{id} | Get connection' -metaDescription: 'Management API: Returns the connection with the given ID.' +metaDescription: 'REST API: Returns the connection with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the connection with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx b/apps/docs/content/docs/rest-api/endpoints/connections/get-connections.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx rename to apps/docs/content/docs/rest-api/endpoints/connections/get-connections.mdx index e701da7394..99fcea1573 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/connections/get-connections.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: 'Returns all connections the actor has access to, with optional database filter.' path: /v1/connections -url: /management-api/endpoints/connections/get-connections +url: /rest-api/endpoints/connections/get-connections metaTitle: GET /v1/connections | List connections -metaDescription: 'Management API: Returns all connections the actor has access to, with optional database filter.' +metaDescription: 'REST API: Returns all connections the actor has access to, with optional database filter.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all connections the actor has access to, with optional database filter. - + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/post-connections-by-id-rotate.mdx b/apps/docs/content/docs/rest-api/endpoints/connections/post-connections-by-id-rotate.mdx similarity index 70% rename from apps/docs/content/docs/management-api/endpoints/connections/post-connections-by-id-rotate.mdx rename to apps/docs/content/docs/rest-api/endpoints/connections/post-connections-by-id-rotate.mdx index ae7187406f..cb83fcd189 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/post-connections-by-id-rotate.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/connections/post-connections-by-id-rotate.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort. path: '/v1/connections/{id}/rotate' -url: /management-api/endpoints/connections/post-connections-by-id-rotate +url: /rest-api/endpoints/connections/post-connections-by-id-rotate metaTitle: 'POST /v1/connections/{id}/rotate | Rotate connection credentials' -metaDescription: 'Management API: Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort.' +metaDescription: 'REST API: Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Generates new credentials for the connection with the given ID. Revocation of the previous credentials is best-effort. - + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx b/apps/docs/content/docs/rest-api/endpoints/connections/post-connections.mdx similarity index 68% rename from apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx rename to apps/docs/content/docs/rest-api/endpoints/connections/post-connections.mdx index bf3c0b7e82..5104d21683 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/connections/post-connections.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new connection for the specified database. path: /v1/connections -url: /management-api/endpoints/connections/post-connections +url: /rest-api/endpoints/connections/post-connections metaTitle: POST /v1/connections | Create connection -metaDescription: 'Management API: Creates a new connection for the specified database.' +metaDescription: 'REST API: Creates a new connection for the specified database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new connection for the specified database. - + diff --git a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx b/apps/docs/content/docs/rest-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx similarity index 66% rename from apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx rename to apps/docs/content/docs/rest-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx index fcb96f1a67..39372bd544 100644 --- a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns backups for the specified database. path: '/v1/databases/{databaseId}/backups' -url: /management-api/endpoints/database-backups/get-databases-by-database-id-backups +url: /rest-api/endpoints/database-backups/get-databases-by-database-id-backups metaTitle: 'GET /v1/databases/{databaseId}/backups | Get list of backups' -metaDescription: 'Management API: Returns backups for the specified database.' +metaDescription: 'REST API: Returns backups for the specified database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns backups for the specified database. - + diff --git a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx b/apps/docs/content/docs/rest-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx rename to apps/docs/content/docs/rest-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx index e03e0cfe1a..1abef39ca3 100644 --- a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns usage metrics for the specified database. path: '/v1/databases/{databaseId}/usage' -url: /management-api/endpoints/database-usage/get-databases-by-database-id-usage +url: /rest-api/endpoints/database-usage/get-databases-by-database-id-usage metaTitle: 'GET /v1/databases/{databaseId}/usage | Get database usage metrics' -metaDescription: 'Management API: Returns usage metrics for the specified database.' +metaDescription: 'REST API: Returns usage metrics for the specified database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns usage metrics for the specified database. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx b/apps/docs/content/docs/rest-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx index 632f721123..47e9c8765d 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns all connections for the given database. path: '/v1/databases/{databaseId}/connections' -url: /management-api/endpoints/databases-connections/get-databases-by-database-id-connections +url: /rest-api/endpoints/databases-connections/get-databases-by-database-id-connections metaTitle: 'GET /v1/databases/{databaseId}/connections | Get list of database connections' -metaDescription: 'Management API: Returns all connections for the given database.' +metaDescription: 'REST API: Returns all connections for the given database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all connections for the given database. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx b/apps/docs/content/docs/rest-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx index 50d0f41307..90510e47b3 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new connection string for the given database. path: '/v1/databases/{databaseId}/connections' -url: /management-api/endpoints/databases-connections/post-databases-by-database-id-connections +url: /rest-api/endpoints/databases-connections/post-databases-by-database-id-connections metaTitle: 'POST /v1/databases/{databaseId}/connections | Create database connection string' -metaDescription: 'Management API: Creates a new connection string for the given database.' +metaDescription: 'REST API: Creates a new connection string for the given database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new connection string for the given database. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/delete-databases-by-database-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/delete-databases-by-database-id.mdx index 2f9342b51c..78bfc05374 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/delete-databases-by-database-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Deletes the database with the given ID. path: '/v1/databases/{databaseId}' -url: /management-api/endpoints/databases/delete-databases-by-database-id +url: /rest-api/endpoints/databases/delete-databases-by-database-id metaTitle: 'DELETE /v1/databases/{databaseId} | Delete database' -metaDescription: 'Management API: Deletes the database with the given ID.' +metaDescription: 'REST API: Deletes the database with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Deletes the database with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/get-databases-by-database-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/get-databases-by-database-id.mdx index 47f9a36c54..95cf3a251c 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/get-databases-by-database-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns the database with the given ID. path: '/v1/databases/{databaseId}' -url: /management-api/endpoints/databases/get-databases-by-database-id +url: /rest-api/endpoints/databases/get-databases-by-database-id metaTitle: 'GET /v1/databases/{databaseId} | Get database' -metaDescription: 'Management API: Returns the database with the given ID.' +metaDescription: 'REST API: Returns the database with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the database with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/get-databases.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/get-databases.mdx index 72c90ced63..d9f1fc8f03 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/get-databases.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns all databases the token has access to. Optionally filter by project ID. path: /v1/databases -url: /management-api/endpoints/databases/get-databases +url: /rest-api/endpoints/databases/get-databases metaTitle: GET /v1/databases | List databases -metaDescription: 'Management API: Returns all databases the token has access to. Optionally filter by project ID.' +metaDescription: 'REST API: Returns all databases the token has access to. Optionally filter by project ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all databases the token has access to. Optionally filter by project ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/get-projects-by-project-id-databases.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/get-projects-by-project-id-databases.mdx index 8e05672345..c339dc3a11 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/get-projects-by-project-id-databases.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns databases for the given project. path: '/v1/projects/{projectId}/databases' -url: /management-api/endpoints/databases/get-projects-by-project-id-databases +url: /rest-api/endpoints/databases/get-projects-by-project-id-databases metaTitle: 'GET /v1/projects/{projectId}/databases | Get list of databases' -metaDescription: 'Management API: Returns databases for the given project.' +metaDescription: 'REST API: Returns databases for the given project.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns databases for the given project. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/patch-databases-by-database-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/patch-databases-by-database-id.mdx index 4a0712b314..b48e24ec2a 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/patch-databases-by-database-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Updates the database with the given ID. path: '/v1/databases/{databaseId}' -url: /management-api/endpoints/databases/patch-databases-by-database-id +url: /rest-api/endpoints/databases/patch-databases-by-database-id metaTitle: 'PATCH /v1/databases/{databaseId} | Update database' -metaDescription: 'Management API: Updates the database with the given ID.' +metaDescription: 'REST API: Updates the database with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Updates the database with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx similarity index 72% rename from apps/docs/content/docs/management-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx index 86ec1b0ab5..9c1a50175b 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/post-databases-by-target-database-id-restore.mdx @@ -13,9 +13,9 @@ _openapi: Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced. path: '/v1/databases/{targetDatabaseId}/restore' -url: /management-api/endpoints/databases/post-databases-by-target-database-id-restore +url: /rest-api/endpoints/databases/post-databases-by-target-database-id-restore metaTitle: 'POST /v1/databases/{targetDatabaseId}/restore | Restore database (destructive)' -metaDescription: 'Management API: **Destructive operation** — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding. Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.' +metaDescription: 'REST API: **Destructive operation** — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding. Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} @@ -24,4 +24,4 @@ metaDescription: 'Management API: **Destructive operation** — this immediately Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/post-databases.mdx similarity index 68% rename from apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/post-databases.mdx index 584afa8ebc..406f8e690d 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/post-databases.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new database in the specified project. path: /v1/databases -url: /management-api/endpoints/databases/post-databases +url: /rest-api/endpoints/databases/post-databases metaTitle: POST /v1/databases | Create database -metaDescription: 'Management API: Creates a new database in the specified project.' +metaDescription: 'REST API: Creates a new database in the specified project.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new database in the specified project. - + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx b/apps/docs/content/docs/rest-api/endpoints/databases/post-projects-by-project-id-databases.mdx similarity index 66% rename from apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx rename to apps/docs/content/docs/rest-api/endpoints/databases/post-projects-by-project-id-databases.mdx index 5145461545..521cb197f8 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/databases/post-projects-by-project-id-databases.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new database for the given project. path: '/v1/projects/{projectId}/databases' -url: /management-api/endpoints/databases/post-projects-by-project-id-databases +url: /rest-api/endpoints/databases/post-projects-by-project-id-databases metaTitle: 'POST /v1/projects/{projectId}/databases | Create database' -metaDescription: 'Management API: Creates a new database for the given project.' +metaDescription: 'REST API: Creates a new database for the given project.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new database for the given project. - + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/integrations/delete-integrations-by-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/integrations/delete-integrations-by-id.mdx index 1834d70d96..9f56179676 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/integrations/delete-integrations-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Revokes the integration tokens by integration ID. path: '/v1/integrations/{id}' -url: /management-api/endpoints/integrations/delete-integrations-by-id +url: /rest-api/endpoints/integrations/delete-integrations-by-id metaTitle: 'DELETE /v1/integrations/{id} | Delete integration' -metaDescription: 'Management API: Revokes the integration tokens by integration ID.' +metaDescription: 'REST API: Revokes the integration tokens by integration ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Revokes the integration tokens by integration ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx b/apps/docs/content/docs/rest-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx similarity index 66% rename from apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx index 5e01a165b3..82a259a0d4 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Revokes the integration tokens with the given client ID. path: '/v1/workspaces/{workspaceId}/integrations/{clientId}' -url: /management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id +url: /rest-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id metaTitle: 'DELETE /v1/workspaces/{workspaceId}/integrations/{clientId} | Revoke integration tokens' -metaDescription: 'Management API: Revokes the integration tokens with the given client ID.' +metaDescription: 'REST API: Revokes the integration tokens with the given client ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Revokes the integration tokens with the given client ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/integrations/get-integrations-by-id.mdx similarity index 68% rename from apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/integrations/get-integrations-by-id.mdx index eb5ae6cc2e..828ba2600e 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/integrations/get-integrations-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns a single integration by its ID. path: '/v1/integrations/{id}' -url: /management-api/endpoints/integrations/get-integrations-by-id +url: /rest-api/endpoints/integrations/get-integrations-by-id metaTitle: 'GET /v1/integrations/{id} | Get integration by ID' -metaDescription: 'Management API: Returns a single integration by its ID.' +metaDescription: 'REST API: Returns a single integration by its ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns a single integration by its ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx b/apps/docs/content/docs/rest-api/endpoints/integrations/get-integrations.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx rename to apps/docs/content/docs/rest-api/endpoints/integrations/get-integrations.mdx index d5a9a79bb8..e8e234de11 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/integrations/get-integrations.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns integrations filtered by workspace ID. path: /v1/integrations -url: /management-api/endpoints/integrations/get-integrations +url: /rest-api/endpoints/integrations/get-integrations metaTitle: GET /v1/integrations | Get list of integrations -metaDescription: 'Management API: Returns integrations filtered by workspace ID.' +metaDescription: 'REST API: Returns integrations filtered by workspace ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns integrations filtered by workspace ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx b/apps/docs/content/docs/rest-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx similarity index 66% rename from apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx rename to apps/docs/content/docs/rest-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx index 1c0ff8a207..4499f6ea7d 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns integrations for the given workspace. path: '/v1/workspaces/{workspaceId}/integrations' -url: /management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations +url: /rest-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations metaTitle: 'GET /v1/workspaces/{workspaceId}/integrations | Get list of integrations' -metaDescription: 'Management API: Returns integrations for the given workspace.' +metaDescription: 'REST API: Returns integrations for the given workspace.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns integrations for the given workspace. - + diff --git a/apps/docs/content/docs/management-api/endpoints/meta.json b/apps/docs/content/docs/rest-api/endpoints/meta.json similarity index 100% rename from apps/docs/content/docs/management-api/endpoints/meta.json rename to apps/docs/content/docs/rest-api/endpoints/meta.json diff --git a/apps/docs/content/docs/management-api/endpoints/misc/get-me.mdx b/apps/docs/content/docs/rest-api/endpoints/misc/get-me.mdx similarity index 72% rename from apps/docs/content/docs/management-api/endpoints/misc/get-me.mdx rename to apps/docs/content/docs/rest-api/endpoints/misc/get-me.mdx index d9df09ce76..6b47a95d46 100644 --- a/apps/docs/content/docs/management-api/endpoints/misc/get-me.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/misc/get-me.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: 'Returns the user, workspace, and credential represented by the current token.' path: /v1/me -url: /management-api/endpoints/misc/get-me +url: /rest-api/endpoints/misc/get-me metaTitle: GET /v1/me | Get current authenticated principal -metaDescription: 'Management API: Returns the user, workspace, and credential represented by the current token.' +metaDescription: 'REST API: Returns the user, workspace, and credential represented by the current token.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the user, workspace, and credential represented by the current token. - + diff --git a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx b/apps/docs/content/docs/rest-api/endpoints/misc/get-regions-accelerate.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx rename to apps/docs/content/docs/rest-api/endpoints/misc/get-regions-accelerate.mdx index 53d9be6d61..eecb3b4102 100644 --- a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/misc/get-regions-accelerate.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns all available regions for Prisma Accelerate. path: /v1/regions/accelerate -url: /management-api/endpoints/misc/get-regions-accelerate +url: /rest-api/endpoints/misc/get-regions-accelerate metaTitle: GET /v1/regions/accelerate | Get Prisma Accelerate regions -metaDescription: 'Management API: Returns all available regions for Prisma Accelerate.' +metaDescription: 'REST API: Returns all available regions for Prisma Accelerate.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all available regions for Prisma Accelerate. - + diff --git a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx b/apps/docs/content/docs/rest-api/endpoints/misc/get-regions-postgres.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx rename to apps/docs/content/docs/rest-api/endpoints/misc/get-regions-postgres.mdx index e801a01325..966296e23b 100644 --- a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/misc/get-regions-postgres.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns all available regions for Prisma Postgres. path: /v1/regions/postgres -url: /management-api/endpoints/misc/get-regions-postgres +url: /rest-api/endpoints/misc/get-regions-postgres metaTitle: GET /v1/regions/postgres | Get Prisma Postgres regions -metaDescription: 'Management API: Returns all available regions for Prisma Postgres.' +metaDescription: 'REST API: Returns all available regions for Prisma Postgres.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all available regions for Prisma Postgres. - + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/projects/delete-projects-by-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/projects/delete-projects-by-id.mdx index 55c911bba4..bde8904fcb 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/projects/delete-projects-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Deletes the project with the given ID. path: '/v1/projects/{id}' -url: /management-api/endpoints/projects/delete-projects-by-id +url: /rest-api/endpoints/projects/delete-projects-by-id metaTitle: 'DELETE /v1/projects/{id} | Delete project' -metaDescription: 'Management API: Deletes the project with the given ID.' +metaDescription: 'REST API: Deletes the project with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Deletes the project with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/projects/get-projects-by-id.mdx similarity index 68% rename from apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/projects/get-projects-by-id.mdx index e57b7d3455..3ba99333a3 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/projects/get-projects-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns the project with the given ID. path: '/v1/projects/{id}' -url: /management-api/endpoints/projects/get-projects-by-id +url: /rest-api/endpoints/projects/get-projects-by-id metaTitle: 'GET /v1/projects/{id} | Get project' -metaDescription: 'Management API: Returns the project with the given ID.' +metaDescription: 'REST API: Returns the project with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the project with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx b/apps/docs/content/docs/rest-api/endpoints/projects/get-projects.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx rename to apps/docs/content/docs/rest-api/endpoints/projects/get-projects.mdx index 43af5e57b7..19695f4568 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/projects/get-projects.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns the list of projects the token has access to. path: /v1/projects -url: /management-api/endpoints/projects/get-projects +url: /rest-api/endpoints/projects/get-projects metaTitle: GET /v1/projects | Get list of projects -metaDescription: 'Management API: Returns the list of projects the token has access to.' +metaDescription: 'REST API: Returns the list of projects the token has access to.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the list of projects the token has access to. - + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/projects/patch-projects-by-id.mdx similarity index 68% rename from apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/projects/patch-projects-by-id.mdx index 3bf173a402..4cb9793b53 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/projects/patch-projects-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Updates the project with the given ID. path: '/v1/projects/{id}' -url: /management-api/endpoints/projects/patch-projects-by-id +url: /rest-api/endpoints/projects/patch-projects-by-id metaTitle: 'PATCH /v1/projects/{id} | Update project' -metaDescription: 'Management API: Updates the project with the given ID.' +metaDescription: 'REST API: Updates the project with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Updates the project with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx b/apps/docs/content/docs/rest-api/endpoints/projects/post-projects-by-id-transfer.mdx similarity index 68% rename from apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx rename to apps/docs/content/docs/rest-api/endpoints/projects/post-projects-by-id-transfer.mdx index 22da5c5155..afcf9c6231 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/projects/post-projects-by-id-transfer.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Transfer the project with the given ID to the new owner's workspace path: '/v1/projects/{id}/transfer' -url: /management-api/endpoints/projects/post-projects-by-id-transfer +url: /rest-api/endpoints/projects/post-projects-by-id-transfer metaTitle: 'POST /v1/projects/{id}/transfer | Transfer project' -metaDescription: 'Management API: Transfer the project with the given ID to the new owner''s workspace' +metaDescription: 'REST API: Transfer the project with the given ID to the new owner''s workspace' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Transfer the project with the given ID to the new owner's workspace - + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx b/apps/docs/content/docs/rest-api/endpoints/projects/post-projects.mdx similarity index 70% rename from apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx rename to apps/docs/content/docs/rest-api/endpoints/projects/post-projects.mdx index 28cd0e92d0..6a3a9c4767 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/projects/post-projects.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new project with a postgres database. path: /v1/projects -url: /management-api/endpoints/projects/post-projects +url: /rest-api/endpoints/projects/post-projects metaTitle: POST /v1/projects | Create project with a postgres database -metaDescription: 'Management API: Creates a new project with a postgres database.' +metaDescription: 'REST API: Creates a new project with a postgres database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new project with a postgres database. - + diff --git a/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx b/apps/docs/content/docs/rest-api/endpoints/regions/get-regions.mdx similarity index 70% rename from apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx rename to apps/docs/content/docs/rest-api/endpoints/regions/get-regions.mdx index afb8a502e3..be2bca1792 100644 --- a/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/regions/get-regions.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns all available regions across products. Optionally filter by product. path: /v1/regions -url: /management-api/endpoints/regions/get-regions +url: /rest-api/endpoints/regions/get-regions metaTitle: GET /v1/regions | Get all regions -metaDescription: 'Management API: Returns all available regions across products. Optionally filter by product.' +metaDescription: 'REST API: Returns all available regions across products. Optionally filter by product.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all available regions across products. Optionally filter by product. - + diff --git a/apps/docs/content/docs/management-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id.mdx b/apps/docs/content/docs/rest-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id.mdx similarity index 65% rename from apps/docs/content/docs/management-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id.mdx index 55fbe675c4..8b37f68f8b 100644 --- a/apps/docs/content/docs/management-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Revokes the service token with the given ID by deleting it. path: '/v1/workspaces/{workspaceId}/service-tokens/{serviceTokenId}' -url: /management-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id +url: /rest-api/endpoints/service-tokens/delete-workspaces-by-workspace-id-service-tokens-by-service-token-id metaTitle: 'DELETE /v1/workspaces/{workspaceId}/service-tokens/{serviceTokenId} | Delete service token' -metaDescription: 'Management API: Revokes the service token with the given ID by deleting it.' +metaDescription: 'REST API: Revokes the service token with the given ID by deleting it.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Revokes the service token with the given ID by deleting it. - + diff --git a/apps/docs/content/docs/management-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens.mdx b/apps/docs/content/docs/rest-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens.mdx rename to apps/docs/content/docs/rest-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens.mdx index 35489876d7..b114fc47a6 100644 --- a/apps/docs/content/docs/management-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: 'Returns the service tokens for the given workspace, newest first.' path: '/v1/workspaces/{workspaceId}/service-tokens' -url: /management-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens +url: /rest-api/endpoints/service-tokens/get-workspaces-by-workspace-id-service-tokens metaTitle: 'GET /v1/workspaces/{workspaceId}/service-tokens | List service tokens' -metaDescription: 'Management API: Returns the service tokens for the given workspace, newest first.' +metaDescription: 'REST API: Returns the service tokens for the given workspace, newest first.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the service tokens for the given workspace, newest first. - + diff --git a/apps/docs/content/docs/management-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens.mdx b/apps/docs/content/docs/rest-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens.mdx rename to apps/docs/content/docs/rest-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens.mdx index f14a7e15c6..226eba7577 100644 --- a/apps/docs/content/docs/management-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately. path: '/v1/workspaces/{workspaceId}/service-tokens' -url: /management-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens +url: /rest-api/endpoints/service-tokens/post-workspaces-by-workspace-id-service-tokens metaTitle: 'POST /v1/workspaces/{workspaceId}/service-tokens | Create service token' -metaDescription: 'Management API: Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately.' +metaDescription: 'REST API: Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new service token for the given workspace. The `value` field is returned exactly once in this response and is never stored — copy it immediately. - + diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id-subscription.mdx b/apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces-by-id-subscription.mdx similarity index 68% rename from apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id-subscription.mdx rename to apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces-by-id-subscription.mdx index 3894722ffa..4b55722e7a 100644 --- a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id-subscription.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces-by-id-subscription.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns subscription information for the workspace with the given ID. path: '/v1/workspaces/{id}/subscription' -url: /management-api/endpoints/workspaces/get-workspaces-by-id-subscription +url: /rest-api/endpoints/workspaces/get-workspaces-by-id-subscription metaTitle: 'GET /v1/workspaces/{id}/subscription | Get workspace subscription' -metaDescription: 'Management API: Returns subscription information for the workspace with the given ID.' +metaDescription: 'REST API: Returns subscription information for the workspace with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns subscription information for the workspace with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx b/apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces-by-id.mdx similarity index 67% rename from apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx rename to apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces-by-id.mdx index 41a8b9faaa..1b57ca47f6 100644 --- a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces-by-id.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns the workspace with the given ID. path: '/v1/workspaces/{id}' -url: /management-api/endpoints/workspaces/get-workspaces-by-id +url: /rest-api/endpoints/workspaces/get-workspaces-by-id metaTitle: 'GET /v1/workspaces/{id} | Get workspace' -metaDescription: 'Management API: Returns the workspace with the given ID.' +metaDescription: 'REST API: Returns the workspace with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the workspace with the given ID. - + diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx b/apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces.mdx similarity index 69% rename from apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx rename to apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces.mdx index 45b0590237..4c449e16df 100644 --- a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx +++ b/apps/docs/content/docs/rest-api/endpoints/workspaces/get-workspaces.mdx @@ -10,13 +10,13 @@ _openapi: contents: - content: Returns the list of workspaces the current token can access. path: /v1/workspaces -url: /management-api/endpoints/workspaces/get-workspaces +url: /rest-api/endpoints/workspaces/get-workspaces metaTitle: GET /v1/workspaces | Get list of workspaces -metaDescription: 'Management API: Returns the list of workspaces the current token can access.' +metaDescription: 'REST API: Returns the list of workspaces the current token can access.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the list of workspaces the current token can access. - + diff --git a/apps/docs/content/docs/management-api/getting-started.mdx b/apps/docs/content/docs/rest-api/getting-started.mdx similarity index 86% rename from apps/docs/content/docs/management-api/getting-started.mdx rename to apps/docs/content/docs/rest-api/getting-started.mdx index 2b003a8993..3a8c26970a 100644 --- a/apps/docs/content/docs/management-api/getting-started.mdx +++ b/apps/docs/content/docs/rest-api/getting-started.mdx @@ -1,12 +1,12 @@ --- title: Getting Started -description: Get started with the Prisma Management API by creating your first project and database -url: /management-api/getting-started +description: Get started with the Prisma REST API by creating your first project and database +url: /rest-api/getting-started metaTitle: Partner Database Provisioning & User Claim Flow -metaDescription: Learn how to use the Prisma Postgres Management API to provision and claim databases +metaDescription: Learn how to use the Prisma Postgres REST API to provision and claim databases --- -This guide walks you through setting up a basic TypeScript project that uses the Management API to create a new Prisma Console project with a Prisma Postgres database, and print out all connection details. +This guide walks you through setting up a basic TypeScript project that uses the REST API to create a new Prisma Console project with a Prisma Postgres database, and print out all connection details. You'll authenticate via a service token, set up your environment, and run a script to interact with the API. @@ -17,7 +17,7 @@ You'll authenticate via a service token, set up your environment, and run a scri ## 1. Create a service token in Prisma Console -First, you need to create a service token to be able to access the Management API: +First, you need to create a service token to be able to access the REST API: 1. Open the [Prisma Console](https://console.prisma.io/) 2. Navigate to the **Settings** page of your workspace and select **Service Tokens** @@ -31,8 +31,8 @@ First, you need to create a service token to be able to access the Management AP Open your terminal and run the following commands: ```bash -mkdir management-api-demo -cd management-api-demo +mkdir rest-api-demo +cd rest-api-demo ``` Next, initialize npm and install dependencies required for using TypeScript: @@ -67,7 +67,7 @@ PRISMA_SERVICE_TOKEN="ey..." ### 2.3. Install the `axios` library for HTTP request -You're going to use [`axios`](https://github.com/axios/axios/tree/main) as your HTTP client to interact with the Management API. Install it as follows: +You're going to use [`axios`](https://github.com/axios/axios/tree/main) as your HTTP client to interact with the REST API. Install it as follows: ```npm npm install axios @@ -176,4 +176,4 @@ Your output of the command should look similar to the output above. ## Conclusion -You have now set up a TypeScript project that interacts with the Management API, creates a new project and database, and prints out all connection strings. You can extend this script to manage more resources or automate other tasks using the Management API. +You have now set up a TypeScript project that interacts with the REST API, creates a new project and database, and prints out all connection strings. You can extend this script to manage more resources or automate other tasks using the REST API. diff --git a/apps/docs/content/docs/rest-api/index.mdx b/apps/docs/content/docs/rest-api/index.mdx new file mode 100644 index 0000000000..1d9fad06e8 --- /dev/null +++ b/apps/docs/content/docs/rest-api/index.mdx @@ -0,0 +1,25 @@ +--- +title: REST API +description: 'Programmatically manage your Prisma Postgres databases, projects, and workspaces with the REST API' +url: /rest-api +metaTitle: 'Prisma Postgres: REST API Reference' +metaDescription: REST API reference documentation for Prisma Postgres. +--- + +## Base URL + +``` +https://api.prisma.io/v1 +``` + +Append an endpoint path to construct the full URL. For example: `https://api.prisma.io/v1/projects/{projectId}` + +An interactive [OpenAPI 3.1 specification](https://api.prisma.io/v1/swagger-editor) is available for exploring endpoints and request/response formats. + +## Getting Started + +- **[Getting Started](/rest-api/getting-started)** - Create your first project and database +- **[Authentication](/rest-api/authentication)** - OAuth 2.0 and service tokens setup +- **[SDK](/rest-api/sdk)** - TypeScript SDK with built-in OAuth and automatic token refresh +- **[Using API Clients](/rest-api/api-clients)** - Use with Postman, Insomnia, and Yaak +- **[Partner Integration](/rest-api/partner-integration)** - Build integrations that provision and transfer databases diff --git a/apps/docs/content/docs/management-api/meta.json b/apps/docs/content/docs/rest-api/meta.json similarity index 90% rename from apps/docs/content/docs/management-api/meta.json rename to apps/docs/content/docs/rest-api/meta.json index dbb8b2b073..2b9b74edb8 100644 --- a/apps/docs/content/docs/management-api/meta.json +++ b/apps/docs/content/docs/rest-api/meta.json @@ -1,5 +1,5 @@ { - "title": "Management API", + "title": "REST API", "icon": "Code", "root": true, "pages": [ diff --git a/apps/docs/content/docs/management-api/partner-integration.mdx b/apps/docs/content/docs/rest-api/partner-integration.mdx similarity index 84% rename from apps/docs/content/docs/management-api/partner-integration.mdx rename to apps/docs/content/docs/rest-api/partner-integration.mdx index 2bfa0c9596..5fe3e4c6e8 100644 --- a/apps/docs/content/docs/management-api/partner-integration.mdx +++ b/apps/docs/content/docs/rest-api/partner-integration.mdx @@ -2,15 +2,15 @@ title: Partner Integration description: Build partner integrations that provision and transfer Prisma Postgres databases to users metaTitle: Partner Integration | Provision & Transfer Databases -metaDescription: 'Build partner integrations with the Management API. Provision Prisma Postgres databases, implement claim flow with OAuth 2.0, transfer projects to user workspaces.' -url: /management-api/partner-integration +metaDescription: 'Build partner integrations with the REST API. Provision Prisma Postgres databases, implement claim flow with OAuth 2.0, transfer projects to user workspaces.' +url: /rest-api/partner-integration --- -This guide walks you through building a partner integration with the Management API to power experiences like the [`npx create-db`](https://create-db.prisma.io/) command. +This guide walks you through building a partner integration with the REST API to power experiences like the [`npx create-db`](https://create-db.prisma.io/) command. You'll learn how to provision a Prisma Postgres database on your workspace as a partner, and how to transfer it to another user's workspace so they can "claim" the database. We'll cover how the process is secured using OAuth2, and by the end, you'll understand the full flow and how to integrate it into your own product experience. -This guide references the actual implementation in the `npx create-db` CLI and Cloudflare Workers as real world examples. The repo for the `npx create-db` is [here](https://github.com/prisma/create-db), which can be used as a reference for how to use the Management API in your own projects. +This guide references the actual implementation in the `npx create-db` CLI and Cloudflare Workers as real world examples. The repo for the `npx create-db` is [here](https://github.com/prisma/create-db), which can be used as a reference for how to use the REST API in your own projects. :::note[How does this fit into your app?] The two Cloudflare Workers in this guide are just reference examples. You would typically build this logic into your own backend or serverless functions. @@ -20,9 +20,9 @@ Similarly, the `npx create-db` CLI is a simple demo. In your product, you can tr ## Core concepts -Before diving into implementation, let's clarify the main concepts involved in the Management API integration: +Before diving into implementation, let's clarify the main concepts involved in the REST API integration: -- **Management API**: A set of endpoints that allow you to programmatically provision and manage Prisma Postgres databases. +- **REST API**: A set of endpoints that allow you to programmatically provision and manage Prisma Postgres databases. - **Projects vs Databases**: A project is a container that can hold multiple databases. You can use this to organize databases you create e.g. by user. Projects can then be transferred to users, including all databases they contain. - **Authentication**: All API requests require authentication. As a partner, you authenticate provisioning calls with a service token for your workspace, and use OAuth 2 to obtain an access token for the user during the claim flow. - **Tokens**: There are two main types of tokens: @@ -31,12 +31,12 @@ Before diving into implementation, let's clarify the main concepts involved in t ## How to become a partner -To use the Prisma Postgres Management API, you first need to set up as a partner: +To use the Prisma Postgres REST API, you first need to set up as a partner: -1. **Request access to the Management API**: Contact the Prisma team from the [Prisma Partners page](https://www.prisma.io/partners) to request access to the Management API. You will be guided through the onboarding process. +1. **Request access to the REST API**: Contact the Prisma team from the [Prisma Partners page](https://www.prisma.io/partners) to request access to the REST API. You will be guided through the onboarding process. 2. **Obtain OAuth credentials**: You can obtain your OAuth credentials in the [Prisma Console](https://console.prisma.io). See the [next section](#get-oauth-credentials) for details. -For a complete list of available endpoints and details on request/response formats, see the [Prisma Management API documentation](/management-api). +For a complete list of available endpoints and details on request/response formats, see the [Prisma REST API documentation](/rest-api). ## Get OAuth credentials @@ -56,7 +56,7 @@ To provision a new Prisma Postgres database for your users as a partner, follow 1. **Gather required information**: Prepare the necessary details for provisioning, such as region, database name, and any other options your application requires. This information may come from user input or be determined by your application logic. 2. **Authenticate your integration**: Use your service token to authenticate API requests from your backend. This token authenticates your app as an approved partner. -3. **Send a database provisioning request**: Make a `POST` request to the Management API endpoint to create a new project with a default database. For example: +3. **Send a database provisioning request**: Make a `POST` request to the REST API endpoint to create a new project with a default database. For example: ```ts const prismaResponse = await fetch("https://api.prisma.io/v1/projects", { method: "POST", @@ -80,7 +80,7 @@ When a user wants to claim a database, your app will: 1. Trigger the OAuth2 flow, redirecting the user to Prisma Auth. This is necessary, so your app will have the permissions to transfer the database into the user's workspace. 2. The user authenticates and selects a workspace. -3. Your backend receives an authorization code, exchanges it for a user access token, and calls the Management API transfer endpoint with both your integration token and the user's token. +3. Your backend receives an authorization code, exchanges it for a user access token, and calls the REST API transfer endpoint with both your integration token and the user's token. This ensures the transfer is secure and only the intended user can claim the database. @@ -133,7 +133,7 @@ const tokenResponse = await fetch("https://auth.prisma.io/token", { const tokenData = await tokenResponse.json(); ``` -2. **Call the Management API transfer endpoint** to move the project to the selected workspace. You will need the `project_id` and the user's access token: +2. **Call the REST API transfer endpoint** to move the project to the selected workspace. You will need the `project_id` and the user's access token: ```ts const transferResponse = await fetch(`https://api.prisma.io/v1/projects/${project_id}/transfer`, { @@ -153,9 +153,9 @@ If the transfer is successful, the database is now owned by the user's workspace By following this guide, you have learned how to: - Set up as a Prisma Postgres Partner and obtain the necessary credentials -- Provision a new database for your users using the Management API +- Provision a new database for your users using the REST API - Implement a secure claim flow that allows users to claim ownership of a database in their own workspace using OAuth2 This flow enables you to integrate Prisma Postgres provisioning and transfer seamlessly into your own product, providing a smooth onboarding experience for your users. -For further details, see the [create-db](https://github.com/prisma/create-db) repo for a reference implementation, or consult the [Prisma Management API documentation](/management-api). +For further details, see the [create-db](https://github.com/prisma/create-db) repo for a reference implementation, or consult the [Prisma REST API documentation](/rest-api). diff --git a/apps/docs/content/docs/management-api/sdk.mdx b/apps/docs/content/docs/rest-api/sdk.mdx similarity index 93% rename from apps/docs/content/docs/management-api/sdk.mdx rename to apps/docs/content/docs/rest-api/sdk.mdx index 47561a1b93..819f1297b9 100644 --- a/apps/docs/content/docs/management-api/sdk.mdx +++ b/apps/docs/content/docs/rest-api/sdk.mdx @@ -1,14 +1,14 @@ --- title: SDK -description: 'A TypeScript SDK for the Prisma Data Platform Management API. Use the simple client for direct API access, or the full SDK with built-in OAuth authentication and automatic token refresh' -url: /management-api/sdk -metaTitle: 'Prisma Postgres: Management API SDK' -metaDescription: 'A TypeScript SDK for the Prisma Data Platform Management API. Use the simple client for direct API access, or the full SDK with built-in OAuth authentication and automatic token refresh.' +description: 'A TypeScript SDK for the Prisma Data Platform REST API. Use the simple client for direct API access, or the full SDK with built-in OAuth authentication and automatic token refresh' +url: /rest-api/sdk +metaTitle: 'Prisma Postgres: REST API SDK' +metaDescription: 'A TypeScript SDK for the Prisma Data Platform REST API. Use the simple client for direct API access, or the full SDK with built-in OAuth authentication and automatic token refresh.' --- ## Overview -The [`@prisma/management-api-sdk`](https://www.npmjs.com/package/@prisma/management-api-sdk) is a TypeScript SDK for the [Prisma Data Platform Management API](/management-api). Use the simple client for direct API access, or the full SDK with built-in OAuth authentication and automatic token refresh. +The [`@prisma/management-api-sdk`](https://www.npmjs.com/package/@prisma/management-api-sdk) is a TypeScript SDK for the [Prisma Data Platform REST API](/rest-api). Use the simple client for direct API access, or the full SDK with built-in OAuth authentication and automatic token refresh. Based on the [public OpenAPI 3.1 specification](https://api.prisma.io/v1/swagger-editor). @@ -20,7 +20,7 @@ npm install @prisma/management-api-sdk ## Basic usage -For usage with an existing access or [service token](/management-api/authentication#service-tokens). +For usage with an existing access or [service token](/rest-api/authentication#service-tokens). ### Making API calls @@ -293,7 +293,7 @@ Creates a raw API client without authentication handling. Useful if you want to ### `createManagementApiSdk(config)` -Creates a Management API SDK instance with OAuth authentication and automatic token refresh. +Creates a REST API SDK instance with OAuth authentication and automatic token refresh. **Parameters:** diff --git a/apps/docs/content/docs/studio/meta.json b/apps/docs/content/docs/studio/meta.json index 1d2056643d..82e0971411 100644 --- a/apps/docs/content/docs/studio/meta.json +++ b/apps/docs/content/docs/studio/meta.json @@ -1,7 +1,7 @@ { "title": "Studio", "root": true, - "icon": "Palette", + "icon": "Table", "pages": [ "---Introduction---", "index", diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs index 0c64232fa1..c49736cc1f 100644 --- a/apps/docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -273,6 +273,16 @@ const config = { { source: "/guides/next", destination: "/guides/v8", permanent: true }, { source: "/guides/next/:path*", destination: "/guides/v8/:path*", permanent: true }, { source: "/llms/next.txt", destination: "/llms/v8.txt", permanent: true }, + // Docs IA restructure: the Composer CLI reference lives in the v8 CLI section. + { source: "/composer/cli-reference", destination: "/cli/v8/composer", permanent: true }, + // Docs IA restructure: the Management API is now the REST API. + { source: "/management-api", destination: "/rest-api", permanent: true }, + { source: "/management-api/:path*", destination: "/rest-api/:path*", permanent: true }, + { + source: "/prisma-management-api.postman_collection.json", + destination: "/prisma-rest-api.postman_collection.json", + permanent: true, + }, { source: "/orm/v8/create-prisma", destination: "/v8/getting-started", diff --git a/apps/docs/package.json b/apps/docs/package.json index 82b037d8f4..a7779c4b4d 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "fetch-openapi": "tsx ./scripts/fetch-openapi.ts", - "generate:management-api-docs": "pnpm run fetch-openapi && tsx ./scripts/generate-docs.ts && pnpm run generate:postman-collection && fumadocs-mdx", + "generate:rest-api-docs": "pnpm run fetch-openapi && tsx ./scripts/generate-docs.ts && pnpm run generate:postman-collection && fumadocs-mdx", "generate:postman-collection": "tsx ./scripts/generate-postman-collection.ts", "generate:error-reference": "node ./scripts/generate-error-reference.mjs && fumadocs-mdx", "build": "pnpm run fetch-openapi && next build", diff --git a/apps/docs/public/prisma-management-api.postman_collection.json b/apps/docs/public/prisma-rest-api.postman_collection.json similarity index 100% rename from apps/docs/public/prisma-management-api.postman_collection.json rename to apps/docs/public/prisma-rest-api.postman_collection.json diff --git a/apps/docs/scripts/generate-docs.ts b/apps/docs/scripts/generate-docs.ts index 9ea8edc535..d137cd877e 100644 --- a/apps/docs/scripts/generate-docs.ts +++ b/apps/docs/scripts/generate-docs.ts @@ -5,7 +5,7 @@ import { readdir, readFile, writeFile, rm, mkdir } from "node:fs/promises"; import { join, resolve, dirname } from "node:path"; import fg from "fast-glob"; -const OUTPUT_DIR = "content/docs/management-api/endpoints"; +const OUTPUT_DIR = "content/docs/rest-api/endpoints"; function withDescriptionFirst(data: Record, description: string) { const { title, description: _description, ...rest } = data; @@ -146,8 +146,8 @@ async function main() { const normalizedPath = file.path .replace(/\\/g, "/") .replace(/\.mdx$/, "") - .replace(/^management-api\/endpoints\//, ""); - const url = `/management-api/endpoints/${normalizedPath}`; + .replace(/^rest-api\/endpoints\//, ""); + const url = `/rest-api/endpoints/${normalizedPath}`; // Capture new URL → relative path mapping (always, not just when changed) newUrlToRelPath.set(url, file.path.replace(/\\/g, "/")); @@ -172,9 +172,9 @@ async function main() { typeof operation.description === "string" && operation.description.trim().length > 0 ? stripEmoji(operation.description.trim()) : `${operation.method} ${operation.path}.`; - const metaDescription = description.startsWith("Management API:") + const metaDescription = description.startsWith("REST API:") ? description - : `Management API: ${description}`; + : `REST API: ${description}`; if (data.description !== description) { data.description = description; @@ -226,8 +226,8 @@ async function main() { const tag = url.split("/")[3]; const tagStillExists = [...newUrlToRelPath.keys()].some((u) => u.split("/")[3] === tag); const destination = tagStillExists - ? `/docs/management-api/endpoints/${tag}` - : "/docs/management-api/endpoints"; + ? `/docs/rest-api/endpoints/${tag}` + : "/docs/rest-api/endpoints"; return { source: `/docs${url}`, destination }; }); @@ -236,7 +236,7 @@ async function main() { // Remove redirects for endpoints that are live again (restored) or that we're about to re-add const sourcesToRemove = new Set([ ...toAdd.map((r) => r.source), // de-dupe before re-inserting - ...[...restoredSources].filter((s) => s.includes("/management-api/endpoints/")), + ...[...restoredSources].filter((s) => s.includes("/rest-api/endpoints/")), ]); const { result: cleaned, removed } = removeRedirectLines(raw, sourcesToRemove); raw = cleaned; diff --git a/apps/docs/scripts/generate-postman-collection.ts b/apps/docs/scripts/generate-postman-collection.ts index 21a6536ac9..68bd317e11 100644 --- a/apps/docs/scripts/generate-postman-collection.ts +++ b/apps/docs/scripts/generate-postman-collection.ts @@ -181,7 +181,7 @@ async function main() { const normalizedCollection = normalizeGeneratedCollection(collection); - const outputPath = join(cwd, "public/prisma-management-api.postman_collection.json"); + const outputPath = join(cwd, "public/prisma-rest-api.postman_collection.json"); await writeFile(outputPath, JSON.stringify(normalizedCollection), "utf-8"); console.log(`Generated Postman collection: ${outputPath}`); } diff --git a/apps/docs/scripts/lint-agent-ready.ts b/apps/docs/scripts/lint-agent-ready.ts index 3b87e865f6..563aad8392 100644 --- a/apps/docs/scripts/lint-agent-ready.ts +++ b/apps/docs/scripts/lint-agent-ready.ts @@ -280,7 +280,7 @@ try { } // ── Check 5c: APIPage parity guard ─────────────────────────────────────────── -// The interactive OpenAPI explorer on /management-api/endpoints/* has no +// The interactive OpenAPI explorer on /rest-api/endpoints/* has no // markdown equivalent (per-language code samples, auth widgets); the wrapper in // api-page.tsx must carry data-markdown-ignore so parity checkers compare only // the generated markdown API reference. @@ -290,7 +290,7 @@ try { if (!apiPageSource.includes("data-markdown-ignore")) { fail( "APIPage parity guard", - "api-page.tsx no longer wraps the OpenAPI explorer in data-markdown-ignore; management-api endpoint pages will fail markdown/HTML parity", + "api-page.tsx no longer wraps the OpenAPI explorer in data-markdown-ignore; rest-api endpoint pages will fail markdown/HTML parity", ); } else { pass("APIPage parity guard", "OpenAPI explorer is excluded from parity comparison"); diff --git a/apps/docs/scripts/test-llm-markdown-fidelity.ts b/apps/docs/scripts/test-llm-markdown-fidelity.ts index 4db2db330f..e1ff5e8812 100644 --- a/apps/docs/scripts/test-llm-markdown-fidelity.ts +++ b/apps/docs/scripts/test-llm-markdown-fidelity.ts @@ -13,7 +13,7 @@ type SnapshotCase = { const snapshots: SnapshotCase[] = [ { name: "APIPage", - input: ``, + input: ``, expected: `## API reference ### GET /v1/example diff --git a/apps/docs/src/app/(docs)/(default)/[[...slug]]/page.tsx b/apps/docs/src/app/(docs)/(default)/[[...slug]]/page.tsx index 2ab5bc065a..641a315e2f 100644 --- a/apps/docs/src/app/(docs)/(default)/[[...slug]]/page.tsx +++ b/apps/docs/src/app/(docs)/(default)/[[...slug]]/page.tsx @@ -59,7 +59,7 @@ export default async function Page({ params }: { params: Promise }) {page.data.title}
{promptContent && } - {!page.url.startsWith("/management-api/endpoints") && ( + {!page.url.startsWith("/rest-api/endpoints") && ( )} diff --git a/apps/docs/src/app/global.css b/apps/docs/src/app/global.css index 11e828572f..2b28f2ae1e 100644 --- a/apps/docs/src/app/global.css +++ b/apps/docs/src/app/global.css @@ -543,3 +543,123 @@ header &[data-search-full] { #nd-subnav[data-floating="false"][data-transparent="false"] { background-color: color-mix(in srgb, var(--shell-ground) 85%, transparent); } + +/* --------------------------------------------------------------------------- + Spectrum states for sidebar rows, ported from the site's .spectrum-border + (apps/site globals.css), applied through `.sidebar-prism-item` in the + sidebar's itemVariants: + - hover = text painted with the cool half of the brand spectrum + (pinks/reds/cyans — the warm yellow/orange stops read poorly + at text size, and the cyan→pink blend passes through purple) + - selected = the animated 1px spectrum ring */ + +@keyframes spectrum-slide { + from { + background-position: 0% 50%; + } + to { + background-position: 200% 50%; + } +} + +:root { + /* Starts on cyan-500: brighter and more cyan than the primary blue, but + still legible as text on the light background (cyan-400 is not). */ + --gradient-spectrum-cool: linear-gradient( + 85deg, + var(--color-prism-cyan-500), + var(--color-spectrum-pink), + var(--color-spectrum-scarlet), + var(--color-spectrum-pink), + var(--color-prism-cyan-500) + ); +} + +.sidebar-prism-item::after { + content: ""; + position: absolute; + inset: 0; + border-radius: inherit; + padding: 1px; + background-image: var(--gradient-spectrum); + background-size: 200% 100%; + -webkit-mask: + linear-gradient(#fff 0 0) content-box, + linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask: + linear-gradient(#fff 0 0) content-box, + linear-gradient(#fff 0 0); + mask-composite: exclude; + opacity: 0; + transition: opacity 0.35s ease; + animation: spectrum-slide 2.5s linear infinite; + pointer-events: none; +} + +/* Selected: the animated spectrum ring. */ +.sidebar-prism-item[data-active="true"]::after { + opacity: 1; +} + +/* Hover: text fades into the cool spectrum. The gradient is always painted + and clipped to the text; hover only fades `color` to transparent so the + gradient shows through — background-image itself cannot transition. Icons + keep the normal foreground because the clip trick makes `currentColor` + transparent. */ +.sidebar-prism-item { + background-image: var(--gradient-spectrum-cool); + background-clip: text; + -webkit-background-clip: text; + transition: color 0.35s ease; +} + +.sidebar-prism-item svg { + color: var(--color-fd-foreground); +} + +.sidebar-prism-item:hover { + color: transparent; +} + +/* TOC ("On this page") active state: the same cool-spectrum text as the + sidebar hover, replacing the flat primary blue. Same fade technique — the + gradient is always painted and clipped; the active state fades `color` to + transparent to reveal it. */ +.spectrum-text-active { + background-image: var(--gradient-spectrum-cool); + background-clip: text; + -webkit-background-clip: text; + transition: color 0.35s ease; +} + +.spectrum-text-active[data-active="true"] { + color: transparent; +} + +/* Inline code inside a gradient-clipped item paints its own chip background + over the clipped gradient, leaving transparent text on a solid chip — + i.e. invisible. Give code children a solid colour instead. */ +.spectrum-text-active[data-active="true"] code, +.sidebar-prism-item:hover code { + color: var(--color-fd-foreground); +} + +/* The TOC position thumb (both variants), the cool spectrum run vertically. */ +.spectrum-thumb { + background-image: linear-gradient( + 180deg, + var(--color-prism-cyan-500), + var(--color-spectrum-pink), + var(--color-spectrum-scarlet) + ); +} + +@media (prefers-reduced-motion: reduce) { + .sidebar-prism-item, + .sidebar-prism-item::after, + .spectrum-text-active { + animation: none; + transition: none; + } +} diff --git a/apps/docs/src/components/chrome/paper-ground.tsx b/apps/docs/src/components/chrome/paper-ground.tsx index aaba95914f..73bfc62260 100644 --- a/apps/docs/src/components/chrome/paper-ground.tsx +++ b/apps/docs/src/components/chrome/paper-ground.tsx @@ -1,40 +1,24 @@ import Image from "next/image"; -import { PrismRay } from "./prism-ray"; // The shell's brand ground, rendered once inside the notebook grid: CF's // grain texture as a fixed wash over the paper (light mode only — the grain -// multiplies to nothing on ink), and the prism ray crossing the frame behind -// the reading sheet, the way light crosses behind the console panel on the -// site-redesign home. Both layers are decorative and sit under the grid's -// painted surfaces; only the paper margins let them show. +// multiplies to nothing on ink). Decorative, sitting under the grid's +// painted surfaces; only the paper margins let it show. export function PaperGround() { - // Both layers sit at negative z inside the grid's isolated stacking context + // The layer sits at negative z inside the grid's isolated stacking context // (see `#nd-notebook-layout { isolation: isolate }`): above the paper fill, - // below every in-flow surface — so the sheet, header, and sidebar pills - // occlude them and the light only shows in the paper margins, exactly the - // way the hero ray disappears behind the console card on the reference. + // below every in-flow surface. return ( - <> -
- -
-
- -
- +
+ +
); } diff --git a/apps/docs/src/components/layout/notebook/client.tsx b/apps/docs/src/components/layout/notebook/client.tsx index d32b87b702..22e3ad9588 100644 --- a/apps/docs/src/components/layout/notebook/client.tsx +++ b/apps/docs/src/components/layout/notebook/client.tsx @@ -15,11 +15,9 @@ import { } from "react"; import { useSidebar } from "../sidebar/base"; import { ChevronDown } from "lucide-react"; -import Link from "fumadocs-core/link"; import { usePathname } from "fumadocs-core/framework"; import { useIsScrollTop } from "@fumadocs/base-ui/utils/use-is-scroll-top"; -import { isLinkItemVisibleOn } from "../link-item-visibility"; -import { LinkItem, type LinkItemType, type MainItemType, type MenuItemType } from "../link-item"; +import { LinkItem, type LinkItemType, type MenuItemType } from "../link-item"; import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover"; export const LayoutContext = createContext<{ @@ -128,20 +126,14 @@ export function LayoutHeader(props: ComponentProps<"header">) { /** * The morphing element: transparent and full-bleed while docked, a floating - * glass panel once scrolled. It holds BOTH header rows, so at `lg` the tabs - * float with the bar as one panel — hence `rounded-2xl` there and the true - * blog pill (`rounded-full`) whenever only one row renders. + * glass panel once scrolled — the blog pill (`rounded-full`). * * Nothing here changes the box's outer height: the vertical margins and the * 1px border are present in both states, and only max-width / background / * border colour / shadow / blur cross-fade. That is what keeps the strip's * height — and therefore `--fd-header-height` — constant through the morph. */ -export function NavbarMorphContainer({ - twoRows = false, - className, - ...props -}: ComponentProps<"div"> & { twoRows?: boolean }) { +export function NavbarMorphContainer({ className, ...props }: ComponentProps<"div">) { const floating = use(HeaderFloatingContext); return ( @@ -149,7 +141,6 @@ export function NavbarMorphContainer({ data-floating={floating} className={cn( "pointer-events-auto mx-auto my-2 flex w-full flex-col rounded-full border transition-all duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none", - twoRows && "lg:rounded-2xl", floating ? "border-stroke-neutral bg-background-default-075 max-w-[calc(100%-1.5rem)] shadow-[0_1px_2px_rgba(21,21,21,0.04),0_8px_24px_-8px_rgba(21,21,21,0.16)] backdrop-blur-md sm:max-w-[calc(100%-2.5rem)] dark:shadow-[0_1px_2px_rgba(0,0,0,0.5),0_8px_24px_-8px_rgba(0,0,0,0.8)]" : "bg-background-default/0 max-w-full border-transparent shadow-[0_1px_2px_rgba(21,21,21,0),0_8px_24px_-8px_rgba(21,21,21,0)] backdrop-blur-none dark:shadow-[0_1px_2px_rgba(0,0,0,0),0_8px_24px_-8px_rgba(0,0,0,0)]", @@ -193,89 +184,6 @@ export function LayoutBody({ className, style, children, ...props }: ComponentPr ); } -export function LayoutHeaderTabs({ - links, - className, - ...props -}: ComponentProps<"div"> & { - links: LinkItemType[]; -}) { - const items = useMemo(() => { - const visibleItems = links.filter( - (item) => - item.type !== "icon" && - item.type !== "custom" && - item.type !== "button" && - isLinkItemVisibleOn(item, "menu"), - ); - - if ( - visibleItems.length <= 6 || - visibleItems.some( - (item): item is Extract => item.type === "menu", - ) - ) { - return visibleItems; - } - - const primaryItems = visibleItems.slice(0, 5); - const overflowItems = visibleItems - .slice(5) - .filter( - (item): item is MainItemType => - "url" in item && item.type !== "menu" && item.type !== "button", - ); - - return [ - ...primaryItems, - { - type: "menu", - text: "More", - items: overflowItems, - } satisfies MenuItemType, - ]; - }, [links]); - - return ( -
- {items.map((item, i) => { - if ((item as any)?.type === "custom") { - return {(item as any).children}; - } - - if ((item as any)?.type === "menu") { - return ( - - ); - } - - if ("url" in (item as any)) { - return ( - - {"text" in item ? (item as any).text : null} - - ); - } - - return null; - })} -
- ); -} - export function NavbarLinkItem({ item, className, diff --git a/apps/docs/src/components/layout/notebook/index.tsx b/apps/docs/src/components/layout/notebook/index.tsx index 67a40690f2..428711dc73 100644 --- a/apps/docs/src/components/layout/notebook/index.tsx +++ b/apps/docs/src/components/layout/notebook/index.tsx @@ -1,11 +1,10 @@ -import { type ComponentProps, type FC, type HTMLAttributes, type ReactNode, useMemo } from "react"; +import { type ComponentProps, type FC, type HTMLAttributes, type ReactNode } from "react"; import { type BaseLayoutProps, renderTitleNav, resolveLinkItems } from "../shared"; import { Sidebar, SidebarCollapseTrigger, SidebarContent, SidebarDrawer, - SidebarPageTree, SidebarTrigger, SidebarViewport, } from "./sidebar"; @@ -20,7 +19,6 @@ import { LayoutBody, LayoutContextProvider, LayoutHeader, - LayoutHeaderTabs, NavbarLinkItem, NavbarMorphContainer, SidebarEnabledFromPageProvider, @@ -30,8 +28,7 @@ import { LargeSearchToggle, SearchToggle } from "../search-toggle"; import { isLinkItemVisibleOn } from "../link-item-visibility"; import { LinkItem, type ButtonItemType, type LinkItemType } from "../link-item"; import type { SidebarPageTreeComponents } from "../sidebar/page-tree"; -import { getSidebarTabs } from "../sidebar/tabs"; -import { SidebarTabsDropdown, type SidebarTabWithProps } from "../sidebar/tabs/dropdown"; +import { SidebarNav, SidebarNavHeader, SidebarViewProvider } from "./sidebar-nav"; import { AIChatSidebar } from "@/components/ai-chat-sidebar"; import { PaperGround } from "@/components/chrome/paper-ground"; @@ -62,11 +59,6 @@ interface SidebarOptions Pick, "defaultOpenLevel" | "prefetch"> { components?: Partial; - /** - * Root Toggle options - */ - tabs?: SidebarTabWithProps[] | false; - banner?: ReactNode | FC>; footer?: ReactNode | FC>; @@ -89,29 +81,17 @@ interface SidebarOptions export function DocsLayout(props: DocsLayoutProps) { const { nav = {}, - sidebar: { - tabs: tabOptions, - defaultOpenLevel, - prefetch, - enabled: sidebarEnabled = true, - ...sidebarProps - } = {}, + sidebar: { defaultOpenLevel, prefetch, enabled: sidebarEnabled = true, ...sidebarProps } = {}, i18n = false, themeSwitch = {}, tree, } = props; const links = resolveLinkItems(props); - const tabs = useMemo(() => { - return getSidebarTabs(tree); - }, [tabOptions, tree]); function sidebar() { const { banner, footer, components, collapsible = true, ...rest } = sidebarProps; - const menuLinks = links.filter( - (item) => item.type !== "icon" && item.type !== "button" && isLinkItemVisibleOn(item, "menu"), - ); const iconLinks = links.filter( (item): item is Extract => item.type === "icon" && isLinkItemVisibleOn(item, "nav"), @@ -119,15 +99,8 @@ export function DocsLayout(props: DocsLayoutProps) { const navButtons = links.filter( (item): item is ButtonItemType => item.type === "button" && isLinkItemVisibleOn(item, "nav"), ); - const Header = - typeof banner === "function" - ? banner - : ({ className, ...props }: ComponentProps<"div">) => ( -
- {props.children} - {banner} -
- ); + const BannerComponent = typeof banner === "function" ? banner : null; + const bannerNode = BannerComponent ? : (banner as ReactNode); const Footer = typeof footer === "function" ? footer @@ -144,18 +117,20 @@ export function DocsLayout(props: DocsLayoutProps) { {footer}
); + // The back button + version switcher live OUTSIDE the scroll viewport so + // they stay visible however far the page tree is scrolled. const viewport = ( - - - + <> + + + + + ); return ( <> -
- -
{viewport}
{iconLinks.map((item, i) => ( @@ -178,7 +153,7 @@ export function DocsLayout(props: DocsLayoutProps) {
-
+
- {menuLinks.length > 0 && } -
+ {navButtons.length > 0 && (
{navButtons.map((item, i) => ( @@ -265,19 +239,21 @@ export function DocsLayout(props: DocsLayoutProps) { return ( - - - - {/* brand ground: grain over the paper + the prism ray crossing - behind the reading sheet. First child so every painted grid - surface (sheet, header, sidebar pills) stacks above it. */} - - {sidebarEnabled ? sidebar() : null} - - {props.children} - - - + + + + + {/* brand ground: grain over the paper + the prism ray crossing + behind the reading sheet. First child so every painted grid + surface (sheet, header, sidebar pills) stacks above it. */} + + {sidebarEnabled ? sidebar() : null} + + {props.children} + + + + ); @@ -285,7 +261,6 @@ export function DocsLayout(props: DocsLayoutProps) { function DocsNavbar({ links, - tabs, sidebar: { collapsible: sidebarCollapsible = true } = {}, searchToggle = {}, themeSwitch = {}, @@ -293,15 +268,7 @@ function DocsNavbar({ i18n, }: DocsLayoutProps & { links: LinkItemType[]; - tabs: SidebarTabWithProps[]; }) { - const menuLinks = links.filter( - (item) => - item.type !== "icon" && - item.type !== "custom" && - item.type !== "button" && - isLinkItemVisibleOn(item, "menu"), - ); const customLinks = links.filter( (item) => item.type === "custom" && isLinkItemVisibleOn(item, "nav"), ); @@ -314,7 +281,6 @@ function DocsNavbar({ const navButtons = links.filter( (item): item is ButtonItemType => item.type === "button" && isLinkItemVisibleOn(item, "nav"), ); - const showLayoutTabs = menuLinks.length > 0; return ( - +
{renderTitleNav(nav, { @@ -443,13 +408,6 @@ function DocsNavbar({
- {showLayoutTabs && ( - - )} ); diff --git a/apps/docs/src/components/layout/notebook/sidebar-nav.tsx b/apps/docs/src/components/layout/notebook/sidebar-nav.tsx new file mode 100644 index 0000000000..cb0bce62a4 --- /dev/null +++ b/apps/docs/src/components/layout/notebook/sidebar-nav.tsx @@ -0,0 +1,236 @@ +"use client"; +import { + createContext, + Fragment, + type ReactNode, + use, + useEffect, + useMemo, + useRef, + useState, +} from "react"; +import Link from "fumadocs-core/link"; +import { usePathname } from "fumadocs-core/framework"; +import { useOnChange } from "fumadocs-core/utils/use-on-change"; +import { useTreeContext } from "@fumadocs/base-ui/contexts/tree"; +import type * as PageTree from "fumadocs-core/page-tree"; +import { ChevronLeft } from "lucide-react"; +import { cn } from "@prisma-docs/ui/lib/cn"; +import { getSidebarTabs, isTabActive, type SidebarTab } from "../sidebar/tabs"; +import { sidebarSectionGroups } from "../../../lib/sidebar-sections"; +import { getVersionedNavPathname } from "../../../lib/version"; +import { useSidebar } from "../sidebar/base"; +import { itemVariants, SidebarPageTree, SidebarSeparator } from "./sidebar"; +import type { SidebarPageTreeComponents } from "../sidebar/page-tree"; + +type SidebarView = "top" | "section"; + +const SidebarViewContext = createContext<{ + override: SidebarView | null; + showTop: () => void; + drillIn: (targetIsCurrentSection: boolean) => void; +} | null>(null); + +/** + * Drill-in state for the vertical sidebar nav. The view is URL-derived (docs + * root shows the grouped section list, any section page shows that section's + * tree); the override lets the back button flip to the section list without + * navigating away from the current page. Mounted once in DocsLayout so the + * desktop aside and the mobile drawer share it. + */ +export function SidebarViewProvider({ children }: { children: ReactNode }) { + const pathname = usePathname(); + const [override, setOverride] = useState(null); + + // Any completed navigation re-derives the view from the new URL. + useOnChange(pathname, () => { + setOverride(null); + }); + + const value = useMemo( + () => ({ + override, + showTop: () => setOverride("top"), + // Clicking a section row: flip to the section view immediately ONLY when + // the target is the section the reader is already in (covers Getting + // Started on `/`, where no pathname change will arrive). For any other + // section, stay on the top list until the navigation commits — flipping + // early would flash the previous section's title and tree. + drillIn: (targetIsCurrentSection: boolean) => { + if (targetIsCurrentSection) setOverride("section"); + }, + }), + [override], + ); + + return {children}; +} + +function useSidebarView() { + const ctx = use(SidebarViewContext); + if (!ctx) throw new Error("Missing SidebarViewContext; wrap the layout in SidebarViewProvider."); + + const { root, full } = useTreeContext(); + const pathname = usePathname(); + + // Derived default: the docs root shows the grouped "All docs" list (its + // content is the Getting started page); any page inside a `root: true` + // section shows that section's tree. 404 (no section) falls back to top. + const derived: SidebarView = pathname === "/" || root === full ? "top" : "section"; + + return { view: ctx.override ?? derived, showTop: ctx.showTop, drillIn: ctx.drillIn }; +} + +/** Top-level sections from the page tree, keyed by their index URL. */ +function useSectionTabs(): Map { + const { full } = useTreeContext(); + + return useMemo(() => { + const tabs = getSidebarTabs(full as PageTree.Root); + return new Map(tabs.map((tab) => [tab.url, tab])); + }, [full]); +} + +function SidebarNavTopView() { + const pathname = usePathname(); + const { prefetch } = useSidebar(); + const { drillIn } = useSidebarView(); + const tabsByUrl = useSectionTabs(); + const containerRef = useRef(null); + + // Back-button focus handoff: when this view replaces the section view, the + // pressed button unmounts; keyboard users continue from the first section. + useEffect(() => { + const first = containerRef.current?.querySelector("a[href]"); + first?.focus({ preventScroll: true }); + }, []); + + return ( +
+ {sidebarSectionGroups.map((group, i) => ( + + {group.heading && {group.heading}} + {group.sections.map(({ url, title }) => { + const tab = tabsByUrl.get(url); + // A `title` entry is a plain page link, not a root section. + if (!tab && title) { + return ( + + {title} + + ); + } + if (!tab) { + if (process.env.NODE_ENV !== "production") { + console.warn(`sidebar-sections: no root section found for "${url}"`); + } + return null; + } + // Rows carry no selected state on purpose: after "back", the + // section the reader came from should not stay highlighted. + return ( + { + // Clicking the section the reader is already in only drills + // the sidebar back into its tree — the open page stays. + if (isTabActive(tab, pathname)) { + event.preventDefault(); + drillIn(true); + } + }} + className={cn(itemVariants({ variant: "link" }), "ps-2")} + > + {tab.icon} + {tab.title} + + ); + })} + + ))} +
+ ); +} + +/** The current top-level section of `pathname`, resolved against the config. + * Only configured top-level sections are candidates, so nested roots + * (orm/v8, cli/v8) still resolve to their parent section. */ +function useCurrentSection(): SidebarTab | null { + const pathname = usePathname(); + const tabsByUrl = useSectionTabs(); + + return useMemo(() => { + for (const group of sidebarSectionGroups) { + for (const { url } of group.sections) { + const tab = tabsByUrl.get(url); + if (tab && isTabActive(tab, pathname)) return tab; + } + } + return null; + }, [tabsByUrl, pathname]); +} + +/** + * The non-scrolling strip above the sidebar's scroll viewport, shown in the + * section view: the back button (always visible regardless of tree scroll), + * the section title, then the version switcher passed in as `banner`. + */ +export function SidebarNavHeader({ banner }: { banner?: ReactNode }) { + const { view, showTop } = useSidebarView(); + const section = useCurrentSection(); + + if (view !== "section") return null; + + return ( +
+ {/* Back navigates to the docs root, so the content area returns to the + Getting started page; showTop makes the flip instant (and covers the + no-op navigation when already on "/"). */} + + + All docs + + {section && ( +
+ {section.icon} + {section.title} +
+ )} + {banner} +
+ ); +} + +function SidebarNavSectionView({ + components, +}: { + components?: Partial; +}) { + return ; +} + +/** + * The sidebar's drill-in navigation: the grouped top-level section list, or + * the current section's page tree behind a back button. Rendered inside the + * shared SidebarViewport so the desktop aside and mobile drawer stay in sync. + */ +export function SidebarNav({ components }: { components?: Partial }) { + const { view } = useSidebarView(); + + if (view === "top") return ; + return ; +} diff --git a/apps/docs/src/components/layout/notebook/sidebar.tsx b/apps/docs/src/components/layout/notebook/sidebar.tsx index 1a82d9cc75..7b24401575 100644 --- a/apps/docs/src/components/layout/notebook/sidebar.tsx +++ b/apps/docs/src/components/layout/notebook/sidebar.tsx @@ -10,14 +10,18 @@ import { createLinkItemRenderer } from "../sidebar/link-item"; import { mergeRefs } from "../../../lib/merge-refs"; import { getVersionedSidebarTree } from "../../../lib/versioned-sidebar-tree"; -const itemVariants = cva( +export const itemVariants = cva( // `rounded-square` (10px) is the brand's soft-pill geometry — the active item // reads as a tinted pill rather than a boxy row. - "relative flex flex-row items-center gap-2 rounded-square p-2 text-start text-fd-muted-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0", + "relative flex flex-row items-center gap-2 rounded-square p-2 text-start text-fd-foreground wrap-anywhere [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { - link: "transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none data-[active=true]:bg-(--shell-sheet) data-[active=true]:text-fd-primary data-[active=true]:shadow-[0_0_0_1px_var(--color-stroke-neutral),0_1px_2px_rgba(21,21,21,0.05)] data-[active=true]:hover:transition-colors", + // Hover spectrum text (fading) + active spectrum ring come from + // `.sidebar-prism-item` (global.css), the sidebar port of the site's + // CTA button states. No transition utilities here — they'd override + // the class's own colour fade. + link: "sidebar-prism-item", button: "transition-colors hover:bg-fd-accent/50 hover:text-fd-accent-foreground/80 hover:transition-none", }, @@ -114,7 +118,7 @@ export function SidebarSeparator({ className, style, children, ...props }: Compo return ( ; -} - -export function SidebarTabsDropdown({ - links, - placeholder, - ...props -}: { - placeholder?: ReactNode; - links: LinkItemType[]; -} & ComponentProps<"button">) { - const [open, setOpen] = useState(false); - const pathname = usePathname(); - - function hasUrl(item: LinkItemType): item is LinkItemType & { url: string } { - return "url" in item && typeof (item as any).url === "string" && !!(item as any).url; - } - function isMenu(item: LinkItemType): item is Extract { - return (item as any)?.type === "menu"; - } - - const options = useMemo(() => { - return links.filter( - (item) => - item.type !== "icon" && - item.type !== "button" && - isLinkItemVisibleOn(item, "menu") && - (hasUrl(item) || isMenu(item)), - ); - }, [links]); - - const isLinkActive = (item: LinkItemType & { url: string }) => { - const activePaths = (item as any).activePaths as string[] | undefined; - if (activePaths?.length) { - return isActiveAny(activePaths, pathname); - } - const activeMode = (item as any).active ?? "url"; - return isActive(item.url, pathname, activeMode === "nested-url"); - }; - const isMenuAnyChildActive = (item: Extract) => { - for (const child of item.items) { - if ("url" in child && child.url && isLinkActive(child as any)) return true; - } - return false; - }; - - const selected = useMemo(() => { - return options.findLast((item) => - hasUrl(item) ? isLinkActive(item) : isMenu(item) && isMenuAnyChildActive(item), - ); - }, [options, pathname]); - - const onClick = () => setOpen(false); - - const item = selected ? ( - <> - {"icon" in selected && (selected as any).icon && ( -
{selected.icon}
- )} -
-

{"text" in selected ? (selected as any).text : null}

-

- {"description" in selected ? (selected as any).description : null} -

-
- - ) : ( - placeholder - ); - - return ( - - {item && ( - - {item} - - - )} - - {options.map((opt, idx) => { - if (hasUrl(opt)) { - const active = selected && hasUrl(selected as any) && opt.url === (selected as any).url; - return ( - - {"icon" in opt && (opt as any).icon && ( -
- {(opt as any).icon} -
- )} -
-

- {"text" in opt ? (opt as any).text : null} -

-

- {"description" in opt ? (opt as any).description : null} -

-
- - -
- ); - } - - if (isMenu(opt)) { - return ( -
-
- {opt.text} -
- {opt.items.map((child, cIdx) => { - if (!("url" in child) || !child.url) return null; - const childActive = isLinkActive(child as any); - return ( - - {"icon" in child && (child as any).icon && ( -
- {(child as any).icon} -
- )} -
-

- {"text" in child ? (child as any).text : null} -

-

- {"description" in child ? (child as any).description : null} -

-
- -
- ); - })} -
- ); - } - - return null; - })} -
-
- ); -} - -export function isTabActive(tab: SidebarTab, pathname: string) { - if (tab.urls) return tab.urls.has(normalize(pathname)); - - return isActive(tab.url, pathname, true); -} diff --git a/apps/docs/src/components/layout/sidebar/tabs/index.tsx b/apps/docs/src/components/layout/sidebar/tabs/index.tsx index 1a5e816daa..a68cdc7523 100644 --- a/apps/docs/src/components/layout/sidebar/tabs/index.tsx +++ b/apps/docs/src/components/layout/sidebar/tabs/index.tsx @@ -1,5 +1,6 @@ import type * as PageTree from "fumadocs-core/page-tree"; import type { ReactNode } from "react"; +import { normalize, isActive } from "../../../../lib/urls"; export interface SidebarTab { /** @@ -50,6 +51,12 @@ export function getSidebarTabs(tree: PageTree.Root): SidebarTab[] { return results; } +export function isTabActive(tab: SidebarTab, pathname: string) { + if (tab.urls) return tab.urls.has(normalize(pathname)); + + return isActive(tab.url, pathname, true); +} + function getFolderUrls(folder: PageTree.Folder, output: Set = new Set()): Set { if (folder.index) output.add(folder.index.url); diff --git a/apps/docs/src/components/toc/clerk.tsx b/apps/docs/src/components/toc/clerk.tsx index af6da32999..aa2fabe979 100644 --- a/apps/docs/src/components/toc/clerk.tsx +++ b/apps/docs/src/components/toc/clerk.tsx @@ -85,7 +85,7 @@ export function TOCItems({ ref, className, ...props }: ComponentProps<"div">) { > )} @@ -132,7 +132,7 @@ function TOCItem({ style={{ paddingInlineStart: getItemOffset(item.depth), }} - className="prose relative py-1.5 text-sm text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary" + className="prose spectrum-text-active relative py-1.5 text-sm text-fd-muted-foreground hover:text-fd-accent-foreground wrap-anywhere first:pt-0 last:pb-0" > {offset !== upperOffset && ( ) { <>
= 4 && "ps-8", diff --git a/apps/docs/src/lib/layout.shared.tsx b/apps/docs/src/lib/layout.shared.tsx index b594729f0d..eff4a25b4a 100644 --- a/apps/docs/src/lib/layout.shared.tsx +++ b/apps/docs/src/lib/layout.shared.tsx @@ -22,62 +22,9 @@ export const logo = ( ); -type LinkItemTypeWithActivePaths = LinkItemType & { - activePaths?: string[]; -}; - -export const links: LinkItemTypeWithActivePaths[] = [ - { - text: "Getting Started", - url: "/", - active: "nested-url", - activePaths: ["/", "/next", "/prisma-orm", "/prisma-postgres", "/prisma-compute"], - }, - { - text: "ORM", - url: "/orm", - active: "nested-url", - activePaths: ["/orm", "/orm/next", "/orm/v6"], - preserveDocsVersion: true, - }, - { - text: "Postgres", - url: "/postgres", - active: "nested-url", - }, - { - text: "Compute", - url: "/compute", - active: "nested-url", - }, - { - text: "Composer", - url: "/composer", - active: "nested-url", - }, - { - text: "CLI", - url: "/cli", - active: "nested-url", - preserveDocsVersion: true, - }, - { - text: "Guides", - url: "/guides", - active: "nested-url", - }, - { - text: "More", - type: "menu", - items: [ - { text: "Management API", url: "/management-api", active: "nested-url" }, - { text: "Studio", url: "/studio", active: "nested-url" }, - { text: "AI", url: "/ai", active: "nested-url" }, - { text: "Query Insights", url: "/query-insights", active: "nested-url" }, - { text: "Accelerate", url: "/accelerate", active: "nested-url" }, - { text: "Console", url: "/console", active: "nested-url" }, - ], - }, +// Section navigation lives in the sidebar (src/lib/sidebar-sections.ts + +// SidebarNav); the navbar only carries external links and buttons. +export const links: LinkItemType[] = [ { type: "icon", label: "Join Discord", diff --git a/apps/docs/src/lib/llms.ts b/apps/docs/src/lib/llms.ts index 58d8576131..a39a0b0687 100644 --- a/apps/docs/src/lib/llms.ts +++ b/apps/docs/src/lib/llms.ts @@ -214,8 +214,8 @@ export const llmsSections: LLMsSection[] = [ slug: "platform", title: "Prisma Platform", description: - "Prisma Console and the Management API for managing projects, environments, and deployments.", - prefixes: ["/console", "/management-api"], + "Prisma Console and the REST API for managing projects, environments, and deployments.", + prefixes: ["/console", "/rest-api"], }, { slug: "compute", diff --git a/apps/docs/src/lib/openapi.ts b/apps/docs/src/lib/openapi.ts index b41fff1d29..de0fdb8bd9 100644 --- a/apps/docs/src/lib/openapi.ts +++ b/apps/docs/src/lib/openapi.ts @@ -99,7 +99,7 @@ async function getOpenAPISpec() { export const openapi = createOpenAPI({ input: async () => { const doc = await getOpenAPISpec(); - return { "management-api": doc }; + return { "rest-api": doc }; }, proxyUrl: "/api/proxy", }); diff --git a/apps/docs/src/lib/sidebar-sections.ts b/apps/docs/src/lib/sidebar-sections.ts new file mode 100644 index 0000000000..0145c45c86 --- /dev/null +++ b/apps/docs/src/lib/sidebar-sections.ts @@ -0,0 +1,46 @@ +/** + * The docs IA: how top-level sections are grouped in the sidebar's landing + * view. Grouping is nav-only — it does not affect URLs or the content tree. + * Entries are matched against the page tree's `root: true` sections by their + * index URL (see `getSidebarTabs`); titles and icons come from the tree, so a + * section renamed in its meta.json needs no change here. An entry with no + * matching section is skipped with a dev-time warning. + */ +export interface SidebarSectionGroup { + /** Group heading rendered above the sections; null renders no heading. */ + heading: string | null; + /** + * Section index URLs, in display order. An entry with a `title` is a plain + * page link rather than a `root: true` section; it renders with that title + * and skips the tree lookup. + */ + sections: { url: string; title?: string }[]; +} + +export const sidebarSectionGroups: SidebarSectionGroup[] = [ + { + heading: "Start", + sections: [{ url: "/" }, { url: "/prisma-compute/deploy", title: "Build your first app" }], + }, + { + heading: "Build", + sections: [{ url: "/orm" }, { url: "/composer" }, { url: "/ai" }], + }, + { + heading: "Deploy", + sections: [{ url: "/compute" }, { url: "/postgres" }], + }, + { + heading: "Manage", + sections: [{ url: "/studio" }, { url: "/query-insights" }, { url: "/console" }], + }, + { + heading: "Reference", + sections: [{ url: "/guides" }, { url: "/cli" }, { url: "/rest-api" }, { url: "/accelerate" }], + }, +]; + +/** Flat list of every section URL in the grouped hierarchy. */ +export const sidebarSectionUrls: string[] = sidebarSectionGroups.flatMap((group) => + group.sections.map((section) => section.url), +); diff --git a/apps/docs/vercel.json b/apps/docs/vercel.json index aea3f47819..593716fd74 100644 --- a/apps/docs/vercel.json +++ b/apps/docs/vercel.json @@ -505,17 +505,17 @@ }, { "source": "/docs/guides/management-api-api-clients", - "destination": "/docs/management-api/api-clients", + "destination": "/docs/rest-api/api-clients", "permanent": true }, { "source": "/docs/guides/management-api", - "destination": "/docs/management-api/partner-integration", + "destination": "/docs/rest-api/partner-integration", "permanent": true }, { "source": "/docs/guides/management-api-basic", - "destination": "/docs/management-api/getting-started", + "destination": "/docs/rest-api/getting-started", "permanent": true }, { @@ -1350,12 +1350,12 @@ }, { "source": "/docs/postgres/introduction/management-api", - "destination": "/docs/management-api/getting-started", + "destination": "/docs/rest-api/getting-started", "permanent": true }, { "source": "/docs/postgres/introduction/management-api-sdk", - "destination": "/docs/management-api/sdk", + "destination": "/docs/rest-api/sdk", "permanent": true }, { "source": "/docs/postgres/introduction", "destination": "/docs/postgres", "permanent": true }, @@ -4195,7 +4195,7 @@ { "source": "/docs/optimize/:path*", "destination": "/docs/query-insights", "permanent": true }, { "source": "/docs/postgres/database/api-reference/management-api", - "destination": "/docs/management-api#getting-started", + "destination": "/docs/rest-api#getting-started", "permanent": true }, { diff --git a/apps/site/src/app/contact/page.tsx b/apps/site/src/app/contact/page.tsx index 0024a24999..705f63b4ad 100644 --- a/apps/site/src/app/contact/page.tsx +++ b/apps/site/src/app/contact/page.tsx @@ -1,13 +1,12 @@ -import type { Metadata } from "next" -import { ContactHero } from "@/components/sections/contact-hero" -import { ContactSupport } from "@/components/sections/contact-support" -import { CtaBurst } from "@/components/sections/cta-burst" +import type { Metadata } from "next"; +import { ContactHero } from "@/components/sections/contact-hero"; +import { ContactSupport } from "@/components/sections/contact-support"; +import { CtaBurst } from "@/components/sections/cta-burst"; export const metadata: Metadata = { title: "Contact", - description: - "Tell us what you're working on and we'll route your message to the right person.", -} + description: "Tell us what you're working on and we'll route your message to the right person.", +}; // Built from the approved contact copy, verbatim. Three sections: the wrapped // hero panel carrying the form, the three support channels, and the site's @@ -37,5 +36,5 @@ export default function ContactPage() { secondaryCta={{ label: "Read the docs", href: "/docs" }} /> - ) + ); } diff --git a/apps/site/src/app/layout.tsx b/apps/site/src/app/layout.tsx index 363823852b..9382386df7 100644 --- a/apps/site/src/app/layout.tsx +++ b/apps/site/src/app/layout.tsx @@ -70,11 +70,7 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - +