lbry-redux/dist/flow-typed/File.js

79 lines
1.6 KiB
JavaScript
Raw Permalink Normal View History

// @flow
declare type FileListItem = {
metadata: StreamMetadata,
added_on: number,
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,
2020-05-20 18:06:38 +02:00
content_fee?: { txid: string },
2020-05-20 19:42:36 +02:00
purchase_receipt?: { txid: string, amount: string },
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,
sd_hash: string,
status: string,
stopped: false,
stream_hash: string,
stream_name: string,
2019-05-21 21:18:07 +02:00
streaming_url: string,
suggested_file_name: string,
total_bytes: number,
total_bytes_lower_bound: number,
2020-05-07 13:41:56 +02:00
is_fully_reflected: boolean,
// 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,
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,
data: {
uri: string,
2019-08-06 04:52:46 +02:00
error: any,
},
};
declare type PurchaseUriStarted = {
type: ACTIONS.PURCHASE_URI_STARTED,
data: {
uri: string,
streamingUrl: string,
},
};
declare type DeletePurchasedUri = {
2020-05-19 04:13:18 +02:00
type: ACTIONS.CLEAR_PURCHASED_URI_SUCCESS,
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
},
};