halton-iot-mcp
Version:
MCP Server for Halton IoT Data API
221 lines • 5.75 kB
TypeScript
/**
* Type definitions for Halton IoT API
*/
export interface SystemsRequest {
systems: string[];
}
export interface DateTimeRange {
from: string;
to: string;
}
export interface Pagination {
pageNumber: number;
pageSize: number;
orderByType: "Ascending" | "Descending";
}
export interface AggregateSeriesRequest extends SystemsRequest {
dateTimeRange: DateTimeRange;
intervalSeconds: number;
}
export interface AggregateSeriesMultipleRequest extends AggregateSeriesRequest {
variables: string[];
}
export interface LastEventValueMultipleRequest extends SystemsRequest {
variables: string[];
}
export interface RawEventsRequest extends SystemsRequest {
maxResults: number;
dateTimeRange: DateTimeRange;
}
export interface SearchSystemVariablesRequest extends SystemsRequest {
searchWords: string[];
pagination?: Pagination;
}
export interface CreateTokenRequest {
scope?: TokenGranularity[];
globalAccess?: AccessRole;
name?: string;
description?: string;
expiration: string;
}
export interface TokenGranularity {
system: string;
accessRole: AccessRole;
}
export type AccessRole = "Admin" | "Operator" | "User";
export interface AuthRequestBody {
systemIds: number[];
templateId: number;
expirationTime?: string;
}
export interface SearchSystemsResponseData {
systemName?: string;
message?: string;
connectionStatus?: boolean;
countryCode?: string;
gatewayId?: string;
vpnId?: string;
phoneNo?: string;
location?: string;
systemType?: string;
description?: string;
latitude?: number;
longitude?: number;
elevation?: number;
timeZone?: string;
}
export interface SystemVariableMetadataResponse {
variableName?: string;
unit?: string;
scaleFactor?: string;
displayName?: string;
alarm: boolean;
dataType?: string;
precision?: string;
enums?: string;
device?: string;
property?: string;
protocolData?: string;
collectionParameters?: SystemVariablesCollectionParameters;
}
export interface SystemVariablesCollectionParameters {
collected: boolean;
historyCapacity: number;
tresholdType?: string;
treshold?: string;
}
export interface SystemVariablesMetadataResponse {
systemName?: string;
message?: string;
variableCount?: number;
systemVariables?: SystemVariableMetadataResponse[];
}
export interface AggregateSeriesResponseData {
timestamp: string;
value?: number;
eventCount: number;
min?: number;
max?: number;
average?: number;
median?: number;
standardDeviation?: number;
statusTrue?: number;
statusFalse?: number;
}
export interface AggregateSeriesMultipleResponseData extends AggregateSeriesResponseData {
variableName?: string;
propertyType?: string;
}
export interface AggregateSeriesResponse {
countryCode?: string;
message?: string;
systemName?: string;
variableName?: string;
propertyType?: string;
resultEventCount?: number;
intervalMinutes?: number;
data?: AggregateSeriesResponseData[];
}
export interface AggregateSeriesMultipleResponse {
propertyType?: boolean;
message?: string;
resultEventCount?: number;
intervalMinutes?: number;
data?: AggregateSeriesMultipleResponseData[];
}
export interface LastEventValueResponseData {
timestamp?: string;
value?: string;
}
export interface LastEventValueResponse {
countryCode?: string;
message?: string;
systemName?: string;
variableName?: string;
propertyType?: string;
data?: LastEventValueResponseData;
}
export interface LastEventValueMultipleResponseData {
variableName?: string;
timestamp?: string;
value?: string;
propertyType?: string;
}
export interface LastEventValueMultipleResponse {
data?: LastEventValueMultipleResponseData[];
countryCode?: string;
systemName?: string;
message?: string;
}
export interface RawEventsResponseData {
timestamp?: string;
value?: string;
}
export interface RawEventsResponse {
countryCode?: string;
message?: string;
systemName?: string;
variableName?: string;
propertyType?: string;
resultEventCount?: number;
data?: RawEventsResponseData[];
}
export interface SystemVariableResponseData {
id: number;
variableName?: string;
unit?: string;
scaleFactor?: string;
displayName?: string;
alarm: boolean;
dataType?: string;
precision?: string;
protocolData?: string;
enums?: string;
lastEventValue?: LastEventValueResponseData;
}
export interface SystemVariableResponse {
variables?: SystemVariableResponseData[];
message?: string;
systemId?: string;
resultCount?: number;
}
export interface SystemVariableResponseGenericReturnBody {
data?: Record<string, SystemVariableResponse>;
pageNumber: number;
pageSize: number;
orderByType: "Ascending" | "Descending";
}
export interface TokenInformation {
uuid: string;
name?: string;
description?: string;
expiresAt: string;
isRevoked: boolean;
accessess?: AccessesInformation[];
}
export interface AccessesInformation {
systemId?: string;
isGlobalAccess: boolean;
accessRole: AccessRole;
}
export interface CreateTokenResponse {
message?: string;
token?: string;
tokenInformation?: TokenInformation;
}
export interface RequestResponse {
message: string;
content?: string;
}
export interface TemplateBase {
templateDescription?: string;
systems?: unknown;
}
export interface ProblemDetails {
type?: string;
title?: string;
status?: number;
detail?: string;
instance?: string;
}
//# sourceMappingURL=types.d.ts.map