@opentrons/shared-data 0.1.2-alpha.0 → 0.1.2-alpha.1

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.
Files changed (131) hide show
  1. package/js/__tests__/__snapshots__/pipettes.test.ts.snap +5969 -0
  2. package/js/__tests__/deckSchemas.test.ts +87 -0
  3. package/js/__tests__/errors.test.js +21 -0
  4. package/js/__tests__/getAreSlotsAdjacent.test.ts +128 -0
  5. package/js/__tests__/getWellNamePerMultiTip.test.ts +162 -0
  6. package/js/__tests__/labwareDefQuirks.test.ts +38 -0
  7. package/js/__tests__/labwareDefSchemaV1.test.ts +82 -0
  8. package/js/__tests__/labwareDefSchemaV2.test.ts +298 -0
  9. package/js/__tests__/moduleAccessors.test.ts +50 -0
  10. package/js/__tests__/moduleSpecsSchema.test.ts +77 -0
  11. package/js/__tests__/pipetteSchemaV2.test.ts +107 -0
  12. package/js/__tests__/pipetteSpecSchemas.test.ts +48 -0
  13. package/js/__tests__/pipettes.test.ts +58 -0
  14. package/js/__tests__/protocolSchemaV4.test.ts +137 -0
  15. package/js/__tests__/protocolSchemaV5.test.ts +137 -0
  16. package/js/__tests__/protocolSchemaV6.test.ts +132 -0
  17. package/js/__tests__/protocolSchemaV7.test.ts +64 -0
  18. package/js/__tests__/protocolValidation.test.ts +83 -0
  19. package/js/__tests__/sortWells.test.ts +40 -0
  20. package/js/__tests__/splitWellsOnColumn.test.ts +21 -0
  21. package/js/__tests__/validateErrors.test.js +34 -0
  22. package/js/constants.ts +405 -0
  23. package/js/cypressUtils.ts +35 -0
  24. package/js/errors.ts +33 -0
  25. package/js/fixtures.ts +156 -0
  26. package/js/getLabware.ts +145 -0
  27. package/js/gripper.ts +29 -0
  28. package/js/helpers/__tests__/getAdapterName.test.ts +31 -0
  29. package/js/helpers/__tests__/getDeckDefFromLoadedLabware.test.ts +12 -0
  30. package/js/helpers/__tests__/getSimplestFlexDeckConfig.test.ts +176 -0
  31. package/js/helpers/__tests__/getVectorDifference.test.ts +25 -0
  32. package/js/helpers/__tests__/getVectorSum.test.ts +21 -0
  33. package/js/helpers/__tests__/labwareInference.test.ts +84 -0
  34. package/js/helpers/__tests__/orderWells.test.ts +87 -0
  35. package/js/helpers/__tests__/parseProtocolData.test.ts +165 -0
  36. package/js/helpers/__tests__/volume.test.ts +108 -0
  37. package/js/helpers/__tests__/wellSets.test.ts +352 -0
  38. package/js/helpers/get96Channel384WellPlateWells.ts +44 -0
  39. package/js/helpers/getAddressableAreasInProtocol.ts +98 -0
  40. package/js/helpers/getLoadedLabwareDefinitionsByUri.ts +30 -0
  41. package/js/helpers/getModuleVizDims.ts +118 -0
  42. package/js/helpers/getOccludedSlotCountForModule.ts +13 -0
  43. package/js/helpers/getSimplestFlexDeckConfig.ts +183 -0
  44. package/js/helpers/getVectorDifference.ts +12 -0
  45. package/js/helpers/getVectorSum.ts +12 -0
  46. package/js/helpers/getWellNamePerMultiTip.ts +86 -0
  47. package/js/helpers/getWellTotalVolume.ts +16 -0
  48. package/js/helpers/index.ts +348 -0
  49. package/js/helpers/labwareInference.ts +92 -0
  50. package/js/helpers/orderWells.ts +69 -0
  51. package/js/helpers/parseProtocolData.ts +141 -0
  52. package/js/helpers/volume.ts +35 -0
  53. package/js/helpers/wellIsRect.ts +6 -0
  54. package/js/helpers/wellSets.ts +155 -0
  55. package/js/index.ts +14 -0
  56. package/js/labwareTools/__tests__/__snapshots__/createIrregularLabware.test.ts.snap +3 -0
  57. package/js/labwareTools/__tests__/__snapshots__/createLabware.test.ts.snap +3 -0
  58. package/js/labwareTools/__tests__/createDefaultDisplayName.test.ts +111 -0
  59. package/js/labwareTools/__tests__/createIrregularLabware.test.ts +226 -0
  60. package/js/labwareTools/__tests__/createLabware.test.ts +147 -0
  61. package/js/labwareTools/index.ts +452 -0
  62. package/js/modules.ts +97 -0
  63. package/js/pipettes.ts +89 -0
  64. package/js/protocols.ts +290 -0
  65. package/js/schema.ts +80 -0
  66. package/js/scripts/generateDeckLayersFromSVG.js +46 -0
  67. package/js/titleCase.ts +30 -0
  68. package/js/types.ts +561 -0
  69. package/lib/js/__tests__/deckSchemas.test.d.ts +1 -0
  70. package/lib/js/__tests__/getAreSlotsAdjacent.test.d.ts +1 -0
  71. package/lib/js/__tests__/getWellNamePerMultiTip.test.d.ts +1 -0
  72. package/lib/js/__tests__/labwareDefQuirks.test.d.ts +1 -0
  73. package/lib/js/__tests__/labwareDefSchemaV1.test.d.ts +1 -0
  74. package/lib/js/__tests__/labwareDefSchemaV2.test.d.ts +1 -0
  75. package/lib/js/__tests__/moduleAccessors.test.d.ts +1 -0
  76. package/lib/js/__tests__/moduleSpecsSchema.test.d.ts +1 -0
  77. package/lib/js/__tests__/pipetteSchemaV2.test.d.ts +1 -0
  78. package/lib/js/__tests__/pipetteSpecSchemas.test.d.ts +1 -0
  79. package/lib/js/__tests__/pipettes.test.d.ts +1 -0
  80. package/lib/js/__tests__/protocolSchemaV4.test.d.ts +1 -0
  81. package/lib/js/__tests__/protocolSchemaV5.test.d.ts +1 -0
  82. package/lib/js/__tests__/protocolSchemaV6.test.d.ts +1 -0
  83. package/lib/js/__tests__/protocolSchemaV7.test.d.ts +1 -0
  84. package/lib/js/__tests__/protocolValidation.test.d.ts +1 -0
  85. package/lib/js/__tests__/sortWells.test.d.ts +1 -0
  86. package/lib/js/__tests__/splitWellsOnColumn.test.d.ts +1 -0
  87. package/lib/js/constants.d.ts +156 -0
  88. package/lib/js/cypressUtils.d.ts +1 -0
  89. package/lib/js/errors.d.ts +13 -0
  90. package/lib/js/fixtures.d.ts +13 -0
  91. package/lib/js/getLabware.d.ts +8 -0
  92. package/lib/js/gripper.d.ts +3 -0
  93. package/lib/js/helpers/__tests__/getAdapterName.test.d.ts +1 -0
  94. package/lib/js/helpers/__tests__/getDeckDefFromLoadedLabware.test.d.ts +1 -0
  95. package/lib/js/helpers/__tests__/getSimplestFlexDeckConfig.test.d.ts +1 -0
  96. package/lib/js/helpers/__tests__/getVectorDifference.test.d.ts +1 -0
  97. package/lib/js/helpers/__tests__/getVectorSum.test.d.ts +1 -0
  98. package/lib/js/helpers/__tests__/labwareInference.test.d.ts +1 -0
  99. package/lib/js/helpers/__tests__/orderWells.test.d.ts +1 -0
  100. package/lib/js/helpers/__tests__/parseProtocolData.test.d.ts +1 -0
  101. package/lib/js/helpers/__tests__/volume.test.d.ts +1 -0
  102. package/lib/js/helpers/__tests__/wellSets.test.d.ts +1 -0
  103. package/lib/js/helpers/get96Channel384WellPlateWells.d.ts +1 -0
  104. package/lib/js/helpers/getAddressableAreasInProtocol.d.ts +4 -0
  105. package/lib/js/helpers/getLoadedLabwareDefinitionsByUri.d.ts +5 -0
  106. package/lib/js/helpers/getModuleVizDims.d.ts +16 -0
  107. package/lib/js/helpers/getOccludedSlotCountForModule.d.ts +2 -0
  108. package/lib/js/helpers/getSimplestFlexDeckConfig.d.ts +14 -0
  109. package/lib/js/helpers/getVectorDifference.d.ts +2 -0
  110. package/lib/js/helpers/getVectorSum.d.ts +2 -0
  111. package/lib/js/helpers/getWellNamePerMultiTip.d.ts +3 -0
  112. package/lib/js/helpers/getWellTotalVolume.d.ts +2 -0
  113. package/lib/js/helpers/index.d.ts +44 -0
  114. package/lib/js/helpers/labwareInference.d.ts +16 -0
  115. package/lib/js/helpers/orderWells.d.ts +2 -0
  116. package/lib/js/helpers/parseProtocolData.d.ts +23 -0
  117. package/lib/js/helpers/volume.d.ts +4 -0
  118. package/lib/js/helpers/wellIsRect.d.ts +3 -0
  119. package/lib/js/helpers/wellSets.d.ts +9 -0
  120. package/lib/js/index.d.ts +14 -0
  121. package/lib/js/labwareTools/__tests__/createDefaultDisplayName.test.d.ts +1 -0
  122. package/lib/js/labwareTools/__tests__/createIrregularLabware.test.d.ts +1 -0
  123. package/lib/js/labwareTools/__tests__/createLabware.test.d.ts +1 -0
  124. package/lib/js/labwareTools/index.d.ts +65 -0
  125. package/lib/js/modules.d.ts +6 -0
  126. package/lib/js/pipettes.d.ts +13 -0
  127. package/lib/js/protocols.d.ts +3 -0
  128. package/lib/js/schema.d.ts +90 -0
  129. package/lib/js/titleCase.d.ts +1 -0
  130. package/lib/js/types.d.ts +398 -0
  131. package/package.json +1 -1
