Skip to content

Commit 89617ca

Browse files
TooonyChenroot
andauthored
feat: NEON.TECH integration (#226)
### 🏷️ Notion Ticket https://www.notion.so/Neon-1ca8378d6a4780b0b8c3cbfc845caeca?pvs=4 ### 📝 Description This PR integrates the Neon.tech API into our application, enabling users to create, manage, and delete Neon Postgres projects and associated resources. The Neon API provides robust functionality for handling projects, API keys, and operational data. #### Implemented Functions: - NEON__LIST_API_KEYS - NEON__CREATE_API_KEY - NEON__REVOKE_API_KEY - NEON__RETRIEVE_OPERATION_DETAILS - NEON__LIST_OPERATIONS - NEON__LIST_PROJECTS - NEON__CREATE_PROJECT - NEON__LIST_SHARED_PROJECTS - NEON__GET_PROJECT - NEON__DELETE_PROJECT All functions have been successfully tested using the fuzzy testing framework to ensure input coverage and robustness. --- #### 🌐 Overview This app integrates the [Neon.tech](https://neon.tech) API into our platform, enabling seamless management of Postgres infrastructure in a serverless environment. It allows developers to manage projects, control API key access, and monitor operations directly from our interface. - **Application URL:** https://neon.tech - **API Documentation:** https://api-docs.neon.tech --- #### 🔍 Fuzzy Tests **List API Keys** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__LIST_API_KEYS \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "List all API keys for the authenticated user." ``` **Create API Key** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__CREATE_API_KEY \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "Create a new API key named 'test-key' for the authenticated user." ``` **Revoke API Key** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__REVOKE_API_KEY \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "Revoke the API key with ID 123456. This action cannot be reversed." ``` **Retrieve Operation Details** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__RETRIEVE_OPERATION_DETAILS \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "Get details of operation 'op-abc-123' in project 'proj-xyz-789'." ``` **List Operations** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__LIST_OPERATIONS \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "List operations for project ID 'proj-xyz-789'." ``` **List Projects** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__LIST_PROJECTS \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "List all Neon projects belonging to this account." ``` **Create Project** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__CREATE_PROJECT \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "Create a new Postgres project named 'analytics-db' with a primary branch." ``` **List Shared Projects** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__LIST_SHARED_PROJECTS \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "List shared projects accessible to this Neon account." ``` **Get Project** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__GET_PROJECT \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "Retrieve details of the project with ID 'proj-xyz-789'." ``` **Delete Project** ```bash docker compose exec runner python -m aipolabs.cli.aipolabs fuzzy-test-function-execution \ --function-name NEON__DELETE_PROJECT \ --linked-account-owner-id 2463d857-cf44-464d-8db5-c687a795bf99 \ --aipolabs-api-key bb912170e652c779cc805e117916ce3617749fc666e68a039ebb0c87a9e5c7e7 \ --prompt "Permanently delete the project with ID 'proj-xyz-789'." ``` --- #### ✅ Proof of tests All function calls have been verified and successfully executed via the fuzzy testing framework. Please refer to the [Notion ticket](https://www.notion.so/Neon-1ca8378d6a4780b0b8c3cbfc845caeca?pvs=4) for logs screenshots <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced support for the Neon API, enabling serverless Postgres database management with autoscaling and storage optimization. - Added endpoints for API key management, project creation and deletion, project listing and details, shared project access, and operation tracking. - Enhanced configuration options for project setup, including quotas, allowed IPs, maintenance windows, and advanced PostgreSQL settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: root <root@nz-debian.nz.lan>
1 parent 40867fd commit 89617ca

File tree

2 files changed

+644
-0
lines changed

2 files changed

+644
-0
lines changed

apps/neon/app.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "NEON",
3+
"display_name": "Neon API",
4+
"logo": "https://raw.githubusercontent.com/aipotheosis-labs/aipolabs-icons/refs/heads/main/apps/neon.svg",
5+
"provider": "Neon Tech, Inc.",
6+
"version": "aipolabs_0.0.1",
7+
"description": "Neon is a serverless Postgres database service with a generous free tier, providing instant autoscaling and automated storage optimization.",
8+
"security_schemes": {
9+
"api_key": {
10+
"location": "header",
11+
"name": "Authorization",
12+
"prefix": "Bearer"
13+
}
14+
},
15+
"default_security_credentials_by_scheme": {},
16+
"categories": [
17+
"database",
18+
"postgres",
19+
"serverless"
20+
],
21+
"visibility": "public",
22+
"active": true
23+
}

0 commit comments

Comments
 (0)