Methods for dealing with Streets.

Hierarchy

  • SdkModule
    • Streets

Methods

  • Add a new street.

    Parameters

    • args: { cityId?: number; streetName: string }
      • OptionalcityId?: number

        An id of the city to add the street. If none provided, the top city from the data model would be used.

      • streetName: string

        A name for the new street.

    Returns Street

    a new street object

    DataModelNotFoundError in case the city is not found in the WME data model

    InvalidStateError in case not allowed to add a new street, if the street already exists or if cityId wasn't provided and top city not found.

  • Returns Street[]

    an array of all the streets in the WME data model

  • Parameters

    • args: { streetId: number }
      • streetId: number

        An id of the street to look for.

    Returns null | Street

    street with id, or null if not found in the WME data model

  • Find a street by the name.

    Parameters

    • args: { cityId?: number; streetName: string }
      • OptionalcityId?: number

        An optional id of the city the street must be in.

      • streetName: string

        A name of the street to look for.

    Returns null | Street

    a street object or null if not found

    DataModelNotFoundError in case the city was not found in the WME data model

  • Update street attributes. Currently, only supports updating the direction of a street.

    Parameters

    • args: { direction?: string; streetId: number }

    Returns void

    DataModelNotFoundError if the street with the given streetId is not found in the WME data model.

    InvalidStateError if editing is not currently allowed(e.g., not in edit mode) or if the update action fails for other reasons.