@sjcrh/proteinpaint-types 2.132.1-1 → 2.133.3-0
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/dist/chunk-EGEOFGXO.js +273 -0
- package/dist/chunk-O7IJ2JNI.js +101 -0
- package/dist/{chunk-UZH5HOBP.js → chunk-ROVWURCJ.js} +29 -3
- package/dist/{chunk-7YC2GEEO.js → chunk-TCSJGKT3.js} +5 -1
- package/dist/gdc.grin2.js +1 -1
- package/dist/index.js +25 -17
- package/dist/sampleWsiAiApi.js +11 -0
- package/dist/samplewsimages.js +1 -1
- package/dist/wsimages.js +1 -1
- package/package.json +1 -1
- package/src/dataset.ts +15 -2
- package/src/routes/gdc.grin2.ts +2 -0
- package/src/routes/sampleWsiAiApi.ts +21 -0
- package/src/routes/samplewsimages.ts +9 -0
- package/src/routes/wsimages.ts +11 -0
- package/dist/chunk-D5OG676D.js +0 -166
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__toESM,
|
|
3
|
+
require_lib
|
|
4
|
+
} from "./chunk-CNSSF43V.js";
|
|
5
|
+
|
|
6
|
+
// dist/samplewsimages.ts
|
|
7
|
+
var import_typia = __toESM(require_lib(), 1);
|
|
8
|
+
|
|
9
|
+
// src/routes/samplewsimages.ts
|
|
10
|
+
var sampleWSImagesPayload = {
|
|
11
|
+
request: {
|
|
12
|
+
typeId: "SampleWSImagesRequest"
|
|
13
|
+
},
|
|
14
|
+
response: {
|
|
15
|
+
typeId: "SampleWSImagesResponse"
|
|
16
|
+
}
|
|
17
|
+
// examples: []
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// dist/samplewsimages.ts
|
|
21
|
+
var validSampleWSImagesRequest = (input) => {
|
|
22
|
+
const errors = [];
|
|
23
|
+
const __is = (input2) => {
|
|
24
|
+
return "object" === typeof input2 && null !== input2 && ("string" === typeof input2.genome && "string" === typeof input2.dslabel && "string" === typeof input2.sample_id && "string" === typeof input2.wsimage && "number" === typeof input2.index);
|
|
25
|
+
};
|
|
26
|
+
if (false === __is(input)) {
|
|
27
|
+
const $report = import_typia.createValidate.report(errors);
|
|
28
|
+
((input2, _path, _exceptionable = true) => {
|
|
29
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.genome || $report(_exceptionable2, {
|
|
30
|
+
path: _path2 + ".genome",
|
|
31
|
+
expected: "string",
|
|
32
|
+
value: input3.genome
|
|
33
|
+
}), "string" === typeof input3.dslabel || $report(_exceptionable2, {
|
|
34
|
+
path: _path2 + ".dslabel",
|
|
35
|
+
expected: "string",
|
|
36
|
+
value: input3.dslabel
|
|
37
|
+
}), "string" === typeof input3.sample_id || $report(_exceptionable2, {
|
|
38
|
+
path: _path2 + ".sample_id",
|
|
39
|
+
expected: "string",
|
|
40
|
+
value: input3.sample_id
|
|
41
|
+
}), "string" === typeof input3.wsimage || $report(_exceptionable2, {
|
|
42
|
+
path: _path2 + ".wsimage",
|
|
43
|
+
expected: "string",
|
|
44
|
+
value: input3.wsimage
|
|
45
|
+
}), "number" === typeof input3.index || $report(_exceptionable2, {
|
|
46
|
+
path: _path2 + ".index",
|
|
47
|
+
expected: "number",
|
|
48
|
+
value: input3.index
|
|
49
|
+
})].every((flag) => flag);
|
|
50
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
51
|
+
path: _path + "",
|
|
52
|
+
expected: "SampleWSImagesRequest",
|
|
53
|
+
value: input2
|
|
54
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
55
|
+
path: _path + "",
|
|
56
|
+
expected: "SampleWSImagesRequest",
|
|
57
|
+
value: input2
|
|
58
|
+
});
|
|
59
|
+
})(input, "$input", true);
|
|
60
|
+
}
|
|
61
|
+
const success = 0 === errors.length;
|
|
62
|
+
return {
|
|
63
|
+
success,
|
|
64
|
+
errors,
|
|
65
|
+
data: success ? input : void 0
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
var validSampleWSImagesResponse = (input) => {
|
|
69
|
+
const errors = [];
|
|
70
|
+
const __is = (input2) => {
|
|
71
|
+
const $io0 = (input3) => Array.isArray(input3.sampleWSImages) && input3.sampleWSImages.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
|
|
72
|
+
const $io1 = (input3) => "string" === typeof input3.filename && (void 0 === input3.overlays || Array.isArray(input3.overlays) && input3.overlays.every((elem) => "string" === typeof elem)) && (void 0 === input3.predictionLayers || Array.isArray(input3.predictionLayers) && input3.predictionLayers.every((elem) => "string" === typeof elem)) && (void 0 === input3.zoomInPoints || Array.isArray(input3.zoomInPoints) && input3.zoomInPoints.every((elem) => Array.isArray(elem) && (elem.length === 2 && "number" === typeof elem[0] && "number" === typeof elem[1]))) && "string" === typeof input3.metadata && (void 0 === input3.annotationsData || Array.isArray(input3.annotationsData) && input3.annotationsData.every((elem) => "object" === typeof elem && null !== elem && $io2(elem))) && (void 0 === input3.classes || Array.isArray(input3.classes) && input3.classes.every((elem) => "object" === typeof elem && null !== elem && $io3(elem))) && true && (void 0 === input3.activePatchColor || "string" === typeof input3.activePatchColor);
|
|
73
|
+
const $io2 = (input3) => Array.isArray(input3.zoomCoordinates) && (input3.zoomCoordinates.length === 2 && "number" === typeof input3.zoomCoordinates[0] && "number" === typeof input3.zoomCoordinates[1]) && "string" === typeof input3.type && "string" === typeof input3["class"] && "number" === typeof input3.uncertainty;
|
|
74
|
+
const $io3 = (input3) => "number" === typeof input3.id && "string" === typeof input3.shortcut && "string" === typeof input3.label && "string" === typeof input3.color;
|
|
75
|
+
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
76
|
+
};
|
|
77
|
+
if (false === __is(input)) {
|
|
78
|
+
const $report = import_typia.createValidate.report(errors);
|
|
79
|
+
((input2, _path, _exceptionable = true) => {
|
|
80
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.sampleWSImages) || $report(_exceptionable2, {
|
|
81
|
+
path: _path2 + ".sampleWSImages",
|
|
82
|
+
expected: "Array<WSImage>",
|
|
83
|
+
value: input3.sampleWSImages
|
|
84
|
+
})) && input3.sampleWSImages.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
85
|
+
path: _path2 + ".sampleWSImages[" + _index1 + "]",
|
|
86
|
+
expected: "WSImage",
|
|
87
|
+
value: elem
|
|
88
|
+
})) && $vo1(elem, _path2 + ".sampleWSImages[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
89
|
+
path: _path2 + ".sampleWSImages[" + _index1 + "]",
|
|
90
|
+
expected: "WSImage",
|
|
91
|
+
value: elem
|
|
92
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
93
|
+
path: _path2 + ".sampleWSImages",
|
|
94
|
+
expected: "Array<WSImage>",
|
|
95
|
+
value: input3.sampleWSImages
|
|
96
|
+
})].every((flag) => flag);
|
|
97
|
+
const $vo1 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.filename || $report(_exceptionable2, {
|
|
98
|
+
path: _path2 + ".filename",
|
|
99
|
+
expected: "string",
|
|
100
|
+
value: input3.filename
|
|
101
|
+
}), void 0 === input3.overlays || (Array.isArray(input3.overlays) || $report(_exceptionable2, {
|
|
102
|
+
path: _path2 + ".overlays",
|
|
103
|
+
expected: "(Array<string> | undefined)",
|
|
104
|
+
value: input3.overlays
|
|
105
|
+
})) && input3.overlays.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable2, {
|
|
106
|
+
path: _path2 + ".overlays[" + _index2 + "]",
|
|
107
|
+
expected: "string",
|
|
108
|
+
value: elem
|
|
109
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
110
|
+
path: _path2 + ".overlays",
|
|
111
|
+
expected: "(Array<string> | undefined)",
|
|
112
|
+
value: input3.overlays
|
|
113
|
+
}), void 0 === input3.predictionLayers || (Array.isArray(input3.predictionLayers) || $report(_exceptionable2, {
|
|
114
|
+
path: _path2 + ".predictionLayers",
|
|
115
|
+
expected: "(Array<string> | undefined)",
|
|
116
|
+
value: input3.predictionLayers
|
|
117
|
+
})) && input3.predictionLayers.map((elem, _index3) => "string" === typeof elem || $report(_exceptionable2, {
|
|
118
|
+
path: _path2 + ".predictionLayers[" + _index3 + "]",
|
|
119
|
+
expected: "string",
|
|
120
|
+
value: elem
|
|
121
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
122
|
+
path: _path2 + ".predictionLayers",
|
|
123
|
+
expected: "(Array<string> | undefined)",
|
|
124
|
+
value: input3.predictionLayers
|
|
125
|
+
}), void 0 === input3.zoomInPoints || (Array.isArray(input3.zoomInPoints) || $report(_exceptionable2, {
|
|
126
|
+
path: _path2 + ".zoomInPoints",
|
|
127
|
+
expected: "(Array<[number, number]> | undefined)",
|
|
128
|
+
value: input3.zoomInPoints
|
|
129
|
+
})) && input3.zoomInPoints.map((elem, _index4) => (Array.isArray(elem) || $report(_exceptionable2, {
|
|
130
|
+
path: _path2 + ".zoomInPoints[" + _index4 + "]",
|
|
131
|
+
expected: "[number, number]",
|
|
132
|
+
value: elem
|
|
133
|
+
})) && ((elem.length === 2 || $report(_exceptionable2, {
|
|
134
|
+
path: _path2 + ".zoomInPoints[" + _index4 + "]",
|
|
135
|
+
expected: "[number, number]",
|
|
136
|
+
value: elem
|
|
137
|
+
})) && [
|
|
138
|
+
"number" === typeof elem[0] || $report(_exceptionable2, {
|
|
139
|
+
path: _path2 + ".zoomInPoints[" + _index4 + "][0]",
|
|
140
|
+
expected: "number",
|
|
141
|
+
value: elem[0]
|
|
142
|
+
}),
|
|
143
|
+
"number" === typeof elem[1] || $report(_exceptionable2, {
|
|
144
|
+
path: _path2 + ".zoomInPoints[" + _index4 + "][1]",
|
|
145
|
+
expected: "number",
|
|
146
|
+
value: elem[1]
|
|
147
|
+
})
|
|
148
|
+
].every((flag) => flag)) || $report(_exceptionable2, {
|
|
149
|
+
path: _path2 + ".zoomInPoints[" + _index4 + "]",
|
|
150
|
+
expected: "[number, number]",
|
|
151
|
+
value: elem
|
|
152
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
153
|
+
path: _path2 + ".zoomInPoints",
|
|
154
|
+
expected: "(Array<[number, number]> | undefined)",
|
|
155
|
+
value: input3.zoomInPoints
|
|
156
|
+
}), "string" === typeof input3.metadata || $report(_exceptionable2, {
|
|
157
|
+
path: _path2 + ".metadata",
|
|
158
|
+
expected: "string",
|
|
159
|
+
value: input3.metadata
|
|
160
|
+
}), void 0 === input3.annotationsData || (Array.isArray(input3.annotationsData) || $report(_exceptionable2, {
|
|
161
|
+
path: _path2 + ".annotationsData",
|
|
162
|
+
expected: "(Array<__type> | undefined)",
|
|
163
|
+
value: input3.annotationsData
|
|
164
|
+
})) && input3.annotationsData.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
165
|
+
path: _path2 + ".annotationsData[" + _index5 + "]",
|
|
166
|
+
expected: "__type",
|
|
167
|
+
value: elem
|
|
168
|
+
})) && $vo2(elem, _path2 + ".annotationsData[" + _index5 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
169
|
+
path: _path2 + ".annotationsData[" + _index5 + "]",
|
|
170
|
+
expected: "__type",
|
|
171
|
+
value: elem
|
|
172
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
173
|
+
path: _path2 + ".annotationsData",
|
|
174
|
+
expected: "(Array<__type> | undefined)",
|
|
175
|
+
value: input3.annotationsData
|
|
176
|
+
}), void 0 === input3.classes || (Array.isArray(input3.classes) || $report(_exceptionable2, {
|
|
177
|
+
path: _path2 + ".classes",
|
|
178
|
+
expected: "(Array<WSIClass> | undefined)",
|
|
179
|
+
value: input3.classes
|
|
180
|
+
})) && input3.classes.map((elem, _index6) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
181
|
+
path: _path2 + ".classes[" + _index6 + "]",
|
|
182
|
+
expected: "WSIClass",
|
|
183
|
+
value: elem
|
|
184
|
+
})) && $vo3(elem, _path2 + ".classes[" + _index6 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
185
|
+
path: _path2 + ".classes[" + _index6 + "]",
|
|
186
|
+
expected: "WSIClass",
|
|
187
|
+
value: elem
|
|
188
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
189
|
+
path: _path2 + ".classes",
|
|
190
|
+
expected: "(Array<WSIClass> | undefined)",
|
|
191
|
+
value: input3.classes
|
|
192
|
+
}), true, void 0 === input3.activePatchColor || "string" === typeof input3.activePatchColor || $report(_exceptionable2, {
|
|
193
|
+
path: _path2 + ".activePatchColor",
|
|
194
|
+
expected: "(string | undefined)",
|
|
195
|
+
value: input3.activePatchColor
|
|
196
|
+
})].every((flag) => flag);
|
|
197
|
+
const $vo2 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.zoomCoordinates) || $report(_exceptionable2, {
|
|
198
|
+
path: _path2 + ".zoomCoordinates",
|
|
199
|
+
expected: "[number, number]",
|
|
200
|
+
value: input3.zoomCoordinates
|
|
201
|
+
})) && ((input3.zoomCoordinates.length === 2 || $report(_exceptionable2, {
|
|
202
|
+
path: _path2 + ".zoomCoordinates",
|
|
203
|
+
expected: "[number, number]",
|
|
204
|
+
value: input3.zoomCoordinates
|
|
205
|
+
})) && [
|
|
206
|
+
"number" === typeof input3.zoomCoordinates[0] || $report(_exceptionable2, {
|
|
207
|
+
path: _path2 + ".zoomCoordinates[0]",
|
|
208
|
+
expected: "number",
|
|
209
|
+
value: input3.zoomCoordinates[0]
|
|
210
|
+
}),
|
|
211
|
+
"number" === typeof input3.zoomCoordinates[1] || $report(_exceptionable2, {
|
|
212
|
+
path: _path2 + ".zoomCoordinates[1]",
|
|
213
|
+
expected: "number",
|
|
214
|
+
value: input3.zoomCoordinates[1]
|
|
215
|
+
})
|
|
216
|
+
].every((flag) => flag)) || $report(_exceptionable2, {
|
|
217
|
+
path: _path2 + ".zoomCoordinates",
|
|
218
|
+
expected: "[number, number]",
|
|
219
|
+
value: input3.zoomCoordinates
|
|
220
|
+
}), "string" === typeof input3.type || $report(_exceptionable2, {
|
|
221
|
+
path: _path2 + ".type",
|
|
222
|
+
expected: "string",
|
|
223
|
+
value: input3.type
|
|
224
|
+
}), "string" === typeof input3["class"] || $report(_exceptionable2, {
|
|
225
|
+
path: _path2 + '["class"]',
|
|
226
|
+
expected: "string",
|
|
227
|
+
value: input3["class"]
|
|
228
|
+
}), "number" === typeof input3.uncertainty || $report(_exceptionable2, {
|
|
229
|
+
path: _path2 + ".uncertainty",
|
|
230
|
+
expected: "number",
|
|
231
|
+
value: input3.uncertainty
|
|
232
|
+
})].every((flag) => flag);
|
|
233
|
+
const $vo3 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.id || $report(_exceptionable2, {
|
|
234
|
+
path: _path2 + ".id",
|
|
235
|
+
expected: "number",
|
|
236
|
+
value: input3.id
|
|
237
|
+
}), "string" === typeof input3.shortcut || $report(_exceptionable2, {
|
|
238
|
+
path: _path2 + ".shortcut",
|
|
239
|
+
expected: "string",
|
|
240
|
+
value: input3.shortcut
|
|
241
|
+
}), "string" === typeof input3.label || $report(_exceptionable2, {
|
|
242
|
+
path: _path2 + ".label",
|
|
243
|
+
expected: "string",
|
|
244
|
+
value: input3.label
|
|
245
|
+
}), "string" === typeof input3.color || $report(_exceptionable2, {
|
|
246
|
+
path: _path2 + ".color",
|
|
247
|
+
expected: "string",
|
|
248
|
+
value: input3.color
|
|
249
|
+
})].every((flag) => flag);
|
|
250
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
251
|
+
path: _path + "",
|
|
252
|
+
expected: "SampleWSImagesResponse",
|
|
253
|
+
value: input2
|
|
254
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
255
|
+
path: _path + "",
|
|
256
|
+
expected: "SampleWSImagesResponse",
|
|
257
|
+
value: input2
|
|
258
|
+
});
|
|
259
|
+
})(input, "$input", true);
|
|
260
|
+
}
|
|
261
|
+
const success = 0 === errors.length;
|
|
262
|
+
return {
|
|
263
|
+
success,
|
|
264
|
+
errors,
|
|
265
|
+
data: success ? input : void 0
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export {
|
|
270
|
+
sampleWSImagesPayload,
|
|
271
|
+
validSampleWSImagesRequest,
|
|
272
|
+
validSampleWSImagesResponse
|
|
273
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__toESM,
|
|
3
|
+
require_lib
|
|
4
|
+
} from "./chunk-CNSSF43V.js";
|
|
5
|
+
|
|
6
|
+
// dist/sampleWsiAiApi.ts
|
|
7
|
+
var import_typia = __toESM(require_lib(), 1);
|
|
8
|
+
|
|
9
|
+
// src/routes/sampleWsiAiApi.ts
|
|
10
|
+
var sampleWsiAiApiPayload = {
|
|
11
|
+
request: {
|
|
12
|
+
typeId: "SampleWSIAiApiRequest"
|
|
13
|
+
},
|
|
14
|
+
response: {
|
|
15
|
+
typeId: "SampleWSIAiApiResponse"
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// dist/sampleWsiAiApi.ts
|
|
20
|
+
var validSampleWSIAiApiRequest = (input) => {
|
|
21
|
+
const errors = [];
|
|
22
|
+
const __is = (input2) => {
|
|
23
|
+
const $io0 = (input3) => "number" === typeof input3.index && "boolean" === typeof input3.confirmed && (null === input3["class"] || "number" === typeof input3["class"]);
|
|
24
|
+
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
25
|
+
};
|
|
26
|
+
if (false === __is(input)) {
|
|
27
|
+
const $report = import_typia.createValidate.report(errors);
|
|
28
|
+
((input2, _path, _exceptionable = true) => {
|
|
29
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["number" === typeof input3.index || $report(_exceptionable2, {
|
|
30
|
+
path: _path2 + ".index",
|
|
31
|
+
expected: "number",
|
|
32
|
+
value: input3.index
|
|
33
|
+
}), "boolean" === typeof input3.confirmed || $report(_exceptionable2, {
|
|
34
|
+
path: _path2 + ".confirmed",
|
|
35
|
+
expected: "boolean",
|
|
36
|
+
value: input3.confirmed
|
|
37
|
+
}), null === input3["class"] || "number" === typeof input3["class"] || $report(_exceptionable2, {
|
|
38
|
+
path: _path2 + '["class"]',
|
|
39
|
+
expected: "(null | number)",
|
|
40
|
+
value: input3["class"]
|
|
41
|
+
})].every((flag) => flag);
|
|
42
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
43
|
+
path: _path + "",
|
|
44
|
+
expected: "SampleWSIAiApiRequest",
|
|
45
|
+
value: input2
|
|
46
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
47
|
+
path: _path + "",
|
|
48
|
+
expected: "SampleWSIAiApiRequest",
|
|
49
|
+
value: input2
|
|
50
|
+
});
|
|
51
|
+
})(input, "$input", true);
|
|
52
|
+
}
|
|
53
|
+
const success = 0 === errors.length;
|
|
54
|
+
return {
|
|
55
|
+
success,
|
|
56
|
+
errors,
|
|
57
|
+
data: success ? input : void 0
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
var validSampleWSIAiApiResponse = (input) => {
|
|
61
|
+
const errors = [];
|
|
62
|
+
const __is = (input2) => {
|
|
63
|
+
const $io0 = (input3) => ("error" === input3.status || "ok" === input3.status) && (void 0 === input3.error || "string" === typeof input3.error);
|
|
64
|
+
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
65
|
+
};
|
|
66
|
+
if (false === __is(input)) {
|
|
67
|
+
const $report = import_typia.createValidate.report(errors);
|
|
68
|
+
((input2, _path, _exceptionable = true) => {
|
|
69
|
+
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["error" === input3.status || "ok" === input3.status || $report(_exceptionable2, {
|
|
70
|
+
path: _path2 + ".status",
|
|
71
|
+
expected: '("error" | "ok")',
|
|
72
|
+
value: input3.status
|
|
73
|
+
}), void 0 === input3.error || "string" === typeof input3.error || $report(_exceptionable2, {
|
|
74
|
+
path: _path2 + ".error",
|
|
75
|
+
expected: "(string | undefined)",
|
|
76
|
+
value: input3.error
|
|
77
|
+
})].every((flag) => flag);
|
|
78
|
+
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
79
|
+
path: _path + "",
|
|
80
|
+
expected: "SampleWSIAiApiResponse",
|
|
81
|
+
value: input2
|
|
82
|
+
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
83
|
+
path: _path + "",
|
|
84
|
+
expected: "SampleWSIAiApiResponse",
|
|
85
|
+
value: input2
|
|
86
|
+
});
|
|
87
|
+
})(input, "$input", true);
|
|
88
|
+
}
|
|
89
|
+
const success = 0 === errors.length;
|
|
90
|
+
return {
|
|
91
|
+
success,
|
|
92
|
+
errors,
|
|
93
|
+
data: success ? input : void 0
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
sampleWsiAiApiPayload,
|
|
99
|
+
validSampleWSIAiApiRequest,
|
|
100
|
+
validSampleWSIAiApiResponse
|
|
101
|
+
};
|
|
@@ -64,7 +64,8 @@ var validWSImagesRequest = (input) => {
|
|
|
64
64
|
var validWSImagesResponse = (input) => {
|
|
65
65
|
const errors = [];
|
|
66
66
|
const __is = (input2) => {
|
|
67
|
-
const $io0 = (input3) => (void 0 === input3.wsiSessionId || "string" === typeof input3.wsiSessionId) && (Array.isArray(input3.slide_dimensions) && input3.slide_dimensions.every((elem) => "number" === typeof elem)) && "string" === typeof input3.status && (void 0 === input3.error || "string" === typeof input3.error);
|
|
67
|
+
const $io0 = (input3) => (void 0 === input3.wsiSessionId || "string" === typeof input3.wsiSessionId) && (void 0 === input3.overlays || Array.isArray(input3.overlays) && input3.overlays.every((elem) => "object" === typeof elem && null !== elem && $io1(elem))) && (Array.isArray(input3.slide_dimensions) && input3.slide_dimensions.every((elem) => "number" === typeof elem)) && "string" === typeof input3.status && (void 0 === input3.error || "string" === typeof input3.error);
|
|
68
|
+
const $io1 = (input3) => "string" === typeof input3.layerNumber && ("Prediction" === input3.predictionOverlayType || "Uncertainty" === input3.predictionOverlayType);
|
|
68
69
|
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
69
70
|
};
|
|
70
71
|
if (false === __is(input)) {
|
|
@@ -74,12 +75,28 @@ var validWSImagesResponse = (input) => {
|
|
|
74
75
|
path: _path2 + ".wsiSessionId",
|
|
75
76
|
expected: "(string | undefined)",
|
|
76
77
|
value: input3.wsiSessionId
|
|
78
|
+
}), void 0 === input3.overlays || (Array.isArray(input3.overlays) || $report(_exceptionable2, {
|
|
79
|
+
path: _path2 + ".overlays",
|
|
80
|
+
expected: "(Array<PredictionOverlay> | undefined)",
|
|
81
|
+
value: input3.overlays
|
|
82
|
+
})) && input3.overlays.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
83
|
+
path: _path2 + ".overlays[" + _index1 + "]",
|
|
84
|
+
expected: "PredictionOverlay",
|
|
85
|
+
value: elem
|
|
86
|
+
})) && $vo1(elem, _path2 + ".overlays[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
87
|
+
path: _path2 + ".overlays[" + _index1 + "]",
|
|
88
|
+
expected: "PredictionOverlay",
|
|
89
|
+
value: elem
|
|
90
|
+
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
91
|
+
path: _path2 + ".overlays",
|
|
92
|
+
expected: "(Array<PredictionOverlay> | undefined)",
|
|
93
|
+
value: input3.overlays
|
|
77
94
|
}), (Array.isArray(input3.slide_dimensions) || $report(_exceptionable2, {
|
|
78
95
|
path: _path2 + ".slide_dimensions",
|
|
79
96
|
expected: "Array<number>",
|
|
80
97
|
value: input3.slide_dimensions
|
|
81
|
-
})) && input3.slide_dimensions.map((elem,
|
|
82
|
-
path: _path2 + ".slide_dimensions[" +
|
|
98
|
+
})) && input3.slide_dimensions.map((elem, _index2) => "number" === typeof elem || $report(_exceptionable2, {
|
|
99
|
+
path: _path2 + ".slide_dimensions[" + _index2 + "]",
|
|
83
100
|
expected: "number",
|
|
84
101
|
value: elem
|
|
85
102
|
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
@@ -95,6 +112,15 @@ var validWSImagesResponse = (input) => {
|
|
|
95
112
|
expected: "(string | undefined)",
|
|
96
113
|
value: input3.error
|
|
97
114
|
})].every((flag) => flag);
|
|
115
|
+
const $vo1 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.layerNumber || $report(_exceptionable2, {
|
|
116
|
+
path: _path2 + ".layerNumber",
|
|
117
|
+
expected: "string",
|
|
118
|
+
value: input3.layerNumber
|
|
119
|
+
}), "Prediction" === input3.predictionOverlayType || "Uncertainty" === input3.predictionOverlayType || $report(_exceptionable2, {
|
|
120
|
+
path: _path2 + ".predictionOverlayType",
|
|
121
|
+
expected: '("Prediction" | "Uncertainty")',
|
|
122
|
+
value: input3.predictionOverlayType
|
|
123
|
+
})].every((flag) => flag);
|
|
98
124
|
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
99
125
|
path: _path + "",
|
|
100
126
|
expected: "WSImagesResponse",
|
|
@@ -336,7 +336,7 @@ var validRunGRIN2Request = (input) => {
|
|
|
336
336
|
});
|
|
337
337
|
const $io2 = (input3) => (void 0 === input3.maf || "string" === typeof input3.maf) && (void 0 === input3.cnv || "string" === typeof input3.cnv);
|
|
338
338
|
const $io3 = (input3) => (void 0 === input3.minTotalDepth || "number" === typeof input3.minTotalDepth) && (void 0 === input3.minAltAlleleCount || "number" === typeof input3.minAltAlleleCount) && (void 0 === input3.consequences || Array.isArray(input3.consequences) && input3.consequences.every((elem) => "string" === typeof elem)) && (void 0 === input3.hyperMutator || "number" === typeof input3.hyperMutator);
|
|
339
|
-
const $io4 = (input3) => (void 0 === input3.lossThreshold || "number" === typeof input3.lossThreshold) && (void 0 === input3.gainThreshold || "number" === typeof input3.gainThreshold) && (void 0 === input3.segLength || "number" === typeof input3.segLength);
|
|
339
|
+
const $io4 = (input3) => (void 0 === input3.lossThreshold || "number" === typeof input3.lossThreshold) && (void 0 === input3.gainThreshold || "number" === typeof input3.gainThreshold) && (void 0 === input3.segLength || "number" === typeof input3.segLength) && (void 0 === input3.hyperMutator || "number" === typeof input3.hyperMutator);
|
|
340
340
|
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
341
341
|
};
|
|
342
342
|
if (false === __is(input)) {
|
|
@@ -430,6 +430,10 @@ var validRunGRIN2Request = (input) => {
|
|
|
430
430
|
path: _path2 + ".segLength",
|
|
431
431
|
expected: "(number | undefined)",
|
|
432
432
|
value: input3.segLength
|
|
433
|
+
}), void 0 === input3.hyperMutator || "number" === typeof input3.hyperMutator || $report(_exceptionable2, {
|
|
434
|
+
path: _path2 + ".hyperMutator",
|
|
435
|
+
expected: "(number | undefined)",
|
|
436
|
+
value: input3.hyperMutator
|
|
433
437
|
})].every((flag) => flag);
|
|
434
438
|
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
435
439
|
path: _path + "",
|
package/dist/gdc.grin2.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
termdbTopTermsByTypePayload,
|
|
3
|
+
validTermdbTopTermsByTypeRequest,
|
|
4
|
+
validTermdbTopTermsByTypeResponse
|
|
5
|
+
} from "./chunk-7RY7HC24.js";
|
|
1
6
|
import {
|
|
2
7
|
termdbTopVariablyExpressedGenesPayload,
|
|
3
8
|
validTermdbTopVariablyExpressedGenesRequest,
|
|
@@ -17,12 +22,17 @@ import {
|
|
|
17
22
|
validWSImagesRequest,
|
|
18
23
|
validWSImagesResponse,
|
|
19
24
|
wsImagesPayload
|
|
20
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ROVWURCJ.js";
|
|
21
26
|
import {
|
|
22
27
|
validWSISamplesRequest,
|
|
23
28
|
validWSISamplesResponse,
|
|
24
29
|
wsiSamplesPayload
|
|
25
30
|
} from "./chunk-W6NLM363.js";
|
|
31
|
+
import {
|
|
32
|
+
termdbSampleImagesPayload,
|
|
33
|
+
validTermdbSampleImagesRequest,
|
|
34
|
+
validTermdbSampleImagesResponse
|
|
35
|
+
} from "./chunk-X2CX5K24.js";
|
|
26
36
|
import {
|
|
27
37
|
termdbSingleSampleMutationPayload,
|
|
28
38
|
validTermdbSingleSampleMutationRequest,
|
|
@@ -59,10 +69,10 @@ import {
|
|
|
59
69
|
validtopMutatedGeneResponse
|
|
60
70
|
} from "./chunk-YGX6BZZY.js";
|
|
61
71
|
import {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} from "./chunk-
|
|
72
|
+
termdbCategoriesPayload,
|
|
73
|
+
validCategoriesRequest,
|
|
74
|
+
validCategoriesResponse
|
|
75
|
+
} from "./chunk-QHN3YO6Q.js";
|
|
66
76
|
import {
|
|
67
77
|
termdbClusterPayload,
|
|
68
78
|
validTermdbClusterRequest,
|
|
@@ -98,11 +108,6 @@ import {
|
|
|
98
108
|
validRootTermRequest,
|
|
99
109
|
validRootTermResponse
|
|
100
110
|
} from "./chunk-AASWRJMS.js";
|
|
101
|
-
import {
|
|
102
|
-
termdbSampleImagesPayload,
|
|
103
|
-
validTermdbSampleImagesRequest,
|
|
104
|
-
validTermdbSampleImagesResponse
|
|
105
|
-
} from "./chunk-X2CX5K24.js";
|
|
106
111
|
import {
|
|
107
112
|
ProfileFiltersPayload,
|
|
108
113
|
validProfileFiltersRequest,
|
|
@@ -118,11 +123,16 @@ import {
|
|
|
118
123
|
validProfileScoresRequest,
|
|
119
124
|
validProfileScoresResponse
|
|
120
125
|
} from "./chunk-IJLAEEK7.js";
|
|
126
|
+
import {
|
|
127
|
+
sampleWsiAiApiPayload,
|
|
128
|
+
validSampleWSIAiApiRequest,
|
|
129
|
+
validSampleWSIAiApiResponse
|
|
130
|
+
} from "./chunk-O7IJ2JNI.js";
|
|
121
131
|
import {
|
|
122
132
|
sampleWSImagesPayload,
|
|
123
133
|
validSampleWSImagesRequest,
|
|
124
134
|
validSampleWSImagesResponse
|
|
125
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-EGEOFGXO.js";
|
|
126
136
|
import {
|
|
127
137
|
snpPayload,
|
|
128
138
|
validSnpRequest,
|
|
@@ -138,11 +148,6 @@ import {
|
|
|
138
148
|
validBoxPlotRequest,
|
|
139
149
|
validBoxPlotResponse
|
|
140
150
|
} from "./chunk-UMGJNQ2O.js";
|
|
141
|
-
import {
|
|
142
|
-
termdbCategoriesPayload,
|
|
143
|
-
validCategoriesRequest,
|
|
144
|
-
validCategoriesResponse
|
|
145
|
-
} from "./chunk-QHN3YO6Q.js";
|
|
146
151
|
import {
|
|
147
152
|
hicdataPayload,
|
|
148
153
|
validHicdataRequest,
|
|
@@ -190,7 +195,7 @@ import {
|
|
|
190
195
|
validGdcGRIN2listResponse,
|
|
191
196
|
validRunGRIN2Request,
|
|
192
197
|
validRunGRIN2Response
|
|
193
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-TCSJGKT3.js";
|
|
194
199
|
import {
|
|
195
200
|
gdcMafPayload,
|
|
196
201
|
validGdcMafRequest,
|
|
@@ -293,6 +298,7 @@ export {
|
|
|
293
298
|
rootTermPayload,
|
|
294
299
|
runGRIN2Payload,
|
|
295
300
|
sampleWSImagesPayload,
|
|
301
|
+
sampleWsiAiApiPayload,
|
|
296
302
|
snpPayload,
|
|
297
303
|
termChildrenPayload,
|
|
298
304
|
termdbCategoriesPayload,
|
|
@@ -373,6 +379,8 @@ export {
|
|
|
373
379
|
validRootTermResponse,
|
|
374
380
|
validRunGRIN2Request,
|
|
375
381
|
validRunGRIN2Response,
|
|
382
|
+
validSampleWSIAiApiRequest,
|
|
383
|
+
validSampleWSIAiApiResponse,
|
|
376
384
|
validSampleWSImagesRequest,
|
|
377
385
|
validSampleWSImagesResponse,
|
|
378
386
|
validSnpRequest,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sampleWsiAiApiPayload,
|
|
3
|
+
validSampleWSIAiApiRequest,
|
|
4
|
+
validSampleWSIAiApiResponse
|
|
5
|
+
} from "./chunk-O7IJ2JNI.js";
|
|
6
|
+
import "./chunk-CNSSF43V.js";
|
|
7
|
+
export {
|
|
8
|
+
sampleWsiAiApiPayload,
|
|
9
|
+
validSampleWSIAiApiRequest,
|
|
10
|
+
validSampleWSIAiApiResponse
|
|
11
|
+
};
|
package/dist/samplewsimages.js
CHANGED
package/dist/wsimages.js
CHANGED
package/package.json
CHANGED
package/src/dataset.ts
CHANGED
|
@@ -971,19 +971,32 @@ export type WSImages = {
|
|
|
971
971
|
required; for both cases where image files are hosted locally, or loaded from remote via ds-supplied getter
|
|
972
972
|
*/
|
|
973
973
|
imageBySampleFolder: string
|
|
974
|
-
|
|
974
|
+
activePatchColor?: string
|
|
975
|
+
predictionColor?: Array<number>
|
|
975
976
|
annotationsColor?: Array<number>
|
|
977
|
+
classes?: WSIClass[]
|
|
978
|
+
uncertainty?: { color: string; label: string }[]
|
|
976
979
|
|
|
977
980
|
/** either ds supplied or dynamically added on launch with built in logic (retrieve the sample list from the wsimages table) */
|
|
978
981
|
getSamples?: () => Promise<Array<WSISample>>
|
|
979
982
|
/** either ds supplied or dynamically added on launch with built in logic */
|
|
980
983
|
getWSImages?: (sampleName: string) => Promise<WSImage[]>
|
|
981
984
|
/** ds supplied */
|
|
985
|
+
getWSIPredictionPatches?: (sampleName: string, wsiImage: string) => Promise<string[]>
|
|
986
|
+
/** ds supplied */
|
|
982
987
|
getWSIAnnotations?: (sampleName: string, wsiImage: string) => Promise<string[]>
|
|
983
988
|
/** ds supplied */
|
|
984
|
-
getZoomInPoints?: (sampleName: string, wsiImage: string) => Promise<Array<[number, number]>>
|
|
989
|
+
getZoomInPoints?: (sampleName: string, wsiImage: string, index: number) => Promise<Array<[number, number]>>
|
|
990
|
+
/** ds supplied */
|
|
991
|
+
makeGeoJson?: (sampleId: string, wsiImage: string) => void
|
|
992
|
+
/** ds supplied */
|
|
993
|
+
getWSIPredictionOverlay?: (sampleName: string, wsiImage: string) => Promise<string | undefined>
|
|
994
|
+
/** ds supplied */
|
|
995
|
+
getWSIUncertaintyOverlay?: (sampleName: string, wsiImage: string) => Promise<string | undefined>
|
|
985
996
|
}
|
|
986
997
|
|
|
998
|
+
export type WSIClass = { id: number; shortcut: string; label: string; color: string }
|
|
999
|
+
|
|
987
1000
|
/*** types supporting Termdb ***/
|
|
988
1001
|
|
|
989
1002
|
type TermIds = {
|
package/src/routes/gdc.grin2.ts
CHANGED
|
@@ -117,6 +117,8 @@ export type RunGRIN2Request = {
|
|
|
117
117
|
gainThreshold?: number // Default: 0.3
|
|
118
118
|
/** Maximum segment length to include (0 = no filter) */
|
|
119
119
|
segLength?: number // Default: 0
|
|
120
|
+
/** Hypermutator max cut off for CNVs per case */
|
|
121
|
+
hyperMutator?: number // Default: 500
|
|
120
122
|
}
|
|
121
123
|
}
|
|
122
124
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
|
|
3
|
+
export type SampleWSIAiApiRequest = {
|
|
4
|
+
index: number
|
|
5
|
+
confirmed: boolean
|
|
6
|
+
class: number | null
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type SampleWSIAiApiResponse = {
|
|
10
|
+
status: 'ok' | 'error'
|
|
11
|
+
error?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const sampleWsiAiApiPayload: RoutePayload = {
|
|
15
|
+
request: {
|
|
16
|
+
typeId: 'SampleWSIAiApiRequest'
|
|
17
|
+
},
|
|
18
|
+
response: {
|
|
19
|
+
typeId: 'SampleWSIAiApiResponse'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { RoutePayload } from './routeApi.ts'
|
|
2
|
+
import type { WSIClass } from '../dataset.ts'
|
|
2
3
|
|
|
3
4
|
export type SampleWSImagesRequest = {
|
|
4
5
|
genome: string
|
|
5
6
|
dslabel: string
|
|
6
7
|
sample_id: string
|
|
7
8
|
wsimage: string
|
|
9
|
+
index: number
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
export type SampleWSImagesResponse = {
|
|
@@ -14,8 +16,15 @@ export type SampleWSImagesResponse = {
|
|
|
14
16
|
export type WSImage = {
|
|
15
17
|
filename: string
|
|
16
18
|
overlays?: Array<string>
|
|
19
|
+
predictionLayers?: Array<string>
|
|
17
20
|
zoomInPoints?: Array<[number, number]>
|
|
18
21
|
metadata: string
|
|
22
|
+
annotationsData?: { zoomCoordinates: [number, number]; type: string; class: string; uncertainty: number }[]
|
|
23
|
+
classes?: WSIClass[]
|
|
24
|
+
/** ds defined uncertainity labels and colors */
|
|
25
|
+
uncertainty?: any
|
|
26
|
+
/** Color to highlight active patches */
|
|
27
|
+
activePatchColor?: string
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
export const sampleWSImagesPayload: RoutePayload = {
|
package/src/routes/wsimages.ts
CHANGED
|
@@ -10,11 +10,22 @@ export type WSImagesRequest = {
|
|
|
10
10
|
export type WSImagesResponse = {
|
|
11
11
|
// TileServer image session id
|
|
12
12
|
wsiSessionId?: string
|
|
13
|
+
overlays?: Array<PredictionOverlay>
|
|
13
14
|
slide_dimensions: number[]
|
|
14
15
|
status: string
|
|
15
16
|
error?: string
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
export type PredictionOverlay = {
|
|
20
|
+
layerNumber: string
|
|
21
|
+
predictionOverlayType: PredictionOverlayType
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum PredictionOverlayType {
|
|
25
|
+
PREDICTION = 'Prediction',
|
|
26
|
+
UNCERTAINTY = 'Uncertainty'
|
|
27
|
+
}
|
|
28
|
+
|
|
18
29
|
export const wsImagesPayload: RoutePayload = {
|
|
19
30
|
request: {
|
|
20
31
|
typeId: 'WSImagesRequest'
|
package/dist/chunk-D5OG676D.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__toESM,
|
|
3
|
-
require_lib
|
|
4
|
-
} from "./chunk-CNSSF43V.js";
|
|
5
|
-
|
|
6
|
-
// dist/samplewsimages.ts
|
|
7
|
-
var import_typia = __toESM(require_lib(), 1);
|
|
8
|
-
|
|
9
|
-
// src/routes/samplewsimages.ts
|
|
10
|
-
var sampleWSImagesPayload = {
|
|
11
|
-
request: {
|
|
12
|
-
typeId: "SampleWSImagesRequest"
|
|
13
|
-
},
|
|
14
|
-
response: {
|
|
15
|
-
typeId: "SampleWSImagesResponse"
|
|
16
|
-
}
|
|
17
|
-
// examples: []
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// dist/samplewsimages.ts
|
|
21
|
-
var validSampleWSImagesRequest = (input) => {
|
|
22
|
-
const errors = [];
|
|
23
|
-
const __is = (input2) => {
|
|
24
|
-
return "object" === typeof input2 && null !== input2 && ("string" === typeof input2.genome && "string" === typeof input2.dslabel && "string" === typeof input2.sample_id && "string" === typeof input2.wsimage);
|
|
25
|
-
};
|
|
26
|
-
if (false === __is(input)) {
|
|
27
|
-
const $report = import_typia.createValidate.report(errors);
|
|
28
|
-
((input2, _path, _exceptionable = true) => {
|
|
29
|
-
const $vo0 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.genome || $report(_exceptionable2, {
|
|
30
|
-
path: _path2 + ".genome",
|
|
31
|
-
expected: "string",
|
|
32
|
-
value: input3.genome
|
|
33
|
-
}), "string" === typeof input3.dslabel || $report(_exceptionable2, {
|
|
34
|
-
path: _path2 + ".dslabel",
|
|
35
|
-
expected: "string",
|
|
36
|
-
value: input3.dslabel
|
|
37
|
-
}), "string" === typeof input3.sample_id || $report(_exceptionable2, {
|
|
38
|
-
path: _path2 + ".sample_id",
|
|
39
|
-
expected: "string",
|
|
40
|
-
value: input3.sample_id
|
|
41
|
-
}), "string" === typeof input3.wsimage || $report(_exceptionable2, {
|
|
42
|
-
path: _path2 + ".wsimage",
|
|
43
|
-
expected: "string",
|
|
44
|
-
value: input3.wsimage
|
|
45
|
-
})].every((flag) => flag);
|
|
46
|
-
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
47
|
-
path: _path + "",
|
|
48
|
-
expected: "SampleWSImagesRequest",
|
|
49
|
-
value: input2
|
|
50
|
-
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
51
|
-
path: _path + "",
|
|
52
|
-
expected: "SampleWSImagesRequest",
|
|
53
|
-
value: input2
|
|
54
|
-
});
|
|
55
|
-
})(input, "$input", true);
|
|
56
|
-
}
|
|
57
|
-
const success = 0 === errors.length;
|
|
58
|
-
return {
|
|
59
|
-
success,
|
|
60
|
-
errors,
|
|
61
|
-
data: success ? input : void 0
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
var validSampleWSImagesResponse = (input) => {
|
|
65
|
-
const errors = [];
|
|
66
|
-
const __is = (input2) => {
|
|
67
|
-
const $io0 = (input3) => Array.isArray(input3.sampleWSImages) && input3.sampleWSImages.every((elem) => "object" === typeof elem && null !== elem && $io1(elem));
|
|
68
|
-
const $io1 = (input3) => "string" === typeof input3.filename && (void 0 === input3.overlays || Array.isArray(input3.overlays) && input3.overlays.every((elem) => "string" === typeof elem)) && (void 0 === input3.zoomInPoints || Array.isArray(input3.zoomInPoints) && input3.zoomInPoints.every((elem) => Array.isArray(elem) && (elem.length === 2 && "number" === typeof elem[0] && "number" === typeof elem[1]))) && "string" === typeof input3.metadata;
|
|
69
|
-
return "object" === typeof input2 && null !== input2 && $io0(input2);
|
|
70
|
-
};
|
|
71
|
-
if (false === __is(input)) {
|
|
72
|
-
const $report = import_typia.createValidate.report(errors);
|
|
73
|
-
((input2, _path, _exceptionable = true) => {
|
|
74
|
-
const $vo0 = (input3, _path2, _exceptionable2 = true) => [(Array.isArray(input3.sampleWSImages) || $report(_exceptionable2, {
|
|
75
|
-
path: _path2 + ".sampleWSImages",
|
|
76
|
-
expected: "Array<WSImage>",
|
|
77
|
-
value: input3.sampleWSImages
|
|
78
|
-
})) && input3.sampleWSImages.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable2, {
|
|
79
|
-
path: _path2 + ".sampleWSImages[" + _index1 + "]",
|
|
80
|
-
expected: "WSImage",
|
|
81
|
-
value: elem
|
|
82
|
-
})) && $vo1(elem, _path2 + ".sampleWSImages[" + _index1 + "]", _exceptionable2) || $report(_exceptionable2, {
|
|
83
|
-
path: _path2 + ".sampleWSImages[" + _index1 + "]",
|
|
84
|
-
expected: "WSImage",
|
|
85
|
-
value: elem
|
|
86
|
-
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
87
|
-
path: _path2 + ".sampleWSImages",
|
|
88
|
-
expected: "Array<WSImage>",
|
|
89
|
-
value: input3.sampleWSImages
|
|
90
|
-
})].every((flag) => flag);
|
|
91
|
-
const $vo1 = (input3, _path2, _exceptionable2 = true) => ["string" === typeof input3.filename || $report(_exceptionable2, {
|
|
92
|
-
path: _path2 + ".filename",
|
|
93
|
-
expected: "string",
|
|
94
|
-
value: input3.filename
|
|
95
|
-
}), void 0 === input3.overlays || (Array.isArray(input3.overlays) || $report(_exceptionable2, {
|
|
96
|
-
path: _path2 + ".overlays",
|
|
97
|
-
expected: "(Array<string> | undefined)",
|
|
98
|
-
value: input3.overlays
|
|
99
|
-
})) && input3.overlays.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable2, {
|
|
100
|
-
path: _path2 + ".overlays[" + _index2 + "]",
|
|
101
|
-
expected: "string",
|
|
102
|
-
value: elem
|
|
103
|
-
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
104
|
-
path: _path2 + ".overlays",
|
|
105
|
-
expected: "(Array<string> | undefined)",
|
|
106
|
-
value: input3.overlays
|
|
107
|
-
}), void 0 === input3.zoomInPoints || (Array.isArray(input3.zoomInPoints) || $report(_exceptionable2, {
|
|
108
|
-
path: _path2 + ".zoomInPoints",
|
|
109
|
-
expected: "(Array<[number, number]> | undefined)",
|
|
110
|
-
value: input3.zoomInPoints
|
|
111
|
-
})) && input3.zoomInPoints.map((elem, _index3) => (Array.isArray(elem) || $report(_exceptionable2, {
|
|
112
|
-
path: _path2 + ".zoomInPoints[" + _index3 + "]",
|
|
113
|
-
expected: "[number, number]",
|
|
114
|
-
value: elem
|
|
115
|
-
})) && ((elem.length === 2 || $report(_exceptionable2, {
|
|
116
|
-
path: _path2 + ".zoomInPoints[" + _index3 + "]",
|
|
117
|
-
expected: "[number, number]",
|
|
118
|
-
value: elem
|
|
119
|
-
})) && [
|
|
120
|
-
"number" === typeof elem[0] || $report(_exceptionable2, {
|
|
121
|
-
path: _path2 + ".zoomInPoints[" + _index3 + "][0]",
|
|
122
|
-
expected: "number",
|
|
123
|
-
value: elem[0]
|
|
124
|
-
}),
|
|
125
|
-
"number" === typeof elem[1] || $report(_exceptionable2, {
|
|
126
|
-
path: _path2 + ".zoomInPoints[" + _index3 + "][1]",
|
|
127
|
-
expected: "number",
|
|
128
|
-
value: elem[1]
|
|
129
|
-
})
|
|
130
|
-
].every((flag) => flag)) || $report(_exceptionable2, {
|
|
131
|
-
path: _path2 + ".zoomInPoints[" + _index3 + "]",
|
|
132
|
-
expected: "[number, number]",
|
|
133
|
-
value: elem
|
|
134
|
-
})).every((flag) => flag) || $report(_exceptionable2, {
|
|
135
|
-
path: _path2 + ".zoomInPoints",
|
|
136
|
-
expected: "(Array<[number, number]> | undefined)",
|
|
137
|
-
value: input3.zoomInPoints
|
|
138
|
-
}), "string" === typeof input3.metadata || $report(_exceptionable2, {
|
|
139
|
-
path: _path2 + ".metadata",
|
|
140
|
-
expected: "string",
|
|
141
|
-
value: input3.metadata
|
|
142
|
-
})].every((flag) => flag);
|
|
143
|
-
return ("object" === typeof input2 && null !== input2 || $report(true, {
|
|
144
|
-
path: _path + "",
|
|
145
|
-
expected: "SampleWSImagesResponse",
|
|
146
|
-
value: input2
|
|
147
|
-
})) && $vo0(input2, _path + "", true) || $report(true, {
|
|
148
|
-
path: _path + "",
|
|
149
|
-
expected: "SampleWSImagesResponse",
|
|
150
|
-
value: input2
|
|
151
|
-
});
|
|
152
|
-
})(input, "$input", true);
|
|
153
|
-
}
|
|
154
|
-
const success = 0 === errors.length;
|
|
155
|
-
return {
|
|
156
|
-
success,
|
|
157
|
-
errors,
|
|
158
|
-
data: success ? input : void 0
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export {
|
|
163
|
-
sampleWSImagesPayload,
|
|
164
|
-
validSampleWSImagesRequest,
|
|
165
|
-
validSampleWSImagesResponse
|
|
166
|
-
};
|