This commit is contained in:
crusader 2018-05-25 12:37:18 +09:00
parent a958109e2a
commit d773379d8f
3 changed files with 7 additions and 5 deletions

View File

@ -19,11 +19,11 @@ export class NotificationService {
}
public readAllByMember(member: Member, pageParams: PageParams): Observable<Page> {
public readAllByMember(member: Member, pageParams: PageParams): Observable<Page<Notification>> {
return this.rpcService.call('NotificationService.readAllByMember', member, pageParams);
}
public markAllAsRead(member: Member, pageParams: PageParams): Observable<Page> {
public markAllAsRead(member: Member, pageParams: PageParams): Observable<Page<Notification>> {
return this.rpcService.call('NotificationService.markAllAsRead', member, pageParams);
}

View File

@ -3,6 +3,7 @@ import { RPCClientError } from '@loafer/ng-rpc';
import { Member } from '@overflow/commons-typescript/model/member';
import { PageParams } from '@overflow/commons-typescript/model/commons/PageParams';
import { Page } from '@overflow/commons-typescript/model/commons/Page';
import { Notification } from '@overflow/commons-typescript/model/notification';
export enum ActionType {
ReadAllByMember = '[Notification.list] ReadAllByMember',
@ -22,7 +23,7 @@ export class ReadAllByMember implements Action {
export class ReadAllByMemberSuccess implements Action {
readonly type = ActionType.ReadAllByMemberSuccess;
constructor(public payload: Page) {}
constructor(public payload: Page<Notification>) {}
}
export class ReadAllByMemberFailure implements Action {
@ -40,7 +41,7 @@ export class MarkAllAsRead implements Action {
export class MarkAllAsReadSuccess implements Action {
readonly type = ActionType.MarkAllAsReadSuccess;
constructor(public payload: Page) {}
constructor(public payload: Page<Notification>) {}
}
export class MarkAllAsReadFailure implements Action {

View File

@ -1,9 +1,10 @@
import { RPCClientError } from '@loafer/ng-rpc';
import { Page } from '@overflow/commons-typescript/model/commons/Page';
import { Notification } from '@overflow/commons-typescript/model/notification';
export interface State {
error: RPCClientError | null;
page: Page | null;
page: Page<Notification> | null;
}
export const initialState: State = {