Centralized type to type/claim

This commit is contained in:
Chakrit Likitkhajorn 2018-10-13 23:42:02 +07:00
parent 9b4cbc2712
commit 2b46483344
4 changed files with 12 additions and 14 deletions

View file

@ -20,7 +20,7 @@ import fs from 'fs';
import path from 'path';
import { CC_LICENSES, COPYRIGHT, OTHER } from 'constants/licenses';
import type { Dispatch, GetState } from 'types/redux';
import { Source } from 'types/claim';
import type { Source } from 'types/claim';
type Action = UpdatePublishFormAction | { type: ACTIONS.CLEAR_PUBLISH };

View file

@ -4,7 +4,7 @@ import { buildURI } from 'lbry-redux';
import * as ACTIONS from 'constants/action_types';
import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses';
import { CHANNEL_ANONYMOUS } from 'constants/claim';
import type { StreamSource } from 'types/stream';
import type { Source } from 'types/claim';
type PublishState = {
editingURI: ?string,
@ -84,7 +84,7 @@ export type PublishParams = {
currency: string,
amount: number,
},
sources?: StreamSource,
sources?: Source,
};
const defaultState: PublishState = {

View file

@ -1,8 +1,14 @@
// @flow
import type { StreamSource } from 'types/stream';
// Currently incomplete
export type Source = {
contentType: string,
source: string,
sourceType: string,
version: string,
};
export type Metadata = {
nsfw: boolean,
title: string,
@ -38,7 +44,7 @@ export type Claim = {
},
stream: {
metadata: Metadata,
source: StreamSource,
source: Source,
},
},
};

View file

@ -1,8 +0,0 @@
// @flow
export type StreamSource = {
contentType: string,
source: string,
sourceType: string,
version: string,
};