@quesmed/types-rn 2.0.14 → 2.0.15
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/models/Notification.d.ts +39 -0
- package/models/Notification.js +2 -0
- package/models/User.d.ts +7 -5
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/package.json +1 -1
- package/resolvers/mutation/admin/index.d.ts +1 -0
- package/resolvers/mutation/admin/index.js +1 -0
- package/resolvers/mutation/admin/notification.d.ts +15 -0
- package/resolvers/mutation/admin/notification.js +2 -0
- package/resolvers/mutation/restricted/index.d.ts +1 -0
- package/resolvers/mutation/restricted/index.js +1 -0
- package/resolvers/mutation/restricted/notification.d.ts +28 -0
- package/resolvers/mutation/restricted/notification.js +2 -0
- package/resolvers/query/restricted/index.d.ts +1 -0
- package/resolvers/query/restricted/index.js +1 -0
- package/resolvers/query/restricted/notification.d.ts +9 -0
- package/resolvers/query/restricted/notification.js +2 -0
- package/resolvers/subscription/index.d.ts +1 -0
- package/resolvers/subscription/index.js +1 -0
- package/resolvers/subscription/notification.d.ts +11 -0
- package/resolvers/subscription/notification.js +4 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IConcept } from './Concept';
|
|
2
|
+
import { IQuestionComment } from './Question';
|
|
3
|
+
import { Id } from './Type';
|
|
4
|
+
import { IUser } from './User';
|
|
5
|
+
export declare const enum ENotificationType {
|
|
6
|
+
COMMENT = "COMMENT",
|
|
7
|
+
ANNOUNCEMENT = "ANNOUNCEMENT",
|
|
8
|
+
FRIEND_REQUEST = "FRIEND_REQUEST"
|
|
9
|
+
}
|
|
10
|
+
export declare const enum ENotificationActionType {
|
|
11
|
+
REPLY = "REPLY",
|
|
12
|
+
UP_VOTE = "UP_VOTE",
|
|
13
|
+
DOWN_VOTE = "DOWN_VOTE",
|
|
14
|
+
LIKE = "LIKE",
|
|
15
|
+
DISLIKE = "DISLIKE",
|
|
16
|
+
FEATURE = "FEATURE",
|
|
17
|
+
WARNING = "WARNING",
|
|
18
|
+
REQUESTED = "REQUESTED",
|
|
19
|
+
ACCEPTED = "ACCEPTED"
|
|
20
|
+
}
|
|
21
|
+
export interface INotification {
|
|
22
|
+
id: Id;
|
|
23
|
+
createdAt: number | Date;
|
|
24
|
+
updatedAt: number | Date;
|
|
25
|
+
userId: Id | null;
|
|
26
|
+
user?: IUser;
|
|
27
|
+
parentId: Id | null;
|
|
28
|
+
parentUser?: IUser;
|
|
29
|
+
commentId: Id | null;
|
|
30
|
+
comment?: IQuestionComment;
|
|
31
|
+
conceptId: Id | null;
|
|
32
|
+
concept?: IConcept;
|
|
33
|
+
description: string;
|
|
34
|
+
actionType: ENotificationActionType;
|
|
35
|
+
type: ENotificationType;
|
|
36
|
+
_global: boolean;
|
|
37
|
+
_read: boolean;
|
|
38
|
+
_deleted: boolean;
|
|
39
|
+
}
|
package/models/User.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ICard } from './Card';
|
|
2
2
|
import { IConcept } from './Concept';
|
|
3
3
|
import { IMarksheet, IMarksheetMark } from './Marksheet';
|
|
4
|
+
import { INotification } from './Notification';
|
|
4
5
|
import { IQuestion } from './Question';
|
|
5
6
|
import { ISubscription } from './Subscription';
|
|
6
7
|
import { ITodo } from './Todo';
|
|
@@ -29,6 +30,11 @@ export interface IPayload {
|
|
|
29
30
|
stripeOsceSubscriptionEndDate: number | null;
|
|
30
31
|
stripeBundleSubscriptionEndDate: number | null;
|
|
31
32
|
}
|
|
33
|
+
export interface IDailyProgressInfo {
|
|
34
|
+
totalCount: number;
|
|
35
|
+
totalCorrect: number;
|
|
36
|
+
dateString: string;
|
|
37
|
+
}
|
|
32
38
|
export interface IUser {
|
|
33
39
|
id: Id;
|
|
34
40
|
createdAt: number | Date;
|
|
@@ -75,11 +81,7 @@ export interface IUser {
|
|
|
75
81
|
completedRedCardsCount?: number | null;
|
|
76
82
|
dailyFeed: ITodo;
|
|
77
83
|
dailyProgress: IDailyProgressInfo[];
|
|
78
|
-
|
|
79
|
-
export interface IDailyProgressInfo {
|
|
80
|
-
totalCount: number;
|
|
81
|
-
totalCorrect: number;
|
|
82
|
-
dateString: string;
|
|
84
|
+
notifications: INotification[];
|
|
83
85
|
}
|
|
84
86
|
export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear): IClassYear;
|
|
85
87
|
export declare function currentClassGroup(createdAtUnix: number, classYear: IClassYear): EClassYearGroup;
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./Feedback"), exports);
|
|
|
21
21
|
__exportStar(require("./File"), exports);
|
|
22
22
|
__exportStar(require("./Marksheet"), exports);
|
|
23
23
|
__exportStar(require("./MockTest"), exports);
|
|
24
|
+
__exportStar(require("./Notification"), exports);
|
|
24
25
|
__exportStar(require("./OsceMarksheet"), exports);
|
|
25
26
|
__exportStar(require("./OsceStation"), exports);
|
|
26
27
|
__exportStar(require("./Picture"), exports);
|
package/package.json
CHANGED
|
@@ -12,3 +12,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./algoliaSync"), exports);
|
|
14
14
|
__exportStar(require("./token"), exports);
|
|
15
|
+
__exportStar(require("./notification"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ENotificationActionType, ENotificationType, INotification } from '../../../models';
|
|
2
|
+
import { AdminData } from '../../types';
|
|
3
|
+
export interface IAdminAddNotificationInput {
|
|
4
|
+
description: string;
|
|
5
|
+
actionType: ENotificationActionType;
|
|
6
|
+
type: ENotificationType;
|
|
7
|
+
}
|
|
8
|
+
export declare type IAdminAddNotificationVar = {
|
|
9
|
+
data: IAdminAddNotificationInput;
|
|
10
|
+
};
|
|
11
|
+
export declare type IAdminAddNotificationData = AdminData<INotification, 'addNotification'>;
|
|
12
|
+
export declare type IAdminAddNotificationsVar = {
|
|
13
|
+
data: IAdminAddNotificationInput[];
|
|
14
|
+
};
|
|
15
|
+
export declare type IAdminAddNotificationsData = AdminData<INotification[], 'addNotifications'>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ENotificationActionType, ENotificationType, Id, INotification } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export interface IAddNotificationInput {
|
|
4
|
+
parentId: Id | null;
|
|
5
|
+
userId: Id | null;
|
|
6
|
+
commentId: Id | null;
|
|
7
|
+
conceptId: Id | null;
|
|
8
|
+
description: string;
|
|
9
|
+
actionType: ENotificationActionType;
|
|
10
|
+
type: ENotificationType;
|
|
11
|
+
_global: boolean;
|
|
12
|
+
_read: boolean;
|
|
13
|
+
_deleted: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare type IAddNotificationVar = {
|
|
16
|
+
data: IAddNotificationInput;
|
|
17
|
+
};
|
|
18
|
+
export declare type IAddNotificationData = RestrictedData<graphqlNormalize & INotification, 'addNotification'>;
|
|
19
|
+
export declare type IAddNotificationsVar = {
|
|
20
|
+
data: IAddNotificationInput[];
|
|
21
|
+
};
|
|
22
|
+
export declare type IAddNotificationsData = RestrictedData<graphqlNormalize & INotification[], 'addNotifications'>;
|
|
23
|
+
export declare type IMarkNotificationAsReadVar = {
|
|
24
|
+
id: Id;
|
|
25
|
+
};
|
|
26
|
+
export declare type IMarkNotificationAsReadData = RestrictedData<graphqlNormalize & INotification, 'markNotificationAsRead'>;
|
|
27
|
+
export declare type IMarkAllNotificationsAsReadVar = null;
|
|
28
|
+
export declare type IMarkAllNotificationsAsReadData = RestrictedData<graphqlNormalize & INotification[], 'markAllNotificationsAsRead'>;
|
|
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
__exportStar(require("./global"), exports);
|
|
14
14
|
__exportStar(require("./marksheet"), exports);
|
|
15
15
|
__exportStar(require("./mockTests"), exports);
|
|
16
|
+
__exportStar(require("./notification"), exports);
|
|
16
17
|
__exportStar(require("./osce"), exports);
|
|
17
18
|
__exportStar(require("./quesBook"), exports);
|
|
18
19
|
__exportStar(require("./replication"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { INotification } from '../../../models';
|
|
2
|
+
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
3
|
+
export interface INotificationsVar {
|
|
4
|
+
filter?: {
|
|
5
|
+
limit: number;
|
|
6
|
+
offset?: number;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare type INotificationsData = RestrictedData<graphqlNormalize & INotification[], 'notifications'>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Id, INotification } from '../../models';
|
|
2
|
+
import { RootData } from '../types';
|
|
3
|
+
export interface IOnNotificationAriseVar {
|
|
4
|
+
userId: Id;
|
|
5
|
+
}
|
|
6
|
+
export interface INewNotification {
|
|
7
|
+
userId: Id;
|
|
8
|
+
notification: INotification[];
|
|
9
|
+
}
|
|
10
|
+
export declare type IOnNotificationAriseData = RootData<INewNotification, 'payload'>;
|
|
11
|
+
export declare const ON_NOTIFICATION_ARISE = "ON_NOTIFICATION_ARISE";
|