Add channel and role api
This commit is contained in:
parent
8881070cac
commit
1fbd120404
22 changed files with 538 additions and 2 deletions
45
src/store/channel/actions.ts
Normal file
45
src/store/channel/actions.ts
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import {
|
||||
ICreateChannelRequest,
|
||||
IFetchChannelResponse,
|
||||
ICreateChannelResponse,
|
||||
IUpdateChannelResponse,
|
||||
IRemoveChannelResponse,
|
||||
} from "../../api/channel";
|
||||
|
||||
enum ChannelActionTypes {
|
||||
FETCH_CHANNEL_START = "FETCH_COMMUNITY_START",
|
||||
FETCH_CHANNEL_FINISH = "FETCH_COMMUNITY_FINISH",
|
||||
CREATE_CHANNEL_START = "CREATE_CHANNEL_START",
|
||||
CREATE_CHANNEL_FINISH = "CREATE_CHANNEL_FINISH",
|
||||
UPDATE_CHANNEL_START = "UPDATE_CHANNEL_START",
|
||||
UPDATE_CHANNEL_FINISH = "UPDATE_CHANNEL_FINISH",
|
||||
REMOVE_CHANNEL_START = "REMOVE_CHANNEL_START",
|
||||
REMOVE_CHANNEL_FINISH = "REMOVE_CHANNEL_FINISH",
|
||||
}
|
||||
|
||||
type ChannelAction =
|
||||
| { type: ChannelActionTypes.FETCH_CHANNEL_START; payload: string }
|
||||
| {
|
||||
type: ChannelActionTypes.FETCH_CHANNEL_FINISH;
|
||||
payload: IFetchChannelResponse;
|
||||
}
|
||||
| {
|
||||
type: ChannelActionTypes.CREATE_CHANNEL_START;
|
||||
payload: ICreateChannelRequest;
|
||||
}
|
||||
| {
|
||||
type: ChannelActionTypes.CREATE_CHANNEL_FINISH;
|
||||
payload: ICreateChannelResponse;
|
||||
}
|
||||
| { type: ChannelActionTypes.UPDATE_CHANNEL_START; payload: string }
|
||||
| {
|
||||
type: ChannelActionTypes.UPDATE_CHANNEL_FINISH;
|
||||
payload: IUpdateChannelResponse;
|
||||
}
|
||||
| { type: ChannelActionTypes.REMOVE_CHANNEL_START; payload: string }
|
||||
| {
|
||||
type: ChannelActionTypes.REMOVE_CHANNEL_FINISH;
|
||||
payload: IRemoveChannelResponse;
|
||||
};
|
||||
|
||||
export { ChannelActionTypes, type ChannelAction };
|
||||
Loading…
Add table
Add a link
Reference in a new issue