Skip to content

Conversation

@ankur-arch
Copy link
Contributor

@ankur-arch ankur-arch commented Aug 25, 2025

Summary by CodeRabbit

  • New Features

    • Create Database payload can restore from a backup via a new fromDatabase field.
    • Workspace Integrations API: list integrations (paginated) and revoke integration tokens.
    • npx create-db: added --json (-j) CLI flag.
  • Bug Fixes / Removals

    • Removed public backup-restore REST endpoint; added docs redirect from old anchor.
    • Endpoint doc header renamed to DELETE /connections/{id}.
  • Documentation

    • Updated OAuth/service-token flows, OpenAPI tip label, driver adapters/TypedSQL, Vercel Fluid guidance, prisma-client runtimes, and AI safety guardrails.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Walkthrough

Docs update: Postgres Management API adds workspace integration list/delete endpoints, removes the backup-restore endpoint, and extends the create-database payload with a fromDatabase object. A static redirect for the removed restore anchor was added. Documentation additions cover driver adapters/TypedSQL and using Prisma with Vercel Fluid; several AI Safety guardrail blocks were added (some duplicated).

Changes

Cohort / File(s) Summary of Changes
Postgres Management API docs
content/250-postgres/100-introduction/230-management-api.mdx
Added GET /workspaces/{workspaceId}/integrations (paginated list with client and creator info) and DELETE /workspaces/{workspaceId}/integrations/{clientId}; removed POST /databases/{databaseId}/backups/{backupId}/restore; extended POST /projects/{projectId}/databases payload with fromDatabase { id, backupId }; renamed /connections/{id} header to DELETE /connections/{id}; standardized tip label to OpenAPI.
Static redirect
static/_redirects
Added redirect from /postgres/introduction/management-api#post-databasesdatabaseidbackupsbackupidrestore to /postgres/introduction/management-api#post-projectsprojectiddatabases.
TypedSQL / driver adapters docs
content/200-orm/050-overview/500-databases/200-database-drivers.mdx, content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx
Inserted guidance on using driver adapters with TypedSQL (compatibility note: all adapters except @prisma/adapter-better-sqlite3; recommend @prisma/adapter-libsql for SQLite); small typo fixes; note: duplicated insertion in one file.
Prisma + Vercel Fluid docs
content/200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx, content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx
Added "Using Prisma ORM with Vercel Fluid" sections showing use of attachDatabasePool with driver adapters and a TypeScript example for safe connection management.
AI Safety guardrails (multiple docs)
content/200-orm/500-reference/200-prisma-cli-reference.mdx, content/200-orm/800-more/350-ai-tools/100-cursor.mdx, content/250-postgres/1100-integrations/400-mcp-server.mdx
Added "AI Safety guardrails for destructive commands" blocks describing detection of AI agents and a blocking/consent workflow for destructive CLI actions (e.g., prisma migrate reset --force); several blocks duplicated.
Prisma schema runtime docs
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx, content/200-orm/500-reference/100-prisma-schema-reference.mdx
Updated documented allowed runtime values for the prisma-client generator/provider: removed deno-deploy, adjusted edge/runtime aliasing (introduces vercel-edge with alias edge-light), clarified multi-file client output (Before/After examples).
npx create-db CLI docs
content/250-postgres/100-introduction/220-npx-create-db.mdx
Added --json (-j) CLI flag describing machine-readable JSON output.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as Management API
  participant Auth as Auth Service
  participant Store as Workspace Store

  Client->>API: GET /workspaces/{workspaceId}/integrations?cursor&limit
  API->>Auth: Validate Authorization (service token / OAuth)
  Auth-->>API: OK / 401
  alt Authorized
    API->>Store: Fetch integrations (paginated)
    Store-->>API: integrations + cursor
    API-->>Client: 200 { items, cursor }
  else Unauthorized
    API-->>Client: 401
  end

  Client->>API: DELETE /workspaces/{workspaceId}/integrations/{clientId}
  API->>Auth: Validate Authorization
  Auth-->>API: OK / 401
  alt Authorized
    API->>Store: Revoke integration tokens for clientId
    Store-->>API: Success
    API-->>Client: 204 No Content
  else Unauthorized
    API-->>Client: 401
  end
Loading
sequenceDiagram
  autonumber
  actor Client
  participant API as Management API
  participant Projects as Projects Store
  participant Backups as Backups Store

  Client->>API: POST /projects/{projectId}/databases { name, region, isDefault, fromDatabase:{id,backupId} }
  API->>Backups: Validate fromDatabase.id & backupId
  Backups-->>API: Found / Not found
  alt Backup found
    API->>Projects: Create database restored from backup
    Projects-->>API: 201 Created
    API-->>Client: 201 Created
  else Not found
    API-->>Client: 404 Not Found
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • nikolasburk
  • nurul3101
  • petradonka
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/6.15-ankur

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@github-actions
Copy link
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2025

original preview
content/200-orm/050-overview/500-databases/200-database-drivers.mdx content/200-orm/050-overview/500-databases/200-database-drivers.mdx
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx
content/200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx content/200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx
content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx
content/200-orm/500-reference/100-prisma-schema-reference.mdx content/200-orm/500-reference/100-prisma-schema-reference.mdx
content/200-orm/500-reference/200-prisma-cli-reference.mdx content/200-orm/500-reference/200-prisma-cli-reference.mdx
content/200-orm/800-more/350-ai-tools/100-cursor.mdx content/200-orm/800-more/350-ai-tools/100-cursor.mdx
content/250-postgres/100-introduction/220-npx-create-db.mdx content/250-postgres/100-introduction/220-npx-create-db.mdx
content/250-postgres/100-introduction/230-management-api.mdx content/250-postgres/100-introduction/230-management-api.mdx
content/250-postgres/1100-integrations/400-mcp-server.mdx content/250-postgres/1100-integrations/400-mcp-server.mdx
content/800-guides/240-management-api.mdx content/800-guides/240-management-api.mdx
content/800-guides/350-authjs-nextjs.mdx content/800-guides/350-authjs-nextjs.mdx

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 25, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: d2ae3dd
Status: ✅  Deploy successful!
Preview URL: https://c21dd29e.docs-51g.pages.dev
Branch Preview URL: https://docs-6-15-ankur.docs-51g.pages.dev

View logs

@ankur-arch ankur-arch self-assigned this Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
content/250-postgres/100-introduction/230-management-api.mdx (2)

326-346: Enhance Integrations list endpoint with example and scope details

The section is clear, but adding a compact example response will reduce guesswork. If scopes are enumerable, link to or list them; if free-form, say so.

Example minimal addition after the Responses list:

##### Example response (200 OK)
```json
{
  "items": [
    {
      "id": "itgr_5678",
      "createdAt": "2025-08-01T12:00:00Z",
      "scopes": ["projects:read", "databases:write"],
      "client": { "id": "cl_abc", "name": "Acme App", "createdAt": "2025-07-20T10:00:00Z" },
      "createdByUser": { "id": "usr_123", "email": "dev@example.com", "displayName": "Dev User" }
    }
  ],
  "nextCursor": null
}

Nit: For consistency with earlier sections (“Retrieve …”), consider rephrasing “Returns integrations for the given workspace.” to “Retrieve integrations for the given workspace.”

---

`349-358`: **Clarify deletion semantics and add a cURL example**

Consider stating whether this is idempotent (e.g., revoking already-revoked tokens still returns 204 vs 404). Also, a short example improves usability.




Suggested addition:

```mdx
##### Example
```terminal
curl -X DELETE "https://api.prisma.io/v1/workspaces/{workspaceId}/integrations/{clientId}" \
  -H "Authorization: Bearer $TOKEN"

Note: This operation revokes issued tokens for the integration client. It does not delete the underlying client application.


</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

**💡 Knowledge Base configuration:**

- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between f27cabd564c0eaeff0ce7854656f410837e3ea8b and 7baa25ec2ca0b8003da4d0f4b28c63aaa500a1bb.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `content/250-postgres/100-introduction/230-management-api.mdx` (2 hunks)
* `static/_redirects` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>content/250-postgres/100-introduction/230-management-api.mdx</summary>

[grammar] ~332-~332: There might be a mistake here.
Context: ...given workspace.  - **Path parameters**:   - `workspaceId`: Workspace ID - **Query parameters**:  ...

(QB_NEW_EN)

---

[grammar] ~333-~333: There might be a mistake here.
Context: ...eters**:   - `workspaceId`: Workspace ID - **Query parameters**:   - `cursor` (option...

(QB_NEW_EN)

---

[grammar] ~336-~336: There might be a mistake here.
Context: ..., default: 100): Limit number of results - **Responses**:   - `200 OK`: List of integ...

(QB_NEW_EN)

---

[grammar] ~352-~352: There might be a mistake here.
Context: ...given client ID.  - **Path parameters**:   - `workspaceId`: Workspace ID (e.g. `wksp_1234`)   - `c...

(QB_NEW_EN)

---

[grammar] ~353-~353: There might be a mistake here.
Context: ...paceId`: Workspace ID (e.g. `wksp_1234`)   - `clientId`: Integration client ID (e.g. `itgr_5678...

(QB_NEW_EN)

---

