add ChannelUpdateResponse type
This commit is contained in:
parent
8bfef31386
commit
4c6147efcc
3 changed files with 17 additions and 15 deletions
15
dist/flow-typed/Lbry.js
vendored
15
dist/flow-typed/Lbry.js
vendored
|
@ -65,9 +65,7 @@ declare type VersionResponse = {
|
|||
|
||||
declare type ResolveResponse = {
|
||||
// Keys are the url(s) passed to resolve
|
||||
[string]:
|
||||
| Claim
|
||||
| { error?: {} },
|
||||
[string]: Claim | { error?: {} },
|
||||
};
|
||||
|
||||
declare type GetResponse = FileListItem;
|
||||
|
@ -105,6 +103,10 @@ declare type ChannelCreateResponse = GenericTxResponse & {
|
|||
outputs: Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
declare type UpdateChannelResponse = GenericTxResponse & {
|
||||
outputs: Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
declare type CommentCreateResponse = Comment;
|
||||
declare type CommentListResponse = Array<Comment>;
|
||||
|
||||
|
@ -157,10 +159,10 @@ declare type LbryTypes = {
|
|||
connectPromise: ?Promise<any>,
|
||||
connect: () => void,
|
||||
daemonConnectionString: string,
|
||||
apiRequestHeaders: {[key: string]: string},
|
||||
apiRequestHeaders: { [key: string]: string },
|
||||
setDaemonConnectionString: string => void,
|
||||
setApiHeader: (string, string) => void,
|
||||
unsetApiHeader: (string) => void,
|
||||
unsetApiHeader: string => void,
|
||||
overrides: { [string]: ?Function },
|
||||
setOverride: (string, Function) => void,
|
||||
getMediaType: (string, ?string) => string,
|
||||
|
@ -176,8 +178,7 @@ declare type LbryTypes = {
|
|||
claim_search: (params: {}) => Promise<ClaimSearchResponse>,
|
||||
claim_list: (params?: {}) => Promise<ClaimListResponse>,
|
||||
channel_create: (params: {}) => Promise<ChannelCreateResponse>,
|
||||
// TODO fix this type:
|
||||
channel_update: (params: {}) => Promise<ChannelCreateResponse>,
|
||||
channel_update: (params: {}) => Promise<UpdateChannelResponse>,
|
||||
channel_list: () => Promise<ChannelListResponse>,
|
||||
stream_abandon: (params: {}) => Promise<GenericTxResponse>,
|
||||
channel_abandon: (params: {}) => Promise<GenericTxResponse>,
|
||||
|
|
15
flow-typed/Lbry.js
vendored
15
flow-typed/Lbry.js
vendored
|
@ -65,9 +65,7 @@ declare type VersionResponse = {
|
|||
|
||||
declare type ResolveResponse = {
|
||||
// Keys are the url(s) passed to resolve
|
||||
[string]:
|
||||
| Claim
|
||||
| { error?: {} },
|
||||
[string]: Claim | { error?: {} },
|
||||
};
|
||||
|
||||
declare type GetResponse = FileListItem;
|
||||
|
@ -105,6 +103,10 @@ declare type ChannelCreateResponse = GenericTxResponse & {
|
|||
outputs: Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
declare type ChannelUpdateResponse = GenericTxResponse & {
|
||||
outputs: Array<ChannelClaim>,
|
||||
};
|
||||
|
||||
declare type CommentCreateResponse = Comment;
|
||||
declare type CommentListResponse = Array<Comment>;
|
||||
|
||||
|
@ -157,10 +159,10 @@ declare type LbryTypes = {
|
|||
connectPromise: ?Promise<any>,
|
||||
connect: () => void,
|
||||
daemonConnectionString: string,
|
||||
apiRequestHeaders: {[key: string]: string},
|
||||
apiRequestHeaders: { [key: string]: string },
|
||||
setDaemonConnectionString: string => void,
|
||||
setApiHeader: (string, string) => void,
|
||||
unsetApiHeader: (string) => void,
|
||||
unsetApiHeader: string => void,
|
||||
overrides: { [string]: ?Function },
|
||||
setOverride: (string, Function) => void,
|
||||
getMediaType: (string, ?string) => string,
|
||||
|
@ -176,8 +178,7 @@ declare type LbryTypes = {
|
|||
claim_search: (params: {}) => Promise<ClaimSearchResponse>,
|
||||
claim_list: (params?: {}) => Promise<ClaimListResponse>,
|
||||
channel_create: (params: {}) => Promise<ChannelCreateResponse>,
|
||||
// TODO fix this type:
|
||||
channel_update: (params: {}) => Promise<ChannelCreateResponse>,
|
||||
channel_update: (params: {}) => Promise<ChannelUpdateResponse>,
|
||||
channel_list: () => Promise<ChannelListResponse>,
|
||||
stream_abandon: (params: {}) => Promise<GenericTxResponse>,
|
||||
channel_abandon: (params: {}) => Promise<GenericTxResponse>,
|
||||
|
|
|
@ -266,7 +266,7 @@ export function doUpdateChannel(params: any) {
|
|||
};
|
||||
|
||||
return Lbry.channel_update(updateParams)
|
||||
.then((result: ChannelCreateResponse) => {
|
||||
.then((result: ChannelUpdateResponse) => {
|
||||
const channelClaim = result.outputs[0];
|
||||
dispatch({
|
||||
type: ACTIONS.UPDATE_CHANNEL_COMPLETED,
|
||||
|
|
Loading…
Reference in a new issue