@quesmed/types 2.6.107 → 2.6.108

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.
@@ -1,10 +1,66 @@
1
+ import { EProductDuration, IEntitlement } from '../../../models';
1
2
  import { AdminData } from '../../types';
2
- export declare const ADMIN_DASHBOARD: import("@apollo/client").DocumentNode;
3
- export interface IAdminDashboard {
3
+ export declare const IMPORT_STATS: import("@apollo/client").DocumentNode;
4
+ export interface IImportStats {
4
5
  totalBatches: number;
5
6
  questionCount: number;
6
7
  stationCount: number;
7
8
  chapterCount: number;
8
9
  }
9
- export type IAdminDashboardVar = null;
10
- export type IAdminDashboardData = AdminData<IAdminDashboard, 'dashboard'>;
10
+ export type IImportStatsVar = {
11
+ force: boolean;
12
+ };
13
+ export type IImportStatsData = AdminData<IImportStats, 'importStats'>;
14
+ export declare const EARNINGS: import("@apollo/client").DocumentNode;
15
+ export interface IRevenue {
16
+ entitlement: IEntitlement;
17
+ duration: number;
18
+ name: string;
19
+ count: number;
20
+ total: number;
21
+ }
22
+ export type IEarningsVar = {
23
+ duration: EProductDuration;
24
+ from: Date | number | null;
25
+ to: Date | number | null;
26
+ force: boolean;
27
+ };
28
+ export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
29
+ export declare const USER_STATUS: import("@apollo/client").DocumentNode;
30
+ export interface IUserStatus {
31
+ total: number;
32
+ subscribed: number;
33
+ unRegistered: number;
34
+ registered: number;
35
+ }
36
+ export type IUserStatusVar = {
37
+ from: Date | number | null;
38
+ to: Date | number | null;
39
+ force: boolean;
40
+ };
41
+ export type IUserStatusData = AdminData<IUserStatus, 'userStatus'>;
42
+ export declare const USER_BREAKDOWN: import("@apollo/client").DocumentNode;
43
+ export interface IUserBreakdown {
44
+ devices: Array<{
45
+ key: string;
46
+ value: number;
47
+ }>;
48
+ graduations: Array<{
49
+ key: string;
50
+ value: number;
51
+ }>;
52
+ countries: Array<{
53
+ key: string;
54
+ value: number;
55
+ }>;
56
+ classYears: Array<{
57
+ key: string;
58
+ value: number;
59
+ }>;
60
+ }
61
+ export type IUserBreakdownVar = {
62
+ from: Date | number | null;
63
+ to: Date | number | null;
64
+ force: boolean;
65
+ };
66
+ export type IUserBreakdownData = AdminData<IUserBreakdown, 'userBreakdown'>;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ADMIN_DASHBOARD = void 0;
3
+ exports.USER_BREAKDOWN = exports.USER_STATUS = exports.EARNINGS = exports.IMPORT_STATS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
- exports.ADMIN_DASHBOARD = (0, client_1.gql) `
6
- query AdminDashboard {
5
+ exports.IMPORT_STATS = (0, client_1.gql) `
6
+ query ImportStats($force: Boolean) {
7
7
  admin {
8
- dashboard {
8
+ importStats(force: $force) {
9
9
  totalBatches
10
10
  questionCount
11
11
  stationCount
@@ -14,3 +14,55 @@ exports.ADMIN_DASHBOARD = (0, client_1.gql) `
14
14
  }
15
15
  }
16
16
  `;
17
+ exports.EARNINGS = (0, client_1.gql) `
18
+ query Earnings($duration: Int, $from: Date, $to: Date, $force: Boolean!) {
19
+ admin {
20
+ earnings(duration: $duration, from: $from, to: $to, force: $force) {
21
+ entitlement {
22
+ id
23
+ name
24
+ }
25
+ duration
26
+ name
27
+ count
28
+ total
29
+ }
30
+ }
31
+ }
32
+ `;
33
+ exports.USER_STATUS = (0, client_1.gql) `
34
+ query UserStatus($from: Date, $to: Date, $force: Boolean!) {
35
+ admin {
36
+ userStatus(from: $from, to: $to, force: $force) {
37
+ subscribed
38
+ unRegistered
39
+ registered
40
+ total
41
+ }
42
+ }
43
+ }
44
+ `;
45
+ exports.USER_BREAKDOWN = (0, client_1.gql) `
46
+ query UserBreakdown($from: Date, $to: Date, $force: Boolean!) {
47
+ admin {
48
+ userBreakdown(from: $from, to: $to, force: $force) {
49
+ devices {
50
+ key
51
+ value
52
+ }
53
+ graduations {
54
+ key
55
+ value
56
+ }
57
+ countries {
58
+ key
59
+ value
60
+ }
61
+ classYears {
62
+ key
63
+ value
64
+ }
65
+ }
66
+ }
67
+ }
68
+ `;
@@ -1,10 +1,66 @@
1
+ import { EProductDuration, IEntitlement } from '../../../models';
1
2
  import { AdminData } from '../../types';
2
- export declare const ADMIN_DASHBOARD: import("@apollo/client").DocumentNode;
3
- export interface IAdminDashboard {
3
+ export declare const IMPORT_STATS: import("@apollo/client").DocumentNode;
4
+ export interface IImportStats {
4
5
  totalBatches: number;
5
6
  questionCount: number;
6
7
  stationCount: number;
7
8
  chapterCount: number;
8
9
  }
9
- export type IAdminDashboardVar = null;
10
- export type IAdminDashboardData = AdminData<IAdminDashboard, 'dashboard'>;
10
+ export type IImportStatsVar = {
11
+ force: boolean;
12
+ };
13
+ export type IImportStatsData = AdminData<IImportStats, 'importStats'>;
14
+ export declare const EARNINGS: import("@apollo/client").DocumentNode;
15
+ export interface IRevenue {
16
+ entitlement: IEntitlement;
17
+ duration: number;
18
+ name: string;
19
+ count: number;
20
+ total: number;
21
+ }
22
+ export type IEarningsVar = {
23
+ duration: EProductDuration;
24
+ from: Date | number | null;
25
+ to: Date | number | null;
26
+ force: boolean;
27
+ };
28
+ export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
29
+ export declare const USER_STATUS: import("@apollo/client").DocumentNode;
30
+ export interface IUserStatus {
31
+ total: number;
32
+ subscribed: number;
33
+ unRegistered: number;
34
+ registered: number;
35
+ }
36
+ export type IUserStatusVar = {
37
+ from: Date | number | null;
38
+ to: Date | number | null;
39
+ force: boolean;
40
+ };
41
+ export type IUserStatusData = AdminData<IUserStatus, 'userStatus'>;
42
+ export declare const USER_BREAKDOWN: import("@apollo/client").DocumentNode;
43
+ export interface IUserBreakdown {
44
+ devices: Array<{
45
+ key: string;
46
+ value: number;
47
+ }>;
48
+ graduations: Array<{
49
+ key: string;
50
+ value: number;
51
+ }>;
52
+ countries: Array<{
53
+ key: string;
54
+ value: number;
55
+ }>;
56
+ classYears: Array<{
57
+ key: string;
58
+ value: number;
59
+ }>;
60
+ }
61
+ export type IUserBreakdownVar = {
62
+ from: Date | number | null;
63
+ to: Date | number | null;
64
+ force: boolean;
65
+ };
66
+ export type IUserBreakdownData = AdminData<IUserBreakdown, 'userBreakdown'>;
@@ -1,8 +1,8 @@
1
1
  import { gql } from '@apollo/client';
2
- export const ADMIN_DASHBOARD = gql `
3
- query AdminDashboard {
2
+ export const IMPORT_STATS = gql `
3
+ query ImportStats($force: Boolean) {
4
4
  admin {
5
- dashboard {
5
+ importStats(force: $force) {
6
6
  totalBatches
7
7
  questionCount
8
8
  stationCount
@@ -11,3 +11,55 @@ export const ADMIN_DASHBOARD = gql `
11
11
  }
12
12
  }
13
13
  `;
14
+ export const EARNINGS = gql `
15
+ query Earnings($duration: Int, $from: Date, $to: Date, $force: Boolean!) {
16
+ admin {
17
+ earnings(duration: $duration, from: $from, to: $to, force: $force) {
18
+ entitlement {
19
+ id
20
+ name
21
+ }
22
+ duration
23
+ name
24
+ count
25
+ total
26
+ }
27
+ }
28
+ }
29
+ `;
30
+ export const USER_STATUS = gql `
31
+ query UserStatus($from: Date, $to: Date, $force: Boolean!) {
32
+ admin {
33
+ userStatus(from: $from, to: $to, force: $force) {
34
+ subscribed
35
+ unRegistered
36
+ registered
37
+ total
38
+ }
39
+ }
40
+ }
41
+ `;
42
+ export const USER_BREAKDOWN = gql `
43
+ query UserBreakdown($from: Date, $to: Date, $force: Boolean!) {
44
+ admin {
45
+ userBreakdown(from: $from, to: $to, force: $force) {
46
+ devices {
47
+ key
48
+ value
49
+ }
50
+ graduations {
51
+ key
52
+ value
53
+ }
54
+ countries {
55
+ key
56
+ value
57
+ }
58
+ classYears {
59
+ key
60
+ value
61
+ }
62
+ }
63
+ }
64
+ }
65
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.107",
3
+ "version": "2.6.108",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",