Skip to content

problem with generate-interfaces command #94

@hormiai76

Description

@hormiai76

@mgaonach @antolinos

Hi Mael and Alex,
I just run the schema2types script because I added a new endpoint in the backend and I got a big amount of errors due to missing part in the backend. It worked before running the generate-interfacescommand but maybe there are still missing command to run...
Are you sure you pushed everything in the frontend and backend projects?
I have the latest main versions in both projects locally and it works before runnin the generate-interfaces command

`webpack compiled with 1 error and 1 warning
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
ERROR in src/api/resources/Sample.ts:2:10
TS2305: Module '"models/Sample"' has no exported member 'ConcentrationTypeBase'.
1 | import createPaginatedResource from './Base/Paginated';

2 | import { ConcentrationTypeBase, SampleBase } from 'models/Sample';
| ^^^^^^^^^^^^^^^^^^^^^
3 | import { ComponentBase } from 'models/Component';
4 | import { createAuthenticatedResource } from './Base/Authenticated';
5 |

ERROR in src/components/Events/DataCollections/SSX/SSX.tsx:48:30
TS2339: Property 'blSampleId' does not exist on type 'DataCollectionGroup'.
46 | const sample = useSuspense(
47 | SampleResource.get,

48 | item.DataCollectionGroup.blSampleId
| ^^^^^^^^^^
49 | ? {
50 | blSampleId: item.DataCollectionGroup.blSampleId,
51 | }

ERROR in src/components/Events/DataCollections/SSX/SSX.tsx:50:48
TS2339: Property 'blSampleId' does not exist on type 'DataCollectionGroup'.
48 | item.DataCollectionGroup.blSampleId
49 | ? {

50 | blSampleId: item.DataCollectionGroup.blSampleId,
| ^^^^^^^^^^
51 | }
52 | : null
53 | );

ERROR in src/components/Events/DataCollections/SSX/SSXCompact.tsx:31:24
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
29 | {
30 | title: 'Experiment name',

31 | content: dcgItem.SSXDataCollection?.experimentName,
| ^^^^^^^^^^^^^^^^^
32 | },
33 | { title: '# Runs', content: dcs.length },
34 | ];

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:104:33
TS2339: Property 'undulatorGap1' does not exist on type 'DataCollection'.
102 | { title: 'Filling mode', content: session?.BeamLineSetup?.synchrotronMode },
103 | { title: 'Ondulator', content: session?.BeamLineSetup?.undulatorType1 },

104 | { title: 'Gap', content: dc.undulatorGap1 },
| ^^^^^^^^^^^^^
105 | ];
106 | return ;
107 | }

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:122:43
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
120 | },
121 | { title: 'Mono type', content: session?.BeamLineSetup?.monochromatorType },

122 | { title: 'Mono bandwith', content: dc.SSXDataCollection?.energyBandwidth },
| ^^^^^^^^^^^^^^^^^
123 | { title: 'Mono stripe', content: dc.SSXDataCollection?.monoStripe },
124 | { title: 'Beam size X', content: dc.beamSizeAtSampleX },
125 | { title: 'Beam size Y', content: dc.beamSizeAtSampleY },

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:123:41
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
121 | { title: 'Mono type', content: session?.BeamLineSetup?.monochromatorType },
122 | { title: 'Mono bandwith', content: dc.SSXDataCollection?.energyBandwidth },

123 | { title: 'Mono stripe', content: dc.SSXDataCollection?.monoStripe },
| ^^^^^^^^^^^^^^^^^
124 | { title: 'Beam size X', content: dc.beamSizeAtSampleX },
125 | { title: 'Beam size Y', content: dc.beamSizeAtSampleY },
126 | { title: 'Beam shape', content: dc.beamShape },

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:126:40
TS2339: Property 'beamShape' does not exist on type 'DataCollection'.
124 | { title: 'Beam size X', content: dc.beamSizeAtSampleX },
125 | { title: 'Beam size Y', content: dc.beamSizeAtSampleY },

126 | { title: 'Beam shape', content: dc.beamShape },
| ^^^^^^^^^
127 | { title: 'Polarization', content: dc.polarisation },
128 | ];
129 | return ;

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:127:42
TS2339: Property 'polarisation' does not exist on type 'DataCollection'.
125 | { title: 'Beam size Y', content: dc.beamSizeAtSampleY },
126 | { title: 'Beam shape', content: dc.beamShape },

127 | { title: 'Polarization', content: dc.polarisation },
| ^^^^^^^^^^^^
128 | ];
129 | return ;
130 | }

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:139:34
TS2339: Property 'Detector' does not exist on type 'DataCollection'.
137 | }) {
138 | const properties = [

139 | { title: 'Type', content: dc.Detector?.detectorType },
| ^^^^^^^^
140 | { title: 'Model', content: dc.Detector?.detectorModel },
141 | { title: 'Manufacturer', content: dc.Detector?.detectorManufacturer },
142 | {

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:140:35
TS2339: Property 'Detector' does not exist on type 'DataCollection'.
138 | const properties = [
139 | { title: 'Type', content: dc.Detector?.detectorType },

140 | { title: 'Model', content: dc.Detector?.detectorModel },
| ^^^^^^^^
141 | { title: 'Manufacturer', content: dc.Detector?.detectorManufacturer },
142 | {
143 | title: 'Pixel size horizontal',

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:141:42
TS2339: Property 'Detector' does not exist on type 'DataCollection'.
139 | { title: 'Type', content: dc.Detector?.detectorType },
140 | { title: 'Model', content: dc.Detector?.detectorModel },

141 | { title: 'Manufacturer', content: dc.Detector?.detectorManufacturer },
| ^^^^^^^^
142 | {
143 | title: 'Pixel size horizontal',
144 | content: dc.Detector?.detectorPixelSizeHorizontal,

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:144:19
TS2339: Property 'Detector' does not exist on type 'DataCollection'.
142 | {
143 | title: 'Pixel size horizontal',

144 | content: dc.Detector?.detectorPixelSizeHorizontal,
| ^^^^^^^^
145 | },
146 | {
147 | title: 'Pixel size vertical',

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:148:19
TS2339: Property 'Detector' does not exist on type 'DataCollection'.
146 | {
147 | title: 'Pixel size vertical',

148 | content: dc.Detector?.detectorPixelSizeVertical,
| ^^^^^^^^
149 | },
150 | { title: 'Distance', content: dc.detectorDistance },
151 | { title: 'Resolution', content: dc.resolution },

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:171:25
TS2339: Property 'size_X' does not exist on type 'SampleCrystal'.
169 | title: 'Crystal size X, Y, Z',
170 | content: [

171 | sample?.Crystal.size_X,
| ^^^^^^
172 | sample?.Crystal.size_Y,
173 | sample?.Crystal.size_Z,
174 | ]

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:172:25
TS2339: Property 'size_Y' does not exist on type 'SampleCrystal'.
170 | content: [
171 | sample?.Crystal.size_X,

172 | sample?.Crystal.size_Y,
| ^^^^^^
173 | sample?.Crystal.size_Z,
174 | ]
175 | .map((v) => (v === undefined ? 'null' : v))

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:173:25
TS2339: Property 'size_Z' does not exist on type 'SampleCrystal'.
171 | sample?.Crystal.size_X,
172 | sample?.Crystal.size_Y,

173 | sample?.Crystal.size_Z,
| ^^^^^^
174 | ]
175 | .map((v) => (v === undefined ? 'null' : v))
176 | .join(', '),

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:182:40
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
180 | content: dc.DataCollectionGroup.experimentType?.split('SSX-')[1],
181 | },

182 | { title: 'Chip model', content: dc.SSXDataCollection?.chipModel },
| ^^^^^^^^^^^^^^^^^
183 | { title: 'Chip pattern', content: dc.SSXDataCollection?.chipPattern },
184 | ];
185 | return ;

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:183:42
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
181 | },
182 | { title: 'Chip model', content: dc.SSXDataCollection?.chipModel },

183 | { title: 'Chip pattern', content: dc.SSXDataCollection?.chipPattern },
| ^^^^^^^^^^^^^^^^^
184 | ];
185 | return ;
186 | }

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:196:36
TS2339: Property 'imagePrefix' does not exist on type 'DataCollection'.
194 | }) {
195 | const properties = [

196 | { title: 'Prefix', content: dc.imagePrefix },
| ^^^^^^^^^^^
197 | { title: 'Transmission', content: dc.transmission },
198 | { title: 'Number frames', content: dc.numberOfImages },
199 | { title: 'Exposure time', content: dc.exposureTime },

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:201:39
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
199 | { title: 'Exposure time', content: dc.exposureTime },
200 | { title: 'Flux', content: dc.flux },

201 | { title: 'Jet speed', content: dc.SSXDataCollection?.jetSpeed },
| ^^^^^^^^^^^^^^^^^
202 | { title: 'Jet size', content: dc.SSXDataCollection?.jetSize },
203 | { title: 'Laser energy', content: dc.SSXDataCollection?.laserEnergy },
204 | ];

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:202:38
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
200 | { title: 'Flux', content: dc.flux },
201 | { title: 'Jet speed', content: dc.SSXDataCollection?.jetSpeed },

202 | { title: 'Jet size', content: dc.SSXDataCollection?.jetSize },
| ^^^^^^^^^^^^^^^^^
203 | { title: 'Laser energy', content: dc.SSXDataCollection?.laserEnergy },
204 | ];
205 | return ;

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:203:42
TS2551: Property 'SSXDataCollection' does not exist on type 'DataCollection'. Did you mean 'dataCollectionId'?
201 | { title: 'Jet speed', content: dc.SSXDataCollection?.jetSpeed },
202 | { title: 'Jet size', content: dc.SSXDataCollection?.jetSize },

203 | { title: 'Laser energy', content: dc.SSXDataCollection?.laserEnergy },
| ^^^^^^^^^^^^^^^^^
204 | ];
205 | return ;
206 | }

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:215:25
TS2339: Property 'crystal_compositions' does not exist on type 'SampleCrystal'.
213 |
214 |

215 | {sample.Crystal.crystal_compositions?.length ? (
| ^^^^^^^^^^^^^^^^^^^^
216 |


217 |
218 |

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:235:31
TS2339: Property 'crystal_compositions' does not exist on type 'SampleCrystal'.
233 |


234 |

235 | {sample.Crystal.crystal_compositions &&
| ^^^^^^^^^^^^^^^^^^^^
236 | sample.Crystal.crystal_compositions
237 | .sort((a, b) =>
238 | a.Component.ComponentType.name.localeCompare(

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:236:32
TS2339: Property 'crystal_compositions' does not exist on type 'SampleCrystal'.
234 |


235 | {sample.Crystal.crystal_compositions &&

236 | sample.Crystal.crystal_compositions
| ^^^^^^^^^^^^^^^^^^^^
237 | .sort((a, b) =>
238 | a.Component.ComponentType.name.localeCompare(
239 | b.Component.ComponentType.name

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:237:26
TS7006: Parameter 'a' implicitly has an 'any' type.
235 | {sample.Crystal.crystal_compositions &&
236 | sample.Crystal.crystal_compositions

237 | .sort((a, b) =>
| ^
238 | a.Component.ComponentType.name.localeCompare(
239 | b.Component.ComponentType.name
240 | )

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:237:29
TS7006: Parameter 'b' implicitly has an 'any' type.
235 | {sample.Crystal.crystal_compositions &&
236 | sample.Crystal.crystal_compositions

237 | .sort((a, b) =>
| ^
238 | a.Component.ComponentType.name.localeCompare(
239 | b.Component.ComponentType.name
240 | )

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:242:25
TS7006: Parameter 'composition' implicitly has an 'any' type.
240 | )
241 | )

242 | .map((composition) => {
| ^^^^^^^^^^^
243 | return (
244 |


245 |

279 | {sample.sample_compositions &&
| ^^^^^^^^^^^^^^^^^^^
280 | sample.sample_compositions
281 | .sort((a, b) =>
282 | a.Component.ComponentType.name.localeCompare(

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:280:22
TS2339: Property 'sample_compositions' does not exist on type 'Sample'.
278 |


279 | {sample.sample_compositions &&

280 | sample.sample_compositions
| ^^^^^^^^^^^^^^^^^^^
281 | .sort((a, b) =>
282 | a.Component.ComponentType.name.localeCompare(
283 | b.Component.ComponentType.name

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:281:24
TS7006: Parameter 'a' implicitly has an 'any' type.
279 | {sample.sample_compositions &&
280 | sample.sample_compositions

281 | .sort((a, b) =>
| ^
282 | a.Component.ComponentType.name.localeCompare(
283 | b.Component.ComponentType.name
284 | )

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:281:27
TS7006: Parameter 'b' implicitly has an 'any' type.
279 | {sample.sample_compositions &&
280 | sample.sample_compositions

281 | .sort((a, b) =>
| ^
282 | a.Component.ComponentType.name.localeCompare(
283 | b.Component.ComponentType.name
284 | )

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:286:23
TS7006: Parameter 'composition' implicitly has an 'any' type.
284 | )
285 | )

286 | .map((composition) => {
| ^^^^^^^^^^^
287 | return (
288 |


289 |

ERROR in src/components/Events/DataCollections/SSX/SSXParameters.tsx:279:21
TS2339: Property 'sample_compositions' does not exist on type 'Sample'.
277 |
278 |

ERROR in src/components/Samples/editor/SamplesEditor.tsx:19:18
TS2305: Module '"models/Sample"' has no exported member 'Composition'.
17 | import LazyWrapper from 'legacy/components/loading/lazywrapper';
18 | import _ from 'lodash';

19 | import { Sample, Composition, Crystal } from 'models/Sample';
| ^^^^^^^^^^^
20 | import { Suspense, useState } from 'react';
21 | import {
22 | Button,

ERROR in src/components/Samples/editor/SamplesEditor.tsx:184:33
TS2339: Property 'sample_compositions' does not exist on type 'Sample'.
182 | return {
183 | name: sample.name ? undefined : 'Name is mandatory.',

184 | sample_compositions: sample.sample_compositions?.map((v) => {
| ^^^^^^^^^^^^^^^^^^^
185 | if (v === undefined) return undefined;
186 | const quantityError =
187 | v.abundance || v.ph || v.ratio

ERROR in src/components/Samples/editor/SamplesEditor.tsx:184:59
TS7006: Parameter 'v' implicitly has an 'any' type.
182 | return {
183 | name: sample.name ? undefined : 'Name is mandatory.',

184 | sample_compositions: sample.sample_compositions?.map((v) => {
| ^
185 | if (v === undefined) return undefined;
186 | const quantityError =
187 | v.abundance || v.ph || v.ratio

ERROR in src/components/Samples/editor/SamplesEditor.tsx:210:50
TS2339: Property 'crystal_compositions' does not exist on type 'SampleCrystal'.
208 | ? undefined
209 | : 'Protein is mandatory',

210 | crystal_compositions: sample.Crystal.crystal_compositions?.map(
| ^^^^^^^^^^^^^^^^^^^^
211 | (v) => {
212 | if (v === undefined) return undefined;
213 | const quantityError =

ERROR in src/components/Samples/editor/SamplesEditor.tsx:211:16
TS7006: Parameter 'v' implicitly has an 'any' type.
209 | : 'Protein is mandatory',
210 | crystal_compositions: sample.Crystal.crystal_compositions?.map(

211 | (v) => {
| ^
212 | if (v === undefined) return undefined;
213 | const quantityError =
214 | v.abundance || v.ph || v.ratio

ERROR in src/components/Samples/editor/SamplesEditor.tsx:286:41
TS2339: Property 'loopType' does not exist on type 'Sample'.
284 | <Form.Label>Support</Form.Label>
285 | <ReactSelect

286 | value={{ label: sampleState.loopType, value: sampleState.loopType }}
| ^^^^^^^^
287 | options={['Injector', 'Chip', 'Foils', 'Tape drive', 'Other'].map(
288 | (v) => {
289 | return {

ERROR in src/components/Samples/editor/SamplesEditor.tsx:286:70
TS2339: Property 'loopType' does not exist on type 'Sample'.
284 | <Form.Label>Support</Form.Label>
285 | <ReactSelect

286 | value={{ label: sampleState.loopType, value: sampleState.loopType }}
| ^^^^^^^^
287 | options={['Injector', 'Chip', 'Foils', 'Tape drive', 'Other'].map(
288 | (v) => {
289 | return {

ERROR in src/components/Samples/editor/SamplesEditor.tsx:302:37
TS2339: Property 'sample_compositions' does not exist on type 'Sample'.
300 |

301 | <CompositionsEdit

302 | compositions={sampleState.sample_compositions || []}
| ^^^^^^^^^^^^^^^^^^^
303 | onChange={onChangeSubForm('sample_compositions')}
304 | errors={getSubFormErrors(errors, 'sample_compositions')}
305 | />

ERROR in src/components/Samples/editor/SamplesEditor.tsx:527:46
TS2339: Property 'crystal_compositions' does not exist on type 'SampleCrystal'.
525 | <CompositionsEdit
526 | onChange={onChange.subForm('crystal_compositions')}

527 | compositions={sample.Crystal.crystal_compositions || []}
| ^^^^^^^^^^^^^^^^^^^^
528 | errors={getSubFormErrors(errors, 'crystal_compositions')}
529 | />
530 |

ERROR in src/components/Samples/editor/SamplesEditor.tsx:694:26
TS2339: Property 'symbol' does not exist on type 'DenormalizeObject'.
692 | } else {
693 | const newType = _(concentrationTypes)

694 | .filter((c) => c.symbol === newValue)
| ^^^^^^
695 | .get(0);
696 | onChange.value('ConcentrationType')(newType);
697 | }

ERROR in src/components/Samples/editor/SamplesEditor.tsx:742:40
TS2339: Property 'name' does not exist on type 'DenormalizeObject'.
740 | <ReactSelect
741 | options={concentrationTypes

742 | .sort((t1, t2) => t1.name.localeCompare(t2.name))
| ^^^^
743 | .map((v) => ({
744 | value: v.symbol,
745 | label: v.name,

ERROR in src/components/Samples/editor/SamplesEditor.tsx:742:62
TS2339: Property 'name' does not exist on type 'DenormalizeObject'.
740 | <ReactSelect
741 | options={concentrationTypes

742 | .sort((t1, t2) => t1.name.localeCompare(t2.name))
| ^^^^
743 | .map((v) => ({
744 | value: v.symbol,
745 | label: v.name,

ERROR in src/components/Samples/editor/SamplesEditor.tsx:744:30
TS2339: Property 'symbol' does not exist on type 'DenormalizeObject'.
742 | .sort((t1, t2) => t1.name.localeCompare(t2.name))
743 | .map((v) => ({

744 | value: v.symbol,
| ^^^^^^
745 | label: v.name,
746 | }))}
747 | styles={{

ERROR in src/components/Samples/editor/SamplesEditor.tsx:745:30
TS2339: Property 'name' does not exist on type 'DenormalizeObject'.
743 | .map((v) => ({
744 | value: v.symbol,

745 | label: v.name,
| ^^^^
746 | }))}
747 | styles={{
748 | control: (styles) => ({

`

Screenshot 2023-12-14 at 17-18-56 ISPyB » Home » » MX20170251 » Proteins » Create

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions