@aepstore-dev/contracts 1.82.0 → 1.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,18 +53,41 @@ export interface MarkAllNotificationsReadResponse {
53
53
  updatedCount: number;
54
54
  unreadCount: number;
55
55
  }
56
+ export interface DeleteNotificationRequest {
57
+ userId: string;
58
+ notificationId: string;
59
+ }
60
+ export interface DeleteNotificationResponse {
61
+ notificationId: string;
62
+ unreadCount: number;
63
+ }
64
+ export interface DeleteNotificationsRequest {
65
+ userId: string;
66
+ category: string;
67
+ type: string;
68
+ /** empty|true|false */
69
+ isRead: string;
70
+ }
71
+ export interface DeleteNotificationsResponse {
72
+ deletedCount: number;
73
+ unreadCount: number;
74
+ }
56
75
  export declare const NOTIFICATIONS_V1_PACKAGE_NAME = "notifications.v1";
57
76
  export interface NotificationsServiceClient {
58
77
  listNotifications(request: ListNotificationsRequest): Observable<NotificationsListResponse>;
59
78
  getUnreadCount(request: GetUnreadCountRequest): Observable<UnreadCountResponse>;
60
79
  markNotificationRead(request: MarkNotificationReadRequest): Observable<Notification>;
61
80
  markAllNotificationsRead(request: MarkAllNotificationsReadRequest): Observable<MarkAllNotificationsReadResponse>;
81
+ deleteNotification(request: DeleteNotificationRequest): Observable<DeleteNotificationResponse>;
82
+ deleteNotifications(request: DeleteNotificationsRequest): Observable<DeleteNotificationsResponse>;
62
83
  }
63
84
  export interface NotificationsServiceController {
64
85
  listNotifications(request: ListNotificationsRequest): Promise<NotificationsListResponse> | Observable<NotificationsListResponse> | NotificationsListResponse;
65
86
  getUnreadCount(request: GetUnreadCountRequest): Promise<UnreadCountResponse> | Observable<UnreadCountResponse> | UnreadCountResponse;
66
87
  markNotificationRead(request: MarkNotificationReadRequest): Promise<Notification> | Observable<Notification> | Notification;
67
88
  markAllNotificationsRead(request: MarkAllNotificationsReadRequest): Promise<MarkAllNotificationsReadResponse> | Observable<MarkAllNotificationsReadResponse> | MarkAllNotificationsReadResponse;
89
+ deleteNotification(request: DeleteNotificationRequest): Promise<DeleteNotificationResponse> | Observable<DeleteNotificationResponse> | DeleteNotificationResponse;
90
+ deleteNotifications(request: DeleteNotificationsRequest): Promise<DeleteNotificationsResponse> | Observable<DeleteNotificationsResponse> | DeleteNotificationsResponse;
68
91
  }
69
92
  export declare function NotificationsServiceControllerMethods(): (constructor: Function) => void;
70
93
  export declare const NOTIFICATIONS_SERVICE_NAME = "NotificationsService";
@@ -18,6 +18,8 @@ function NotificationsServiceControllerMethods() {
18
18
  "getUnreadCount",
19
19
  "markNotificationRead",
20
20
  "markAllNotificationsRead",
21
+ "deleteNotification",
22
+ "deleteNotifications",
21
23
  ];
