type WrapSplashOptions = { access_key?: string; secret_key?: string; redirect_uri?: string; code?: string; bearer_token?: string; timeout?: number; retries?: number; retryDelayMs?: number; }; type WrapSplashResponse = Record; interface ErrorOptions { cause?: unknown; statusCode?: number; statusText?: string; } declare class WrapSplashError extends Error { statusCode?: number; statusText?: string; cause?: unknown; constructor(message: string, options?: ErrorOptions | number, statusText?: string, cause?: unknown); } declare class WrapSplashApi { private API_LOCATION; private BEARER_TOKEN_URL; private options; private access_key; private secret_key; private redirect_uri; private code; private grant_type; private bearer_token; private timeout; private retries; private retryDelayMs; private headers; private computeHash; private validateRequired; private validateSupportedValue; private availableOrders; private availableOrientations; /** Initialize the client with API credentials or a bearer token. */ init: (options?: WrapSplashOptions) => void; private buildQueryParameters; private getErrorMessage; private createWrapSplashError; private fetchUrl; /** Exchange the authorization code for a bearer token. */ generateBearerToken: () => Promise; getCurrentUserProfile: () => Promise; updateCurrentUserProfile: (username?: string, first_name?: string, last_name?: string, email?: string, url?: string, location?: string, bio?: string, instagram_username?: string) => Promise; getPublicProfile: (username: string, width?: number, height?: number) => Promise; getUserPortfolio: (username: string) => Promise; getUserPhotos: (username: string, page?: number, per_page?: number, stats?: boolean, resolution?: string, quantity?: number, order_by?: string) => Promise; getUserLikedPhotos: (username: string, page?: number, per_page?: number, order_by?: string) => Promise; getUserCollections: (username: string, page?: number, per_page?: number) => Promise; getUserStatistics: (username: string, resolution?: string, quantity?: number) => Promise; listPhotos: (page?: number, per_page?: number, order_by?: string) => Promise; listCuratedPhotos: (page?: number, per_page?: number, order_by?: string) => Promise; getAPhoto: (id: string, width?: number, height?: number, rect?: string) => Promise; getARandomPhoto: (collections?: string | number, featured?: boolean, username?: string, query?: string, width?: number, height?: number, orientation?: string, count?: number) => Promise; getPhotoStatistics: (id: string, resolution?: string, quantity?: number) => Promise; getPhotoLink: (id: string) => Promise; updatePhoto: (id: string, location?: Record, exif?: Record) => Promise; likePhoto: (id: string) => Promise; unlikePhoto: (id: string) => Promise; search: (query: string, page?: number, per_page?: number, collections?: string | number, orientation?: string) => Promise; searchCollections: (query: string, page?: number, per_page?: number) => Promise; searchUsers: (query: string, page?: number, per_page?: number) => Promise; getStatsTotals: () => Promise; getStatsMonth: () => Promise; listCollections: (page?: number, per_page?: number) => Promise; listFeaturedCollections: (page?: number, per_page?: number) => Promise; listCuratedCollections: (page?: number, per_page?: number) => Promise; getCollection: (id: string) => Promise; getCuratedCollection: (id: string) => Promise; getCollectionPhotos: (id: string, page?: number, per_page?: number) => Promise; getCuratedCollectionPhotos: (id: string, page?: number, per_page?: number) => Promise; listRelatedCollections: (id: string) => Promise; /** Fetch a photo using the newer alias. */ getPhoto: (id: string, width?: number, height?: number, rect?: string) => Promise; getRandomPhoto: (collections?: string | number, featured?: boolean, username?: string, query?: string, width?: number, height?: number, orientation?: string, count?: number) => Promise; createNewCollection: (title: string, description?: string, private_collection?: boolean) => Promise; /** Create a collection using the newer alias. */ createCollection: (title: string, description?: string, private_collection?: boolean) => Promise; /** * Backward-compatible alias for createNewCollection. * @deprecated Use createNewCollection instead. */ createNewColection: (title: string, description?: string, private_collection?: boolean) => Promise; updateExistingCollection: (id: string, title: string, description?: string, private_collection?: boolean) => Promise; /** Update an existing collection using the newer alias. */ updateCollection: (id: string, title: string, description?: string, private_collection?: boolean) => Promise; deleteCollection: (id: string) => Promise; addPhotoToCollection: (collection_id: string, photo_id: string) => Promise; removePhotoFromCollection: (collection_id: string, photo_id: string) => Promise; } export { WrapSplashError }; export default WrapSplashApi;