import { KuzzleRequest } from "kuzzle"; import { JSONObject, KDocument } from "kuzzle-sdk"; import { DeviceContent } from "../device"; import { DecodedMeasurement } from "../measure"; import { DeviceManagerPlugin } from "../plugin"; import { BaseService } from "../shared"; import { Decoder } from "./Decoder"; export declare class PayloadService extends BaseService { constructor(plugin: DeviceManagerPlugin); /** * Process a payload by validating and decode it with the `decoder` associated * with the device model. It : * - register the brut `Payload` * - redirect measurements to MeasureService */ receive(request: KuzzleRequest, decoder: Decoder, { refresh }?: any): Promise<{ valid: boolean; }>; receiveFormated(device: KDocument, measurements: DecodedMeasurement[], { payloadUuids }?: { payloadUuids?: string[]; }): Promise; /** * Method used to save the payload and catch + log the error if any. * * This method never returns a rejected promise. */ private savePayload; /** * Get devices or create missing ones (when auto-provisionning is enabled) */ private retrieveDevices; private provisionDevices; prune(days: number, onlyValid: boolean, { deviceModel }?: { deviceModel?: string; }): Promise; receiveUnknown(deviceModel: string, payload: JSONObject, apiAction: string): Promise; }