@quesmed/types-rn 2.6.118 → 2.6.120
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/Subscription.d.ts +3 -2
- package/models/Subscription.js +3 -2
- package/models/User.d.ts +10 -0
- package/package.json +1 -1
- package/resolvers/query/admin/dashboard.d.ts +2 -1
- package/resolvers/query/admin/dashboard.js +2 -0
- package/resolvers/query/restricted/user.d.ts +6 -1
- package/resolvers/query/restricted/user.js +23 -1
package/models/Subscription.d.ts
CHANGED
package/models/Subscription.js
CHANGED
|
@@ -15,6 +15,7 @@ var ECancelReasons;
|
|
|
15
15
|
})(ECancelReasons = exports.ECancelReasons || (exports.ECancelReasons = {}));
|
|
16
16
|
var ESubSource;
|
|
17
17
|
(function (ESubSource) {
|
|
18
|
-
ESubSource[ESubSource["
|
|
19
|
-
ESubSource[ESubSource["
|
|
18
|
+
ESubSource[ESubSource["ALL"] = 0] = "ALL";
|
|
19
|
+
ESubSource[ESubSource["STRIPE"] = 1] = "STRIPE";
|
|
20
|
+
ESubSource[ESubSource["REVENUE_CAT"] = 2] = "REVENUE_CAT";
|
|
20
21
|
})(ESubSource = exports.ESubSource || (exports.ESubSource = {}));
|
package/models/User.d.ts
CHANGED
|
@@ -92,6 +92,9 @@ export interface IDailyProgressData {
|
|
|
92
92
|
totalCount: number;
|
|
93
93
|
totalCorrect: number;
|
|
94
94
|
intensity: EPracticeIntensity;
|
|
95
|
+
score: number;
|
|
96
|
+
totalIncorrect: number;
|
|
97
|
+
totalAttempted: number;
|
|
95
98
|
}
|
|
96
99
|
export interface IUserProgressData {
|
|
97
100
|
marksheetCount: number;
|
|
@@ -287,6 +290,13 @@ export interface IUserStats {
|
|
|
287
290
|
median: number;
|
|
288
291
|
series: [x: number, y: number][];
|
|
289
292
|
}
|
|
293
|
+
export interface IUserActivity {
|
|
294
|
+
dailyProgress: IDailyProgressData;
|
|
295
|
+
avgScore: number;
|
|
296
|
+
avgAttempted: number;
|
|
297
|
+
currentStreak: number;
|
|
298
|
+
longestStreak: number;
|
|
299
|
+
}
|
|
290
300
|
export interface IQuestionLearningPoint {
|
|
291
301
|
id: Id;
|
|
292
302
|
createdAt: number | Date;
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EProductDuration, EProductType, IEntitlement, IProductFeedback, IUser } from '../../../models';
|
|
1
|
+
import { EProductDuration, EProductType, ESubSource, IEntitlement, IProductFeedback, IUser } from '../../../models';
|
|
2
2
|
import { AdminData } from '../../types';
|
|
3
3
|
export declare const IMPORT_STATS: import("@apollo/client").DocumentNode;
|
|
4
4
|
export interface IImportStats {
|
|
@@ -34,6 +34,7 @@ export type IEarningsVar = {
|
|
|
34
34
|
to: Date | number | null;
|
|
35
35
|
force: boolean;
|
|
36
36
|
subType: ESubType;
|
|
37
|
+
source: ESubSource;
|
|
37
38
|
};
|
|
38
39
|
export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
|
|
39
40
|
export declare const USER_STATUS: import("@apollo/client").DocumentNode;
|
|
@@ -22,6 +22,7 @@ exports.EARNINGS = (0, client_1.gql) `
|
|
|
22
22
|
$from: Date
|
|
23
23
|
$to: Date
|
|
24
24
|
$force: Boolean!
|
|
25
|
+
$source: Int
|
|
25
26
|
) {
|
|
26
27
|
admin {
|
|
27
28
|
earnings(
|
|
@@ -30,6 +31,7 @@ exports.EARNINGS = (0, client_1.gql) `
|
|
|
30
31
|
from: $from
|
|
31
32
|
to: $to
|
|
32
33
|
force: $force
|
|
34
|
+
source: $source
|
|
33
35
|
) {
|
|
34
36
|
entitlement {
|
|
35
37
|
id
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IClassYear, IUser, IUserStats } from '../../../models';
|
|
1
|
+
import { IClassYear, IUser, IUserActivity, IUserStats } from '../../../models';
|
|
2
2
|
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
3
3
|
export type IUserVar = {
|
|
4
4
|
active?: boolean;
|
|
@@ -17,3 +17,8 @@ export type IUserStatsVar = {
|
|
|
17
17
|
};
|
|
18
18
|
export type IUserStatsData = RestrictedData<graphqlNormalize & IUserStats, 'userStats'>;
|
|
19
19
|
export declare const USER_STATS: import("@apollo/client").DocumentNode;
|
|
20
|
+
export type IUserActivityVar = {
|
|
21
|
+
days?: number;
|
|
22
|
+
};
|
|
23
|
+
export type IUserActivityData = RestrictedData<graphqlNormalize & IUserActivity, 'userActivity'>;
|
|
24
|
+
export declare const USER_ACTIVITY: import("@apollo/client").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.USER_STATS = exports.DAILY_FEED = exports.USER_COMPLETED_DATA = exports.REFERRALS = exports.GET_USER_SUBSCRIPTIONS = exports.USER = void 0;
|
|
3
|
+
exports.USER_ACTIVITY = exports.USER_STATS = exports.DAILY_FEED = exports.USER_COMPLETED_DATA = exports.REFERRALS = exports.GET_USER_SUBSCRIPTIONS = exports.USER = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const fragments_1 = require("../../fragments");
|
|
6
6
|
const user_1 = require("../../fragments/user");
|
|
@@ -130,3 +130,25 @@ exports.USER_STATS = (0, client_1.gql) `
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
`;
|
|
133
|
+
exports.USER_ACTIVITY = (0, client_1.gql) `
|
|
134
|
+
query UserActivity($days: Int) {
|
|
135
|
+
restricted {
|
|
136
|
+
userActivity(days: $days) {
|
|
137
|
+
dailyProgress {
|
|
138
|
+
date
|
|
139
|
+
dateString
|
|
140
|
+
totalCorrect
|
|
141
|
+
totalCount
|
|
142
|
+
totalIncorrect
|
|
143
|
+
totalAttempted
|
|
144
|
+
intensity
|
|
145
|
+
score
|
|
146
|
+
}
|
|
147
|
+
avgScore
|
|
148
|
+
avgAttempted
|
|
149
|
+
currentStreak
|
|
150
|
+
longestStreak
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
`;
|