22
24
  for (const method of grpcMethods) {
23
25
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -72,6 +72,29 @@ export interface MarkAllNotificationsReadResponse {
72
72
  unreadCount: number;
73
73
  }
74
74
 
75
+ export interface DeleteNotificationRequest {
76
+ userId: string;
77
+ notificationId: string;
78
+ }
79
+
80
+ export interface DeleteNotificationResponse {
81
+ notificationId: string;
82
+ unreadCount: number;
83
+ }
84
+
85
+ export interface DeleteNotificationsRequest {
86
+ userId: string;
87
+ category: string;
88
+ type: string;
89
+ /** empty|true|false */
90
+ isRead: string;
91
+ }
92
+
93
+ export interface DeleteNotificationsResponse {
94
+ deletedCount: number;
95
+ unreadCount: number;
96
+ }
97
+
75
98
  export const NOTIFICATIONS_V1_PACKAGE_NAME = "notifications.v1";
76
99
 
77
100
  export interface NotificationsServiceClient {
@@ -82,6 +105,10 @@ export interface NotificationsServiceClient {
82
105
  markNotificationRead(request: MarkNotificationReadRequest): Observable<Notification>;
83
106
 
84
107
  markAllNotificationsRead(request: MarkAllNotificationsReadRequest): Observable<MarkAllNotificationsReadResponse>;
108
+
109
+ deleteNotification(request: DeleteNotificationRequest): Observable<DeleteNotificationResponse>;
110
+
111
+ deleteNotifications(request: DeleteNotificationsRequest): Observable<DeleteNotificationsResponse>;
85
112
  }
86
113
 
87
114
  export interface NotificationsServiceController {
@@ -103,6 +130,14 @@ export interface NotificationsServiceController {
103
130
  | Promise<MarkAllNotificationsReadResponse>
104
131
  | Observable<MarkAllNotificationsReadResponse>
105
132
  | MarkAllNotificationsReadResponse;
133
+
134
+ deleteNotification(
135
+ request: DeleteNotificationRequest,
136
+ ): Promise<DeleteNotificationResponse> | Observable<DeleteNotificationResponse> | DeleteNotificationResponse;
137
+
138
+ deleteNotifications(
139
+ request: DeleteNotificationsRequest,
140
+ ): Promise<DeleteNotificationsResponse> | Observable<DeleteNotificationsResponse> | DeleteNotificationsResponse;
106
141
  }
107
142
 
108
143
  export function NotificationsServiceControllerMethods() {
@@ -112,6 +147,8 @@ export function NotificationsServiceControllerMethods() {
112
147
  "getUnreadCount",
113
148
  "markNotificationRead",
114
149
  "markAllNotificationsRead",
150
+ "deleteNotification",
151
+ "deleteNotifications",
115
152
  ];
116
153
  for (const method of grpcMethods) {
117
154
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aepstore-dev/contracts",
3
- "version": "1.82.0",
3
+ "version": "1.83.0",
4
4
  "description": "Protobuf definitions for aepstore microservices",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -7,6 +7,8 @@ service NotificationsService {
7
7
  rpc GetUnreadCount(GetUnreadCountRequest) returns (UnreadCountResponse);
8
8
  rpc MarkNotificationRead(MarkNotificationReadRequest) returns (Notification);
9
9
  rpc MarkAllNotificationsRead(MarkAllNotificationsReadRequest) returns (MarkAllNotificationsReadResponse);
10
+ rpc DeleteNotification(DeleteNotificationRequest) returns (DeleteNotificationResponse);
11
+ rpc DeleteNotifications(DeleteNotificationsRequest) returns (DeleteNotificationsResponse);
10
12
  }
11
13
 
12
14
  message NotificationEntity {
@@ -68,3 +70,25 @@ message MarkAllNotificationsReadResponse {
68
70
  int32 updated_count = 1;
69
71
  int32 unread_count = 2;
70
72
  }
73
+
74
+ message DeleteNotificationRequest {
75
+ string user_id = 1;
76
+ string notification_id = 2;
77
+ }
78
+
79
+ message DeleteNotificationResponse {
80
+ string notification_id = 1;
81
+ int32 unread_count = 2;
82
+ }
83
+
84
+ message DeleteNotificationsRequest {
85
+ string user_id = 1;
86
+ string category = 2;
87
+ string type = 3;
88
+ string is_read = 4; // empty|true|false
89
+ }
90
+
91
+ message DeleteNotificationsResponse {
92
+ int32 deleted_count = 1;
93
+ int32 unread_count = 2;
94
+ }