Skip to main content
Glama
constants.ts1.71 kB
export const BC_REGIONS = { 'Lower Mainland': { id: 'drivebc.ca/1', name: 'Lower Mainland' }, 'Vancouver Island': { id: 'drivebc.ca/2', name: 'Vancouver Island' }, 'Thompson Okanagan': { id: 'drivebc.ca/3', name: 'Thompson Okanagan' }, 'Kootenay Rockies': { id: 'drivebc.ca/4', name: 'Kootenay Rockies' }, 'Cariboo': { id: 'drivebc.ca/5', name: 'Cariboo' }, 'Northern BC': { id: 'drivebc.ca/6', name: 'Northern BC' }, } as const; export const MAJOR_HIGHWAYS = [ 'Highway 1', 'Highway 3', 'Highway 5', 'Highway 16', 'Highway 97', 'Highway 99', 'Highway 1A', 'Highway 7', 'Highway 17', 'Highway 19', ] as const; export const EVENT_TYPES = { CONSTRUCTION: 'CONSTRUCTION', INCIDENT: 'INCIDENT', SPECIAL_EVENT: 'SPECIAL_EVENT', WEATHER_CONDITION: 'WEATHER_CONDITION', ROAD_CONDITION: 'ROAD_CONDITION', } as const; export const SEVERITY_LEVELS = { MINOR: 'MINOR', MODERATE: 'MODERATE', MAJOR: 'MAJOR', UNKNOWN: 'UNKNOWN', } as const; export function normalizeHighwayName(input: string): string { const trimmed = input.trim(); if (/^\d+[A-Za-z]?$/.test(trimmed)) { return `Highway ${trimmed}`; } if (/^highway\s+\d+[A-Za-z]?$/i.test(trimmed)) { const parts = trimmed.split(/\s+/); return `Highway ${parts[1]}`; } if (/^hwy\s+\d+[A-Za-z]?$/i.test(trimmed)) { const parts = trimmed.split(/\s+/); return `Highway ${parts[1]}`; } return trimmed; } export function findRegionId(regionName: string): string | null { const normalized = regionName.toLowerCase().trim(); for (const [key, value] of Object.entries(BC_REGIONS)) { if (key.toLowerCase() === normalized) { return value.id; } } return null; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/infil00p/DriveBC_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server