@quesmed/types 2.6.49 → 2.6.50

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.
@@ -2,6 +2,7 @@ import { IFile } from './File';
2
2
  import { IPicture } from './Picture';
3
3
  import { ETopicType } from './Topic';
4
4
  import { Id } from './Type';
5
+ import { IUserChapterNote } from './User';
5
6
  export interface IChapter {
6
7
  id: Id;
7
8
  createdAt: number | Date;
@@ -11,4 +12,5 @@ export interface IChapter {
11
12
  typeId: ETopicType | null;
12
13
  pictures?: IPicture[];
13
14
  files?: IFile[];
15
+ userNote: null | IUserChapterNote;
14
16
  }
@@ -11,6 +11,7 @@ import { ITodo } from './Todo';
11
11
  import { Id } from './Type';
12
12
  import { IUniversity } from './University';
13
13
  import { IVideo } from './Video';
14
+ import { IChapter } from './Chapter';
14
15
  export type IUserSubsriptionDates = keyof ExtractKeysWithPattern<IPayload, 'EndDate'>;
15
16
  export declare enum IAccessLevel {
16
17
  SUBSCRIBER = "subscriber",
@@ -156,6 +157,15 @@ export interface IUserCompletedQuestion {
156
157
  question: IQuestion;
157
158
  concept: IConcept;
158
159
  }
160
+ export interface IUserChapterNote {
161
+ id: Id;
162
+ createdAt: number | Date;
163
+ updatedAt: number | Date;
164
+ chapterId: Id;
165
+ chapter: IChapter;
166
+ userId: Id;
167
+ note: string;
168
+ }
159
169
  export interface IUserCompletedCard {
160
170
  id: Id;
161
171
  createdAt: number | Date;
@@ -0,0 +1,8 @@
1
+ import { IUserChapterNote } from '../../../models';
2
+ import { RestrictedData } from '../../types';
3
+ export declare const UPSERT_CHAPTER_NOTE: import("@apollo/client").DocumentNode;
4
+ export interface IUpsertChapterNoteVar {
5
+ chapterId: number;
6
+ note: string;
7
+ }
8
+ export type IUpsertChapterNoteData = RestrictedData<IUserChapterNote, 'upsertChapterNote'>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UPSERT_CHAPTER_NOTE = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.UPSERT_CHAPTER_NOTE = (0, client_1.gql) `
6
+ mutation UpsertChapterNote($chapterId: Int!, $note: String!) {
7
+ restricted {
8
+ upsertChapterNote(chapterId: $chapterId, note: $note) {
9
+ id
10
+ chapterId
11
+ userId
12
+ note
13
+ createdAt
14
+ updatedAt
15
+ }
16
+ }
17
+ }
18
+ `;
@@ -1,4 +1,5 @@
1
1
  export * from './agora';
2
+ export * from './chapter';
2
3
  export * from './contactUs';
3
4
  export * from './marksheet';
4
5
  export * from './mockTest';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./agora"), exports);
18
+ __exportStar(require("./chapter"), exports);
18
19
  __exportStar(require("./contactUs"), exports);
19
20
  __exportStar(require("./marksheet"), exports);
20
21
  __exportStar(require("./mockTest"), exports);
@@ -2,6 +2,7 @@ import { IFile } from './File';
2
2
  import { IPicture } from './Picture';
3
3
  import { ETopicType } from './Topic';
4
4
  import { Id } from './Type';
5
+ import { IUserChapterNote } from './User';
5
6
  export interface IChapter {
6
7
  id: Id;
7
8
  createdAt: number | Date;
@@ -11,4 +12,5 @@ export interface IChapter {
11
12
  typeId: ETopicType | null;
12
13
  pictures?: IPicture[];
13
14
  files?: IFile[];
15
+ userNote: null | IUserChapterNote;
14
16
  }
@@ -11,6 +11,7 @@ import { ITodo } from './Todo';
11
11
  import { Id } from './Type';
12
12
  import { IUniversity } from './University';
13
13
  import { IVideo } from './Video';
14
+ import { IChapter } from './Chapter';
14
15
  export type IUserSubsriptionDates = keyof ExtractKeysWithPattern<IPayload, 'EndDate'>;
15
16
  export declare enum IAccessLevel {
16
17
  SUBSCRIBER = "subscriber",
@@ -156,6 +157,15 @@ export interface IUserCompletedQuestion {
156
157
  question: IQuestion;
157
158
  concept: IConcept;
158
159
  }
160
+ export interface IUserChapterNote {
161
+ id: Id;
162
+ createdAt: number | Date;
163
+ updatedAt: number | Date;
164
+ chapterId: Id;
165
+ chapter: IChapter;
166
+ userId: Id;
167
+ note: string;
168
+ }
159
169
  export interface IUserCompletedCard {
160
170
  id: Id;
161
171
  createdAt: number | Date;
@@ -0,0 +1,8 @@
1
+ import { IUserChapterNote } from '../../../models';
2
+ import { RestrictedData } from '../../types';
3
+ export declare const UPSERT_CHAPTER_NOTE: import("@apollo/client").DocumentNode;
4
+ export interface IUpsertChapterNoteVar {
5
+ chapterId: number;
6
+ note: string;
7
+ }
8
+ export type IUpsertChapterNoteData = RestrictedData<IUserChapterNote, 'upsertChapterNote'>;
@@ -0,0 +1,15 @@
1
+ import { gql } from '@apollo/client';
2
+ export const UPSERT_CHAPTER_NOTE = gql `
3
+ mutation UpsertChapterNote($chapterId: Int!, $note: String!) {
4
+ restricted {
5
+ upsertChapterNote(chapterId: $chapterId, note: $note) {
6
+ id
7
+ chapterId
8
+ userId
9
+ note
10
+ createdAt
11
+ updatedAt
12
+ }
13
+ }
14
+ }
15
+ `;
@@ -1,4 +1,5 @@
1
1
  export * from './agora';
2
+ export * from './chapter';
2
3
  export * from './contactUs';
3
4
  export * from './marksheet';
4
5
  export * from './mockTest';
@@ -1,4 +1,5 @@
1
1
  export * from './agora';
2
+ export * from './chapter';
2
3
  export * from './contactUs';
3
4
  export * from './marksheet';
4
5
  export * from './mockTest';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.49",
3
+ "version": "2.6.50",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",