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 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 };
|
||||||
|
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
// @flow
|
|
||||||
|
|
||||||
export type StreamSource = {
|
|
||||||
contentType: string,
|
|
||||||
source: string,
|
|
||||||
sourceType: string,
|
|
||||||
version: string,
|
|
||||||
};
|
|
Loading…
Add table
Reference in a new issue