cloudflare
Version:
The official TypeScript library for the Cloudflare API
128 lines • 3.41 kB
text/typescript
import { APIResource } from "../../core/resource.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class BaseSlots extends APIResource {
static readonly _key: readonly ['networkInterconnects', 'slots'];
/**
* Lists all available infrastructure slots for the account, showing allocation
* status and capacity.
*
* @example
* ```ts
* const slots = await client.networkInterconnects.slots.list({
* account_id: 'account_id',
* });
* ```
*/
list(params: SlotListParams, options?: RequestOptions): APIPromise<SlotListResponse>;
/**
* Gets information about a specific infrastructure slot allocation.
*
* @example
* ```ts
* const slot = await client.networkInterconnects.slots.get(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { account_id: 'account_id' },
* );
* ```
*/
get(slot: string, params: SlotGetParams, options?: RequestOptions): APIPromise<SlotGetResponse>;
}
export declare class Slots extends BaseSlots {
}
export interface SlotListResponse {
items: Array<SlotListResponse.Item>;
next?: number | null;
}
export declare namespace SlotListResponse {
interface Item {
/**
* Slot ID
*/
id: string;
facility: Item.Facility;
/**
* Whether the slot is occupied or not
*/
occupied: boolean;
site: string;
speed: string;
/**
* Customer account tag
*/
account?: string;
ccr_device_name?: string | null;
}
namespace Item {
interface Facility {
address: Array<string>;
name: string;
}
}
}
export interface SlotGetResponse {
/**
* Slot ID
*/
id: string;
facility: SlotGetResponse.Facility;
/**
* Whether the slot is occupied or not
*/
occupied: boolean;
site: string;
speed: string;
/**
* Customer account tag
*/
account?: string;
ccr_device_name?: string | null;
}
export declare namespace SlotGetResponse {
interface Facility {
address: Array<string>;
name: string;
}
}
export interface SlotListParams {
/**
* Path param: Customer account tag
*/
account_id: string;
/**
* Query param: If specified, only show slots with the given text in their address
* field
*/
address_contains?: string | null;
/**
* Query param
*/
cursor?: number | null;
/**
* Query param
*/
limit?: number | null;
/**
* Query param: If specified, only show slots with a specific occupied/unoccupied
* state
*/
occupied?: boolean | null;
/**
* Query param: If specified, only show slots located at the given site
*/
site?: string | null;
/**
* Query param: If specified, only show slots that support the given speed
*/
speed?: string | null;
}
export interface SlotGetParams {
/**
* Customer account tag
*/
account_id: string;
}
export declare namespace Slots {
export { type SlotListResponse as SlotListResponse, type SlotGetResponse as SlotGetResponse, type SlotListParams as SlotListParams, type SlotGetParams as SlotGetParams, };
}
//# sourceMappingURL=slots.d.mts.map