[grammar] ~354-~354: There might be a mistake here.
Context: ...Integration client ID (e.g. `itgr_5678`) - **Responses**:   - `204 No Content`: Integ...

(QB_NEW_EN)

---

[grammar] ~355-~355: There might be a mistake here.
Context: ...t ID (e.g. `itgr_5678`) - **Responses**:   - `204 No Content`: Integration tokens revoked successfull...

(QB_NEW_EN)

---

[grammar] ~356-~356: There might be a mistake here.
Context: ... Integration tokens revoked successfully   - `401 Unauthorized`: Missing or invalid authentication toke...

(QB_NEW_EN)

---

[grammar] ~357-~357: There might be a mistake here.
Context: ... Missing or invalid authentication token   - `404 Not Found`: Workspace or integration not found  ##...

(QB_NEW_EN)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)</summary>

* GitHub Check: Check internal links
* GitHub Check: runner / linkspector
* GitHub Check: Lost Pixel

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>content/250-postgres/100-introduction/230-management-api.mdx (1)</summary><blockquote>

`230-235`: **Fix invalid JSON in the `POST /projects/{projectId}/databases` example**

Apply this minimal diff to remove the inline comment and produce valid JSON:

```diff
  {
    "region": "us-east-1",
    "name": "My Database",
    "isDefault": false,
-   // fromDatabase is needed in case of restoring from backup
    "fromDatabase": { 
      "id": "databaseId", 
      "backupId": "string"
    }
  }

Recommended follow-ups (optional but helpful):

  • Add a prose note immediately below the code block, e.g.:

    Use the fromDatabase field to restore from an existing database backup.

  • Clarify in the documentation whether both fromDatabase.id and fromDatabase.backupId are required, or if one is optional. If one is optional, document the validation rules and precedence.

Please confirm against the OpenAPI/Swagger specification for your API to ensure the example matches the exact fromDatabase schema and its constraints.

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
content/250-postgres/100-introduction/230-management-api.mdx (1)

226-236: JSON block includes comments; switch to JSONC or move comments outside the block.

The request body uses // comments, which are invalid in JSON. Either mark the block as jsonc or pull the explanation into prose.

Suggested fix:

-```json
+```jsonc
 {
   "region": "us-east-1",
   "name": "My Database",
   "isDefault": false,
-  // fromDatabase is needed in case of restoring from backup
+  // fromDatabase is used for restoration from a backup
   "fromDatabase": { 
     "id": "databaseId", 
     "backupId": "string"
   }
 }

Or move the note out of the code block:

```diff
-```json
-{
-  ...
-  "isDefault": false,
-  // fromDatabase is needed in case of restoring from backup
-  "fromDatabase": { 
-    "id": "databaseId", 
-    "backupId": "string"
-  }
-}
-```
+// Use `fromDatabase` when restoring from a backup.
+```json
+{
+  "region": "us-east-1",
+  "name": "My Database",
+  "isDefault": false,
+  "fromDatabase": {
+    "id": "databaseId",
+    "backupId": "string"
+  }
+}
+```
🧹 Nitpick comments (6)
content/200-orm/050-overview/500-databases/200-database-drivers.mdx (1)

239-244: Consolidate the new TypedSQL note and tighten wording.

  • This section duplicates the new tip you added in TypedSQL docs; consider consolidating to avoid drift. Link to the canonical section rather than repeating full compatibility text.
  • Minor copy edit: “with the exception of” → “except”.

Proposed copy tweak:

