@quesmed/types-rn 2.6.114 → 2.6.116
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
CHANGED
|
@@ -11,14 +11,20 @@ export declare enum ECancelReasons {
|
|
|
11
11
|
TOO_EXPENSIVE = "too_expensive",
|
|
12
12
|
UNUSED = "unused"
|
|
13
13
|
}
|
|
14
|
+
export declare enum ESubSource {
|
|
15
|
+
STRIPE = 0,
|
|
16
|
+
REVENUE_CAT = 1
|
|
17
|
+
}
|
|
14
18
|
export interface ISubscription {
|
|
15
19
|
id: Id;
|
|
16
20
|
createdAt: number | Date;
|
|
17
21
|
updatedAt: number | Date;
|
|
18
22
|
startedAt: number | Date;
|
|
23
|
+
renewedAt: number | Date | null;
|
|
19
24
|
endedAt: number | Date;
|
|
20
25
|
periodEndAt: number | Date;
|
|
21
26
|
stripeSubscriptionId: string;
|
|
27
|
+
purchaseSource: ESubSource | null;
|
|
22
28
|
userId: Id;
|
|
23
29
|
user?: IUser;
|
|
24
30
|
productId: Id;
|
package/models/Subscription.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ECancelReasons = void 0;
|
|
3
|
+
exports.ESubSource = exports.ECancelReasons = void 0;
|
|
4
4
|
// These options are only available for feedback in stripe, we cannot modify them
|
|
5
5
|
var ECancelReasons;
|
|
6
6
|
(function (ECancelReasons) {
|
|
@@ -13,3 +13,8 @@ var ECancelReasons;
|
|
|
13
13
|
ECancelReasons["TOO_EXPENSIVE"] = "too_expensive";
|
|
14
14
|
ECancelReasons["UNUSED"] = "unused";
|
|
15
15
|
})(ECancelReasons = exports.ECancelReasons || (exports.ECancelReasons = {}));
|
|
16
|
+
var ESubSource;
|
|
17
|
+
(function (ESubSource) {
|
|
18
|
+
ESubSource[ESubSource["STRIPE"] = 0] = "STRIPE";
|
|
19
|
+
ESubSource[ESubSource["REVENUE_CAT"] = 1] = "REVENUE_CAT";
|
|
20
|
+
})(ESubSource = exports.ESubSource || (exports.ESubSource = {}));
|
package/package.json
CHANGED
|
@@ -10,6 +10,8 @@ export interface IImportStats {
|
|
|
10
10
|
}
|
|
11
11
|
export type IImportStatsVar = {
|
|
12
12
|
force: boolean;
|
|
13
|
+
from: Date | number | null;
|
|
14
|
+
to: Date | number | null;
|
|
13
15
|
};
|
|
14
16
|
export type IImportStatsData = AdminData<IImportStats, 'importStats'>;
|
|
15
17
|
export declare const EARNINGS: import("@apollo/client").DocumentNode;
|
|
@@ -20,11 +22,17 @@ export interface IRevenue {
|
|
|
20
22
|
count: number;
|
|
21
23
|
total: number;
|
|
22
24
|
}
|
|
25
|
+
export declare enum ESubType {
|
|
26
|
+
ALL = 0,
|
|
27
|
+
NEW = 1,
|
|
28
|
+
OLD = 2
|
|
29
|
+
}
|
|
23
30
|
export type IEarningsVar = {
|
|
24
31
|
duration: EProductDuration;
|
|
25
32
|
from: Date | number | null;
|
|
26
33
|
to: Date | number | null;
|
|
27
34
|
force: boolean;
|
|
35
|
+
subType: ESubType;
|
|
28
36
|
};
|
|
29
37
|
export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
|
|
30
38
|
export declare const USER_STATUS: import("@apollo/client").DocumentNode;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QUESTION_STATS = exports.USER_FEEDBACKS = exports.USER_BREAKDOWN = exports.USER_STATUS = exports.EARNINGS = exports.IMPORT_STATS = void 0;
|
|
3
|
+
exports.QUESTION_STATS = exports.USER_FEEDBACKS = exports.USER_BREAKDOWN = exports.USER_STATUS = exports.ESubType = exports.EARNINGS = exports.IMPORT_STATS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.IMPORT_STATS = (0, client_1.gql) `
|
|
6
|
-
query ImportStats($force: Boolean) {
|
|
6
|
+
query ImportStats($from: Date, $to: Date, $force: Boolean) {
|
|
7
7
|
admin {
|
|
8
|
-
importStats(force: $force) {
|
|
8
|
+
importStats(force: $force, from: $from, to: $to) {
|
|
9
9
|
totalBatches
|
|
10
10
|
mockTestBatches
|
|
11
11
|
questionCount
|
|
@@ -16,9 +16,21 @@ exports.IMPORT_STATS = (0, client_1.gql) `
|
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
18
18
|
exports.EARNINGS = (0, client_1.gql) `
|
|
19
|
-
query Earnings(
|
|
19
|
+
query Earnings(
|
|
20
|
+
$subType: Int
|
|
21
|
+
$duration: Int
|
|
22
|
+
$from: Date
|
|
23
|
+
$to: Date
|
|
24
|
+
$force: Boolean!
|
|
25
|
+
) {
|
|
20
26
|
admin {
|
|
21
|
-
earnings(
|
|
27
|
+
earnings(
|
|
28
|
+
subType: $subType
|
|
29
|
+
duration: $duration
|
|
30
|
+
from: $from
|
|
31
|
+
to: $to
|
|
32
|
+
force: $force
|
|
33
|
+
) {
|
|
22
34
|
entitlement {
|
|
23
35
|
id
|
|
24
36
|
name
|
|
@@ -31,6 +43,12 @@ exports.EARNINGS = (0, client_1.gql) `
|
|
|
31
43
|
}
|
|
32
44
|
}
|
|
33
45
|
`;
|
|
46
|
+
var ESubType;
|
|
47
|
+
(function (ESubType) {
|
|
48
|
+
ESubType[ESubType["ALL"] = 0] = "ALL";
|
|
49
|
+
ESubType[ESubType["NEW"] = 1] = "NEW";
|
|
50
|
+
ESubType[ESubType["OLD"] = 2] = "OLD";
|
|
51
|
+
})(ESubType = exports.ESubType || (exports.ESubType = {}));
|
|
34
52
|
exports.USER_STATUS = (0, client_1.gql) `
|
|
35
53
|
query UserStatus($from: Date, $to: Date, $force: Boolean!) {
|
|
36
54
|
admin {
|