@@ -15,7 +15,9 @@ export class SupabaseManagementAPIError extends Error {
1515 }
1616}
1717
18- export function isSupabaseError ( error : unknown ) : error is SupabaseManagementAPIError {
18+ export function isSupabaseError (
19+ error : unknown ,
20+ ) : error is SupabaseManagementAPIError {
1921 return error instanceof SupabaseManagementAPIError ;
2022}
2123
@@ -38,7 +40,7 @@ export class SupabaseManagementAPI {
3840 if ( error ) {
3941 throw new SupabaseManagementAPIError (
4042 `Failed to get projects: ${ response . statusText } ` ,
41- response
43+ response ,
4244 ) ;
4345 }
4446 return data ;
@@ -51,50 +53,50 @@ export class SupabaseManagementAPI {
5153 body : {
5254 query,
5355 } ,
54- }
56+ } ,
5557 ) ;
5658 if ( error ) {
5759 throw new SupabaseManagementAPIError (
5860 `Failed to run query: ${ response . statusText } ` ,
59- response
61+ response ,
6062 ) ;
6163 }
6264 return data ;
6365 }
6466
6567 async deleteFunction ( projectId : string , functionName : string ) {
6668 const { error, response } = await this . client . delete (
67- `/v1/projects/${ projectId } /functions/${ functionName } `
69+ `/v1/projects/${ projectId } /functions/${ functionName } ` ,
6870 ) ;
6971 if ( error ) {
7072 throw new SupabaseManagementAPIError (
7173 `Failed to delete function: ${ response . statusText } ` ,
72- response
74+ response ,
7375 ) ;
7476 }
7577 }
7678
7779 async getProjectApiKeys ( projectId : string ) {
7880 const { data, error, response } = await this . client . get (
79- `/v1/projects/${ projectId } /api-keys`
81+ `/v1/projects/${ projectId } /api-keys` ,
8082 ) ;
8183 if ( error ) {
8284 throw new SupabaseManagementAPIError (
8385 `Failed to get project API keys: ${ response . statusText } ` ,
84- response
86+ response ,
8587 ) ;
8688 }
8789 return data ;
8890 }
8991
9092 async getSecrets ( projectId : string ) {
9193 const { data, error, response } = await this . client . get (
92- `/v1/projects/${ projectId } /secrets`
94+ `/v1/projects/${ projectId } /secrets` ,
9395 ) ;
9496 if ( error ) {
9597 throw new SupabaseManagementAPIError (
9698 `Failed to get secrets: ${ response . statusText } ` ,
97- response
99+ response ,
98100 ) ;
99101 }
100102 return data ;
0 commit comments