Migrated first short URL reducers to typescript

This commit is contained in:
Alejandro Celaya
2020-08-24 18:52:52 +02:00
parent fefa4e7848
commit d8f3952920
9 changed files with 134 additions and 35 deletions

View File

@@ -0,0 +1,29 @@
import { Nullable } from '../../utils/utils';
export interface ShortUrlData {
longUrl: string;
tags?: string[];
customSlug?: string;
shortCodeLength?: number;
domain?: string;
validSince?: string;
validUntil?: string;
maxVisits?: number;
findIfExists?: boolean;
}
export interface ShortUrl {
shortCode: string;
shortUrl: string;
longUrl: string;
visitsCount: number;
meta: Required<Nullable<ShortUrlMeta>>;
tags: string[];
domain: string | null;
}
export interface ShortUrlMeta {
validSince?: string;
validUntil?: string;
maxVisits?: number;
}