Files
SerpentRace/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.d.ts
T

31 lines
1.1 KiB
TypeScript

import { DeckAggregate } from '../../Domain/Deck/DeckAggregate';
import { IDeckRepository } from '../../Domain/IRepository/IDeckRepository';
export interface SprDeckData {
name: string;
type: number;
cards: any[];
ctype: number;
exportDate: string;
version: string;
}
export interface ImportDeckCommand {
name: string;
type: number;
cards: any[];
ctype?: number;
userid: string;
}
export declare class DeckImportExportService {
private readonly deckRepo;
private readonly encryptionKey;
private readonly algorithm;
constructor(deckRepo: IDeckRepository);
exportDeckToSpr(deckId: string, userId: string): Promise<Buffer>;
importDeckFromSpr(sprData: Buffer, userId: string): Promise<DeckAggregate>;
importDeckFromJson(jsonData: any, userId: string): Promise<DeckAggregate>;
adminImportFromJson(jsonData: any, targetUserId: string, adminUserId: string): Promise<DeckAggregate>;
private encrypt;
private decrypt;
generateFilename(deckName: string): string;
}
//# sourceMappingURL=DeckImportExportService.d.ts.map