Create location into database
Promise<{id: string}> id of created location record blocks-2055
Private
createDelete the location by id. Also need to delete all the locations which location path contains the id. e.g. Assume, Prefecture A have children City X, City Y, and City X have Ward 1, Ward 2 if delete Prefecture A, City X, City Y, Ward 1, Ward 2 all deleted
location Id to delete
true if deleted, false if delete failed blocks-2055
Get location from database
Promise<Location | undefined> Location data if fetched successfully, or null if data not found by id blocks-2055
Return two layer location tree. Location object with a children property, which is a locationList
parentId of a locationTreeList
locationTree blocks-6a17
List paginated locations
paginated list query options
paginated locations list query result
Normalize location to response format
LocationResponse which aligns with the API docs format to return to frontend blocks-2055
Normalize list of location responses
location models
Normalize location to response format
LocationResponse which aligns with the API docs format to return to frontend blocks-2055
Normalize list of location tree responses
location models
Update location data. If location parentId is updated, all the location have this location id in path, will get updated.
blocks-2055
Private
dbPrivate
locationStatic
Readonly
COLLECTION_Static
Readonly
LOCATION_Generated using TypeDoc
Location service