one
Version:
One is a React framework for web, iOS, and Android apps.
56 lines • 3.68 kB
TypeScript
import type { PhotoLibraryAsset, PhotoLibraryAssetPage, PhotoLibraryAlbum, PhotoLibraryAlbumPage, PhotoLibraryMediaType, PhotoLibraryPermissionStatus } from '../specs/OnePhotoLibrary.nitro';
export type { PhotoLibraryAsset, PhotoLibraryAssetPage, PhotoLibraryAlbum, PhotoLibraryAlbumPage, PhotoLibraryMediaType, PhotoLibraryPermissionStatus };
declare function getAddPermissionStatus(): PhotoLibraryPermissionStatus;
declare function requestAddPermission(): Promise<PhotoLibraryPermissionStatus>;
declare function getReadPermissionStatus(): PhotoLibraryPermissionStatus;
declare function requestReadPermission(): Promise<PhotoLibraryPermissionStatus>;
declare function presentLimitedLibraryPicker(): Promise<string[]>;
declare function listAssets(offset?: number, limit?: number): Promise<PhotoLibraryAssetPage>;
declare function getAsset(identifier: string): Promise<PhotoLibraryAsset>;
declare function listAlbums(offset?: number, limit?: number): Promise<PhotoLibraryAlbumPage>;
declare function getAlbum(identifier: string): Promise<PhotoLibraryAlbum>;
declare function createAlbum(title: string): Promise<string>;
declare function renameAlbum(identifier: string, title: string): Promise<void>;
declare function listAlbumAssets(identifier: string, offset?: number, limit?: number): Promise<PhotoLibraryAssetPage>;
declare function addAssetToAlbum(albumIdentifier: string, assetIdentifier: string): Promise<void>;
declare function removeAssetFromAlbum(albumIdentifier: string, assetIdentifier: string): Promise<void>;
declare function deleteAlbum(identifier: string): Promise<void>;
declare function setFavorite(identifier: string, favorite: boolean): Promise<void>;
declare function deleteAsset(identifier: string): Promise<void>;
declare function replaceImageContent(identifier: string, uri: string): Promise<void>;
declare function replaceVideoContent(identifier: string, uri: string): Promise<void>;
declare function revertAssetContent(identifier: string): Promise<void>;
declare function exportOriginalAsset(identifier: string, allowNetwork?: boolean): Promise<string>;
declare function exportCurrentImage(identifier: string, allowNetwork?: boolean): Promise<string>;
declare function exportCurrentVideo(identifier: string, allowNetwork?: boolean): Promise<string>;
declare function saveImage(uri: string): Promise<string>;
declare function saveVideo(uri: string): Promise<string>;
declare const nativePhotoLibrary: Readonly<{
getAddPermissionStatus: typeof getAddPermissionStatus;
requestAddPermission: typeof requestAddPermission;
getReadPermissionStatus: typeof getReadPermissionStatus;
requestReadPermission: typeof requestReadPermission;
presentLimitedLibraryPicker: typeof presentLimitedLibraryPicker;
listAssets: typeof listAssets;
getAsset: typeof getAsset;
listAlbums: typeof listAlbums;
getAlbum: typeof getAlbum;
createAlbum: typeof createAlbum;
renameAlbum: typeof renameAlbum;
listAlbumAssets: typeof listAlbumAssets;
addAssetToAlbum: typeof addAssetToAlbum;
removeAssetFromAlbum: typeof removeAssetFromAlbum;
deleteAlbum: typeof deleteAlbum;
setFavorite: typeof setFavorite;
deleteAsset: typeof deleteAsset;
replaceImageContent: typeof replaceImageContent;
replaceVideoContent: typeof replaceVideoContent;
revertAssetContent: typeof revertAssetContent;
exportOriginalAsset: typeof exportOriginalAsset;
exportCurrentImage: typeof exportCurrentImage;
exportCurrentVideo: typeof exportCurrentVideo;
saveImage: typeof saveImage;
saveVideo: typeof saveVideo;
}>;
export declare const PhotoLibrary: typeof nativePhotoLibrary;
//# sourceMappingURL=index.native.d.ts.map