diff --git a/packages_generated/dedibox/src/v1/api.gen.ts b/packages_generated/dedibox/src/v1/api.gen.ts index 76dd756b9..6dc74edd7 100644 --- a/packages_generated/dedibox/src/v1/api.gen.ts +++ b/packages_generated/dedibox/src/v1/api.gen.ts @@ -65,6 +65,7 @@ import { unmarshalListFailoverIPsResponse, unmarshalListInvoicesResponse, unmarshalListIPv6BlockSubnetsAvailableResponse, + unmarshalListIPv6BlocksResponse, unmarshalListIpsResponse, unmarshalListOffersResponse, unmarshalListOSResponse, @@ -148,11 +149,13 @@ import type { IPv6BlockApiGetIPv6BlockQuotasRequest, IPv6BlockApiGetIPv6BlockRequest, IPv6BlockApiListIPv6BlockSubnetsAvailableRequest, + IPv6BlockApiListIPv6BlocksRequest, IPv6BlockApiUpdateIPv6BlockRequest, ListFailoverIPsRequest, ListFailoverIPsResponse, ListInvoicesResponse, ListIPv6BlockSubnetsAvailableResponse, + ListIPv6BlocksResponse, ListIpsResponse, ListOffersRequest, ListOffersResponse, @@ -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 = {}, + ) => + this.client.fetch( + { + 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 diff --git a/packages_generated/dedibox/src/v1/index.gen.ts b/packages_generated/dedibox/src/v1/index.gen.ts index 227c7aacd..197056133 100644 --- a/packages_generated/dedibox/src/v1/index.gen.ts +++ b/packages_generated/dedibox/src/v1/index.gen.ts @@ -79,6 +79,7 @@ export type { IPv6BlockApiGetIPv6BlockQuotasRequest, IPv6BlockApiGetIPv6BlockRequest, IPv6BlockApiListIPv6BlockSubnetsAvailableRequest, + IPv6BlockApiListIPv6BlocksRequest, IPv6BlockApiUpdateIPv6BlockRequest, IPv6BlockDelegationStatus, ListFailoverIPsRequest, @@ -88,6 +89,7 @@ export type { ListInvoicesResponse, ListIPv6BlockSubnetsAvailableResponse, ListIPv6BlockSubnetsAvailableResponseSubnet, + ListIPv6BlocksResponse, ListIpsResponse, ListOffersRequest, ListOffersRequestOrderBy, diff --git a/packages_generated/dedibox/src/v1/marshalling.gen.ts b/packages_generated/dedibox/src/v1/marshalling.gen.ts index 45323fcff..160a52741 100644 --- a/packages_generated/dedibox/src/v1/marshalling.gen.ts +++ b/packages_generated/dedibox/src/v1/marshalling.gen.ts @@ -39,6 +39,7 @@ import type { ListInvoicesResponse, ListIPv6BlockSubnetsAvailableResponse, ListIPv6BlockSubnetsAvailableResponseSubnet, + ListIPv6BlocksResponse, ListIpsResponse, ListOffersResponse, ListOSResponse, @@ -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( diff --git a/packages_generated/dedibox/src/v1/types.gen.ts b/packages_generated/dedibox/src/v1/types.gen.ts index 8aaf88e09..8d892a38b 100644 --- a/packages_generated/dedibox/src/v1/types.gen.ts +++ b/packages_generated/dedibox/src/v1/types.gen.ts @@ -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 @@ -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. @@ -2084,6 +2084,10 @@ export type IPv6BlockApiListIPv6BlockSubnetsAvailableRequest = { blockId: number } +export type IPv6BlockApiListIPv6BlocksRequest = { + projectId?: string +} + export type IPv6BlockApiUpdateIPv6BlockRequest = { /** * ID of the IPv6 block. @@ -2212,6 +2216,11 @@ export interface ListIPv6BlockSubnetsAvailableResponse { totalCount: number } +export interface ListIPv6BlocksResponse { + totalCount: number + ipv6Blocks: IPv6Block[] +} + export interface ListInvoicesResponse { totalCount: number invoices: InvoiceSummary[]