39 lines
783 B
TypeScript
39 lines
783 B
TypeScript
/**
|
|
* Application Port: ILiveryStorage
|
|
*
|
|
* Defines interface for livery image storage.
|
|
* Infrastructure will provide cloud storage adapter.
|
|
*/
|
|
|
|
export interface UploadResult {
|
|
success: boolean;
|
|
imageUrl?: string;
|
|
error?: string;
|
|
timestamp: Date;
|
|
}
|
|
|
|
export interface ILiveryStorage {
|
|
/**
|
|
* Upload a livery image
|
|
*/
|
|
upload(
|
|
imageData: Buffer | string,
|
|
fileName: string,
|
|
metadata?: Record<string, unknown>
|
|
): Promise<UploadResult>;
|
|
|
|
/**
|
|
* Download a livery image
|
|
*/
|
|
download(imageUrl: string): Promise<Buffer>;
|
|
|
|
/**
|
|
* Delete a livery image
|
|
*/
|
|
delete(imageUrl: string): Promise<void>;
|
|
|
|
/**
|
|
* Generate a signed URL for temporary access
|
|
*/
|
|
generateSignedUrl(imageUrl: string, expiresInSeconds: number): Promise<string>;
|
|
} |