feat: complete placement analysis workflow
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
export type CollectionCardState = {
|
||||
owned: boolean;
|
||||
awakening: number;
|
||||
};
|
||||
|
||||
export type SavedDeck = {
|
||||
id: string;
|
||||
name: string;
|
||||
cardIds: string[];
|
||||
settings: Record<string, unknown>;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type CardListPreferences = {
|
||||
types: string[];
|
||||
stats: string[];
|
||||
activeConditions: string[];
|
||||
specialConditions: string[];
|
||||
activeProbabilities: string[];
|
||||
cardVariants: string[];
|
||||
generations: string[];
|
||||
};
|
||||
|
||||
export type BoardCardPlacements = Record<string, Record<string, string>>;
|
||||
|
||||
export type UserDataV1 = {
|
||||
schemaVersion: 1;
|
||||
updatedAt: string;
|
||||
memoryCount: number;
|
||||
memberPowerUpPercent: number;
|
||||
collection: Record<string, CollectionCardState>;
|
||||
memberBoards: Record<string, string[]>;
|
||||
boardCards: BoardCardPlacements;
|
||||
savedDecks: SavedDeck[];
|
||||
preferences: CardListPreferences;
|
||||
};
|
||||
|
||||
export type UserData = UserDataV1;
|
||||
|
||||
export function createUserData(preferences: CardListPreferences): UserDataV1 {
|
||||
return {
|
||||
schemaVersion: 1,
|
||||
updatedAt: new Date().toISOString(),
|
||||
memoryCount: 0,
|
||||
memberPowerUpPercent: 0,
|
||||
collection: {},
|
||||
memberBoards: {},
|
||||
boardCards: {},
|
||||
savedDecks: [],
|
||||
preferences
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user