@quesmed/types-rn 2.6.109 → 2.6.111

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/User.d.ts CHANGED
@@ -4,7 +4,7 @@ import { IConcept } from './Concept';
4
4
  import { IMarksheet } from './Marksheet';
5
5
  import { INotification } from './Notification';
6
6
  import { IOsceStation } from './OsceStation';
7
- import { EProductType } from './Product';
7
+ import { EProductType, IEntitlement } from './Product';
8
8
  import { IQuestion } from './Question';
9
9
  import { ISubscription } from './Subscription';
10
10
  import { ITodo } from './Todo';
@@ -126,6 +126,7 @@ export interface IProductFeedback {
126
126
  rating: number | null;
127
127
  feedback: string | null;
128
128
  createdAt: number | Date;
129
+ product: IEntitlement;
129
130
  }
130
131
  export interface IUser {
131
132
  id: Id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.109",
3
+ "version": "2.6.111",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -10,6 +10,7 @@ exports.PICTURE_FIELDS = (0, client_1.gql) `
10
10
  name
11
11
  caption
12
12
  path
13
+ path256
13
14
  path512
14
15
  overlayPath
15
16
  overlayPath256
@@ -94,8 +94,13 @@ const optimisticAddProductFeedback = (input) => ({
94
94
  feedback: input.feedback || null,
95
95
  createdAt: new Date(),
96
96
  userId: 1,
97
- productId: 1,
97
+ productId: models_1.EProductType.QBANK,
98
98
  id: (0, utils_1.randomInt)(),
99
+ product: {
100
+ id: models_1.EProductType.QBANK,
101
+ index: 0,
102
+ name: models_1.EProductType[models_1.EProductType.QBANK],
103
+ },
99
104
  },
100
105
  },
101
106
  });
@@ -1,8 +1,9 @@
1
- import { EProductDuration, IEntitlement } from '../../../models';
1
+ import { EProductDuration, EProductType, 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 {
5
5
  totalBatches: number;
6
+ mockTestBatches: number;
6
7
  questionCount: number;
7
8
  stationCount: number;
8
9
  chapterCount: number;
@@ -64,3 +65,29 @@ export type IUserBreakdownVar = {
64
65
  force: boolean;
65
66
  };
66
67
  export type IUserBreakdownData = AdminData<IUserBreakdown, 'userBreakdown'>;
68
+ export declare const USER_FEEDBACKS: import("@apollo/client").DocumentNode;
69
+ export interface IFeedbackData {
70
+ user: IUser;
71
+ spends: number;
72
+ userId: number;
73
+ average: number;
74
+ reviews: Array<IProductFeedback>;
75
+ }
76
+ export interface IUserFeedback {
77
+ total: number;
78
+ feedbacks: Array<IFeedbackData>;
79
+ average: number;
80
+ ratings: Array<{
81
+ value: number;
82
+ count: number;
83
+ }>;
84
+ }
85
+ export type IUserFeedbackVar = {
86
+ from: Date | number | null;
87
+ to: Date | number | null;
88
+ force: boolean;
89
+ productId: EProductType;
90
+ rating: number | null;
91
+ description: boolean | null;
92
+ };
93
+ export type IUserFeedbackData = AdminData<IUserFeedback, 'userFeedbacks'>;
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.USER_BREAKDOWN = exports.USER_STATUS = exports.EARNINGS = exports.IMPORT_STATS = void 0;
3
+ exports.USER_FEEDBACKS = exports.USER_BREAKDOWN = exports.USER_STATUS = 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
6
  query ImportStats($force: Boolean) {
7
7
  admin {
8
8
  importStats(force: $force) {
9
9
  totalBatches
10
+ mockTestBatches
10
11
  questionCount
11
12
  stationCount
12
13
  chapterCount
@@ -66,3 +67,54 @@ exports.USER_BREAKDOWN = (0, client_1.gql) `
66
67
  }
67
68
  }
68
69
  `;
70
+ exports.USER_FEEDBACKS = (0, client_1.gql) `
71
+ query UserFeedbacks(
72
+ $rating: Int
73
+ $productId: Int
74
+ $from: Date
75
+ $to: Date
76
+ $force: Boolean!
77
+ $description: Boolean
78
+ ) {
79
+ admin {
80
+ userFeedbacks(
81
+ from: $from
82
+ to: $to
83
+ force: $force
84
+ productId: $productId
85
+ rating: $rating
86
+ description: $description
87
+ ) {
88
+ total
89
+ average
90
+ ratings {
91
+ value
92
+ count
93
+ }
94
+ feedbacks {
95
+ user {
96
+ id
97
+ displayName
98
+ username
99
+ firstName
100
+ lastName
101
+ createdAt
102
+ }
103
+ spends
104
+ average
105
+ reviews {
106
+ id
107
+ userId
108
+ createdAt
109
+ rating
110
+ feedback
111
+ product {
112
+ id
113
+ name
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ `;