@trophyso/node
Version:
NodeJS SDK for the Trophy API
29 lines (28 loc) • 1.35 kB
TypeScript
/**
* This file was auto-generated by Fern from our API Definition.
*/
import * as TrophyApi from "..";
export interface AchievementResponse {
/** The unique ID of the achievement. */
id: string;
/** The name of this achievement. */
name: string;
/** The trigger of the achievement. */
trigger: TrophyApi.AchievementResponseTrigger;
/** The description of this achievement. */
description?: string;
/** The URL of the badge image for the achievement, if one has been uploaded. */
badgeUrl?: string;
/** The key used to reference this achievement in the API (only applicable if trigger = 'api') */
key?: string;
/** The length of the streak required to complete the achievement (only applicable if trigger = 'streak') */
streakLength?: number;
/** The ID of the metric associated with this achievement (only applicable if trigger = 'metric') */
metricId?: string;
/** The value of the metric required to complete the achievement (only applicable if trigger = 'metric') */
metricValue?: number;
/** The name of the metric associated with this achievement (only applicable if trigger = 'metric') */
metricName?: string;
/** The user's current streak for the metric, if the metric has streaks enabled. */
currentStreak?: TrophyApi.MetricEventStreakResponse;
}