@opentrons/step-generation 0.3.19-alpha.0 → 0.3.21-alpha.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/lib/types.d.ts CHANGED
@@ -184,18 +184,33 @@ export type Ingredient = Omit<LiquidEntity, 'pythonName'>;
184
184
  export interface Ingredients {
185
185
  [liquidId: string]: Ingredient;
186
186
  }
187
- export type Choices = number[] | string[];
188
- export interface RuntimeParameter {
187
+ interface RuntimeParameterBase {
189
188
  variableName: string;
190
189
  displayName: string;
191
- type: 'boolean' | 'string' | 'float' | 'int' | 'csv';
192
- default: string | number | boolean;
190
+ description?: string;
191
+ }
192
+ export interface NumericRuntimeParameter extends RuntimeParameterBase {
193
+ type: 'float' | 'int';
194
+ default: number;
193
195
  minimum?: number;
194
196
  maximum?: number;
195
- choices?: Choices;
197
+ choices?: number[];
196
198
  unit?: string;
197
- description?: string;
198
199
  }
200
+ export interface BooleanRuntimeParameter extends RuntimeParameterBase {
201
+ type: 'boolean';
202
+ default: boolean;
203
+ }
204
+ export interface StringRuntimeParameter extends RuntimeParameterBase {
205
+ type: 'string';
206
+ default: string;
207
+ choices?: string[];
208
+ }
209
+ export interface CsvRuntimeParameter extends RuntimeParameterBase {
210
+ type: 'csv';
211
+ default: string;
212
+ }
213
+ export type RuntimeParameter = NumericRuntimeParameter | BooleanRuntimeParameter | StringRuntimeParameter | CsvRuntimeParameter;
199
214
  export interface RuntimeParameters {
200
215
  [variableName: string]: RuntimeParameter;
201
216
  }
@@ -752,7 +767,7 @@ export interface TimelineFrame {
752
767
  };
753
768
  }
754
769
  export type RobotState = TimelineFrame;
