Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
53 lines
1.5 KiB
TypeScript
53 lines
1.5 KiB
TypeScript
/**
|
|
* Service for ISP metrics and SD-WAN configurations
|
|
*/
|
|
|
|
import { SiteManagerClient } from '../client/SiteManagerClient.js';
|
|
import { ISPMetric, SDWANConfig, SDWANConfigStatus } from '../types/metrics.js';
|
|
|
|
export class MetricsService {
|
|
constructor(private client: SiteManagerClient) {}
|
|
|
|
/**
|
|
* Get ISP metrics
|
|
*/
|
|
async getISPMetrics(params?: Record<string, any>): Promise<ISPMetric[]> {
|
|
const response = await this.client.requestPaginated<ISPMetric>('GET', '/isp-metrics', {
|
|
params,
|
|
});
|
|
return Array.isArray(response.data) ? response.data : [];
|
|
}
|
|
|
|
/**
|
|
* Query ISP metrics with filters
|
|
*/
|
|
async queryISPMetrics(params?: Record<string, any>): Promise<ISPMetric[]> {
|
|
const response = await this.client.requestPaginated<ISPMetric>('GET', '/isp-metrics/query', {
|
|
params,
|
|
});
|
|
return Array.isArray(response.data) ? response.data : [];
|
|
}
|
|
|
|
/**
|
|
* List SD-WAN configurations
|
|
*/
|
|
async listSDWANConfigs(): Promise<SDWANConfig[]> {
|
|
const response = await this.client.requestPaginated<SDWANConfig>('GET', '/sd-wan-configs');
|
|
return Array.isArray(response.data) ? response.data : [];
|
|
}
|
|
|
|
/**
|
|
* Get SD-WAN config by ID
|
|
*/
|
|
async getSDWANConfig(id: string): Promise<SDWANConfig> {
|
|
return await this.client.request<SDWANConfig>('GET', `/sd-wan-configs/${id}`);
|
|
}
|
|
|
|
/**
|
|
* Get SD-WAN config status
|
|
*/
|
|
async getSDWANConfigStatus(id: string): Promise<SDWANConfigStatus> {
|
|
return await this.client.request<SDWANConfigStatus>('GET', `/sd-wan-configs/${id}/status`);
|
|
}
|
|
}
|