UNPKG

@ohmi/camera-roll

Version:
35 lines (20 loc) 1.56 kB
/** * This code was generated by "react-native codegen-lib-harmony" */ import { Tag } from "@rnoh/react-native-openharmony/ts" export namespace RNCCameraRoll { export const NAME = 'RNCCameraRoll' as const export type PhotoIdentifier = {node: {id: string, type: string, subTypes: string, sourceType: string, group_name: string[], image: {filename: null | string, filepath: null | string, extension: null | string, uri: string, height: number, width: number, fileSize: null | number, playableDuration: number, orientation: null | number}, timestamp: number, modificationTimestamp: number, location: null | {latitude?: number, longitude?: number, altitude?: number, heading?: number, speed?: number}}} export type PhotoIdentifiersPage = {edges: PhotoIdentifier[], page_info: {has_next_page: boolean, start_cursor?: string, end_cursor?: string}, limited?: boolean} export type Album = {id: string, title: string, count: number, type: string, subtype?: string} export interface Spec { saveToCameraRoll(uri: string, options: Object): Promise<PhotoIdentifier>; getPhotos(params: Object): Promise<PhotoIdentifiersPage>; getAlbums(params: Object): Promise<Album[]>; deletePhotos(photoUris: string[]): Promise<void>; getPhotoByInternalID(internalID: string, options: Object): Promise<PhotoIdentifier>; getPhotoThumbnail(internalID: string, options: Object): Promise<unknown>; addListener(eventName: string): void; removeListeners(count: number): void; } }