mirror of
https://github.com/stonith404/pingvin-share.git
synced 2024-06-02 22:00:14 +02:00
b717663b5c
* add name property to share * refactor: run formatter * tests: adapt system tests * tests: adapt second system test
46 lines
744 B
TypeScript
46 lines
744 B
TypeScript
import User from "./user.type";
|
|
|
|
export type Share = {
|
|
id: string;
|
|
name?: string;
|
|
files: any;
|
|
creator: User;
|
|
description?: string;
|
|
expiration: Date;
|
|
size: number;
|
|
hasPassword: boolean;
|
|
};
|
|
|
|
export type CreateShare = {
|
|
id: string;
|
|
name?: string;
|
|
description?: string;
|
|
recipients: string[];
|
|
expiration: string;
|
|
security: ShareSecurity;
|
|
};
|
|
|
|
export type ShareMetaData = {
|
|
id: string;
|
|
isZipReady: boolean;
|
|
};
|
|
|
|
export type MyShare = Share & {
|
|
views: number;
|
|
createdAt: Date;
|
|
};
|
|
|
|
export type MyReverseShare = {
|
|
id: string;
|
|
maxShareSize: string;
|
|
shareExpiration: Date;
|
|
remainingUses: number;
|
|
token: string;
|
|
shares: MyShare[];
|
|
};
|
|
|
|
export type ShareSecurity = {
|
|
maxViews?: number;
|
|
password?: string;
|
|
};
|