-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(notifications): UX changes to match API endpoint changes.
- Loading branch information
Showing
15 changed files
with
61 additions
and
27 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
apps/api/src/app/notifications/notification/dto/notification-list.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { IPagination } from '../../../core'; | ||
import { Notification } from '../notification.entity'; | ||
import { ApiModelProperty } from '@nestjs/swagger'; | ||
|
||
export class NotificationList implements IPagination<Notification> { | ||
@ApiModelProperty({ type: Notification, isArray: true }) | ||
readonly items: Notification[]; | ||
@ApiModelProperty({ type: Number, readOnly: true }) | ||
readonly total: number; | ||
} |
3 changes: 3 additions & 0 deletions
3
apps/api/src/app/notifications/subscription/dto/subscription-list.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { IPagination } from '../../../core'; | ||
import { Subscription } from '../subscription.entity'; | ||
import { ApiModelProperty } from '@nestjs/swagger'; | ||
|
||
export class SubscriptionList implements IPagination<Subscription> { | ||
@ApiModelProperty({ type: Subscription, isArray: true }) | ||
readonly items: Subscription[]; | ||
@ApiModelProperty({ type: Number, readOnly: true }) | ||
readonly total: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { IPagination } from '../../../core'; | ||
import { Cluster } from '../cluster.entity'; | ||
import { ApiModelProperty } from '@nestjs/swagger'; | ||
|
||
export class ClusterList implements IPagination<Cluster> { | ||
@ApiModelProperty({ type: Cluster, isArray: true }) | ||
readonly items: Cluster[]; | ||
@ApiModelProperty({ type: Number, readOnly: true }) | ||
readonly total: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { IPagination } from '../../core'; | ||
import { Project } from '../project.entity'; | ||
import { ApiModelProperty } from '@nestjs/swagger'; | ||
|
||
export class ProjectList implements IPagination<Project> { | ||
@ApiModelProperty({ type: Project, isArray: true }) | ||
readonly items: Project[]; | ||
@ApiModelProperty({ type: Number, readOnly: true }) | ||
readonly total: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { IPagination } from '../../../core' | ||
import { Profile } from '../profile.entity'; | ||
import { ApiModelProperty } from '@nestjs/swagger'; | ||
|
||
export class ProfileList implements IPagination<Profile> { | ||
@ApiModelProperty({ type: Profile, isArray: true }) | ||
readonly items: Profile[]; | ||
@ApiModelProperty({ type: Number, readOnly: true }) | ||
readonly total: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Generic pagination interface | ||
*/ | ||
export interface IPagination<T> { | ||
/** | ||
* Items included in the current listing | ||
*/ | ||
readonly items: T[]; | ||
|
||
/** | ||
* Total number of available items | ||
*/ | ||
readonly total: number; | ||
} |