Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 1.68 KB

NETWORKCONNECTOR.md

File metadata and controls

69 lines (54 loc) · 1.68 KB

NetworkConnector Module

NetworkConnector is a parent class, for more information, check its children documentation.

Models

NetworkConnector

Defines the structure for NetworkConnector entities.

type NetworkConnector = {
  _id?: string | ObjectId;
  id: string | ObjectId;
  createdAt: Date | string;
  updatedAt: Date | string;
  deletedAt?: Date;
  kind: 'Splitter' | 'DIO' | 'Fusion' | 'Connector' | 'Passing' | 'Switch' | 'Shelf' | 'OLT' | 'Slot' | 'PON';
  connectables: (string | ObjectId | { input: (string | null)[]; output: (string | null)[] })[];
  index?: number;
  label?: string;
  attenuation: number[];
  implanted: boolean;
  isDrop: boolean;
  parent: string | ObjectId | BaseBox;
  project: string | ObjectId | Project;
  observation?: string;
  name?: string;
  size?: number;
  shelf?: string | ObjectId;
};

Example Usage

Fetching NetworkConnectors

import OZMapSDK from 'ozmapsdk';

const sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });

sdk.networkConnector.find({ page: 1, limit: 10 }).then((pagination) => {
  console.log('NetworkConnectors:', pagination);
});

Fetching a NetworkConnector by ID

import OZMapSDK from 'ozmapsdk';

const sdk = new OZMapSDK('ozmapURL', { apiKey: 'yourApiKey' });

sdk.networkConnector.findById('networkConnectorId').then((networkConnector) => {
  console.log('NetworkConnector:', networkConnector);
});