lbry-desktop/flow-typed/publish.js
infinite-persistence 053e214c86
PublishReleaseTime widget improvements (#1740)
* PublishReleaseDate: improve calendar error handling

Ticket: 1738

- Report invalid `minute` and `day`. The 3rd-party widget auto-corrects the other fields. Don't think there is a way to make it autocorrect for all.
- Report invalid range (cannot set to future date).

* Block form on releaseDate error instead of silently sending last valid value

which does not tally with what's on screen.
2022-06-23 07:27:08 -04:00

82 lines
1.6 KiB
JavaScript

// @flow
declare type UpdatePublishFormData = {
filePath?: string,
contentIsFree?: boolean,
fee?: {
amount: string,
currency: string,
},
title?: string,
thumbnail_url?: string,
uploadThumbnailStatus?: string,
thumbnailPath?: string,
thumbnailError?: boolean,
description?: string,
language?: string,
releaseTime?: number,
releaseTimeEdited?: number,
releaseTimeError?: string,
channel?: string,
channelId?: string,
name?: string,
nameError?: string,
bid?: number,
bidError?: string,
otherLicenseDescription?: string,
licenseUrl?: string,
licenseType?: string,
uri?: string,
nsfw: boolean,
isMarkdownPost?: boolean,
};
declare type PublishParams = {
name: ?string,
bid: ?number,
filePath?: string,
description: ?string,
language: string,
publishingLicense?: string,
publishingLicenseUrl?: string,
thumbnail: ?string,
channel: string,
channelId?: string,
title: string,
contentIsFree: boolean,
uri?: string,
license: ?string,
licenseUrl: ?string,
fee?: {
amount: string,
currency: string,
},
claim: StreamClaim,
nsfw: boolean,
tags: Array<Tag>,
};
declare type TusUploader = any;
declare type FileUploadSdkParams = {
file_path: string | File,
claim_id: ?string,
name: ?string,
preview?: boolean,
remote_url?: string,
thumbnail_url?: string,
title?: string,
// Temporary values; remove when passing to SDK
guid: string,
uploadUrl?: string,
};
declare type FileUploadItem = {
params: FileUploadSdkParams,
file: File,
fileFingerprint: string,
progress: string,
status?: string,
uploader?: TusUploader | XMLHttpRequest,
resumable: boolean,
};