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
23 changes: 22 additions & 1 deletion packages_generated/dedibox/src/v1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import {
unmarshalListFailoverIPsResponse,
unmarshalListInvoicesResponse,
unmarshalListIPv6BlockSubnetsAvailableResponse,
unmarshalListIPv6BlocksResponse,
unmarshalListIpsResponse,
unmarshalListOffersResponse,
unmarshalListOSResponse,
Expand Down Expand Up @@ -148,11 +149,13 @@ import type {
IPv6BlockApiGetIPv6BlockQuotasRequest,
IPv6BlockApiGetIPv6BlockRequest,
IPv6BlockApiListIPv6BlockSubnetsAvailableRequest,
IPv6BlockApiListIPv6BlocksRequest,
IPv6BlockApiUpdateIPv6BlockRequest,
ListFailoverIPsRequest,
ListFailoverIPsResponse,
ListInvoicesResponse,
ListIPv6BlockSubnetsAvailableResponse,
ListIPv6BlocksResponse,
ListIpsResponse,
ListOffersRequest,
ListOffersResponse,
Expand Down Expand Up @@ -1315,7 +1318,25 @@ export class IPv6BlockAPI extends ParentAPI {
)

/**
* Get a specific IPv6 block. Get the IPv6 block associated with the given ID.
* List IPv6 blocks. List IPv6 blocks associated given project ID.
*
* @param request - The request {@link IPv6BlockApiListIPv6BlocksRequest}
* @returns A Promise of ListIPv6BlocksResponse
*/
listIPv6Blocks = (
request: Readonly<IPv6BlockApiListIPv6BlocksRequest> = {},
) =>
this.client.fetch<ListIPv6BlocksResponse>(
{
method: 'GET',
path: `/dedibox/v1/ipv6-blocks`,
urlParams: urlParams(['project_id', request.projectId]),
},
unmarshalListIPv6BlocksResponse,
)

/**
* Get first IPv6 block. Get the first IPv6 block associated with the given project ID.
*
* @param request - The request {@link IPv6BlockApiGetIPv6BlockRequest}
* @returns A Promise of IPv6Block
Expand Down
2 changes: 2 additions & 0 deletions packages_generated/dedibox/src/v1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export type {
IPv6BlockApiGetIPv6BlockQuotasRequest,
IPv6BlockApiGetIPv6BlockRequest,
IPv6BlockApiListIPv6BlockSubnetsAvailableRequest,
IPv6BlockApiListIPv6BlocksRequest,
IPv6BlockApiUpdateIPv6BlockRequest,
IPv6BlockDelegationStatus,
ListFailoverIPsRequest,
Expand All @@ -88,6 +89,7 @@ export type {
ListInvoicesResponse,
ListIPv6BlockSubnetsAvailableResponse,
ListIPv6BlockSubnetsAvailableResponseSubnet,
ListIPv6BlocksResponse,
ListIpsResponse,
ListOffersRequest,
ListOffersRequestOrderBy,
Expand Down
16 changes: 16 additions & 0 deletions packages_generated/dedibox/src/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import type {
ListInvoicesResponse,
ListIPv6BlockSubnetsAvailableResponse,
ListIPv6BlockSubnetsAvailableResponseSubnet,
ListIPv6BlocksResponse,
ListIpsResponse,
ListOffersResponse,
ListOSResponse,
Expand Down Expand Up @@ -957,6 +958,21 @@ export const unmarshalListIPv6BlockSubnetsAvailableResponse = (
} as ListIPv6BlockSubnetsAvailableResponse
}

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

return {
ipv6Blocks: unmarshalArrayOfObject(data.ipv6_blocks, unmarshalIPv6Block),
totalCount: data.total_count,
} as ListIPv6BlocksResponse
}

const unmarshalInvoiceSummary = (data: unknown): InvoiceSummary => {
if (!isJSONObject(data)) {
throw new TypeError(
Expand Down
71 changes: 40 additions & 31 deletions packages_generated/dedibox/src/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,37 @@ export interface ListIPv6BlockSubnetsAvailableResponseSubnet {
cidr: number
}

export interface IPv6Block {
/**
* ID of the IPv6.
*/
id: number
/**
* Address of the IPv6.
*/
address: string
/**
* DUID of the IPv6.
*/
duid: string
/**
* DNS linked to the IPv6.
*/
nameservers: string[]
/**
* Classless InterDomain Routing notation of the IPv6.
*/
cidr: number
/**
* All IPv6 subnets.
*/
subnets: IPv6Block[]
/**
* The nameservers delegation status.
*/
delegationStatus: IPv6BlockDelegationStatus
}

export interface InvoiceSummary {
id: number
totalWithTaxes?: Money
Expand Down Expand Up @@ -2003,37 +2034,6 @@ export type GetServiceRequest = {
serviceId: number
}

export interface IPv6Block {
/**
* ID of the IPv6.
*/
id: number
/**
* Address of the IPv6.
*/
address: string
/**
* DUID of the IPv6.
*/
duid: string
/**
* DNS linked to the IPv6.
*/
nameservers: string[]
/**
* Classless InterDomain Routing notation of the IPv6.
*/
cidr: number
/**
* All IPv6 subnets.
*/
subnets: IPv6Block[]
/**
* The nameservers delegation status.
*/
delegationStatus: IPv6BlockDelegationStatus
}

export type IPv6BlockApiCreateIPv6BlockRequest = {
/**
* ID of the project.
Expand Down Expand Up @@ -2084,6 +2084,10 @@ export type IPv6BlockApiListIPv6BlockSubnetsAvailableRequest = {
blockId: number
}

export type IPv6BlockApiListIPv6BlocksRequest = {
projectId?: string
}

export type IPv6BlockApiUpdateIPv6BlockRequest = {
/**
* ID of the IPv6 block.
Expand Down Expand Up @@ -2212,6 +2216,11 @@ export interface ListIPv6BlockSubnetsAvailableResponse {
totalCount: number
}

export interface ListIPv6BlocksResponse {
totalCount: number
ipv6Blocks: IPv6Block[]
}

export interface ListInvoicesResponse {
totalCount: number
invoices: InvoiceSummary[]
Expand Down
Loading