Skip to main content

Sweep.Conversion

Functions

createIdMap

createIdMap(invert?: boolean): Promise<Dictionary<string>>

Generate a map between v2 IDs and v1 IDs

This method will help with migration between IDs used for sweeps.

const mapping = await mpSdk.Sweep.Conversion.createIdMap();
ParameterType
invert?boolean
If passed, return map of v1->v2 instead

Returns: Promise<Dictionary<string>>

getLabelFromId

getLabelFromId(id: string): Promise<string>

Return the label associated with the provided sweep ID

The label is what's displayed for the sweep in the workshop

const label = mpSdk.Sweep.Conversion.getLabelFromId('abcdefghijklmno0123456789');
ParameterType
idstring
the sweep ID to look up

Returns: Promise<string>