universal-mcp 0.1.9rc1__py3-none-any.whl → 0.1.10__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/application.py +19 -30
- universal_mcp/applications/cal_com_v2/app.py +1676 -1021
- universal_mcp/applications/clickup/app.py +1496 -846
- universal_mcp/applications/falai/README.md +42 -0
- universal_mcp/applications/falai/__init__.py +0 -0
- universal_mcp/applications/falai/app.py +332 -0
- universal_mcp/applications/gong/README.md +88 -0
- universal_mcp/applications/gong/__init__.py +0 -0
- universal_mcp/applications/gong/app.py +2297 -0
- universal_mcp/applications/hashnode/app.py +12 -8
- universal_mcp/applications/hashnode/prompt.md +2 -0
- universal_mcp/applications/heygen/README.md +69 -0
- universal_mcp/applications/heygen/__init__.py +0 -0
- universal_mcp/applications/heygen/app.py +956 -0
- universal_mcp/applications/mailchimp/app.py +3848 -1794
- universal_mcp/applications/replicate/README.md +47 -35
- universal_mcp/applications/replicate/__init__.py +0 -0
- universal_mcp/applications/replicate/app.py +215 -204
- universal_mcp/applications/retell_ai/app.py +84 -67
- universal_mcp/applications/rocketlane/app.py +49 -35
- universal_mcp/applications/spotify/app.py +723 -428
- universal_mcp/applications/supabase/app.py +909 -583
- universal_mcp/servers/server.py +50 -0
- universal_mcp/stores/store.py +2 -3
- universal_mcp/utils/docstring_parser.py +67 -36
- {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.10.dist-info}/METADATA +5 -1
- {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.10.dist-info}/RECORD +29 -19
- {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.10.dist-info}/WHEEL +0 -0
- {universal_mcp-0.1.9rc1.dist-info → universal_mcp-0.1.10.dist-info}/entry_points.txt +0 -0
@@ -6,23 +6,23 @@ from universal_mcp.integrations import Integration
|
|
6
6
|
|
7
7
|
class SupabaseApp(APIApplication):
|
8
8
|
def __init__(self, integration: Integration = None, **kwargs) -> None:
|
9
|
-
super().__init__(name=
|
9
|
+
super().__init__(name="supabase", integration=integration, **kwargs)
|
10
10
|
self.base_url = "https://api.supabase.com"
|
11
11
|
|
12
12
|
def v1_get_a_branch_config(self, branch_id) -> dict[str, Any]:
|
13
13
|
"""
|
14
14
|
Retrieves the configuration details for a specific branch by branch ID.
|
15
|
-
|
15
|
+
|
16
16
|
Args:
|
17
17
|
branch_id: str. The unique identifier of the branch whose configuration is to be retrieved.
|
18
|
-
|
18
|
+
|
19
19
|
Returns:
|
20
20
|
dict. A dictionary containing the configuration data for the specified branch.
|
21
|
-
|
21
|
+
|
22
22
|
Raises:
|
23
23
|
ValueError: If 'branch_id' is None.
|
24
24
|
requests.HTTPError: If the HTTP request to fetch the branch configuration fails.
|
25
|
-
|
25
|
+
|
26
26
|
Tags:
|
27
27
|
get, branch, config, api
|
28
28
|
"""
|
@@ -34,10 +34,18 @@ class SupabaseApp(APIApplication):
|
|
34
34
|
response.raise_for_status()
|
35
35
|
return response.json()
|
36
36
|
|
37
|
-
def v1_update_a_branch_config(
|
37
|
+
def v1_update_a_branch_config(
|
38
|
+
self,
|
39
|
+
branch_id,
|
40
|
+
branch_name=None,
|
41
|
+
git_branch=None,
|
42
|
+
reset_on_push=None,
|
43
|
+
persistent=None,
|
44
|
+
status=None,
|
45
|
+
) -> dict[str, Any]:
|
38
46
|
"""
|
39
47
|
Updates the configuration of a specified branch by sending a PATCH request with provided configuration fields.
|
40
|
-
|
48
|
+
|
41
49
|
Args:
|
42
50
|
branch_id: str. Unique identifier of the branch to be updated. Required.
|
43
51
|
branch_name: str or None. New name for the branch. Optional.
|
@@ -45,25 +53,25 @@ class SupabaseApp(APIApplication):
|
|
45
53
|
reset_on_push: bool or None. If True, resets the branch on Git push. Optional.
|
46
54
|
persistent: bool or None. Whether the branch configuration should persist across operations. Optional.
|
47
55
|
status: str or None. Status to set for the branch (e.g., 'active', 'inactive'). Optional.
|
48
|
-
|
56
|
+
|
49
57
|
Returns:
|
50
58
|
dict. JSON response containing the updated branch configuration details from the API.
|
51
|
-
|
59
|
+
|
52
60
|
Raises:
|
53
61
|
ValueError: Raised if 'branch_id' is None.
|
54
62
|
requests.HTTPError: Raised if the HTTP request fails or returns a non-2xx status code.
|
55
|
-
|
63
|
+
|
56
64
|
Tags:
|
57
65
|
update, branch-management, api, patch, config
|
58
66
|
"""
|
59
67
|
if branch_id is None:
|
60
68
|
raise ValueError("Missing required parameter 'branch_id'")
|
61
69
|
request_body = {
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
70
|
+
"branch_name": branch_name,
|
71
|
+
"git_branch": git_branch,
|
72
|
+
"reset_on_push": reset_on_push,
|
73
|
+
"persistent": persistent,
|
74
|
+
"status": status,
|
67
75
|
}
|
68
76
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
69
77
|
url = f"{self.base_url}/v1/branches/{branch_id}"
|
@@ -75,17 +83,17 @@ class SupabaseApp(APIApplication):
|
|
75
83
|
def v1_delete_a_branch(self, branch_id) -> dict[str, Any]:
|
76
84
|
"""
|
77
85
|
Deletes a branch with the specified branch ID using a DELETE request to the API.
|
78
|
-
|
86
|
+
|
79
87
|
Args:
|
80
88
|
branch_id: The unique identifier of the branch to be deleted.
|
81
|
-
|
89
|
+
|
82
90
|
Returns:
|
83
91
|
A dictionary containing the JSON response from the API after the branch is deleted.
|
84
|
-
|
92
|
+
|
85
93
|
Raises:
|
86
94
|
ValueError: If the required parameter 'branch_id' is None.
|
87
95
|
HTTPError: If the DELETE request to the API fails with a non-success status code.
|
88
|
-
|
96
|
+
|
89
97
|
Tags:
|
90
98
|
delete, branch-management, api
|
91
99
|
"""
|
@@ -100,17 +108,17 @@ class SupabaseApp(APIApplication):
|
|
100
108
|
def v1_reset_a_branch(self, branch_id) -> dict[str, Any]:
|
101
109
|
"""
|
102
110
|
Resets the specified branch by making a POST request to the branch reset endpoint.
|
103
|
-
|
111
|
+
|
104
112
|
Args:
|
105
113
|
branch_id: The unique identifier of the branch to reset.
|
106
|
-
|
114
|
+
|
107
115
|
Returns:
|
108
116
|
A dictionary containing the API response data from the branch reset operation.
|
109
|
-
|
117
|
+
|
110
118
|
Raises:
|
111
119
|
ValueError: If 'branch_id' is None.
|
112
120
|
requests.HTTPError: If the HTTP request to reset the branch fails with a client or server error.
|
113
|
-
|
121
|
+
|
114
122
|
Tags:
|
115
123
|
reset, branch, api, post, management
|
116
124
|
"""
|
@@ -122,19 +130,21 @@ class SupabaseApp(APIApplication):
|
|
122
130
|
response.raise_for_status()
|
123
131
|
return response.json()
|
124
132
|
|
125
|
-
def v1_list_all_projects(
|
133
|
+
def v1_list_all_projects(
|
134
|
+
self,
|
135
|
+
) -> list[Any]:
|
126
136
|
"""
|
127
137
|
Retrieves a list of all projects from the v1 API endpoint.
|
128
|
-
|
138
|
+
|
129
139
|
Args:
|
130
140
|
None: This function takes no arguments
|
131
|
-
|
141
|
+
|
132
142
|
Returns:
|
133
143
|
list: A list of project objects returned by the API.
|
134
|
-
|
144
|
+
|
135
145
|
Raises:
|
136
146
|
requests.exceptions.HTTPError: Raised if the HTTP request to the API endpoint returns an unsuccessful status code.
|
137
|
-
|
147
|
+
|
138
148
|
Tags:
|
139
149
|
list, projects, api
|
140
150
|
"""
|
@@ -144,10 +154,22 @@ class SupabaseApp(APIApplication):
|
|
144
154
|
response.raise_for_status()
|
145
155
|
return response.json()
|
146
156
|
|
147
|
-
def v1_create_a_project(
|
157
|
+
def v1_create_a_project(
|
158
|
+
self,
|
159
|
+
db_pass,
|
160
|
+
name,
|
161
|
+
organization_id,
|
162
|
+
region,
|
163
|
+
plan=None,
|
164
|
+
kps_enabled=None,
|
165
|
+
desired_instance_size=None,
|
166
|
+
template_url=None,
|
167
|
+
release_channel=None,
|
168
|
+
postgres_engine=None,
|
169
|
+
) -> dict[str, Any]:
|
148
170
|
"""
|
149
171
|
Creates a new project with the specified configuration and returns the project details.
|
150
|
-
|
172
|
+
|
151
173
|
Args:
|
152
174
|
db_pass: str. The password for the project's database. Required.
|
153
175
|
name: str. The name of the project to be created. Required.
|
@@ -159,14 +181,14 @@ class SupabaseApp(APIApplication):
|
|
159
181
|
template_url: Optional[str]. URL to a project template to use for initialization.
|
160
182
|
release_channel: Optional[str]. The release channel to use for database engine updates.
|
161
183
|
postgres_engine: Optional[str]. The PostgreSQL engine version to use for the project.
|
162
|
-
|
184
|
+
|
163
185
|
Returns:
|
164
186
|
dict[str, Any]: A dictionary containing the details of the newly created project as returned by the API.
|
165
|
-
|
187
|
+
|
166
188
|
Raises:
|
167
189
|
ValueError: If any of the required parameters ('db_pass', 'name', 'organization_id', or 'region') is missing.
|
168
190
|
requests.HTTPError: If the HTTP request to create the project fails or returns an unsuccessful status.
|
169
|
-
|
191
|
+
|
170
192
|
Tags:
|
171
193
|
create, project, api, management
|
172
194
|
"""
|
@@ -179,16 +201,16 @@ class SupabaseApp(APIApplication):
|
|
179
201
|
if region is None:
|
180
202
|
raise ValueError("Missing required parameter 'region'")
|
181
203
|
request_body = {
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
204
|
+
"db_pass": db_pass,
|
205
|
+
"name": name,
|
206
|
+
"organization_id": organization_id,
|
207
|
+
"plan": plan,
|
208
|
+
"region": region,
|
209
|
+
"kps_enabled": kps_enabled,
|
210
|
+
"desired_instance_size": desired_instance_size,
|
211
|
+
"template_url": template_url,
|
212
|
+
"release_channel": release_channel,
|
213
|
+
"postgres_engine": postgres_engine,
|
192
214
|
}
|
193
215
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
194
216
|
url = f"{self.base_url}/v1/projects"
|
@@ -197,19 +219,21 @@ class SupabaseApp(APIApplication):
|
|
197
219
|
response.raise_for_status()
|
198
220
|
return response.json()
|
199
221
|
|
200
|
-
def v1_list_all_organizations(
|
222
|
+
def v1_list_all_organizations(
|
223
|
+
self,
|
224
|
+
) -> list[Any]:
|
201
225
|
"""
|
202
226
|
Retrieves a list of all organizations from the API endpoint.
|
203
|
-
|
227
|
+
|
204
228
|
Args:
|
205
229
|
None: This function takes no arguments
|
206
|
-
|
230
|
+
|
207
231
|
Returns:
|
208
232
|
A list containing organization data as returned by the API. Each element represents an organization's details.
|
209
|
-
|
233
|
+
|
210
234
|
Raises:
|
211
235
|
requests.exceptions.HTTPError: If the HTTP request to the organizations API endpoint fails or returns a non-success status code.
|
212
|
-
|
236
|
+
|
213
237
|
Tags:
|
214
238
|
list, organizations, api, fetch, important
|
215
239
|
"""
|
@@ -222,24 +246,24 @@ class SupabaseApp(APIApplication):
|
|
222
246
|
def v1_create_an_organization(self, name) -> dict[str, Any]:
|
223
247
|
"""
|
224
248
|
Creates a new organization using the provided name and returns the organization details.
|
225
|
-
|
249
|
+
|
226
250
|
Args:
|
227
251
|
name: str. The name of the organization to be created. Must not be None.
|
228
|
-
|
252
|
+
|
229
253
|
Returns:
|
230
254
|
dict[str, Any]: A dictionary containing the created organization's details as returned by the API.
|
231
|
-
|
255
|
+
|
232
256
|
Raises:
|
233
257
|
ValueError: Raised if the 'name' parameter is None.
|
234
258
|
requests.HTTPError: Raised if the HTTP request to create the organization fails.
|
235
|
-
|
259
|
+
|
236
260
|
Tags:
|
237
261
|
create, organization, api, async-job, management, important
|
238
262
|
"""
|
239
263
|
if name is None:
|
240
264
|
raise ValueError("Missing required parameter 'name'")
|
241
265
|
request_body = {
|
242
|
-
|
266
|
+
"name": name,
|
243
267
|
}
|
244
268
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
245
269
|
url = f"{self.base_url}/v1/organizations"
|
@@ -248,10 +272,20 @@ class SupabaseApp(APIApplication):
|
|
248
272
|
response.raise_for_status()
|
249
273
|
return response.json()
|
250
274
|
|
251
|
-
def v1_authorize_user(
|
275
|
+
def v1_authorize_user(
|
276
|
+
self,
|
277
|
+
client_id,
|
278
|
+
response_type,
|
279
|
+
redirect_uri,
|
280
|
+
scope=None,
|
281
|
+
state=None,
|
282
|
+
response_mode=None,
|
283
|
+
code_challenge=None,
|
284
|
+
code_challenge_method=None,
|
285
|
+
) -> Any:
|
252
286
|
"""
|
253
287
|
Initiates the OAuth 2.0 authorization flow by constructing and sending an authorization request to the identity provider.
|
254
|
-
|
288
|
+
|
255
289
|
Args:
|
256
290
|
client_id: str. The client identifier issued to the application.
|
257
291
|
response_type: str. The type of response desired, typically 'code' for authorization code flow.
|
@@ -261,14 +295,14 @@ class SupabaseApp(APIApplication):
|
|
261
295
|
response_mode: Optional[str]. Specifies how the result should be returned to the client (e.g., 'query', 'fragment').
|
262
296
|
code_challenge: Optional[str]. Code challenge for PKCE (Proof Key for Code Exchange) to enhance security.
|
263
297
|
code_challenge_method: Optional[str]. Method used to derive code challenge (e.g., 'S256').
|
264
|
-
|
298
|
+
|
265
299
|
Returns:
|
266
300
|
dict. JSON-decoded response from the authorization endpoint, containing the authorization response or error details.
|
267
|
-
|
301
|
+
|
268
302
|
Raises:
|
269
303
|
ValueError: Raised if any of the required parameters ('client_id', 'response_type', or 'redirect_uri') is not provided.
|
270
304
|
requests.HTTPError: Raised if the HTTP request to the authorization endpoint fails (non-2xx response).
|
271
|
-
|
305
|
+
|
272
306
|
Tags:
|
273
307
|
authorize, oauth, identity, auth-flow, start
|
274
308
|
"""
|
@@ -279,7 +313,20 @@ class SupabaseApp(APIApplication):
|
|
279
313
|
if redirect_uri is None:
|
280
314
|
raise ValueError("Missing required parameter 'redirect_uri'")
|
281
315
|
url = f"{self.base_url}/v1/oauth/authorize"
|
282
|
-
query_params = {
|
316
|
+
query_params = {
|
317
|
+
k: v
|
318
|
+
for k, v in [
|
319
|
+
("client_id", client_id),
|
320
|
+
("response_type", response_type),
|
321
|
+
("redirect_uri", redirect_uri),
|
322
|
+
("scope", scope),
|
323
|
+
("state", state),
|
324
|
+
("response_mode", response_mode),
|
325
|
+
("code_challenge", code_challenge),
|
326
|
+
("code_challenge_method", code_challenge_method),
|
327
|
+
]
|
328
|
+
if v is not None
|
329
|
+
}
|
283
330
|
response = self._get(url, params=query_params)
|
284
331
|
response.raise_for_status()
|
285
332
|
return response.json()
|
@@ -287,21 +334,23 @@ class SupabaseApp(APIApplication):
|
|
287
334
|
def v1_list_all_snippets(self, project_ref=None) -> dict[str, Any]:
|
288
335
|
"""
|
289
336
|
Retrieves all code snippets for the specified project, or for all projects if no project reference is provided.
|
290
|
-
|
337
|
+
|
291
338
|
Args:
|
292
339
|
project_ref: Optional; a reference identifier for the project to filter snippets by. If not provided, returns snippets from all projects.
|
293
|
-
|
340
|
+
|
294
341
|
Returns:
|
295
342
|
A dictionary containing the response payload with details of the code snippets.
|
296
|
-
|
343
|
+
|
297
344
|
Raises:
|
298
345
|
requests.HTTPError: Raised if the underlying HTTP request returns an unsuccessful status code.
|
299
|
-
|
346
|
+
|
300
347
|
Tags:
|
301
348
|
list, snippets, management, api, important
|
302
349
|
"""
|
303
350
|
url = f"{self.base_url}/v1/snippets"
|
304
|
-
query_params = {
|
351
|
+
query_params = {
|
352
|
+
k: v for k, v in [("project_ref", project_ref)] if v is not None
|
353
|
+
}
|
305
354
|
response = self._get(url, params=query_params)
|
306
355
|
response.raise_for_status()
|
307
356
|
return response.json()
|
@@ -309,17 +358,17 @@ class SupabaseApp(APIApplication):
|
|
309
358
|
def v1_get_a_snippet(self, id) -> dict[str, Any]:
|
310
359
|
"""
|
311
360
|
Retrieves a snippet resource by its unique identifier using a GET request to the v1 endpoint.
|
312
|
-
|
361
|
+
|
313
362
|
Args:
|
314
363
|
id: The unique identifier of the snippet to retrieve. Must not be None.
|
315
|
-
|
364
|
+
|
316
365
|
Returns:
|
317
366
|
A dictionary containing the snippet data retrieved from the API.
|
318
|
-
|
367
|
+
|
319
368
|
Raises:
|
320
369
|
ValueError: If the 'id' parameter is None.
|
321
370
|
HTTPError: If the HTTP request returns an unsuccessful status code.
|
322
|
-
|
371
|
+
|
323
372
|
Tags:
|
324
373
|
get, snippet, api
|
325
374
|
"""
|
@@ -334,17 +383,17 @@ class SupabaseApp(APIApplication):
|
|
334
383
|
def v1_get_project_api_keys(self, ref) -> list[Any]:
|
335
384
|
"""
|
336
385
|
Retrieves the list of API keys associated with a specified project reference.
|
337
|
-
|
386
|
+
|
338
387
|
Args:
|
339
388
|
ref: The unique identifier of the project whose API keys are to be fetched. Must not be None.
|
340
|
-
|
389
|
+
|
341
390
|
Returns:
|
342
391
|
A list containing the API keys for the specified project.
|
343
|
-
|
392
|
+
|
344
393
|
Raises:
|
345
394
|
ValueError: Raised if the 'ref' parameter is None.
|
346
395
|
HTTPError: Raised if the HTTP request to fetch API keys fails.
|
347
|
-
|
396
|
+
|
348
397
|
Tags:
|
349
398
|
get, api-keys, project, management
|
350
399
|
"""
|
@@ -356,23 +405,25 @@ class SupabaseApp(APIApplication):
|
|
356
405
|
response.raise_for_status()
|
357
406
|
return response.json()
|
358
407
|
|
359
|
-
def create_api_key(
|
408
|
+
def create_api_key(
|
409
|
+
self, ref, type, description=None, secret_jwt_template=None
|
410
|
+
) -> dict[str, Any]:
|
360
411
|
"""
|
361
412
|
Creates a new API key for the specified project with optional description and secret JWT template.
|
362
|
-
|
413
|
+
|
363
414
|
Args:
|
364
415
|
ref: str. Project reference or identifier for which the API key is created.
|
365
416
|
type: str. Type or category of the API key being created.
|
366
417
|
description: str, optional. Human-readable description of the API key.
|
367
418
|
secret_jwt_template: Any, optional. Template used to generate the secret JWT for the API key.
|
368
|
-
|
419
|
+
|
369
420
|
Returns:
|
370
421
|
dict[str, Any]: A dictionary containing the details of the newly created API key as returned by the API.
|
371
|
-
|
422
|
+
|
372
423
|
Raises:
|
373
424
|
ValueError: If 'ref' or 'type' is None.
|
374
425
|
requests.HTTPError: If the API request fails or the server returns an unsuccessful status.
|
375
|
-
|
426
|
+
|
376
427
|
Tags:
|
377
428
|
create, api-key, management, async-job, start
|
378
429
|
"""
|
@@ -381,9 +432,9 @@ class SupabaseApp(APIApplication):
|
|
381
432
|
if type is None:
|
382
433
|
raise ValueError("Missing required parameter 'type'")
|
383
434
|
request_body = {
|
384
|
-
|
385
|
-
|
386
|
-
|
435
|
+
"type": type,
|
436
|
+
"description": description,
|
437
|
+
"secret_jwt_template": secret_jwt_template,
|
387
438
|
}
|
388
439
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
389
440
|
url = f"{self.base_url}/v1/projects/{ref}/api-keys"
|
@@ -392,23 +443,25 @@ class SupabaseApp(APIApplication):
|
|
392
443
|
response.raise_for_status()
|
393
444
|
return response.json()
|
394
445
|
|
395
|
-
def update_api_key(
|
446
|
+
def update_api_key(
|
447
|
+
self, ref, id, description=None, secret_jwt_template=None
|
448
|
+
) -> dict[str, Any]:
|
396
449
|
"""
|
397
450
|
Updates an existing API key identified by its project reference and key ID, allowing optional update of description and secret JWT template.
|
398
|
-
|
451
|
+
|
399
452
|
Args:
|
400
453
|
ref: str. Unique project reference identifier for the API key.
|
401
454
|
id: str. Unique identifier of the API key to update.
|
402
455
|
description: Optional[str]. New description for the API key. If not provided, the description is not updated.
|
403
456
|
secret_jwt_template: Optional[Any]. New secret JWT template to associate with the API key. If not provided, this field remains unchanged.
|
404
|
-
|
457
|
+
|
405
458
|
Returns:
|
406
459
|
dict[str, Any]: The updated API key resource as a dictionary parsed from the response JSON.
|
407
|
-
|
460
|
+
|
408
461
|
Raises:
|
409
462
|
ValueError: Raised if either 'ref' or 'id' is None.
|
410
463
|
requests.HTTPError: Raised if the HTTP request to update the API key fails or returns an error status code.
|
411
|
-
|
464
|
+
|
412
465
|
Tags:
|
413
466
|
update, api-key, management, patch
|
414
467
|
"""
|
@@ -417,8 +470,8 @@ class SupabaseApp(APIApplication):
|
|
417
470
|
if id is None:
|
418
471
|
raise ValueError("Missing required parameter 'id'")
|
419
472
|
request_body = {
|
420
|
-
|
421
|
-
|
473
|
+
"description": description,
|
474
|
+
"secret_jwt_template": secret_jwt_template,
|
422
475
|
}
|
423
476
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
424
477
|
url = f"{self.base_url}/v1/projects/{ref}/api-keys/{id}"
|
@@ -430,18 +483,18 @@ class SupabaseApp(APIApplication):
|
|
430
483
|
def delete_api_key(self, ref, id) -> dict[str, Any]:
|
431
484
|
"""
|
432
485
|
Deletes an API key associated with a project using the provided reference and key ID.
|
433
|
-
|
486
|
+
|
434
487
|
Args:
|
435
488
|
ref: str. The unique project reference identifier.
|
436
489
|
id: str. The API key identifier to delete.
|
437
|
-
|
490
|
+
|
438
491
|
Returns:
|
439
492
|
dict[str, Any]: The response from the API as a dictionary, typically containing status or metadata about the deleted API key.
|
440
|
-
|
493
|
+
|
441
494
|
Raises:
|
442
495
|
ValueError: Raised if 'ref' or 'id' is None.
|
443
496
|
requests.HTTPError: Raised if the HTTP response from the deletion request contains an unsuccessful status code.
|
444
|
-
|
497
|
+
|
445
498
|
Tags:
|
446
499
|
delete, api-key, management
|
447
500
|
"""
|
@@ -458,17 +511,17 @@ class SupabaseApp(APIApplication):
|
|
458
511
|
def v1_list_all_branches(self, ref) -> list[Any]:
|
459
512
|
"""
|
460
513
|
Retrieves a list of all branches for the specified project reference using the v1 API.
|
461
|
-
|
514
|
+
|
462
515
|
Args:
|
463
516
|
ref: The project reference identifier (str) for which branches are to be listed. Must not be None.
|
464
|
-
|
517
|
+
|
465
518
|
Returns:
|
466
519
|
A list containing the branch information returned by the API. Each element corresponds to a branch, as parsed from the response JSON.
|
467
|
-
|
520
|
+
|
468
521
|
Raises:
|
469
522
|
ValueError: If the required parameter 'ref' is None.
|
470
523
|
requests.HTTPError: If the HTTP request to the API fails or returns an error status code.
|
471
|
-
|
524
|
+
|
472
525
|
Tags:
|
473
526
|
list, branches, api, project-management, important
|
474
527
|
"""
|
@@ -480,10 +533,20 @@ class SupabaseApp(APIApplication):
|
|
480
533
|
response.raise_for_status()
|
481
534
|
return response.json()
|
482
535
|
|
483
|
-
def v1_create_a_branch(
|
536
|
+
def v1_create_a_branch(
|
537
|
+
self,
|
538
|
+
ref,
|
539
|
+
branch_name,
|
540
|
+
desired_instance_size=None,
|
541
|
+
release_channel=None,
|
542
|
+
postgres_engine=None,
|
543
|
+
git_branch=None,
|
544
|
+
persistent=None,
|
545
|
+
region=None,
|
546
|
+
) -> dict[str, Any]:
|
484
547
|
"""
|
485
548
|
Creates a new branch for a specified project, configuring options such as instance size, release channel, and region.
|
486
|
-
|
549
|
+
|
487
550
|
Args:
|
488
551
|
ref: str. The reference ID or name of the parent project to which the branch will be added. Required.
|
489
552
|
branch_name: str. The name for the new branch to be created. Required.
|
@@ -493,14 +556,14 @@ class SupabaseApp(APIApplication):
|
|
493
556
|
git_branch: str or None. Optional. The upstream Git branch to link with the new branch.
|
494
557
|
persistent: bool or None. Optional. Indicates whether the branch should be persistent.
|
495
558
|
region: str or None. Optional. The deployment region for the new branch.
|
496
|
-
|
559
|
+
|
497
560
|
Returns:
|
498
561
|
dict[str, Any]: The API response as a dictionary containing details and metadata about the newly created branch.
|
499
|
-
|
562
|
+
|
500
563
|
Raises:
|
501
564
|
ValueError: If 'ref' or 'branch_name' is not provided.
|
502
565
|
requests.HTTPError: If the API request fails or returns an unsuccessful status code.
|
503
|
-
|
566
|
+
|
504
567
|
Tags:
|
505
568
|
create, branch, management, api, start, important
|
506
569
|
"""
|
@@ -509,13 +572,13 @@ class SupabaseApp(APIApplication):
|
|
509
572
|
if branch_name is None:
|
510
573
|
raise ValueError("Missing required parameter 'branch_name'")
|
511
574
|
request_body = {
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
575
|
+
"desired_instance_size": desired_instance_size,
|
576
|
+
"release_channel": release_channel,
|
577
|
+
"postgres_engine": postgres_engine,
|
578
|
+
"branch_name": branch_name,
|
579
|
+
"git_branch": git_branch,
|
580
|
+
"persistent": persistent,
|
581
|
+
"region": region,
|
519
582
|
}
|
520
583
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
521
584
|
url = f"{self.base_url}/v1/projects/{ref}/branches"
|
@@ -527,17 +590,17 @@ class SupabaseApp(APIApplication):
|
|
527
590
|
def v1_disable_preview_branching(self, ref) -> Any:
|
528
591
|
"""
|
529
592
|
Disables preview branching for a specified project reference by sending a DELETE request to the corresponding API endpoint.
|
530
|
-
|
593
|
+
|
531
594
|
Args:
|
532
595
|
ref: str. The project reference identifier for which preview branching will be disabled.
|
533
|
-
|
596
|
+
|
534
597
|
Returns:
|
535
598
|
Any. The parsed JSON response from the API after disabling preview branching.
|
536
|
-
|
599
|
+
|
537
600
|
Raises:
|
538
601
|
ValueError: Raised if the 'ref' parameter is None.
|
539
602
|
requests.exceptions.HTTPError: Raised if the HTTP request to disable preview branching fails.
|
540
|
-
|
603
|
+
|
541
604
|
Tags:
|
542
605
|
disable, management, api
|
543
606
|
"""
|
@@ -552,17 +615,17 @@ class SupabaseApp(APIApplication):
|
|
552
615
|
def v1_get_hostname_config(self, ref) -> dict[str, Any]:
|
553
616
|
"""
|
554
617
|
Retrieves the configuration for a custom hostname associated with a given project reference.
|
555
|
-
|
618
|
+
|
556
619
|
Args:
|
557
620
|
ref: str. The unique project reference identifier to query the custom hostname configuration for.
|
558
|
-
|
621
|
+
|
559
622
|
Returns:
|
560
623
|
dict. A dictionary containing the configuration details of the project's custom hostname as returned by the API.
|
561
|
-
|
624
|
+
|
562
625
|
Raises:
|
563
626
|
ValueError: If the 'ref' parameter is None.
|
564
627
|
requests.HTTPError: If the HTTP request to fetch the hostname configuration fails.
|
565
|
-
|
628
|
+
|
566
629
|
Tags:
|
567
630
|
get, hostname-config, management, api
|
568
631
|
"""
|
@@ -577,17 +640,17 @@ class SupabaseApp(APIApplication):
|
|
577
640
|
def v1_verify_dns_config(self, ref) -> dict[str, Any]:
|
578
641
|
"""
|
579
642
|
Triggers DNS configuration verification for a specified project reference via a POST request.
|
580
|
-
|
643
|
+
|
581
644
|
Args:
|
582
645
|
ref: The project reference or identifier for which to verify DNS configuration.
|
583
|
-
|
646
|
+
|
584
647
|
Returns:
|
585
648
|
A dictionary containing the JSON response from the verification API endpoint.
|
586
|
-
|
649
|
+
|
587
650
|
Raises:
|
588
651
|
ValueError: If the 'ref' parameter is None.
|
589
652
|
requests.HTTPError: If the HTTP request to the verification endpoint fails (non-2xx response).
|
590
|
-
|
653
|
+
|
591
654
|
Tags:
|
592
655
|
verify, dns, config, api
|
593
656
|
"""
|
@@ -602,17 +665,17 @@ class SupabaseApp(APIApplication):
|
|
602
665
|
def v1_activate_custom_hostname(self, ref) -> dict[str, Any]:
|
603
666
|
"""
|
604
667
|
Activates a custom hostname for the specified project reference using the v1 API endpoint.
|
605
|
-
|
668
|
+
|
606
669
|
Args:
|
607
670
|
ref: The project reference or identifier for which to activate the custom hostname. Must not be None.
|
608
|
-
|
671
|
+
|
609
672
|
Returns:
|
610
673
|
A dictionary containing the JSON response from the API after activating the custom hostname.
|
611
|
-
|
674
|
+
|
612
675
|
Raises:
|
613
676
|
ValueError: If the required parameter 'ref' is None.
|
614
677
|
requests.HTTPError: If the HTTP request to the API fails or returns an unsuccessful status code.
|
615
|
-
|
678
|
+
|
616
679
|
Tags:
|
617
680
|
activate, custom-hostname, api, management
|
618
681
|
"""
|
@@ -627,17 +690,17 @@ class SupabaseApp(APIApplication):
|
|
627
690
|
def v1_list_all_network_bans(self, ref) -> dict[str, Any]:
|
628
691
|
"""
|
629
692
|
Retrieves all network bans associated with the specified project reference.
|
630
|
-
|
693
|
+
|
631
694
|
Args:
|
632
695
|
ref: str. The project reference identifier used to specify which project's network bans to retrieve.
|
633
|
-
|
696
|
+
|
634
697
|
Returns:
|
635
698
|
dict. A dictionary containing the details of all network bans for the specified project.
|
636
|
-
|
699
|
+
|
637
700
|
Raises:
|
638
701
|
ValueError: Raised if the 'ref' parameter is None.
|
639
702
|
requests.HTTPError: Raised if the HTTP request returned an unsuccessful status code.
|
640
|
-
|
703
|
+
|
641
704
|
Tags:
|
642
705
|
list, network-bans, management, api
|
643
706
|
"""
|
@@ -652,18 +715,18 @@ class SupabaseApp(APIApplication):
|
|
652
715
|
def v1_delete_network_bans(self, ref, ipv4_addresses) -> Any:
|
653
716
|
"""
|
654
717
|
Deletes specified IPv4 addresses from the network ban list for a given project reference.
|
655
|
-
|
718
|
+
|
656
719
|
Args:
|
657
720
|
ref: str. The unique project reference identifier.
|
658
721
|
ipv4_addresses: List[str]. List of IPv4 addresses to be removed from the network ban list.
|
659
|
-
|
722
|
+
|
660
723
|
Returns:
|
661
724
|
Any. The parsed JSON response from the API indicating the result of the delete operation.
|
662
|
-
|
725
|
+
|
663
726
|
Raises:
|
664
727
|
ValueError: Raised if the 'ref' or 'ipv4_addresses' parameter is None.
|
665
728
|
requests.HTTPError: Raised if the HTTP request to delete network bans fails.
|
666
|
-
|
729
|
+
|
667
730
|
Tags:
|
668
731
|
delete, network-bans, management, api
|
669
732
|
"""
|
@@ -672,7 +735,7 @@ class SupabaseApp(APIApplication):
|
|
672
735
|
if ipv4_addresses is None:
|
673
736
|
raise ValueError("Missing required parameter 'ipv4_addresses'")
|
674
737
|
request_body = {
|
675
|
-
|
738
|
+
"ipv4_addresses": ipv4_addresses,
|
676
739
|
}
|
677
740
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
678
741
|
url = f"{self.base_url}/v1/projects/{ref}/network-bans"
|
@@ -684,17 +747,17 @@ class SupabaseApp(APIApplication):
|
|
684
747
|
def v1_get_network_restrictions(self, ref) -> dict[str, Any]:
|
685
748
|
"""
|
686
749
|
Retrieves network restriction settings for a given project reference.
|
687
|
-
|
750
|
+
|
688
751
|
Args:
|
689
752
|
ref: str. The unique reference identifier of the project whose network restrictions are to be fetched.
|
690
|
-
|
753
|
+
|
691
754
|
Returns:
|
692
755
|
dict. The network restriction settings associated with the specified project, as a parsed JSON object.
|
693
|
-
|
756
|
+
|
694
757
|
Raises:
|
695
758
|
ValueError: Raised if the 'ref' parameter is None.
|
696
759
|
requests.HTTPError: Raised if the HTTP request to fetch network restrictions returns an unsuccessful status code.
|
697
|
-
|
760
|
+
|
698
761
|
Tags:
|
699
762
|
get, network-restrictions, management
|
700
763
|
"""
|
@@ -706,30 +769,32 @@ class SupabaseApp(APIApplication):
|
|
706
769
|
response.raise_for_status()
|
707
770
|
return response.json()
|
708
771
|
|
709
|
-
def v1_update_network_restrictions(
|
772
|
+
def v1_update_network_restrictions(
|
773
|
+
self, ref, dbAllowedCidrs=None, dbAllowedCidrsV6=None
|
774
|
+
) -> dict[str, Any]:
|
710
775
|
"""
|
711
776
|
Updates network access restrictions for the specified project by applying the given allowed IPv4 and IPv6 CIDR ranges.
|
712
|
-
|
777
|
+
|
713
778
|
Args:
|
714
779
|
ref: str. The project reference identifier. Required.
|
715
780
|
dbAllowedCidrs: Optional[list[str]]. A list of allowed IPv4 CIDR ranges for database access. Defaults to None.
|
716
781
|
dbAllowedCidrsV6: Optional[list[str]]. A list of allowed IPv6 CIDR ranges for database access. Defaults to None.
|
717
|
-
|
782
|
+
|
718
783
|
Returns:
|
719
784
|
dict[str, Any]: The response from the API after updating network restrictions.
|
720
|
-
|
785
|
+
|
721
786
|
Raises:
|
722
787
|
ValueError: If the 'ref' parameter is not provided.
|
723
788
|
requests.HTTPError: If the HTTP request fails or an error status is returned by the API.
|
724
|
-
|
789
|
+
|
725
790
|
Tags:
|
726
791
|
update, network-restrictions, management, api
|
727
792
|
"""
|
728
793
|
if ref is None:
|
729
794
|
raise ValueError("Missing required parameter 'ref'")
|
730
795
|
request_body = {
|
731
|
-
|
732
|
-
|
796
|
+
"dbAllowedCidrs": dbAllowedCidrs,
|
797
|
+
"dbAllowedCidrsV6": dbAllowedCidrsV6,
|
733
798
|
}
|
734
799
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
735
800
|
url = f"{self.base_url}/v1/projects/{ref}/network-restrictions/apply"
|
@@ -741,17 +806,17 @@ class SupabaseApp(APIApplication):
|
|
741
806
|
def v1_get_pgsodium_config(self, ref) -> dict[str, Any]:
|
742
807
|
"""
|
743
808
|
Retrieves the pgSodium configuration for a specified project reference from the v1 API endpoint.
|
744
|
-
|
809
|
+
|
745
810
|
Args:
|
746
811
|
ref: str. The project reference identifier for which to fetch the pgSodium configuration.
|
747
|
-
|
812
|
+
|
748
813
|
Returns:
|
749
814
|
dict. The pgSodium configuration as parsed from the API response JSON.
|
750
|
-
|
815
|
+
|
751
816
|
Raises:
|
752
817
|
ValueError: If the 'ref' parameter is None.
|
753
818
|
requests.HTTPError: If the HTTP request fails or returns an unsuccessful status code.
|
754
|
-
|
819
|
+
|
755
820
|
Tags:
|
756
821
|
get, pgsodium, config, api
|
757
822
|
"""
|
@@ -766,18 +831,18 @@ class SupabaseApp(APIApplication):
|
|
766
831
|
def v1_update_pgsodium_config(self, ref, root_key) -> dict[str, Any]:
|
767
832
|
"""
|
768
833
|
Updates the pgsodium configuration for a specified project reference using the provided root key.
|
769
|
-
|
834
|
+
|
770
835
|
Args:
|
771
836
|
ref: str. The unique project reference identifier for which the pgsodium configuration will be updated.
|
772
837
|
root_key: str. The root encryption key to set in the pgsodium configuration.
|
773
|
-
|
838
|
+
|
774
839
|
Returns:
|
775
840
|
dict. The server's JSON response confirming the updated pgsodium configuration.
|
776
|
-
|
841
|
+
|
777
842
|
Raises:
|
778
843
|
ValueError: Raised if 'ref' or 'root_key' is None.
|
779
844
|
requests.HTTPError: Raised if the HTTP request fails with an unsuccessful status code.
|
780
|
-
|
845
|
+
|
781
846
|
Tags:
|
782
847
|
update, pgsodium, config, management
|
783
848
|
"""
|
@@ -786,7 +851,7 @@ class SupabaseApp(APIApplication):
|
|
786
851
|
if root_key is None:
|
787
852
|
raise ValueError("Missing required parameter 'root_key'")
|
788
853
|
request_body = {
|
789
|
-
|
854
|
+
"root_key": root_key,
|
790
855
|
}
|
791
856
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
792
857
|
url = f"{self.base_url}/v1/projects/{ref}/pgsodium"
|
@@ -798,17 +863,17 @@ class SupabaseApp(APIApplication):
|
|
798
863
|
def v1_get_postgrest_service_config(self, ref) -> dict[str, Any]:
|
799
864
|
"""
|
800
865
|
Retrieves the configuration details for the PostgREST service associated with the specified project reference.
|
801
|
-
|
866
|
+
|
802
867
|
Args:
|
803
868
|
ref: str. The unique reference identifier for the project whose PostgREST configuration is to be retrieved.
|
804
|
-
|
869
|
+
|
805
870
|
Returns:
|
806
871
|
dict[str, Any]: A dictionary containing the PostgREST service configuration details for the specified project.
|
807
|
-
|
872
|
+
|
808
873
|
Raises:
|
809
874
|
ValueError: Raised if the 'ref' parameter is None.
|
810
875
|
requests.HTTPError: Raised if the HTTP request to fetch the PostgREST configuration fails.
|
811
|
-
|
876
|
+
|
812
877
|
Tags:
|
813
878
|
fetch, postgrest, service-config, project
|
814
879
|
"""
|
@@ -820,34 +885,41 @@ class SupabaseApp(APIApplication):
|
|
820
885
|
response.raise_for_status()
|
821
886
|
return response.json()
|
822
887
|
|
823
|
-
def v1_update_postgrest_service_config(
|
888
|
+
def v1_update_postgrest_service_config(
|
889
|
+
self,
|
890
|
+
ref,
|
891
|
+
max_rows=None,
|
892
|
+
db_pool=None,
|
893
|
+
db_extra_search_path=None,
|
894
|
+
db_schema=None,
|
895
|
+
) -> dict[str, Any]:
|
824
896
|
"""
|
825
897
|
Updates the configuration settings for a PostgREST service for a specified project.
|
826
|
-
|
898
|
+
|
827
899
|
Args:
|
828
900
|
ref: str. The unique identifier of the project whose PostgREST service configuration will be updated.
|
829
901
|
max_rows: Optional[int]. The maximum number of rows that the PostgREST service will return per request. If None, the setting remains unchanged.
|
830
902
|
db_pool: Optional[int]. The number of database connections in the pool for the PostgREST service. If None, the setting remains unchanged.
|
831
903
|
db_extra_search_path: Optional[str]. Additional search path for the database schema. If None, the setting remains unchanged.
|
832
904
|
db_schema: Optional[str]. The database schema to be used by the PostgREST service. If None, the setting remains unchanged.
|
833
|
-
|
905
|
+
|
834
906
|
Returns:
|
835
907
|
dict[str, Any]: The updated configuration of the PostgREST service as returned by the backend API.
|
836
|
-
|
908
|
+
|
837
909
|
Raises:
|
838
910
|
ValueError: Raised if the 'ref' parameter is not provided.
|
839
911
|
requests.HTTPError: Raised if the server responds with an error status code.
|
840
|
-
|
912
|
+
|
841
913
|
Tags:
|
842
914
|
update, postgrest, service-config, management, api
|
843
915
|
"""
|
844
916
|
if ref is None:
|
845
917
|
raise ValueError("Missing required parameter 'ref'")
|
846
918
|
request_body = {
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
919
|
+
"max_rows": max_rows,
|
920
|
+
"db_pool": db_pool,
|
921
|
+
"db_extra_search_path": db_extra_search_path,
|
922
|
+
"db_schema": db_schema,
|
851
923
|
}
|
852
924
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
853
925
|
url = f"{self.base_url}/v1/projects/{ref}/postgrest"
|
@@ -859,17 +931,17 @@ class SupabaseApp(APIApplication):
|
|
859
931
|
def v1_delete_a_project(self, ref) -> dict[str, Any]:
|
860
932
|
"""
|
861
933
|
Deletes a project identified by its reference and returns the API response as a dictionary.
|
862
|
-
|
934
|
+
|
863
935
|
Args:
|
864
936
|
ref: str. The unique identifier or reference of the project to be deleted.
|
865
|
-
|
937
|
+
|
866
938
|
Returns:
|
867
939
|
dict[str, Any]: The response from the API as a dictionary containing information about the deleted project.
|
868
|
-
|
940
|
+
|
869
941
|
Raises:
|
870
942
|
ValueError: If the 'ref' parameter is None.
|
871
943
|
requests.HTTPError: If the HTTP DELETE request returns an unsuccessful status code.
|
872
|
-
|
944
|
+
|
873
945
|
Tags:
|
874
946
|
delete, project-management, api
|
875
947
|
"""
|
@@ -884,17 +956,17 @@ class SupabaseApp(APIApplication):
|
|
884
956
|
def v1_list_all_secrets(self, ref) -> list[Any]:
|
885
957
|
"""
|
886
958
|
Lists all secrets for the specified project reference via the v1 API.
|
887
|
-
|
959
|
+
|
888
960
|
Args:
|
889
961
|
ref: The project reference identifier as a string. Must not be None.
|
890
|
-
|
962
|
+
|
891
963
|
Returns:
|
892
964
|
A list containing the secrets associated with the specified project.
|
893
|
-
|
965
|
+
|
894
966
|
Raises:
|
895
967
|
ValueError: If the 'ref' parameter is None.
|
896
968
|
requests.HTTPError: If the underlying HTTP request fails with a non-success status code.
|
897
|
-
|
969
|
+
|
898
970
|
Tags:
|
899
971
|
list, secrets, management, v1
|
900
972
|
"""
|
@@ -909,18 +981,18 @@ class SupabaseApp(APIApplication):
|
|
909
981
|
def v1_bulk_create_secrets(self, ref, items) -> Any:
|
910
982
|
"""
|
911
983
|
Creates multiple secrets for a specified project reference in a single batch request.
|
912
|
-
|
984
|
+
|
913
985
|
Args:
|
914
986
|
ref: The project reference identifier as a string. Must not be None.
|
915
987
|
items: A list or array of secret objects to create in bulk. Must not be None.
|
916
|
-
|
988
|
+
|
917
989
|
Returns:
|
918
990
|
The JSON-decoded response from the server containing the results of the bulk secrets creation.
|
919
|
-
|
991
|
+
|
920
992
|
Raises:
|
921
993
|
ValueError: If either 'ref' or 'items' is None.
|
922
994
|
requests.HTTPError: If the HTTP response from the server indicates an unsuccessful status code.
|
923
|
-
|
995
|
+
|
924
996
|
Tags:
|
925
997
|
bulk-create, secrets, batch, api
|
926
998
|
"""
|
@@ -938,18 +1010,18 @@ class SupabaseApp(APIApplication):
|
|
938
1010
|
def v1_bulk_delete_secrets(self, ref, items) -> dict[str, Any]:
|
939
1011
|
"""
|
940
1012
|
Deletes multiple secrets from a given project by making a bulk delete request.
|
941
|
-
|
1013
|
+
|
942
1014
|
Args:
|
943
1015
|
ref: str. The unique reference or identifier of the project containing the secrets.
|
944
1016
|
items: list. A list of secret identifiers to delete from the project.
|
945
|
-
|
1017
|
+
|
946
1018
|
Returns:
|
947
1019
|
dict. The parsed JSON response from the server after the bulk delete operation.
|
948
|
-
|
1020
|
+
|
949
1021
|
Raises:
|
950
1022
|
ValueError: If the 'ref' or 'items' parameter is None.
|
951
1023
|
HTTPError: If the HTTP request to delete secrets fails with a non-successful status code.
|
952
|
-
|
1024
|
+
|
953
1025
|
Tags:
|
954
1026
|
delete, bulk, secrets, management, api
|
955
1027
|
"""
|
@@ -966,17 +1038,17 @@ class SupabaseApp(APIApplication):
|
|
966
1038
|
def v1_get_ssl_enforcement_config(self, ref) -> dict[str, Any]:
|
967
1039
|
"""
|
968
1040
|
Retrieves the SSL enforcement configuration for the specified project.
|
969
|
-
|
1041
|
+
|
970
1042
|
Args:
|
971
1043
|
ref: str. The unique identifier of the project for which to fetch the SSL enforcement configuration.
|
972
|
-
|
1044
|
+
|
973
1045
|
Returns:
|
974
1046
|
dict. The SSL enforcement configuration as a parsed JSON dictionary.
|
975
|
-
|
1047
|
+
|
976
1048
|
Raises:
|
977
1049
|
ValueError: If the 'ref' parameter is None.
|
978
1050
|
requests.HTTPError: If the HTTP request to fetch the configuration fails (i.e., non-2xx response code).
|
979
|
-
|
1051
|
+
|
980
1052
|
Tags:
|
981
1053
|
get, ssl-enforcement, config, project, api, management
|
982
1054
|
"""
|
@@ -991,18 +1063,18 @@ class SupabaseApp(APIApplication):
|
|
991
1063
|
def v1_update_ssl_enforcement_config(self, ref, requestedConfig) -> dict[str, Any]:
|
992
1064
|
"""
|
993
1065
|
Updates the SSL enforcement configuration for the specified project reference.
|
994
|
-
|
1066
|
+
|
995
1067
|
Args:
|
996
1068
|
ref: str. The unique project reference identifier to update the SSL enforcement configuration for.
|
997
1069
|
requestedConfig: Any. The desired SSL enforcement configuration settings to apply.
|
998
|
-
|
1070
|
+
|
999
1071
|
Returns:
|
1000
1072
|
dict[str, Any]: The response payload containing the updated SSL enforcement configuration details.
|
1001
|
-
|
1073
|
+
|
1002
1074
|
Raises:
|
1003
1075
|
ValueError: If the 'ref' or 'requestedConfig' argument is None.
|
1004
1076
|
requests.HTTPError: If the HTTP request to update the configuration fails.
|
1005
|
-
|
1077
|
+
|
1006
1078
|
Tags:
|
1007
1079
|
update, ssl-enforcement, management, api
|
1008
1080
|
"""
|
@@ -1011,7 +1083,7 @@ class SupabaseApp(APIApplication):
|
|
1011
1083
|
if requestedConfig is None:
|
1012
1084
|
raise ValueError("Missing required parameter 'requestedConfig'")
|
1013
1085
|
request_body = {
|
1014
|
-
|
1086
|
+
"requestedConfig": requestedConfig,
|
1015
1087
|
}
|
1016
1088
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1017
1089
|
url = f"{self.base_url}/v1/projects/{ref}/ssl-enforcement"
|
@@ -1020,28 +1092,32 @@ class SupabaseApp(APIApplication):
|
|
1020
1092
|
response.raise_for_status()
|
1021
1093
|
return response.json()
|
1022
1094
|
|
1023
|
-
def v1_generate_typescript_types(
|
1095
|
+
def v1_generate_typescript_types(
|
1096
|
+
self, ref, included_schemas=None
|
1097
|
+
) -> dict[str, Any]:
|
1024
1098
|
"""
|
1025
1099
|
Generates TypeScript type definitions for a specified project reference, optionally including specific schemas.
|
1026
|
-
|
1100
|
+
|
1027
1101
|
Args:
|
1028
1102
|
ref: str. The project reference for which TypeScript types are to be generated.
|
1029
1103
|
included_schemas: Optional[list[str]]. List of schema names to include in the generated TypeScript types. If None, all schemas are included.
|
1030
|
-
|
1104
|
+
|
1031
1105
|
Returns:
|
1032
1106
|
dict[str, Any]: A dictionary containing the generated TypeScript type definitions.
|
1033
|
-
|
1107
|
+
|
1034
1108
|
Raises:
|
1035
1109
|
ValueError: If the required 'ref' parameter is not provided.
|
1036
1110
|
requests.HTTPError: If the HTTP request to the API fails or returns an unsuccessful status code.
|
1037
|
-
|
1111
|
+
|
1038
1112
|
Tags:
|
1039
1113
|
generate, typescript-types, api, ai
|
1040
1114
|
"""
|
1041
1115
|
if ref is None:
|
1042
1116
|
raise ValueError("Missing required parameter 'ref'")
|
1043
1117
|
url = f"{self.base_url}/v1/projects/{ref}/types/typescript"
|
1044
|
-
query_params = {
|
1118
|
+
query_params = {
|
1119
|
+
k: v for k, v in [("included_schemas", included_schemas)] if v is not None
|
1120
|
+
}
|
1045
1121
|
response = self._get(url, params=query_params)
|
1046
1122
|
response.raise_for_status()
|
1047
1123
|
return response.json()
|
@@ -1049,17 +1125,17 @@ class SupabaseApp(APIApplication):
|
|
1049
1125
|
def v1_get_vanity_subdomain_config(self, ref) -> dict[str, Any]:
|
1050
1126
|
"""
|
1051
1127
|
Retrieve the vanity subdomain configuration for a given project reference.
|
1052
|
-
|
1128
|
+
|
1053
1129
|
Args:
|
1054
1130
|
ref: str. The unique identifier of the project whose vanity subdomain configuration is to be retrieved.
|
1055
|
-
|
1131
|
+
|
1056
1132
|
Returns:
|
1057
1133
|
dict. A dictionary containing the vanity subdomain configuration data for the specified project.
|
1058
|
-
|
1134
|
+
|
1059
1135
|
Raises:
|
1060
1136
|
ValueError: If the 'ref' parameter is None.
|
1061
1137
|
requests.HTTPError: If the HTTP request to retrieve the configuration fails.
|
1062
|
-
|
1138
|
+
|
1063
1139
|
Tags:
|
1064
1140
|
get, fetch, vanity-subdomain, project-management
|
1065
1141
|
"""
|
@@ -1074,17 +1150,17 @@ class SupabaseApp(APIApplication):
|
|
1074
1150
|
def v1_deactivate_vanity_subdomain_config(self, ref) -> Any:
|
1075
1151
|
"""
|
1076
1152
|
Deactivates the vanity subdomain configuration for a specified project reference.
|
1077
|
-
|
1153
|
+
|
1078
1154
|
Args:
|
1079
1155
|
ref: The unique reference identifier for the project whose vanity subdomain configuration should be deactivated.
|
1080
|
-
|
1156
|
+
|
1081
1157
|
Returns:
|
1082
1158
|
A dictionary containing the API response data after deactivation.
|
1083
|
-
|
1159
|
+
|
1084
1160
|
Raises:
|
1085
1161
|
ValueError: Raised if the 'ref' parameter is None.
|
1086
1162
|
requests.exceptions.HTTPError: Raised if the HTTP request to deactivate the vanity subdomain configuration fails.
|
1087
|
-
|
1163
|
+
|
1088
1164
|
Tags:
|
1089
1165
|
deactivate, vanity-subdomain, management, api
|
1090
1166
|
"""
|
@@ -1096,21 +1172,23 @@ class SupabaseApp(APIApplication):
|
|
1096
1172
|
response.raise_for_status()
|
1097
1173
|
return response.json()
|
1098
1174
|
|
1099
|
-
def v1_check_vanity_subdomain_availability(
|
1175
|
+
def v1_check_vanity_subdomain_availability(
|
1176
|
+
self, ref, vanity_subdomain
|
1177
|
+
) -> dict[str, Any]:
|
1100
1178
|
"""
|
1101
1179
|
Checks the availability of a specified vanity subdomain for a given project reference.
|
1102
|
-
|
1180
|
+
|
1103
1181
|
Args:
|
1104
1182
|
ref: str. The unique reference identifier for the project.
|
1105
1183
|
vanity_subdomain: str. The desired vanity subdomain to check for availability.
|
1106
|
-
|
1184
|
+
|
1107
1185
|
Returns:
|
1108
1186
|
dict[str, Any]: A dictionary containing the availability status and related information for the requested vanity subdomain.
|
1109
|
-
|
1187
|
+
|
1110
1188
|
Raises:
|
1111
1189
|
ValueError: Raised if 'ref' or 'vanity_subdomain' is None.
|
1112
1190
|
requests.HTTPError: Raised if the HTTP request to the API endpoint fails or returns an unsuccessful status code.
|
1113
|
-
|
1191
|
+
|
1114
1192
|
Tags:
|
1115
1193
|
check, async-job, management
|
1116
1194
|
"""
|
@@ -1119,7 +1197,7 @@ class SupabaseApp(APIApplication):
|
|
1119
1197
|
if vanity_subdomain is None:
|
1120
1198
|
raise ValueError("Missing required parameter 'vanity_subdomain'")
|
1121
1199
|
request_body = {
|
1122
|
-
|
1200
|
+
"vanity_subdomain": vanity_subdomain,
|
1123
1201
|
}
|
1124
1202
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1125
1203
|
url = f"{self.base_url}/v1/projects/{ref}/vanity-subdomain/check-availability"
|
@@ -1128,21 +1206,23 @@ class SupabaseApp(APIApplication):
|
|
1128
1206
|
response.raise_for_status()
|
1129
1207
|
return response.json()
|
1130
1208
|
|
1131
|
-
def v1_activate_vanity_subdomain_config(
|
1209
|
+
def v1_activate_vanity_subdomain_config(
|
1210
|
+
self, ref, vanity_subdomain
|
1211
|
+
) -> dict[str, Any]:
|
1132
1212
|
"""
|
1133
1213
|
Activates the vanity subdomain configuration for a specified project reference.
|
1134
|
-
|
1214
|
+
|
1135
1215
|
Args:
|
1136
1216
|
ref: str. The unique identifier of the project whose vanity subdomain configuration should be activated.
|
1137
1217
|
vanity_subdomain: str. The vanity subdomain to activate for the given project.
|
1138
|
-
|
1218
|
+
|
1139
1219
|
Returns:
|
1140
1220
|
dict. The JSON response from the API after attempting to activate the vanity subdomain configuration.
|
1141
|
-
|
1221
|
+
|
1142
1222
|
Raises:
|
1143
1223
|
ValueError: Raised if either 'ref' or 'vanity_subdomain' is None.
|
1144
1224
|
HTTPError: Raised if the HTTP request to activate the vanity subdomain configuration fails.
|
1145
|
-
|
1225
|
+
|
1146
1226
|
Tags:
|
1147
1227
|
activate, vanity-subdomain, management, api
|
1148
1228
|
"""
|
@@ -1151,7 +1231,7 @@ class SupabaseApp(APIApplication):
|
|
1151
1231
|
if vanity_subdomain is None:
|
1152
1232
|
raise ValueError("Missing required parameter 'vanity_subdomain'")
|
1153
1233
|
request_body = {
|
1154
|
-
|
1234
|
+
"vanity_subdomain": vanity_subdomain,
|
1155
1235
|
}
|
1156
1236
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1157
1237
|
url = f"{self.base_url}/v1/projects/{ref}/vanity-subdomain/activate"
|
@@ -1160,22 +1240,24 @@ class SupabaseApp(APIApplication):
|
|
1160
1240
|
response.raise_for_status()
|
1161
1241
|
return response.json()
|
1162
1242
|
|
1163
|
-
def v1_upgrade_postgres_version(
|
1243
|
+
def v1_upgrade_postgres_version(
|
1244
|
+
self, ref, release_channel, target_version
|
1245
|
+
) -> dict[str, Any]:
|
1164
1246
|
"""
|
1165
1247
|
Initiates an upgrade of a PostgreSQL instance to a specified target version via API call.
|
1166
|
-
|
1248
|
+
|
1167
1249
|
Args:
|
1168
1250
|
ref: str. Project or instance reference identifier to specify which PostgreSQL instance to upgrade.
|
1169
1251
|
release_channel: str. Specifies the release channel (e.g., 'stable', 'beta') that determines the upgrade source.
|
1170
1252
|
target_version: str. The desired target PostgreSQL version to upgrade to.
|
1171
|
-
|
1253
|
+
|
1172
1254
|
Returns:
|
1173
1255
|
dict. The API response as a dictionary containing details about the upgrade initiation and status.
|
1174
|
-
|
1256
|
+
|
1175
1257
|
Raises:
|
1176
1258
|
ValueError: If any of 'ref', 'release_channel', or 'target_version' is None.
|
1177
1259
|
requests.HTTPError: If the underlying HTTP request to the upgrade API fails or returns an error response.
|
1178
|
-
|
1260
|
+
|
1179
1261
|
Tags:
|
1180
1262
|
upgrade, postgres, api, management
|
1181
1263
|
"""
|
@@ -1186,8 +1268,8 @@ class SupabaseApp(APIApplication):
|
|
1186
1268
|
if target_version is None:
|
1187
1269
|
raise ValueError("Missing required parameter 'target_version'")
|
1188
1270
|
request_body = {
|
1189
|
-
|
1190
|
-
|
1271
|
+
"release_channel": release_channel,
|
1272
|
+
"target_version": target_version,
|
1191
1273
|
}
|
1192
1274
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1193
1275
|
url = f"{self.base_url}/v1/projects/{ref}/upgrade"
|
@@ -1199,17 +1281,17 @@ class SupabaseApp(APIApplication):
|
|
1199
1281
|
def v1_get_postgrest_upgrade_eligibility(self, ref) -> dict[str, Any]:
|
1200
1282
|
"""
|
1201
1283
|
Checks the eligibility of a PostgREST upgrade for a specified project reference.
|
1202
|
-
|
1284
|
+
|
1203
1285
|
Args:
|
1204
1286
|
ref: str. The unique project reference identifier for which upgrade eligibility should be checked.
|
1205
|
-
|
1287
|
+
|
1206
1288
|
Returns:
|
1207
1289
|
dict. A dictionary containing the eligibility status and related information for the PostgREST upgrade.
|
1208
|
-
|
1290
|
+
|
1209
1291
|
Raises:
|
1210
1292
|
ValueError: Raised if the 'ref' parameter is None.
|
1211
1293
|
HTTPError: Raised if the HTTP request to the eligibility endpoint fails.
|
1212
|
-
|
1294
|
+
|
1213
1295
|
Tags:
|
1214
1296
|
check, upgrade, eligibility, management, api
|
1215
1297
|
"""
|
@@ -1224,17 +1306,17 @@ class SupabaseApp(APIApplication):
|
|
1224
1306
|
def v1_get_postgrest_upgrade_status(self, ref) -> dict[str, Any]:
|
1225
1307
|
"""
|
1226
1308
|
Retrieves the current upgrade status for a specified PostgREST project.
|
1227
|
-
|
1309
|
+
|
1228
1310
|
Args:
|
1229
1311
|
ref: str. The unique reference ID of the project whose upgrade status is to be retrieved.
|
1230
|
-
|
1312
|
+
|
1231
1313
|
Returns:
|
1232
1314
|
dict. A dictionary containing the upgrade status details for the specified project.
|
1233
|
-
|
1315
|
+
|
1234
1316
|
Raises:
|
1235
1317
|
ValueError: If the 'ref' parameter is None.
|
1236
1318
|
requests.HTTPError: If the HTTP request to the upgrade status endpoint fails.
|
1237
|
-
|
1319
|
+
|
1238
1320
|
Tags:
|
1239
1321
|
get, status, postgrest, upgrade, management
|
1240
1322
|
"""
|
@@ -1249,17 +1331,17 @@ class SupabaseApp(APIApplication):
|
|
1249
1331
|
def v1_get_readonly_mode_status(self, ref) -> dict[str, Any]:
|
1250
1332
|
"""
|
1251
1333
|
Retrieves the read-only mode status for a specified project reference.
|
1252
|
-
|
1334
|
+
|
1253
1335
|
Args:
|
1254
1336
|
ref: The unique identifier (reference) of the project to query for read-only status.
|
1255
|
-
|
1337
|
+
|
1256
1338
|
Returns:
|
1257
1339
|
A dictionary containing the read-only mode status of the specified project.
|
1258
|
-
|
1340
|
+
|
1259
1341
|
Raises:
|
1260
1342
|
ValueError: If the required 'ref' parameter is None.
|
1261
1343
|
requests.HTTPError: If the HTTP request to the server returns an unsuccessful status code.
|
1262
|
-
|
1344
|
+
|
1263
1345
|
Tags:
|
1264
1346
|
get, status, readonly, management
|
1265
1347
|
"""
|
@@ -1274,17 +1356,17 @@ class SupabaseApp(APIApplication):
|
|
1274
1356
|
def v1_disable_readonly_mode_temporarily(self, ref) -> Any:
|
1275
1357
|
"""
|
1276
1358
|
Temporarily disables readonly mode for a specified project reference via a POST request.
|
1277
|
-
|
1359
|
+
|
1278
1360
|
Args:
|
1279
1361
|
ref: The unique reference identifier for the project whose readonly mode should be temporarily disabled. Must not be None.
|
1280
|
-
|
1362
|
+
|
1281
1363
|
Returns:
|
1282
1364
|
The JSON-decoded response from the API indicating the status of the readonly mode disable operation.
|
1283
|
-
|
1365
|
+
|
1284
1366
|
Raises:
|
1285
1367
|
ValueError: If the provided 'ref' parameter is None.
|
1286
1368
|
requests.HTTPError: If the HTTP request to the API fails (e.g., network error, non-2xx response).
|
1287
|
-
|
1369
|
+
|
1288
1370
|
Tags:
|
1289
1371
|
disable, readonly-mode, project-management, api
|
1290
1372
|
"""
|
@@ -1299,18 +1381,18 @@ class SupabaseApp(APIApplication):
|
|
1299
1381
|
def v1_setup_a_read_replica(self, ref, read_replica_region) -> Any:
|
1300
1382
|
"""
|
1301
1383
|
Initiates the setup of a read replica for a specified project in the given region.
|
1302
|
-
|
1384
|
+
|
1303
1385
|
Args:
|
1304
1386
|
ref: The unique identifier or reference for the project for which the read replica is to be set up.
|
1305
1387
|
read_replica_region: The region where the read replica should be created.
|
1306
|
-
|
1388
|
+
|
1307
1389
|
Returns:
|
1308
1390
|
The server response as a parsed JSON object containing details of the read replica setup operation.
|
1309
|
-
|
1391
|
+
|
1310
1392
|
Raises:
|
1311
1393
|
ValueError: Raised if either 'ref' or 'read_replica_region' is None, indicating a required parameter is missing.
|
1312
1394
|
HTTPError: Raised if the server responds with an unsuccessful HTTP status code during the setup operation.
|
1313
|
-
|
1395
|
+
|
1314
1396
|
Tags:
|
1315
1397
|
setup, read-replica, management
|
1316
1398
|
"""
|
@@ -1319,7 +1401,7 @@ class SupabaseApp(APIApplication):
|
|
1319
1401
|
if read_replica_region is None:
|
1320
1402
|
raise ValueError("Missing required parameter 'read_replica_region'")
|
1321
1403
|
request_body = {
|
1322
|
-
|
1404
|
+
"read_replica_region": read_replica_region,
|
1323
1405
|
}
|
1324
1406
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1325
1407
|
url = f"{self.base_url}/v1/projects/{ref}/read-replicas/setup"
|
@@ -1331,18 +1413,18 @@ class SupabaseApp(APIApplication):
|
|
1331
1413
|
def v1_remove_a_read_replica(self, ref, database_identifier) -> Any:
|
1332
1414
|
"""
|
1333
1415
|
Removes a read replica from a specified database within a project.
|
1334
|
-
|
1416
|
+
|
1335
1417
|
Args:
|
1336
1418
|
ref: str. Project identifier or reference for the operation.
|
1337
1419
|
database_identifier: str. Identifier of the database from which the read replica should be removed.
|
1338
|
-
|
1420
|
+
|
1339
1421
|
Returns:
|
1340
1422
|
dict. The server's JSON response after attempting to remove the read replica.
|
1341
|
-
|
1423
|
+
|
1342
1424
|
Raises:
|
1343
1425
|
ValueError: Raised if 'ref' or 'database_identifier' is None.
|
1344
1426
|
requests.HTTPError: Raised if the HTTP request to remove the read replica fails.
|
1345
|
-
|
1427
|
+
|
1346
1428
|
Tags:
|
1347
1429
|
remove, read-replica, database-management, api-call
|
1348
1430
|
"""
|
@@ -1351,7 +1433,7 @@ class SupabaseApp(APIApplication):
|
|
1351
1433
|
if database_identifier is None:
|
1352
1434
|
raise ValueError("Missing required parameter 'database_identifier'")
|
1353
1435
|
request_body = {
|
1354
|
-
|
1436
|
+
"database_identifier": database_identifier,
|
1355
1437
|
}
|
1356
1438
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1357
1439
|
url = f"{self.base_url}/v1/projects/{ref}/read-replicas/remove"
|
@@ -1363,19 +1445,19 @@ class SupabaseApp(APIApplication):
|
|
1363
1445
|
def v1_get_services_health(self, ref, services, timeout_ms=None) -> list[Any]:
|
1364
1446
|
"""
|
1365
1447
|
Checks the health status of specified services for a given project reference.
|
1366
|
-
|
1448
|
+
|
1367
1449
|
Args:
|
1368
1450
|
ref: str. The reference identifier for the target project.
|
1369
1451
|
services: list or str. The service or list of services to be checked.
|
1370
1452
|
timeout_ms: Optional[int]. The timeout in milliseconds for the health checks. Defaults to None.
|
1371
|
-
|
1453
|
+
|
1372
1454
|
Returns:
|
1373
1455
|
list. A list containing the health status information for the requested services.
|
1374
|
-
|
1456
|
+
|
1375
1457
|
Raises:
|
1376
1458
|
ValueError: If 'ref' or 'services' is None.
|
1377
1459
|
requests.HTTPError: If the health check HTTP request fails with a non-success response.
|
1378
|
-
|
1460
|
+
|
1379
1461
|
Tags:
|
1380
1462
|
get, health, check, service, status
|
1381
1463
|
"""
|
@@ -1384,7 +1466,11 @@ class SupabaseApp(APIApplication):
|
|
1384
1466
|
if services is None:
|
1385
1467
|
raise ValueError("Missing required parameter 'services'")
|
1386
1468
|
url = f"{self.base_url}/v1/projects/{ref}/health"
|
1387
|
-
query_params = {
|
1469
|
+
query_params = {
|
1470
|
+
k: v
|
1471
|
+
for k, v in [("timeout_ms", timeout_ms), ("services", services)]
|
1472
|
+
if v is not None
|
1473
|
+
}
|
1388
1474
|
response = self._get(url, params=query_params)
|
1389
1475
|
response.raise_for_status()
|
1390
1476
|
return response.json()
|
@@ -1392,17 +1478,17 @@ class SupabaseApp(APIApplication):
|
|
1392
1478
|
def v1_get_postgres_config(self, ref) -> dict[str, Any]:
|
1393
1479
|
"""
|
1394
1480
|
Retrieves the PostgreSQL configuration for the specified project reference.
|
1395
|
-
|
1481
|
+
|
1396
1482
|
Args:
|
1397
1483
|
ref: str. The unique reference identifier for the project whose PostgreSQL configuration is to be retrieved.
|
1398
|
-
|
1484
|
+
|
1399
1485
|
Returns:
|
1400
1486
|
dict. The PostgreSQL configuration parameters for the specified project, as returned by the API.
|
1401
|
-
|
1487
|
+
|
1402
1488
|
Raises:
|
1403
1489
|
ValueError: If 'ref' is None.
|
1404
1490
|
requests.HTTPError: If the HTTP request to the API fails or returns an error status code.
|
1405
|
-
|
1491
|
+
|
1406
1492
|
Tags:
|
1407
1493
|
get, config, postgres, ai
|
1408
1494
|
"""
|
@@ -1414,10 +1500,30 @@ class SupabaseApp(APIApplication):
|
|
1414
1500
|
response.raise_for_status()
|
1415
1501
|
return response.json()
|
1416
1502
|
|
1417
|
-
def v1_update_postgres_config(
|
1503
|
+
def v1_update_postgres_config(
|
1504
|
+
self,
|
1505
|
+
ref,
|
1506
|
+
statement_timeout=None,
|
1507
|
+
effective_cache_size=None,
|
1508
|
+
maintenance_work_mem=None,
|
1509
|
+
max_connections=None,
|
1510
|
+
max_locks_per_transaction=None,
|
1511
|
+
max_parallel_maintenance_workers=None,
|
1512
|
+
max_parallel_workers=None,
|
1513
|
+
max_parallel_workers_per_gather=None,
|
1514
|
+
max_slot_wal_keep_size=None,
|
1515
|
+
max_standby_archive_delay=None,
|
1516
|
+
max_standby_streaming_delay=None,
|
1517
|
+
max_wal_size=None,
|
1518
|
+
max_worker_processes=None,
|
1519
|
+
shared_buffers=None,
|
1520
|
+
wal_keep_size=None,
|
1521
|
+
work_mem=None,
|
1522
|
+
session_replication_role=None,
|
1523
|
+
) -> dict[str, Any]:
|
1418
1524
|
"""
|
1419
1525
|
Updates PostgreSQL configuration settings for a specified project via a REST API call.
|
1420
|
-
|
1526
|
+
|
1421
1527
|
Args:
|
1422
1528
|
ref: str. The project reference identifier. Required.
|
1423
1529
|
statement_timeout: Optional[int|str]. Sets the maximum allowed duration of any statement.
|
@@ -1437,37 +1543,37 @@ class SupabaseApp(APIApplication):
|
|
1437
1543
|
wal_keep_size: Optional[int|str]. Sets the size of WAL files to keep for standby servers.
|
1438
1544
|
work_mem: Optional[int|str]. Sets the amount of memory to be used by internal sort operations and hash tables before writing to temporary disk files.
|
1439
1545
|
session_replication_role: Optional[str]. Sets the replication role for the session.
|
1440
|
-
|
1546
|
+
|
1441
1547
|
Returns:
|
1442
1548
|
dict[str, Any]: The JSON response from the API after updating the configuration.
|
1443
|
-
|
1549
|
+
|
1444
1550
|
Raises:
|
1445
1551
|
ValueError: If the 'ref' parameter is None.
|
1446
1552
|
requests.HTTPError: If the HTTP request fails or the API responds with an error status code.
|
1447
|
-
|
1553
|
+
|
1448
1554
|
Tags:
|
1449
1555
|
update, postgres-config, management, api, async-job
|
1450
1556
|
"""
|
1451
1557
|
if ref is None:
|
1452
1558
|
raise ValueError("Missing required parameter 'ref'")
|
1453
1559
|
request_body = {
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1560
|
+
"statement_timeout": statement_timeout,
|
1561
|
+
"effective_cache_size": effective_cache_size,
|
1562
|
+
"maintenance_work_mem": maintenance_work_mem,
|
1563
|
+
"max_connections": max_connections,
|
1564
|
+
"max_locks_per_transaction": max_locks_per_transaction,
|
1565
|
+
"max_parallel_maintenance_workers": max_parallel_maintenance_workers,
|
1566
|
+
"max_parallel_workers": max_parallel_workers,
|
1567
|
+
"max_parallel_workers_per_gather": max_parallel_workers_per_gather,
|
1568
|
+
"max_slot_wal_keep_size": max_slot_wal_keep_size,
|
1569
|
+
"max_standby_archive_delay": max_standby_archive_delay,
|
1570
|
+
"max_standby_streaming_delay": max_standby_streaming_delay,
|
1571
|
+
"max_wal_size": max_wal_size,
|
1572
|
+
"max_worker_processes": max_worker_processes,
|
1573
|
+
"shared_buffers": shared_buffers,
|
1574
|
+
"wal_keep_size": wal_keep_size,
|
1575
|
+
"work_mem": work_mem,
|
1576
|
+
"session_replication_role": session_replication_role,
|
1471
1577
|
}
|
1472
1578
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1473
1579
|
url = f"{self.base_url}/v1/projects/{ref}/config/database/postgres"
|
@@ -1479,17 +1585,17 @@ class SupabaseApp(APIApplication):
|
|
1479
1585
|
def v1_get_project_pgbouncer_config(self, ref) -> dict[str, Any]:
|
1480
1586
|
"""
|
1481
1587
|
Retrieves the PgBouncer configuration for a specific project by project reference.
|
1482
|
-
|
1588
|
+
|
1483
1589
|
Args:
|
1484
1590
|
ref: The reference identifier of the project for which to fetch the PgBouncer configuration.
|
1485
|
-
|
1591
|
+
|
1486
1592
|
Returns:
|
1487
1593
|
A dictionary containing the PgBouncer configuration for the specified project.
|
1488
|
-
|
1594
|
+
|
1489
1595
|
Raises:
|
1490
1596
|
ValueError: Raised if the required parameter 'ref' is None.
|
1491
1597
|
requests.HTTPError: Raised if the HTTP request for the configuration fails.
|
1492
|
-
|
1598
|
+
|
1493
1599
|
Tags:
|
1494
1600
|
get, project, pgbouncer, config, management
|
1495
1601
|
"""
|
@@ -1504,17 +1610,17 @@ class SupabaseApp(APIApplication):
|
|
1504
1610
|
def v1_get_supavisor_config(self, ref) -> list[Any]:
|
1505
1611
|
"""
|
1506
1612
|
Retrieves the Supavisor configuration for a specified project reference from the configured API.
|
1507
|
-
|
1613
|
+
|
1508
1614
|
Args:
|
1509
1615
|
ref: str. Unique project reference identifier used to construct the request URL. Must not be None.
|
1510
|
-
|
1616
|
+
|
1511
1617
|
Returns:
|
1512
1618
|
list[Any]: The parsed JSON response from the API containing the Supavisor configuration details.
|
1513
|
-
|
1619
|
+
|
1514
1620
|
Raises:
|
1515
1621
|
ValueError: If the required parameter 'ref' is None.
|
1516
1622
|
requests.HTTPError: If the HTTP request returns an unsuccessful status code.
|
1517
|
-
|
1623
|
+
|
1518
1624
|
Tags:
|
1519
1625
|
get, config, supavisor, api
|
1520
1626
|
"""
|
@@ -1526,30 +1632,32 @@ class SupabaseApp(APIApplication):
|
|
1526
1632
|
response.raise_for_status()
|
1527
1633
|
return response.json()
|
1528
1634
|
|
1529
|
-
def v1_update_supavisor_config(
|
1635
|
+
def v1_update_supavisor_config(
|
1636
|
+
self, ref, default_pool_size=None, pool_mode=None
|
1637
|
+
) -> dict[str, Any]:
|
1530
1638
|
"""
|
1531
1639
|
Updates the Supavisor configuration for a specified project by modifying database pooler settings.
|
1532
|
-
|
1640
|
+
|
1533
1641
|
Args:
|
1534
1642
|
ref: str. The unique reference identifier for the project whose Supavisor configuration is to be updated.
|
1535
1643
|
default_pool_size: Optional[int]. The default size of the database connection pool. If None, this setting is not modified.
|
1536
1644
|
pool_mode: Optional[str]. The mode of the connection pooler (e.g., 'transaction' or 'session'). If None, this setting is not modified.
|
1537
|
-
|
1645
|
+
|
1538
1646
|
Returns:
|
1539
1647
|
dict[str, Any]: The JSON response containing the updated Supavisor configuration details from the API.
|
1540
|
-
|
1648
|
+
|
1541
1649
|
Raises:
|
1542
1650
|
ValueError: If 'ref' is None.
|
1543
1651
|
requests.HTTPError: If the HTTP request to the API fails or returns an unsuccessful status code.
|
1544
|
-
|
1652
|
+
|
1545
1653
|
Tags:
|
1546
1654
|
update, supavisor, config, api, management
|
1547
1655
|
"""
|
1548
1656
|
if ref is None:
|
1549
1657
|
raise ValueError("Missing required parameter 'ref'")
|
1550
1658
|
request_body = {
|
1551
|
-
|
1552
|
-
|
1659
|
+
"default_pool_size": default_pool_size,
|
1660
|
+
"pool_mode": pool_mode,
|
1553
1661
|
}
|
1554
1662
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1555
1663
|
url = f"{self.base_url}/v1/projects/{ref}/config/database/pooler"
|
@@ -1561,17 +1669,17 @@ class SupabaseApp(APIApplication):
|
|
1561
1669
|
def v1_get_auth_service_config(self, ref) -> dict[str, Any]:
|
1562
1670
|
"""
|
1563
1671
|
Retrieves the authentication service configuration for the specified project reference from the API.
|
1564
|
-
|
1672
|
+
|
1565
1673
|
Args:
|
1566
1674
|
ref: str. The unique identifier for the project whose authentication service configuration is to be retrieved.
|
1567
|
-
|
1675
|
+
|
1568
1676
|
Returns:
|
1569
1677
|
dict. A dictionary containing the authentication service configuration details for the specified project.
|
1570
|
-
|
1678
|
+
|
1571
1679
|
Raises:
|
1572
1680
|
ValueError: Raised if 'ref' is None.
|
1573
1681
|
requests.HTTPError: Raised if the HTTP request to the API fails or returns a non-success status code.
|
1574
|
-
|
1682
|
+
|
1575
1683
|
Tags:
|
1576
1684
|
get, auth-service, config, api
|
1577
1685
|
"""
|
@@ -1583,10 +1691,182 @@ class SupabaseApp(APIApplication):
|
|
1583
1691
|
response.raise_for_status()
|
1584
1692
|
return response.json()
|
1585
1693
|
|
1586
|
-
def v1_update_auth_service_config(
|
1694
|
+
def v1_update_auth_service_config(
|
1695
|
+
self,
|
1696
|
+
ref,
|
1697
|
+
site_url=None,
|
1698
|
+
disable_signup=None,
|
1699
|
+
jwt_exp=None,
|
1700
|
+
smtp_admin_email=None,
|
1701
|
+
smtp_host=None,
|
1702
|
+
smtp_port=None,
|
1703
|
+
smtp_user=None,
|
1704
|
+
smtp_pass=None,
|
1705
|
+
smtp_max_frequency=None,
|
1706
|
+
smtp_sender_name=None,
|
1707
|
+
mailer_allow_unverified_email_sign_ins=None,
|
1708
|
+
mailer_autoconfirm=None,
|
1709
|
+
mailer_subjects_invite=None,
|
1710
|
+
mailer_subjects_confirmation=None,
|
1711
|
+
mailer_subjects_recovery=None,
|
1712
|
+
mailer_subjects_email_change=None,
|
1713
|
+
mailer_subjects_magic_link=None,
|
1714
|
+
mailer_subjects_reauthentication=None,
|
1715
|
+
mailer_templates_invite_content=None,
|
1716
|
+
mailer_templates_confirmation_content=None,
|
1717
|
+
mailer_templates_recovery_content=None,
|
1718
|
+
mailer_templates_email_change_content=None,
|
1719
|
+
mailer_templates_magic_link_content=None,
|
1720
|
+
mailer_templates_reauthentication_content=None,
|
1721
|
+
mfa_max_enrolled_factors=None,
|
1722
|
+
uri_allow_list=None,
|
1723
|
+
external_anonymous_users_enabled=None,
|
1724
|
+
external_email_enabled=None,
|
1725
|
+
external_phone_enabled=None,
|
1726
|
+
saml_enabled=None,
|
1727
|
+
saml_external_url=None,
|
1728
|
+
security_captcha_enabled=None,
|
1729
|
+
security_captcha_provider=None,
|
1730
|
+
security_captcha_secret=None,
|
1731
|
+
sessions_timebox=None,
|
1732
|
+
sessions_inactivity_timeout=None,
|
1733
|
+
sessions_single_per_user=None,
|
1734
|
+
sessions_tags=None,
|
1735
|
+
rate_limit_anonymous_users=None,
|
1736
|
+
rate_limit_email_sent=None,
|
1737
|
+
rate_limit_sms_sent=None,
|
1738
|
+
rate_limit_verify=None,
|
1739
|
+
rate_limit_token_refresh=None,
|
1740
|
+
rate_limit_otp=None,
|
1741
|
+
mailer_secure_email_change_enabled=None,
|
1742
|
+
refresh_token_rotation_enabled=None,
|
1743
|
+
password_hibp_enabled=None,
|
1744
|
+
password_min_length=None,
|
1745
|
+
password_required_characters=None,
|
1746
|
+
security_manual_linking_enabled=None,
|
1747
|
+
security_update_password_require_reauthentication=None,
|
1748
|
+
security_refresh_token_reuse_interval=None,
|
1749
|
+
mailer_otp_exp=None,
|
1750
|
+
mailer_otp_length=None,
|
1751
|
+
sms_autoconfirm=None,
|
1752
|
+
sms_max_frequency=None,
|
1753
|
+
sms_otp_exp=None,
|
1754
|
+
sms_otp_length=None,
|
1755
|
+
sms_provider=None,
|
1756
|
+
sms_messagebird_access_key=None,
|
1757
|
+
sms_messagebird_originator=None,
|
1758
|
+
sms_test_otp=None,
|
1759
|
+
sms_test_otp_valid_until=None,
|
1760
|
+
sms_textlocal_api_key=None,
|
1761
|
+
sms_textlocal_sender=None,
|
1762
|
+
sms_twilio_account_sid=None,
|
1763
|
+
sms_twilio_auth_token=None,
|
1764
|
+
sms_twilio_content_sid=None,
|
1765
|
+
sms_twilio_message_service_sid=None,
|
1766
|
+
sms_twilio_verify_account_sid=None,
|
1767
|
+
sms_twilio_verify_auth_token=None,
|
1768
|
+
sms_twilio_verify_message_service_sid=None,
|
1769
|
+
sms_vonage_api_key=None,
|
1770
|
+
sms_vonage_api_secret=None,
|
1771
|
+
sms_vonage_from=None,
|
1772
|
+
sms_template=None,
|
1773
|
+
hook_mfa_verification_attempt_enabled=None,
|
1774
|
+
hook_mfa_verification_attempt_uri=None,
|
1775
|
+
hook_mfa_verification_attempt_secrets=None,
|
1776
|
+
hook_password_verification_attempt_enabled=None,
|
1777
|
+
hook_password_verification_attempt_uri=None,
|
1778
|
+
hook_password_verification_attempt_secrets=None,
|
1779
|
+
hook_custom_access_token_enabled=None,
|
1780
|
+
hook_custom_access_token_uri=None,
|
1781
|
+
hook_custom_access_token_secrets=None,
|
1782
|
+
hook_send_sms_enabled=None,
|
1783
|
+
hook_send_sms_uri=None,
|
1784
|
+
hook_send_sms_secrets=None,
|
1785
|
+
hook_send_email_enabled=None,
|
1786
|
+
hook_send_email_uri=None,
|
1787
|
+
hook_send_email_secrets=None,
|
1788
|
+
external_apple_enabled=None,
|
1789
|
+
external_apple_client_id=None,
|
1790
|
+
external_apple_secret=None,
|
1791
|
+
external_apple_additional_client_ids=None,
|
1792
|
+
external_azure_enabled=None,
|
1793
|
+
external_azure_client_id=None,
|
1794
|
+
external_azure_secret=None,
|
1795
|
+
external_azure_url=None,
|
1796
|
+
external_bitbucket_enabled=None,
|
1797
|
+
external_bitbucket_client_id=None,
|
1798
|
+
external_bitbucket_secret=None,
|
1799
|
+
external_discord_enabled=None,
|
1800
|
+
external_discord_client_id=None,
|
1801
|
+
external_discord_secret=None,
|
1802
|
+
external_facebook_enabled=None,
|
1803
|
+
external_facebook_client_id=None,
|
1804
|
+
external_facebook_secret=None,
|
1805
|
+
external_figma_enabled=None,
|
1806
|
+
external_figma_client_id=None,
|
1807
|
+
external_figma_secret=None,
|
1808
|
+
external_github_enabled=None,
|
1809
|
+
external_github_client_id=None,
|
1810
|
+
external_github_secret=None,
|
1811
|
+
external_gitlab_enabled=None,
|
1812
|
+
external_gitlab_client_id=None,
|
1813
|
+
external_gitlab_secret=None,
|
1814
|
+
external_gitlab_url=None,
|
1815
|
+
external_google_enabled=None,
|
1816
|
+
external_google_client_id=None,
|
1817
|
+
external_google_secret=None,
|
1818
|
+
external_google_additional_client_ids=None,
|
1819
|
+
external_google_skip_nonce_check=None,
|
1820
|
+
external_kakao_enabled=None,
|
1821
|
+
external_kakao_client_id=None,
|
1822
|
+
external_kakao_secret=None,
|
1823
|
+
external_keycloak_enabled=None,
|
1824
|
+
external_keycloak_client_id=None,
|
1825
|
+
external_keycloak_secret=None,
|
1826
|
+
external_keycloak_url=None,
|
1827
|
+
external_linkedin_oidc_enabled=None,
|
1828
|
+
external_linkedin_oidc_client_id=None,
|
1829
|
+
external_linkedin_oidc_secret=None,
|
1830
|
+
external_slack_oidc_enabled=None,
|
1831
|
+
external_slack_oidc_client_id=None,
|
1832
|
+
external_slack_oidc_secret=None,
|
1833
|
+
external_notion_enabled=None,
|
1834
|
+
external_notion_client_id=None,
|
1835
|
+
external_notion_secret=None,
|
1836
|
+
external_slack_enabled=None,
|
1837
|
+
external_slack_client_id=None,
|
1838
|
+
external_slack_secret=None,
|
1839
|
+
external_spotify_enabled=None,
|
1840
|
+
external_spotify_client_id=None,
|
1841
|
+
external_spotify_secret=None,
|
1842
|
+
external_twitch_enabled=None,
|
1843
|
+
external_twitch_client_id=None,
|
1844
|
+
external_twitch_secret=None,
|
1845
|
+
external_twitter_enabled=None,
|
1846
|
+
external_twitter_client_id=None,
|
1847
|
+
external_twitter_secret=None,
|
1848
|
+
external_workos_enabled=None,
|
1849
|
+
external_workos_client_id=None,
|
1850
|
+
external_workos_secret=None,
|
1851
|
+
external_workos_url=None,
|
1852
|
+
external_zoom_enabled=None,
|
1853
|
+
external_zoom_client_id=None,
|
1854
|
+
external_zoom_secret=None,
|
1855
|
+
db_max_pool_size=None,
|
1856
|
+
api_max_request_duration=None,
|
1857
|
+
mfa_totp_enroll_enabled=None,
|
1858
|
+
mfa_totp_verify_enabled=None,
|
1859
|
+
mfa_web_authn_enroll_enabled=None,
|
1860
|
+
mfa_web_authn_verify_enabled=None,
|
1861
|
+
mfa_phone_enroll_enabled=None,
|
1862
|
+
mfa_phone_verify_enabled=None,
|
1863
|
+
mfa_phone_max_frequency=None,
|
1864
|
+
mfa_phone_otp_length=None,
|
1865
|
+
mfa_phone_template=None,
|
1866
|
+
) -> dict[str, Any]:
|
1587
1867
|
"""
|
1588
1868
|
Updates the authentication service configuration for a specified project with the provided settings.
|
1589
|
-
|
1869
|
+
|
1590
1870
|
Args:
|
1591
1871
|
ref: str. The unique reference identifier for the target project. Required.
|
1592
1872
|
site_url: Optional[str]. The base URL of the site associated with the authentication service.
|
@@ -1758,189 +2038,189 @@ class SupabaseApp(APIApplication):
|
|
1758
2038
|
mfa_phone_max_frequency: Optional[int]. Maximum frequency of MFA phone attempts.
|
1759
2039
|
mfa_phone_otp_length: Optional[int]. Length of MFA phone OTP.
|
1760
2040
|
mfa_phone_template: Optional[str]. MFA phone OTP template.
|
1761
|
-
|
2041
|
+
|
1762
2042
|
Returns:
|
1763
2043
|
dict[str, Any]: The updated authentication service configuration as returned by the server.
|
1764
|
-
|
2044
|
+
|
1765
2045
|
Raises:
|
1766
2046
|
ValueError: If the required 'ref' parameter is not provided.
|
1767
2047
|
requests.HTTPError: If the HTTP request to update config fails (e.g., network error or non-2xx response).
|
1768
|
-
|
2048
|
+
|
1769
2049
|
Tags:
|
1770
2050
|
update, auth-config, management, http, patch
|
1771
2051
|
"""
|
1772
2052
|
if ref is None:
|
1773
2053
|
raise ValueError("Missing required parameter 'ref'")
|
1774
2054
|
request_body = {
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
2055
|
+
"site_url": site_url,
|
2056
|
+
"disable_signup": disable_signup,
|
2057
|
+
"jwt_exp": jwt_exp,
|
2058
|
+
"smtp_admin_email": smtp_admin_email,
|
2059
|
+
"smtp_host": smtp_host,
|
2060
|
+
"smtp_port": smtp_port,
|
2061
|
+
"smtp_user": smtp_user,
|
2062
|
+
"smtp_pass": smtp_pass,
|
2063
|
+
"smtp_max_frequency": smtp_max_frequency,
|
2064
|
+
"smtp_sender_name": smtp_sender_name,
|
2065
|
+
"mailer_allow_unverified_email_sign_ins": mailer_allow_unverified_email_sign_ins,
|
2066
|
+
"mailer_autoconfirm": mailer_autoconfirm,
|
2067
|
+
"mailer_subjects_invite": mailer_subjects_invite,
|
2068
|
+
"mailer_subjects_confirmation": mailer_subjects_confirmation,
|
2069
|
+
"mailer_subjects_recovery": mailer_subjects_recovery,
|
2070
|
+
"mailer_subjects_email_change": mailer_subjects_email_change,
|
2071
|
+
"mailer_subjects_magic_link": mailer_subjects_magic_link,
|
2072
|
+
"mailer_subjects_reauthentication": mailer_subjects_reauthentication,
|
2073
|
+
"mailer_templates_invite_content": mailer_templates_invite_content,
|
2074
|
+
"mailer_templates_confirmation_content": mailer_templates_confirmation_content,
|
2075
|
+
"mailer_templates_recovery_content": mailer_templates_recovery_content,
|
2076
|
+
"mailer_templates_email_change_content": mailer_templates_email_change_content,
|
2077
|
+
"mailer_templates_magic_link_content": mailer_templates_magic_link_content,
|
2078
|
+
"mailer_templates_reauthentication_content": mailer_templates_reauthentication_content,
|
2079
|
+
"mfa_max_enrolled_factors": mfa_max_enrolled_factors,
|
2080
|
+
"uri_allow_list": uri_allow_list,
|
2081
|
+
"external_anonymous_users_enabled": external_anonymous_users_enabled,
|
2082
|
+
"external_email_enabled": external_email_enabled,
|
2083
|
+
"external_phone_enabled": external_phone_enabled,
|
2084
|
+
"saml_enabled": saml_enabled,
|
2085
|
+
"saml_external_url": saml_external_url,
|
2086
|
+
"security_captcha_enabled": security_captcha_enabled,
|
2087
|
+
"security_captcha_provider": security_captcha_provider,
|
2088
|
+
"security_captcha_secret": security_captcha_secret,
|
2089
|
+
"sessions_timebox": sessions_timebox,
|
2090
|
+
"sessions_inactivity_timeout": sessions_inactivity_timeout,
|
2091
|
+
"sessions_single_per_user": sessions_single_per_user,
|
2092
|
+
"sessions_tags": sessions_tags,
|
2093
|
+
"rate_limit_anonymous_users": rate_limit_anonymous_users,
|
2094
|
+
"rate_limit_email_sent": rate_limit_email_sent,
|
2095
|
+
"rate_limit_sms_sent": rate_limit_sms_sent,
|
2096
|
+
"rate_limit_verify": rate_limit_verify,
|
2097
|
+
"rate_limit_token_refresh": rate_limit_token_refresh,
|
2098
|
+
"rate_limit_otp": rate_limit_otp,
|
2099
|
+
"mailer_secure_email_change_enabled": mailer_secure_email_change_enabled,
|
2100
|
+
"refresh_token_rotation_enabled": refresh_token_rotation_enabled,
|
2101
|
+
"password_hibp_enabled": password_hibp_enabled,
|
2102
|
+
"password_min_length": password_min_length,
|
2103
|
+
"password_required_characters": password_required_characters,
|
2104
|
+
"security_manual_linking_enabled": security_manual_linking_enabled,
|
2105
|
+
"security_update_password_require_reauthentication": security_update_password_require_reauthentication,
|
2106
|
+
"security_refresh_token_reuse_interval": security_refresh_token_reuse_interval,
|
2107
|
+
"mailer_otp_exp": mailer_otp_exp,
|
2108
|
+
"mailer_otp_length": mailer_otp_length,
|
2109
|
+
"sms_autoconfirm": sms_autoconfirm,
|
2110
|
+
"sms_max_frequency": sms_max_frequency,
|
2111
|
+
"sms_otp_exp": sms_otp_exp,
|
2112
|
+
"sms_otp_length": sms_otp_length,
|
2113
|
+
"sms_provider": sms_provider,
|
2114
|
+
"sms_messagebird_access_key": sms_messagebird_access_key,
|
2115
|
+
"sms_messagebird_originator": sms_messagebird_originator,
|
2116
|
+
"sms_test_otp": sms_test_otp,
|
2117
|
+
"sms_test_otp_valid_until": sms_test_otp_valid_until,
|
2118
|
+
"sms_textlocal_api_key": sms_textlocal_api_key,
|
2119
|
+
"sms_textlocal_sender": sms_textlocal_sender,
|
2120
|
+
"sms_twilio_account_sid": sms_twilio_account_sid,
|
2121
|
+
"sms_twilio_auth_token": sms_twilio_auth_token,
|
2122
|
+
"sms_twilio_content_sid": sms_twilio_content_sid,
|
2123
|
+
"sms_twilio_message_service_sid": sms_twilio_message_service_sid,
|
2124
|
+
"sms_twilio_verify_account_sid": sms_twilio_verify_account_sid,
|
2125
|
+
"sms_twilio_verify_auth_token": sms_twilio_verify_auth_token,
|
2126
|
+
"sms_twilio_verify_message_service_sid": sms_twilio_verify_message_service_sid,
|
2127
|
+
"sms_vonage_api_key": sms_vonage_api_key,
|
2128
|
+
"sms_vonage_api_secret": sms_vonage_api_secret,
|
2129
|
+
"sms_vonage_from": sms_vonage_from,
|
2130
|
+
"sms_template": sms_template,
|
2131
|
+
"hook_mfa_verification_attempt_enabled": hook_mfa_verification_attempt_enabled,
|
2132
|
+
"hook_mfa_verification_attempt_uri": hook_mfa_verification_attempt_uri,
|
2133
|
+
"hook_mfa_verification_attempt_secrets": hook_mfa_verification_attempt_secrets,
|
2134
|
+
"hook_password_verification_attempt_enabled": hook_password_verification_attempt_enabled,
|
2135
|
+
"hook_password_verification_attempt_uri": hook_password_verification_attempt_uri,
|
2136
|
+
"hook_password_verification_attempt_secrets": hook_password_verification_attempt_secrets,
|
2137
|
+
"hook_custom_access_token_enabled": hook_custom_access_token_enabled,
|
2138
|
+
"hook_custom_access_token_uri": hook_custom_access_token_uri,
|
2139
|
+
"hook_custom_access_token_secrets": hook_custom_access_token_secrets,
|
2140
|
+
"hook_send_sms_enabled": hook_send_sms_enabled,
|
2141
|
+
"hook_send_sms_uri": hook_send_sms_uri,
|
2142
|
+
"hook_send_sms_secrets": hook_send_sms_secrets,
|
2143
|
+
"hook_send_email_enabled": hook_send_email_enabled,
|
2144
|
+
"hook_send_email_uri": hook_send_email_uri,
|
2145
|
+
"hook_send_email_secrets": hook_send_email_secrets,
|
2146
|
+
"external_apple_enabled": external_apple_enabled,
|
2147
|
+
"external_apple_client_id": external_apple_client_id,
|
2148
|
+
"external_apple_secret": external_apple_secret,
|
2149
|
+
"external_apple_additional_client_ids": external_apple_additional_client_ids,
|
2150
|
+
"external_azure_enabled": external_azure_enabled,
|
2151
|
+
"external_azure_client_id": external_azure_client_id,
|
2152
|
+
"external_azure_secret": external_azure_secret,
|
2153
|
+
"external_azure_url": external_azure_url,
|
2154
|
+
"external_bitbucket_enabled": external_bitbucket_enabled,
|
2155
|
+
"external_bitbucket_client_id": external_bitbucket_client_id,
|
2156
|
+
"external_bitbucket_secret": external_bitbucket_secret,
|
2157
|
+
"external_discord_enabled": external_discord_enabled,
|
2158
|
+
"external_discord_client_id": external_discord_client_id,
|
2159
|
+
"external_discord_secret": external_discord_secret,
|
2160
|
+
"external_facebook_enabled": external_facebook_enabled,
|
2161
|
+
"external_facebook_client_id": external_facebook_client_id,
|
2162
|
+
"external_facebook_secret": external_facebook_secret,
|
2163
|
+
"external_figma_enabled": external_figma_enabled,
|
2164
|
+
"external_figma_client_id": external_figma_client_id,
|
2165
|
+
"external_figma_secret": external_figma_secret,
|
2166
|
+
"external_github_enabled": external_github_enabled,
|
2167
|
+
"external_github_client_id": external_github_client_id,
|
2168
|
+
"external_github_secret": external_github_secret,
|
2169
|
+
"external_gitlab_enabled": external_gitlab_enabled,
|
2170
|
+
"external_gitlab_client_id": external_gitlab_client_id,
|
2171
|
+
"external_gitlab_secret": external_gitlab_secret,
|
2172
|
+
"external_gitlab_url": external_gitlab_url,
|
2173
|
+
"external_google_enabled": external_google_enabled,
|
2174
|
+
"external_google_client_id": external_google_client_id,
|
2175
|
+
"external_google_secret": external_google_secret,
|
2176
|
+
"external_google_additional_client_ids": external_google_additional_client_ids,
|
2177
|
+
"external_google_skip_nonce_check": external_google_skip_nonce_check,
|
2178
|
+
"external_kakao_enabled": external_kakao_enabled,
|
2179
|
+
"external_kakao_client_id": external_kakao_client_id,
|
2180
|
+
"external_kakao_secret": external_kakao_secret,
|
2181
|
+
"external_keycloak_enabled": external_keycloak_enabled,
|
2182
|
+
"external_keycloak_client_id": external_keycloak_client_id,
|
2183
|
+
"external_keycloak_secret": external_keycloak_secret,
|
2184
|
+
"external_keycloak_url": external_keycloak_url,
|
2185
|
+
"external_linkedin_oidc_enabled": external_linkedin_oidc_enabled,
|
2186
|
+
"external_linkedin_oidc_client_id": external_linkedin_oidc_client_id,
|
2187
|
+
"external_linkedin_oidc_secret": external_linkedin_oidc_secret,
|
2188
|
+
"external_slack_oidc_enabled": external_slack_oidc_enabled,
|
2189
|
+
"external_slack_oidc_client_id": external_slack_oidc_client_id,
|
2190
|
+
"external_slack_oidc_secret": external_slack_oidc_secret,
|
2191
|
+
"external_notion_enabled": external_notion_enabled,
|
2192
|
+
"external_notion_client_id": external_notion_client_id,
|
2193
|
+
"external_notion_secret": external_notion_secret,
|
2194
|
+
"external_slack_enabled": external_slack_enabled,
|
2195
|
+
"external_slack_client_id": external_slack_client_id,
|
2196
|
+
"external_slack_secret": external_slack_secret,
|
2197
|
+
"external_spotify_enabled": external_spotify_enabled,
|
2198
|
+
"external_spotify_client_id": external_spotify_client_id,
|
2199
|
+
"external_spotify_secret": external_spotify_secret,
|
2200
|
+
"external_twitch_enabled": external_twitch_enabled,
|
2201
|
+
"external_twitch_client_id": external_twitch_client_id,
|
2202
|
+
"external_twitch_secret": external_twitch_secret,
|
2203
|
+
"external_twitter_enabled": external_twitter_enabled,
|
2204
|
+
"external_twitter_client_id": external_twitter_client_id,
|
2205
|
+
"external_twitter_secret": external_twitter_secret,
|
2206
|
+
"external_workos_enabled": external_workos_enabled,
|
2207
|
+
"external_workos_client_id": external_workos_client_id,
|
2208
|
+
"external_workos_secret": external_workos_secret,
|
2209
|
+
"external_workos_url": external_workos_url,
|
2210
|
+
"external_zoom_enabled": external_zoom_enabled,
|
2211
|
+
"external_zoom_client_id": external_zoom_client_id,
|
2212
|
+
"external_zoom_secret": external_zoom_secret,
|
2213
|
+
"db_max_pool_size": db_max_pool_size,
|
2214
|
+
"api_max_request_duration": api_max_request_duration,
|
2215
|
+
"mfa_totp_enroll_enabled": mfa_totp_enroll_enabled,
|
2216
|
+
"mfa_totp_verify_enabled": mfa_totp_verify_enabled,
|
2217
|
+
"mfa_web_authn_enroll_enabled": mfa_web_authn_enroll_enabled,
|
2218
|
+
"mfa_web_authn_verify_enabled": mfa_web_authn_verify_enabled,
|
2219
|
+
"mfa_phone_enroll_enabled": mfa_phone_enroll_enabled,
|
2220
|
+
"mfa_phone_verify_enabled": mfa_phone_verify_enabled,
|
2221
|
+
"mfa_phone_max_frequency": mfa_phone_max_frequency,
|
2222
|
+
"mfa_phone_otp_length": mfa_phone_otp_length,
|
2223
|
+
"mfa_phone_template": mfa_phone_template,
|
1944
2224
|
}
|
1945
2225
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1946
2226
|
url = f"{self.base_url}/v1/projects/{ref}/config/auth"
|
@@ -1949,32 +2229,34 @@ class SupabaseApp(APIApplication):
|
|
1949
2229
|
response.raise_for_status()
|
1950
2230
|
return response.json()
|
1951
2231
|
|
1952
|
-
def create_tpafor_project(
|
2232
|
+
def create_tpafor_project(
|
2233
|
+
self, ref, oidc_issuer_url=None, jwks_url=None, custom_jwks=None
|
2234
|
+
) -> dict[str, Any]:
|
1953
2235
|
"""
|
1954
2236
|
Creates a third-party authentication (TPA) configuration for a specific project using provided OIDC or JWKS details.
|
1955
|
-
|
2237
|
+
|
1956
2238
|
Args:
|
1957
2239
|
ref: str. The unique identifier of the project for which to create the third-party auth configuration.
|
1958
2240
|
oidc_issuer_url: str, optional. The OpenID Connect (OIDC) issuer URL for the authentication provider. Defaults to None.
|
1959
2241
|
jwks_url: str, optional. The JSON Web Key Set (JWKS) URL for key verification. Defaults to None.
|
1960
2242
|
custom_jwks: Any, optional. Custom JWKS data to use for authentication. Defaults to None.
|
1961
|
-
|
2243
|
+
|
1962
2244
|
Returns:
|
1963
2245
|
dict[str, Any]: The server response containing details of the created third-party authentication configuration.
|
1964
|
-
|
2246
|
+
|
1965
2247
|
Raises:
|
1966
2248
|
ValueError: If the required parameter 'ref' is missing.
|
1967
2249
|
requests.HTTPError: If the HTTP request fails or the server responds with an error status code.
|
1968
|
-
|
2250
|
+
|
1969
2251
|
Tags:
|
1970
2252
|
create, third-party-auth, project-management, api
|
1971
2253
|
"""
|
1972
2254
|
if ref is None:
|
1973
2255
|
raise ValueError("Missing required parameter 'ref'")
|
1974
2256
|
request_body = {
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
2257
|
+
"oidc_issuer_url": oidc_issuer_url,
|
2258
|
+
"jwks_url": jwks_url,
|
2259
|
+
"custom_jwks": custom_jwks,
|
1978
2260
|
}
|
1979
2261
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
1980
2262
|
url = f"{self.base_url}/v1/projects/{ref}/config/auth/third-party-auth"
|
@@ -1986,17 +2268,17 @@ class SupabaseApp(APIApplication):
|
|
1986
2268
|
def list_tpafor_project(self, ref) -> list[Any]:
|
1987
2269
|
"""
|
1988
2270
|
Retrieves the list of third-party authentication configurations for a specified project.
|
1989
|
-
|
2271
|
+
|
1990
2272
|
Args:
|
1991
2273
|
ref: str. The reference identifier of the project whose third-party authentication configurations are to be listed.
|
1992
|
-
|
2274
|
+
|
1993
2275
|
Returns:
|
1994
2276
|
list[Any]: A list of dictionaries representing the third-party authentication configurations for the given project.
|
1995
|
-
|
2277
|
+
|
1996
2278
|
Raises:
|
1997
2279
|
ValueError: If the 'ref' parameter is None.
|
1998
2280
|
requests.HTTPError: If the HTTP request to the backend service returns an unsuccessful status.
|
1999
|
-
|
2281
|
+
|
2000
2282
|
Tags:
|
2001
2283
|
list, third-party-auth, project-management, api-call
|
2002
2284
|
"""
|
@@ -2011,18 +2293,18 @@ class SupabaseApp(APIApplication):
|
|
2011
2293
|
def delete_tpafor_project(self, ref, tpa_id) -> dict[str, Any]:
|
2012
2294
|
"""
|
2013
2295
|
Deletes a third-party authentication provider configuration for a given project.
|
2014
|
-
|
2296
|
+
|
2015
2297
|
Args:
|
2016
2298
|
ref: str. The project reference or identifier.
|
2017
2299
|
tpa_id: str. The unique identifier of the third-party authentication provider to delete.
|
2018
|
-
|
2300
|
+
|
2019
2301
|
Returns:
|
2020
2302
|
dict. A JSON dictionary containing the API's response to the deletion request.
|
2021
|
-
|
2303
|
+
|
2022
2304
|
Raises:
|
2023
2305
|
ValueError: Raised if 'ref' or 'tpa_id' is None.
|
2024
2306
|
requests.HTTPError: Raised if the HTTP request returns an unsuccessful status code.
|
2025
|
-
|
2307
|
+
|
2026
2308
|
Tags:
|
2027
2309
|
delete, management
|
2028
2310
|
"""
|
@@ -2039,18 +2321,18 @@ class SupabaseApp(APIApplication):
|
|
2039
2321
|
def get_tpafor_project(self, ref, tpa_id) -> dict[str, Any]:
|
2040
2322
|
"""
|
2041
2323
|
Retrieve the third-party authentication configuration for a specific project and TPA identifier.
|
2042
|
-
|
2324
|
+
|
2043
2325
|
Args:
|
2044
2326
|
ref: The unique reference or identifier for the project.
|
2045
2327
|
tpa_id: The identifier of the third-party authentication provider to fetch.
|
2046
|
-
|
2328
|
+
|
2047
2329
|
Returns:
|
2048
2330
|
A dictionary containing the third-party authentication configuration details for the specified project and TPA provider.
|
2049
|
-
|
2331
|
+
|
2050
2332
|
Raises:
|
2051
2333
|
ValueError: Raised if the 'ref' or 'tpa_id' parameters are None.
|
2052
2334
|
HTTPError: Raised if the HTTP request to retrieve the configuration fails with a non-success status code.
|
2053
|
-
|
2335
|
+
|
2054
2336
|
Tags:
|
2055
2337
|
get, fetch, third-party-auth, project, management
|
2056
2338
|
"""
|
@@ -2067,18 +2349,18 @@ class SupabaseApp(APIApplication):
|
|
2067
2349
|
def v1_run_a_query(self, ref, query) -> dict[str, Any]:
|
2068
2350
|
"""
|
2069
2351
|
Executes a database query for a specified project reference using the provided query string.
|
2070
|
-
|
2352
|
+
|
2071
2353
|
Args:
|
2072
2354
|
ref: The unique project reference identifier (str) for which the database query will be executed.
|
2073
2355
|
query: The query string (str) to be executed against the database.
|
2074
|
-
|
2356
|
+
|
2075
2357
|
Returns:
|
2076
2358
|
A dictionary containing the JSON-decoded result of the query response.
|
2077
|
-
|
2359
|
+
|
2078
2360
|
Raises:
|
2079
2361
|
ValueError: If either 'ref' or 'query' is None.
|
2080
2362
|
HTTPError: If the HTTP request to the API fails or returns an error status.
|
2081
|
-
|
2363
|
+
|
2082
2364
|
Tags:
|
2083
2365
|
query, database, api, execute
|
2084
2366
|
"""
|
@@ -2087,7 +2369,7 @@ class SupabaseApp(APIApplication):
|
|
2087
2369
|
if query is None:
|
2088
2370
|
raise ValueError("Missing required parameter 'query'")
|
2089
2371
|
request_body = {
|
2090
|
-
|
2372
|
+
"query": query,
|
2091
2373
|
}
|
2092
2374
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
2093
2375
|
url = f"{self.base_url}/v1/projects/{ref}/database/query"
|
@@ -2099,17 +2381,17 @@ class SupabaseApp(APIApplication):
|
|
2099
2381
|
def v1_enable_database_webhook(self, ref) -> Any:
|
2100
2382
|
"""
|
2101
2383
|
Enables the database webhook for the specified project reference.
|
2102
|
-
|
2384
|
+
|
2103
2385
|
Args:
|
2104
2386
|
ref: The unique identifier of the project for which to enable the database webhook.
|
2105
|
-
|
2387
|
+
|
2106
2388
|
Returns:
|
2107
2389
|
A dictionary containing the JSON response from the server after enabling the database webhook.
|
2108
|
-
|
2390
|
+
|
2109
2391
|
Raises:
|
2110
2392
|
ValueError: Raised if the 'ref' parameter is None.
|
2111
2393
|
requests.exceptions.HTTPError: Raised if the HTTP request to enable the database webhook fails.
|
2112
|
-
|
2394
|
+
|
2113
2395
|
Tags:
|
2114
2396
|
enable, webhook, database, api, async_job
|
2115
2397
|
"""
|
@@ -2124,17 +2406,17 @@ class SupabaseApp(APIApplication):
|
|
2124
2406
|
def v1_list_all_functions(self, ref) -> list[Any]:
|
2125
2407
|
"""
|
2126
2408
|
Lists all available functions for the specified project reference.
|
2127
|
-
|
2409
|
+
|
2128
2410
|
Args:
|
2129
2411
|
ref: The unique identifier or reference string for the project whose functions should be listed.
|
2130
|
-
|
2412
|
+
|
2131
2413
|
Returns:
|
2132
2414
|
A list containing information about each available function in the specified project.
|
2133
|
-
|
2415
|
+
|
2134
2416
|
Raises:
|
2135
2417
|
ValueError: Raised if the required 'ref' parameter is None.
|
2136
2418
|
requests.HTTPError: Raised if the HTTP request to the backend API fails or returns an error status.
|
2137
|
-
|
2419
|
+
|
2138
2420
|
Tags:
|
2139
2421
|
list, functions, api, management
|
2140
2422
|
"""
|
@@ -2149,18 +2431,18 @@ class SupabaseApp(APIApplication):
|
|
2149
2431
|
def v1_get_a_function(self, ref, function_slug) -> dict[str, Any]:
|
2150
2432
|
"""
|
2151
2433
|
Retrieves detailed information about a specific function from a project using the function's reference and slug.
|
2152
|
-
|
2434
|
+
|
2153
2435
|
Args:
|
2154
2436
|
ref: str. The unique reference ID of the project.
|
2155
2437
|
function_slug: str. The slug identifier of the function to retrieve.
|
2156
|
-
|
2438
|
+
|
2157
2439
|
Returns:
|
2158
2440
|
dict. A dictionary containing the JSON response with the function's details.
|
2159
|
-
|
2441
|
+
|
2160
2442
|
Raises:
|
2161
2443
|
ValueError: Raised if either 'ref' or 'function_slug' is None.
|
2162
2444
|
requests.HTTPError: Raised if the underlying HTTP request returned an unsuccessful status code.
|
2163
|
-
|
2445
|
+
|
2164
2446
|
Tags:
|
2165
2447
|
get, function, ai, management
|
2166
2448
|
"""
|
@@ -2174,10 +2456,21 @@ class SupabaseApp(APIApplication):
|
|
2174
2456
|
response.raise_for_status()
|
2175
2457
|
return response.json()
|
2176
2458
|
|
2177
|
-
def v1_update_a_function(
|
2459
|
+
def v1_update_a_function(
|
2460
|
+
self,
|
2461
|
+
ref,
|
2462
|
+
function_slug,
|
2463
|
+
slug=None,
|
2464
|
+
name=None,
|
2465
|
+
verify_jwt=None,
|
2466
|
+
import_map=None,
|
2467
|
+
entrypoint_path=None,
|
2468
|
+
import_map_path=None,
|
2469
|
+
body=None,
|
2470
|
+
) -> dict[str, Any]:
|
2178
2471
|
"""
|
2179
2472
|
Updates the configuration or code for an existing function in the specified project.
|
2180
|
-
|
2473
|
+
|
2181
2474
|
Args:
|
2182
2475
|
ref: str. The reference ID of the project containing the function.
|
2183
2476
|
function_slug: str. The unique identifier (slug) for the function to update.
|
@@ -2188,14 +2481,14 @@ class SupabaseApp(APIApplication):
|
|
2188
2481
|
entrypoint_path: Optional[str]. Path to the function's entrypoint within the project.
|
2189
2482
|
import_map_path: Optional[str]. Path to the import map file.
|
2190
2483
|
body: Optional[str]. The updated function code or body.
|
2191
|
-
|
2484
|
+
|
2192
2485
|
Returns:
|
2193
2486
|
dict[str, Any]: A dictionary containing the updated function's metadata and settings as returned by the API.
|
2194
|
-
|
2487
|
+
|
2195
2488
|
Raises:
|
2196
2489
|
ValueError: If either 'ref' or 'function_slug' is not provided.
|
2197
2490
|
requests.HTTPError: If the API request fails with an HTTP error status.
|
2198
|
-
|
2491
|
+
|
2199
2492
|
Tags:
|
2200
2493
|
update, function-management, api, patch
|
2201
2494
|
"""
|
@@ -2204,13 +2497,24 @@ class SupabaseApp(APIApplication):
|
|
2204
2497
|
if function_slug is None:
|
2205
2498
|
raise ValueError("Missing required parameter 'function_slug'")
|
2206
2499
|
request_body = {
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2500
|
+
"name": name,
|
2501
|
+
"body": body,
|
2502
|
+
"verify_jwt": verify_jwt,
|
2210
2503
|
}
|
2211
2504
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
2212
2505
|
url = f"{self.base_url}/v1/projects/{ref}/functions/{function_slug}"
|
2213
|
-
query_params = {
|
2506
|
+
query_params = {
|
2507
|
+
k: v
|
2508
|
+
for k, v in [
|
2509
|
+
("slug", slug),
|
2510
|
+
("name", name),
|
2511
|
+
("verify_jwt", verify_jwt),
|
2512
|
+
("import_map", import_map),
|
2513
|
+
("entrypoint_path", entrypoint_path),
|
2514
|
+
("import_map_path", import_map_path),
|
2515
|
+
]
|
2516
|
+
if v is not None
|
2517
|
+
}
|
2214
2518
|
response = self._patch(url, data=request_body, params=query_params)
|
2215
2519
|
response.raise_for_status()
|
2216
2520
|
return response.json()
|
@@ -2218,18 +2522,18 @@ class SupabaseApp(APIApplication):
|
|
2218
2522
|
def v1_delete_a_function(self, ref, function_slug) -> Any:
|
2219
2523
|
"""
|
2220
2524
|
Deletes a specified function from a project using its reference and function slug.
|
2221
|
-
|
2525
|
+
|
2222
2526
|
Args:
|
2223
2527
|
ref: The unique identifier or reference for the project containing the function.
|
2224
2528
|
function_slug: The unique slug or identifier of the function to delete.
|
2225
|
-
|
2529
|
+
|
2226
2530
|
Returns:
|
2227
2531
|
The JSON-decoded response from the API after attempting to delete the function.
|
2228
|
-
|
2532
|
+
|
2229
2533
|
Raises:
|
2230
2534
|
ValueError: Raised if either 'ref' or 'function_slug' is None.
|
2231
2535
|
HTTPError: Raised if the HTTP request to delete the function fails (non-2xx status code).
|
2232
|
-
|
2536
|
+
|
2233
2537
|
Tags:
|
2234
2538
|
delete, function-management, api
|
2235
2539
|
"""
|
@@ -2246,18 +2550,18 @@ class SupabaseApp(APIApplication):
|
|
2246
2550
|
def v1_get_a_function_body(self, ref, function_slug) -> Any:
|
2247
2551
|
"""
|
2248
2552
|
Retrieves the body of a specified function from a project via a REST API call.
|
2249
|
-
|
2553
|
+
|
2250
2554
|
Args:
|
2251
2555
|
ref: The unique identifier (string) of the project containing the function.
|
2252
2556
|
function_slug: The unique slug (string) identifying the function whose body is to be retrieved.
|
2253
|
-
|
2557
|
+
|
2254
2558
|
Returns:
|
2255
2559
|
A dictionary (parsed JSON) containing the function body and related metadata.
|
2256
|
-
|
2560
|
+
|
2257
2561
|
Raises:
|
2258
2562
|
ValueError: If 'ref' or 'function_slug' is not provided.
|
2259
2563
|
HTTPError: If the HTTP request to retrieve the function body fails due to a non-success response.
|
2260
|
-
|
2564
|
+
|
2261
2565
|
Tags:
|
2262
2566
|
get, function-body, api, async-job
|
2263
2567
|
"""
|
@@ -2274,17 +2578,17 @@ class SupabaseApp(APIApplication):
|
|
2274
2578
|
def v1_list_all_buckets(self, ref) -> list[Any]:
|
2275
2579
|
"""
|
2276
2580
|
Retrieves a list of all storage buckets for the specified project reference.
|
2277
|
-
|
2581
|
+
|
2278
2582
|
Args:
|
2279
2583
|
ref: The identifier of the project for which to list storage buckets. Must not be None.
|
2280
|
-
|
2584
|
+
|
2281
2585
|
Returns:
|
2282
2586
|
A list containing information about each storage bucket associated with the project.
|
2283
|
-
|
2587
|
+
|
2284
2588
|
Raises:
|
2285
2589
|
ValueError: Raised if the 'ref' parameter is None.
|
2286
2590
|
requests.HTTPError: Raised if the HTTP request to the storage buckets endpoint returns an unsuccessful status.
|
2287
|
-
|
2591
|
+
|
2288
2592
|
Tags:
|
2289
2593
|
list, buckets, storage, project, sync
|
2290
2594
|
"""
|
@@ -2296,10 +2600,18 @@ class SupabaseApp(APIApplication):
|
|
2296
2600
|
response.raise_for_status()
|
2297
2601
|
return response.json()
|
2298
2602
|
|
2299
|
-
def v1_create_a_sso_provider(
|
2603
|
+
def v1_create_a_sso_provider(
|
2604
|
+
self,
|
2605
|
+
ref,
|
2606
|
+
type,
|
2607
|
+
metadata_xml=None,
|
2608
|
+
metadata_url=None,
|
2609
|
+
domains=None,
|
2610
|
+
attribute_mapping=None,
|
2611
|
+
) -> dict[str, Any]:
|
2300
2612
|
"""
|
2301
2613
|
Creates a new Single Sign-On (SSO) provider configuration for the specified project.
|
2302
|
-
|
2614
|
+
|
2303
2615
|
Args:
|
2304
2616
|
ref: str. Unique reference or ID of the project where the SSO provider will be added.
|
2305
2617
|
type: str. The type of SSO provider (e.g., 'saml', 'oidc'). Required.
|
@@ -2307,14 +2619,14 @@ class SupabaseApp(APIApplication):
|
|
2307
2619
|
metadata_url: Optional[str]. URL pointing to the SSO provider's metadata. Used as an alternative to 'metadata_xml.'
|
2308
2620
|
domains: Optional[list[str]]. List of domains associated with this SSO provider.
|
2309
2621
|
attribute_mapping: Optional[dict[str, str]]. Mapping of user attributes from the SSO provider to internal fields.
|
2310
|
-
|
2622
|
+
|
2311
2623
|
Returns:
|
2312
2624
|
dict[str, Any]: JSON response containing details of the newly created SSO provider configuration.
|
2313
|
-
|
2625
|
+
|
2314
2626
|
Raises:
|
2315
2627
|
ValueError: If either 'ref' or 'type' is missing or None.
|
2316
2628
|
requests.exceptions.HTTPError: If the API request fails or returns an unsuccessful status.
|
2317
|
-
|
2629
|
+
|
2318
2630
|
Tags:
|
2319
2631
|
create, sso, provider, management, auth
|
2320
2632
|
"""
|
@@ -2323,11 +2635,11 @@ class SupabaseApp(APIApplication):
|
|
2323
2635
|
if type is None:
|
2324
2636
|
raise ValueError("Missing required parameter 'type'")
|
2325
2637
|
request_body = {
|
2326
|
-
|
2327
|
-
|
2328
|
-
|
2329
|
-
|
2330
|
-
|
2638
|
+
"type": type,
|
2639
|
+
"metadata_xml": metadata_xml,
|
2640
|
+
"metadata_url": metadata_url,
|
2641
|
+
"domains": domains,
|
2642
|
+
"attribute_mapping": attribute_mapping,
|
2331
2643
|
}
|
2332
2644
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
2333
2645
|
url = f"{self.base_url}/v1/projects/{ref}/config/auth/sso/providers"
|
@@ -2339,17 +2651,17 @@ class SupabaseApp(APIApplication):
|
|
2339
2651
|
def v1_list_all_sso_provider(self, ref) -> dict[str, Any]:
|
2340
2652
|
"""
|
2341
2653
|
Retrieves a list of all SSO providers configured for the specified project.
|
2342
|
-
|
2654
|
+
|
2343
2655
|
Args:
|
2344
2656
|
ref: str. The project reference identifier for which to list SSO providers.
|
2345
|
-
|
2657
|
+
|
2346
2658
|
Returns:
|
2347
2659
|
dict. A dictionary containing the SSO provider configuration details for the project.
|
2348
|
-
|
2660
|
+
|
2349
2661
|
Raises:
|
2350
2662
|
ValueError: If the 'ref' parameter is None.
|
2351
2663
|
requests.HTTPError: If the HTTP request to the backend fails.
|
2352
|
-
|
2664
|
+
|
2353
2665
|
Tags:
|
2354
2666
|
list, sso, providers, management, api
|
2355
2667
|
"""
|
@@ -2364,18 +2676,18 @@ class SupabaseApp(APIApplication):
|
|
2364
2676
|
def v1_get_a_sso_provider(self, ref, provider_id) -> dict[str, Any]:
|
2365
2677
|
"""
|
2366
2678
|
Retrieves details of a specific SSO provider configuration for the given project reference and provider ID.
|
2367
|
-
|
2679
|
+
|
2368
2680
|
Args:
|
2369
2681
|
ref: str. The unique reference identifier for the project.
|
2370
2682
|
provider_id: str. The identifier of the SSO provider to retrieve.
|
2371
|
-
|
2683
|
+
|
2372
2684
|
Returns:
|
2373
2685
|
dict[str, Any]: A dictionary containing the configuration details of the specified SSO provider.
|
2374
|
-
|
2686
|
+
|
2375
2687
|
Raises:
|
2376
2688
|
ValueError: Raised if 'ref' or 'provider_id' is None.
|
2377
2689
|
requests.HTTPError: Raised if the HTTP request to fetch the SSO provider details fails.
|
2378
|
-
|
2690
|
+
|
2379
2691
|
Tags:
|
2380
2692
|
get, sso-provider, configuration, management
|
2381
2693
|
"""
|
@@ -2383,16 +2695,26 @@ class SupabaseApp(APIApplication):
|
|
2383
2695
|
raise ValueError("Missing required parameter 'ref'")
|
2384
2696
|
if provider_id is None:
|
2385
2697
|
raise ValueError("Missing required parameter 'provider_id'")
|
2386
|
-
url =
|
2698
|
+
url = (
|
2699
|
+
f"{self.base_url}/v1/projects/{ref}/config/auth/sso/providers/{provider_id}"
|
2700
|
+
)
|
2387
2701
|
query_params = {}
|
2388
2702
|
response = self._get(url, params=query_params)
|
2389
2703
|
response.raise_for_status()
|
2390
2704
|
return response.json()
|
2391
2705
|
|
2392
|
-
def v1_update_a_sso_provider(
|
2706
|
+
def v1_update_a_sso_provider(
|
2707
|
+
self,
|
2708
|
+
ref,
|
2709
|
+
provider_id,
|
2710
|
+
metadata_xml=None,
|
2711
|
+
metadata_url=None,
|
2712
|
+
domains=None,
|
2713
|
+
attribute_mapping=None,
|
2714
|
+
) -> dict[str, Any]:
|
2393
2715
|
"""
|
2394
2716
|
Updates the configuration of an existing SSO provider using the provided metadata and attributes.
|
2395
|
-
|
2717
|
+
|
2396
2718
|
Args:
|
2397
2719
|
ref: str. Unique reference identifier for the project whose SSO provider configuration is being updated.
|
2398
2720
|
provider_id: str. Identifier of the SSO provider to update.
|
@@ -2400,14 +2722,14 @@ class SupabaseApp(APIApplication):
|
|
2400
2722
|
metadata_url: str or None. Optional URL pointing to the metadata XML for the SSO provider.
|
2401
2723
|
domains: list[str] or None. Optional list of domains associated with the SSO provider.
|
2402
2724
|
attribute_mapping: dict or None. Optional mapping of SSO attributes to application-specific fields.
|
2403
|
-
|
2725
|
+
|
2404
2726
|
Returns:
|
2405
2727
|
dict. JSON response containing details of the updated SSO provider configuration.
|
2406
|
-
|
2728
|
+
|
2407
2729
|
Raises:
|
2408
2730
|
ValueError: If either 'ref' or 'provider_id' is not provided.
|
2409
2731
|
requests.HTTPError: If the HTTP request to update the SSO provider fails (e.g., server returns an error status).
|
2410
|
-
|
2732
|
+
|
2411
2733
|
Tags:
|
2412
2734
|
update, sso, provider-management, auth, v1
|
2413
2735
|
"""
|
@@ -2416,13 +2738,15 @@ class SupabaseApp(APIApplication):
|
|
2416
2738
|
if provider_id is None:
|
2417
2739
|
raise ValueError("Missing required parameter 'provider_id'")
|
2418
2740
|
request_body = {
|
2419
|
-
|
2420
|
-
|
2421
|
-
|
2422
|
-
|
2741
|
+
"metadata_xml": metadata_xml,
|
2742
|
+
"metadata_url": metadata_url,
|
2743
|
+
"domains": domains,
|
2744
|
+
"attribute_mapping": attribute_mapping,
|
2423
2745
|
}
|
2424
2746
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
2425
|
-
url =
|
2747
|
+
url = (
|
2748
|
+
f"{self.base_url}/v1/projects/{ref}/config/auth/sso/providers/{provider_id}"
|
2749
|
+
)
|
2426
2750
|
query_params = {}
|
2427
2751
|
response = self._put(url, data=request_body, params=query_params)
|
2428
2752
|
response.raise_for_status()
|
@@ -2431,18 +2755,18 @@ class SupabaseApp(APIApplication):
|
|
2431
2755
|
def v1_delete_a_sso_provider(self, ref, provider_id) -> dict[str, Any]:
|
2432
2756
|
"""
|
2433
2757
|
Deletes a specified SSO provider from the given project configuration.
|
2434
|
-
|
2758
|
+
|
2435
2759
|
Args:
|
2436
2760
|
ref: str. Unique identifier of the project containing the SSO provider.
|
2437
2761
|
provider_id: str. Unique identifier of the SSO provider to be deleted.
|
2438
|
-
|
2762
|
+
|
2439
2763
|
Returns:
|
2440
2764
|
dict. JSON response from the server indicating the outcome of the delete operation.
|
2441
|
-
|
2765
|
+
|
2442
2766
|
Raises:
|
2443
2767
|
ValueError: If 'ref' or 'provider_id' is None.
|
2444
2768
|
requests.HTTPError: If the HTTP request to delete the provider fails.
|
2445
|
-
|
2769
|
+
|
2446
2770
|
Tags:
|
2447
2771
|
delete, sso-provider, management
|
2448
2772
|
"""
|
@@ -2450,7 +2774,9 @@ class SupabaseApp(APIApplication):
|
|
2450
2774
|
raise ValueError("Missing required parameter 'ref'")
|
2451
2775
|
if provider_id is None:
|
2452
2776
|
raise ValueError("Missing required parameter 'provider_id'")
|
2453
|
-
url =
|
2777
|
+
url = (
|
2778
|
+
f"{self.base_url}/v1/projects/{ref}/config/auth/sso/providers/{provider_id}"
|
2779
|
+
)
|
2454
2780
|
query_params = {}
|
2455
2781
|
response = self._delete(url, params=query_params)
|
2456
2782
|
response.raise_for_status()
|
@@ -2459,17 +2785,17 @@ class SupabaseApp(APIApplication):
|
|
2459
2785
|
def v1_list_all_backups(self, ref) -> dict[str, Any]:
|
2460
2786
|
"""
|
2461
2787
|
Retrieves a list of all database backups for the specified project reference.
|
2462
|
-
|
2788
|
+
|
2463
2789
|
Args:
|
2464
2790
|
ref: str. The unique project reference identifier used to specify the target project for which to list all database backups.
|
2465
|
-
|
2791
|
+
|
2466
2792
|
Returns:
|
2467
2793
|
dict[str, Any]: A dictionary containing details of all database backups for the specified project.
|
2468
|
-
|
2794
|
+
|
2469
2795
|
Raises:
|
2470
2796
|
ValueError: If 'ref' is None.
|
2471
2797
|
requests.HTTPError: If the HTTP request to retrieve backups fails.
|
2472
|
-
|
2798
|
+
|
2473
2799
|
Tags:
|
2474
2800
|
list, backups, database, sync, management
|
2475
2801
|
"""
|
@@ -2484,18 +2810,18 @@ class SupabaseApp(APIApplication):
|
|
2484
2810
|
def v1_restore_pitr_backup(self, ref, recovery_time_target_unix) -> Any:
|
2485
2811
|
"""
|
2486
2812
|
Initiates a point-in-time restore operation for a database backup using the specified reference and recovery time target.
|
2487
|
-
|
2813
|
+
|
2488
2814
|
Args:
|
2489
2815
|
ref: str. The reference identifier of the project whose database backup should be restored.
|
2490
2816
|
recovery_time_target_unix: int. The Unix timestamp representing the target point in time to which the database should be restored.
|
2491
|
-
|
2817
|
+
|
2492
2818
|
Returns:
|
2493
2819
|
dict. The JSON-decoded response containing details about the point-in-time restore operation.
|
2494
|
-
|
2820
|
+
|
2495
2821
|
Raises:
|
2496
2822
|
ValueError: If 'ref' or 'recovery_time_target_unix' is None.
|
2497
2823
|
requests.HTTPError: If the HTTP request to initiate the restore fails or returns an error status.
|
2498
|
-
|
2824
|
+
|
2499
2825
|
Tags:
|
2500
2826
|
restore, backup, database, pitr, async-job, ai
|
2501
2827
|
"""
|
@@ -2504,7 +2830,7 @@ class SupabaseApp(APIApplication):
|
|
2504
2830
|
if recovery_time_target_unix is None:
|
2505
2831
|
raise ValueError("Missing required parameter 'recovery_time_target_unix'")
|
2506
2832
|
request_body = {
|
2507
|
-
|
2833
|
+
"recovery_time_target_unix": recovery_time_target_unix,
|
2508
2834
|
}
|
2509
2835
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
2510
2836
|
url = f"{self.base_url}/v1/projects/{ref}/database/backups/restore-pitr"
|
@@ -2516,17 +2842,17 @@ class SupabaseApp(APIApplication):
|
|
2516
2842
|
def v1_list_organization_members(self, slug) -> list[Any]:
|
2517
2843
|
"""
|
2518
2844
|
Retrieves a list of members associated with the specified organization slug via the v1 API.
|
2519
|
-
|
2845
|
+
|
2520
2846
|
Args:
|
2521
2847
|
slug: str. The unique identifier (slug) of the organization whose members are to be listed.
|
2522
|
-
|
2848
|
+
|
2523
2849
|
Returns:
|
2524
2850
|
list[Any]: A list containing the JSON-parsed member data for the specified organization.
|
2525
|
-
|
2851
|
+
|
2526
2852
|
Raises:
|
2527
2853
|
ValueError: Raised if the 'slug' parameter is None.
|
2528
2854
|
requests.HTTPError: Raised if the HTTP request to the API endpoint returns an error status.
|
2529
|
-
|
2855
|
+
|
2530
2856
|
Tags:
|
2531
2857
|
list, organization, members, api
|
2532
2858
|
"""
|
@@ -2541,17 +2867,17 @@ class SupabaseApp(APIApplication):
|
|
2541
2867
|
def v1_get_an_organization(self, slug) -> dict[str, Any]:
|
2542
2868
|
"""
|
2543
2869
|
Retrieves details of a specific organization by its unique slug identifier.
|
2544
|
-
|
2870
|
+
|
2545
2871
|
Args:
|
2546
2872
|
slug: str. The unique slug identifier for the organization to retrieve.
|
2547
|
-
|
2873
|
+
|
2548
2874
|
Returns:
|
2549
2875
|
dict[str, Any]: A dictionary containing the organization's details as returned by the API.
|
2550
|
-
|
2876
|
+
|
2551
2877
|
Raises:
|
2552
2878
|
ValueError: If the 'slug' parameter is None.
|
2553
2879
|
requests.HTTPError: If the HTTP request to the API fails or the server returns an error response.
|
2554
|
-
|
2880
|
+
|
2555
2881
|
Tags:
|
2556
2882
|
get, organization, api
|
2557
2883
|
"""
|
@@ -2640,5 +2966,5 @@ class SupabaseApp(APIApplication):
|
|
2640
2966
|
self.v1_list_all_backups,
|
2641
2967
|
self.v1_restore_pitr_backup,
|
2642
2968
|
self.v1_list_organization_members,
|
2643
|
-
self.v1_get_an_organization
|
2969
|
+
self.v1_get_an_organization,
|
2644
2970
|
]
|