@trophyso/node
Version:
NodeJS SDK for the Trophy API
24 lines (23 loc) • 1.21 kB
TypeScript
import type * as TrophyApi from "../index";
export interface BaseStreakResponse {
/** The length of the user's current streak. */
length: number;
/** The frequency of the streak. */
frequency: TrophyApi.StreakFrequency;
/** The date the streak started. */
started?: string;
/** The start date of the current streak period. */
periodStart?: string;
/** The end date of the current streak period. */
periodEnd?: string;
/** The date the streak will expire if the user does not increment a metric. */
expires?: string;
/** The number of available streak freezes. Only present if the organization has enabled streak freezes. */
freezes?: number;
/** The maximum number of streak freezes a user can have. Only present if the organization has enabled streak freezes. */
maxFreezes?: number;
/** The interval at which the user will earn streak freezes, in days. Only present if the organization has enabled streak freeze auto-earn. */
freezeAutoEarnInterval?: number;
/** The amount of streak freezes the user will earn per interval. Only present if the organization has enabled streak freeze auto-earn. */
freezeAutoEarnAmount?: number;
}