clean-insights-sdk
Version:
A privacy-preserving measurement framework.
37 lines (36 loc) • 1.02 kB
TypeScript
/**
* DataPoint.ts
* CleanInsightsSDK
*
* Created by Benjamin Erhart on 19.01.21.
* Copyright © 2021 Guardian Project. All rights reserved.
*/
export { DataPoint, DataPointData };
import dayjs from 'dayjs';
interface DataPointData {
campaignId: string;
times?: number;
first?: dayjs.Dayjs;
last?: dayjs.Dayjs;
}
declare class DataPoint {
campaignId: string;
times: number;
first: dayjs.Dayjs;
last: dayjs.Dayjs;
/**
* @param {string} campaignId
* The campaign ID this data point is for.
*
* @param {number=} times=1
* Number of times this data point has arisen between `first` and `last`. OPTIONAL.
*
* @param {dayjs.Dayjs=} first=NOW
* The first time this data point has arisen. OPTIONAL.
*
* @param {dayjs.Dayjs=} last=NOW
* The last time this data point has arisen. OPTIONAL.
*/
constructor(campaignId: string, times?: number, first?: dayjs.Dayjs, last?: dayjs.Dayjs);
toString(): string;
}