-You can also use driver adapters together with TypedSQL to connect through JavaScript database drivers. TypedSQL works with all supported driver adapters except `@prisma/adapter-better-sqlite3`. For SQLite support, use [`@prisma/adapter-libsql`](https://www.npmjs.com/package/@prisma/adapter-libsql) instead.
+You can also use driver adapters with TypedSQL to connect through JavaScript database drivers. TypedSQL works with all supported driver adapters except `@prisma/adapter-better-sqlite3`. For SQLite, use [`@prisma/adapter-libsql`](https://www.npmjs.com/package/@prisma/adapter-libsql) instead.

If you prefer to de-duplicate:

-### Driver adapters and TypedSQL
-
-[TypedSQL](/orm/prisma-client/using-raw-sql/typedsql) lets you write fully type-safe SQL queries that integrate directly with Prisma Client. This feature is useful if you want the flexibility of writing SQL while still benefiting from Prisma's type-safety.
-
-You can also use driver adapters together with TypedSQL to connect through JavaScript database drivers. TypedSQL works with all supported driver adapters except `@prisma/adapter-better-sqlite3`. For SQLite support, use [`@prisma/adapter-libsql`](https://www.npmjs.com/package/@prisma/adapter-libsql) instead.
+### Driver adapters and TypedSQL
+
+See how to use driver adapters with TypedSQL, including adapter compatibility notes, in the [TypedSQL guide](/orm/prisma-client/using-raw-sql/typedsql#using-driver-adapters-with-typedsql).
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx (3)

27-32: Tip placement and cross-doc consistency look good. Minor style tweak suggested.

The tip correctly mirrors the driver adapters page. Consider “except” instead of “with the exception of” for tighter copy, and ensure this is the single source of truth to avoid future drift.

-Driver adapters are compatible with TypedSQL, with the exception of `@prisma/adapter-better-sqlite3`. For SQLite support, use [`@prisma/adapter-libsql`](https://www.npmjs.com/package/@prisma/adapter-libsql) instead. All other driver adapters are supported.
+Driver adapters are compatible with TypedSQL, except `@prisma/adapter-better-sqlite3`. For SQLite, use [`@prisma/adapter-libsql`](https://www.npmjs.com/package/@prisma/adapter-libsql). All other driver adapters are supported.

107-107: Typo: “Postional” → “Positional”.

- In SQLite, there are a number of different placeholders you can use. Postional placeholders (`$1`, `$2`, etc.), general placeholders (`?`), and named placeholders (`:minAge`, `:maxAge`, etc.) are all available. For this example, we'll use named placeholders `:minAge` and `:maxAge`:
+ In SQLite, there are a number of different placeholders you can use. Positional placeholders (`$1`, `$2`, etc.), general placeholders (`?`), and named placeholders (`:minAge`, `:maxAge`, etc.) are all available. For this example, we'll use named placeholders `:minAge` and `:maxAge`:

205-205: Grammar: “Manually argument type definitions” → “Manual argument type definitions”.

-Manually argument type definitions are not supported for array arguments. For these arguments, you will need to rely on the type inference provided by TypedSQL.
+Manual argument type definitions are not supported for array arguments. For these arguments, you will need to rely on the type inference provided by TypedSQL.
content/250-postgres/100-introduction/230-management-api.mdx (2)

328-346: Add a compact example response for list integrations.

Great addition. A minimal example helps consumers quickly map shapes.

 - **Responses**:
   - `200 OK`: List of integrations with details:
     - `id`: Integration ID
     - `createdAt`: Creation timestamp
     - `scopes`: Array of granted scopes
     - `client`: Object containing `id`, `name`, `createdAt`
     - `createdByUser`: Object containing `id`, `email`, `displayName`
   - `401 Unauthorized`: Missing or invalid authentication token
   - `404 Not Found`: Workspace not found
+
+  Example:
+  ```json
+  {
+    "items": [
+      {
+        "id": "int_123",
+        "createdAt": "2025-08-01T12:34:56Z",
+        "scopes": ["projects:read", "databases:write"],
+        "client": { "id": "itgr_5678", "name": "Acme CI", "createdAt": "2025-07-10T08:00:00Z" },
+        "createdByUser": { "id": "usr_9", "email": "dev@acme.com", "displayName": "Jane Doe" }
+      }
+    ],
+    "nextCursor": null
+  }
+  ```

348-359: Document idempotency/error cases for DELETE integration.

Consider noting behavior if the integration is already revoked, and whether the operation is idempotent. Also add a simple curl example.

 - **Responses**:
   - `204 No Content`: Integration tokens revoked successfully
   - `401 Unauthorized`: Missing or invalid authentication token
   - `404 Not Found`: Workspace or integration not found
+  - `409 Conflict`: Integration already revoked (if applicable)
+
+Example:
+```terminal
+curl -X DELETE "https://api.prisma.io/v1/workspaces/wksp_1234/integrations/itgr_5678" \
+  -H "Authorization: Bearer $TOKEN"
+```
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7baa25e and 39f5878.

📒 Files selected for processing (3)
  • content/200-orm/050-overview/500-databases/200-database-drivers.mdx (1 hunks)
  • content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx (1 hunks)
  • content/250-postgres/100-introduction/230-management-api.mdx (2 hunks)
🧰 Additional context used
🪛 LanguageTool
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx

[style] ~30-~30: ‘with the exception of’ might be wordy. Consider a shorter alternative.
Context: ... adapters are compatible with TypedSQL, with the exception of @prisma/adapter-better-sqlite3. For S...

(EN_WORDINESS_PREMIUM_WITH_THE_EXCEPTION_OF)

content/250-postgres/100-introduction/230-management-api.mdx

[grammar] ~332-~332: There might be a mistake here.
Context: ...given workspace. - Path parameters: - workspaceId: Workspace ID - Query parameters: ...

(QB_NEW_EN)


[grammar] ~333-~333: There might be a mistake here.
Context: ...eters**: - workspaceId: Workspace ID - Query parameters: - cursor (option...

(QB_NEW_EN)


[grammar] ~336-~336: There might be a mistake here.
Context: ..., default: 100): Limit number of results - Responses: - 200 OK: List of integ...

(QB_NEW_EN)


[grammar] ~352-~352: There might be a mistake here.
Context: ...given client ID. - Path parameters: - workspaceId: Workspace ID (e.g. wksp_1234) - `c...

(QB_NEW_EN)


[grammar] ~353-~353: There might be a mistake here.
Context: ...paceId: Workspace ID (e.g. wksp_1234) - clientId: Integration client ID (e.g. itgr_5678...

(QB_NEW_EN)


[grammar] ~354-~354: There might be a mistake here.
Context: ...Integration client ID (e.g. itgr_5678) - Responses: - 204 No Content: Integ...

(QB_NEW_EN)


[grammar] ~355-~355: There might be a mistake here.
Context: ...t ID (e.g. itgr_5678) - Responses: - 204 No Content: Integration tokens revoked successfull...

(QB_NEW_EN)


[grammar] ~356-~356: There might be a mistake here.
Context: ... Integration tokens revoked successfully - 401 Unauthorized: Missing or invalid authentication toke...

(QB_NEW_EN)


[grammar] ~357-~357: There might be a mistake here.
Context: ... Missing or invalid authentication token - 404 Not Found: Workspace or integration not found ##...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Lost Pixel
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx (1)

12-26: Version floor sanity-check for 6.15 docs.

The minimum version here is “at least 5.19.0”. Since this PR is “updated docs for 6.15”, please confirm this floor is still accurate (e.g., whether any features used later in the page require a newer 6.x). If needed, bump or rephrase to “latest” for simplicity.

Do you want me to open a follow-up to audit version floors across TypedSQL pages?

content/250-postgres/100-introduction/230-management-api.mdx (3)

226-236: Clarify fromDatabase semantics and constraints.

Consider documenting:

  • Whether both id and backupId are required.
  • What happens if isDefault is true when restoring.
  • Allowed backupId formats and validation errors.

I can propose a short schema-style table for these fields if you confirm the rules.


311-326: Restore endpoint removal: ensure redirect and cross-references are updated.

You removed the explicit restore endpoint and introduced fromDatabase on create. Verify:

  • Static redirect from the old anchor/path to the new flow is present.
  • Any guides/snippets referencing the old restore path are updated.

I can scan the repo for occurrences of /backups/{backupId}/restore and prepare a patch to update links.


255-265: Response code consistency for deletes (optional).

Elsewhere deletes return 204 No Content (projects, connections). Here, delete database returns 200 OK. If the API truly returns 200 with a body, keep it; otherwise consider aligning to 204 for consistency.

If confirmed 200, adding an example response body would help justify the difference.

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (6)
content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx (6)

508-513: Clarify runtime scope (Node.js vs Edge) to prevent misuse of pg on Edge.

This example uses node-postgres (pg), which only works in the Node.js runtime. Since Fluid supports both Edge and Node.js, add an explicit note so readers don’t try this snippet on Edge (where pg is unsupported on this page, see Line 50).

 ### Using Prisma ORM with Vercel Fluid

 [Fluid compute](https://vercel.com/fluid) is a compute model from Vercel that combines the flexibility of serverless with the stability of servers, making it ideal for dynamic workloads such as streaming data and AI APIs. Vercel's Fluid compute [supports both edge and Node.js runtimes](https://vercel.com/docs/fluid-compute#available-runtime-support). A common challenge in traditional serverless platforms is leaked database connections when functions are suspended and pools can't close idle connections. Fluid provides [`attachDatabasePool`](https://vercel.com/blog/the-real-serverless-compute-to-database-connection-problem-solved) to ensure idle connections are released before a function is suspended.

-Use `attachDatabasePool` together with [Prisma's driver adapters](/orm/overview/databases/database-drivers) to safely manage connections in Fluid:
+:::note
+This example targets the Node.js runtime. For Edge, use an Edge‑compatible driver (e.g., Prisma Postgres, Neon Serverless, PlanetScale Serverless) with the corresponding Prisma driver adapter, as shown earlier on this page.
+:::
+
+Use `attachDatabasePool` together with [Prisma's driver adapters](/orm/overview/databases/database-drivers#driver-adapters) to safely manage connections in Fluid:

514-514: Remove trailing space in code fence language tag.

Minor formatting nit: standardize to “```ts” (no trailing space) to match house style.

-```ts 
+```ts

512-513: Deep-link to the driver adapters anchor for quicker navigation.

Small docs UX tweak: link directly to the “Driver adapters” section.

-Use `attachDatabasePool` together with [Prisma's driver adapters](/orm/overview/databases/database-drivers) to safely manage connections in Fluid:
+Use `attachDatabasePool` together with [Prisma's driver adapters](/orm/overview/databases/database-drivers#driver-adapters) to safely manage connections in Fluid:

520-521: Align environment variable name with prior guidance on this page.

Elsewhere on this page, Vercel Postgres examples use POSTGRES_PRISMA_URL (pooled) or DATABASE_URL. Using POSTGRES_URL here may confuse readers. Consider switching to POSTGRES_PRISMA_URL (or DATABASE_URL for generic docs) for consistency.

-const pool = new Pool({ connectionString: process.env.POSTGRES_URL })
+// Prefer the same var name used earlier on this page to reduce confusion:
+const pool = new Pool({ connectionString: process.env.POSTGRES_PRISMA_URL ?? process.env.DATABASE_URL })

If we keep POSTGRES_URL, add a short note explaining when to choose each.


514-527: Optional: demonstrate a reusable PrismaClient instance to avoid re-instantiation.

While Fluid reduces suspended-connection issues, showing a module-scoped singleton pattern is a good default for Node.js runtimes to minimize client re-creation.

 import { Pool } from 'pg'
 import { attachDatabasePool } from '@vercel/functions'
 import { PrismaPg } from '@prisma/adapter-pg'
 import { PrismaClient } from '@prisma/client'

-const pool = new Pool({ connectionString: process.env.POSTGRES_URL })
+const pool = new Pool({ connectionString: process.env.POSTGRES_PRISMA_URL ?? process.env.DATABASE_URL })

 attachDatabasePool(pool)

-const prisma = new PrismaClient({
-  adapter: new PrismaPg(pool),
-})
+const adapter = new PrismaPg(pool)
+
+// Optional singleton pattern (Node.js runtime)
+// Avoids creating multiple PrismaClient instances in dev/hot-reload/serverless cold starts.
+const globalForPrisma = globalThis as unknown as { prisma?: PrismaClient }
+export const prisma =
+  globalForPrisma.prisma ??
+  new PrismaClient({ adapter })
+
+if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma

508-513: Remind readers to enable driverAdapters in their Prisma schema when using adapters.

Earlier sections enable the Preview feature explicitly; this new section should briefly call that out to prevent “Unknown arg adapter” issues.

-Use `attachDatabasePool` together with [Prisma's driver adapters](/orm/overview/databases/database-drivers#driver-adapters) to safely manage connections in Fluid:
+Use `attachDatabasePool` together with [Prisma's driver adapters](/orm/overview/databases/database-drivers#driver-adapters) to safely manage connections in Fluid. Ensure the `driverAdapters` Preview feature is enabled in your Prisma schema:
+
+```prisma
+generator client {
+  provider        = "prisma-client-js"
+  previewFeatures = ["driverAdapters"]
+}
+```
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 39f5878 and c6fb34e.

📒 Files selected for processing (2)
  • content/200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx (1 hunks)
  • content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • content/200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages
  • GitHub Check: Lost Pixel
🔇 Additional comments (1)
content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx (1)

510-511: Prefer the official “Connection Pooling with Serverless Functions” guide for attachDatabasePool

Instead of linking to the blog post, use the canonical reference in Vercel’s guides:

• Replace
https://vercel.com/blog/the-real-serverless-compute-to-database-connection-problem-solved
with
https://vercel.com/guides/connection-pooling-with-serverless-functions#attachDatabasePool (vercel.com)

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
content/200-orm/800-more/350-ai-tools/100-cursor.mdx (2)

550-576: Fix typos, tighten wording, and format the env var consistently in guardrails block

  • Spelling/grammar: “perfoming” → “performing”, “perfomed” → “performed”, “assesment” → “assessment”.
  • Consistency: Wrap the environment variable name in backticks.
  • Optional: Add a short note clarifying the version these guardrails ship with (for example, “Available since Prisma 6.15”) to anchor expectations.

Proposed diff:

-You must stop at this point and respond to the user with a clear message that includes the following information:
+You must stop at this point and respond to the user with a clear message that includes the following information:
@@
-- Your motivation and reasoning for perfoming this action.
+- Your motivation and reasoning for performing this action.
@@
-- Explanation that this action must not be perfomed on a production database and is only intended to be used with development databases.
+- Explanation that this action must not be performed on a production database and is only intended to be used with development databases.
@@
-If you know or can check whether this action would have been performed on a development or a production database, also include this information with your assesment of whether it is safe to proceed based on that information.
+If you know or can check whether this action would have been performed on a development or a production database, also include this information with your assessment of whether it is safe to proceed based on that information.
@@
-If they explicitly consent, you may rerun this command with PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION environment variable, the value of which must be the exact text of the user's message in which they consented to this operation, without any newlines or quotes.
+If they explicitly consent, you may rerun this command with the `PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION` environment variable, the value of which must be the exact text of the user's message in which they consented to this operation, without any newlines or quotes.

Optional addition (confirm version before adding):

-Prisma ORM includes built-in safety checks to prevent **accidental destructive commands** when run through AI coding assistants.
+Prisma ORM includes built-in safety checks to prevent **accidental destructive commands** when run through AI coding assistants. _(Available since Prisma 6.15.)_

578-579: Add a concrete consent example to reduce ambiguity

A one-line example helps users and AI agents set the variable correctly and avoids newline/quote pitfalls.

Proposed addition immediately after the paragraph:

 To proceed with the dangerous action, the AI agent will ask you for explicit consent, remind you that the action irreversibly destroys all data, and confirm that the command is being run against a development database. Once you clearly confirm, the AI will set the PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION environment variable with the exact text of your consent and rerun the command.
+
+For example:
+
+```bash
+# Replace the value with your exact consent message, no quotes, no newlines
+PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION=Yes\ I\ understand\ this\ will\ destroy\ all\ data\ in\ my\ development\ database\ and\ want\ to\ proceed \
+  prisma migrate reset --force
+```
content/200-orm/500-reference/200-prisma-cli-reference.mdx (2)

1225-1254: Fix typos and format the env var; align wording with Cursor page

Mirror the spelling fixes and environment variable formatting here for consistency with the Cursor guide.

Proposed diff:

-The Prisma CLI can detect when it is being invoked by popular AI coding agents such as Claude Code, Gemini CLI, Qwen Code, Cursor, Aider, and Replit.
+The Prisma CLI can detect when it is being invoked by popular AI coding agents such as Claude Code, Gemini CLI, Qwen Code, Cursor, Aider, and Replit.
@@
-- Your motivation and reasoning for perfoming this action.
+- Your motivation and reasoning for performing this action.
@@
-- Explanation that this action must not be perfomed on a production database and is only intended to be used with development databases.
+- Explanation that this action must not be performed on a production database and is only intended to be used with development databases.
@@
-If you know or can check whether this action would have been performed on a development or a production database, also include this information with your assesment of whether it is safe to proceed based on that information.
+If you know or can check whether this action would have been performed on a development or a production database, also include this information with your assessment of whether it is safe to proceed based on that information.
@@
-If they explicitly consent, you may rerun this command with PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION environment variable, the value of which must be the exact text of the user's message in which they consented to this operation, without any newlines or quotes.
+If they explicitly consent, you may rerun this command with the `PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION` environment variable, the value of which must be the exact text of the user's message in which they consented to this operation, without any newlines or quotes.

1225-1254: Centralize AI Safety guardrails into a shared partial
You’ve got identical “AI Safety guardrails” blocks in multiple places—anytime we update one, we’ll need to remember to update all of them. Extract this text into a single include/partial and reference it where needed to avoid future drift.

Files containing the duplicate block:

  • content/250-postgres/1100-integrations/400-mcp-server.mdx (lines 424–428)
  • content/200-orm/500-reference/200-prisma-cli-reference.mdx (lines 1225–1229)
  • content/200-orm/800-more/350-ai-tools/100-cursor.mdx (lines 550–552)

Recommended approach (if your docs tooling supports MDX partials):

  1. Create a shared file, e.g.
    /content/partials/ai-safety-guardrails.mdx

  2. Move the guardrails block into that file.

  3. Replace the inline sections with an import and component, e.g.:

    import AIGuardrails from '../partials/ai-safety-guardrails.mdx'
    
    <AIGuardrails />

If you can’t use MDX partials, consider your template or include mechanism to pull in the guardrails text. This will ensure all instances stay perfectly in sync.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c6fb34e and e5ae067.

📒 Files selected for processing (3)
  • content/200-orm/500-reference/200-prisma-cli-reference.mdx (1 hunks)
  • content/200-orm/800-more/350-ai-tools/100-cursor.mdx (1 hunks)
  • content/250-postgres/1100-integrations/400-mcp-server.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • content/250-postgres/1100-integrations/400-mcp-server.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Lost Pixel
🔇 Additional comments (1)
content/200-orm/800-more/350-ai-tools/100-cursor.mdx (1)

585-585: LGTM: minor link tweak

The “Learn more about Cursor” link change looks good.

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (6)
content/250-postgres/100-introduction/220-npx-create-db.mdx (5)

167-180: Update the --help snippet to include the new --json/-j flag.

The example help output is now inconsistent with the options table. Add the JSON flag (ideally grouped with the other flags) and keep the description consistent.

Apply this diff to the help block:

 Options:
   --region <region>, -r <region>  Specify a region
                                   Available regions:
                                   ap-southeast-1, ap-northeast-1,
                                   eu-central-1, eu-west-3,
                                   us-east-1, us-west-1

   --interactive, -i               Run in interactive mode
+
+  --json, -j                      Output machine-readable JSON and exit
-
   --help, -h                      Show this help message

41-44: Tighten grammar in the region sentence.

Minor phrasing nit: the extra “in” makes the sentence clunky.

- The default region is `us-east-1`. You can specify the region where you want to provision the database in using the `--region` flag. See [the section below](#available-cli-options) to view all the CLI options.
+ The default region is `us-east-1`. You can specify the region to provision the database using the `--region` flag. See [the section below](#available-cli-options) to view all CLI options.

70-98: Consider adding a short “JSON mode” example next to the TTY output.

Since we introduce --json/-j, it helps readers to see how the output looks and what fields to expect (claim URL, region, and the two connection strings). Keep it concise and redact secrets.

If you’re open to it, I can draft a minimal example once you confirm the exact field names from the CLI’s current output.


145-151: Optional consistency pass on punctuation in the options table.

Two rows end with a period (--interactive, --help) while --region and --json do not consistently end with periods. Aligning punctuation improves polish.

-| `--region`    | `-r`      | Specify a region. <br /> **Available regions:** `ap-southeast-1`, `ap-northeast-1`, `eu-central-1`, `eu-west-3`, `us-east-1`, `us-west-1` |
+| `--region`    | `-r`      | Specify a region. <br /> **Available regions:** `ap-southeast-1`, `ap-northeast-1`, `eu-central-1`, `eu-west-3`, `us-east-1`, `us-west-1`. |
-| `--json` | `-j`    | Output machine-readable JSON and exit.                                         |
+| `--json` | `-j`    | Output machine-readable JSON and exit.                                         |

141-151: Optional: add a “New in 6.15” note for discoverability.

If the docs style guide supports “New in X.Y” badges or callouts, consider tagging the --json flag (and mentioning it in the --help block) as added in 6.15 to help readers understand version availability.

Confirm whether your docs system uses a standard component (e.g., or a callout) so I can propose the exact markup.

Also applies to: 167-180

content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (1)

220-224: Future-proof the internal-codepath note (minor copy tweak).

To reduce the risk of this statement aging poorly and to clarify intent, consider this wording:

-`nodejs`, `deno`, and `bun` all map to the same internal codepath but are preserved as separate user-facing values for clarity.
+Currently, `nodejs`, `deno`, and `bun` map to the same internal code path. They remain separate user‑facing values for clarity and to allow environment‑specific behavior in the future.

If this mapping is expected to change soon, add a version guard (for example, “as of Prisma ORM 6.15”) to lock the statement to a known release.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e5ae067 and 19f10b4.

📒 Files selected for processing (3)
  • content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (1 hunks)
  • content/200-orm/500-reference/100-prisma-schema-reference.mdx (1 hunks)
  • content/250-postgres/100-introduction/220-npx-create-db.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx

[style] ~218-~218: To form a complete sentence, be sure to include a subject.
Context: ...xtension used in import statements. Can be ts, mts, cts, js, mjs, `cj...

(MISSING_IT_THERE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Lost Pixel
🔇 Additional comments (1)
content/250-postgres/100-introduction/220-npx-create-db.mdx (1)

149-149: Nice addition of the --json/-j flag to the options table.

The wording is clear and consistent with the other rows. Placement after --interactive also reads well.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
content/800-guides/240-management-api.mdx (1)

145-151: Use “service token” consistently in transfer call header.

Earlier sections standardize on “service token.” Rename placeholder to avoid confusion.

-    Authorization: `Bearer ${YOUR_INTEGRATION_TOKEN}`,
+    Authorization: `Bearer ${process.env.PRISMA_SERVICE_TOKEN!}`,
content/250-postgres/100-introduction/230-management-api.mdx (1)

314-321: Specify the HTTP method in the heading for connections deletion.

The section title omits the verb.

-#### `/connections/{id}`
+#### `DELETE /connections/{id}`
🧹 Nitpick comments (9)
content/800-guides/240-management-api.mdx (5)

44-55: Grammar and clarity in “Get OAuth credentials.”

Minor fixes and tightened wording.

-## Get OAuth credentials
+## Get OAuth credentials
@@
-To obtain a client ID and client secret, you need go through this flow:
+To obtain a client ID and client secret, go through this flow:
@@
-1. In the **Published Applications** section, click **New Application** button to start the flow for creating a new OAuth app.
-1. Enter a **Name**, **Description** and **Callback URL** for your OAuth app.
+1. In the **Published Applications** section, click the **New Application** button to start creating a new OAuth app.
+1. Enter a **Name**, **Description**, and **Callback URL** for your OAuth app.
@@
-On the next screen, you can access and save the client ID and client secret for your OAuth app.
+On the next screen, copy and store the client ID and client secret for your OAuth app in a secure location (for example, a secrets manager).

61-73: Security suggestion: prefer env variables in code examples for tokens.

Using a literal placeholder can lead readers to inline secrets. Consider demonstrating environment-based configuration.

-const prismaResponse = await fetch('https://api.prisma.io/v1/projects', {
+const prismaResponse = await fetch('https://api.prisma.io/v1/projects', {
   method: 'POST',
   headers: {
     'Content-Type': 'application/json',
-    Authorization: `Bearer <YOUR_SERVICE_TOKEN>`,
+    Authorization: `Bearer ${process.env.PRISMA_SERVICE_TOKEN!}`,
   },
   body: JSON.stringify({ region, name }),
 });

Add a short note below the snippet reminding readers not to log tokens and to inject them via environment/secrets.


105-115: Add state validation in callback to complete CSRF protection.

You generate a secure state but don’t show verifying it on return. Add a reminder or a short code example to compare the returned state to the stored value.

 const authUrl = `https://auth.prisma.io/authorize?${authParams.toString()}`;
 // Redirect the user to authUrl
+
+// In your callback handler, validate `state`:
+// if (req.query.state !== loadStoredState(sessionId)) { return res.status(400).send('Invalid state'); }

127-140: Security note: keep client secrets server-side and consider PKCE if you ever demo public clients.

Since this flow runs on your backend, remind readers not to expose client_secret in front-end code. If you plan to show SPA/device flows later, note that PKCE is recommended there.

Add a one-line note below the snippet: “Do not embed the client secret in front-end code; perform the code exchange on a trusted server.”


83-91: Standardize “OAuth 2” spelling and clarify the claim flow steps

We found mixed usage of “OAuth2” and “OAuth 2” across multiple guides. To improve consistency and readability, please:

• Choose a single style—e.g. “OAuth 2”—throughout the repo
• Clarify the two-token exchange in step 3 of the overview
• Apply the same changes in both content/800-guides/240-management-api.mdx and content/250-postgres/100-introduction/230-management-api.mdx

– In content/800-guides/240-management-api.mdx (lines 83–91), update:

-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.
+1. Trigger the OAuth 2 flow, redirecting the user to Prisma Auth. This grants your app permission to transfer the database into the user's 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 an OAuth 2 access token for the user, then calls the Management API transfer endpoint with:
+   - your service token in the Authorization header  
+   - the user's access token in the request body

– Repeat “OAuth 2” formatting in all other occurrences (e.g. lines 14, 30, 33, 100, 110, 163 in the same file, and all instances in content/250-postgres/100-introduction/230-management-api.mdx).

content/250-postgres/100-introduction/230-management-api.mdx (4)

11-13: Correct “OpenApi” casing.

Use “OpenAPI” (two words, uppercase API).

-:::tip OpenApi
+:::tip OpenAPI

340-373: Integrations endpoints: add a compact response example for clarity.

The fields are listed, but a short JSON example improves scannability.

Add below the bullets:

{
  "items": [
    {
      "id": "int_123",
      "createdAt": "2025-08-01T12:34:56Z",
      "scopes": ["workspace:admin"],
      "client": { "id": "cl_abc", "name": "My OAuth App", "createdAt": "2025-07-20T10:00:00Z" },
      "createdByUser": { "id": "usr_42", "email": "alice@example.com", "displayName": "Alice Doe" }
    }
  ],
  "nextCursor": null
}

Also consider noting pagination keys (cursor, nextCursor) if applicable.


325-339: Cross-reference “restore” via fromDatabase to avoid confusion.

Since the dedicated restore endpoint was removed, add a note here pointing to the create-database payload with fromDatabase.

 #### `GET /databases/{databaseId}/backups`
@@
 - **Responses**:
   - `200 OK`
   - `401 Unauthorized`
   - `404 Not Found`
+
+> Note: To restore from a backup, create a new database using `POST /projects/{projectId}/databases` with the `fromDatabase` object (see example above).

88-112: Clarify OAuth URLs in Postman/Swagger instructions or link to auth config.

“Your local OAuth URLs” is vague. Consider linking back to “Creating OAuth credentials” or provide the exact authorize and token base URLs used in examples elsewhere on this page.

Would you add a parenthetical like “(see the authorize and token endpoints shown above)” or link to your auth endpoints reference?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 19f10b4 and 0c7f4f7.

📒 Files selected for processing (2)
  • content/250-postgres/100-introduction/230-management-api.mdx (4 hunks)
  • content/800-guides/240-management-api.mdx (4 hunks)
🧰 Additional context used
🪛 LanguageTool
content/250-postgres/100-introduction/230-management-api.mdx

[grammar] ~68-~68: There might be a mistake here.
Context: ...t the flow for creating a new OAuth app. 1. Enter a Name, Description and **...

(QB_NEW_EN)


[grammar] ~69-~69: There might be a mistake here.
Context: ...and Callback URL for your OAuth app. 1. Click Continue. On the next screen,...

(QB_NEW_EN)


[grammar] ~346-~346: There might be a mistake here.
Context: ...given workspace. - Path parameters: - workspaceId: Workspace ID - Query parameters: ...

(QB_NEW_EN)


[grammar] ~347-~347: There might be a mistake here.
Context: ...eters**: - workspaceId: Workspace ID - Query parameters: - cursor (option...

(QB_NEW_EN)


[grammar] ~350-~350: There might be a mistake here.
Context: ..., default: 100): Limit number of results - Responses: - 200 OK: List of integ...

(QB_NEW_EN)


[grammar] ~366-~366: There might be a mistake here.
Context: ...given client ID. - Path parameters: - workspaceId: Workspace ID (e.g. wksp_1234) - `c...

(QB_NEW_EN)


[grammar] ~367-~367: There might be a mistake here.
Context: ...paceId: Workspace ID (e.g. wksp_1234) - clientId: Integration client ID (e.g. itgr_5678...

(QB_NEW_EN)


[grammar] ~368-~368: There might be a mistake here.
Context: ...Integration client ID (e.g. itgr_5678) - Responses: - 204 No Content: Integ...

(QB_NEW_EN)


[grammar] ~369-~369: There might be a mistake here.
Context: ...t ID (e.g. itgr_5678) - Responses: - 204 No Content: Integration tokens revoked successfull...

(QB_NEW_EN)


[grammar] ~370-~370: There might be a mistake here.
Context: ... Integration tokens revoked successfully - 401 Unauthorized: Missing or invalid authentication toke...

(QB_NEW_EN)


[grammar] ~371-~371: There might be a mistake here.
Context: ... Missing or invalid authentication token - 404 Not Found: Workspace or integration not found ##...

(QB_NEW_EN)

content/800-guides/240-management-api.mdx

[grammar] ~28-~28: There might be a mistake here.
Context: ...on and manage Prisma Postgres databases. - Projects vs Databases: A project is a ...

(QB_NEW_EN)


[grammar] ~50-~50: There might be a mistake here.
Context: ...t the flow for creating a new OAuth app. 1. Enter a Name, Description and **...

(QB_NEW_EN)


[grammar] ~51-~51: There might be a mistake here.
Context: ...and Callback URL for your OAuth app. 1. Click Continue. On the next screen,...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Lost Pixel
🔇 Additional comments (1)
content/800-guides/240-management-api.mdx (1)

117-121: Clarify when project_id is included in the callback.

You mention “in some cases, a project_id” without explaining when. Add a brief note (e.g., “when the claim flow is initiated from a project-scoped link”) or link to the API behavior. If uncertain, please verify with the product/API owners.

Would you add one sentence explaining the conditions under which project_id is included, or confirm and I can propose exact wording?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (1)

269-269: Resolved: example row now uses vercel-edge instead of “Vercel Edge Light”

This addresses the earlier feedback to align naming with the canonical config value.

🧹 Nitpick comments (8)
content/800-guides/350-authjs-nextjs.mdx (6)

90-99: Align runtime wording and add a brief alias note

The switch to runtime "vercel-edge" looks good. Consider adding a short inline comment to clarify that "vercel-edge" is the canonical value and "edge-light" is its alias, to preempt confusion with older examples.

 generator client {
   //edit-next-line
   provider = "prisma-client"
   output   = "../app/generated/prisma"
   //add-next-line
-  runtime  = "vercel-edge"
+  // Target Vercel Edge runtime (alias: "edge-light")
+  runtime  = "vercel-edge"
 }

189-203: Prisma Accelerate: add env var and tiny note so users don’t hit runtime config issues

Using withAccelerate() is great. Many users forget to set PRISMA_ACCELERATE_URL (or the corresponding Prisma Postgres Accelerate connection) and hit connection/runtime surprises. Suggest adding it to the .env snippets and one sentence calling it out.

Proposed additions to both .env blocks:

 DATABASE_URL=<YOUR_DATABASE_URL>
 //add-start
 AUTH_SECRET=<YOUR_AUTH_SECRET>
+PRISMA_ACCELERATE_URL=<YOUR_ACCELERATE_URL>  # required when using withAccelerate()
 //add-end

If helpful, I can add a short “Troubleshooting” callout below the prisma.ts snippet explaining that missing PRISMA_ACCELERATE_URL will fall back to direct DB connectivity (or fail) depending on setup. Want me to draft that?

Also applies to: 208-221


296-304: Optional: make provider configuration explicit to improve copy/paste resilience

Relying on env var auto-detection is fine. For extra clarity, you can show explicit configuration so readers see where their CLIENT_ID/SECRET are used.

 import NextAuth from 'next-auth'
 import GitHub from 'next-auth/providers/github'

 export const { handlers, auth, signIn, signOut } = NextAuth({
-  providers: [GitHub],
+  providers: [
+    GitHub({
+      clientId: process.env.AUTH_GITHUB_ID!,
+      clientSecret: process.env.AUTH_GITHUB_SECRET!,
+    }),
+  ],
 })

356-359: Make provider required to avoid calling signIn(undefined)

The prop is optional but the code always expects a value. Tighten the type to prevent accidental undefined at call sites and improve DX. Also, consider capitalizing the provider label for UX.

-export function SignIn({ provider }: { provider?: string }) {
+export function SignIn({ provider }: { provider: string }) {
   return (
     <form>
       <button className="bg-neutral-700 text-white p-2 rounded-md">
-        Sign In with {provider}
+        Sign In with {provider.charAt(0).toUpperCase() + provider.slice(1)}
       </button>
     </form>
   )
}

Also applies to: 364-386


615-617: Capitalize “GitHub” in user-facing text

Minor brand/style nit.

-You should see the home page with a "Sign In with github" button.
+You should see the home page with a "Sign In with GitHub" button.

232-233: Confirm beta install and add explanatory note

NextAuth v5 remains in beta (stable: 4.24.11; beta: 5.0.0-beta.29). Keep using the @beta tag to pull in v5’s new features, and add a brief note so readers understand why.

• File: content/800-guides/350-authjs-nextjs.mdx
Lines: 232–233

Suggested diff:

+<!-- NextAuth v5 is currently in beta. Use the beta tag to install the latest features. -->
 npm install @auth/prisma-adapter next-auth@beta
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (2)

218-218: Tiny grammar tweak for clarity in “importFileExtension” description

LanguageTool’s hint is valid. Consider making it a complete sentence.

-| `importFileExtension`    | Inferred from environment | File extension used in **import statements**. Can be `ts`, `mts`, `cts`, `js`, `mjs`, `cjs`, or empty (for bare imports).                                                                       |
+| `importFileExtension`    | Inferred from environment | This is the file extension used in **import statements**. It can be `ts`, `mts`, `cts`, `js`, `mjs`, `cjs`, or empty (for bare imports).                                                        |

274-275: Avoid implying a deprecated deno-deploy runtime key

The example link name is “deno-deploy,” which is fine historically, but could be misconstrued as a valid runtime value (it is not). Add a parenthetical note to prevent confusion.

-| [`deno-deploy`](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/deno-deploy)                                                         | None           | None              | Deno 2                                               | n/a       |
+| [`deno-deploy`](https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/deno-deploy) (example name only; use `runtime = "deno"`)             | None           | None              | Deno 2                                               | n/a       |
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0c7f4f7 and 388682e.

📒 Files selected for processing (2)
  • content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (2 hunks)
  • content/800-guides/350-authjs-nextjs.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx

[style] ~218-~218: To form a complete sentence, be sure to include a subject.
Context: ...xtension used in import statements. Can be ts, mts, cts, js, mjs, `cj...

(MISSING_IT_THERE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Lost Pixel
🔇 Additional comments (7)
content/800-guides/350-authjs-nextjs.mdx (5)

311-320: Adapter setup LGTM

Adapter wiring and import path are correct and consistent with the earlier prisma.ts/setup.


397-403: Server Actions usage LGTM

Use of "use server" within form actions is correct, and the minimal wrappers around signIn/signOut are clean.

Also applies to: 415-421


438-449: Async Server Component pattern LGTM

The page is a server component that awaits auth(), which matches the recommended pattern for NextAuth v5 in App Router.

Also applies to: 458-465


528-546: session.user.id is included by default with NextAuth v5 + PrismaAdapter, no callback or fallback needed

According to the NextAuth v5 documentation, when using any supported Adapter (including PrismaAdapter), calling auth() already returns session.user.id by default. You don’t need to add a session callback or a secondary lookup by email—simply query by id.

Apply this simplified snippet:

 const session = await auth();
 //add-start
 let user = null;

 if (session) {
-  user = await prisma.user.findUnique({
-    where: {
-      id: session.user?.id,
-    }
-  });
+  user = await prisma.user.findUnique({
+    where: { id: session.user.id }
+  });
 }
 //add-end

592-604: Update Turbopack warning with date and fixed versions

As of August 25, 2025: In Next.js v15.2.0–v15.2.1, Turbopack’s next dev --turbopack triggers a known bug ([#76497]), which was fixed in the subsequent patch release (v15.2.2+) (github.com). Remove the --turbopack flag for those specific versions only.

-:::warning
-Before starting the development server, note that if you are using Next.js v15.2.0 or v15.2.1, do not use Turbopack as there is a known [issue](https://github.com/vercel/next.js/issues/76497). Remove Turbopack from your dev script by updating your `package.json`
-
-```json file=package.json
-"scripts": {
-    //delete-start
-    "dev": "next dev --turbopack",
-    //delete-end
-    //add-start
-    "dev": "next dev",
-    //add-end
-}
-```
-
-This change is not needed on any versions before or after.
-:::
+:::warning
+As of August 25, 2025: Next.js v15.2.0–v15.2.1 have a Turbopack bug ([#76497]; fixed in v15.2.2+). Remove the `--turbopack` flag from your `dev` script when using those versions.
+
+```json file=package.json
+"scripts": {
+  "dev": "next dev",
+  // …other scripts…
+}
+```
+
+This change is not needed before v15.2.0 or after v15.2.1.
+:::
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (2)

215-219: Runtime table update looks correct and consistent with schema reference

The supported values list, including vercel-edge (alias edge-light) and workerd (alias cloudflare), is accurate and consistent.


220-224: Good clarification on internal codepath mapping

The note explaining nodejs/deno/bun mapping is helpful and correctly scoped.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
content/250-postgres/100-introduction/230-management-api.mdx (1)

62-73: Fix heading grammar and streamline OAuth credentials steps.

“Creating an OAuth credentials” is ungrammatical; tighten list wording and punctuation.

-#### Creating an OAuth credentials
+#### Creating OAuth credentials
@@
-To obtain a client ID and client secret, go through this flow:
+Follow these steps to create OAuth credentials (client ID and client secret):
@@
-1. Open the [Prisma Console](https://console.prisma.io).
-1. Click the 🧩 **Integrations** tab in the sidenav.
-1. In the **Published Applications** section, click **New Application** button to start the flow for creating a new OAuth app.
-1. Enter a **Name**, **Description** and **Callback URL** for your OAuth app.
-1. Click **Continue**.
+1. Open the [Prisma Console](https://console.prisma.io).
+1. Click the **Integrations** tab in the sidebar.
+1. In **Published applications**, click **New application** to start creating an OAuth app.
+1. Enter a **Name**, **Description**, and **Callback URL** for the app.
+1. Click **Continue**.
@@
-On the next screen, you can access and save the client ID and client secret for your OAuth app.
+On the next screen, copy the client ID and client secret and store them in a secure location.
🧹 Nitpick comments (4)
content/250-postgres/100-introduction/230-management-api.mdx (4)

52-61: Tighten wording for service token steps (consistency with docs voice).

Minor clarity/conciseness tweaks; keeps intent unchanged.

-#### Creating a service token
+#### Creating a service token
@@
-1. Open the [Prisma Console](https://console.prisma.io/).
-2. Navigate to your workspace.
-3. Navigate to the **Settings** page of your workspace and select **Service Tokens**.
-4. Click **New Service Token**.
-5. Copy the generated token and store it in a safe location for future use. 
+1. Open the [Prisma Console](https://console.prisma.io/).
+2. Go to your workspace.
+3. Open **Settings** > **Service tokens**.
+4. Click **New service token**.
+5. Copy the generated token and store it in a secure location.

251-253: Clarify the note on when to use fromDatabase.

Slightly more explicit phrasing helps readers understand intent.

-:::note
- Use `fromDatabase` only when creating the database from an existing one or a backup.
-:::
+:::note
+Use `fromDatabase` only when creating a database from an existing database or when restoring from a backup.
+:::

342-362: Add a concrete 200 OK example for list integrations.

Including a minimal response example improves implementer confidence and aligns with patterns elsewhere in the page.

 #### `GET /workspaces/{workspaceId}/integrations`
 
 Retrieve integrations for the given workspace.
@@
 - **Responses**:
-  - `200 OK`: List of integrations with details:
+  - `200 OK`: List of integrations with details:
     - `id`: Integration ID
     - `createdAt`: Creation timestamp
     - `scopes`: Array of granted scopes
     - `client`: Object containing `id`, `name`, `createdAt`
     - `createdByUser`: Object containing `id`, `email`, `displayName`
   - `401 Unauthorized`: Missing or invalid authentication token
   - `404 Not Found`: Workspace not found
+
+  Example:
+  ```json
+  {
+    "items": [
+      {
+        "id": "int_123",
+        "createdAt": "2025-08-21T14:18:22.000Z",
+        "scopes": ["databases:read", "projects:read"],
+        "client": { "id": "itgr_5678", "name": "Acme App", "createdAt": "2025-07-03T09:10:00.000Z" },
+        "createdByUser": { "id": "user_abc", "email": "dev@example.com", "displayName": "Dev Example" }
+      }
+    ],
+    "nextCursor": null
+  }
+  ```

364-375: Tighten DELETE endpoint wording and parameter descriptions.

Small tone/style fixes and example phrasing; no semantic changes.

-#### `DELETE /workspaces/{workspaceId}/integrations/{clientId}`
+#### `DELETE /workspaces/{workspaceId}/integrations/{clientId}`
 
-Revokes the integration tokens with the given client ID.
+Revoke an integration and invalidate all tokens for the given client ID.
@@
-- `workspaceId`: Workspace ID (e.g. `wksp_1234`)
-- `clientId`: Integration client ID (e.g. `itgr_5678`)
+- `workspaceId`: Workspace ID (for example, `wksp_1234`)
+- `clientId`: Integration client ID (for example, `itgr_5678`)
@@
-- `204 No Content`: Integration tokens revoked successfully
+- `204 No Content`: Integration revoked successfully
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 388682e and acc57c7.

📒 Files selected for processing (6)
  • content/200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx (1 hunks)
  • content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx (1 hunks)
  • content/200-orm/500-reference/200-prisma-cli-reference.mdx (1 hunks)
  • content/200-orm/800-more/350-ai-tools/100-cursor.mdx (1 hunks)
  • content/250-postgres/100-introduction/230-management-api.mdx (4 hunks)
  • content/250-postgres/1100-integrations/400-mcp-server.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • content/200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx
  • content/250-postgres/1100-integrations/400-mcp-server.mdx
  • content/200-orm/500-reference/200-prisma-cli-reference.mdx
  • content/200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx
  • content/200-orm/800-more/350-ai-tools/100-cursor.mdx
🧰 Additional context used
🪛 LanguageTool
content/250-postgres/100-introduction/230-management-api.mdx

[grammar] ~68-~68: There might be a mistake here.
Context: ...t the flow for creating a new OAuth app. 1. Enter a Name, Description and **...

(QB_NEW_EN)


[grammar] ~69-~69: There might be a mistake here.
Context: ...and Callback URL for your OAuth app. 1. Click Continue. On the next screen,...

(QB_NEW_EN)


[grammar] ~348-~348: There might be a mistake here.
Context: ...given workspace. - Path parameters: - workspaceId: Workspace ID - Query parameters: ...

(QB_NEW_EN)


[grammar] ~349-~349: There might be a mistake here.
Context: ...eters**: - workspaceId: Workspace ID - Query parameters: - cursor (option...

(QB_NEW_EN)


[grammar] ~352-~352: There might be a mistake here.
Context: ..., default: 100): Limit number of results - Responses: - 200 OK: List of integ...

(QB_NEW_EN)


[grammar] ~368-~368: There might be a mistake here.
Context: ...given client ID. - Path parameters: - workspaceId: Workspace ID (e.g. wksp_1234) - `c...

(QB_NEW_EN)


[grammar] ~369-~369: There might be a mistake here.
Context: ...paceId: Workspace ID (e.g. wksp_1234) - clientId: Integration client ID (e.g. itgr_5678...

(QB_NEW_EN)


[grammar] ~370-~370: There might be a mistake here.
Context: ...Integration client ID (e.g. itgr_5678) - Responses: - 204 No Content: Integ...

(QB_NEW_EN)


[grammar] ~371-~371: There might be a mistake here.
Context: ...t ID (e.g. itgr_5678) - Responses: - 204 No Content: Integration tokens revoked successfull...

(QB_NEW_EN)


[grammar] ~372-~372: There might be a mistake here.
Context: ... Integration tokens revoked successfully - 401 Unauthorized: Missing or invalid authentication toke...

(QB_NEW_EN)


[grammar] ~373-~373: There might be a mistake here.
Context: ... Missing or invalid authentication token - 404 Not Found: Workspace or integration not found ##...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Check internal links
  • GitHub Check: runner / linkspector
  • GitHub Check: Lost Pixel
🔇 Additional comments (1)
content/250-postgres/100-introduction/230-management-api.mdx (1)

241-249: JSON payload now valid — good fix.

The create-database example is valid JSON (no trailing comma/comments) and correctly shows the new fromDatabase object.

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 26, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (3)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (2)

215-215: Runtime values row looks correct and aligned with schema reference

The supported values list (including backticked vercel-edge with alias edge-light) matches the current schema reference and prior guidance. Nice cleanup.


269-269: Example row now uses backticked vercel-edge — consistent with supported value

This resolves the earlier “Vercel Edge Light” wording discrepancy. Thanks for aligning the example with the canonical config value.

content/250-postgres/100-introduction/230-management-api.mdx (1)

62-73: OAuth credentials flow: grammar tightened; past issue resolved.

This addresses the earlier grammar comment about “Creating an OAuth credentials.” One small polish: “go through this flow” → “follow these steps.”

-To obtain a client ID and client secret, go through this flow:
+To obtain a client ID and client secret, follow these steps:
🧹 Nitpick comments (11)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (1)

218-218: Tighten wording for importFileExtension (fixes incomplete sentence)

Current phrasing is a fragment and was flagged by LanguageTool. Suggest rewording for clarity.

-| `importFileExtension`    | Inferred from environment | File extension used in **import statements**. Can be `ts`, `mts`, `cts`, `js`, `mjs`, `cjs`, or empty (for bare imports).                                                                       |
+| `importFileExtension`    | Inferred from environment | Specifies the file extension used in **import statements**. Supported values: `ts`, `mts`, `cts`, `js`, `mjs`, `cjs`, or empty (for bare imports).                                             |
content/250-postgres/100-introduction/230-management-api.mdx (5)

52-61: Service token steps read well; minor wording nit for security tone.

Consider “secure location” instead of “safe location” to match security phrasing elsewhere.

-5. Copy the generated token and store it in a safe location for future use. 
+5. Copy the generated token and store it in a secure location for future use.

100-111: Postman OAuth 2 instructions reference “script output” (inconsistent with this doc’s flow).

Earlier you describe getting client ID/secret from the Prisma Console. Suggest aligning the Postman section.

-    - **Client ID / Secret**: From the script output
+    - **Client ID / Secret**: From your OAuth credentials in the Prisma Console

241-253: Create-database payload: fromDatabase addition looks good; clarify field rules.

The JSON is valid now. Please document whether fromDatabase.id and fromDatabase.backupId are both required when restoring from a backup, and whether fromDatabase is mutually exclusive with creating an empty database.

Example note tweak:

-:::note
- Use `fromDatabase` only when creating the database from an existing one or a backup.
-:::
+:::note
+ Use `fromDatabase` only when cloning from an existing database or restoring from a backup.
+ When restoring from a backup, both `id` (source database ID) and `backupId` are required. Omit `fromDatabase` to create a new empty database.
+:::

271-282: DELETE /databases/{databaseId} responses: verify status code and wording.

Docs list 200 OK; many APIs return 204 No Content for successful deletes. Also, “Cannot delete default environment” sounds inconsistent with the rest of the page (“database”). Please confirm against the OpenAPI spec and adjust.

-- **Responses**:
-  - `200 OK`
+- **Responses**:
+  - `204 No Content`
   - `401 Unauthorized`
-  - `403 Cannot delete default environment`
+  - `403 Forbidden`: Cannot delete default database
   - `404 Not Found`

342-375: New Integrations endpoints: add minimal example payloads and pagination guidance.

The field list is helpful. Consider including a short 200-response example and a cursor-pagination example to reduce guesswork.

Example additions:

 #### `GET /workspaces/{workspaceId}/integrations`
 
 Retrieve integrations for the given workspace.
@@
 - **Responses**:
   - `200 OK`: List of integrations with details:
@@
   - `404 Not Found`: Workspace not found
+
+Example (200):
+```json
+{
+  "items": [
+    {
+      "id": "int_123",
+      "createdAt": "2025-08-20T12:34:56Z",
+      "scopes": ["workspace:admin"],
+      "client": { "id": "itgr_5678", "name": "Acme App", "createdAt": "2025-08-01T09:00:00Z" },
+      "createdByUser": { "id": "usr_42", "email": "user@example.com", "displayName": "Jane Doe" }
+    }
+  ],
+  "nextCursor": "cursor_abc"
+}
+```
+
+Pagination:
+```text
+GET /workspaces/{workspaceId}/integrations?limit=100&cursor={nextCursor}
+```

Also consider a brief privacy note if returning email requires elevated scopes.

content/800-guides/240-management-api.mdx (4)

44-55: OAuth credentials section: grammar and article usage.

Tighten phrasing and fix missing “to” and “the”.

-## Get OAuth credentials
+## Get OAuth credentials
@@
-To obtain a client ID and client secret, you need go through this flow:
+To obtain a client ID and client secret, you need to follow these steps:
@@
-1. In the **Published Applications** section, click **New Application** button to start the flow for creating a new OAuth app.
-1. Enter a **Name**, **Description** and **Callback URL** for your OAuth app.
+1. In the **Published Applications** section, click the **New Application** button to start creating a new OAuth app.
+1. Enter a **Name**, **Description**, and **Callback URL** for your OAuth app.
@@
-On the next screen, you can access and save the client ID and client secret for your OAuth app.
+On the next screen, copy and store the client ID and client secret for your OAuth app in a secure location.

79-92: Standardize “OAuth 2” spelling and fix token naming.

A few instances use “OAuth2” without a space. Standardize to “OAuth 2” to match the other doc. Also, “both your integration token and the user's token” should say “service token.”

-1. Trigger the OAuth2 flow, redirecting the user to Prisma Auth.
+1. Trigger the OAuth 2 flow, redirecting the user to Prisma Auth.
@@
-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.
+Your backend receives an authorization code, exchanges it for a user access token, and calls the Management API transfer endpoint with both your service token and the user's token.

Please also normalize “OAuth2” → “OAuth 2” across this page (e.g., lines 14, 87, 110).


103-115: Authorization URL example: consider showing scopes and state origin.

The example is clear. If scopes beyond workspace:admin are required, note them here and link to the scope reference.


145-153: Transfer call: header uses service token correctly; add expected outcomes.

Looks good. Consider adding success and common error outcomes (401/403/404) so integrators can anticipate failure modes.

 const transferResponse = await fetch(`https://api.prisma.io/v1/projects/${project_id}/transfer`, {
   method: 'POST',
   headers: {
     'Content-Type': 'application/json',
     Authorization: `Bearer ${PRISMA_SERVICE_TOKEN}`,
   },
   body: JSON.stringify({ recipientAccessToken: tokenData.access_token }),
 });
+if (!transferResponse.ok) {
+  // 401: invalid service token, 403: insufficient scope, 404: unknown project, etc.
+  throw new Error(`Transfer failed: ${transferResponse.status} ${transferResponse.statusText}`);
+}
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx (1)

205-205: Cross‑link to the array arguments section for quicker navigation

Add a self‑link to the section that explains how arrays are handled, so readers immediately find the supported path.

-Manual argument type definitions are not supported for array arguments. For these arguments, you will need to rely on the type inference provided by TypedSQL.
+Manual argument type definitions are not supported for array arguments. For these arguments, rely on the type inference provided by TypedSQL (see [Passing array arguments to TypedSQL](#passing-array-arguments-to-typedsql)).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between acc57c7 and d2ae3dd.

📒 Files selected for processing (5)
  • content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (2 hunks)
  • content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx (3 hunks)
  • content/200-orm/800-more/350-ai-tools/100-cursor.mdx (1 hunks)
  • content/250-postgres/100-introduction/230-management-api.mdx (6 hunks)
  • content/800-guides/240-management-api.mdx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • content/200-orm/800-more/350-ai-tools/100-cursor.mdx
🧰 Additional context used
🪛 LanguageTool
content/250-postgres/100-introduction/230-management-api.mdx

[grammar] ~348-~348: There might be a mistake here.
Context: ...given workspace. - Path parameters: - workspaceId: Workspace ID - Query parameters: ...

(QB_NEW_EN)


[grammar] ~349-~349: There might be a mistake here.
Context: ...eters**: - workspaceId: Workspace ID - Query parameters: - cursor (option...

(QB_NEW_EN)


[grammar] ~352-~352: There might be a mistake here.
Context: ..., default: 100): Limit number of results - Responses: - 200 OK: List of integ...

(QB_NEW_EN)


[grammar] ~368-~368: There might be a mistake here.
Context: ...given client ID. - Path parameters: - workspaceId: Workspace ID (e.g. wksp_1234) - `c...

(QB_NEW_EN)


[grammar] ~369-~369: There might be a mistake here.
Context: ...paceId: Workspace ID (e.g. wksp_1234) - clientId: Integration client ID (e.g. itgr_5678...

(QB_NEW_EN)


[grammar] ~370-~370: There might be a mistake here.
Context: ...Integration client ID (e.g. itgr_5678) - Responses: - 204 No Content: Integ...

(QB_NEW_EN)


[grammar] ~371-~371: There might be a mistake here.
Context: ...t ID (e.g. itgr_5678) - Responses: - 204 No Content: Integration tokens revoked successfull...

(QB_NEW_EN)


[grammar] ~372-~372: There might be a mistake here.
Context: ... Integration tokens revoked successfully - 401 Unauthorized: Missing or invalid authentication toke...

(QB_NEW_EN)


[grammar] ~373-~373: There might be a mistake here.
Context: ... Missing or invalid authentication token - 404 Not Found: Workspace or integration not found ##...

(QB_NEW_EN)

content/200-orm/100-prisma-schema/10-overview/03-generators.mdx

[style] ~218-~218: To form a complete sentence, be sure to include a subject.
Context: ...xtension used in import statements. Can be ts, mts, cts, js, mjs, `cj...

(MISSING_IT_THERE)

content/800-guides/240-management-api.mdx

[grammar] ~28-~28: There might be a mistake here.
Context: ...on and manage Prisma Postgres databases. - Projects vs Databases: A project is a ...

(QB_NEW_EN)


[grammar] ~30-~30: There might be a mistake here.
Context: ...oken for the user during the claim flow. - Tokens: There are two main types of to...

(QB_NEW_EN)


[grammar] ~50-~50: There might be a mistake here.
Context: ...t the flow for creating a new OAuth app. 1. Enter a Name, Description and **...

(QB_NEW_EN)


[grammar] ~51-~51: There might be a mistake here.
Context: ...and Callback URL for your OAuth app. 1. Click Continue. On the next screen,...

(QB_NEW_EN)

content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx

[style] ~30-~30: ‘with the exception of’ might be wordy. Consider a shorter alternative.
Context: ... adapters are compatible with TypedSQL, with the exception of @prisma/adapter-better-sqlite3. For S...

(EN_WORDINESS_PREMIUM_WITH_THE_EXCEPTION_OF)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: runner / linkspector
  • GitHub Check: Check internal links
  • GitHub Check: Lost Pixel
🔇 Additional comments (9)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (2)

220-225: Good context on internal mapping of runtimes

Clear note that nodejs, deno, and bun share the same internal code path while remaining distinct user-facing values. Reads well and helps set expectations.


274-274: Link is correct; no change needed
Upon verification, https://github.com/prisma/prisma-examples/tree/latest/generator-prisma-client/deno-deploy returns HTTP 200 while the proposed …/deno path returns HTTP 404. The existing link is therefore valid and does not require updating.

Likely an incorrect or invalid review comment.

content/250-postgres/100-introduction/230-management-api.mdx (2)

11-13: Good improvement: OpenAPI tip and link standardized.

Tip label “OpenAPI” and the 3.1 spec link look correct and helpful.


316-326: DELETE connection endpoint path: confirm top-level vs nested route.

Header shows DELETE /connections/{id}; some APIs scope these under the parent resource (e.g., /databases/{databaseId}/connections/{id}). Please verify with OpenAPI and make both the heading and path parameters consistent.

content/800-guides/240-management-api.mdx (3)

28-34: Core concepts wording is clearer; token roles are accurate.

Nice clarification of service token vs OAuth access token and “Projects vs Databases.”


40-41: Cross-link to credentials: good. Minor anchor check.

Anchor #get-oauth-credentials matches the section below; keep as-is.


62-72: Provisioning request uses service token correctly.

Auth header switch to Bearer <YOUR_SERVICE_TOKEN> aligns with prior definitions.

content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx (2)

107-107: Typo fix looks good

“Positional” spelling correction is correct and improves clarity.


28-32: Ignore indentation feedback
The :::tip block is indented the same way as the :::warning admonition later on (both nested under their respective list items), so no change to indentation is needed. The compatibility note (“TypedSQL works with all supported driver adapters except @prisma/adapter-better-sqlite3. For SQLite, use @prisma/adapter-libsql.”) matches the wording used elsewhere in the docs and accurately reflects the current support matrix. You can choose to rephrase for style (e.g. replace “with the exception of” with “except”), but no critical fixes are required here.

Likely an incorrect or invalid review comment.

@ankur-arch ankur-arch mentioned this pull request Aug 26, 2025
@nikolasburk nikolasburk merged commit dd77224 into main Aug 27, 2025
8 of 9 checks passed
@nikolasburk nikolasburk deleted the docs/6.15-ankur branch August 27, 2025 12:40
jlecordier pushed a commit to jlecordier/docs-1 that referenced this pull request Sep 3, 2025
* feat: promote Management API to GA DC-4847

* fix: update concistency

* feat: add note about typedsql DC-4849

* feat: add underlyingDriver docs DC-4848

* fix: add AI guardrails docs

* feat: add simplified runtime options for prisma-client DC-4868

* feat: add oauth and management api changes

* fix: mentions of edge-ight

* fix: polishing the text]

* fix: refine coderabbit comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants