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 path from 'path';
import { CC_LICENSES, COPYRIGHT, OTHER } from 'constants/licenses'; import { CC_LICENSES, COPYRIGHT, OTHER } from 'constants/licenses';
import type { Dispatch, GetState } from 'types/redux'; 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 }; 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 ACTIONS from 'constants/action_types';
import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses'; import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses';
import { CHANNEL_ANONYMOUS } from 'constants/claim'; import { CHANNEL_ANONYMOUS } from 'constants/claim';
import type { StreamSource } from 'types/stream'; import type { Source } from 'types/claim';
type PublishState = { type PublishState = {
editingURI: ?string, editingURI: ?string,
@ -84,7 +84,7 @@ export type PublishParams = {
currency: string, currency: string,
amount: number, amount: number,
}, },
sources?: StreamSource, sources?: Source,
}; };
const defaultState: PublishState = { const defaultState: PublishState = {

View file

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

View file

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