1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-06-02 22:00:14 +02:00
pingvin-share/frontend/src/types/share.type.ts
Elias Schneider b717663b5c
feat: add name property to share (#462)
* add name property to share

* refactor: run formatter

* tests: adapt system tests

* tests: adapt second system test
2024-05-03 17:12:26 +02:00

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;
};