robbyson-frontend-library 1.0.42 → 1.0.43
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.
- package/dist/models/http-response.model.js +6 -0
- package/package.json +1 -1
- package/src/models/angel-friend-status.model.ts +21 -24
- package/src/models/http-response.model.ts +15 -0
- package/src/repositories/angel-friend.repository.interface.ts +4 -1
- package/src/repositories/notification.repository.interface.ts +9 -2
- package/src/services/angel-friend.service.interface.ts +4 -1
- package/src/services/notification.service.interface.ts +9 -2
|
@@ -9,3 +9,9 @@ var GenericHttpListResponseMeta = /** @class */ (function () {
|
|
|
9
9
|
}
|
|
10
10
|
return GenericHttpListResponseMeta;
|
|
11
11
|
}());
|
|
12
|
+
var IHttpGenericResponse = /** @class */ (function () {
|
|
13
|
+
function IHttpGenericResponse() {
|
|
14
|
+
}
|
|
15
|
+
return IHttpGenericResponse;
|
|
16
|
+
}());
|
|
17
|
+
export { IHttpGenericResponse };
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BaseRepositoryModel } from "./base.repository.model";
|
|
2
|
-
import { IProfileImageProps } from
|
|
2
|
+
import { IProfileImageProps } from "../components/profile-image/profile-image.interface";
|
|
3
3
|
import { IBaseComponentProp } from "../components/base-component.prop.interface";
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
export class AngelFriendStatusModel extends BaseRepositoryModel {
|
|
7
6
|
configuration: IConfiguration;
|
|
8
7
|
role: string;
|
|
@@ -29,7 +28,7 @@ type Attribute = {
|
|
|
29
28
|
_id: string;
|
|
30
29
|
};
|
|
31
30
|
|
|
32
|
-
type
|
|
31
|
+
type HttpStatusLogResponse = {
|
|
33
32
|
type: number;
|
|
34
33
|
};
|
|
35
34
|
|
|
@@ -70,9 +69,7 @@ export type NotificationResponse = {
|
|
|
70
69
|
}[];
|
|
71
70
|
}[];
|
|
72
71
|
};
|
|
73
|
-
statusLog:
|
|
74
|
-
type: string;
|
|
75
|
-
}[];
|
|
72
|
+
statusLog: HttpStatusLogResponse[];
|
|
76
73
|
};
|
|
77
74
|
|
|
78
75
|
export interface IGodfatherGetAnswer {
|
|
@@ -115,15 +112,15 @@ export interface ISponsorship {
|
|
|
115
112
|
godfather: {
|
|
116
113
|
_id: number;
|
|
117
114
|
name: string;
|
|
118
|
-
user_id
|
|
119
|
-
identification
|
|
115
|
+
user_id: number;
|
|
116
|
+
identification: string;
|
|
120
117
|
robbyson_user_id?: number;
|
|
121
118
|
};
|
|
122
119
|
godson: {
|
|
123
120
|
_id: number;
|
|
124
121
|
name: string;
|
|
125
|
-
user_id
|
|
126
|
-
identification
|
|
122
|
+
user_id: number;
|
|
123
|
+
identification: string;
|
|
127
124
|
robbyson_user_id?: number;
|
|
128
125
|
};
|
|
129
126
|
configuration: IConfiguration;
|
|
@@ -165,15 +162,15 @@ export interface IAngelFriendStatus {
|
|
|
165
162
|
|
|
166
163
|
export interface IAngelFriendStatusResponse {
|
|
167
164
|
data: IAngelFriendStatus;
|
|
168
|
-
statusLog:
|
|
165
|
+
statusLog: HttpStatusLogResponse[];
|
|
169
166
|
}
|
|
170
167
|
|
|
171
168
|
export interface ISponsorshipSendRating {
|
|
172
|
-
sponsorshipId: string
|
|
173
|
-
userId: number
|
|
174
|
-
stars: number
|
|
175
|
-
message: string
|
|
176
|
-
notification_id: string
|
|
169
|
+
sponsorshipId: string;
|
|
170
|
+
userId: number;
|
|
171
|
+
stars: number;
|
|
172
|
+
message: string;
|
|
173
|
+
notification_id: string;
|
|
177
174
|
}
|
|
178
175
|
|
|
179
176
|
export interface AngelFriendMeta {
|
|
@@ -182,12 +179,12 @@ export interface AngelFriendMeta {
|
|
|
182
179
|
robbyson_user_id: number;
|
|
183
180
|
}
|
|
184
181
|
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
export interface IAngelFriendProfileImageProps
|
|
183
|
+
extends IProfileImageProps,
|
|
184
|
+
IBaseComponentProp {
|
|
187
185
|
robbysonUserId?: number;
|
|
188
186
|
}
|
|
189
187
|
|
|
190
|
-
|
|
191
188
|
export interface INotification {
|
|
192
189
|
sender: Sender;
|
|
193
190
|
classification: Classification;
|
|
@@ -279,10 +276,9 @@ export interface SponsorshipData {
|
|
|
279
276
|
godsonEndLevel?: number;
|
|
280
277
|
godsonStartLevel?: number;
|
|
281
278
|
}
|
|
282
|
-
|
|
283
279
|
export interface INotificationResponse {
|
|
284
280
|
data: INotificationData;
|
|
285
|
-
statusLog:
|
|
281
|
+
statusLog: HttpStatusLogResponse[];
|
|
286
282
|
}
|
|
287
283
|
|
|
288
284
|
export interface IAttribute {
|
|
@@ -320,7 +316,7 @@ export interface IPossibleGodson {
|
|
|
320
316
|
|
|
321
317
|
export interface IPossibleGodsonResponse {
|
|
322
318
|
data: IPossibleGodson[];
|
|
323
|
-
statusLog?:
|
|
319
|
+
statusLog?: HttpStatusLogResponse[];
|
|
324
320
|
}
|
|
325
321
|
|
|
326
322
|
export interface IPendingInvitation {
|
|
@@ -330,11 +326,12 @@ export interface IPendingInvitation {
|
|
|
330
326
|
user_id: number;
|
|
331
327
|
_id: number;
|
|
332
328
|
sponsorship_id: string;
|
|
329
|
+
image?: string;
|
|
333
330
|
}
|
|
334
331
|
|
|
335
332
|
export interface IPendingInvitationResponse {
|
|
336
333
|
data: IPendingInvitation[];
|
|
337
|
-
statusLog:
|
|
334
|
+
statusLog: HttpStatusLogResponse[];
|
|
338
335
|
}
|
|
339
336
|
|
|
340
337
|
export interface IGodfatherAnswer {
|
|
@@ -348,7 +345,7 @@ export interface IGodfatherAnswer {
|
|
|
348
345
|
|
|
349
346
|
export interface IGodfatherAnswerResponse {
|
|
350
347
|
data: IGodfatherAnswer[];
|
|
351
|
-
statusLog:
|
|
348
|
+
statusLog: HttpStatusLogResponse[];
|
|
352
349
|
}
|
|
353
350
|
|
|
354
351
|
// export interface
|
|
@@ -3,6 +3,10 @@ export class HttpListResponse<T> {
|
|
|
3
3
|
meta: GenericHttpListResponseMeta | Record<string, never>;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
type HttpStatusLogResponse = {
|
|
7
|
+
type: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
6
10
|
class GenericHttpListResponseMeta {
|
|
7
11
|
orderBy: string;
|
|
8
12
|
orderDirection: "DESC" | "ASC";
|
|
@@ -12,3 +16,14 @@ class GenericHttpListResponseMeta {
|
|
|
12
16
|
totalDocs: number;
|
|
13
17
|
type: string;
|
|
14
18
|
}
|
|
19
|
+
|
|
20
|
+
export class IHttpGenericResponse {
|
|
21
|
+
data: IHttpDataResponse;
|
|
22
|
+
statusLog: HttpStatusLogResponse[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IHttpDataResponse {
|
|
26
|
+
n: number;
|
|
27
|
+
nModified: number;
|
|
28
|
+
ok: number;
|
|
29
|
+
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
IPendingInvitationResponse,
|
|
9
9
|
IPossibleGodsonResponse,
|
|
10
10
|
SponsorshipData,
|
|
11
|
+
IHttpGenericResponse,
|
|
11
12
|
} from "../models";
|
|
12
13
|
|
|
13
14
|
export interface IAngelFriendRepository {
|
|
@@ -24,7 +25,9 @@ export interface IAngelFriendRepository {
|
|
|
24
25
|
}): Promise<IPossibleGodsonResponse>;
|
|
25
26
|
getPendingInvitations(): Promise<IPendingInvitationResponse>;
|
|
26
27
|
getGodfatherAnswers(): Promise<IGodfatherAnswerResponse>;
|
|
27
|
-
sponsorshipSendRating(
|
|
28
|
+
sponsorshipSendRating(
|
|
29
|
+
rating: ISponsorshipSendRating
|
|
30
|
+
): Promise<IHttpGenericResponse>;
|
|
28
31
|
acceptGodfather(data: {
|
|
29
32
|
_id: number | string;
|
|
30
33
|
accepted: boolean;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IHttpGenericResponse,
|
|
3
|
+
ISponsorshipSendRating,
|
|
4
|
+
MenusNotificationsModel,
|
|
5
|
+
NotificationModel,
|
|
6
|
+
} from "../models";
|
|
2
7
|
export interface INotificationRepository {
|
|
3
8
|
getMenusNotifications(params: {
|
|
4
9
|
"$filter.$or.targetSystems.0.$exists": boolean;
|
|
@@ -23,7 +28,9 @@ export interface INotificationRepository {
|
|
|
23
28
|
totalRecords: number;
|
|
24
29
|
}>;
|
|
25
30
|
|
|
26
|
-
markAsAngelFriendRead(
|
|
31
|
+
markAsAngelFriendRead(
|
|
32
|
+
rating: ISponsorshipSendRating
|
|
33
|
+
): Promise<IHttpGenericResponse>;
|
|
27
34
|
markAsRead(params: {
|
|
28
35
|
user_id: number;
|
|
29
36
|
arr_notification_id: Array<string>;
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
IPendingInvitationResponse,
|
|
8
8
|
IPossibleGodsonResponse,
|
|
9
9
|
SponsorshipData,
|
|
10
|
+
IHttpGenericResponse,
|
|
10
11
|
} from "../models";
|
|
11
12
|
|
|
12
13
|
export interface IAngelFriendService {
|
|
@@ -30,7 +31,9 @@ export interface IAngelFriendService {
|
|
|
30
31
|
}): Promise<string>;
|
|
31
32
|
removeSponsorship(sponsorship_id: string): Promise<string>;
|
|
32
33
|
getSponsorship(sponsorship_id: string): Promise<SponsorshipData[]>;
|
|
33
|
-
sponsorshipSendRating(
|
|
34
|
+
sponsorshipSendRating(
|
|
35
|
+
rating: ISponsorshipSendRating
|
|
36
|
+
): Promise<IHttpGenericResponse>;
|
|
34
37
|
answerSponsorship(
|
|
35
38
|
data: { sponsorship_id: string },
|
|
36
39
|
answer: boolean
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IHttpGenericResponse,
|
|
3
|
+
ISponsorshipSendRating,
|
|
4
|
+
MenusNotificationsModel,
|
|
5
|
+
NotificationModel,
|
|
6
|
+
} from "../models";
|
|
2
7
|
|
|
3
8
|
export interface INotificationService {
|
|
4
9
|
showNotificationSidebar(data: boolean): void;
|
|
5
10
|
getMenusNotifications(): Promise<Array<MenusNotificationsModel>>;
|
|
6
|
-
markAsAngelFriendRead(
|
|
11
|
+
markAsAngelFriendRead(
|
|
12
|
+
rating: ISponsorshipSendRating
|
|
13
|
+
): Promise<IHttpGenericResponse>;
|
|
7
14
|
setRecentNotificationsSidebar(
|
|
8
15
|
notification: Array<NotificationModel | undefined>
|
|
9
16
|
): Promise<void>;
|