@@ -124,6 +124,98 @@ export const startMigration = (variables: StartMigrationVariables, signal?: Abor
124124 signal
125125 } ) ;
126126
127+ export type CompleteMigrationPathParams = {
128+ /**
129+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
130+ */
131+ dbBranchName : Schemas . DBBranchName ;
132+ workspace : string ;
133+ region : string ;
134+ } ;
135+
136+ export type CompleteMigrationError = Fetcher . ErrorWrapper <
137+ | {
138+ status : 400 ;
139+ payload : Responses . BadRequestError ;
140+ }
141+ | {
142+ status : 401 ;
143+ payload : Responses . AuthError ;
144+ }
145+ | {
146+ status : 404 ;
147+ payload : Responses . SimpleError ;
148+ }
149+ > ;
150+
151+ export type CompleteMigrationVariables = {
152+ pathParams : CompleteMigrationPathParams ;
153+ } & DataPlaneFetcherExtraProps ;
154+
155+ /**
156+ * Complete an active migration on the specified database
157+ */
158+ export const completeMigration = ( variables : CompleteMigrationVariables , signal ?: AbortSignal ) =>
159+ dataPlaneFetch <
160+ Schemas . CompleteMigrationResponse ,
161+ CompleteMigrationError ,
162+ undefined ,
163+ { } ,
164+ { } ,
165+ CompleteMigrationPathParams
166+ > ( {
167+ url : '/db/{dbBranchName}/migrations/complete' ,
168+ method : 'post' ,
169+ ...variables ,
170+ signal
171+ } ) ;
172+
173+ export type RollbackMigrationPathParams = {
174+ /**
175+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
176+ */
177+ dbBranchName : Schemas . DBBranchName ;
178+ workspace : string ;
179+ region : string ;
180+ } ;
181+
182+ export type RollbackMigrationError = Fetcher . ErrorWrapper <
183+ | {
184+ status : 400 ;
185+ payload : Responses . BadRequestError ;
186+ }
187+ | {
188+ status : 401 ;
189+ payload : Responses . AuthError ;
190+ }
191+ | {
192+ status : 404 ;
193+ payload : Responses . SimpleError ;
194+ }
195+ > ;
196+
197+ export type RollbackMigrationVariables = {
198+ pathParams : RollbackMigrationPathParams ;
199+ } & DataPlaneFetcherExtraProps ;
200+
201+ /**
202+ * Roll back an active migration on the specified database
203+ */
204+ export const rollbackMigration = ( variables : RollbackMigrationVariables , signal ?: AbortSignal ) =>
205+ dataPlaneFetch <
206+ Schemas . RollbackMigrationResponse ,
207+ RollbackMigrationError ,
208+ undefined ,
209+ { } ,
210+ { } ,
211+ RollbackMigrationPathParams
212+ > ( {
213+ url : '/db/{dbBranchName}/migrations/rollback' ,
214+ method : 'post' ,
215+ ...variables ,
216+ signal
217+ } ) ;
218+
127219export type AdaptTablePathParams = {
128220 /**
129221 * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
@@ -305,6 +397,17 @@ export type GetMigrationHistoryPathParams = {
305397 region : string ;
306398} ;
307399
400+ export type GetMigrationHistoryQueryParams = {
401+ /**
402+ * @format date-time
403+ */
404+ cursor ?: string ;
405+ /**
406+ * Page size
407+ */
408+ limit ?: Schemas . PaginationPageSize ;
409+ } ;
410+
308411export type GetMigrationHistoryError = Fetcher . ErrorWrapper <
309412 | {
310413 status : 400 ;
@@ -322,6 +425,7 @@ export type GetMigrationHistoryError = Fetcher.ErrorWrapper<
322425
323426export type GetMigrationHistoryVariables = {
324427 pathParams : GetMigrationHistoryPathParams ;
428+ queryParams ?: GetMigrationHistoryQueryParams ;
325429} & DataPlaneFetcherExtraProps ;
326430
327431export const getMigrationHistory = ( variables : GetMigrationHistoryVariables , signal ?: AbortSignal ) =>
@@ -330,7 +434,7 @@ export const getMigrationHistory = (variables: GetMigrationHistoryVariables, sig
330434 GetMigrationHistoryError ,
331435 undefined ,
332436 { } ,
333- { } ,
437+ GetMigrationHistoryQueryParams ,
334438 GetMigrationHistoryPathParams
335439 > ( {
336440 url : '/db/{dbBranchName}/migrations/history' ,
@@ -5049,6 +5153,8 @@ export const operationsByTag = {
50495153 migrations : {
50505154 applyMigration,
50515155 startMigration,
5156+ completeMigration,
5157+ rollbackMigration,
50525158 adaptTable,
50535159 adaptAllTables,
50545160 getBranchMigrationJobStatus,
0 commit comments