Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions packages_generated/domain/src/v2beta1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import {
unmarshalListDNSZoneVersionsResponse,
unmarshalListDomainHostsResponse,
unmarshalListDomainsResponse,
unmarshalListInboundTransfersResponse,
unmarshalListRenewableDomainsResponse,
unmarshalListSSLCertificatesResponse,
unmarshalListTasksResponse,
Expand Down Expand Up @@ -110,6 +111,7 @@ import type {
ListDNSZoneVersionsResponse,
ListDomainHostsResponse,
ListDomainsResponse,
ListInboundTransfersResponse,
ListRenewableDomainsResponse,
ListSSLCertificatesRequest,
ListSSLCertificatesResponse,
Expand All @@ -134,6 +136,7 @@ import type {
RegistrarApiListContactsRequest,
RegistrarApiListDomainHostsRequest,
RegistrarApiListDomainsRequest,
RegistrarApiListInboundTransfersRequest,
RegistrarApiListRenewableDomainsRequest,
RegistrarApiListTasksRequest,
RegistrarApiListTldsRequest,
Expand Down Expand Up @@ -724,6 +727,43 @@ You can filter the list of tasks by domain name.
listTasks = (request: Readonly<RegistrarApiListTasksRequest> = {}) =>
enrichForPagination('tasks', this.pageOfListTasks, request)

protected pageOfListInboundTransfers = (
request: Readonly<RegistrarApiListInboundTransfersRequest>,
) =>
this.client.fetch<ListInboundTransfersResponse>(
{
method: 'GET',
path: `/domain/v2beta1/inbound-transfers`,
urlParams: urlParams(
['domain', request.domain],
[
'organization_id',
request.organizationId ??
this.client.settings.defaultOrganizationId,
],
['page', request.page],
[
'page_size',
request.pageSize ?? this.client.settings.defaultPageSize,
],
[
'project_id',
request.projectId ?? this.client.settings.defaultProjectId,
],
),
},
unmarshalListInboundTransfersResponse,
)

listInboundTransfers = (
request: Readonly<RegistrarApiListInboundTransfersRequest>,
) =>
enrichForPagination(
'inboundTransfers',
this.pageOfListInboundTransfers,
request,
)

/**
* Purchase domains. Request the registration of domain names.
You can provide a domain's already existing contact or a new contact.
Expand Down
4 changes: 4 additions & 0 deletions packages_generated/domain/src/v2beta1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export type {
ImportRawDNSZoneRequestBindSource,
ImportRawDNSZoneRequestTsigKey,
ImportRawDNSZoneResponse,
InboundTransfer,
InboundTransferStatus,
LinkedProduct,
ListContactsRequestRole,
ListContactsResponse,
Expand All @@ -99,6 +101,7 @@ export type {
ListDomainHostsResponse,
ListDomainsRequestOrderBy,
ListDomainsResponse,
ListInboundTransfersResponse,
ListRenewableDomainsRequestOrderBy,
ListRenewableDomainsResponse,
ListSSLCertificatesRequest,
Expand Down Expand Up @@ -135,6 +138,7 @@ export type {
RegistrarApiListContactsRequest,
RegistrarApiListDomainHostsRequest,
RegistrarApiListDomainsRequest,
RegistrarApiListInboundTransfersRequest,
RegistrarApiListRenewableDomainsRequest,
RegistrarApiListTasksRequest,
RegistrarApiListTldsRequest,
Expand Down
39 changes: 39 additions & 0 deletions packages_generated/domain/src/v2beta1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import type {
ImportRawDNSZoneRequestBindSource,
ImportRawDNSZoneRequestTsigKey,
ImportRawDNSZoneResponse,
InboundTransfer,
ListContactsResponse,
ListDNSZoneNameserversResponse,
ListDNSZoneRecordsResponse,
Expand All @@ -71,6 +72,7 @@ import type {
ListDNSZoneVersionsResponse,
ListDomainHostsResponse,
ListDomainsResponse,
ListInboundTransfersResponse,
ListRenewableDomainsResponse,
ListSSLCertificatesResponse,
ListTasksResponse,
Expand Down Expand Up @@ -1114,6 +1116,43 @@ export const unmarshalListDomainsResponse = (
} as ListDomainsResponse
}

const unmarshalInboundTransfer = (data: unknown): InboundTransfer => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'InboundTransfer' failed as data isn't a dictionary.`,
)
}

return {
createdAt: unmarshalDate(data.created_at),
domain: data.domain,
id: data.id,
lastUpdatedAt: unmarshalDate(data.last_updated_at),
message: data.message,
projectId: data.project_id,
status: data.status,
taskId: data.task_id,
} as InboundTransfer
}

export const unmarshalListInboundTransfersResponse = (
data: unknown,
): ListInboundTransfersResponse => {
if (!isJSONObject(data)) {
throw new TypeError(
`Unmarshalling the type 'ListInboundTransfersResponse' failed as data isn't a dictionary.`,
)
}

return {
inboundTransfers: unmarshalArrayOfObject(
data.inbound_transfers,
unmarshalInboundTransfer,
),
totalCount: data.total_count,
} as ListInboundTransfersResponse
}

const unmarshalRenewableDomain = (data: unknown): RenewableDomain => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down
61 changes: 61 additions & 0 deletions packages_generated/domain/src/v2beta1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ export type DomainStatus =

export type HostStatus = 'unknown_status' | 'active' | 'updating' | 'deleting'

export type InboundTransferStatus =
| 'unknown'
| 'in_progress'
| 'done'
| 'err_internal'
| 'err_domain_pending'
| 'err_already_transferring'
| 'err_transfer_prohibited'
| 'err_transfer_impossible'
| 'err_invalid_authcode'
| 'err_domain_too_young'
| 'err_too_many_requests'

export type LinkedProduct = 'unknown_product' | 'vpc'

export type ListContactsRequestRole =
Expand Down Expand Up @@ -625,6 +638,41 @@ export interface DomainSummary {
pendingTrade: boolean
}

export interface InboundTransfer {
/**
* The unique identifier of the inbound transfer.
*/
id: string
/**
* The creation date of the inbound transfer.
*/
createdAt?: Date
/**
* The last modification date of the inbound transfer.
*/
lastUpdatedAt?: Date
/**
* The project ID associated with the inbound transfer.
*/
projectId: string
/**
* The domain associated with the inbound transfer.
*/
domain: string
/**
* Inbound transfer status.
*/
status: InboundTransferStatus
/**
* Human-friendly message to describe the current inbound transfer status.
*/
message: string
/**
* The unique identifier of the associated task.
*/
taskId: string
}

export interface RenewableDomain {
domain: string
projectId: string
Expand Down Expand Up @@ -1125,6 +1173,11 @@ export interface ListDomainsResponse {
domains: DomainSummary[]
}

export interface ListInboundTransfersResponse {
totalCount: number
inboundTransfers: InboundTransfer[]
}

export interface ListRenewableDomainsResponse {
totalCount: number
domains: RenewableDomain[]
Expand Down Expand Up @@ -1339,6 +1392,14 @@ export type RegistrarApiListDomainsRequest = {
domain?: string
}

export type RegistrarApiListInboundTransfersRequest = {
page: number
pageSize?: number
projectId?: string
organizationId?: string
domain: string
}

export type RegistrarApiListRenewableDomainsRequest = {
page?: number
pageSize?: number
Expand Down
Loading