2019-04-23 19:22:14 +02:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
declare type FileListItem = {
|
|
|
|
metadata: StreamMetadata,
|
2019-11-05 19:24:41 +01:00
|
|
|
added_on: number,
|
2019-04-23 19:22:14 +02:00
|
|
|
blobs_completed: number,
|
|
|
|
blobs_in_stream: number,
|
|
|
|
blobs_remaining: number,
|
|
|
|
channel_claim_id: string,
|
|
|
|
channel_name: string,
|
|
|
|
claim_id: string,
|
|
|
|
claim_name: string,
|
|
|
|
completed: false,
|
|
|
|
download_directory: string,
|
|
|
|
download_path: string,
|
|
|
|
file_name: string,
|
|
|
|
key: string,
|
|
|
|
mime_type: string,
|
|
|
|
nout: number,
|
|
|
|
outpoint: string,
|
|
|
|
points_paid: number,
|
|
|
|
protobuf: string,
|
2020-05-07 13:41:56 +02:00
|
|
|
reflector_progress: number,
|
2019-04-23 19:22:14 +02:00
|
|
|
sd_hash: string,
|
|
|
|
status: string,
|
|
|
|
stopped: false,
|
|
|
|
stream_hash: string,
|
|
|
|
stream_name: string,
|
2019-05-21 21:18:07 +02:00
|
|
|
streaming_url: string,
|
2019-04-23 19:22:14 +02:00
|
|
|
suggested_file_name: string,
|
|
|
|
total_bytes: number,
|
|
|
|
total_bytes_lower_bound: number,
|
2020-05-07 13:41:56 +02:00
|
|
|
is_fully_reflected: boolean,
|
2019-04-23 19:22:14 +02:00
|
|
|
// TODO: sdk plans to change `tx`
|
|
|
|
// It isn't currently used by the apps
|
|
|
|
tx: {},
|
|
|
|
txid: string,
|
2020-05-07 13:41:56 +02:00
|
|
|
uploading_to_reflector: boolean,
|
2019-04-23 19:22:14 +02:00
|
|
|
written_bytes: number,
|
|
|
|
};
|
2019-05-21 21:18:07 +02:00
|
|
|
|
|
|
|
declare type FileState = {
|
|
|
|
failedPurchaseUris: Array<string>,
|
|
|
|
purchasedUris: Array<string>,
|
|
|
|
};
|
|
|
|
|
|
|
|
declare type PurchaseUriCompleted = {
|
|
|
|
type: ACTIONS.PURCHASE_URI_COMPLETED,
|
|
|
|
data: {
|
|
|
|
uri: string,
|
|
|
|
streamingUrl: string,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
declare type PurchaseUriFailed = {
|
|
|
|
type: ACTIONS.PURCHASE_URI_FAILED,
|
2019-05-27 15:59:21 +02:00
|
|
|
data: {
|
|
|
|
uri: string,
|
2019-08-06 04:52:46 +02:00
|
|
|
error: any,
|
2019-05-27 15:59:21 +02:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
declare type PurchaseUriStarted = {
|
|
|
|
type: ACTIONS.PURCHASE_URI_STARTED,
|
|
|
|
data: {
|
|
|
|
uri: string,
|
|
|
|
streamingUrl: string,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
declare type DeletePurchasedUri = {
|
|
|
|
type: ACTIONS.DELETE_PURCHASED_URI,
|
2019-05-21 21:18:07 +02:00
|
|
|
data: {
|
2019-08-06 04:52:46 +02:00
|
|
|
uri: string,
|
2019-05-21 21:18:07 +02:00
|
|
|
},
|
|
|
|
};
|