Package-level declarations

Location data: favorites, map markers, nominations, problem reports, categories, types and search filters.

Types

Link copied to clipboard
data class AdvancedLocationFilter(val categoryCodes: List<String> = emptyList(), val categoryIds: List<Int> = emptyList(), val includeChildCategories: Boolean = true, val typeCodes: List<String> = emptyList(), val typeIds: List<Int> = emptyList(), val amenities: List<String> = emptyList(), val amenitiesMode: String = "any", val status: List<String> = emptyList(), val favoritesOnly: Boolean = false, val excludeMuted: Boolean = false, val query: String? = null, val limit: Int = 200)
Link copied to clipboard
data class FavoriteLocation(val id: Long, val locationId: Long, val locationGlobalId: String?, val favoriteType: LocationFavoriteType, val favoriteTypeCode: Int, val isPrimary: Boolean, val notes: String?, val locationName: String?, val addressLine1: String?, val addressLine2: String?, val city: String?, val stateProvince: String?, val postalCode: String?, val phone: String?, val latitude: Double?, val longitude: Double?, val brandName: String?, val pinImageId: Long?, val pinImageUrl: String?, val geofenceRadiusMeters: Double?, val dwellThresholdMinutes: Int?, val supportsGuestPass: Boolean, val legacyClubId: Long?, val createdAt: String?, val modifiedAt: String?, val categoryCode: String? = null)

A location the member has a favorite relationship with, joined with the location's own data - the Locations API's replacement for the legacy VerifiedClubs list (Facility). Returned by Locations.getFavorites and by every favorite mutation.

Link copied to clipboard
data class LocationCategory(val id: Int, val code: String?, val name: String?, val description: String?, val icon: String?, val color: String?, val parentCategoryId: Int?, val isActive: Boolean, val locationCount: Int)

A category a nomination can be filed under - for example fitness (gyms and clubs) or retail (stores). Returned by Locations.getLocationCategories.

Link copied to clipboard

The member's relationship with a saved location: whether it is one of the member's places, and whether it produces notifications, visit events and visits.

Link copied to clipboard
data class LocationMarker(val id: Long, val globalId: String?, val legacyClubId: Long?, val name: String?, val description: String?, val position: LocationMarkerPosition?, val address: LocationMarkerAddress?, val classification: LocationMarkerClassification?, val amenities: List<String>, val brand: String?, val logoUrl: String?, val coverImageUrl: String?, val imageUrls: List<String>, val pinImageId: Long?, val pinImageUrl: String?, val phone: String?, val website: String?, val email: String?, val social: Map<String, String>, val hours: LocationMarkerHours?, val timezoneId: String?, val status: String?, val isVerified: Boolean, val geofenceRadiusMeters: Double?, val dwellThresholdMinutes: Int?, val supportsGuestPass: Boolean, val isFavorite: Boolean, val isBrandFavorite: Boolean, val isMuted: Boolean, val isReported: Boolean, val member: LocationMarkerMember?, val merchantId: Int?)

An advanced location marker returned by com.advantahealth.api.locations.Locations.getLocationsByViewPort or com.advantahealth.api.locations.Locations.getLocationsByRadius - the full place record behind a map pin.

Link copied to clipboard
data class LocationMarkerAddress(val addressLine1: String?, val addressLine2: String?, val city: String?, val stateProvince: String?, val postalCode: String?, val country: String?)

The postal address of a LocationMarker - the same fields a nomination or a problem report uses, grouped here. Each field is null when the server did not send it.

Link copied to clipboard
data class LocationMarkerClassification(val typeId: Int?, val typeCode: String?, val typeName: String?, val categoryId: Int?, val categoryCode: String?, val categoryName: String?, val parentCategoryId: Int?, val parentCategoryCode: String?)

Where a LocationMarker is filed in the location catalog: its place type and the category above it, with the ids and codes that getLocationCategories / getLocationTypes list and that AdvancedLocationFilter filters by. Use categoryCode to tell a gym ("FITNESS") from a store ("RETAIL").

