@@ -29,6 +29,7 @@ import {
2929 type DebuggingOperations ,
3030 type DeployEdgeFunctionOptions ,
3131 type DevelopmentOperations ,
32+ type SuccessResponse ,
3233 type EdgeFunction ,
3334 type EdgeFunctionsOperations ,
3435 type EdgeFunctionWithBody ,
@@ -42,6 +43,8 @@ import {
4243
4344const { version } = packageJson ;
4445
46+ const SUCCESS_RESPONSE : SuccessResponse = { success : true } ;
47+
4548export type SupabaseApiPlatformOptions = {
4649 /**
4750 * The access token for the Supabase Management API.
@@ -148,6 +151,8 @@ export function createSupabaseApiPlatform(
148151 ) ;
149152
150153 assertSuccess ( response , 'Failed to pause project' ) ;
154+
155+ return SUCCESS_RESPONSE ;
151156 } ,
152157 async restoreProject ( projectId : string ) {
153158 const response = await managementApiClient . POST (
@@ -162,6 +167,8 @@ export function createSupabaseApiPlatform(
162167 ) ;
163168
164169 assertSuccess ( response , 'Failed to restore project' ) ;
170+
171+ return SUCCESS_RESPONSE ;
165172 } ,
166173 } ;
167174
@@ -229,6 +236,7 @@ export function createSupabaseApiPlatform(
229236 // Intentionally don't return the result of the migration
230237 // to avoid prompt injection attacks. If the migration failed,
231238 // it will throw an error.
239+ return SUCCESS_RESPONSE ;
232240 } ,
233241 } ;
234242
@@ -612,6 +620,8 @@ export function createSupabaseApiPlatform(
612620 ) ;
613621
614622 assertSuccess ( response , 'Failed to delete branch' ) ;
623+
624+ return SUCCESS_RESPONSE ;
615625 } ,
616626 async mergeBranch ( branchId : string ) {
617627 const response = await managementApiClient . POST (
@@ -627,6 +637,8 @@ export function createSupabaseApiPlatform(
627637 ) ;
628638
629639 assertSuccess ( response , 'Failed to merge branch' ) ;
640+
641+ return SUCCESS_RESPONSE ;
630642 } ,
631643 async resetBranch ( branchId : string , options : ResetBranchOptions ) {
632644 const { migration_version } = resetBranchOptionsSchema . parse ( options ) ;
@@ -646,6 +658,8 @@ export function createSupabaseApiPlatform(
646658 ) ;
647659
648660 assertSuccess ( response , 'Failed to reset branch' ) ;
661+
662+ return SUCCESS_RESPONSE ;
649663 } ,
650664 async rebaseBranch ( branchId : string ) {
651665 const response = await managementApiClient . POST (
@@ -661,6 +675,8 @@ export function createSupabaseApiPlatform(
661675 ) ;
662676
663677 assertSuccess ( response , 'Failed to rebase branch' ) ;
678+
679+ return SUCCESS_RESPONSE ;
664680 } ,
665681 } ;
666682
@@ -725,7 +741,7 @@ export function createSupabaseApiPlatform(
725741
726742 assertSuccess ( response , 'Failed to update storage config' ) ;
727743
728- return response . data ;
744+ return SUCCESS_RESPONSE ;
729745 } ,
730746 } ;
731747
0 commit comments