initial
This commit is contained in:
15
ts/interfaces/index.ts
Normal file
15
ts/interfaces/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* PeeringDB API Interfaces
|
||||
* Export all interface definitions for PeeringDB API resources
|
||||
*/
|
||||
|
||||
export * from './peeringdb.api.organization.js';
|
||||
export * from './peeringdb.api.network.js';
|
||||
export * from './peeringdb.api.facility.js';
|
||||
export * from './peeringdb.api.exchange.js';
|
||||
export * from './peeringdb.api.netixlan.js';
|
||||
export * from './peeringdb.api.netfac.js';
|
||||
export * from './peeringdb.api.ixlan.js';
|
||||
export * from './peeringdb.api.ixfac.js';
|
||||
export * from './peeringdb.api.ixpfx.js';
|
||||
export * from './peeringdb.api.poc.js';
|
||||
79
ts/interfaces/peeringdb.api.exchange.ts
Normal file
79
ts/interfaces/peeringdb.api.exchange.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* Internet Exchange object from PeeringDB API
|
||||
* Represents an Internet Exchange Point (IXP)
|
||||
*/
|
||||
export interface IExchange extends IPeeringDbBaseObject {
|
||||
/** Exchange ID */
|
||||
id: number;
|
||||
|
||||
/** Organization ID */
|
||||
org_id: number;
|
||||
|
||||
/** Organization object (when depth > 0) */
|
||||
org?: any;
|
||||
|
||||
/** Exchange name */
|
||||
name: string;
|
||||
|
||||
/** Also known as (alternate names) */
|
||||
aka: string;
|
||||
|
||||
/** Name long */
|
||||
name_long: string;
|
||||
|
||||
/** Website */
|
||||
website: string;
|
||||
|
||||
/** City */
|
||||
city: string;
|
||||
|
||||
/** Country code (ISO 3166-1 alpha-2) */
|
||||
country: string;
|
||||
|
||||
/** Region/continent */
|
||||
region_continent: string;
|
||||
|
||||
/** Media type (Ethernet, ATM, etc.) */
|
||||
media: string;
|
||||
|
||||
/** Notes (markdown) */
|
||||
notes: string;
|
||||
|
||||
/** Proto unicast */
|
||||
proto_unicast: boolean;
|
||||
|
||||
/** Proto multicast */
|
||||
proto_multicast: boolean;
|
||||
|
||||
/** Proto IPv6 */
|
||||
proto_ipv6: boolean;
|
||||
|
||||
/** URL stats */
|
||||
url_stats: string;
|
||||
|
||||
/** Tech email */
|
||||
tech_email: string;
|
||||
|
||||
/** Tech phone */
|
||||
tech_phone: string;
|
||||
|
||||
/** Policy email */
|
||||
policy_email: string;
|
||||
|
||||
/** Policy phone */
|
||||
policy_phone: string;
|
||||
|
||||
/** Sales email */
|
||||
sales_email: string;
|
||||
|
||||
/** Sales phone */
|
||||
sales_phone: string;
|
||||
|
||||
/** Related IX LANs */
|
||||
ixlan_set?: number[] | any[];
|
||||
|
||||
/** Related IX-facility connections */
|
||||
ixfac_set?: number[] | any[];
|
||||
}
|
||||
88
ts/interfaces/peeringdb.api.facility.ts
Normal file
88
ts/interfaces/peeringdb.api.facility.ts
Normal file
@@ -0,0 +1,88 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* Facility object from PeeringDB API
|
||||
* Represents a colocation facility or data center
|
||||
*/
|
||||
export interface IFacility extends IPeeringDbBaseObject {
|
||||
/** Facility ID */
|
||||
id: number;
|
||||
|
||||
/** Organization ID */
|
||||
org_id: number;
|
||||
|
||||
/** Organization object (when depth > 0) */
|
||||
org?: any;
|
||||
|
||||
/** Facility name */
|
||||
name: string;
|
||||
|
||||
/** Also known as (alternate names) */
|
||||
aka: string;
|
||||
|
||||
/** Website */
|
||||
website: string;
|
||||
|
||||
/** CLLI code */
|
||||
clli: string;
|
||||
|
||||
/** Renater code */
|
||||
renater: string;
|
||||
|
||||
/** NPL code */
|
||||
npanxx: string;
|
||||
|
||||
/** Notes (markdown) */
|
||||
notes: string;
|
||||
|
||||
/** Address line 1 */
|
||||
address1: string;
|
||||
|
||||
/** Address line 2 */
|
||||
address2: string;
|
||||
|
||||
/** City */
|
||||
city: string;
|
||||
|
||||
/** State/Province */
|
||||
state: string;
|
||||
|
||||
/** Zip/Postal code */
|
||||
zipcode: string;
|
||||
|
||||
/** Country code (ISO 3166-1 alpha-2) */
|
||||
country: string;
|
||||
|
||||
/** Latitude */
|
||||
latitude: number | null;
|
||||
|
||||
/** Longitude */
|
||||
longitude: number | null;
|
||||
|
||||
/** Floor area (sqm) */
|
||||
floor_area: number | null;
|
||||
|
||||
/** Available voltage services */
|
||||
available_voltage_services: string;
|
||||
|
||||
/** Power redundancy */
|
||||
power_redundancy: string;
|
||||
|
||||
/** Diverse serving substations */
|
||||
diverse_serving_substations: boolean;
|
||||
|
||||
/** Property */
|
||||
property: string;
|
||||
|
||||
/** Campus ID */
|
||||
campus_id: number | null;
|
||||
|
||||
/** Campus object (when depth > 0) */
|
||||
campus?: any;
|
||||
|
||||
/** Related network-facility connections */
|
||||
netfac_set?: number[] | any[];
|
||||
|
||||
/** Related IX-facility connections */
|
||||
ixfac_set?: number[] | any[];
|
||||
}
|
||||
22
ts/interfaces/peeringdb.api.ixfac.ts
Normal file
22
ts/interfaces/peeringdb.api.ixfac.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* IX Facility object from PeeringDB API
|
||||
* Represents the connection between an Internet Exchange and a facility
|
||||
*/
|
||||
export interface IIxFac extends IPeeringDbBaseObject {
|
||||
/** IxFac ID */
|
||||
id: number;
|
||||
|
||||
/** Exchange ID */
|
||||
ix_id: number;
|
||||
|
||||
/** Exchange object (when depth > 0) */
|
||||
ix?: any;
|
||||
|
||||
/** Facility ID */
|
||||
fac_id: number;
|
||||
|
||||
/** Facility object (when depth > 0) */
|
||||
fac?: any;
|
||||
}
|
||||
43
ts/interfaces/peeringdb.api.ixlan.ts
Normal file
43
ts/interfaces/peeringdb.api.ixlan.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* IX LAN object from PeeringDB API
|
||||
* Represents a LAN at an Internet Exchange
|
||||
*/
|
||||
export interface IIxLan extends IPeeringDbBaseObject {
|
||||
/** IxLan ID */
|
||||
id: number;
|
||||
|
||||
/** Exchange ID */
|
||||
ix_id: number;
|
||||
|
||||
/** Exchange object (when depth > 0) */
|
||||
ix?: any;
|
||||
|
||||
/** LAN name */
|
||||
name: string;
|
||||
|
||||
/** Description */
|
||||
descr: string;
|
||||
|
||||
/** MTU size */
|
||||
mtu: number;
|
||||
|
||||
/** VLANs */
|
||||
vlan: number | null;
|
||||
|
||||
/** Dot1q support */
|
||||
dot1q_support: boolean;
|
||||
|
||||
/** Route server ASN */
|
||||
rs_asn: number | null;
|
||||
|
||||
/** ARP sponge */
|
||||
arp_sponge: string | null;
|
||||
|
||||
/** Related IX prefixes */
|
||||
ixpfx_set?: number[] | any[];
|
||||
|
||||
/** Related network IX LANs */
|
||||
netixlan_set?: number[] | any[];
|
||||
}
|
||||
25
ts/interfaces/peeringdb.api.ixpfx.ts
Normal file
25
ts/interfaces/peeringdb.api.ixpfx.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* IX Prefix object from PeeringDB API
|
||||
* Represents an IP prefix used by an Internet Exchange
|
||||
*/
|
||||
export interface IIxPfx extends IPeeringDbBaseObject {
|
||||
/** IxPfx ID */
|
||||
id: number;
|
||||
|
||||
/** IX LAN ID */
|
||||
ixlan_id: number;
|
||||
|
||||
/** IX LAN object (when depth > 0) */
|
||||
ixlan?: any;
|
||||
|
||||
/** IP prefix */
|
||||
prefix: string;
|
||||
|
||||
/** Protocol (IPv4 or IPv6) */
|
||||
protocol: string;
|
||||
|
||||
/** Peering point */
|
||||
in_dfz: boolean;
|
||||
}
|
||||
34
ts/interfaces/peeringdb.api.netfac.ts
Normal file
34
ts/interfaces/peeringdb.api.netfac.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* Network Facility object from PeeringDB API
|
||||
* Represents a network's presence at a colocation facility
|
||||
*/
|
||||
export interface INetFac extends IPeeringDbBaseObject {
|
||||
/** NetFac ID */
|
||||
id: number;
|
||||
|
||||
/** Network ID */
|
||||
net_id: number;
|
||||
|
||||
/** Network object (when depth > 0) */
|
||||
net?: any;
|
||||
|
||||
/** Facility ID */
|
||||
fac_id: number;
|
||||
|
||||
/** Facility object (when depth > 0) */
|
||||
fac?: any;
|
||||
|
||||
/** Availability percentage */
|
||||
avail_sonet: boolean;
|
||||
|
||||
/** Availability percentage */
|
||||
avail_ethernet: boolean;
|
||||
|
||||
/** Availability percentage */
|
||||
avail_atm: boolean;
|
||||
|
||||
/** Local ASN */
|
||||
local_asn: number | null;
|
||||
}
|
||||
43
ts/interfaces/peeringdb.api.netixlan.ts
Normal file
43
ts/interfaces/peeringdb.api.netixlan.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* Network IX LAN object from PeeringDB API
|
||||
* Represents a network's presence at an Internet Exchange
|
||||
*/
|
||||
export interface INetIxLan extends IPeeringDbBaseObject {
|
||||
/** NetIxLan ID */
|
||||
id: number;
|
||||
|
||||
/** Network ID */
|
||||
net_id: number;
|
||||
|
||||
/** Network object (when depth > 0) */
|
||||
net?: any;
|
||||
|
||||
/** IX LAN ID */
|
||||
ixlan_id: number;
|
||||
|
||||
/** IX LAN object (when depth > 0) */
|
||||
ixlan?: any;
|
||||
|
||||
/** Notes (markdown) */
|
||||
notes: string;
|
||||
|
||||
/** Speed in Mbps */
|
||||
speed: number;
|
||||
|
||||
/** Autonomous System Number (ASN) */
|
||||
asn: number;
|
||||
|
||||
/** IPv4 address */
|
||||
ipaddr4: string | null;
|
||||
|
||||
/** IPv6 address */
|
||||
ipaddr6: string | null;
|
||||
|
||||
/** Is route server */
|
||||
is_rs_peer: boolean;
|
||||
|
||||
/** Operational status */
|
||||
operational: boolean;
|
||||
}
|
||||
91
ts/interfaces/peeringdb.api.network.ts
Normal file
91
ts/interfaces/peeringdb.api.network.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* Network object from PeeringDB API
|
||||
* Represents an autonomous system (AS) and its peering information
|
||||
*/
|
||||
export interface INetwork extends IPeeringDbBaseObject {
|
||||
/** Network ID */
|
||||
id: number;
|
||||
|
||||
/** Organization ID */
|
||||
org_id: number;
|
||||
|
||||
/** Organization object (when depth > 0) */
|
||||
org?: any;
|
||||
|
||||
/** Network name */
|
||||
name: string;
|
||||
|
||||
/** Also known as (alternate names) */
|
||||
aka: string;
|
||||
|
||||
/** Website */
|
||||
website: string;
|
||||
|
||||
/** Autonomous System Number (ASN) */
|
||||
asn: number;
|
||||
|
||||
/** Looking glass URL */
|
||||
looking_glass: string;
|
||||
|
||||
/** Route server URL */
|
||||
route_server: string;
|
||||
|
||||
/** IRR as-set/route-set */
|
||||
irr_as_set: string;
|
||||
|
||||
/** Network information (markdown) */
|
||||
info_type: string;
|
||||
|
||||
/** Network traffic levels */
|
||||
info_traffic: string;
|
||||
|
||||
/** Network ratios */
|
||||
info_ratio: string;
|
||||
|
||||
/** Network scope */
|
||||
info_scope: string;
|
||||
|
||||
/** Network types (NSP, Content, etc.) */
|
||||
info_types: string;
|
||||
|
||||
/** Peering policy */
|
||||
policy_url: string;
|
||||
|
||||
/** General policy (Open, Selective, etc.) */
|
||||
policy_general: string;
|
||||
|
||||
/** Location requirements for peering */
|
||||
policy_locations: string;
|
||||
|
||||
/** Ratio requirement */
|
||||
policy_ratio: boolean;
|
||||
|
||||
/** Contract requirement */
|
||||
policy_contracts: string;
|
||||
|
||||
/** Notes (markdown) */
|
||||
notes: string;
|
||||
|
||||
/** Number of unicast IPv4 prefixes */
|
||||
info_unicast: boolean;
|
||||
|
||||
/** Number of unicast IPv6 prefixes */
|
||||
info_ipv6: boolean;
|
||||
|
||||
/** Number of multicast prefixes */
|
||||
info_multicast: boolean;
|
||||
|
||||
/** Is never via route servers */
|
||||
info_never_via_route_servers: boolean;
|
||||
|
||||
/** Related network contacts */
|
||||
poc_set?: number[] | any[];
|
||||
|
||||
/** Related network-facility connections */
|
||||
netfac_set?: number[] | any[];
|
||||
|
||||
/** Related network-IX connections */
|
||||
netixlan_set?: number[] | any[];
|
||||
}
|
||||
55
ts/interfaces/peeringdb.api.organization.ts
Normal file
55
ts/interfaces/peeringdb.api.organization.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* Organization object from PeeringDB API
|
||||
* Organizations are the root object in PeeringDB and represent companies or entities
|
||||
*/
|
||||
export interface IOrganization extends IPeeringDbBaseObject {
|
||||
/** Organization ID */
|
||||
id: number;
|
||||
|
||||
/** Organization name */
|
||||
name: string;
|
||||
|
||||
/** Organization website */
|
||||
website: string;
|
||||
|
||||
/** Organization notes (markdown) */
|
||||
notes: string;
|
||||
|
||||
/** Address line 1 */
|
||||
address1: string;
|
||||
|
||||
/** Address line 2 */
|
||||
address2: string;
|
||||
|
||||
/** City */
|
||||
city: string;
|
||||
|
||||
/** State/Province */
|
||||
state: string;
|
||||
|
||||
/** Zip/Postal code */
|
||||
zipcode: string;
|
||||
|
||||
/** Country code (ISO 3166-1 alpha-2) */
|
||||
country: string;
|
||||
|
||||
/** Latitude */
|
||||
latitude: number | null;
|
||||
|
||||
/** Longitude */
|
||||
longitude: number | null;
|
||||
|
||||
/** Floor area (sqm) */
|
||||
floor_area: number | null;
|
||||
|
||||
/** Related networks */
|
||||
net_set?: number[] | any[];
|
||||
|
||||
/** Related facilities */
|
||||
fac_set?: number[] | any[];
|
||||
|
||||
/** Related internet exchanges */
|
||||
ix_set?: number[] | any[];
|
||||
}
|
||||
34
ts/interfaces/peeringdb.api.poc.ts
Normal file
34
ts/interfaces/peeringdb.api.poc.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { IPeeringDbBaseObject } from '../peeringdb.types.js';
|
||||
|
||||
/**
|
||||
* Point of Contact object from PeeringDB API
|
||||
* Represents a contact person for a network
|
||||
*/
|
||||
export interface IPointOfContact extends IPeeringDbBaseObject {
|
||||
/** POC ID */
|
||||
id: number;
|
||||
|
||||
/** Network ID */
|
||||
net_id: number;
|
||||
|
||||
/** Network object (when depth > 0) */
|
||||
net?: any;
|
||||
|
||||
/** Role/Position */
|
||||
role: string;
|
||||
|
||||
/** Visible (public/private/users) */
|
||||
visible: string;
|
||||
|
||||
/** Contact name */
|
||||
name: string;
|
||||
|
||||
/** Phone number */
|
||||
phone: string;
|
||||
|
||||
/** Email address */
|
||||
email: string;
|
||||
|
||||
/** URL */
|
||||
url: string;
|
||||
}
|
||||
Reference in New Issue
Block a user