Link copied to clipboard
data class LocationMarkerHours(val isOpenNow: Boolean, val weekly: List<LocationMarkerWeeklyHour>)

Opening hours of a LocationMarker, as the server reports them.

Link copied to clipboard
data class LocationMarkerMember(val favoriteType: LocationFavoriteType, val favoriteTypeCode: Int, val isPrimary: Boolean, val notes: String?, val favoritedAt: String?)

The current member's relationship with a favorited or excluded marker.

Link copied to clipboard
data class LocationMarkerPosition(val latitude: Double?, val longitude: Double?, val distanceMiles: Double?)

Where a LocationMarker sits on the map. A marker can only be drawn when both latitude and longitude are present.

Link copied to clipboard
data class LocationMarkerWeeklyHour(val day: String?, val open: String?, val close: String?)

One day of a LocationMarkerHours.weekly schedule. Times are strings as the server formats them, for example "05:00" and "22:00".

Link copied to clipboard
data class LocationNomination(val locationTypeId: Int, val name: String, val addressLine1: String, val city: String, val stateProvince: String, val postalCode: String, val clientId: Int? = null, val locationCategoryId: Int? = null, val managerName: String? = null, val description: String? = null, val addressLine2: String? = null, val countryCode: String? = null, val latitude: Double? = null, val longitude: Double? = null, val googlePlaceId: String? = null, val phone: String? = null, val phoneExtension: String? = null, val fax: String? = null, val email: String? = null, val websiteUrl: String? = null, val contactName: String? = null, val currentlyAMember: Boolean = false)

A new place nomination, sent with Locations.nominateLocation. Field requirements mirror the server contract: name, addressLine1, city, stateProvince, postalCode must be non-empty and locationTypeId must be a real type id (see getLocationTypes).

Link copied to clipboard
data class LocationNominationResult(val id: Long, val name: String?, val status: String?, val city: String?, val stateProvince: String?, val createdAt: String?)

Result of a created nomination (a deliberately thinner shape than the submissions listing - refetch getMySubmissions for the full row).

Link copied to clipboard
data class LocationProblemReport(val problemType: LocationProblemType, val description: String? = null, val name: String? = null, val locationCategoryId: Int? = null, val locationTypeId: Int? = null, val addressLine1: String? = null, val addressLine2: String? = null, val city: String? = null, val stateProvince: String? = null, val postalCode: String? = null, val countryCode: String? = null, val latitude: Double? = null, val longitude: Double? = null)

A problem report about an existing location, carrying the member's corrections as a structured patch. Sent with Locations.reportLocationProblem(locationId, report).

Link copied to clipboard

What is wrong with a location, on the canonical numeric 0-5 wire contract - the LocationProblemReport.problemType a member picks when reporting a problem with Locations.reportLocationProblem.

Link copied to clipboard

Sort direction of the submissions listing.

Link copied to clipboard
data class LocationsPage(val items: List<LocationMarker>, val returned: Int, val truncated: Boolean, val generatedAt: String?)
Link copied to clipboard
data class LocationTypeDefinition(val id: Int, val code: String?, val name: String?, val description: String?, val iconName: String?, val sortOrder: Int, val isActive: Boolean, val categoryId: Int?, val categoryCode: String?, val categoryName: String?)

A place type a nomination can be filed under, each linked to its category. Returned by Locations.getLocationTypes; like the categories, the types are runtime data.

Link copied to clipboard
@Serializable
data class PlaceSuggestion(val placeId: String, val name: String?, val addressLine1: String?, val city: String?, val stateProvince: String?, val postalCode: String?, val latitude: Double?, val longitude: Double?)

A place the member can pick while nominating, carrying the canonical Google place id the nomination is stored against - independent of whichever map SDK is drawing. Returned by Locations.searchPlaces and Locations.getRecentPlaceSearches.