Centralized type to type/claim
This commit is contained in:
parent
9b4cbc2712
commit
2b46483344
4 changed files with 12 additions and 14 deletions
|
@ -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 };
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
// @flow
|
||||
|
||||
export type StreamSource = {
|
||||
contentType: string,
|
||||
source: string,
|
||||
sourceType: string,
|
||||
version: string,
|
||||
};
|
Loading…
Reference in a new issue