-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.d.ts
More file actions
94 lines (82 loc) · 2.19 KB
/
index.d.ts
File metadata and controls
94 lines (82 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
export type GroupType =
'Album' |
'All' |
'Event' |
'Faces' |
'Library' |
'PhotoStream' |
'SavedPhotos';
export type AssetType =
'All' |
'Videos' |
'Photos';
export interface GetPhotosParams {
first: number,
after?: string,
groupTypes?: GroupType,
groupName?: string,
assetType?: AssetType,
mimeTypes?: Array<string>,
orderByAsc?: boolean,
beginCreated?: number,
endCreated?: number,
}
export interface PhotoIdentifier {
node: {
type: string,
group_name: string,
image: {
filename: string,
uri: string,
height: number,
width: number,
isStored?: boolean,
playableDuration: number,
},
timestamp: number,
location?: {
latitude?: number,
longitude?: number,
altitude?: number,
heading?: number,
speed?: number,
},
},
}
export interface PhotoIdentifiersPage {
edges: Array<PhotoIdentifier>,
page_info: {
has_next_page: boolean,
start_cursor?: string,
end_cursor?: string,
},
}
export interface CameraRollStatic {
/**
* `CameraRoll.saveImageWithTag()` is deprecated. Use `CameraRoll.saveToCameraRoll()` instead.
*/
saveImageWithTag: (tag: string) => Promise<string>;
/**
* Delete a photo from the camera roll or media library. photos is an array of photo uri's.
*/
deletePhotos: (photos: Array<string>) => void;
/**
* Saves the photo or video to the camera roll or photo library.
*/
saveToCameraRoll: (tag: string, type?: 'photo' | 'video') => Promise<string>;
/**
* Returns a Promise with photo identifier objects from the local camera
* roll of the device matching shape defined by `getPhotosReturnChecker`.
*/
getPhotos: (params: GetPhotosParams) => Promise<PhotoIdentifiersPage>;
}
let CameraRoll: CameraRollStatic;
export default CameraRoll;