UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

435 lines 12.7 kB
import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as SitesAPI from 'cloudflare/resources/magic-transit/sites/sites'; import * as ACLsAPI from 'cloudflare/resources/magic-transit/sites/acls'; import * as LANsAPI from 'cloudflare/resources/magic-transit/sites/lans'; import * as WANsAPI from 'cloudflare/resources/magic-transit/sites/wans'; export declare class Sites extends APIResource { acls: ACLsAPI.ACLs; lans: LANsAPI.LANs; wans: WANsAPI.WANs; /** * Creates a new Site */ create(params: SiteCreateParams, options?: Core.RequestOptions): Core.APIPromise<SiteCreateResponse>; /** * Update a specific Site. */ update(siteId: string, params: SiteUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SiteUpdateResponse>; /** * Lists Sites associated with an account. Use connector_identifier query param to * return sites where connector_identifier matches either site.ConnectorID or * site.SecondaryConnectorID. */ list(params: SiteListParams, options?: Core.RequestOptions): Core.APIPromise<SiteListResponse>; /** * Remove a specific Site. */ delete(siteId: string, params: SiteDeleteParams, options?: Core.RequestOptions): Core.APIPromise<SiteDeleteResponse>; /** * Get a specific Site. */ get(siteId: string, params: SiteGetParams, options?: Core.RequestOptions): Core.APIPromise<SiteGetResponse>; } export interface SiteCreateResponse { site?: SiteCreateResponse.Site; } export declare namespace SiteCreateResponse { interface Site { /** * Identifier */ id?: string; /** * Magic WAN Connector identifier tag. */ connector_id?: string; description?: string; /** * Site high availability mode. If set to true, the site can have two connectors * and runs in high availability mode. */ ha_mode?: boolean; /** * Location of site in latitude and longitude. */ location?: Site.Location; /** * The name of the site. */ name?: string; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } namespace Site { /** * Location of site in latitude and longitude. */ interface Location { /** * Latitude */ lat?: string; /** * Longitude */ lon?: string; } } } export interface SiteUpdateResponse { site?: SiteUpdateResponse.Site; } export declare namespace SiteUpdateResponse { interface Site { /** * Identifier */ id?: string; /** * Magic WAN Connector identifier tag. */ connector_id?: string; description?: string; /** * Site high availability mode. If set to true, the site can have two connectors * and runs in high availability mode. */ ha_mode?: boolean; /** * Location of site in latitude and longitude. */ location?: Site.Location; /** * The name of the site. */ name?: string; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } namespace Site { /** * Location of site in latitude and longitude. */ interface Location { /** * Latitude */ lat?: string; /** * Longitude */ lon?: string; } } } export interface SiteListResponse { sites?: Array<SiteListResponse.Site>; } export declare namespace SiteListResponse { interface Site { /** * Identifier */ id?: string; /** * Magic WAN Connector identifier tag. */ connector_id?: string; description?: string; /** * Site high availability mode. If set to true, the site can have two connectors * and runs in high availability mode. */ ha_mode?: boolean; /** * Location of site in latitude and longitude. */ location?: Site.Location; /** * The name of the site. */ name?: string; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } namespace Site { /** * Location of site in latitude and longitude. */ interface Location { /** * Latitude */ lat?: string; /** * Longitude */ lon?: string; } } } export interface SiteDeleteResponse { deleted?: boolean; deleted_site?: SiteDeleteResponse.DeletedSite; } export declare namespace SiteDeleteResponse { interface DeletedSite { /** * Identifier */ id?: string; /** * Magic WAN Connector identifier tag. */ connector_id?: string; description?: string; /** * Site high availability mode. If set to true, the site can have two connectors * and runs in high availability mode. */ ha_mode?: boolean; /** * Location of site in latitude and longitude. */ location?: DeletedSite.Location; /** * The name of the site. */ name?: string; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } namespace DeletedSite { /** * Location of site in latitude and longitude. */ interface Location { /** * Latitude */ lat?: string; /** * Longitude */ lon?: string; } } } export interface SiteGetResponse { site?: SiteGetResponse.Site; } export declare namespace SiteGetResponse { interface Site { /** * Identifier */ id?: string; /** * Magic WAN Connector identifier tag. */ connector_id?: string; description?: string; /** * Site high availability mode. If set to true, the site can have two connectors * and runs in high availability mode. */ ha_mode?: boolean; /** * Location of site in latitude and longitude. */ location?: Site.Location; /** * The name of the site. */ name?: string; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } namespace Site { /** * Location of site in latitude and longitude. */ interface Location { /** * Latitude */ lat?: string; /** * Longitude */ lon?: string; } } } export interface SiteCreateParams { /** * Path param: Identifier */ account_id: string; /** * Body param: */ site?: SiteCreateParams.Site; } export declare namespace SiteCreateParams { interface Site { /** * The name of the site. */ name: string; /** * Magic WAN Connector identifier tag. */ connector_id?: string; description?: string; /** * Site high availability mode. If set to true, the site can have two connectors * and runs in high availability mode. */ ha_mode?: boolean; /** * Location of site in latitude and longitude. */ location?: Site.Location; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } namespace Site { /** * Location of site in latitude and longitude. */ interface Location { /** * Latitude */ lat?: string; /** * Longitude */ lon?: string; } } } export interface SiteUpdateParams { /** * Path param: Identifier */ account_id: string; /** * Body param: */ site?: SiteUpdateParams.Site; } export declare namespace SiteUpdateParams { interface Site { /** * Magic WAN Connector identifier tag. */ connector_id?: string; description?: string; /** * Location of site in latitude and longitude. */ location?: Site.Location; /** * The name of the site. */ name?: string; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } namespace Site { /** * Location of site in latitude and longitude. */ interface Location { /** * Latitude */ lat?: string; /** * Longitude */ lon?: string; } } } export interface SiteListParams { /** * Identifier */ account_id: string; } export interface SiteDeleteParams { /** * Identifier */ account_id: string; } export interface SiteGetParams { /** * Identifier */ account_id: string; } export declare namespace Sites { export import SiteCreateResponse = SitesAPI.SiteCreateResponse; export import SiteUpdateResponse = SitesAPI.SiteUpdateResponse; export import SiteListResponse = SitesAPI.SiteListResponse; export import SiteDeleteResponse = SitesAPI.SiteDeleteResponse; export import SiteGetResponse = SitesAPI.SiteGetResponse; export import SiteCreateParams = SitesAPI.SiteCreateParams; export import SiteUpdateParams = SitesAPI.SiteUpdateParams; export import SiteListParams = SitesAPI.SiteListParams; export import SiteDeleteParams = SitesAPI.SiteDeleteParams; export import SiteGetParams = SitesAPI.SiteGetParams; export import ACLs = ACLsAPI.ACLs; export import ACLCreateResponse = ACLsAPI.ACLCreateResponse; export import ACLUpdateResponse = ACLsAPI.ACLUpdateResponse; export import ACLListResponse = ACLsAPI.ACLListResponse; export import ACLDeleteResponse = ACLsAPI.ACLDeleteResponse; export import ACLGetResponse = ACLsAPI.ACLGetResponse; export import ACLCreateParams = ACLsAPI.ACLCreateParams; export import ACLUpdateParams = ACLsAPI.ACLUpdateParams; export import ACLListParams = ACLsAPI.ACLListParams; export import ACLDeleteParams = ACLsAPI.ACLDeleteParams; export import ACLGetParams = ACLsAPI.ACLGetParams; export import LANs = LANsAPI.LANs; export import LANCreateResponse = LANsAPI.LANCreateResponse; export import LANUpdateResponse = LANsAPI.LANUpdateResponse; export import LANListResponse = LANsAPI.LANListResponse; export import LANDeleteResponse = LANsAPI.LANDeleteResponse; export import LANGetResponse = LANsAPI.LANGetResponse; export import LANCreateParams = LANsAPI.LANCreateParams; export import LANUpdateParams = LANsAPI.LANUpdateParams; export import LANListParams = LANsAPI.LANListParams; export import LANDeleteParams = LANsAPI.LANDeleteParams; export import LANGetParams = LANsAPI.LANGetParams; export import WANs = WANsAPI.WANs; export import WANCreateResponse = WANsAPI.WANCreateResponse; export import WANUpdateResponse = WANsAPI.WANUpdateResponse; export import WANListResponse = WANsAPI.WANListResponse; export import WANDeleteResponse = WANsAPI.WANDeleteResponse; export import WANGetResponse = WANsAPI.WANGetResponse; export import WANCreateParams = WANsAPI.WANCreateParams; export import WANUpdateParams = WANsAPI.WANUpdateParams; export import WANListParams = WANsAPI.WANListParams; export import WANDeleteParams = WANsAPI.WANDeleteParams; export import WANGetParams = WANsAPI.WANGetParams; } //# sourceMappingURL=sites.d.ts.map