package/js/types.ts ADDED
@@ -0,0 +1,561 @@
1
+ import {
2
+ MAGDECK,
3
+ TEMPDECK,
4
+ THERMOCYCLER,
5
+ MAGNETIC_MODULE_V1,
6
+ MAGNETIC_MODULE_V2,
7
+ TEMPERATURE_MODULE_V1,
8
+ TEMPERATURE_MODULE_V2,
9
+ THERMOCYCLER_MODULE_V1,
10
+ THERMOCYCLER_MODULE_V2,
11
+ HEATERSHAKER_MODULE_V1,
12
+ MAGNETIC_MODULE_TYPE,
13
+ TEMPERATURE_MODULE_TYPE,
14
+ THERMOCYCLER_MODULE_TYPE,
15
+ HEATERSHAKER_MODULE_TYPE,
16
+ MAGNETIC_BLOCK_TYPE,
17
+ GEN1,
18
+ GEN2,
19
+ FLEX,
20
+ LEFT,
21
+ RIGHT,
22
+ GRIPPER_V1,
23
+ GRIPPER_V1_1,
24
+ GRIPPER_V1_2,
25
+ EXTENSION,
26
+ MAGNETIC_BLOCK_V1,
27
+ } from './constants'
28
+ import type { RunTimeCommand, LabwareLocation } from '../command/types'
29
+ import type { AddressableAreaName, CutoutFixtureId, CutoutId } from '../deck'
30
+ import type { PipetteName } from './pipettes'
31
+
32
+ export type RobotType = 'OT-2 Standard' | 'OT-3 Standard'
33
+
34
+ export interface RobotDefinition {
35
+ displayName: string
36
+ robotType: RobotType
37
+ models: string[]
38
+ }
39
+
40
+ // TODO Ian 2019-06-04 split this out into eg ../labware/flowTypes/labwareV1.js
41
+ export interface WellDefinition {
42
+ diameter?: number
43
+ // NOTE: presence of diameter indicates a circular well
44
+ depth?: number
45
+ // TODO Ian 2018-03-12: depth should be required, but is missing in MALDI-plate
46
+ height: number
47
+ length: number
48
+ width: number
49
+ x: number
50
+ y: number
51
+ z: number
52
+ 'total-liquid-volume': number
53
+ }
54
+
55
+ // typedef for labware definitions under v1 labware schema
56
+ export interface LabwareDefinition1 {
57
+ metadata: {
58
+ name: string
59
+ format: string
60
+ deprecated?: boolean
61
+ displayName?: string
62
+ displayCategory?: string
63
+ isValidSource?: boolean
64
+ isTiprack?: boolean
65
+ tipVolume?: number
66
+ }
67
+ ordering: string[][]
68
+ wells: {
69
+ [well: string]: WellDefinition
70
+ }
71
+ }
72
+
73
+ // TODO(mc, 2019-05-29): Remove this enum in favor of string + exported
74
+ // constants + unit tests to catch typos in our definitions. Make changes
75
+ // here and in shared-data/labware/schemas/2.json
76
+ export type LabwareDisplayCategory =
77
+ | 'wellPlate'
78
+ | 'tipRack'
79
+ | 'tubeRack'
80
+ | 'reservoir'
81
+ | 'aluminumBlock'
82
+ | 'trash'
83
+ | 'other'
84
+ | 'adapter'
85
+
86
+ export type LabwareVolumeUnits = 'µL' | 'mL' | 'L'
87
+
88
+ // TODO(mc, 2019-05-29): Remove this enum in favor of string + exported
89
+ // constants + unit tests to catch typos in our definitions. Make changes
90
+ // here and in shared-data/labware/schemas/2.json
91
+ export type WellBottomShape = 'flat' | 'u' | 'v'
92
+
93
+ export interface LabwareMetadata {
94
+ displayName: string
95
+ displayCategory: LabwareDisplayCategory
96
+ displayVolumeUnits: LabwareVolumeUnits
97
+ tags?: string[]
98
+ }
99
+
100
+ export interface LabwareDimensions {
101
+ xDimension: number
102
+ yDimension: number
103
+ zDimension: number
104
+ }
105
+
106
+ export interface Coordinates {
107
+ x: number
108
+ y: number
109
+ z: number
110
+ }
111
+ export type LabwareOffset = Coordinates
112
+
113
+ // 1. Valid pipette type for a container (i.e. is there multi channel access?)
114
+ // 2. Is the container a tiprack?
115
+ export interface LabwareParameters {
116
+ loadName: string
117
+ format: string
118
+ isTiprack: boolean
119
+ tipLength?: number
120
+ isMagneticModuleCompatible: boolean
121
+ magneticModuleEngageHeight?: number
122
+ quirks?: string[]
123
+ }
124
+
125
+ export interface LabwareBrand {
126
+ brand: string
127
+ brandId?: string[]
128
+ links?: string[]
129
+ }
130
+
131
+ export interface CircularWellShapeProperties {
132
+ shape: 'circular'
133
+ diameter: number
134
+ }
135
+ export interface RectangularWellShapeProperties {
136
+ shape: 'rectangular'
137
+ xDimension: number
138
+ yDimension: number
139
+ }
140
+
141
+ export type LabwareWellShapeProperties =
142
+ | CircularWellShapeProperties
143
+ | RectangularWellShapeProperties
144
+
145
+ // well without x,y,z
146
+ export type LabwareWellProperties = LabwareWellShapeProperties & {
147
+ depth: number
148
+ totalLiquidVolume: number
149
+ }
150
+
151
+ export type LabwareWell = LabwareWellProperties & {
152
+ x: number
153
+ y: number
154
+ z: number
155
+ }
156
+
157
+ // TODO(mc, 2019-03-21): exact object is tough to use with the initial value in
158
+ // reduce, so leaving this inexact (e.g. `const a: {||} = {}` errors)
159
+ export type LabwareWellMap = Record<string, LabwareWell>
160
+
161
+ export interface LabwareWellGroupMetadata {
162
+ displayName?: string
163
+ displayCategory?: LabwareDisplayCategory
164
+ wellBottomShape?: WellBottomShape
165
+ }
166
+
167
+ export interface LabwareWellGroup {
168
+ wells: string[]
169
+ metadata: LabwareWellGroupMetadata
170
+ brand?: LabwareBrand
171
+ }
172
+
173
+ export type LabwareRoles = 'labware' | 'adapter' | 'fixture' | 'maintenance'
174
+
175
+ // NOTE: must be synced with shared-data/labware/schemas/2.json
176
+ export interface LabwareDefinition2 {
177
+ version: number
178
+ schemaVersion: 2
179
+ namespace: string
180
+ metadata: LabwareMetadata
181
+ dimensions: LabwareDimensions
182
+ cornerOffsetFromSlot: LabwareOffset
183
+ parameters: LabwareParameters
184
+ brand: LabwareBrand
185
+ ordering: string[][]
186
+ wells: LabwareWellMap
187
+ groups: LabwareWellGroup[]
188
+ allowedRoles?: LabwareRoles[]
189
+ }
190
+
191
+ export type ModuleType =
192
+ | typeof MAGNETIC_MODULE_TYPE
193
+ | typeof TEMPERATURE_MODULE_TYPE
194
+ | typeof THERMOCYCLER_MODULE_TYPE
195
+ | typeof HEATERSHAKER_MODULE_TYPE
196
+ | typeof MAGNETIC_BLOCK_TYPE
197
+
198
+ // ModuleModel corresponds to top-level keys in shared-data/module/definitions/2
199
+ export type MagneticModuleModel =
200
+ | typeof MAGNETIC_MODULE_V1
201
+ | typeof MAGNETIC_MODULE_V2
202
+
203
+ export type TemperatureModuleModel =
204
+ | typeof TEMPERATURE_MODULE_V1
205
+ | typeof TEMPERATURE_MODULE_V2
206
+
207
+ export type ThermocyclerModuleModel =
208
+ | typeof THERMOCYCLER_MODULE_V1
209
+ | typeof THERMOCYCLER_MODULE_V2
210
+
211
+ export type HeaterShakerModuleModel = typeof HEATERSHAKER_MODULE_V1
212
+
213
+ export type MagneticBlockModel = typeof MAGNETIC_BLOCK_V1
214
+
215
+ export type ModuleModel =
216
+ | MagneticModuleModel
217
+ | TemperatureModuleModel
218
+ | ThermocyclerModuleModel
219
+ | HeaterShakerModuleModel
220
+ | MagneticBlockModel
221
+
222
+ export type GripperModel =
223
+ | typeof GRIPPER_V1
224
+ | typeof GRIPPER_V1_1
225
+ | typeof GRIPPER_V1_2
226
+
227
+ export type ModuleModelWithLegacy =
228
+ | ModuleModel
229
+ | typeof THERMOCYCLER
230
+ | typeof MAGDECK
231
+ | typeof TEMPDECK
232
+
233
+ export interface Dimensions {
234
+ xDimension: number
235
+ yDimension: number
236
+ zDimension: number
237
+ }
238
+
239
+ export interface DeckRobot {
240
+ model: RobotType
241
+ }
242
+
243
+ export type CoordinateTuple = [number, number, number]
244
+
245
+ export type UnitDirection = 1 | -1
246
+
247
+ export type UnitVectorTuple = [UnitDirection, UnitDirection, UnitDirection]
248
+
249
+ export type DeckSlotId = string
250
+
251
+ export interface DeckSlot {
252
+ id: DeckSlotId
253
+ position: CoordinateTuple
254
+ matingSurfaceUnitVector?: UnitVectorTuple
255
+ boundingBox: Dimensions
256
+ displayName: string
257
+ compatibleModules: ModuleType[]
258
+ }
259
+
260
+ export interface DeckCalibrationPoint {
261
+ id: string
262
+ position: CoordinateTuple
263
+ displayName: string
264
+ }
265
+
266
+ export interface CutoutFixture {
267
+ id: CutoutFixtureId
268
+ mayMountTo: CutoutId[]
269
+ displayName: string
270
+ providesAddressableAreas: Record<CutoutId, AddressableAreaName[]>
271
+ height: number
272
+ }
273
+
274
+ type AreaType =
275
+ | 'slot'
276
+ | 'movableTrash'
277
+ | 'wasteChute'
278
+ | 'fixedTrash'
279
+ | 'stagingSlot'
280
+
281
+ export interface AddressableArea {
282
+ id: AddressableAreaName
283
+ areaType: AreaType
284
+ offsetFromCutoutFixture: CoordinateTuple
285
+ boundingBox: Dimensions
286
+ displayName: string
287
+ compatibleModuleTypes: ModuleType[]
288
+ ableToDropLabware?: boolean
289
+ ableToDropTips?: boolean
290
+ matingSurfaceUnitVector?: UnitVectorTuple
291
+ }
292
+
293
+ export interface DeckMetadata {
294
+ displayName: string
295
+ tags: string[]
296
+ }
297
+
298
+ export interface DeckCutout {
299
+ id: CutoutId
300
+ position: CoordinateTuple
301
+ displayName: string
302
+ }
303
+
304
+ export interface LegacyFixture {
305
+ id: string
306
+ slot: string
307
+ labware: string
308
+ displayName: string
309
+ }
310
+
311
+ export interface DeckLocations {
312
+ addressableAreas: AddressableArea[]
313
+ calibrationPoints: DeckCalibrationPoint[]
314
+ cutouts: DeckCutout[]
315
+ legacyFixtures: LegacyFixture[]
316
+ }
317
+
318
+ export interface DeckDefinition {
319
+ otId: string
320
+ cornerOffsetFromOrigin: CoordinateTuple
321
+ dimensions: CoordinateTuple
322
+ robot: DeckRobot
323
+ locations: DeckLocations
324
+ metadata: DeckMetadata
325
+ cutoutFixtures: CutoutFixture[]
326
+ }
327
+
328
+ export interface ModuleDimensions {
329
+ bareOverallHeight: number
330
+ overLabwareHeight: number
331
+ xDimension: number
332
+ yDimension: number
333
+ footprintXDimension?: number
334
+ footprintYDimension?: number
335
+ labwareInterfaceXDimension?: number
336
+ labwareInterfaceYDimension?: number
337
+ lidHeight?: number
338
+ }
339
+
340
+ export interface ModuleCalibrationPoint {
341
+ x: number
342
+ y: number
343
+ z?: number
344
+ }
345
+
346
+ export interface ModuleLayer {
347
+ name: string
348
+ pathDValues: string[]
349
+ }
350
+
351
+ // module definition that adheres to the v3 module json schema
352
+ export interface ModuleDefinition {
353
+ moduleType: ModuleType
354
+ model: ModuleModel
355
+ labwareOffset: Coordinates
356
+ dimensions: ModuleDimensions
357
+ cornerOffsetFromSlot: Coordinates
358
+ calibrationPoint: ModuleCalibrationPoint
359
+ displayName: string
360
+ quirks: string[]
361
+ slotTransforms: SlotTransforms
362
+ compatibleWith: ModuleModel[]
363
+ twoDimensionalRendering: any // deprecated SVGson INode use Module SVG Components instead
364
+ }
365
+
366
+ export type AffineTransformMatrix = number[][]
367
+
368
+ export interface SlotTransforms {
369
+ [deckOtId: string]: {
370
+ [slotId: string]: {
371
+ [transformKey in keyof ModuleDefinition]?: AffineTransformMatrix
372
+ }
373
+ }
374
+ }
375
+
376
+ export type ModuleOrientation = 'left' | 'right'
377
+
378
+ export type PipetteChannels = 1 | 8 | 96
379
+
380
+ export type PipetteDisplayCategory = typeof GEN1 | typeof GEN2 | typeof FLEX
381
+
382
+ export type PipetteMount = typeof LEFT | typeof RIGHT
383
+ export type GantryMount = typeof LEFT | typeof RIGHT | typeof EXTENSION
384
+ export interface FlowRateSpec {
385
+ value: number
386
+ min: number
387
+ max: number
388
+ }
389
+
390
+ export interface PipetteNameSpecs {
391
+ name: string
392
+ displayName: string
393
+ displayCategory: PipetteDisplayCategory
394
+ minVolume: number
395
+ maxVolume: number
396
+ channels: PipetteChannels
397
+ defaultAspirateFlowRate: FlowRateSpec
398
+ defaultDispenseFlowRate: FlowRateSpec
399
+ defaultBlowOutFlowRate: FlowRateSpec
400
+ defaultTipracks: string[]
401
+ smoothieConfigs?: {
402
+ stepsPerMM: number
403
+ homePosition: number
404
+ travelDistance: number
405
+ }
406
+ }
407
+
408
+ // TODO(bc, 2021-05-27): the type of `model` here should be PipetteModel
409
+ // TODO(mc, 2019-10-14): update this type according to the schema
410
+ export interface PipetteModelSpecs extends PipetteNameSpecs {
411
+ model: string
412
+ backCompatNames?: string[]
413
+ tipLength: {
414
+ value: number
415
+ }
416
+ }
417
+ export interface ProtocolMetadata {
418
+ protocolName?: string
419
+ author?: string
420
+ description?: string | null
421
+ created?: number
422
+ lastModified?: number | null
423
+ category?: string | null
424
+ subcategory?: string | null
425
+ tags?: string[]
426
+ [key: string]: unknown
427
+ }
428
+ export interface PendingProtocolAnalysis {
429
+ id: string
430
+ status?: 'pending'
431
+ }
432
+ export interface ProtocolAnalysisSummary {
433
+ id: string
434
+ status: 'pending' | 'completed'
435
+ }
436
+ export interface LoadedPipette {
437
+ id: string
438
+ pipetteName: PipetteName
439
+ mount: 'left' | 'right'
440
+ }
441
+ export interface LoadedLabware {
442
+ id: string
443
+ loadName: string
444
+ definitionUri: string
445
+ location: LabwareLocation
446
+ offsetId?: string
447
+ displayName?: string
448
+ }
449
+ export interface LoadedModule {
450
+ id: string
451
+ model: ModuleModel
452
+ location: {
453
+ slotName: string
454
+ }
455
+ serialNumber: string
456
+ }
457
+ export interface Liquid {
458
+ id: string
459
+ displayName: string
460
+ description: string
461
+ displayColor?: string
462
+ }
463
+
464
+ export interface AnalysisError {
465
+ id: string
466
+ detail: string
467
+ errorType: string
468
+ createdAt: string
469
+ }
470
+
471
+ // TODO(BC, 10/25/2023): this type (and others in this file) probably belong in api-client, not here
472
+ export interface CompletedProtocolAnalysis {
473
+ id: string
474
+ status?: 'completed'
475
+ result: 'ok' | 'not-ok' | 'error'
476
+ pipettes: LoadedPipette[]
477
+ labware: LoadedLabware[]
478
+ modules: LoadedModule[]
479
+ liquids: Liquid[]
480
+ commands: RunTimeCommand[]
481
+ errors: AnalysisError[]
482
+ robotType?: RobotType | null
483
+ }
484
+
485
+ export interface ResourceFile {
486
+ name: string
487
+ role: string
488
+ }
489
+ export interface ProtocolResource {
490
+ id: string
491
+ createdAt: string
492
+ protocolType: 'json' | 'python'
493
+ robotType: RobotType
494
+ metadata: ProtocolMetadata
495
+ analysisSummaries: ProtocolAnalysisSummary[]
496
+ files: ResourceFile[]
497
+ key?: string
498
+ }
499
+
500
+ export interface ProtocolAnalysesResource {
501
+ analyses: Array<PendingProtocolAnalysis | CompletedProtocolAnalysis>
502
+ }
503
+ export type MotorAxis =
504
+ | 'x'
505
+ | 'y'
506
+ | 'leftZ'
507
+ | 'rightZ'
508
+ | 'leftPlunger'
509
+ | 'rightPlunger'
510
+ | 'extensionZ'
511
+ | 'extensionJaw'
512
+
513
+ export type MotorAxes = MotorAxis[]
514
+
515
+ export type ThermalAdapterName =
516
+ | 'PCR Adapter'
517
+ | 'Deep Well Adapter'
518
+ | '96 Flat Bottom Adapter'
519
+ | 'Universal Flat Adapter'
520
+
521
+ // gripper definition that adheres to the v1 gripper json schema
522
+ export interface GripperDefinition {
523
+ $otSharedSchema: string
524
+ model: GripperModel
525
+ schemaVersion: number
526
+ displayName: string
527
+ zMotorConfigurations: { idle: number; run: number }
528
+ jawMotorConfigurations: { vref: number }
529
+ gripForceProfile: {
530
+ polynomial: [[number, number], [number, number]]
531
+ defaultGripForce: number
532
+ defaultHomeForce: number
533
+ defaultIdleForce: number
534
+ min: number
535
+ max: number
536
+ }
537
+ geometry: {
538
+ baseOffsetFromMount: [number, number, number]
539
+ jawCenterOffsetFromBase: [number, number, number]
540
+ pinOneOffsetFromBase: [number, number, number]
541
+ pinTwoOffsetFromBase: [number, number, number]
542
+ jawWidth: { min: number; max: number }
543
+ maxAllowedGripError: number
544
+ }
545
+ }
546
+
547
+ export type StatusBarAnimation =
548
+ | 'idle'
549
+ | 'confirm'
550
+ | 'updating'
551
+ | 'disco'
552
+ | 'off'
553
+
554
+ export type StatusBarAnimations = StatusBarAnimation[]
555
+
556
+ export interface CutoutConfig {
557
+ cutoutId: CutoutId
558
+ cutoutFixtureId: CutoutFixtureId | null
559
+ }
560
+
561
+ export type DeckConfiguration = CutoutConfig[]
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};