@trophyso/node
Version:
NodeJS SDK for the Trophy API
26 lines (25 loc) • 1.2 kB
TypeScript
/**
* This file was auto-generated by Fern from our API Definition.
*/
export interface AchievementResponse {
/** The unique ID of the achievement. */
id: string;
/** The name of this achievement. */
name: string;
/** The trigger of the achievement, either 'metric', 'streak', or 'api'. */
trigger: string;
/** The URL of the badge image for the achievement, if one has been uploaded. */
badgeUrl?: string;
/** The date and time the achievement was completed, in ISO 8601 format. */
achievedAt?: Date;
/** 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;
}