Methods for dealing with Venues.

Hierarchy

  • SdkModule
    • Venues

Properties

ChargingStation: ChargingStation = ...
ParkingLot: ParkingLot = ...

Methods

  • Delete a venue from the map.

    Parameters

    • args: { venueId: string }
      • venueId: string

        An id of the venue to be deleted.

    Returns void

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

    InvalidStateError in case deletion of the venue is not allowed

  • Parameters

    • args: { venueId: string }
      • venueId: string

        The id of the venue to get the address for.

    Returns VenueAddress

    an address of the venue with the provided id.

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

  • Returns Venue[]

    an array of all the venues in the WME data model

  • Parameters

    • args: { venueId: string }
      • venueId: string

        An id of the venue to look for.

    Returns null | Venue

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

  • Returns string[]

    a list of charging station brands

  • Returns string[]

    a list of gas stations brands

  • Returns string[]

    a list of parking lot brands

  • Get venue parking lot type.

    Parameters

    • args: { venueId: string }
      • venueId: string

        The id of the venue to get the parking lot type for.

    Returns ParkingType

    parking lot type of the venue in case the venue is a parking lot, null othervise.

    DataModelNotFoundError in case the venue is not found in the WME data model.

  • Parameters

    • args: { permission?: VenuePermission; venueId: string }
      • Optionalpermission?: VenuePermission

        A name of the permission to check. If not provided, the method checks whether the current user has any permissions for this venue.

      • venueId: string

        An id of the venue to check the permissions for.

    Returns boolean

    whether the current user has a permission for this venue or not.

    DataModelNotFoundError in case the venue is not found in the WME data model.

  • Update venue navigationPoints attribute. Method replaces the existing navigation points with a new set.

    Parameters

    Returns void

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

    InvalidStateError if not allowed to update the venue

  • Display the Place Update Request dialog for the specified venue, showing any pending update requests.

    Parameters

    • args: { venueId: string }
      • venueId: string

        The ID of the venue for which to display the update requests.

    Returns void

    DataModelNotFoundError If the venue with the specified venueId is not found.

  • Update venue address.

    Parameters

    • args: { houseNumber?: string; streetId?: number; venueId: string }
      • OptionalhouseNumber?: string

        A new house number for the venue.

      • OptionalstreetId?: number

        An id of the new street for the venue.

      • venueId: string

        The id of the venue to update the address for.

    Returns void

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

  • Update venue attributes.

    Parameters

    • args: {
          aliases?: string[];
          brand?: string;
          categories?: VenueCategoryId[];
          description?: string;
          geometry?: Point | Polygon;
          lockRank?: number;
          name?: string;
          openingHours?: OpeningHour[];
          phone?: string;
          services?: ServiceType[];
          url?: string;
          venueId: string;
      }
      • Optionalaliases?: string[]

        New aliases for the venue.

      • Optionalbrand?: string

        New brand for the venue.

      • Optionalcategories?: VenueCategoryId[]

        New categories for the venue.

      • Optionaldescription?: string

        New description for the venue.

      • Optionalgeometry?: Point | Polygon

        New geometry for the venue.

      • OptionallockRank?: number

        New lock rank of the venue.

      • Optionalname?: string

        New name for the venue.

      • OptionalopeningHours?: OpeningHour[]

        Array of opening hour objects. Each object defines a set of opening hours for specific days of the week. Optional.

        Example:

        [
        { days: [0, 1, 2, 3, 4, 5, 6], fromHour: "09:00", toHour: "17:00" }, // Open every day 9am-5pm
        { days: [5, 6], fromHour: "09:00", toHour: "22:00" }, // Open weekends 9am-10pm
        ]

        where days is an array of numbers representing days of the week (0 = Sunday, 1 = Monday, etc.) and fromHour and toHour are strings in 24-hour format ("HH:MM").

      • Optionalphone?: string

        New phone number for the venue.

      • Optionalservices?: ServiceType[]

        New services offered at the venue.

      • Optionalurl?: string

        New website URL for the venue.

      • venueId: string

        The id of the venue to be updated.

    Returns void

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

    InvalidStateError if no attribute to update was provided or if not allowed to update the venue

  • Updates the isResidential property of a venue.

    Parameters

    • args: { isResidential: boolean; venueId: string }
      • isResidential: boolean

        true if the venue is residential

      • venueId: string

        The id of the venue to update.

    Returns void

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

    InvalidStateError if not allowed to update the venue

  • Updates the approved status of a Venue Update Request (PUR) associated with a venue.

    This method allows you to approve or reject a Venue Update Request related to a specific venue. It's used to modify the state of a suggested change for a venue (e.g., updating the venue's name, address, or other attributes).

    Parameters

    • args: { isApproved: boolean; venueId: string; venueUpdateRequestId: string }
      • isApproved: boolean

        A boolean value indicating whether to approve (true) or reject (false) the Venue Update Request.

      • venueId: string

        The ID of the venue that the Venue Update Request is associated with.

      • venueUpdateRequestId: string

        The ID of the Venue Update Request to update.

    Returns void

    DataModelNotFoundError If the specified venue or Venue Update Request is not found.

    InvalidStateError If the current user is not allowed to update the Venue Update Request.