Skip to content

Commit 47e291c

Browse files
committed
feat: update generated APIs
1 parent 7a604bd commit 47e291c

File tree

10 files changed

+128
-0
lines changed

10 files changed

+128
-0
lines changed

packages/clients/src/api/applesilicon/v1alpha1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export type {
2424
RebootServerRequest,
2525
ReinstallServerRequest,
2626
Server,
27+
ServerPrivateNetworkStatus,
2728
ServerStatus,
2829
ServerType,
2930
ServerTypeCPU,

packages/clients/src/api/index.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import * as Function from './function/index.gen'
2020
import * as Iam from './iam/index.gen'
2121
import * as Inference from './inference/index.gen'
2222
import * as Instance from './instance/index.gen'
23+
import * as Interlink from './interlink/index.gen'
2324
import * as Iot from './iot/index.gen'
2425
import * as Ipam from './ipam/index.gen'
2526
import * as Ipfs from './ipfs/index.gen'
@@ -62,6 +63,7 @@ export {
6263
Iam,
6364
Inference,
6465
Instance,
66+
Interlink,
6567
Iot,
6668
Ipam,
6769
Ipfs,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3+
* EDIT HERE
4+
*/
5+
6+
export * as v1beta1 from './v1beta1/index.gen'
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// This file was automatically generated. DO NOT EDIT.
2+
// If you have any remark or suggestion do not hesitate to open an issue.
3+
export { API } from './api.gen'
4+
export type {
5+
AttachRoutingPolicyRequest,
6+
AttachVpcRequest,
7+
BgpStatus,
8+
CreateLinkRequest,
9+
CreateRoutingPolicyRequest,
10+
DeleteLinkRequest,
11+
DeleteRoutingPolicyRequest,
12+
DetachRoutingPolicyRequest,
13+
DetachVpcRequest,
14+
DisableRoutePropagationRequest,
15+
EnableRoutePropagationRequest,
16+
GetLinkRequest,
17+
GetPartnerRequest,
18+
GetPopRequest,
19+
GetRoutingPolicyRequest,
20+
Link,
21+
LinkStatus,
22+
ListLinksRequest,
23+
ListLinksRequestOrderBy,
24+
ListLinksResponse,
25+
ListPartnersRequest,
26+
ListPartnersRequestOrderBy,
27+
ListPartnersResponse,
28+
ListPopsRequest,
29+
ListPopsRequestOrderBy,
30+
ListPopsResponse,
31+
ListRoutingPoliciesRequest,
32+
ListRoutingPoliciesRequestOrderBy,
33+
ListRoutingPoliciesResponse,
34+
Partner,
35+
Pop,
36+
RoutingPolicy,
37+
UpdateLinkRequest,
38+
UpdateRoutingPolicyRequest,
39+
} from './types.gen'
40+
export * as ValidationRules from './validation-rules.gen'

packages/clients/src/api/secret/v1beta1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const unmarshalSecretVersion = (data: unknown): SecretVersion => {
5050

5151
return {
5252
createdAt: unmarshalDate(data.created_at),
53+
deletedAt: unmarshalDate(data.deleted_at),
5354
description: data.description,
5455
ephemeralProperties: data.ephemeral_properties
5556
? unmarshalEphemeralProperties(data.ephemeral_properties)

packages/clients/src/api/secret/v1beta1/types.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export interface SecretVersion {
103103
createdAt?: Date
104104
/** Last update of the version. */
105105
updatedAt?: Date
106+
/** Date and time of the version's deletion. */
107+
deletedAt?: Date
106108
/** Description of the version. */
107109
description?: string
108110
/** Returns `true` if the version is the latest. */

packages/clients/src/api/webhosting/v1/api.gen.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
marshalDatabaseApiCreateDatabaseUserRequest,
1717
marshalDatabaseApiUnassignDatabaseUserRequest,
1818
marshalDnsApiCheckUserOwnsDomainRequest,
19+
marshalDnsApiSyncDomainDnsRecordsRequest,
1920
marshalFtpAccountApiChangeFtpAccountPasswordRequest,
2021
marshalFtpAccountApiCreateFtpAccountRequest,
2122
marshalHostingApiCreateHostingRequest,
@@ -60,6 +61,7 @@ import type {
6061
DatabaseUser,
6162
DnsApiCheckUserOwnsDomainRequest,
6263
DnsApiGetDomainDnsRecordsRequest,
64+
DnsApiSyncDomainDnsRecordsRequest,
6365
DnsRecords,
6466
FtpAccount,
6567
FtpAccountApiChangeFtpAccountPasswordRequest,
@@ -433,6 +435,30 @@ export class DnsAPI extends ParentAPI {
433435
},
434436
unmarshalCheckUserOwnsDomainResponse,
435437
)
438+
439+
/**
440+
* "Synchronize your DNS records on the Elements Console and on cPanel.".
441+
*
442+
* @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
443+
* @returns A Promise of DnsRecords
444+
*/
445+
syncDomainDnsRecords = (
446+
request: Readonly<DnsApiSyncDomainDnsRecordsRequest>,
447+
) =>
448+
this.client.fetch<DnsRecords>(
449+
{
450+
body: JSON.stringify(
451+
marshalDnsApiSyncDomainDnsRecordsRequest(
452+
request,
453+
this.client.settings,
454+
),
455+
),
456+
headers: jsonContentHeaders,
457+
method: 'POST',
458+
path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/sync-domain-dns-records`,
459+
},
460+
unmarshalDnsRecords,
461+
)
436462
}
437463

438464
/**

packages/clients/src/api/webhosting/v1/index.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export type {
3232
DatabaseUser,
3333
DnsApiCheckUserOwnsDomainRequest,
3434
DnsApiGetDomainDnsRecordsRequest,
35+
DnsApiSyncDomainDnsRecordsRequest,
3536
DnsRecord,
3637
DnsRecordStatus,
3738
DnsRecordType,
@@ -90,6 +91,7 @@ export type {
9091
ResetHostingPasswordResponse,
9192
ResourceSummary,
9293
Session,
94+
SyncDomainDnsRecordsRequestRecord,
9395
Website,
9496
WebsiteApiListWebsitesRequest,
9597
} from './types.gen'

packages/clients/src/api/webhosting/v1/marshalling.gen.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import type {
2121
DatabaseApiUnassignDatabaseUserRequest,
2222
DatabaseUser,
2323
DnsApiCheckUserOwnsDomainRequest,
24+
DnsApiSyncDomainDnsRecordsRequest,
2425
DnsRecord,
2526
DnsRecords,
2627
FtpAccount,
@@ -53,6 +54,7 @@ import type {
5354
ResetHostingPasswordResponse,
5455
ResourceSummary,
5556
Session,
57+
SyncDomainDnsRecordsRequestRecord,
5658
Website,
5759
} from './types.gen'
5860

@@ -568,6 +570,29 @@ export const marshalDnsApiCheckUserOwnsDomainRequest = (
568570
project_id: request.projectId ?? defaults.defaultProjectId,
569571
})
570572

573+
const marshalSyncDomainDnsRecordsRequestRecord = (
574+
request: SyncDomainDnsRecordsRequestRecord,
575+
defaults: DefaultValues,
576+
): Record<string, unknown> => ({
577+
name: request.name,
578+
type: request.type,
579+
})
580+
581+
export const marshalDnsApiSyncDomainDnsRecordsRequest = (
582+
request: DnsApiSyncDomainDnsRecordsRequest,
583+
defaults: DefaultValues,
584+
): Record<string, unknown> => ({
585+
custom_records:
586+
request.customRecords !== undefined
587+
? request.customRecords.map(elt =>
588+
marshalSyncDomainDnsRecordsRequestRecord(elt, defaults),
589+
)
590+
: undefined,
591+
update_all_records: request.updateAllRecords,
592+
update_mail_records: request.updateMailRecords,
593+
update_web_records: request.updateWebRecords,
594+
})
595+
571596
export const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (
572597
request: FtpAccountApiChangeFtpAccountPasswordRequest,
573598
defaults: DefaultValues,

packages/clients/src/api/webhosting/v1/types.gen.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ export interface OfferOptionRequest {
125125
quantity: number
126126
}
127127

128+
export interface SyncDomainDnsRecordsRequestRecord {
129+
name: string
130+
type: DnsRecordType
131+
}
132+
128133
export interface DnsRecord {
129134
/** Record name. */
130135
name: string
@@ -475,6 +480,24 @@ export type DnsApiGetDomainDnsRecordsRequest = {
475480
domain: string
476481
}
477482

483+
export type DnsApiSyncDomainDnsRecordsRequest = {
484+
/**
485+
* Region to target. If none is passed will use default region from the
486+
* config.
487+
*/
488+
region?: Region
489+
/** Domain for which the DNS records will be synchronized. */
490+
domain: string
491+
/** Whether or not to synchronize the web records. */
492+
updateWebRecords: boolean
493+
/** Whether or not to synchronize the mail records. */
494+
updateMailRecords: boolean
495+
/** Whether or not to synchronize all types of records. This one has priority. */
496+
updateAllRecords: boolean
497+
/** Custom records to synchronize. */
498+
customRecords?: SyncDomainDnsRecordsRequestRecord[]
499+
}
500+
478501
export interface DnsRecords {
479502
/** List of DNS records. */
480503
records: DnsRecord[]

0 commit comments

Comments
 (0)