@quesmed/types 1.4.1 → 1.4.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "1.4.1",
3
+ "version": "1.4.5",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -1,8 +1,10 @@
1
1
  import { EPlatformId } from '../../..';
2
2
  import { Id } from '../../../models';
3
+ import { RestrictedData } from '../../types';
4
+ export declare const AGORA_TOKEN: import("@apollo/client").DocumentNode;
3
5
  export interface IAgoraTokenVar {
4
6
  platformId: EPlatformId;
5
7
  channel: string;
6
8
  uid: Id;
7
9
  }
8
- export declare type IAgoraTokenData = string;
10
+ export declare type IAgoraTokenData = RestrictedData<string, 'agoraToken'>;
@@ -1,2 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGORA_TOKEN = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.AGORA_TOKEN = (0, client_1.gql) `
6
+ mutation AgoraToken($platformId: Int!, $channel: String!, $uid: Int!) {
7
+ restricted {
8
+ agoraToken(platformId: $platformId, channel: $channel, uid: $uid)
9
+ }
10
+ }
11
+ `;
@@ -1 +1,8 @@
1
- export {};
1
+ import { gql } from '@apollo/client';
2
+ export const AGORA_TOKEN = gql `
3
+ mutation AgoraToken($platformId: Int!, $channel: String!, $uid: Int!) {
4
+ restricted {
5
+ agoraToken(platformId: $platformId, channel: $channel, uid: $uid)
6
+ }
7
+ }
8
+ `;
@@ -20,9 +20,9 @@ export declare const OSCE_STATIONS: import("@apollo/client").DocumentNode;
20
20
  export interface IOsceStationsVar {
21
21
  osceTypeId?: Id;
22
22
  solo: boolean;
23
- attempted: boolean;
24
- topicIds: Id[];
25
- difficulty: EDifficultyType[];
23
+ attempted?: boolean;
24
+ difficulty?: EDifficultyType[];
25
+ topicIds?: Id[];
26
26
  }
27
27
  export declare type IOsceStationsData = RestrictedData<(graphqlNormalize & IOsceStationItem)[], 'osceStations'>;
28
28
  export declare const OSCE_STATION: import("@apollo/client").DocumentNode;
