From 858706a4abc3c6649afe15f8256c640669c2081e Mon Sep 17 00:00:00 2001 From: Aidan McAlister Date: Thu, 5 Mar 2026 12:10:42 -0500 Subject: [PATCH 1/2] fix(docs): generate valid management-api endpoint metadata and unique filenames --- .../connections/delete-connections-by-id.mdx | 21 ++++ .../connections/delete-connections.mdx | 7 +- .../connections/get-connections-by-id.mdx | 21 ++++ .../endpoints/connections/get-connections.mdx | 13 +- .../connections/post-connections.mdx | 7 +- .../get-databases-by-database-id-backups.mdx | 21 ++++ .../get-databases-id-backups.mdx | 7 +- .../get-databases-by-database-id-usage.mdx | 21 ++++ .../database-usage/get-databases-id-usage.mdx | 7 +- ...t-databases-by-database-id-connections.mdx | 21 ++++ .../get-databases-id-connections.mdx | 7 +- ...t-databases-by-database-id-connections.mdx | 21 ++++ .../post-databases-id-connections.mdx | 7 +- .../delete-databases-by-database-id.mdx | 21 ++++ .../databases/delete-databases-id.mdx | 7 +- .../get-databases-by-database-id.mdx | 21 ++++ .../endpoints/databases/get-databases-id.mdx | 7 +- .../endpoints/databases/get-databases.mdx | 11 +- .../get-projects-by-project-id-databases.mdx | 21 ++++ .../databases/get-projects-id-databases.mdx | 7 +- .../patch-databases-by-database-id.mdx | 21 ++++ .../databases/patch-databases-id.mdx | 7 +- .../endpoints/databases/post-databases.mdx | 7 +- .../post-projects-by-project-id-databases.mdx | 21 ++++ .../databases/post-projects-id-databases.mdx | 7 +- .../delete-integrations-by-id.mdx | 21 ++++ .../integrations/delete-integrations.mdx | 7 +- ...workspace-id-integrations-by-client-id.mdx | 21 ++++ .../delete-workspaces-id-integrations-id.mdx | 7 +- .../integrations/get-integrations-by-id.mdx | 21 ++++ .../integrations/get-integrations.mdx | 13 +- ...orkspaces-by-workspace-id-integrations.mdx | 21 ++++ .../get-workspaces-id-integrations.mdx | 7 +- .../endpoints/misc/get-regions-accelerate.mdx | 7 +- .../endpoints/misc/get-regions-postgres.mdx | 7 +- .../projects/delete-projects-by-id.mdx | 21 ++++ .../endpoints/projects/delete-projects.mdx | 7 +- .../endpoints/projects/get-projects-by-id.mdx | 21 ++++ .../endpoints/projects/get-projects.mdx | 13 +- .../projects/patch-projects-by-id.mdx | 21 ++++ .../endpoints/projects/patch-projects.mdx | 7 +- .../projects/post-projects-by-id-transfer.mdx | 21 ++++ .../projects/post-projects-transfer.mdx | 7 +- .../endpoints/projects/post-projects.mdx | 7 +- .../endpoints/regions/get-regions.mdx | 11 +- .../workspaces/get-workspaces-by-id.mdx | 21 ++++ .../endpoints/workspaces/get-workspaces.mdx | 13 +- apps/docs/scripts/generate-docs.ts | 111 ++++++++++++++---- apps/docs/src/app/og/[...slug]/route.tsx | 15 ++- 49 files changed, 665 insertions(+), 102 deletions(-) create mode 100644 apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx create mode 100644 apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx diff --git a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx new file mode 100644 index 0000000000..dcb69fdba3 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/connections/delete-connections-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Delete connection +full: true +_openapi: + method: DELETE + toc: [] + structuredData: + headings: [] + contents: + - content: Deletes the connection with the given ID. + path: '/v1/connections/{id}' +url: /management-api/endpoints/connections/delete-connections-by-id +metaTitle: 'DELETE /v1/connections/{id} | Delete connection' +metaDescription: 'Management API: Deletes the connection with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Deletes the connection with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx b/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx index 836146fcef..9dd6013537 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx +++ b/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx @@ -2,17 +2,20 @@ title: Delete connection full: true _openapi: - path: "/v1/connections/{id}" method: DELETE toc: [] structuredData: headings: [] contents: - content: Deletes the connection with the given ID. + path: '/v1/connections/{id}' +url: /management-api/endpoints/connections/delete-connections +metaTitle: 'DELETE /v1/connections/{id} | Delete connection' +metaDescription: 'Management API: Deletes the connection with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Deletes the connection with the given ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx new file mode 100644 index 0000000000..6b260c43e1 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/connections/get-connections-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Get connection +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns the connection with the given ID. + path: '/v1/connections/{id}' +url: /management-api/endpoints/connections/get-connections-by-id +metaTitle: 'GET /v1/connections/{id} | Get connection' +metaDescription: 'Management API: Returns the connection with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns the connection with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx b/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx index 4d24ec18b5..1047bea4fd 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx +++ b/apps/docs/content/docs/management-api/endpoints/connections/get-connections.mdx @@ -1,18 +1,21 @@ --- -title: Get connection +title: List connections full: true _openapi: - path: "/v1/connections/{id}" method: GET toc: [] structuredData: headings: [] contents: - - content: Returns the connection with the given ID. + - content: 'Returns all connections the actor has access to, with optional database filter.' + path: /v1/connections +url: /management-api/endpoints/connections/get-connections +metaTitle: GET /v1/connections | List connections +metaDescription: 'Management API: Returns all connections the actor has access to, with optional database filter.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} -Returns the connection with the given ID. +Returns all connections the actor has access to, with optional database filter. -age document={"management-api"} operations={[{"path":"/v1/connections","method":"get"}]} /> \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx b/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx index 4c09b1d19a..fc1f6ce2bd 100644 --- a/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx +++ b/apps/docs/content/docs/management-api/endpoints/connections/post-connections.mdx @@ -2,17 +2,20 @@ title: Create connection full: true _openapi: - path: "/v1/connections" method: POST toc: [] structuredData: headings: [] contents: - content: Creates a new connection for the specified database. + path: /v1/connections +url: /management-api/endpoints/connections/post-connections +metaTitle: POST /v1/connections | Create connection +metaDescription: 'Management API: Creates a new connection for the specified database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new connection for the specified database. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx b/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx new file mode 100644 index 0000000000..81b302e7c6 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-by-database-id-backups.mdx @@ -0,0 +1,21 @@ +--- +title: Get list of backups +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns backups for the specified database. + path: '/v1/databases/{databaseId}/backups' +url: /management-api/endpoints/database-backups/get-databases-by-database-id-backups +metaTitle: 'GET /v1/databases/{databaseId}/backups | Get list of backups' +metaDescription: 'Management API: Returns backups for the specified database.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns backups for the specified database. + + diff --git a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx b/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx index 1279af6eac..535bc71a90 100644 --- a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx +++ b/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx @@ -2,17 +2,20 @@ title: Get list of backups full: true _openapi: - path: "/v1/databases/{databaseId}/backups" method: GET toc: [] structuredData: headings: [] contents: - content: Returns backups for the specified database. + path: '/v1/databases/{databaseId}/backups' +url: /management-api/endpoints/database-backups/get-databases-id-backups +metaTitle: 'GET /v1/databases/{databaseId}/backups | Get list of backups' +metaDescription: 'Management API: Returns backups for the specified database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns backups for the specified database. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx b/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx new file mode 100644 index 0000000000..1bf8e97d59 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-by-database-id-usage.mdx @@ -0,0 +1,21 @@ +--- +title: Get database usage metrics +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns usage metrics for the specified database. + path: '/v1/databases/{databaseId}/usage' +url: /management-api/endpoints/database-usage/get-databases-by-database-id-usage +metaTitle: 'GET /v1/databases/{databaseId}/usage | Get database usage metrics' +metaDescription: 'Management API: Returns usage metrics for the specified database.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns usage metrics for the specified database. + + diff --git a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx b/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx index 6ec21de90c..a8d73c066a 100644 --- a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx +++ b/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx @@ -2,17 +2,20 @@ title: Get database usage metrics full: true _openapi: - path: "/v1/databases/{databaseId}/usage" method: GET toc: [] structuredData: headings: [] contents: - content: Returns usage metrics for the specified database. + path: '/v1/databases/{databaseId}/usage' +url: /management-api/endpoints/database-usage/get-databases-id-usage +metaTitle: 'GET /v1/databases/{databaseId}/usage | Get database usage metrics' +metaDescription: 'Management API: Returns usage metrics for the specified database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns usage metrics for the specified database. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx new file mode 100644 index 0000000000..c8e03045e7 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-by-database-id-connections.mdx @@ -0,0 +1,21 @@ +--- +title: Get list of database connections +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns all connections for the given database. + path: '/v1/databases/{databaseId}/connections' +url: /management-api/endpoints/databases-connections/get-databases-by-database-id-connections +metaTitle: 'GET /v1/databases/{databaseId}/connections | Get list of database connections' +metaDescription: 'Management API: Returns all connections for the given database.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns all connections for the given database. + + diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx index b286f5a7d7..c370cbaabb 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx @@ -2,17 +2,20 @@ title: Get list of database connections full: true _openapi: - path: "/v1/databases/{databaseId}/connections" method: GET toc: [] structuredData: headings: [] contents: - content: Returns all connections for the given database. + path: '/v1/databases/{databaseId}/connections' +url: /management-api/endpoints/databases-connections/get-databases-id-connections +metaTitle: 'GET /v1/databases/{databaseId}/connections | Get list of database connections' +metaDescription: 'Management API: Returns all connections for the given database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all connections for the given database. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx new file mode 100644 index 0000000000..ea1e128b79 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-by-database-id-connections.mdx @@ -0,0 +1,21 @@ +--- +title: Create database connection string +full: true +_openapi: + method: POST + toc: [] + structuredData: + headings: [] + contents: + - content: Creates a new connection string for the given database. + path: '/v1/databases/{databaseId}/connections' +url: /management-api/endpoints/databases-connections/post-databases-by-database-id-connections +metaTitle: 'POST /v1/databases/{databaseId}/connections | Create database connection string' +metaDescription: 'Management API: Creates a new connection string for the given database.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Creates a new connection string for the given database. + + diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx index b02f15ad21..f7a835b7ef 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx @@ -2,17 +2,20 @@ title: Create database connection string full: true _openapi: - path: "/v1/databases/{databaseId}/connections" method: POST toc: [] structuredData: headings: [] contents: - content: Creates a new connection string for the given database. + path: '/v1/databases/{databaseId}/connections' +url: /management-api/endpoints/databases-connections/post-databases-id-connections +metaTitle: 'POST /v1/databases/{databaseId}/connections | Create database connection string' +metaDescription: 'Management API: Creates a new connection string for the given database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new connection string for the given database. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx new file mode 100644 index 0000000000..8d69a086ee --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-by-database-id.mdx @@ -0,0 +1,21 @@ +--- +title: Delete database +full: true +_openapi: + method: DELETE + toc: [] + structuredData: + headings: [] + contents: + - content: Deletes the database with the given ID. + path: '/v1/databases/{databaseId}' +url: /management-api/endpoints/databases/delete-databases-by-database-id +metaTitle: 'DELETE /v1/databases/{databaseId} | Delete database' +metaDescription: 'Management API: Deletes the database with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Deletes the database with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx index 76902f2ac0..0677e6a851 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx @@ -2,17 +2,20 @@ title: Delete database full: true _openapi: - path: "/v1/databases/{databaseId}" method: DELETE toc: [] structuredData: headings: [] contents: - content: Deletes the database with the given ID. + path: '/v1/databases/{databaseId}' +url: /management-api/endpoints/databases/delete-databases-id +metaTitle: 'DELETE /v1/databases/{databaseId} | Delete database' +metaDescription: 'Management API: Deletes the database with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Deletes the database with the given ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx new file mode 100644 index 0000000000..2ee7aee1f6 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/databases/get-databases-by-database-id.mdx @@ -0,0 +1,21 @@ +--- +title: Get database +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns the database with the given ID. + path: '/v1/databases/{databaseId}' +url: /management-api/endpoints/databases/get-databases-by-database-id +metaTitle: 'GET /v1/databases/{databaseId} | Get database' +metaDescription: 'Management API: Returns the database with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns the database with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx index 55ec10d108..acf169808f 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx @@ -2,17 +2,20 @@ title: Get database full: true _openapi: - path: "/v1/databases/{databaseId}" method: GET toc: [] structuredData: headings: [] contents: - content: Returns the database with the given ID. + path: '/v1/databases/{databaseId}' +url: /management-api/endpoints/databases/get-databases-id +metaTitle: 'GET /v1/databases/{databaseId} | Get database' +metaDescription: 'Management API: Returns the database with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns the database with the given ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx index 4ed40935fa..18db000c5b 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases/get-databases.mdx @@ -2,19 +2,20 @@ title: List databases full: true _openapi: - path: "/v1/databases" method: GET toc: [] structuredData: headings: [] contents: - - content: >- - Returns all databases the token has access to. Optionally filter by - project ID. + - content: Returns all databases the token has access to. Optionally filter by project ID. + path: /v1/databases +url: /management-api/endpoints/databases/get-databases +metaTitle: GET /v1/databases | List databases +metaDescription: 'Management API: Returns all databases the token has access to. Optionally filter by project ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all databases the token has access to. Optionally filter by project ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx new file mode 100644 index 0000000000..2754fade05 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/databases/get-projects-by-project-id-databases.mdx @@ -0,0 +1,21 @@ +--- +title: Get list of databases +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns databases for the given project. + path: '/v1/projects/{projectId}/databases' +url: /management-api/endpoints/databases/get-projects-by-project-id-databases +metaTitle: 'GET /v1/projects/{projectId}/databases | Get list of databases' +metaDescription: 'Management API: Returns databases for the given project.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns databases for the given project. + + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx index 6602a6cb2b..94b762441c 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx @@ -2,17 +2,20 @@ title: Get list of databases full: true _openapi: - path: "/v1/projects/{projectId}/databases" method: GET toc: [] structuredData: headings: [] contents: - content: Returns databases for the given project. + path: '/v1/projects/{projectId}/databases' +url: /management-api/endpoints/databases/get-projects-id-databases +metaTitle: 'GET /v1/projects/{projectId}/databases | Get list of databases' +metaDescription: 'Management API: Returns databases for the given project.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns databases for the given project. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx new file mode 100644 index 0000000000..f46d0f2816 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-by-database-id.mdx @@ -0,0 +1,21 @@ +--- +title: Update database +full: true +_openapi: + method: PATCH + toc: [] + structuredData: + headings: [] + contents: + - content: Updates the database with the given ID. + path: '/v1/databases/{databaseId}' +url: /management-api/endpoints/databases/patch-databases-by-database-id +metaTitle: 'PATCH /v1/databases/{databaseId} | Update database' +metaDescription: 'Management API: Updates the database with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Updates the database with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx index eb82b54010..03c9503430 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx @@ -2,17 +2,20 @@ title: Update database full: true _openapi: - path: "/v1/databases/{databaseId}" method: PATCH toc: [] structuredData: headings: [] contents: - content: Updates the database with the given ID. + path: '/v1/databases/{databaseId}' +url: /management-api/endpoints/databases/patch-databases-id +metaTitle: 'PATCH /v1/databases/{databaseId} | Update database' +metaDescription: 'Management API: Updates the database with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Updates the database with the given ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx index bbf284e61b..1137e0afc5 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases/post-databases.mdx @@ -2,17 +2,20 @@ title: Create database full: true _openapi: - path: "/v1/databases" method: POST toc: [] structuredData: headings: [] contents: - content: Creates a new database in the specified project. + path: /v1/databases +url: /management-api/endpoints/databases/post-databases +metaTitle: POST /v1/databases | Create database +metaDescription: 'Management API: Creates a new database in the specified project.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new database in the specified project. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx new file mode 100644 index 0000000000..80001821c2 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/databases/post-projects-by-project-id-databases.mdx @@ -0,0 +1,21 @@ +--- +title: Create database +full: true +_openapi: + method: POST + toc: [] + structuredData: + headings: [] + contents: + - content: Creates a new database for the given project. + path: '/v1/projects/{projectId}/databases' +url: /management-api/endpoints/databases/post-projects-by-project-id-databases +metaTitle: 'POST /v1/projects/{projectId}/databases | Create database' +metaDescription: 'Management API: Creates a new database for the given project.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Creates a new database for the given project. + + diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx index 1d75bbc864..729c5962df 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx +++ b/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx @@ -2,17 +2,20 @@ title: Create database full: true _openapi: - path: "/v1/projects/{projectId}/databases" method: POST toc: [] structuredData: headings: [] contents: - content: Creates a new database for the given project. + path: '/v1/projects/{projectId}/databases' +url: /management-api/endpoints/databases/post-projects-id-databases +metaTitle: 'POST /v1/projects/{projectId}/databases | Create database' +metaDescription: 'Management API: Creates a new database for the given project.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new database for the given project. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx new file mode 100644 index 0000000000..4bddffe9bc --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Delete integration +full: true +_openapi: + method: DELETE + toc: [] + structuredData: + headings: [] + contents: + - content: Revokes the integration tokens by integration ID. + path: '/v1/integrations/{id}' +url: /management-api/endpoints/integrations/delete-integrations-by-id +metaTitle: 'DELETE /v1/integrations/{id} | Delete integration' +metaDescription: 'Management API: Revokes the integration tokens by integration ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Revokes the integration tokens by integration ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx index 42ff94b1e4..8798dc7527 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx +++ b/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx @@ -2,17 +2,20 @@ title: Delete integration full: true _openapi: - path: "/v1/integrations/{id}" method: DELETE toc: [] structuredData: headings: [] contents: - content: Revokes the integration tokens by integration ID. + path: '/v1/integrations/{id}' +url: /management-api/endpoints/integrations/delete-integrations +metaTitle: 'DELETE /v1/integrations/{id} | Delete integration' +metaDescription: 'Management API: Revokes the integration tokens by integration ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Revokes the integration tokens by integration ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx new file mode 100644 index 0000000000..523e899d68 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id.mdx @@ -0,0 +1,21 @@ +--- +title: Revoke integration tokens +full: true +_openapi: + method: DELETE + toc: [] + structuredData: + headings: [] + contents: + - content: Revokes the integration tokens with the given client ID. + path: '/v1/workspaces/{workspaceId}/integrations/{clientId}' +url: /management-api/endpoints/integrations/delete-workspaces-by-workspace-id-integrations-by-client-id +metaTitle: 'DELETE /v1/workspaces/{workspaceId}/integrations/{clientId} | Revoke integration tokens' +metaDescription: 'Management API: Revokes the integration tokens with the given client ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Revokes the integration tokens with the given client ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx index b46ef61e8a..7202a93a20 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx +++ b/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx @@ -2,17 +2,20 @@ title: Revoke integration tokens full: true _openapi: - path: "/v1/workspaces/{workspaceId}/integrations/{clientId}" method: DELETE toc: [] structuredData: headings: [] contents: - content: Revokes the integration tokens with the given client ID. + path: '/v1/workspaces/{workspaceId}/integrations/{clientId}' +url: /management-api/endpoints/integrations/delete-workspaces-id-integrations-id +metaTitle: 'DELETE /v1/workspaces/{workspaceId}/integrations/{clientId} | Revoke integration tokens' +metaDescription: 'Management API: Revokes the integration tokens with the given client ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Revokes the integration tokens with the given client ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx new file mode 100644 index 0000000000..5858beee2a --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Get integration by ID +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns a single integration by its ID. + path: '/v1/integrations/{id}' +url: /management-api/endpoints/integrations/get-integrations-by-id +metaTitle: 'GET /v1/integrations/{id} | Get integration by ID' +metaDescription: 'Management API: Returns a single integration by its ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns a single integration by its ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx index 1fcd07acba..03326d0854 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx +++ b/apps/docs/content/docs/management-api/endpoints/integrations/get-integrations.mdx @@ -1,18 +1,21 @@ --- -title: Get integration by ID +title: Get list of integrations full: true _openapi: - path: "/v1/integrations/{id}" method: GET toc: [] structuredData: headings: [] contents: - - content: Returns a single integration by its ID. + - content: Returns integrations filtered by workspace ID. + path: /v1/integrations +url: /management-api/endpoints/integrations/get-integrations +metaTitle: GET /v1/integrations | Get list of integrations +metaDescription: 'Management API: Returns integrations filtered by workspace ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} -Returns a single integration by its ID. +Returns integrations filtered by workspace ID. -"}]} /> \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx new file mode 100644 index 0000000000..76a800c1e3 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations.mdx @@ -0,0 +1,21 @@ +--- +title: Get list of integrations +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns integrations for the given workspace. + path: '/v1/workspaces/{workspaceId}/integrations' +url: /management-api/endpoints/integrations/get-workspaces-by-workspace-id-integrations +metaTitle: 'GET /v1/workspaces/{workspaceId}/integrations | Get list of integrations' +metaDescription: 'Management API: Returns integrations for the given workspace.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns integrations for the given workspace. + + diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx index 9e7d012187..d3c6257bf0 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx +++ b/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx @@ -2,17 +2,20 @@ title: Get list of integrations full: true _openapi: - path: "/v1/workspaces/{workspaceId}/integrations" method: GET toc: [] structuredData: headings: [] contents: - content: Returns integrations for the given workspace. + path: '/v1/workspaces/{workspaceId}/integrations' +url: /management-api/endpoints/integrations/get-workspaces-id-integrations +metaTitle: 'GET /v1/workspaces/{workspaceId}/integrations | Get list of integrations' +metaDescription: 'Management API: Returns integrations for the given workspace.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns integrations for the given workspace. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx index d9af0e49e4..bf8c927f2b 100644 --- a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx +++ b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-accelerate.mdx @@ -2,17 +2,20 @@ title: Get Prisma Accelerate regions full: true _openapi: - path: "/v1/regions/accelerate" method: GET toc: [] structuredData: headings: [] contents: - content: Returns all available regions for Prisma Accelerate. + path: /v1/regions/accelerate +url: /management-api/endpoints/misc/get-regions-accelerate +metaTitle: GET /v1/regions/accelerate | Get Prisma Accelerate regions +metaDescription: 'Management API: Returns all available regions for Prisma Accelerate.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all available regions for Prisma Accelerate. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx index 6b4d919cac..234be6b55d 100644 --- a/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx +++ b/apps/docs/content/docs/management-api/endpoints/misc/get-regions-postgres.mdx @@ -2,17 +2,20 @@ title: Get Prisma Postgres regions full: true _openapi: - path: "/v1/regions/postgres" method: GET toc: [] structuredData: headings: [] contents: - content: Returns all available regions for Prisma Postgres. + path: /v1/regions/postgres +url: /management-api/endpoints/misc/get-regions-postgres +metaTitle: GET /v1/regions/postgres | Get Prisma Postgres regions +metaDescription: 'Management API: Returns all available regions for Prisma Postgres.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all available regions for Prisma Postgres. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx new file mode 100644 index 0000000000..e2e6add30e --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/projects/delete-projects-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Delete project +full: true +_openapi: + method: DELETE + toc: [] + structuredData: + headings: [] + contents: + - content: Deletes the project with the given ID. + path: '/v1/projects/{id}' +url: /management-api/endpoints/projects/delete-projects-by-id +metaTitle: 'DELETE /v1/projects/{id} | Delete project' +metaDescription: 'Management API: Deletes the project with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Deletes the project with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx index bc040e2dc7..2d6f30efd0 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx +++ b/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx @@ -2,17 +2,20 @@ title: Delete project full: true _openapi: - path: "/v1/projects/{id}" method: DELETE toc: [] structuredData: headings: [] contents: - content: Deletes the project with the given ID. + path: '/v1/projects/{id}' +url: /management-api/endpoints/projects/delete-projects +metaTitle: 'DELETE /v1/projects/{id} | Delete project' +metaDescription: 'Management API: Deletes the project with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Deletes the project with the given ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx new file mode 100644 index 0000000000..6b844ec487 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/projects/get-projects-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Get project +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns the project with the given ID. + path: '/v1/projects/{id}' +url: /management-api/endpoints/projects/get-projects-by-id +metaTitle: 'GET /v1/projects/{id} | Get project' +metaDescription: 'Management API: Returns the project with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns the project with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx index 03c0c1481f..a331aa539a 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx +++ b/apps/docs/content/docs/management-api/endpoints/projects/get-projects.mdx @@ -1,18 +1,21 @@ --- -title: Get project +title: Get list of projects full: true _openapi: - path: "/v1/projects/{id}" method: GET toc: [] structuredData: headings: [] contents: - - content: Returns the project with the given ID. + - content: Returns the list of projects the token has access to. + path: /v1/projects +url: /management-api/endpoints/projects/get-projects +metaTitle: GET /v1/projects | Get list of projects +metaDescription: 'Management API: Returns the list of projects the token has access to.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} -Returns the project with the given ID. +Returns the list of projects the token has access to. -rojects","method":"get"}]} /> \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx new file mode 100644 index 0000000000..16119a9799 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/projects/patch-projects-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Update project +full: true +_openapi: + method: PATCH + toc: [] + structuredData: + headings: [] + contents: + - content: Updates the project with the given ID. + path: '/v1/projects/{id}' +url: /management-api/endpoints/projects/patch-projects-by-id +metaTitle: 'PATCH /v1/projects/{id} | Update project' +metaDescription: 'Management API: Updates the project with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Updates the project with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx index 2aee9664ea..ec829a14d1 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx +++ b/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx @@ -2,17 +2,20 @@ title: Update project full: true _openapi: - path: "/v1/projects/{id}" method: PATCH toc: [] structuredData: headings: [] contents: - content: Updates the project with the given ID. + path: '/v1/projects/{id}' +url: /management-api/endpoints/projects/patch-projects +metaTitle: 'PATCH /v1/projects/{id} | Update project' +metaDescription: 'Management API: Updates the project with the given ID.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Updates the project with the given ID. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx b/apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx new file mode 100644 index 0000000000..71e32796f1 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/projects/post-projects-by-id-transfer.mdx @@ -0,0 +1,21 @@ +--- +title: Transfer project +full: true +_openapi: + method: POST + toc: [] + structuredData: + headings: [] + contents: + - content: Transfer the project with the given ID to the new owner's workspace + path: '/v1/projects/{id}/transfer' +url: /management-api/endpoints/projects/post-projects-by-id-transfer +metaTitle: 'POST /v1/projects/{id}/transfer | Transfer project' +metaDescription: 'Management API: Transfer the project with the given ID to the new owner''s workspace' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Transfer the project with the given ID to the new owner's workspace + + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx b/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx index f09794a467..16a1a3de8e 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx +++ b/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx @@ -2,17 +2,20 @@ title: Transfer project full: true _openapi: - path: "/v1/projects/{id}/transfer" method: POST toc: [] structuredData: headings: [] contents: - content: Transfer the project with the given ID to the new owner's workspace + path: '/v1/projects/{id}/transfer' +url: /management-api/endpoints/projects/post-projects-transfer +metaTitle: 'POST /v1/projects/{id}/transfer | Transfer project' +metaDescription: 'Management API: Transfer the project with the given ID to the new owner''s workspace' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Transfer the project with the given ID to the new owner's workspace - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx index 0a9d36039b..d63dffb6e0 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx +++ b/apps/docs/content/docs/management-api/endpoints/projects/post-projects.mdx @@ -2,17 +2,20 @@ title: Create project with a postgres database full: true _openapi: - path: "/v1/projects" method: POST toc: [] structuredData: headings: [] contents: - content: Creates a new project with a postgres database. + path: /v1/projects +url: /management-api/endpoints/projects/post-projects +metaTitle: POST /v1/projects | Create project with a postgres database +metaDescription: 'Management API: Creates a new project with a postgres database.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Creates a new project with a postgres database. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx b/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx index d56f372311..e60cc1fcf6 100644 --- a/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx +++ b/apps/docs/content/docs/management-api/endpoints/regions/get-regions.mdx @@ -2,19 +2,20 @@ title: Get all regions full: true _openapi: - path: "/v1/regions" method: GET toc: [] structuredData: headings: [] contents: - - content: >- - Returns all available regions across products. Optionally filter by - product. + - content: Returns all available regions across products. Optionally filter by product. + path: /v1/regions +url: /management-api/endpoints/regions/get-regions +metaTitle: GET /v1/regions | Get all regions +metaDescription: 'Management API: Returns all available regions across products. Optionally filter by product.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} Returns all available regions across products. Optionally filter by product. - \ No newline at end of file + diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx new file mode 100644 index 0000000000..3b9d415615 --- /dev/null +++ b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces-by-id.mdx @@ -0,0 +1,21 @@ +--- +title: Get workspace +full: true +_openapi: + method: GET + toc: [] + structuredData: + headings: [] + contents: + - content: Returns the workspace with the given ID. + path: '/v1/workspaces/{id}' +url: /management-api/endpoints/workspaces/get-workspaces-by-id +metaTitle: 'GET /v1/workspaces/{id} | Get workspace' +metaDescription: 'Management API: Returns the workspace with the given ID.' +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + +Returns the workspace with the given ID. + + diff --git a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx index 1f69cc7c49..b64fa3006c 100644 --- a/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx +++ b/apps/docs/content/docs/management-api/endpoints/workspaces/get-workspaces.mdx @@ -1,18 +1,21 @@ --- -title: Get workspace +title: Get list of workspaces full: true _openapi: - path: "/v1/workspaces/{id}" method: GET toc: [] structuredData: headings: [] contents: - - content: Returns the workspace with the given ID. + - content: Returns the list of workspaces the current token can access. + path: /v1/workspaces +url: /management-api/endpoints/workspaces/get-workspaces +metaTitle: GET /v1/workspaces | Get list of workspaces +metaDescription: 'Management API: Returns the list of workspaces the current token can access.' --- {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} -Returns the workspace with the given ID. +Returns the list of workspaces the current token can access. -":"/v1/workspaces","method":"get"}]} /> \ No newline at end of file + diff --git a/apps/docs/scripts/generate-docs.ts b/apps/docs/scripts/generate-docs.ts index f355a3c02a..394d10d967 100644 --- a/apps/docs/scripts/generate-docs.ts +++ b/apps/docs/scripts/generate-docs.ts @@ -1,4 +1,5 @@ import { generateFiles } from "fumadocs-openapi"; +import matter from "gray-matter"; import { openapi } from "@/lib/openapi"; void generateFiles({ @@ -16,7 +17,6 @@ void generateFiles({ const cleanName = operationId .replace(/V\d+/g, "") - .replace(/By[A-Z][a-z]*/g, "") .replace(/([a-z])([A-Z])/g, "$1-$2") .toLowerCase(); @@ -26,31 +26,94 @@ void generateFiles({ return output.item.name; }, beforeWrite(files) { + const operationByFilePath = new Map(); + + for (const entries of Object.values(this.generatedEntries)) { + for (const entry of entries) { + if (entry.type !== "operation") continue; + operationByFilePath.set(entry.path, { + path: entry.item.path, + method: entry.item.method.toUpperCase(), + title: entry.info.title, + description: entry.info.description, + }); + } + } + for (const file of files) { - const frontmatterMatch = file.content.match(/^---\n([\s\S]*?)\n---/); - if (frontmatterMatch) { - const frontmatter = frontmatterMatch[1]; - if (frontmatter.includes("_openapi:")) { - const apiPageMatch = file.content.match(/]*operations=\{(\[.*?\])\}/s); - if (apiPageMatch) { - try { - const operations = JSON.parse(apiPageMatch[1].replace(/'/g, '"')); - if (operations[0]?.path) { - const path = operations[0].path; - - const updatedFrontmatter = frontmatter.replace( - /(_openapi:\s*\n\s*method:)/, - `_openapi:\n path: "${path}"\n method:`, - ); - - file.content = file.content.replace(frontmatter, updatedFrontmatter); - } - } catch (e) { - console.warn(`Failed to parse operations for ${file.path}:`, e); - } - } - } + const operation = operationByFilePath.get(file.path); + if (!operation) continue; + + const parsed = matter(file.content); + const data = parsed.data as Record; + + let changed = false; + + const openapiData = + typeof data._openapi === "object" && data._openapi !== null + ? (data._openapi as Record) + : {}; + + if (data._openapi !== openapiData) { + data._openapi = openapiData; + changed = true; + } + + if (openapiData.path !== operation.path) { + openapiData.path = operation.path; + changed = true; + } + + if (openapiData.method !== operation.method) { + openapiData.method = operation.method; + changed = true; } + + const normalizedPath = file.path + .replace(/\\/g, "/") + .replace(/\.mdx$/, "") + .replace(/^management-api\/endpoints\//, ""); + const url = `/management-api/endpoints/${normalizedPath}`; + + if (typeof data.url !== "string") { + data.url = url; + changed = true; + } + + const title = + typeof data.title === "string" && data.title.trim().length > 0 + ? data.title.trim() + : operation.title; + const metaTitle = `${operation.method} ${operation.path} | ${title}`; + + if (typeof data.metaTitle !== "string") { + data.metaTitle = metaTitle; + changed = true; + } + + const description = + typeof operation.description === "string" && operation.description.trim().length > 0 + ? operation.description.trim() + : `${operation.method} ${operation.path}.`; + const metaDescription = description.startsWith("Management API:") + ? description + : `Management API: ${description}`; + + if (typeof data.metaDescription !== "string") { + data.metaDescription = metaDescription; + changed = true; + } + + if (!changed) continue; + + file.content = matter.stringify(parsed.content, data, { + lineWidth: -1, + } as Parameters[2]); } }, }); diff --git a/apps/docs/src/app/og/[...slug]/route.tsx b/apps/docs/src/app/og/[...slug]/route.tsx index 69bc0779db..9b3c0d2462 100644 --- a/apps/docs/src/app/og/[...slug]/route.tsx +++ b/apps/docs/src/app/og/[...slug]/route.tsx @@ -19,6 +19,7 @@ const HTTP_METHOD_COLORS = { GET: "#07DC71", POST: "#51A2FF", DELETE: "#FF6467", + PATCH: "#F7B955", } as const; function PrismaOGImage({ @@ -30,10 +31,12 @@ function PrismaOGImage({ }: { title: string; description?: string; - method?: "GET" | "POST" | "DELETE"; + method?: string; apiPath?: string; section?: string; }) { + const methodColor = method ? HTTP_METHOD_COLORS[method as keyof typeof HTTP_METHOD_COLORS] ?? "#71e8df" : null; + return (
- {method ? ( + {method && methodColor ? (
{method} @@ -200,7 +203,7 @@ export async function GET(_req: Request, { params }: RouteContext<"/og/[...slug] const page = source.getPage(slug.slice(0, -1)) ?? sourceV6.getPage(slug.slice(0, -1)); if (!page) notFound(); - const method = (page.data as any)?._openapi?.method as "GET" | "POST" | "DELETE" | undefined; + const method = (page.data as any)?._openapi?.method as string | undefined; const apiPath = (page.data as any)?._openapi?.path as string | undefined; const section = page.slugs[0]; From a1f07c830b2f7deb2c5b8aa77f5d67511234a848 Mon Sep 17 00:00:00 2001 From: Aidan McAlister Date: Thu, 5 Mar 2026 12:54:26 -0500 Subject: [PATCH 2/2] fix(docs): clean-regenerate management API endpoints and remove duplicate slugs --- .../workflows/sync-management-api-docs.yml | 2 +- .../connections/delete-connections.mdx | 21 ------------------- .../get-databases-id-backups.mdx | 21 ------------------- .../database-usage/get-databases-id-usage.mdx | 21 ------------------- .../delete-connections.mdx | 21 ------------------- .../get-databases-id-connections.mdx | 21 ------------------- .../endpoints/databases-connections/meta.json | 5 ++++- .../post-databases-id-connections.mdx | 21 ------------------- .../databases/delete-databases-id.mdx | 21 ------------------- .../endpoints/databases/get-databases-id.mdx | 21 ------------------- .../databases/get-projects-id-databases.mdx | 21 ------------------- .../endpoints/databases/meta.json | 8 +++---- .../databases/patch-databases-id.mdx | 21 ------------------- .../databases/post-projects-id-databases.mdx | 21 ------------------- .../integrations/delete-integrations.mdx | 21 ------------------- .../delete-workspaces-id-integrations-id.mdx | 21 ------------------- .../get-workspaces-id-integrations.mdx | 21 ------------------- .../endpoints/integrations/meta.json | 5 ++++- .../endpoints/projects/delete-projects.mdx | 21 ------------------- .../endpoints/projects/meta.json | 7 ++++++- .../endpoints/projects/patch-projects.mdx | 21 ------------------- .../projects/post-projects-transfer.mdx | 21 ------------------- apps/docs/package.json | 1 + apps/docs/scripts/generate-docs.ts | 6 +++--- apps/docs/src/app/og/[...slug]/route.tsx | 14 +++++++++++-- package.json | 1 + 26 files changed, 36 insertions(+), 370 deletions(-) delete mode 100644 apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases-connections/delete-connections.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx delete mode 100644 apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx diff --git a/.github/workflows/sync-management-api-docs.yml b/.github/workflows/sync-management-api-docs.yml index bd7143263d..35a61a768a 100644 --- a/.github/workflows/sync-management-api-docs.yml +++ b/.github/workflows/sync-management-api-docs.yml @@ -37,7 +37,7 @@ jobs: - name: Generate docs working-directory: apps/docs - run: pnpm tsx scripts/generate-docs.ts + run: pnpm run generate:management-api-docs - name: Check for changes id: changes diff --git a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx b/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx deleted file mode 100644 index 9dd6013537..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/connections/delete-connections.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Delete connection -full: true -_openapi: - method: DELETE - toc: [] - structuredData: - headings: [] - contents: - - content: Deletes the connection with the given ID. - path: '/v1/connections/{id}' -url: /management-api/endpoints/connections/delete-connections -metaTitle: 'DELETE /v1/connections/{id} | Delete connection' -metaDescription: 'Management API: Deletes the connection with the given ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Deletes the connection with the given ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx b/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx deleted file mode 100644 index 535bc71a90..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/database-backups/get-databases-id-backups.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Get list of backups -full: true -_openapi: - method: GET - toc: [] - structuredData: - headings: [] - contents: - - content: Returns backups for the specified database. - path: '/v1/databases/{databaseId}/backups' -url: /management-api/endpoints/database-backups/get-databases-id-backups -metaTitle: 'GET /v1/databases/{databaseId}/backups | Get list of backups' -metaDescription: 'Management API: Returns backups for the specified database.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Returns backups for the specified database. - - diff --git a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx b/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx deleted file mode 100644 index a8d73c066a..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/database-usage/get-databases-id-usage.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Get database usage metrics -full: true -_openapi: - method: GET - toc: [] - structuredData: - headings: [] - contents: - - content: Returns usage metrics for the specified database. - path: '/v1/databases/{databaseId}/usage' -url: /management-api/endpoints/database-usage/get-databases-id-usage -metaTitle: 'GET /v1/databases/{databaseId}/usage | Get database usage metrics' -metaDescription: 'Management API: Returns usage metrics for the specified database.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Returns usage metrics for the specified database. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/delete-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/delete-connections.mdx deleted file mode 100644 index 331540164e..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/delete-connections.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Delete database connection string -metaTitle: DELETE /v1/connections/{id} | Remove Connection String -metaDescription: 'Management API: Deletes the database connection string with the given ID. DELETE /v1/connections/{id}.' -full: true -_openapi: - path: '/v1/connections/{id}' - method: DELETE - toc: [] - structuredData: - headings: [] - contents: - - content: Deletes the database connection string with the given ID. -url: /management-api/endpoints/databases-connections/delete-connections ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Deletes the database connection string with the given ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx deleted file mode 100644 index c370cbaabb..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/get-databases-id-connections.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Get list of database connections -full: true -_openapi: - method: GET - toc: [] - structuredData: - headings: [] - contents: - - content: Returns all connections for the given database. - path: '/v1/databases/{databaseId}/connections' -url: /management-api/endpoints/databases-connections/get-databases-id-connections -metaTitle: 'GET /v1/databases/{databaseId}/connections | Get list of database connections' -metaDescription: 'Management API: Returns all connections for the given database.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Returns all connections for the given database. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json b/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json index f1a4e0604c..e9bb2a7872 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json +++ b/apps/docs/content/docs/management-api/endpoints/databases-connections/meta.json @@ -1,4 +1,7 @@ { "title": "Connections", - "pages": ["get-databases-id-connections", "post-databases-id-connections", "delete-connections"] + "pages": [ + "get-databases-by-database-id-connections", + "post-databases-by-database-id-connections" + ] } diff --git a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx b/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx deleted file mode 100644 index f7a835b7ef..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases-connections/post-databases-id-connections.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Create database connection string -full: true -_openapi: - method: POST - toc: [] - structuredData: - headings: [] - contents: - - content: Creates a new connection string for the given database. - path: '/v1/databases/{databaseId}/connections' -url: /management-api/endpoints/databases-connections/post-databases-id-connections -metaTitle: 'POST /v1/databases/{databaseId}/connections | Create database connection string' -metaDescription: 'Management API: Creates a new connection string for the given database.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Creates a new connection string for the given database. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx deleted file mode 100644 index 0677e6a851..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases/delete-databases-id.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Delete database -full: true -_openapi: - method: DELETE - toc: [] - structuredData: - headings: [] - contents: - - content: Deletes the database with the given ID. - path: '/v1/databases/{databaseId}' -url: /management-api/endpoints/databases/delete-databases-id -metaTitle: 'DELETE /v1/databases/{databaseId} | Delete database' -metaDescription: 'Management API: Deletes the database with the given ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Deletes the database with the given ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx deleted file mode 100644 index acf169808f..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-databases-id.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Get database -full: true -_openapi: - method: GET - toc: [] - structuredData: - headings: [] - contents: - - content: Returns the database with the given ID. - path: '/v1/databases/{databaseId}' -url: /management-api/endpoints/databases/get-databases-id -metaTitle: 'GET /v1/databases/{databaseId} | Get database' -metaDescription: 'Management API: Returns the database with the given ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Returns the database with the given ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx deleted file mode 100644 index 94b762441c..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases/get-projects-id-databases.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Get list of databases -full: true -_openapi: - method: GET - toc: [] - structuredData: - headings: [] - contents: - - content: Returns databases for the given project. - path: '/v1/projects/{projectId}/databases' -url: /management-api/endpoints/databases/get-projects-id-databases -metaTitle: 'GET /v1/projects/{projectId}/databases | Get list of databases' -metaDescription: 'Management API: Returns databases for the given project.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Returns databases for the given project. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases/meta.json b/apps/docs/content/docs/management-api/endpoints/databases/meta.json index 5505a1f046..7790d45347 100644 --- a/apps/docs/content/docs/management-api/endpoints/databases/meta.json +++ b/apps/docs/content/docs/management-api/endpoints/databases/meta.json @@ -1,9 +1,9 @@ { "title": "Databases", "pages": [ - "get-projects-id-databases", - "get-databases-id", - "post-projects-id-databases", - "delete-databases-id" + "get-projects-by-project-id-databases", + "get-databases-by-database-id", + "post-projects-by-project-id-databases", + "delete-databases-by-database-id" ] } diff --git a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx b/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx deleted file mode 100644 index 03c9503430..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases/patch-databases-id.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Update database -full: true -_openapi: - method: PATCH - toc: [] - structuredData: - headings: [] - contents: - - content: Updates the database with the given ID. - path: '/v1/databases/{databaseId}' -url: /management-api/endpoints/databases/patch-databases-id -metaTitle: 'PATCH /v1/databases/{databaseId} | Update database' -metaDescription: 'Management API: Updates the database with the given ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Updates the database with the given ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx b/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx deleted file mode 100644 index 729c5962df..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/databases/post-projects-id-databases.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Create database -full: true -_openapi: - method: POST - toc: [] - structuredData: - headings: [] - contents: - - content: Creates a new database for the given project. - path: '/v1/projects/{projectId}/databases' -url: /management-api/endpoints/databases/post-projects-id-databases -metaTitle: 'POST /v1/projects/{projectId}/databases | Create database' -metaDescription: 'Management API: Creates a new database for the given project.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Creates a new database for the given project. - - diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx deleted file mode 100644 index 8798dc7527..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-integrations.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Delete integration -full: true -_openapi: - method: DELETE - toc: [] - structuredData: - headings: [] - contents: - - content: Revokes the integration tokens by integration ID. - path: '/v1/integrations/{id}' -url: /management-api/endpoints/integrations/delete-integrations -metaTitle: 'DELETE /v1/integrations/{id} | Delete integration' -metaDescription: 'Management API: Revokes the integration tokens by integration ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Revokes the integration tokens by integration ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx deleted file mode 100644 index 7202a93a20..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/integrations/delete-workspaces-id-integrations-id.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Revoke integration tokens -full: true -_openapi: - method: DELETE - toc: [] - structuredData: - headings: [] - contents: - - content: Revokes the integration tokens with the given client ID. - path: '/v1/workspaces/{workspaceId}/integrations/{clientId}' -url: /management-api/endpoints/integrations/delete-workspaces-id-integrations-id -metaTitle: 'DELETE /v1/workspaces/{workspaceId}/integrations/{clientId} | Revoke integration tokens' -metaDescription: 'Management API: Revokes the integration tokens with the given client ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Revokes the integration tokens with the given client ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx b/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx deleted file mode 100644 index d3c6257bf0..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/integrations/get-workspaces-id-integrations.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Get list of integrations -full: true -_openapi: - method: GET - toc: [] - structuredData: - headings: [] - contents: - - content: Returns integrations for the given workspace. - path: '/v1/workspaces/{workspaceId}/integrations' -url: /management-api/endpoints/integrations/get-workspaces-id-integrations -metaTitle: 'GET /v1/workspaces/{workspaceId}/integrations | Get list of integrations' -metaDescription: 'Management API: Returns integrations for the given workspace.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Returns integrations for the given workspace. - - diff --git a/apps/docs/content/docs/management-api/endpoints/integrations/meta.json b/apps/docs/content/docs/management-api/endpoints/integrations/meta.json index 4c515b9dfd..c7cb0bca43 100644 --- a/apps/docs/content/docs/management-api/endpoints/integrations/meta.json +++ b/apps/docs/content/docs/management-api/endpoints/integrations/meta.json @@ -1,4 +1,7 @@ { "title": "Integrations", - "pages": ["get-workspaces-id-integrations", "delete-workspaces-id-integrations-id"] + "pages": [ + "get-workspaces-by-workspace-id-integrations", + "delete-workspaces-by-workspace-id-integrations-by-client-id" + ] } diff --git a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx deleted file mode 100644 index 2d6f30efd0..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/projects/delete-projects.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Delete project -full: true -_openapi: - method: DELETE - toc: [] - structuredData: - headings: [] - contents: - - content: Deletes the project with the given ID. - path: '/v1/projects/{id}' -url: /management-api/endpoints/projects/delete-projects -metaTitle: 'DELETE /v1/projects/{id} | Delete project' -metaDescription: 'Management API: Deletes the project with the given ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Deletes the project with the given ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/projects/meta.json b/apps/docs/content/docs/management-api/endpoints/projects/meta.json index 3c3a194f96..0da874b2b1 100644 --- a/apps/docs/content/docs/management-api/endpoints/projects/meta.json +++ b/apps/docs/content/docs/management-api/endpoints/projects/meta.json @@ -1,4 +1,9 @@ { "title": "Projects", - "pages": ["get-projects", "post-projects", "post-projects-transfer", "delete-projects"] + "pages": [ + "get-projects", + "post-projects", + "post-projects-by-id-transfer", + "delete-projects-by-id" + ] } diff --git a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx b/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx deleted file mode 100644 index ec829a14d1..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/projects/patch-projects.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Update project -full: true -_openapi: - method: PATCH - toc: [] - structuredData: - headings: [] - contents: - - content: Updates the project with the given ID. - path: '/v1/projects/{id}' -url: /management-api/endpoints/projects/patch-projects -metaTitle: 'PATCH /v1/projects/{id} | Update project' -metaDescription: 'Management API: Updates the project with the given ID.' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Updates the project with the given ID. - - diff --git a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx b/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx deleted file mode 100644 index 16a1a3de8e..0000000000 --- a/apps/docs/content/docs/management-api/endpoints/projects/post-projects-transfer.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Transfer project -full: true -_openapi: - method: POST - toc: [] - structuredData: - headings: [] - contents: - - content: Transfer the project with the given ID to the new owner's workspace - path: '/v1/projects/{id}/transfer' -url: /management-api/endpoints/projects/post-projects-transfer -metaTitle: 'POST /v1/projects/{id}/transfer | Transfer project' -metaDescription: 'Management API: Transfer the project with the given ID to the new owner''s workspace' ---- - -{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} - -Transfer the project with the given ID to the new owner's workspace - - diff --git a/apps/docs/package.json b/apps/docs/package.json index 5d55fef0ae..902e5531c1 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "fetch-openapi": "tsx ./scripts/fetch-openapi.ts", + "generate:management-api-docs": "rimraf ./content/docs/management-api/endpoints/**/*.mdx && pnpm run fetch-openapi && tsx ./scripts/generate-docs.ts && fumadocs-mdx", "prebuild": "rimraf out", "build": "pnpm run fetch-openapi && next build", "dev": "next dev", diff --git a/apps/docs/scripts/generate-docs.ts b/apps/docs/scripts/generate-docs.ts index 394d10d967..0c684bcb26 100644 --- a/apps/docs/scripts/generate-docs.ts +++ b/apps/docs/scripts/generate-docs.ts @@ -80,7 +80,7 @@ void generateFiles({ .replace(/^management-api\/endpoints\//, ""); const url = `/management-api/endpoints/${normalizedPath}`; - if (typeof data.url !== "string") { + if (data.url !== url) { data.url = url; changed = true; } @@ -91,7 +91,7 @@ void generateFiles({ : operation.title; const metaTitle = `${operation.method} ${operation.path} | ${title}`; - if (typeof data.metaTitle !== "string") { + if (data.metaTitle !== metaTitle) { data.metaTitle = metaTitle; changed = true; } @@ -104,7 +104,7 @@ void generateFiles({ ? description : `Management API: ${description}`; - if (typeof data.metaDescription !== "string") { + if (data.metaDescription !== metaDescription) { data.metaDescription = metaDescription; changed = true; } diff --git a/apps/docs/src/app/og/[...slug]/route.tsx b/apps/docs/src/app/og/[...slug]/route.tsx index 9b3c0d2462..650967d602 100644 --- a/apps/docs/src/app/og/[...slug]/route.tsx +++ b/apps/docs/src/app/og/[...slug]/route.tsx @@ -22,6 +22,15 @@ const HTTP_METHOD_COLORS = { PATCH: "#F7B955", } as const; +type OpenApiMetadata = { + method?: string; + path?: string; +}; + +type PageFrontmatter = { + _openapi?: OpenApiMetadata; +}; + function PrismaOGImage({ title, description, @@ -203,8 +212,9 @@ export async function GET(_req: Request, { params }: RouteContext<"/og/[...slug] const page = source.getPage(slug.slice(0, -1)) ?? sourceV6.getPage(slug.slice(0, -1)); if (!page) notFound(); - const method = (page.data as any)?._openapi?.method as string | undefined; - const apiPath = (page.data as any)?._openapi?.path as string | undefined; + const openApiMetadata = (page.data as PageFrontmatter)._openapi; + const method = openApiMetadata?.method; + const apiPath = openApiMetadata?.path; const section = page.slugs[0]; return new ImageResponse( diff --git a/package.json b/package.json index daab08195c..ecae1facf0 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dev": "turbo run dev", "check": "turbo run check", "types:check": "turbo run types:check", + "generate:management-api-docs": "pnpm --filter docs run generate:management-api-docs", "lint:links": "turbo run lint:links --filter=docs", "lint:external-links": "turbo run lint:external-links --filter=docs", "lint:code": "turbo run lint:code --filter=docs",