node-flipr-client
Version:
Node client for the Flipr Developper API
83 lines • 2.12 kB
TypeScript
import { BodyInit, Response } from 'node-fetch';
export interface FliprModule {
ActivationKey: string;
IsSuspended: string;
Status: {
Comment: string;
DateTime: string;
Status: string;
};
BatteryPlugDate: string;
Comments: string;
NoAlertUnil: string;
Serial: string;
PAC: string;
ResetsCounter: string;
SigfoxStatus: string;
OffsetOrp: string;
OffsetTemperature: string;
OffsetPh: string;
OffsetConductivite: string;
IsForSpa: string;
Version: string;
LastMeasureDateTime: string;
CommercialType: {
Id: string;
Value: string;
};
SubscribtionValidUntil: string;
ModuleType_Id: string;
Eco_Mode: string;
EnableFliprFirmwareUpgrade: string;
FliprFirmwareUpgradeAttempt: string;
FliprFirmwareUpgradeStart: string;
FliprFirmwareUpgradeEnd: string;
BEflipr: string;
IsSubscriptionValid: string;
}
interface FliprSurvey {
MeasureId: number;
Source: string;
DateTime: string;
Temperature: number;
PH: {
Label: string;
Message: string;
Deviation: number;
Value: number;
DeviationSector: string;
};
OxydoReductionPotentiel: {
Label: string;
Value: number;
};
Conductivity: {
Label: string;
Level: string;
};
UvIndex: number;
Battery: {
Label: string;
Deviation: number;
};
Desinfectant: {
Label: string;
Message: string;
Deviation: number;
Value: number;
DeviationSector: string;
};
}
export default class FliprClient {
access_token: string;
debug: any;
origin: string;
authenticate(username: any, password: any): Promise<void>;
request(method: 'GET' | 'POST', path: any, body?: BodyInit): Promise<Response>;
get(path: `/${string}`): Promise<Response>;
post(path: any, body: BodyInit): Promise<Response>;
modules(): Promise<FliprModule[]>;
lastSurvey(serial: FliprModule['Serial']): Promise<FliprSurvey>;
}
export {};
//# sourceMappingURL=index.d.ts.map