Skip to content

Commit 8e328bc

Browse files
committed
feat: update generated APIs
1 parent 184f780 commit 8e328bc

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

packages_generated/webhosting/src/v1/api.gen.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
unmarshalHosting,
3434
marshalHostingApiAddCustomDomainRequest,
3535
marshalHostingApiCreateHostingRequest,
36+
marshalHostingApiMigrateControlPanelRequest,
3637
marshalHostingApiRemoveCustomDomainRequest,
3738
marshalHostingApiUpdateHostingRequest,
3839
unmarshalHostingSummary,
@@ -109,6 +110,7 @@ import type {
109110
HostingApiGetHostingRequest,
110111
HostingApiGetResourceSummaryRequest,
111112
HostingApiListHostingsRequest,
113+
HostingApiMigrateControlPanelRequest,
112114
HostingApiRemoveCustomDomainRequest,
113115
HostingApiResetHostingPasswordRequest,
114116
HostingApiUpdateHostingRequest,
@@ -1007,6 +1009,26 @@ export class HostingAPI extends ParentAPI {
10071009
)
10081010

10091011

1012+
/**
1013+
* Migrate a hosting to a new control panel.. Migrate a hosting to a new control panel.
1014+
*
1015+
* @param request - The request {@link HostingApiMigrateControlPanelRequest}
1016+
* @returns A Promise of HostingSummary
1017+
*/
1018+
migrateControlPanel = (request: Readonly<HostingApiMigrateControlPanelRequest>) =>
1019+
this.client.fetch<HostingSummary>(
1020+
{
1021+
body: JSON.stringify(
1022+
marshalHostingApiMigrateControlPanelRequest(request, this.client.settings),
1023+
),
1024+
headers: jsonContentHeaders,
1025+
method: 'POST',
1026+
path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam('hostingId', request.hostingId)}/migrate-control-panel`,
1027+
},
1028+
unmarshalHostingSummary,
1029+
)
1030+
1031+
10101032
}
10111033

10121034
/**

packages_generated/webhosting/src/v1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export type {
8282
HostingApiGetHostingRequest,
8383
HostingApiGetResourceSummaryRequest,
8484
HostingApiListHostingsRequest,
85+
HostingApiMigrateControlPanelRequest,
8586
HostingApiRemoveCustomDomainRequest,
8687
HostingApiResetHostingPasswordRequest,
8788
HostingApiUpdateHostingRequest,

packages_generated/webhosting/src/v1/marshalling.gen.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import type {
6767
CreateHostingRequestDomainConfiguration,
6868
OfferOptionRequest,
6969
HostingApiCreateHostingRequest,
70+
HostingApiMigrateControlPanelRequest,
7071
HostingApiRemoveCustomDomainRequest,
7172
HostingApiUpdateHostingRequest,
7273
MailAccountApiChangeMailAccountPasswordRequest,
@@ -942,6 +943,14 @@ export const marshalHostingApiCreateHostingRequest = (
942943
tags: request.tags,
943944
})
944945

946+
export const marshalHostingApiMigrateControlPanelRequest = (
947+
request: HostingApiMigrateControlPanelRequest,
948+
defaults: DefaultValues,
949+
): Record<string, unknown> => ({
950+
control_panel_name: request.controlPanelName,
951+
offer_id: request.offerId,
952+
})
953+
945954
export const marshalHostingApiRemoveCustomDomainRequest = (
946955
request: HostingApiRemoveCustomDomainRequest,
947956
defaults: DefaultValues,

packages_generated/webhosting/src/v1/types.gen.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,26 @@ export type HostingApiListHostingsRequest = {
16091609
}
16101610

16111611

1612+
export type HostingApiMigrateControlPanelRequest = {
1613+
/**
1614+
* Region to target. If none is passed will use default region from the config.
1615+
*/
1616+
region?: ScwRegion
1617+
/**
1618+
* Hosting ID to migrate to a new control panel.
1619+
*/
1620+
hostingId: string
1621+
/**
1622+
* Control panel will migrate the hosting to a new server.
1623+
*/
1624+
controlPanelName: string
1625+
/**
1626+
* Migration.
1627+
*/
1628+
offerId: string
1629+
}
1630+
1631+
16121632
export type HostingApiRemoveCustomDomainRequest = {
16131633
/**
16141634
* Region to target. If none is passed will use default region from the config.

0 commit comments

Comments
 (0)