robbyson-frontend-library 1.0.42 → 1.0.44
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 +25 -24
- package/src/models/chat.model.ts +1 -0
- package/src/models/hierarchy-level.model.ts +1 -1
- package/src/models/http-response.model.ts +15 -0
- package/src/models/user-list.model.ts +2 -0
- package/src/repositories/angel-friend.repository.interface.ts +5 -1
- package/src/repositories/campaign.repository.interface.ts +0 -1
- package/src/repositories/notification.repository.interface.ts +9 -2
- package/src/services/angel-friend.service.interface.ts +5 -1
- package/src/services/chat.service.interface.ts +1 -0
- 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,7 +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
|
+
import { ChatClassification } from "../constants";
|
|
5
5
|
|
|
6
6
|
export class AngelFriendStatusModel extends BaseRepositoryModel {
|
|
7
7
|
configuration: IConfiguration;
|
|
@@ -29,7 +29,7 @@ type Attribute = {
|
|
|
29
29
|
_id: string;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
type
|
|
32
|
+
type HttpStatusLogResponse = {
|
|
33
33
|
type: number;
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -70,9 +70,7 @@ export type NotificationResponse = {
|
|
|
70
70
|
}[];
|
|
71
71
|
}[];
|
|
72
72
|
};
|
|
73
|
-
statusLog:
|
|
74
|
-
type: string;
|
|
75
|
-
}[];
|
|
73
|
+
statusLog: HttpStatusLogResponse[];
|
|
76
74
|
};
|
|
77
75
|
|
|
78
76
|
export interface IGodfatherGetAnswer {
|
|
@@ -115,15 +113,15 @@ export interface ISponsorship {
|
|
|
115
113
|
godfather: {
|
|
116
114
|
_id: number;
|
|
117
115
|
name: string;
|
|
118
|
-
user_id
|
|
119
|
-
identification
|
|
116
|
+
user_id: number;
|
|
117
|
+
identification: string;
|
|
120
118
|
robbyson_user_id?: number;
|
|
121
119
|
};
|
|
122
120
|
godson: {
|
|
123
121
|
_id: number;
|
|
124
122
|
name: string;
|
|
125
|
-
user_id
|
|
126
|
-
identification
|
|
123
|
+
user_id: number;
|
|
124
|
+
identification: string;
|
|
127
125
|
robbyson_user_id?: number;
|
|
128
126
|
};
|
|
129
127
|
configuration: IConfiguration;
|
|
@@ -152,6 +150,7 @@ export interface IAngelFriendStatus {
|
|
|
152
150
|
__v: number;
|
|
153
151
|
_id: number;
|
|
154
152
|
accepted?: boolean;
|
|
153
|
+
lastConfigurationToAF?: string;
|
|
155
154
|
}
|
|
156
155
|
| undefined;
|
|
157
156
|
configuration: IConfiguration;
|
|
@@ -165,15 +164,15 @@ export interface IAngelFriendStatus {
|
|
|
165
164
|
|
|
166
165
|
export interface IAngelFriendStatusResponse {
|
|
167
166
|
data: IAngelFriendStatus;
|
|
168
|
-
statusLog:
|
|
167
|
+
statusLog: HttpStatusLogResponse[];
|
|
169
168
|
}
|
|
170
169
|
|
|
171
170
|
export interface ISponsorshipSendRating {
|
|
172
|
-
sponsorshipId: string
|
|
173
|
-
userId: number
|
|
174
|
-
stars: number
|
|
175
|
-
message: string
|
|
176
|
-
notification_id: string
|
|
171
|
+
sponsorshipId: string;
|
|
172
|
+
userId: number;
|
|
173
|
+
stars: number;
|
|
174
|
+
message: string;
|
|
175
|
+
notification_id: string;
|
|
177
176
|
}
|
|
178
177
|
|
|
179
178
|
export interface AngelFriendMeta {
|
|
@@ -182,12 +181,13 @@ export interface AngelFriendMeta {
|
|
|
182
181
|
robbyson_user_id: number;
|
|
183
182
|
}
|
|
184
183
|
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
export interface IAngelFriendProfileImageProps
|
|
185
|
+
extends IProfileImageProps,
|
|
186
|
+
IBaseComponentProp {
|
|
187
187
|
robbysonUserId?: number;
|
|
188
|
+
classification?: ChatClassification | "";
|
|
188
189
|
}
|
|
189
190
|
|
|
190
|
-
|
|
191
191
|
export interface INotification {
|
|
192
192
|
sender: Sender;
|
|
193
193
|
classification: Classification;
|
|
@@ -279,10 +279,9 @@ export interface SponsorshipData {
|
|
|
279
279
|
godsonEndLevel?: number;
|
|
280
280
|
godsonStartLevel?: number;
|
|
281
281
|
}
|
|
282
|
-
|
|
283
282
|
export interface INotificationResponse {
|
|
284
283
|
data: INotificationData;
|
|
285
|
-
statusLog:
|
|
284
|
+
statusLog: HttpStatusLogResponse[];
|
|
286
285
|
}
|
|
287
286
|
|
|
288
287
|
export interface IAttribute {
|
|
@@ -320,7 +319,7 @@ export interface IPossibleGodson {
|
|
|
320
319
|
|
|
321
320
|
export interface IPossibleGodsonResponse {
|
|
322
321
|
data: IPossibleGodson[];
|
|
323
|
-
statusLog?:
|
|
322
|
+
statusLog?: HttpStatusLogResponse[];
|
|
324
323
|
}
|
|
325
324
|
|
|
326
325
|
export interface IPendingInvitation {
|
|
@@ -330,11 +329,12 @@ export interface IPendingInvitation {
|
|
|
330
329
|
user_id: number;
|
|
331
330
|
_id: number;
|
|
332
331
|
sponsorship_id: string;
|
|
332
|
+
image?: string;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
export interface IPendingInvitationResponse {
|
|
336
336
|
data: IPendingInvitation[];
|
|
337
|
-
statusLog:
|
|
337
|
+
statusLog: HttpStatusLogResponse[];
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
export interface IGodfatherAnswer {
|
|
@@ -344,11 +344,12 @@ export interface IGodfatherAnswer {
|
|
|
344
344
|
__v?: number;
|
|
345
345
|
accepted: boolean;
|
|
346
346
|
possibleAF?: boolean;
|
|
347
|
+
lastConfigurationToAF?: string;
|
|
347
348
|
}
|
|
348
349
|
|
|
349
350
|
export interface IGodfatherAnswerResponse {
|
|
350
351
|
data: IGodfatherAnswer[];
|
|
351
|
-
statusLog:
|
|
352
|
+
statusLog: HttpStatusLogResponse[];
|
|
352
353
|
}
|
|
353
354
|
|
|
354
355
|
// export interface
|
package/src/models/chat.model.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChatClassification } from "../constants";
|
|
1
2
|
import { BaseRepositoryModel } from "./base.repository.model";
|
|
2
3
|
import { ChatUser } from "./chat.model";
|
|
3
4
|
|
|
@@ -25,6 +26,7 @@ export class UserListModel extends BaseRepositoryModel {
|
|
|
25
26
|
profileImage?: string;
|
|
26
27
|
users?: ChatUser[];
|
|
27
28
|
countNotRead?: number;
|
|
29
|
+
classification?: ChatClassification;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
interface System {
|
|
@@ -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 {
|
|
@@ -17,6 +18,7 @@ export interface IAngelFriendRepository {
|
|
|
17
18
|
data: AngelFriendDTO.NotificationReceivedDTO,
|
|
18
19
|
limit?: number
|
|
19
20
|
): Promise<INotificationResponse>;
|
|
21
|
+
getNotificationToBeGodfather(): Promise<IHttpGenericResponse>;
|
|
20
22
|
getPossibleGodsons(data: {
|
|
21
23
|
page: number;
|
|
22
24
|
per: number;
|
|
@@ -24,7 +26,9 @@ export interface IAngelFriendRepository {
|
|
|
24
26
|
}): Promise<IPossibleGodsonResponse>;
|
|
25
27
|
getPendingInvitations(): Promise<IPendingInvitationResponse>;
|
|
26
28
|
getGodfatherAnswers(): Promise<IGodfatherAnswerResponse>;
|
|
27
|
-
sponsorshipSendRating(
|
|
29
|
+
sponsorshipSendRating(
|
|
30
|
+
rating: ISponsorshipSendRating
|
|
31
|
+
): Promise<IHttpGenericResponse>;
|
|
28
32
|
acceptGodfather(data: {
|
|
29
33
|
_id: number | string;
|
|
30
34
|
accepted: boolean;
|
|
@@ -3,7 +3,6 @@ import { CampaignDTO } from "../services";
|
|
|
3
3
|
export interface ICampaignRepository {
|
|
4
4
|
getCampaigns: (data: {
|
|
5
5
|
userId: string;
|
|
6
|
-
primaryAttributeId: string;
|
|
7
6
|
}) => Promise<CampaignDTO.ICampaign[]>;
|
|
8
7
|
getbyindicatorid: (id: number) => Promise<CampaignDTO.IIndicador>;
|
|
9
8
|
}
|
|
@@ -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 {
|
|
@@ -16,6 +17,7 @@ export interface IAngelFriendService {
|
|
|
16
17
|
data: { skip: number },
|
|
17
18
|
limit?: number
|
|
18
19
|
): Promise<INotificationResponse>;
|
|
20
|
+
getNotificationToBeGodfather(): Promise<IHttpGenericResponse>;
|
|
19
21
|
getPossibleGodsons(data: {
|
|
20
22
|
page: number;
|
|
21
23
|
per: number;
|
|
@@ -30,7 +32,9 @@ export interface IAngelFriendService {
|
|
|
30
32
|
}): Promise<string>;
|
|
31
33
|
removeSponsorship(sponsorship_id: string): Promise<string>;
|
|
32
34
|
getSponsorship(sponsorship_id: string): Promise<SponsorshipData[]>;
|
|
33
|
-
sponsorshipSendRating(
|
|
35
|
+
sponsorshipSendRating(
|
|
36
|
+
rating: ISponsorshipSendRating
|
|
37
|
+
): Promise<IHttpGenericResponse>;
|
|
34
38
|
answerSponsorship(
|
|
35
39
|
data: { sponsorship_id: string },
|
|
36
40
|
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>;
|