755
- export type ErrorType = 'ABSORBANCE_READER_LID_CLOSED' | 'ABSORBANCE_READER_NO_GRIPPER' | 'ABSORBANCE_READER_NO_INITIALIZATION' | 'CANNOT_MOVE_WITH_GRIPPER' | 'CLOSING_THERMOCYCLER_WITH_INVALID_LABWARE_LID' | 'DROP_TIP_LOCATION_DOES_NOT_EXIST' | 'EQUIPMENT_DOES_NOT_EXIST' | 'FLEX_STACKER_NO_GRIPPER' | 'GRIPPER_REQUIRED' | 'HEATER_SHAKER_EAST_WEST_LATCH_OPEN' | 'HEATER_SHAKER_EAST_WEST_MULTI_CHANNEL' | 'HEATER_SHAKER_IS_SHAKING' | 'HEATER_SHAKER_LATCH_CLOSED' | 'HEATER_SHAKER_LATCH_OPEN' | 'HEATER_SHAKER_NORTH_SOUTH__OF_NON_TIPRACK_WITH_MULTI_CHANNEL' | 'HEATER_SHAKER_NORTH_SOUTH_EAST_WEST_SHAKING' | 'HOPPER_EMPTY' | 'HOPPER_FULL' | 'INCOMPLETE_PICKUP' | 'INSUFFICIENT_TIPS' | 'INVALID_SLOT' | 'INVALID_WAIT_CONDITION' | 'LABWARE_DISCARDED_IN_TRASH' | 'LABWARE_DOES_NOT_EXIST' | 'LABWARE_OFF_DECK' | 'LABWARE_ON_ANOTHER_ENTITY' | 'LABWARE_ON_HOPPER' | 'LIVE_TASK_ERROR' | 'MISMATCHED_SOURCE_DEST_WELLS' | 'MISMATCHED_STACKER_LABWARE_TYPE' | 'MISSING_96_CHANNEL_TIPRACK_ADAPTER' | 'MISSING_MODULE' | 'MISSING_PROFILE_STEP' | 'MISSING_PUMP_ACTIVITY' | 'MISSING_STACKER_LABWARE_TYPE' | 'MISSING_TEMPERATURE_STEP' | 'MOVE_LOCATION_NOT_SPECIFIED' | 'MODULE_PIPETTE_COLLISION_DANGER' | 'MULTI_ASPIRATE_VOLUME_TOO_HIGH' | 'MULTI_DISPENSE_VOLUME_TOO_HIGH' | 'NEXT_TIPRACK_HAS_LID' | 'NO_TIP_ON_PIPETTE' | 'NO_TIP_SELECTED' | 'PIPETTE_DOES_NOT_EXIST' | 'PIPETTE_HAS_TIP' | 'PIPETTE_VOLUME_EXCEEDED' | 'PIPETTING_INTO_COLUMN_4' | 'POSSIBLE_PIPETTE_COLLISION_THERMOCYCLER_LID' | 'POSSIBLE_PIPETTE_COLLISION_OUTSIDE_DECK_EXTENTS' | 'POSSIBLE_PIPETTE_COLLISION_ADJACENT_ADDRESSABLE_AREA' | 'REMOVE_96_CHANNEL_TIPRACK_ADAPTER' | 'RETRACT_BELOW_ASPIRATE' | 'RETRACT_BELOW_DISPENSE' | 'RETURN_TIP_UNAVAILABLE' | 'SHUTTLE_FULL' | 'SHUTTLE_EMPTY' | 'STACK_TOO_HIGH' | 'SUBMERGE_BELOW_ASPIRATE' | 'SUBMERGE_BELOW_DISPENSE' | 'TALL_LABWARE_EAST_WEST_OF_HEATER_SHAKER' | 'THERMOCYCLER_BUSY_WITH_PROFILE' | 'THERMOCYCLER_LID_CLOSED' | 'TIP_VOLUME_EXCEEDED' | 'TIPRACK_LID_NOT_ALLOWED_ON_DECK' | 'TOO_MANY_TIPS' | 'VACUUM_UNDER_PRESSURE';
770
+ export type ErrorType = 'ABSORBANCE_READER_LID_CLOSED' | 'ABSORBANCE_READER_NO_GRIPPER' | 'ABSORBANCE_READER_NO_INITIALIZATION' | 'CANNOT_MOVE_WITH_GRIPPER' | 'CLOSING_THERMOCYCLER_WITH_INVALID_LABWARE_LID' | 'DROP_TIP_LOCATION_DOES_NOT_EXIST' | 'EQUIPMENT_DOES_NOT_EXIST' | 'FLEX_STACKER_NO_GRIPPER' | 'GRIPPER_REQUIRED' | 'HEATER_SHAKER_EAST_WEST_LATCH_OPEN' | 'HEATER_SHAKER_EAST_WEST_MULTI_CHANNEL' | 'HEATER_SHAKER_IS_SHAKING' | 'HEATER_SHAKER_LATCH_CLOSED' | 'HEATER_SHAKER_LATCH_OPEN' | 'HEATER_SHAKER_NORTH_SOUTH__OF_NON_TIPRACK_WITH_MULTI_CHANNEL' | 'HEATER_SHAKER_NORTH_SOUTH_EAST_WEST_SHAKING' | 'HOPPER_EMPTY' | 'HOPPER_FULL' | 'INCOMPLETE_PICKUP' | 'INSUFFICIENT_TIPS' | 'INVALID_RUNTIME_PARAMETER' | 'INVALID_SLOT' | 'INVALID_WAIT_CONDITION' | 'LABWARE_DISCARDED_IN_TRASH' | 'LABWARE_DOES_NOT_EXIST' | 'LABWARE_OFF_DECK' | 'LABWARE_ON_ANOTHER_ENTITY' | 'LABWARE_ON_HOPPER' | 'LIVE_TASK_ERROR' | 'MISMATCHED_SOURCE_DEST_WELLS' | 'MISMATCHED_STACKER_LABWARE_TYPE' | 'MISSING_96_CHANNEL_TIPRACK_ADAPTER' | 'MISSING_MODULE' | 'MISSING_PROFILE_STEP' | 'MISSING_PUMP_ACTIVITY' | 'MISSING_STACKER_LABWARE_TYPE' | 'MISSING_TEMPERATURE_STEP' | 'MOVE_LOCATION_NOT_SPECIFIED' | 'MODULE_PIPETTE_COLLISION_DANGER' | 'MULTI_ASPIRATE_VOLUME_TOO_HIGH' | 'MULTI_DISPENSE_VOLUME_TOO_HIGH' | 'NEXT_TIPRACK_HAS_LID' | 'NO_TIP_ON_PIPETTE' | 'NO_TIP_SELECTED' | 'PIPETTE_DOES_NOT_EXIST' | 'PIPETTE_HAS_TIP' | 'PIPETTE_VOLUME_EXCEEDED' | 'PIPETTING_INTO_COLUMN_4' | 'POSSIBLE_PIPETTE_COLLISION_THERMOCYCLER_LID' | 'POSSIBLE_PIPETTE_COLLISION_OUTSIDE_DECK_EXTENTS' | 'POSSIBLE_PIPETTE_COLLISION_ADJACENT_ADDRESSABLE_AREA' | 'REMOVE_96_CHANNEL_TIPRACK_ADAPTER' | 'RETRACT_BELOW_ASPIRATE' | 'RETRACT_BELOW_DISPENSE' | 'RETURN_TIP_UNAVAILABLE' | 'SHUTTLE_FULL' | 'SHUTTLE_EMPTY' | 'STACK_TOO_HIGH' | 'SUBMERGE_BELOW_ASPIRATE' | 'SUBMERGE_BELOW_DISPENSE' | 'TALL_LABWARE_EAST_WEST_OF_HEATER_SHAKER' | 'THERMOCYCLER_BUSY_WITH_PROFILE' | 'THERMOCYCLER_LID_CLOSED' | 'TIP_VOLUME_EXCEEDED' | 'TIPRACK_LID_NOT_ALLOWED_ON_DECK' | 'TOO_MANY_TIPS' | 'VACUUM_UNDER_PRESSURE';
756
771
  export interface CommandCreatorError {
757
772
  message: string;
758
773
  type: ErrorType;
@@ -1,6 +1,6 @@
1
1
  import { COLUMN_4_SLOTS } from '../constants';
2
2
  import type { ActiveNozzleNumber, AddressableAreaName, BlowoutParams, CutoutFixtureId, CutoutId, LabwareDefinition2, LabwareLocationSequence, LoadLabwareRunTimeCommand, LoadLidParams, LoadLidStackRunTimeCommand, NozzleConfigurationStyle, PipetteChannels, PipetteV2Specs, PositionReference, PrimaryNozzleConfigurationStyle, RobotType } from '@opentrons/shared-data';
3
- import type { CommandCreator, CurriedCommandCreator, FlexStackerModuleState, InvariantContext, LabwareEntities, LabwareTemporalProperties, LocationLiquidState, ModuleEntities, PathOption, RobotState, SourceAndDest, StagingAreaEntities, TrashBinEntities, WasteChuteEntities } from '../types';
3
+ import type { CommandCreator, CurriedCommandCreator, FlexStackerModuleState, InvariantContext, LabwareEntities, LabwareTemporalProperties, LocationLiquidState, ModuleEntities, PathOption, RobotState, RuntimeParameters, SourceAndDest, StagingAreaEntities, TrashBinEntities, WasteChuteEntities } from '../types';
4
4
  export declare const AIR: '__air__';
5
5
  export declare const SOURCE_WELL_BLOWOUT_DESTINATION: 'source_well';
6
6
  export declare const DEST_WELL_BLOWOUT_DESTINATION: 'dest_well';
@@ -187,4 +187,20 @@ export declare const getLabwareHasLid: (args: {
187
187
  labwareEntities: LabwareEntities;
188
188
  }) => boolean;
189
189
  export declare const getIsInPipettableLocation: (location: string) => boolean;
190
+ /**
191
+ * Numbers pass through. Strings are runtime parameter variable names, and only
192
+ * float/int parameters resolve — `type` narrows `default` to `number`.
193
+ */
194
+ export declare function resolveNumericRuntimeValue(value: number | string, runtimeParameters: RuntimeParameters): number | null;
195
+ /**
196
+ * A string id is literal unless it names a runtime parameter. Only string
197
+ * parameters resolve — `type` narrows `default` to `string`. Any other
198
+ * parameter type is invalid.
199
+ */
200
+ export declare function resolveStringRuntimeValue(value: string, runtimeParameters: RuntimeParameters): string | null;
201
+ /**
202
+ * Booleans pass through. Strings are runtime parameter variable names, and only
203
+ * boolean parameters resolve — `type` narrows `default` to `boolean`.
204
+ */
205
+ export declare function resolveBooleanRuntimeValue(value: boolean | string, runtimeParameters: RuntimeParameters): boolean | null;
190
206
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { ProtocolFile, RobotType } from '@opentrons/shared-data';
2
- import type { ChangeTipOptions, InvariantContext, LabwareEntities, LabwareLiquidState, LabwareTemporalProperties, LiquidEntities, ModuleEntities, ModuleTemporalProperties, PipetteEntities, Timeline, TimelineFrame, TrashBinEntities, WasteChuteEntities } from '../types';
2
+ import type { ChangeTipOptions, InvariantContext, LabwareEntities, LabwareLiquidState, LabwareTemporalProperties, LiquidEntities, ModuleEntities, ModuleTemporalProperties, PipetteEntities, RuntimeParameters, Timeline, TimelineFrame, TrashBinEntities, WasteChuteEntities } from '../types';
3
3
  export declare const PAPI_VERSION = "2.31";
4
4
  export declare const PD_APPLICATION_VERSION = "9.0.1";
5
5
  export declare function pythonImports(): string;
@@ -28,3 +28,4 @@ export declare const getSetStoredLabware: (moduleEntities: ModuleEntities, labwa
28
28
  }, modules: {
29
29
  [moduleId: string]: ModuleTemporalProperties;
30
30
  }, robotStateTimeline: Timeline) => string;
31
+ export declare function getRunTimeParameters(runtimeParameters: RuntimeParameters): string;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "name": "@opentrons/step-generation",
11
11
  "productName": "Opentrons Step Generation",
12
- "version": "0.3.19-alpha.0",
12
+ "version": "0.3.21-alpha.0",
13
13
  "description": "Step generation",
14
14
  "main": "lib/index.cjs",
15
15
  "types": "lib/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "immer": "^10.1.3",
38
38
  "lodash": "4.18.1",
39
39
  "uuid": "14.0.0",
40
- "@opentrons/shared-data": "0.3.19-alpha.0"
40
+ "@opentrons/shared-data": "0.3.21-alpha.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/lodash": "4.17.24"