import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class BaseInterconnects extends APIResource { static readonly _key: readonly ['networkInterconnects', 'interconnects']; /** * Creates a new network interconnect for connecting Cloudflare's network to * external networks. Interconnects provide dedicated bandwidth and reduced latency * for traffic exchange. * * @example * ```ts * const interconnect = * await client.networkInterconnects.interconnects.create({ * account_id: 'account_id', * account: 'account', * slot_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * type: 'type', * }); * ``` */ create(params: InterconnectCreateParams, options?: RequestOptions): APIPromise; /** * Lists all network interconnects configured for the account, including physical * and virtual connections. * * @example * ```ts * const interconnects = * await client.networkInterconnects.interconnects.list({ * account_id: 'account_id', * }); * ``` */ list(params: InterconnectListParams, options?: RequestOptions): APIPromise; /** * Permanently removes a network interconnect configuration. The physical or * virtual connection will be terminated. * * @example * ```ts * await client.networkInterconnects.interconnects.delete( * 'icon', * { account_id: 'account_id' }, * ); * ``` */ delete(icon: string, params: InterconnectDeleteParams, options?: RequestOptions): APIPromise; /** * Retrieves configuration and status details for a specific network interconnect. * * @example * ```ts * const interconnect = * await client.networkInterconnects.interconnects.get( * 'icon', * { account_id: 'account_id' }, * ); * ``` */ get(icon: string, params: InterconnectGetParams, options?: RequestOptions): APIPromise; /** * Downloads the Letter of Authorization (LOA) for a network interconnect, required * for physical cross-connect provisioning. * * @example * ```ts * await client.networkInterconnects.interconnects.loa( * 'icon', * { account_id: 'account_id' }, * ); * ``` */ loa(icon: string, params: InterconnectLOAParams, options?: RequestOptions): APIPromise; /** * Gets the current operational status of a network interconnect, including link * state and traffic metrics. * * @example * ```ts * const response = * await client.networkInterconnects.interconnects.status( * 'icon', * { account_id: 'account_id' }, * ); * ``` */ status(icon: string, params: InterconnectStatusParams, options?: RequestOptions): APIPromise; } export declare class Interconnects extends BaseInterconnects { } export type InterconnectCreateResponse = InterconnectCreateResponse.NscInterconnectPhysicalBody | InterconnectCreateResponse.NscInterconnectGcpPartnerBody; export declare namespace InterconnectCreateResponse { interface NscInterconnectPhysicalBody { account: string; facility: NscInterconnectPhysicalBody.Facility; name: string; /** * A Cloudflare site name. */ site: string; slot_id: string; speed: string; type: string; virtual_port_reservation_id: string; ccr_device_name?: string | null; owner?: string; } namespace NscInterconnectPhysicalBody { interface Facility { address: Array; name: string; } } interface NscInterconnectGcpPartnerBody { account: string; name: string; region: string; type: string; virtual_port_reservation_id: string; owner?: string; /** * Bandwidth structure as visible through the customer-facing API. */ speed?: '50M' | '100M' | '200M' | '300M' | '400M' | '500M' | '1G' | '2G' | '5G' | '10G' | '20G' | '50G'; } } export interface InterconnectListResponse { items: Array; next?: number | null; } export declare namespace InterconnectListResponse { interface NscInterconnectPhysicalBody { account: string; facility: NscInterconnectPhysicalBody.Facility; name: string; /** * A Cloudflare site name. */ site: string; slot_id: string; speed: string; type: string; virtual_port_reservation_id: string; ccr_device_name?: string | null; owner?: string; } namespace NscInterconnectPhysicalBody { interface Facility { address: Array; name: string; } } interface NscInterconnectGcpPartnerBody { account: string; name: string; region: string; type: string; virtual_port_reservation_id: string; owner?: string; /** * Bandwidth structure as visible through the customer-facing API. */ speed?: '50M' | '100M' | '200M' | '300M' | '400M' | '500M' | '1G' | '2G' | '5G' | '10G' | '20G' | '50G'; } } export type InterconnectGetResponse = InterconnectGetResponse.NscInterconnectPhysicalBody | InterconnectGetResponse.NscInterconnectGcpPartnerBody; export declare namespace InterconnectGetResponse { interface NscInterconnectPhysicalBody { account: string; facility: NscInterconnectPhysicalBody.Facility; name: string; /** * A Cloudflare site name. */ site: string; slot_id: string; speed: string; type: string; virtual_port_reservation_id: string; ccr_device_name?: string | null; owner?: string; } namespace NscInterconnectPhysicalBody { interface Facility { address: Array; name: string; } } interface NscInterconnectGcpPartnerBody { account: string; name: string; region: string; type: string; virtual_port_reservation_id: string; owner?: string; /** * Bandwidth structure as visible through the customer-facing API. */ speed?: '50M' | '100M' | '200M' | '300M' | '400M' | '500M' | '1G' | '2G' | '5G' | '10G' | '20G' | '50G'; } } export type InterconnectStatusResponse = InterconnectStatusResponse.Pending | InterconnectStatusResponse.Down | InterconnectStatusResponse.Unhealthy | InterconnectStatusResponse.Healthy; export declare namespace InterconnectStatusResponse { interface Pending { state: 'Pending'; } interface Down { state: 'Down'; /** * Diagnostic information, if available */ reason?: string | null; } interface Unhealthy { state: 'Unhealthy'; /** * Diagnostic information, if available */ reason?: string | null; } interface Healthy { state: 'Healthy'; } } export type InterconnectCreateParams = InterconnectCreateParams.NscInterconnectCreatePhysicalBody | InterconnectCreateParams.NscInterconnectCreateGcpPartnerBody; export declare namespace InterconnectCreateParams { interface NscInterconnectCreatePhysicalBody { /** * Path param: Customer account tag */ account_id: string; /** * Body param */ account: string; /** * Body param */ slot_id: string; /** * Body param */ type: string; /** * Body param */ speed?: string | null; } interface NscInterconnectCreateGcpPartnerBody { /** * Path param: Customer account tag */ account_id: string; /** * Body param */ account: string; /** * Body param: Bandwidth structure as visible through the customer-facing API. */ bandwidth: '50M' | '100M' | '200M' | '300M' | '400M' | '500M' | '1G' | '2G' | '5G' | '10G' | '20G' | '50G'; /** * Body param: Pairing key provided by GCP */ pairing_key: string; /** * Body param */ type: string; } } export interface InterconnectListParams { /** * Path param: Customer account tag */ account_id: string; /** * Query param */ cursor?: number | null; /** * Query param */ limit?: number | null; /** * Query param: If specified, only show interconnects located at the given site */ site?: string | null; /** * Query param: If specified, only show interconnects of the given type */ type?: string | null; } export interface InterconnectDeleteParams { /** * Customer account tag */ account_id: string; } export interface InterconnectGetParams { /** * Customer account tag */ account_id: string; } export interface InterconnectLOAParams { /** * Path param: Customer account tag */ account_id: string; /** * Query param: Custom name to use in the LOA instead of the account name (200 * Character limit) */ name?: string | null; } export interface InterconnectStatusParams { /** * Customer account tag */ account_id: string; } export declare namespace Interconnects { export { type InterconnectCreateResponse as InterconnectCreateResponse, type InterconnectListResponse as InterconnectListResponse, type InterconnectGetResponse as InterconnectGetResponse, type InterconnectStatusResponse as InterconnectStatusResponse, type InterconnectCreateParams as InterconnectCreateParams, type InterconnectListParams as InterconnectListParams, type InterconnectDeleteParams as InterconnectDeleteParams, type InterconnectGetParams as InterconnectGetParams, type InterconnectLOAParams as InterconnectLOAParams, type InterconnectStatusParams as InterconnectStatusParams, }; } //# sourceMappingURL=interconnects.d.ts.map