import { RoomObjectType } from './rooms'; import { UserBadgeSvgs } from './users'; /** * An instance of a {@link Decoration} that is owned by a user * @category Common - Decorations */ export interface DecorationInstance
{ _id: string; /** The owner's user ID */ user: string; /** Selected property values for an active decoration (null if inactive) */ active?: { [key in P]: unknown; } | null; /** The underlying decoration */ decoration: BadgeDecoration | Decoration
; /** ISO 8601 timestamp */ createdAt: string; /** ISO 8601 timestamp */ updatedAt?: string; /** ISO 8601 timestamp */ activatedAt?: string; /** ISO 8601 timestamp */ deactivatedAt?: string; } /** * Enumerates all possible {@link Decoration.type} values * @enum * @category Common - Decorations */ export declare const DecorationTypes: { readonly Badge: "badge"; readonly Creep: "creep"; readonly FloorLandscape: "floorLandscape"; readonly Graffiti: "wallGraffiti"; readonly Object: "object"; readonly WallLandscape: "wallLandscape"; }; /** * A {@link DecorationTypes} value * @category Common - Decorations */ export type DecorationType = typeof DecorationTypes[keyof typeof DecorationTypes]; /** * Properties common to all decoration types * @category Common - Decorations */ export interface DecorationBase { _id: string; name: string; /** Whether or not this decoration is being used somewhere */ enabled?: boolean; /** Number from 1 (least rare) to 5 (most rare) */ rarity: number; rarityMultiplier?: number; /** Group ID */ group: string; groupDescription: string | null; /** Theme ID */ theme: string; /** Preview image asset URLs */ preview: { 'original': string; '128x128': string; '256x256': string; }; steam: number; steamItemDefId: number; /** Appears to always be 0 */ __v: number; } /** * Represents a single premium user {@link UserBadge}. * {@link DecorationInstance}s of each badge can be earned by users via pixelization. * @category Common - Decorations */ export interface BadgeDecoration extends DecorationBase { type: 'badge'; badge: UserBadgeSvgs; } /** * Represents a single non-{@link BadgeDecoration} decoration. * {@link DecorationInstance | instances} of each decoration can be earned * by users via pixelization. * @param P An optional union of {@link DecorationProperty.label} names for this decoration * @category Common - Decorations */ export interface Decoration
extends DecorationBase {
type: Exclude