diff --git a/lib/types/media-types.js b/lib/types/media-types.js --- a/lib/types/media-types.js +++ b/lib/types/media-types.js @@ -12,51 +12,6 @@ export type EncryptedMediaType = 'encrypted_photo' | 'encrypted_video'; -export type Image = { - +id: string, - +uri: string, - +type: 'photo', - +dimensions: Dimensions, - // stored on native only during creation in case retry needed after state lost - +localMediaSelection?: NativeMediaSelection, -}; - -export type EncryptedImage = { - +id: string, - // a media URI for keyserver uploads / blob holder for Blob service uploads - +holder: string, - +encryptionKey: string, - +type: 'encrypted_photo', - +dimensions: Dimensions, -}; - -export type Video = { - +id: string, - +uri: string, - +type: 'video', - +dimensions: Dimensions, - +loop?: boolean, - +thumbnailID: string, - +thumbnailURI: string, - // stored on native only during creation in case retry needed after state lost - +localMediaSelection?: NativeMediaSelection, -}; - -export type EncryptedVideo = { - +id: string, - // a media URI for keyserver uploads / blob holder for Blob service uploads - +holder: string, - +encryptionKey: string, - +type: 'encrypted_video', - +dimensions: Dimensions, - +loop?: boolean, - +thumbnailID: string, - +thumbnailHolder: string, - +thumbnailEncryptionKey: string, -}; - -export type Media = Image | Video | EncryptedImage | EncryptedVideo; - export type AvatarMediaInfo = { +type: 'photo', +uri: string, @@ -595,3 +550,48 @@ +userTime: number, +totalTime: number, }; + +export type Image = { + +id: string, + +uri: string, + +type: 'photo', + +dimensions: Dimensions, + // stored on native only during creation in case retry needed after state lost + +localMediaSelection?: NativeMediaSelection, +}; + +export type EncryptedImage = { + +id: string, + // a media URI for keyserver uploads / blob holder for Blob service uploads + +holder: string, + +encryptionKey: string, + +type: 'encrypted_photo', + +dimensions: Dimensions, +}; + +export type Video = { + +id: string, + +uri: string, + +type: 'video', + +dimensions: Dimensions, + +loop?: boolean, + +thumbnailID: string, + +thumbnailURI: string, + // stored on native only during creation in case retry needed after state lost + +localMediaSelection?: NativeMediaSelection, +}; + +export type EncryptedVideo = { + +id: string, + // a media URI for keyserver uploads / blob holder for Blob service uploads + +holder: string, + +encryptionKey: string, + +type: 'encrypted_video', + +dimensions: Dimensions, + +loop?: boolean, + +thumbnailID: string, + +thumbnailHolder: string, + +thumbnailEncryptionKey: string, +}; + +export type Media = Image | Video | EncryptedImage | EncryptedVideo;