@quesmed/types 2.6.178 → 2.6.180

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.
@@ -96,10 +96,10 @@ export interface IJobMember {
96
96
  createdAt: Date | number;
97
97
  }
98
98
  export interface IJobAsset {
99
- id: number;
99
+ id: string;
100
100
  jobId: string;
101
101
  recordId: string | null;
102
- pictureId: string;
102
+ pictureId: number;
103
103
  picture: IPicture;
104
104
  index: number;
105
105
  type: ELightGalleryType;
@@ -153,6 +153,7 @@ export interface IJobRecordMetricsSummary {
153
153
  comments: IQuestionComment[];
154
154
  likes: number;
155
155
  dislikes: number;
156
+ public: boolean;
156
157
  }
157
158
  export interface IJobRecordChoiceVote {
158
159
  id: Id;
@@ -183,6 +184,7 @@ export interface IJobRecord {
183
184
  stationId: number | null;
184
185
  chapterId: number | null;
185
186
  remarks: IJobRemark[];
187
+ assets: IJobAsset[];
186
188
  metricsSummary: IJobRecordMetricsSummary | null;
187
189
  choiceSummary: IJobRecordChoiceSummary[] | null;
188
190
  }
@@ -151,7 +151,6 @@ exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
151
151
  ${record_1.JOB_RECORD_FRAGMENT}
152
152
  ${record_1.JOB_REMARK_FRAGMENT}
153
153
  ${exports.JOB_MEMBER_FRAGMENT}
154
- ${exports.JOB_ASSETS_FRAGMENT}
155
154
  fragment DetailedJob on Job {
156
155
  id
157
156
  updatedAt
@@ -1,5 +1,6 @@
1
1
  export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
2
2
  export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
3
+ export declare const JOB_ASSET_FRAGMENT: import("@apollo/client").DocumentNode;
3
4
  export declare const JOB_RECORD_METRICS_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
4
5
  export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
5
6
  export declare const JOB_RECORD_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_RECORD_STATISTICS_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_USER_FRAGMENT = void 0;
3
+ exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_RECORD_STATISTICS_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = exports.JOB_ASSET_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_USER_FRAGMENT = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
6
6
  fragment JobUser on User {
@@ -29,6 +29,33 @@ exports.JOB_REMARK_FRAGMENT = (0, client_1.gql) `
29
29
  }
30
30
  }
31
31
  `;
32
+ exports.JOB_ASSET_FRAGMENT = (0, client_1.gql) `
33
+ fragment JobAsset on JobAsset {
34
+ id
35
+ jobId
36
+ recordId
37
+ pictureId
38
+ index
39
+ type
40
+ choiceIdx
41
+ createdAt
42
+ picture {
43
+ id
44
+ updatedAt
45
+ name
46
+ sensitive
47
+ caption
48
+ path
49
+ path256
50
+ path512
51
+ overlayPath
52
+ overlayPath256
53
+ overlayPath512
54
+ thumbhash
55
+ index
56
+ }
57
+ }
58
+ `;
32
59
  exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = (0, client_1.gql) `
33
60
  fragment JobRecordMetricsSummary on JobRecordMetricsSummary {
34
61
  total
@@ -38,6 +65,7 @@ exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = (0, client_1.gql) `
38
65
  commentCount
39
66
  likes
40
67
  dislikes
68
+ public
41
69
  }
42
70
  `;
43
71
  exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = (0, client_1.gql) `
@@ -126,6 +154,7 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
126
154
  ${exports.JOB_RECORD_STATION_FRAGMENT}
127
155
  ${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
128
156
  ${exports.JOB_RECORD_STATISTICS_FRAGMENT}
157
+ ${exports.JOB_ASSET_FRAGMENT}
129
158
  fragment JobRecord on JobRecord {
130
159
  id
131
160
  jobId
@@ -148,6 +177,9 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
148
177
  remarks {
149
178
  ...JobRemark
150
179
  }
180
+ assets {
181
+ ...JobAsset
182
+ }
151
183
  createdByUser {
152
184
  ...JobUser
153
185
  }
@@ -1,4 +1,4 @@
1
- import { IJob, IJobChat, IJobMember, IJobRemark } from '../../../models';
1
+ import { ELightGalleryType, FileData, IJob, IJobAsset, IJobChat, IJobMember, IJobRecord, IJobRemark, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobInput = {
@@ -72,3 +72,29 @@ export type IDeleteJobChatsVar = {
72
72
  jobId: IJobChat['jobId'];
73
73
  };
74
74
  export type IDeleteJobChatsData = AdminData<boolean, 'deleteJobChats'>;
75
+ export declare const REMOVE_JOB_ASSETS: import("@apollo/client").DocumentNode;
76
+ export type IRemoveJobAssetsVar = {
77
+ jobId: IJobAsset['jobId'];
78
+ recordId?: IJobRecord['id'] | null;
79
+ ids: IJobAsset['id'][];
80
+ };
81
+ export type IRemoveJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'removeJobAssets'>;
82
+ export declare const CREATE_JOB_ASSETS: import("@apollo/client").DocumentNode;
83
+ export interface IJobRecordAssetInput {
84
+ file: File | FileData;
85
+ jobId: IJob['id'];
86
+ recordId?: IJobRecord['id'] | null;
87
+ caption?: string | null;
88
+ name: string;
89
+ topicId?: Id;
90
+ sensitive: boolean;
91
+ type: ELightGalleryType;
92
+ choiceIdx?: number | null;
93
+ index: number;
94
+ }
95
+ export type ICreateJobAssetsVar = {
96
+ input: IJobRecordAssetInput;
97
+ recordId?: IJobRecord['id'] | null;
98
+ jobId: IJob['id'];
99
+ };
100
+ export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DELETE_JOB_CHATS = exports.DELETE_JOB_CHAT = exports.CREATE_JOB_CHAT = exports.DELETE_JOB_REMARK = exports.UPDATE_JOB_REMARK = exports.CREATE_JOB_REMARK = exports.DELETE_JOB = exports.UPDATE_JOB_STATUS = exports.DUPLICATE_JOB = exports.UPDATE_JOB = exports.CREATE_JOB = void 0;
3
+ exports.CREATE_JOB_ASSETS = exports.REMOVE_JOB_ASSETS = exports.DELETE_JOB_CHATS = exports.DELETE_JOB_CHAT = exports.CREATE_JOB_CHAT = exports.DELETE_JOB_REMARK = exports.UPDATE_JOB_REMARK = exports.CREATE_JOB_REMARK = exports.DELETE_JOB = exports.UPDATE_JOB_STATUS = exports.DUPLICATE_JOB = exports.UPDATE_JOB = exports.CREATE_JOB = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.CREATE_JOB = (0, client_1.gql) `
@@ -100,3 +100,27 @@ exports.DELETE_JOB_CHATS = (0, client_1.gql) `
100
100
  }
101
101
  }
102
102
  `;
103
+ exports.REMOVE_JOB_ASSETS = (0, client_1.gql) `
104
+ ${fragments_1.JOB_ASSET_FRAGMENT}
105
+ mutation RemoveJobAssets($jobId: ID!, $recordId: ID, $ids: [ID!]!) {
106
+ admin {
107
+ removeJobAssets(jobId: $jobId, recordId: $recordId, ids: $ids) {
108
+ ...JobAsset
109
+ }
110
+ }
111
+ }
112
+ `;
113
+ exports.CREATE_JOB_ASSETS = (0, client_1.gql) `
114
+ ${fragments_1.JOB_ASSET_FRAGMENT}
115
+ mutation CreateJobAssets(
116
+ $input: JobRecordAssetInput!
117
+ $recordId: ID
118
+ $jobId: ID!
119
+ ) {
120
+ admin {
121
+ createJobAssets(input: $input, recordId: $recordId, jobId: $jobId) {
122
+ ...JobAsset
123
+ }
124
+ }
125
+ }
126
+ `;
@@ -1,4 +1,4 @@
1
- import { IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
1
+ import { IJobAsset, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const CREATE_JOB_RECORD: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobRecordVar = {
@@ -14,6 +14,7 @@ export type ICreateJobRecordVar = {
14
14
  } | {
15
15
  mockTest: IJobRecordMockTest;
16
16
  } | null;
17
+ assetIds?: IJobAsset['id'][] | null;
17
18
  };
18
19
  };
19
20
  export type ICreateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'createJobRecord'>;
@@ -35,6 +36,7 @@ export type IUpdateJobRecordVar = {
35
36
  } | {
36
37
  mockTest: Partial<IJobRecordMockTest>;
37
38
  } | null;
39
+ assetIds?: IJobAsset['id'][] | null;
38
40
  };
39
41
  export type IUpdateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'updateJobRecord'>;
40
42
  export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
@@ -96,10 +96,10 @@ export interface IJobMember {
96
96
  createdAt: Date | number;
97
97
  }
98
98
  export interface IJobAsset {
99
- id: number;
99
+ id: string;
100
100
  jobId: string;
101
101
  recordId: string | null;
102
- pictureId: string;
102
+ pictureId: number;
103
103
  picture: IPicture;
104
104
  index: number;
105
105
  type: ELightGalleryType;
@@ -153,6 +153,7 @@ export interface IJobRecordMetricsSummary {
153
153
  comments: IQuestionComment[];
154
154
  likes: number;
155
155
  dislikes: number;
156
+ public: boolean;
156
157
  }
157
158
  export interface IJobRecordChoiceVote {
158
159
  id: Id;
@@ -183,6 +184,7 @@ export interface IJobRecord {
183
184
  stationId: number | null;
184
185
  chapterId: number | null;
185
186
  remarks: IJobRemark[];
187
+ assets: IJobAsset[];
186
188
  metricsSummary: IJobRecordMetricsSummary | null;
187
189
  choiceSummary: IJobRecordChoiceSummary[] | null;
188
190
  }
@@ -148,7 +148,6 @@ export const FULL_JOB_FRAGMENT = gql `
148
148
  ${JOB_RECORD_FRAGMENT}
149
149
  ${JOB_REMARK_FRAGMENT}
150
150
  ${JOB_MEMBER_FRAGMENT}
151
- ${JOB_ASSETS_FRAGMENT}
152
151
  fragment DetailedJob on Job {
153
152
  id
154
153
  updatedAt
@@ -1,5 +1,6 @@
1
1
  export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
2
2
  export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
3
+ export declare const JOB_ASSET_FRAGMENT: import("@apollo/client").DocumentNode;
3
4
  export declare const JOB_RECORD_METRICS_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
4
5
  export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
5
6
  export declare const JOB_RECORD_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
@@ -26,6 +26,33 @@ export const JOB_REMARK_FRAGMENT = gql `
26
26
  }
27
27
  }
28
28
  `;
29
+ export const JOB_ASSET_FRAGMENT = gql `
30
+ fragment JobAsset on JobAsset {
31
+ id
32
+ jobId
33
+ recordId
34
+ pictureId
35
+ index
36
+ type
37
+ choiceIdx
38
+ createdAt
39
+ picture {
40
+ id
41
+ updatedAt
42
+ name
43
+ sensitive
44
+ caption
45
+ path
46
+ path256
47
+ path512
48
+ overlayPath
49
+ overlayPath256
50
+ overlayPath512
51
+ thumbhash
52
+ index
53
+ }
54
+ }
55
+ `;
29
56
  export const JOB_RECORD_METRICS_SUMMARY_FRAGMENT = gql `
30
57
  fragment JobRecordMetricsSummary on JobRecordMetricsSummary {
31
58
  total
@@ -35,6 +62,7 @@ export const JOB_RECORD_METRICS_SUMMARY_FRAGMENT = gql `
35
62
  commentCount
36
63
  likes
37
64
  dislikes
65
+ public
38
66
  }
39
67
  `;
40
68
  export const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = gql `
@@ -123,6 +151,7 @@ export const JOB_RECORD_FRAGMENT = gql `
123
151
  ${JOB_RECORD_STATION_FRAGMENT}
124
152
  ${JOB_RECORD_MOCK_TEST_FRAGMENT}
125
153
  ${JOB_RECORD_STATISTICS_FRAGMENT}
154
+ ${JOB_ASSET_FRAGMENT}
126
155
  fragment JobRecord on JobRecord {
127
156
  id
128
157
  jobId
@@ -145,6 +174,9 @@ export const JOB_RECORD_FRAGMENT = gql `
145
174
  remarks {
146
175
  ...JobRemark
147
176
  }
177
+ assets {
178
+ ...JobAsset
179
+ }
148
180
  createdByUser {
149
181
  ...JobUser
150
182
  }
@@ -1,4 +1,4 @@
1
- import { IJob, IJobChat, IJobMember, IJobRemark } from '../../../models';
1
+ import { ELightGalleryType, FileData, IJob, IJobAsset, IJobChat, IJobMember, IJobRecord, IJobRemark, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobInput = {
@@ -72,3 +72,29 @@ export type IDeleteJobChatsVar = {
72
72
  jobId: IJobChat['jobId'];
73
73
  };
74
74
  export type IDeleteJobChatsData = AdminData<boolean, 'deleteJobChats'>;
75
+ export declare const REMOVE_JOB_ASSETS: import("@apollo/client").DocumentNode;
76
+ export type IRemoveJobAssetsVar = {
77
+ jobId: IJobAsset['jobId'];
78
+ recordId?: IJobRecord['id'] | null;
79
+ ids: IJobAsset['id'][];
80
+ };
81
+ export type IRemoveJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'removeJobAssets'>;
82
+ export declare const CREATE_JOB_ASSETS: import("@apollo/client").DocumentNode;
83
+ export interface IJobRecordAssetInput {
84
+ file: File | FileData;
85
+ jobId: IJob['id'];
86
+ recordId?: IJobRecord['id'] | null;
87
+ caption?: string | null;
88
+ name: string;
89
+ topicId?: Id;
90
+ sensitive: boolean;
91
+ type: ELightGalleryType;
92
+ choiceIdx?: number | null;
93
+ index: number;
94
+ }
95
+ export type ICreateJobAssetsVar = {
96
+ input: IJobRecordAssetInput;
97
+ recordId?: IJobRecord['id'] | null;
98
+ jobId: IJob['id'];
99
+ };
100
+ export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
@@ -1,5 +1,5 @@
1
1
  import { gql } from '@apollo/client';
2
- import { JOB_REMARK_FRAGMENT, JOB_STATUS_FRAGMENT, LIST_JOB_FRAGMENT, } from '../../fragments';
2
+ import { JOB_ASSET_FRAGMENT, JOB_REMARK_FRAGMENT, JOB_STATUS_FRAGMENT, LIST_JOB_FRAGMENT, } from '../../fragments';
3
3
  export const CREATE_JOB = gql `
4
4
  ${LIST_JOB_FRAGMENT}
5
5
  mutation CreateJob($input: CreateJobInput!) {
@@ -97,3 +97,27 @@ export const DELETE_JOB_CHATS = gql `
97
97
  }
98
98
  }
99
99
  `;
100
+ export const REMOVE_JOB_ASSETS = gql `
101
+ ${JOB_ASSET_FRAGMENT}
102
+ mutation RemoveJobAssets($jobId: ID!, $recordId: ID, $ids: [ID!]!) {
103
+ admin {
104
+ removeJobAssets(jobId: $jobId, recordId: $recordId, ids: $ids) {
105
+ ...JobAsset
106
+ }
107
+ }
108
+ }
109
+ `;
110
+ export const CREATE_JOB_ASSETS = gql `
111
+ ${JOB_ASSET_FRAGMENT}
112
+ mutation CreateJobAssets(
113
+ $input: JobRecordAssetInput!
114
+ $recordId: ID
115
+ $jobId: ID!
116
+ ) {
117
+ admin {
118
+ createJobAssets(input: $input, recordId: $recordId, jobId: $jobId) {
119
+ ...JobAsset
120
+ }
121
+ }
122
+ }
123
+ `;
@@ -1,4 +1,4 @@
1
- import { IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
1
+ import { IJobAsset, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const CREATE_JOB_RECORD: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobRecordVar = {
@@ -14,6 +14,7 @@ export type ICreateJobRecordVar = {
14
14
  } | {
15
15
  mockTest: IJobRecordMockTest;
16
16
  } | null;
17
+ assetIds?: IJobAsset['id'][] | null;
17
18
  };
18
19
  };
19
20
  export type ICreateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'createJobRecord'>;
@@ -35,6 +36,7 @@ export type IUpdateJobRecordVar = {
35
36
  } | {
36
37
  mockTest: Partial<IJobRecordMockTest>;
37
38
  } | null;
39
+ assetIds?: IJobAsset['id'][] | null;
38
40
  };
39
41
  export type IUpdateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'updateJobRecord'>;
40
42
  export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.178",
3
+ "version": "2.6.180",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",