universal-mcp-applications 0.1.32__py3-none-any.whl → 0.1.36rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- universal_mcp/applications/ahrefs/app.py +52 -198
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +111 -464
- universal_mcp/applications/asana/app.py +417 -1567
- universal_mcp/applications/aws_s3/app.py +36 -103
- universal_mcp/applications/bill/app.py +546 -1957
- universal_mcp/applications/box/app.py +1068 -3981
- universal_mcp/applications/braze/app.py +364 -1430
- universal_mcp/applications/browser_use/app.py +2 -8
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +61 -200
- universal_mcp/applications/canva/app.py +45 -110
- universal_mcp/applications/clickup/app.py +207 -674
- universal_mcp/applications/coda/app.py +146 -426
- universal_mcp/applications/confluence/app.py +310 -1098
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +28 -107
- universal_mcp/applications/dialpad/app.py +283 -756
- universal_mcp/applications/digitalocean/app.py +1766 -5777
- universal_mcp/applications/domain_checker/app.py +3 -54
- universal_mcp/applications/e2b/app.py +14 -64
- universal_mcp/applications/elevenlabs/app.py +9 -47
- universal_mcp/applications/exa/app.py +6 -17
- universal_mcp/applications/falai/app.py +24 -101
- universal_mcp/applications/figma/app.py +53 -137
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +51 -152
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +91 -528
- universal_mcp/applications/fpl/utils/fixtures.py +15 -49
- universal_mcp/applications/fpl/utils/helper.py +25 -89
- universal_mcp/applications/fpl/utils/league_utils.py +20 -64
- universal_mcp/applications/ghost_content/app.py +52 -161
- universal_mcp/applications/github/app.py +19 -56
- universal_mcp/applications/gong/app.py +88 -248
- universal_mcp/applications/google_calendar/app.py +16 -68
- universal_mcp/applications/google_docs/app.py +85 -189
- universal_mcp/applications/google_drive/app.py +141 -463
- universal_mcp/applications/google_gemini/app.py +12 -64
- universal_mcp/applications/google_mail/app.py +28 -157
- universal_mcp/applications/google_searchconsole/app.py +15 -48
- universal_mcp/applications/google_sheet/app.py +100 -581
- universal_mcp/applications/google_sheet/helper.py +10 -37
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +44 -122
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
- universal_mcp/applications/hubspot/app.py +23 -87
- universal_mcp/applications/jira/app.py +2071 -7986
- universal_mcp/applications/klaviyo/app.py +494 -1376
- universal_mcp/applications/linkedin/README.md +9 -2
- universal_mcp/applications/linkedin/app.py +240 -181
- universal_mcp/applications/mailchimp/app.py +450 -1605
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +217 -699
- universal_mcp/applications/ms_teams/app.py +64 -186
- universal_mcp/applications/neon/app.py +86 -192
- universal_mcp/applications/notion/app.py +21 -36
- universal_mcp/applications/onedrive/app.py +16 -38
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/app.py +24 -84
- universal_mcp/applications/perplexity/app.py +4 -19
- universal_mcp/applications/pipedrive/app.py +832 -3142
- universal_mcp/applications/posthog/app.py +163 -432
- universal_mcp/applications/reddit/app.py +40 -139
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +14 -41
- universal_mcp/applications/rocketlane/app.py +221 -934
- universal_mcp/applications/scraper/README.md +7 -4
- universal_mcp/applications/scraper/app.py +50 -109
- universal_mcp/applications/semanticscholar/app.py +22 -64
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +512 -1262
- universal_mcp/applications/sentry/app.py +271 -906
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +17 -39
- universal_mcp/applications/shopify/app.py +1551 -4287
- universal_mcp/applications/shortcut/app.py +155 -417
- universal_mcp/applications/slack/app.py +33 -115
- universal_mcp/applications/spotify/app.py +126 -325
- universal_mcp/applications/supabase/app.py +104 -213
- universal_mcp/applications/tavily/app.py +1 -1
- universal_mcp/applications/trello/app.py +693 -2656
- universal_mcp/applications/twilio/app.py +14 -50
- universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
- universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
- universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
- universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
- universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
- universal_mcp/applications/whatsapp/app.py +35 -186
- universal_mcp/applications/whatsapp/audio.py +2 -6
- universal_mcp/applications/whatsapp/whatsapp.py +17 -51
- universal_mcp/applications/whatsapp_business/app.py +70 -283
- universal_mcp/applications/wrike/app.py +45 -118
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +75 -261
- universal_mcp/applications/zenquotes/app.py +2 -2
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/RECORD +105 -105
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from typing import Any
|
|
2
|
-
|
|
3
2
|
from universal_mcp.applications.application import APIApplication
|
|
4
3
|
from universal_mcp.integrations import Integration
|
|
5
4
|
|
|
@@ -9,9 +8,7 @@ class NeonApp(APIApplication):
|
|
|
9
8
|
super().__init__(name="neon", integration=integration, **kwargs)
|
|
10
9
|
self.base_url = "https://console.neon.tech/api/v2"
|
|
11
10
|
|
|
12
|
-
def list_api_keys(
|
|
13
|
-
self,
|
|
14
|
-
) -> list[Any]:
|
|
11
|
+
async def list_api_keys(self) -> list[Any]:
|
|
15
12
|
"""
|
|
16
13
|
Retrieves a list of API keys from the server associated with the current client.
|
|
17
14
|
|
|
@@ -33,7 +30,7 @@ class NeonApp(APIApplication):
|
|
|
33
30
|
response.raise_for_status()
|
|
34
31
|
return response.json()
|
|
35
32
|
|
|
36
|
-
def create_api_key(self, key_name) -> dict[str, Any]:
|
|
33
|
+
async def create_api_key(self, key_name) -> dict[str, Any]:
|
|
37
34
|
"""
|
|
38
35
|
Creates a new API key with the specified name.
|
|
39
36
|
|
|
@@ -52,9 +49,7 @@ class NeonApp(APIApplication):
|
|
|
52
49
|
"""
|
|
53
50
|
if key_name is None:
|
|
54
51
|
raise ValueError("Missing required parameter 'key_name'")
|
|
55
|
-
request_body = {
|
|
56
|
-
"key_name": key_name,
|
|
57
|
-
}
|
|
52
|
+
request_body = {"key_name": key_name}
|
|
58
53
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
59
54
|
url = f"{self.base_url}/api_keys"
|
|
60
55
|
query_params = {}
|
|
@@ -62,7 +57,7 @@ class NeonApp(APIApplication):
|
|
|
62
57
|
response.raise_for_status()
|
|
63
58
|
return response.json()
|
|
64
59
|
|
|
65
|
-
def revoke_api_key(self, key_id) -> dict[str, Any]:
|
|
60
|
+
async def revoke_api_key(self, key_id) -> dict[str, Any]:
|
|
66
61
|
"""
|
|
67
62
|
Revokes an API key by its identifier.
|
|
68
63
|
|
|
@@ -87,7 +82,7 @@ class NeonApp(APIApplication):
|
|
|
87
82
|
response.raise_for_status()
|
|
88
83
|
return response.json()
|
|
89
84
|
|
|
90
|
-
def get_project_operation(self, project_id, operation_id) -> dict[str, Any]:
|
|
85
|
+
async def get_project_operation(self, project_id, operation_id) -> dict[str, Any]:
|
|
91
86
|
"""
|
|
92
87
|
Retrieves details of a specific operation for a given project from the API.
|
|
93
88
|
|
|
@@ -115,9 +110,7 @@ class NeonApp(APIApplication):
|
|
|
115
110
|
response.raise_for_status()
|
|
116
111
|
return response.json()
|
|
117
112
|
|
|
118
|
-
def list_projects(
|
|
119
|
-
self, cursor=None, limit=None, search=None, org_id=None, timeout=None
|
|
120
|
-
) -> Any:
|
|
113
|
+
async def list_projects(self, cursor=None, limit=None, search=None, org_id=None, timeout=None) -> Any:
|
|
121
114
|
"""
|
|
122
115
|
Retrieves a list of projects with optional pagination, filtering, and organizational scoping.
|
|
123
116
|
|
|
@@ -140,20 +133,14 @@ class NeonApp(APIApplication):
|
|
|
140
133
|
url = f"{self.base_url}/projects"
|
|
141
134
|
query_params = {
|
|
142
135
|
k: v
|
|
143
|
-
for k, v in [
|
|
144
|
-
("cursor", cursor),
|
|
145
|
-
("limit", limit),
|
|
146
|
-
("search", search),
|
|
147
|
-
("org_id", org_id),
|
|
148
|
-
("timeout", timeout),
|
|
149
|
-
]
|
|
136
|
+
for k, v in [("cursor", cursor), ("limit", limit), ("search", search), ("org_id", org_id), ("timeout", timeout)]
|
|
150
137
|
if v is not None
|
|
151
138
|
}
|
|
152
139
|
response = self._get(url, params=query_params)
|
|
153
140
|
response.raise_for_status()
|
|
154
141
|
return response.json()
|
|
155
142
|
|
|
156
|
-
def create_project(self, project) -> Any:
|
|
143
|
+
async def create_project(self, project) -> Any:
|
|
157
144
|
"""
|
|
158
145
|
Creates a new project by sending a POST request to the projects endpoint with the given project details.
|
|
159
146
|
|
|
@@ -172,9 +159,7 @@ class NeonApp(APIApplication):
|
|
|
172
159
|
"""
|
|
173
160
|
if project is None:
|
|
174
161
|
raise ValueError("Missing required parameter 'project'")
|
|
175
|
-
request_body = {
|
|
176
|
-
"project": project,
|
|
177
|
-
}
|
|
162
|
+
request_body = {"project": project}
|
|
178
163
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
179
164
|
url = f"{self.base_url}/projects"
|
|
180
165
|
query_params = {}
|
|
@@ -182,7 +167,7 @@ class NeonApp(APIApplication):
|
|
|
182
167
|
response.raise_for_status()
|
|
183
168
|
return response.json()
|
|
184
169
|
|
|
185
|
-
def list_shared_projects(self, cursor=None, limit=None, search=None) -> Any:
|
|
170
|
+
async def list_shared_projects(self, cursor=None, limit=None, search=None) -> Any:
|
|
186
171
|
"""
|
|
187
172
|
Retrieves a list of shared projects with optional pagination and search filtering.
|
|
188
173
|
|
|
@@ -201,16 +186,12 @@ class NeonApp(APIApplication):
|
|
|
201
186
|
list, projects, shared, search, api, important
|
|
202
187
|
"""
|
|
203
188
|
url = f"{self.base_url}/projects/shared"
|
|
204
|
-
query_params = {
|
|
205
|
-
k: v
|
|
206
|
-
for k, v in [("cursor", cursor), ("limit", limit), ("search", search)]
|
|
207
|
-
if v is not None
|
|
208
|
-
}
|
|
189
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit), ("search", search)] if v is not None}
|
|
209
190
|
response = self._get(url, params=query_params)
|
|
210
191
|
response.raise_for_status()
|
|
211
192
|
return response.json()
|
|
212
193
|
|
|
213
|
-
def get_project(self, project_id) -> dict[str, Any]:
|
|
194
|
+
async def get_project(self, project_id) -> dict[str, Any]:
|
|
214
195
|
"""
|
|
215
196
|
Retrieves detailed information for a specific project by its project ID.
|
|
216
197
|
|
|
@@ -235,7 +216,7 @@ class NeonApp(APIApplication):
|
|
|
235
216
|
response.raise_for_status()
|
|
236
217
|
return response.json()
|
|
237
218
|
|
|
238
|
-
def update_project(self, project_id, project) -> Any:
|
|
219
|
+
async def update_project(self, project_id, project) -> Any:
|
|
239
220
|
"""
|
|
240
221
|
Updates an existing project with new information using a PATCH request.
|
|
241
222
|
|
|
@@ -257,9 +238,7 @@ class NeonApp(APIApplication):
|
|
|
257
238
|
raise ValueError("Missing required parameter 'project_id'")
|
|
258
239
|
if project is None:
|
|
259
240
|
raise ValueError("Missing required parameter 'project'")
|
|
260
|
-
request_body = {
|
|
261
|
-
"project": project,
|
|
262
|
-
}
|
|
241
|
+
request_body = {"project": project}
|
|
263
242
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
264
243
|
url = f"{self.base_url}/projects/{project_id}"
|
|
265
244
|
query_params = {}
|
|
@@ -267,7 +246,7 @@ class NeonApp(APIApplication):
|
|
|
267
246
|
response.raise_for_status()
|
|
268
247
|
return response.json()
|
|
269
248
|
|
|
270
|
-
def delete_project(self, project_id) -> dict[str, Any]:
|
|
249
|
+
async def delete_project(self, project_id) -> dict[str, Any]:
|
|
271
250
|
"""
|
|
272
251
|
Deletes a project identified by the given project_id.
|
|
273
252
|
|
|
@@ -292,7 +271,7 @@ class NeonApp(APIApplication):
|
|
|
292
271
|
response.raise_for_status()
|
|
293
272
|
return response.json()
|
|
294
273
|
|
|
295
|
-
def list_project_operations(self, project_id, cursor=None, limit=None) -> Any:
|
|
274
|
+
async def list_project_operations(self, project_id, cursor=None, limit=None) -> Any:
|
|
296
275
|
"""
|
|
297
276
|
Retrieves a paginated list of operations for a specified project.
|
|
298
277
|
|
|
@@ -314,14 +293,12 @@ class NeonApp(APIApplication):
|
|
|
314
293
|
if project_id is None:
|
|
315
294
|
raise ValueError("Missing required parameter 'project_id'")
|
|
316
295
|
url = f"{self.base_url}/projects/{project_id}/operations"
|
|
317
|
-
query_params = {
|
|
318
|
-
k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None
|
|
319
|
-
}
|
|
296
|
+
query_params = {k: v for k, v in [("cursor", cursor), ("limit", limit)] if v is not None}
|
|
320
297
|
response = self._get(url, params=query_params)
|
|
321
298
|
response.raise_for_status()
|
|
322
299
|
return response.json()
|
|
323
300
|
|
|
324
|
-
def list_project_permissions(self, project_id) -> dict[str, Any]:
|
|
301
|
+
async def list_project_permissions(self, project_id) -> dict[str, Any]:
|
|
325
302
|
"""
|
|
326
303
|
Retrieves the permissions assigned to a specific project.
|
|
327
304
|
|
|
@@ -346,7 +323,7 @@ class NeonApp(APIApplication):
|
|
|
346
323
|
response.raise_for_status()
|
|
347
324
|
return response.json()
|
|
348
325
|
|
|
349
|
-
def grant_permission_to_project(self, project_id, email) -> dict[str, Any]:
|
|
326
|
+
async def grant_permission_to_project(self, project_id, email) -> dict[str, Any]:
|
|
350
327
|
"""
|
|
351
328
|
Grants a user permission to a specified project by sending a POST request with the user's email.
|
|
352
329
|
|
|
@@ -368,9 +345,7 @@ class NeonApp(APIApplication):
|
|
|
368
345
|
raise ValueError("Missing required parameter 'project_id'")
|
|
369
346
|
if email is None:
|
|
370
347
|
raise ValueError("Missing required parameter 'email'")
|
|
371
|
-
request_body = {
|
|
372
|
-
"email": email,
|
|
373
|
-
}
|
|
348
|
+
request_body = {"email": email}
|
|
374
349
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
375
350
|
url = f"{self.base_url}/projects/{project_id}/permissions"
|
|
376
351
|
query_params = {}
|
|
@@ -378,9 +353,7 @@ class NeonApp(APIApplication):
|
|
|
378
353
|
response.raise_for_status()
|
|
379
354
|
return response.json()
|
|
380
355
|
|
|
381
|
-
def revoke_permission_from_project(
|
|
382
|
-
self, project_id, permission_id
|
|
383
|
-
) -> dict[str, Any]:
|
|
356
|
+
async def revoke_permission_from_project(self, project_id, permission_id) -> dict[str, Any]:
|
|
384
357
|
"""
|
|
385
358
|
Revokes a specific permission from a project by sending a DELETE request to the appropriate API endpoint.
|
|
386
359
|
|
|
@@ -408,7 +381,7 @@ class NeonApp(APIApplication):
|
|
|
408
381
|
response.raise_for_status()
|
|
409
382
|
return response.json()
|
|
410
383
|
|
|
411
|
-
def get_project_jwks(self, project_id) -> dict[str, Any]:
|
|
384
|
+
async def get_project_jwks(self, project_id) -> dict[str, Any]:
|
|
412
385
|
"""
|
|
413
386
|
Retrieves the JSON Web Key Set (JWKS) for a specified project from the server.
|
|
414
387
|
|
|
@@ -433,14 +406,8 @@ class NeonApp(APIApplication):
|
|
|
433
406
|
response.raise_for_status()
|
|
434
407
|
return response.json()
|
|
435
408
|
|
|
436
|
-
def add_project_jwks(
|
|
437
|
-
self,
|
|
438
|
-
project_id,
|
|
439
|
-
jwks_url,
|
|
440
|
-
provider_name,
|
|
441
|
-
branch_id=None,
|
|
442
|
-
jwt_audience=None,
|
|
443
|
-
role_names=None,
|
|
409
|
+
async def add_project_jwks(
|
|
410
|
+
self, project_id, jwks_url, provider_name, branch_id=None, jwt_audience=None, role_names=None
|
|
444
411
|
) -> dict[str, Any]:
|
|
445
412
|
"""
|
|
446
413
|
Adds a JWKS (JSON Web Key Set) provider to the specified project for authentication integration.
|
|
@@ -483,7 +450,7 @@ class NeonApp(APIApplication):
|
|
|
483
450
|
response.raise_for_status()
|
|
484
451
|
return response.json()
|
|
485
452
|
|
|
486
|
-
def delete_project_jwks(self, project_id, jwks_id) -> dict[str, Any]:
|
|
453
|
+
async def delete_project_jwks(self, project_id, jwks_id) -> dict[str, Any]:
|
|
487
454
|
"""
|
|
488
455
|
Deletes a JSON Web Key Set (JWKS) associated with a specific project.
|
|
489
456
|
|
|
@@ -511,14 +478,8 @@ class NeonApp(APIApplication):
|
|
|
511
478
|
response.raise_for_status()
|
|
512
479
|
return response.json()
|
|
513
480
|
|
|
514
|
-
def get_connection_uri(
|
|
515
|
-
self,
|
|
516
|
-
project_id,
|
|
517
|
-
database_name,
|
|
518
|
-
role_name,
|
|
519
|
-
branch_id=None,
|
|
520
|
-
endpoint_id=None,
|
|
521
|
-
pooled=None,
|
|
481
|
+
async def get_connection_uri(
|
|
482
|
+
self, project_id, database_name, role_name, branch_id=None, endpoint_id=None, pooled=None
|
|
522
483
|
) -> dict[str, Any]:
|
|
523
484
|
"""
|
|
524
485
|
Retrieves the connection URI details for a specified database and role within a project.
|
|
@@ -563,7 +524,7 @@ class NeonApp(APIApplication):
|
|
|
563
524
|
response.raise_for_status()
|
|
564
525
|
return response.json()
|
|
565
526
|
|
|
566
|
-
def get_project_branch(self, project_id, branch_id) -> Any:
|
|
527
|
+
async def get_project_branch(self, project_id, branch_id) -> Any:
|
|
567
528
|
"""
|
|
568
529
|
Retrieves details of a specific branch within a project by project and branch ID.
|
|
569
530
|
|
|
@@ -591,7 +552,7 @@ class NeonApp(APIApplication):
|
|
|
591
552
|
response.raise_for_status()
|
|
592
553
|
return response.json()
|
|
593
554
|
|
|
594
|
-
def delete_project_branch(self, project_id, branch_id) -> dict[str, Any]:
|
|
555
|
+
async def delete_project_branch(self, project_id, branch_id) -> dict[str, Any]:
|
|
595
556
|
"""
|
|
596
557
|
Deletes a specific branch from the given project using the API.
|
|
597
558
|
|
|
@@ -619,7 +580,7 @@ class NeonApp(APIApplication):
|
|
|
619
580
|
response.raise_for_status()
|
|
620
581
|
return response.json()
|
|
621
582
|
|
|
622
|
-
def update_project_branch(self, project_id, branch_id, branch) -> dict[str, Any]:
|
|
583
|
+
async def update_project_branch(self, project_id, branch_id, branch) -> dict[str, Any]:
|
|
623
584
|
"""
|
|
624
585
|
Updates a branch in the specified project.
|
|
625
586
|
|
|
@@ -644,9 +605,7 @@ class NeonApp(APIApplication):
|
|
|
644
605
|
raise ValueError("Missing required parameter 'branch_id'")
|
|
645
606
|
if branch is None:
|
|
646
607
|
raise ValueError("Missing required parameter 'branch'")
|
|
647
|
-
request_body = {
|
|
648
|
-
"branch": branch,
|
|
649
|
-
}
|
|
608
|
+
request_body = {"branch": branch}
|
|
650
609
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
651
610
|
url = f"{self.base_url}/projects/{project_id}/branches/{branch_id}"
|
|
652
611
|
query_params = {}
|
|
@@ -654,14 +613,8 @@ class NeonApp(APIApplication):
|
|
|
654
613
|
response.raise_for_status()
|
|
655
614
|
return response.json()
|
|
656
615
|
|
|
657
|
-
def restore_project_branch(
|
|
658
|
-
self,
|
|
659
|
-
project_id,
|
|
660
|
-
branch_id,
|
|
661
|
-
source_branch_id,
|
|
662
|
-
source_lsn=None,
|
|
663
|
-
source_timestamp=None,
|
|
664
|
-
preserve_under_name=None,
|
|
616
|
+
async def restore_project_branch(
|
|
617
|
+
self, project_id, branch_id, source_branch_id, source_lsn=None, source_timestamp=None, preserve_under_name=None
|
|
665
618
|
) -> dict[str, Any]:
|
|
666
619
|
"""
|
|
667
620
|
Restores a project branch from a given source branch, allowing optional point-in-time recovery and name preservation.
|
|
@@ -703,9 +656,7 @@ class NeonApp(APIApplication):
|
|
|
703
656
|
response.raise_for_status()
|
|
704
657
|
return response.json()
|
|
705
658
|
|
|
706
|
-
def get_project_branch_schema(
|
|
707
|
-
self, project_id, branch_id, db_name, lsn=None, timestamp=None
|
|
708
|
-
) -> dict[str, Any]:
|
|
659
|
+
async def get_project_branch_schema(self, project_id, branch_id, db_name, lsn=None, timestamp=None) -> dict[str, Any]:
|
|
709
660
|
"""
|
|
710
661
|
Retrieves the schema information for a specific project branch database, optionally at a given LSN or timestamp.
|
|
711
662
|
|
|
@@ -733,16 +684,12 @@ class NeonApp(APIApplication):
|
|
|
733
684
|
if db_name is None:
|
|
734
685
|
raise ValueError("Missing required parameter 'db_name'")
|
|
735
686
|
url = f"{self.base_url}/projects/{project_id}/branches/{branch_id}/schema"
|
|
736
|
-
query_params = {
|
|
737
|
-
k: v
|
|
738
|
-
for k, v in [("db_name", db_name), ("lsn", lsn), ("timestamp", timestamp)]
|
|
739
|
-
if v is not None
|
|
740
|
-
}
|
|
687
|
+
query_params = {k: v for k, v in [("db_name", db_name), ("lsn", lsn), ("timestamp", timestamp)] if v is not None}
|
|
741
688
|
response = self._get(url, params=query_params)
|
|
742
689
|
response.raise_for_status()
|
|
743
690
|
return response.json()
|
|
744
691
|
|
|
745
|
-
def set_default_project_branch(self, project_id, branch_id) -> dict[str, Any]:
|
|
692
|
+
async def set_default_project_branch(self, project_id, branch_id) -> dict[str, Any]:
|
|
746
693
|
"""
|
|
747
694
|
Sets the specified branch as the default branch for a given project.
|
|
748
695
|
|
|
@@ -764,15 +711,13 @@ class NeonApp(APIApplication):
|
|
|
764
711
|
raise ValueError("Missing required parameter 'project_id'")
|
|
765
712
|
if branch_id is None:
|
|
766
713
|
raise ValueError("Missing required parameter 'branch_id'")
|
|
767
|
-
url =
|
|
768
|
-
f"{self.base_url}/projects/{project_id}/branches/{branch_id}/set_as_default"
|
|
769
|
-
)
|
|
714
|
+
url = f"{self.base_url}/projects/{project_id}/branches/{branch_id}/set_as_default"
|
|
770
715
|
query_params = {}
|
|
771
716
|
response = self._post(url, data={}, params=query_params)
|
|
772
717
|
response.raise_for_status()
|
|
773
718
|
return response.json()
|
|
774
719
|
|
|
775
|
-
def list_project_branch_endpoints(self, project_id, branch_id) -> dict[str, Any]:
|
|
720
|
+
async def list_project_branch_endpoints(self, project_id, branch_id) -> dict[str, Any]:
|
|
776
721
|
"""
|
|
777
722
|
Retrieves a list of endpoint configurations for a specific branch within a project.
|
|
778
723
|
|
|
@@ -800,7 +745,7 @@ class NeonApp(APIApplication):
|
|
|
800
745
|
response.raise_for_status()
|
|
801
746
|
return response.json()
|
|
802
747
|
|
|
803
|
-
def list_project_branch_databases(self, project_id, branch_id) -> dict[str, Any]:
|
|
748
|
+
async def list_project_branch_databases(self, project_id, branch_id) -> dict[str, Any]:
|
|
804
749
|
"""
|
|
805
750
|
Retrieves a list of databases for a specific branch within a project.
|
|
806
751
|
|
|
@@ -828,9 +773,7 @@ class NeonApp(APIApplication):
|
|
|
828
773
|
response.raise_for_status()
|
|
829
774
|
return response.json()
|
|
830
775
|
|
|
831
|
-
def create_project_branch_database(
|
|
832
|
-
self, project_id, branch_id, database
|
|
833
|
-
) -> dict[str, Any]:
|
|
776
|
+
async def create_project_branch_database(self, project_id, branch_id, database) -> dict[str, Any]:
|
|
834
777
|
"""
|
|
835
778
|
Creates a new database in the specified branch of a project and returns the resulting database object.
|
|
836
779
|
|
|
@@ -855,9 +798,7 @@ class NeonApp(APIApplication):
|
|
|
855
798
|
raise ValueError("Missing required parameter 'branch_id'")
|
|
856
799
|
if database is None:
|
|
857
800
|
raise ValueError("Missing required parameter 'database'")
|
|
858
|
-
request_body = {
|
|
859
|
-
"database": database,
|
|
860
|
-
}
|
|
801
|
+
request_body = {"database": database}
|
|
861
802
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
862
803
|
url = f"{self.base_url}/projects/{project_id}/branches/{branch_id}/databases"
|
|
863
804
|
query_params = {}
|
|
@@ -865,9 +806,7 @@ class NeonApp(APIApplication):
|
|
|
865
806
|
response.raise_for_status()
|
|
866
807
|
return response.json()
|
|
867
808
|
|
|
868
|
-
def get_project_branch_database(
|
|
869
|
-
self, project_id, branch_id, database_name
|
|
870
|
-
) -> dict[str, Any]:
|
|
809
|
+
async def get_project_branch_database(self, project_id, branch_id, database_name) -> dict[str, Any]:
|
|
871
810
|
"""
|
|
872
811
|
Retrieves details of a specific database from a given project branch.
|
|
873
812
|
|
|
@@ -898,9 +837,7 @@ class NeonApp(APIApplication):
|
|
|
898
837
|
response.raise_for_status()
|
|
899
838
|
return response.json()
|
|
900
839
|
|
|
901
|
-
def update_project_branch_database(
|
|
902
|
-
self, project_id, branch_id, database_name, database
|
|
903
|
-
) -> dict[str, Any]:
|
|
840
|
+
async def update_project_branch_database(self, project_id, branch_id, database_name, database) -> dict[str, Any]:
|
|
904
841
|
"""
|
|
905
842
|
Updates the specified database configuration for a given branch in a project.
|
|
906
843
|
|
|
@@ -928,9 +865,7 @@ class NeonApp(APIApplication):
|
|
|
928
865
|
raise ValueError("Missing required parameter 'database_name'")
|
|
929
866
|
if database is None:
|
|
930
867
|
raise ValueError("Missing required parameter 'database'")
|
|
931
|
-
request_body = {
|
|
932
|
-
"database": database,
|
|
933
|
-
}
|
|
868
|
+
request_body = {"database": database}
|
|
934
869
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
935
870
|
url = f"{self.base_url}/projects/{project_id}/branches/{branch_id}/databases/{database_name}"
|
|
936
871
|
query_params = {}
|
|
@@ -938,9 +873,7 @@ class NeonApp(APIApplication):
|
|
|
938
873
|
response.raise_for_status()
|
|
939
874
|
return response.json()
|
|
940
875
|
|
|
941
|
-
def delete_project_branch_database(
|
|
942
|
-
self, project_id, branch_id, database_name
|
|
943
|
-
) -> dict[str, Any]:
|
|
876
|
+
async def delete_project_branch_database(self, project_id, branch_id, database_name) -> dict[str, Any]:
|
|
944
877
|
"""
|
|
945
878
|
Deletes a specific database from a project's branch and returns the response details.
|
|
946
879
|
|
|
@@ -971,7 +904,7 @@ class NeonApp(APIApplication):
|
|
|
971
904
|
response.raise_for_status()
|
|
972
905
|
return response.json()
|
|
973
906
|
|
|
974
|
-
def list_project_branch_roles(self, project_id, branch_id) -> dict[str, Any]:
|
|
907
|
+
async def list_project_branch_roles(self, project_id, branch_id) -> dict[str, Any]:
|
|
975
908
|
"""
|
|
976
909
|
Retrieve the list of roles associated with a specific branch in a given project.
|
|
977
910
|
|
|
@@ -999,7 +932,7 @@ class NeonApp(APIApplication):
|
|
|
999
932
|
response.raise_for_status()
|
|
1000
933
|
return response.json()
|
|
1001
934
|
|
|
1002
|
-
def create_project_branch_role(self, project_id, branch_id, role) -> dict[str, Any]:
|
|
935
|
+
async def create_project_branch_role(self, project_id, branch_id, role) -> dict[str, Any]:
|
|
1003
936
|
"""
|
|
1004
937
|
Creates a new role for a specific branch within a project and returns the created role information.
|
|
1005
938
|
|
|
@@ -1024,9 +957,7 @@ class NeonApp(APIApplication):
|
|
|
1024
957
|
raise ValueError("Missing required parameter 'branch_id'")
|
|
1025
958
|
if role is None:
|
|
1026
959
|
raise ValueError("Missing required parameter 'role'")
|
|
1027
|
-
request_body = {
|
|
1028
|
-
"role": role,
|
|
1029
|
-
}
|
|
960
|
+
request_body = {"role": role}
|
|
1030
961
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1031
962
|
url = f"{self.base_url}/projects/{project_id}/branches/{branch_id}/roles"
|
|
1032
963
|
query_params = {}
|
|
@@ -1034,9 +965,7 @@ class NeonApp(APIApplication):
|
|
|
1034
965
|
response.raise_for_status()
|
|
1035
966
|
return response.json()
|
|
1036
967
|
|
|
1037
|
-
def get_project_branch_role(
|
|
1038
|
-
self, project_id, branch_id, role_name
|
|
1039
|
-
) -> dict[str, Any]:
|
|
968
|
+
async def get_project_branch_role(self, project_id, branch_id, role_name) -> dict[str, Any]:
|
|
1040
969
|
"""
|
|
1041
970
|
Retrieves a specific role from a project branch.
|
|
1042
971
|
|
|
@@ -1067,9 +996,7 @@ class NeonApp(APIApplication):
|
|
|
1067
996
|
response.raise_for_status()
|
|
1068
997
|
return response.json()
|
|
1069
998
|
|
|
1070
|
-
def delete_project_branch_role(
|
|
1071
|
-
self, project_id, branch_id, role_name
|
|
1072
|
-
) -> dict[str, Any]:
|
|
999
|
+
async def delete_project_branch_role(self, project_id, branch_id, role_name) -> dict[str, Any]:
|
|
1073
1000
|
"""
|
|
1074
1001
|
Deletes a specific role from a branch within a project.
|
|
1075
1002
|
|
|
@@ -1100,9 +1027,7 @@ class NeonApp(APIApplication):
|
|
|
1100
1027
|
response.raise_for_status()
|
|
1101
1028
|
return response.json()
|
|
1102
1029
|
|
|
1103
|
-
def get_project_branch_role_password(
|
|
1104
|
-
self, project_id, branch_id, role_name
|
|
1105
|
-
) -> dict[str, Any]:
|
|
1030
|
+
async def get_project_branch_role_password(self, project_id, branch_id, role_name) -> dict[str, Any]:
|
|
1106
1031
|
"""
|
|
1107
1032
|
Retrieves the revealed password for a specified role within a project branch.
|
|
1108
1033
|
|
|
@@ -1133,9 +1058,7 @@ class NeonApp(APIApplication):
|
|
|
1133
1058
|
response.raise_for_status()
|
|
1134
1059
|
return response.json()
|
|
1135
1060
|
|
|
1136
|
-
def reset_project_branch_role_password(
|
|
1137
|
-
self, project_id, branch_id, role_name
|
|
1138
|
-
) -> dict[str, Any]:
|
|
1061
|
+
async def reset_project_branch_role_password(self, project_id, branch_id, role_name) -> dict[str, Any]:
|
|
1139
1062
|
"""
|
|
1140
1063
|
Resets the password for a specific role in a project branch.
|
|
1141
1064
|
|
|
@@ -1166,7 +1089,7 @@ class NeonApp(APIApplication):
|
|
|
1166
1089
|
response.raise_for_status()
|
|
1167
1090
|
return response.json()
|
|
1168
1091
|
|
|
1169
|
-
def list_project_vpcendpoints(self, project_id) -> dict[str, Any]:
|
|
1092
|
+
async def list_project_vpcendpoints(self, project_id) -> dict[str, Any]:
|
|
1170
1093
|
"""
|
|
1171
1094
|
Retrieves a list of VPC endpoints associated with a specific project.
|
|
1172
1095
|
|
|
@@ -1191,7 +1114,7 @@ class NeonApp(APIApplication):
|
|
|
1191
1114
|
response.raise_for_status()
|
|
1192
1115
|
return response.json()
|
|
1193
1116
|
|
|
1194
|
-
def assign_project_vpcendpoint(self, project_id, vpc_endpoint_id, label) -> Any:
|
|
1117
|
+
async def assign_project_vpcendpoint(self, project_id, vpc_endpoint_id, label) -> Any:
|
|
1195
1118
|
"""
|
|
1196
1119
|
Assigns a VPC endpoint to a project with a specified label and returns the server response.
|
|
1197
1120
|
|
|
@@ -1216,9 +1139,7 @@ class NeonApp(APIApplication):
|
|
|
1216
1139
|
raise ValueError("Missing required parameter 'vpc_endpoint_id'")
|
|
1217
1140
|
if label is None:
|
|
1218
1141
|
raise ValueError("Missing required parameter 'label'")
|
|
1219
|
-
request_body = {
|
|
1220
|
-
"label": label,
|
|
1221
|
-
}
|
|
1142
|
+
request_body = {"label": label}
|
|
1222
1143
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1223
1144
|
url = f"{self.base_url}/projects/{project_id}/vpc-endpoints/{vpc_endpoint_id}"
|
|
1224
1145
|
query_params = {}
|
|
@@ -1226,7 +1147,7 @@ class NeonApp(APIApplication):
|
|
|
1226
1147
|
response.raise_for_status()
|
|
1227
1148
|
return response.json()
|
|
1228
1149
|
|
|
1229
|
-
def delete_project_vpcendpoint(self, project_id, vpc_endpoint_id) -> Any:
|
|
1150
|
+
async def delete_project_vpcendpoint(self, project_id, vpc_endpoint_id) -> Any:
|
|
1230
1151
|
"""
|
|
1231
1152
|
Deletes a VPC endpoint associated with a given project.
|
|
1232
1153
|
|
|
@@ -1254,7 +1175,7 @@ class NeonApp(APIApplication):
|
|
|
1254
1175
|
response.raise_for_status()
|
|
1255
1176
|
return response.json()
|
|
1256
1177
|
|
|
1257
|
-
def create_project_endpoint(self, project_id, endpoint) -> dict[str, Any]:
|
|
1178
|
+
async def create_project_endpoint(self, project_id, endpoint) -> dict[str, Any]:
|
|
1258
1179
|
"""
|
|
1259
1180
|
Creates a new endpoint for the specified project by sending a POST request to the project endpoint API.
|
|
1260
1181
|
|
|
@@ -1276,9 +1197,7 @@ class NeonApp(APIApplication):
|
|
|
1276
1197
|
raise ValueError("Missing required parameter 'project_id'")
|
|
1277
1198
|
if endpoint is None:
|
|
1278
1199
|
raise ValueError("Missing required parameter 'endpoint'")
|
|
1279
|
-
request_body = {
|
|
1280
|
-
"endpoint": endpoint,
|
|
1281
|
-
}
|
|
1200
|
+
request_body = {"endpoint": endpoint}
|
|
1282
1201
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1283
1202
|
url = f"{self.base_url}/projects/{project_id}/endpoints"
|
|
1284
1203
|
query_params = {}
|
|
@@ -1286,7 +1205,7 @@ class NeonApp(APIApplication):
|
|
|
1286
1205
|
response.raise_for_status()
|
|
1287
1206
|
return response.json()
|
|
1288
1207
|
|
|
1289
|
-
def list_project_endpoints(self, project_id) -> dict[str, Any]:
|
|
1208
|
+
async def list_project_endpoints(self, project_id) -> dict[str, Any]:
|
|
1290
1209
|
"""
|
|
1291
1210
|
Retrieves a list of API endpoints associated with a specified project.
|
|
1292
1211
|
|
|
@@ -1311,7 +1230,7 @@ class NeonApp(APIApplication):
|
|
|
1311
1230
|
response.raise_for_status()
|
|
1312
1231
|
return response.json()
|
|
1313
1232
|
|
|
1314
|
-
def get_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1233
|
+
async def get_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1315
1234
|
"""
|
|
1316
1235
|
Retrieves the details of a specific endpoint within a project.
|
|
1317
1236
|
|
|
@@ -1339,7 +1258,7 @@ class NeonApp(APIApplication):
|
|
|
1339
1258
|
response.raise_for_status()
|
|
1340
1259
|
return response.json()
|
|
1341
1260
|
|
|
1342
|
-
def delete_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1261
|
+
async def delete_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1343
1262
|
"""
|
|
1344
1263
|
Deletes a specific endpoint from a given project.
|
|
1345
1264
|
|
|
@@ -1367,9 +1286,7 @@ class NeonApp(APIApplication):
|
|
|
1367
1286
|
response.raise_for_status()
|
|
1368
1287
|
return response.json()
|
|
1369
1288
|
|
|
1370
|
-
def update_project_endpoint(
|
|
1371
|
-
self, project_id, endpoint_id, endpoint
|
|
1372
|
-
) -> dict[str, Any]:
|
|
1289
|
+
async def update_project_endpoint(self, project_id, endpoint_id, endpoint) -> dict[str, Any]:
|
|
1373
1290
|
"""
|
|
1374
1291
|
Updates the configuration of a specific endpoint within a project.
|
|
1375
1292
|
|
|
@@ -1394,9 +1311,7 @@ class NeonApp(APIApplication):
|
|
|
1394
1311
|
raise ValueError("Missing required parameter 'endpoint_id'")
|
|
1395
1312
|
if endpoint is None:
|
|
1396
1313
|
raise ValueError("Missing required parameter 'endpoint'")
|
|
1397
|
-
request_body = {
|
|
1398
|
-
"endpoint": endpoint,
|
|
1399
|
-
}
|
|
1314
|
+
request_body = {"endpoint": endpoint}
|
|
1400
1315
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1401
1316
|
url = f"{self.base_url}/projects/{project_id}/endpoints/{endpoint_id}"
|
|
1402
1317
|
query_params = {}
|
|
@@ -1404,7 +1319,7 @@ class NeonApp(APIApplication):
|
|
|
1404
1319
|
response.raise_for_status()
|
|
1405
1320
|
return response.json()
|
|
1406
1321
|
|
|
1407
|
-
def start_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1322
|
+
async def start_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1408
1323
|
"""
|
|
1409
1324
|
Starts the specified endpoint for a given project by making a POST request to the API.
|
|
1410
1325
|
|
|
@@ -1432,7 +1347,7 @@ class NeonApp(APIApplication):
|
|
|
1432
1347
|
response.raise_for_status()
|
|
1433
1348
|
return response.json()
|
|
1434
1349
|
|
|
1435
|
-
def suspend_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1350
|
+
async def suspend_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1436
1351
|
"""
|
|
1437
1352
|
Suspends a specific endpoint within a project by issuing a POST request to the suspend endpoint API.
|
|
1438
1353
|
|
|
@@ -1460,7 +1375,7 @@ class NeonApp(APIApplication):
|
|
|
1460
1375
|
response.raise_for_status()
|
|
1461
1376
|
return response.json()
|
|
1462
1377
|
|
|
1463
|
-
def restart_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1378
|
+
async def restart_project_endpoint(self, project_id, endpoint_id) -> dict[str, Any]:
|
|
1464
1379
|
"""
|
|
1465
1380
|
Restarts a specific project endpoint by sending a POST request to the server.
|
|
1466
1381
|
|
|
@@ -1488,7 +1403,7 @@ class NeonApp(APIApplication):
|
|
|
1488
1403
|
response.raise_for_status()
|
|
1489
1404
|
return response.json()
|
|
1490
1405
|
|
|
1491
|
-
def get_organization(self, org_id) -> dict[str, Any]:
|
|
1406
|
+
async def get_organization(self, org_id) -> dict[str, Any]:
|
|
1492
1407
|
"""
|
|
1493
1408
|
Retrieves the details of a specific organization using its unique organization ID.
|
|
1494
1409
|
|
|
@@ -1513,7 +1428,7 @@ class NeonApp(APIApplication):
|
|
|
1513
1428
|
response.raise_for_status()
|
|
1514
1429
|
return response.json()
|
|
1515
1430
|
|
|
1516
|
-
def revoke_org_api_key(self, org_id, key_id) -> dict[str, Any]:
|
|
1431
|
+
async def revoke_org_api_key(self, org_id, key_id) -> dict[str, Any]:
|
|
1517
1432
|
"""
|
|
1518
1433
|
Revokes an API key for a specific organization by sending a DELETE request.
|
|
1519
1434
|
|
|
@@ -1541,7 +1456,7 @@ class NeonApp(APIApplication):
|
|
|
1541
1456
|
response.raise_for_status()
|
|
1542
1457
|
return response.json()
|
|
1543
1458
|
|
|
1544
|
-
def get_organization_members(self, org_id) -> dict[str, Any]:
|
|
1459
|
+
async def get_organization_members(self, org_id) -> dict[str, Any]:
|
|
1545
1460
|
"""
|
|
1546
1461
|
Retrieves the list of members belonging to a specified organization by organization ID.
|
|
1547
1462
|
|
|
@@ -1566,7 +1481,7 @@ class NeonApp(APIApplication):
|
|
|
1566
1481
|
response.raise_for_status()
|
|
1567
1482
|
return response.json()
|
|
1568
1483
|
|
|
1569
|
-
def get_organization_member(self, org_id, member_id) -> dict[str, Any]:
|
|
1484
|
+
async def get_organization_member(self, org_id, member_id) -> dict[str, Any]:
|
|
1570
1485
|
"""
|
|
1571
1486
|
Retrieves information about a specific member within an organization by their identifiers.
|
|
1572
1487
|
|
|
@@ -1594,7 +1509,7 @@ class NeonApp(APIApplication):
|
|
|
1594
1509
|
response.raise_for_status()
|
|
1595
1510
|
return response.json()
|
|
1596
1511
|
|
|
1597
|
-
def update_organization_member(self, org_id, member_id, role) -> dict[str, Any]:
|
|
1512
|
+
async def update_organization_member(self, org_id, member_id, role) -> dict[str, Any]:
|
|
1598
1513
|
"""
|
|
1599
1514
|
Updates the role of a specific member within an organization.
|
|
1600
1515
|
|
|
@@ -1619,9 +1534,7 @@ class NeonApp(APIApplication):
|
|
|
1619
1534
|
raise ValueError("Missing required parameter 'member_id'")
|
|
1620
1535
|
if role is None:
|
|
1621
1536
|
raise ValueError("Missing required parameter 'role'")
|
|
1622
|
-
request_body = {
|
|
1623
|
-
"role": role,
|
|
1624
|
-
}
|
|
1537
|
+
request_body = {"role": role}
|
|
1625
1538
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1626
1539
|
url = f"{self.base_url}/organizations/{org_id}/members/{member_id}"
|
|
1627
1540
|
query_params = {}
|
|
@@ -1629,7 +1542,7 @@ class NeonApp(APIApplication):
|
|
|
1629
1542
|
response.raise_for_status()
|
|
1630
1543
|
return response.json()
|
|
1631
1544
|
|
|
1632
|
-
def remove_organization_member(self, org_id, member_id) -> dict[str, Any]:
|
|
1545
|
+
async def remove_organization_member(self, org_id, member_id) -> dict[str, Any]:
|
|
1633
1546
|
"""
|
|
1634
1547
|
Removes a specified member from an organization.
|
|
1635
1548
|
|
|
@@ -1657,7 +1570,7 @@ class NeonApp(APIApplication):
|
|
|
1657
1570
|
response.raise_for_status()
|
|
1658
1571
|
return response.json()
|
|
1659
1572
|
|
|
1660
|
-
def get_organization_invitations(self, org_id) -> dict[str, Any]:
|
|
1573
|
+
async def get_organization_invitations(self, org_id) -> dict[str, Any]:
|
|
1661
1574
|
"""
|
|
1662
1575
|
Retrieves the list of invitations for a specified organization.
|
|
1663
1576
|
|
|
@@ -1682,7 +1595,7 @@ class NeonApp(APIApplication):
|
|
|
1682
1595
|
response.raise_for_status()
|
|
1683
1596
|
return response.json()
|
|
1684
1597
|
|
|
1685
|
-
def create_organization_invitations(self, org_id, invitations) -> dict[str, Any]:
|
|
1598
|
+
async def create_organization_invitations(self, org_id, invitations) -> dict[str, Any]:
|
|
1686
1599
|
"""
|
|
1687
1600
|
Creates new invitations for users to join an organization by sending a POST request to the organization's invitations endpoint.
|
|
1688
1601
|
|
|
@@ -1704,9 +1617,7 @@ class NeonApp(APIApplication):
|
|
|
1704
1617
|
raise ValueError("Missing required parameter 'org_id'")
|
|
1705
1618
|
if invitations is None:
|
|
1706
1619
|
raise ValueError("Missing required parameter 'invitations'")
|
|
1707
|
-
request_body = {
|
|
1708
|
-
"invitations": invitations,
|
|
1709
|
-
}
|
|
1620
|
+
request_body = {"invitations": invitations}
|
|
1710
1621
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1711
1622
|
url = f"{self.base_url}/organizations/{org_id}/invitations"
|
|
1712
1623
|
query_params = {}
|
|
@@ -1714,7 +1625,7 @@ class NeonApp(APIApplication):
|
|
|
1714
1625
|
response.raise_for_status()
|
|
1715
1626
|
return response.json()
|
|
1716
1627
|
|
|
1717
|
-
def list_organization_vpcendpoints(self, org_id, region_id) -> dict[str, Any]:
|
|
1628
|
+
async def list_organization_vpcendpoints(self, org_id, region_id) -> dict[str, Any]:
|
|
1718
1629
|
"""
|
|
1719
1630
|
Retrieves a list of VPC endpoints for a specified organization and region.
|
|
1720
1631
|
|
|
@@ -1742,9 +1653,7 @@ class NeonApp(APIApplication):
|
|
|
1742
1653
|
response.raise_for_status()
|
|
1743
1654
|
return response.json()
|
|
1744
1655
|
|
|
1745
|
-
def get_organization_vpcendpoint_details(
|
|
1746
|
-
self, org_id, region_id, vpc_endpoint_id
|
|
1747
|
-
) -> dict[str, Any]:
|
|
1656
|
+
async def get_organization_vpcendpoint_details(self, org_id, region_id, vpc_endpoint_id) -> dict[str, Any]:
|
|
1748
1657
|
"""
|
|
1749
1658
|
Retrieves details about a specific VPC endpoint for an organization in a given region.
|
|
1750
1659
|
|
|
@@ -1775,9 +1684,7 @@ class NeonApp(APIApplication):
|
|
|
1775
1684
|
response.raise_for_status()
|
|
1776
1685
|
return response.json()
|
|
1777
1686
|
|
|
1778
|
-
def assign_organization_vpcendpoint(
|
|
1779
|
-
self, org_id, region_id, vpc_endpoint_id, label
|
|
1780
|
-
) -> Any:
|
|
1687
|
+
async def assign_organization_vpcendpoint(self, org_id, region_id, vpc_endpoint_id, label) -> Any:
|
|
1781
1688
|
"""
|
|
1782
1689
|
Assigns a label to a specified organization VPC endpoint in a given region.
|
|
1783
1690
|
|
|
@@ -1805,9 +1712,7 @@ class NeonApp(APIApplication):
|
|
|
1805
1712
|
raise ValueError("Missing required parameter 'vpc_endpoint_id'")
|
|
1806
1713
|
if label is None:
|
|
1807
1714
|
raise ValueError("Missing required parameter 'label'")
|
|
1808
|
-
request_body = {
|
|
1809
|
-
"label": label,
|
|
1810
|
-
}
|
|
1715
|
+
request_body = {"label": label}
|
|
1811
1716
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1812
1717
|
url = f"{self.base_url}/organizations/{org_id}/vpc/region/{region_id}/vpc-endpoints/{vpc_endpoint_id}"
|
|
1813
1718
|
query_params = {}
|
|
@@ -1815,9 +1720,7 @@ class NeonApp(APIApplication):
|
|
|
1815
1720
|
response.raise_for_status()
|
|
1816
1721
|
return response.json()
|
|
1817
1722
|
|
|
1818
|
-
def delete_organization_vpcendpoint(
|
|
1819
|
-
self, org_id, region_id, vpc_endpoint_id
|
|
1820
|
-
) -> Any:
|
|
1723
|
+
async def delete_organization_vpcendpoint(self, org_id, region_id, vpc_endpoint_id) -> Any:
|
|
1821
1724
|
"""
|
|
1822
1725
|
Deletes a specific VPC endpoint associated with an organization and region.
|
|
1823
1726
|
|
|
@@ -1848,9 +1751,7 @@ class NeonApp(APIApplication):
|
|
|
1848
1751
|
response.raise_for_status()
|
|
1849
1752
|
return response.json()
|
|
1850
1753
|
|
|
1851
|
-
def get_active_regions(
|
|
1852
|
-
self,
|
|
1853
|
-
) -> dict[str, Any]:
|
|
1754
|
+
async def get_active_regions(self) -> dict[str, Any]:
|
|
1854
1755
|
"""
|
|
1855
1756
|
Retrieves a list of active regions available in the system.
|
|
1856
1757
|
|
|
@@ -1869,9 +1770,7 @@ class NeonApp(APIApplication):
|
|
|
1869
1770
|
response.raise_for_status()
|
|
1870
1771
|
return response.json()
|
|
1871
1772
|
|
|
1872
|
-
def get_current_user_info(
|
|
1873
|
-
self,
|
|
1874
|
-
) -> dict[str, Any]:
|
|
1773
|
+
async def get_current_user_info(self) -> dict[str, Any]:
|
|
1875
1774
|
"""
|
|
1876
1775
|
Retrieves information about the currently authenticated user from the API.
|
|
1877
1776
|
|
|
@@ -1893,9 +1792,7 @@ class NeonApp(APIApplication):
|
|
|
1893
1792
|
response.raise_for_status()
|
|
1894
1793
|
return response.json()
|
|
1895
1794
|
|
|
1896
|
-
def get_current_user_organizations(
|
|
1897
|
-
self,
|
|
1898
|
-
) -> dict[str, Any]:
|
|
1795
|
+
async def get_current_user_organizations(self) -> dict[str, Any]:
|
|
1899
1796
|
"""
|
|
1900
1797
|
Retrieves a list of organizations associated with the current authenticated user.
|
|
1901
1798
|
|
|
@@ -1917,7 +1814,7 @@ class NeonApp(APIApplication):
|
|
|
1917
1814
|
response.raise_for_status()
|
|
1918
1815
|
return response.json()
|
|
1919
1816
|
|
|
1920
|
-
def transfer_projects_from_user_to_org(self, org_id, project_ids) -> dict[str, Any]:
|
|
1817
|
+
async def transfer_projects_from_user_to_org(self, org_id, project_ids) -> dict[str, Any]:
|
|
1921
1818
|
"""
|
|
1922
1819
|
Transfers ownership of specified projects from the authenticated user to a target organization.
|
|
1923
1820
|
|
|
@@ -1939,10 +1836,7 @@ class NeonApp(APIApplication):
|
|
|
1939
1836
|
raise ValueError("Missing required parameter 'org_id'")
|
|
1940
1837
|
if project_ids is None:
|
|
1941
1838
|
raise ValueError("Missing required parameter 'project_ids'")
|
|
1942
|
-
request_body = {
|
|
1943
|
-
"org_id": org_id,
|
|
1944
|
-
"project_ids": project_ids,
|
|
1945
|
-
}
|
|
1839
|
+
request_body = {"org_id": org_id, "project_ids": project_ids}
|
|
1946
1840
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
1947
1841
|
url = f"{self.base_url}/users/me/projects/transfer"
|
|
1948
1842
|
query_params = {}
|