@quesmed/types-rn 2.6.179 → 2.6.181

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/Job.d.ts CHANGED
@@ -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;
@@ -184,6 +184,7 @@ export interface IJobRecord {
184
184
  stationId: number | null;
185
185
  chapterId: number | null;
186
186
  remarks: IJobRemark[];
187
+ assets: IJobAsset[];
187
188
  metricsSummary: IJobRecordMetricsSummary | null;
188
189
  choiceSummary: IJobRecordChoiceSummary[] | null;
189
190
  }
@@ -242,6 +243,7 @@ export interface IJob {
242
243
  remarkCount: number;
243
244
  resolvedCount: number;
244
245
  memberCount: number;
246
+ assetCount: number;
245
247
  chatCount: number;
246
248
  publishedCount: number;
247
249
  remarks: IJobRemark[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.179",
3
+ "version": "2.6.181",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -116,6 +116,7 @@ exports.LIST_JOB_FRAGMENT = (0, client_1.gql) `
116
116
  resolvedCount
117
117
  remarkCount
118
118
  memberCount
119
+ assetCount
119
120
  chatCount
120
121
  createdByUser {
121
122
  ...JobUser
@@ -151,7 +152,6 @@ exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
151
152
  ${record_1.JOB_RECORD_FRAGMENT}
152
153
  ${record_1.JOB_REMARK_FRAGMENT}
153
154
  ${exports.JOB_MEMBER_FRAGMENT}
154
- ${exports.JOB_ASSETS_FRAGMENT}
155
155
  fragment DetailedJob on Job {
156
156
  id
157
157
  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
@@ -127,6 +154,7 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
127
154
  ${exports.JOB_RECORD_STATION_FRAGMENT}
128
155
  ${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
129
156
  ${exports.JOB_RECORD_STATISTICS_FRAGMENT}
157
+ ${exports.JOB_ASSET_FRAGMENT}
130
158
  fragment JobRecord on JobRecord {
131
159
  id
132
160
  jobId
@@ -149,6 +177,9 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
149
177
  remarks {
150
178
  ...JobRemark
151
179
  }
180
+ assets {
181
+ ...JobAsset
182
+ }
152
183
  createdByUser {
153
184
  ...JobUser
154
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,30 @@ 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
+ unlink?: boolean | null;
79
+ ids: IJobAsset['id'][];
80
+ recordId?: IJobRecord['id'] | null;
81
+ };
82
+ export type IRemoveJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'removeJobAssets'>;
83
+ export declare const CREATE_JOB_ASSETS: import("@apollo/client").DocumentNode;
84
+ export interface IJobRecordAssetInput {
85
+ file: File | FileData;
86
+ jobId: IJob['id'];
87
+ recordId?: IJobRecord['id'] | null;
88
+ caption?: string | null;
89
+ name: string;
90
+ topicId?: Id;
91
+ sensitive: boolean;
92
+ type: ELightGalleryType;
93
+ choiceIdx?: number | null;
94
+ index: number;
95
+ }
96
+ export type ICreateJobAssetsVar = {
97
+ input: IJobRecordAssetInput;
98
+ recordId?: IJobRecord['id'] | null;
99
+ jobId: IJob['id'];
100
+ };
101
+ 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,37 @@ 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(
106
+ $jobId: ID!
107
+ $unlink: Boolean
108
+ $ids: [ID!]!
109
+ $recordId: ID
110
+ ) {
111
+ admin {
112
+ removeJobAssets(
113
+ jobId: $jobId
114
+ unlink: $unlink
115
+ ids: $ids
116
+ recordId: $recordId
117
+ ) {
118
+ ...JobAsset
119
+ }
120
+ }
121
+ }
122
+ `;
123
+ exports.CREATE_JOB_ASSETS = (0, client_1.gql) `
124
+ ${fragments_1.JOB_ASSET_FRAGMENT}
125
+ mutation CreateJobAssets(
126
+ $input: JobRecordAssetInput!
127
+ $recordId: ID
128
+ $jobId: ID!
129
+ ) {
130
+ admin {
131
+ createJobAssets(input: $input, recordId: $recordId, jobId: $jobId) {
132
+ ...JobAsset
133
+ }
134
+ }
135
+ }
136
+ `;
@@ -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,8 @@ export type IUpdateJobRecordVar = {
35
36
  } | {
36
37
  mockTest: Partial<IJobRecordMockTest>;
37
38
  } | null;
39
+ createdAssetIds?: IJobAsset['id'][] | null;
40
+ deletedAssetIds?: IJobAsset['id'][] | null;
38
41
  };
39
42
  export type IUpdateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'updateJobRecord'>;
40
43
  export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
@@ -26,9 +26,17 @@ exports.UPDATE_JOB_RECORD = (0, client_1.gql) `
26
26
  $id: ID!
27
27
  $referenceId: ID
28
28
  $input: JobRecordDataInput!
29
+ $createdAssetIds: [ID!]
30
+ $deletedAssetIds: [ID!]
29
31
  ) {
30
32
  admin {
31
- updateJobRecord(id: $id, referenceId: $referenceId, input: $input) {
33
+ updateJobRecord(
34
+ id: $id
35
+ referenceId: $referenceId
36
+ input: $input
37
+ createdAssetIds: $createdAssetIds
38
+ deletedAssetIds: $deletedAssetIds
39
+ ) {
32
40
  ...JobRecord
33
41
  }
34
42
  }