UNPKG

gplayapi-ts

Version:
39 lines (37 loc) 897 B
/** * Common models and shared interfaces */ interface NetworkResponse { data: Buffer; status: number; } interface RequestOptions extends RequestInit { method?: string; headers?: Record<string, string>; body?: Buffer | string; } interface APIEndpointOptions { method?: string; params?: Record<string, string>; body?: any; } interface PaginatedResponse<T> { items: T[]; nextPageToken?: string; totalItems?: number; } declare enum ImageType { CATEGORY_ICON = 0, APP_ICON = 1, YOUTUBE_VIDEO_THUMBNAIL = 2, PLAY_STORE_PAGE_BACKGROUND = 3, APP_SCREENSHOT = 4 } declare enum HttpStatusCode { OK = 200, UNAUTHORIZED = 401, FORBIDDEN = 403, NOT_FOUND = 404, INTERNAL_SERVER_ERROR = 500 } export { type APIEndpointOptions, HttpStatusCode, ImageType, type NetworkResponse, type PaginatedResponse, type RequestOptions };