ing
This commit is contained in:
parent
a958109e2a
commit
d773379d8f
|
@ -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);
|
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);
|
return this.rpcService.call('NotificationService.markAllAsRead', member, pageParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { RPCClientError } from '@loafer/ng-rpc';
|
||||||
import { Member } from '@overflow/commons-typescript/model/member';
|
import { Member } from '@overflow/commons-typescript/model/member';
|
||||||
import { PageParams } from '@overflow/commons-typescript/model/commons/PageParams';
|
import { PageParams } from '@overflow/commons-typescript/model/commons/PageParams';
|
||||||
import { Page } from '@overflow/commons-typescript/model/commons/Page';
|
import { Page } from '@overflow/commons-typescript/model/commons/Page';
|
||||||
|
import { Notification } from '@overflow/commons-typescript/model/notification';
|
||||||
|
|
||||||
export enum ActionType {
|
export enum ActionType {
|
||||||
ReadAllByMember = '[Notification.list] ReadAllByMember',
|
ReadAllByMember = '[Notification.list] ReadAllByMember',
|
||||||
|
@ -22,7 +23,7 @@ export class ReadAllByMember implements Action {
|
||||||
export class ReadAllByMemberSuccess implements Action {
|
export class ReadAllByMemberSuccess implements Action {
|
||||||
readonly type = ActionType.ReadAllByMemberSuccess;
|
readonly type = ActionType.ReadAllByMemberSuccess;
|
||||||
|
|
||||||
constructor(public payload: Page) {}
|
constructor(public payload: Page<Notification>) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ReadAllByMemberFailure implements Action {
|
export class ReadAllByMemberFailure implements Action {
|
||||||
|
@ -40,7 +41,7 @@ export class MarkAllAsRead implements Action {
|
||||||
export class MarkAllAsReadSuccess implements Action {
|
export class MarkAllAsReadSuccess implements Action {
|
||||||
readonly type = ActionType.MarkAllAsReadSuccess;
|
readonly type = ActionType.MarkAllAsReadSuccess;
|
||||||
|
|
||||||
constructor(public payload: Page) {}
|
constructor(public payload: Page<Notification>) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MarkAllAsReadFailure implements Action {
|
export class MarkAllAsReadFailure implements Action {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { RPCClientError } from '@loafer/ng-rpc';
|
import { RPCClientError } from '@loafer/ng-rpc';
|
||||||
import { Page } from '@overflow/commons-typescript/model/commons/Page';
|
import { Page } from '@overflow/commons-typescript/model/commons/Page';
|
||||||
|
import { Notification } from '@overflow/commons-typescript/model/notification';
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
error: RPCClientError | null;
|
error: RPCClientError | null;
|
||||||
page: Page | null;
|
page: Page<Notification> | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const initialState: State = {
|
export const initialState: State = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user