@brizy/media-gallery
Version:
45 lines (44 loc) • 934 B
TypeScript
export interface GetItemsVariables {
search: string;
page: number;
count: number;
}
interface UserLinks {
html: string;
}
export interface User {
username: string;
links: UserLinks;
}
interface Urls {
raw: string;
full: string;
regular: string;
small: string;
thumb: string;
small_s3: string;
}
interface ImageLinks {
self: string;
html: string;
download: string;
download_location: string;
}
export interface SelectedFile {
id: string;
slug: string;
width: number;
height: number;
urls: Urls;
links: ImageLinks;
user: User;
alt_description: string;
}
export type Data = SelectedFile | undefined;
export type Api = Data[] | undefined;
export type GetItems = (input: GetItemsVariables) => Promise<Api>;
export interface DownloadItemData {
url: string;
}
export type DownloadItem = (id: string) => Promise<DownloadItemData>;
export {};