@@ -32,7 +32,7 @@ export interface IOsceStationVar {
32
32
  export declare type IOsceStationData = RestrictedData<graphqlNormalize & IOsceStation, 'osceStation'>;
33
33
  export declare const OSCE_TOPICS: import("@apollo/client").DocumentNode;
34
34
  export declare type IOsceTopicsVar = null;
35
- export declare type IOsceTopicsData = RestrictedData<graphqlNormalize & ITopic, 'osceTopics'>;
35
+ export declare type IOsceTopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'osceTopics'>;
36
36
  export declare const SEARCH_OSCE_STATIONS: import("@apollo/client").DocumentNode;
37
37
  export interface ISearchOsceStationsVar {
38
38
  search: string;
@@ -46,9 +46,21 @@ exports.OSCE_MARKSHEET = (0, client_1.gql) `
46
46
  `;
47
47
  exports.OSCE_STATIONS = (0, client_1.gql) `
48
48
  ${osce_2.OSCE_STATION_FIELDS}
49
- query OsceStations($solo: Boolean!) {
49
+ query OsceStations(
50
+ $osceTypeId: Int
51
+ $solo: Boolean!
52
+ $attempted: Boolean
53
+ $difficulty: [Int!]
54
+ $topicIds: [Int!]
55
+ ) {
50
56
  restricted {
51
- osceStations(solo: $solo) {
57
+ osceStations(
58
+ osceTypeId: $osceTypeId
59
+ solo: $solo
60
+ attempted: $attempted
61
+ difficulty: $difficulty
62
+ topicIds: $topicIds
63
+ ) {
52
64
  ...OsceStationFields
53
65
  }
54
66
  }
@@ -43,9 +43,21 @@ export const OSCE_MARKSHEET = gql `
43
43
  `;
44
44
  export const OSCE_STATIONS = gql `
45
45
  ${OSCE_STATION_FIELDS}
46
- query OsceStations($solo: Boolean!) {
46
+ query OsceStations(
47
+ $osceTypeId: Int
48
+ $solo: Boolean!
49
+ $attempted: Boolean
50
+ $difficulty: [Int!]
51
+ $topicIds: [Int!]
52
+ ) {
47
53
  restricted {
48
- osceStations(solo: $solo) {
54
+ osceStations(
55
+ osceTypeId: $osceTypeId
56
+ solo: $solo
57
+ attempted: $attempted
58
+ difficulty: $difficulty
59
+ topicIds: $topicIds
60
+ ) {
49
61
  ...OsceStationFields
50
62
  }
51
63
  }
@@ -1,4 +1,5 @@
1
1
  import { EOsceMarksheetAction, EOsceRoles, IClassYear, Id, IOsceMarksheetUser, IUser } from '../../models';
2
+ import { RootData } from '../types';
2
3
  export declare const OSCE_ROLE_CHANGE_KEY = "OSCE_ROLE_CHANGE";
3
4
  export declare const OSCE_MARKSHEET_ACTION_KEY = "OSCE_MARKSHEET_ACTION";
4
5
  export declare const OSCE_MATCHMAKING_KEY = "OSCE_MATCHMAKING";
@@ -17,10 +18,9 @@ export declare const OSCE_ROLE_CHANGE: import("@apollo/client").DocumentNode;
17
18
  export interface IOsceRoleChangedVar {
18
19
  osceMarksheetId: Id;
19
20
  }
20
- export interface IOsceRoleChangedData extends IOsceGroup {
21
- }
21
+ export declare type IOsceRoleChangedData = RootData<IOsceGroup, 'osceRoleChange'>;
22
22
  export declare const OSCE_MARKSHEET_ACTION: import("@apollo/client").DocumentNode;
23
- export interface IOsceMarksheetActionsVar {
23
+ export interface IOsceMarksheetActionVar {
24
24
  osceMarksheetId: Id;
25
25
  }
26
26
  export interface IOsceMarksheetAction {
@@ -32,8 +32,7 @@ export interface IOsceMarksheetAction {
32
32
  endedAt: Date | null;
33
33
  action: EOsceMarksheetAction;
34
34
  }
35
- export interface IOsceMarksheetActionsData extends IOsceMarksheetAction {
36
- }
35
+ export declare type IOsceMarksheetActionData = RootData<IOsceMarksheetAction, 'osceMarksheetAction'>;
37
36
  export declare const OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
38
37
  export interface IOsceMatchmakingAction {
39
38
  osceMarksheetId: Id;
@@ -46,8 +45,10 @@ export interface IOsceMatchmakingAction {
46
45
  grouped: boolean;
47
46
  completed: boolean;
48
47
  }
49
- export interface IOsceMatchmakingData extends IOsceMatchmakingAction {
48
+ export declare type IOsceMatchmakingData = RootData<IOsceMatchmakingAction, 'osceMatchmaking'>;
49
+ export interface IOsceMatchmakingVar {
50
+ userId: Id;
50
51
  }
51
52
  export declare const OSCE_MATCHMAKING_USERS: import("@apollo/client").DocumentNode;
52
- export declare type IOsceMatchmakingUsersData = number;
53
+ export declare type IOsceMatchmakingUsersData = RootData<number, 'osceMatchmakingUsers'>;
53
54
  export declare type IOsceMatchmakingUsersVar = null;
@@ -7,3 +7,4 @@ export declare type RestrictedData<T, K extends keyof any> = {
7
7
  export declare type AdminData<T, K extends keyof any> = {
8
8
  admin: Record<K, T>;
9
9
  };
10
+ export declare type RootData<T, K extends keyof any> = Record<K, T>;