2026-04-14-8 auth and commercial
This commit is contained in:
+65
-6
@@ -1,17 +1,76 @@
|
||||
import { Repository } from 'typeorm';
|
||||
import type { Cache } from 'cache-manager';
|
||||
import { PlaceSyria } from './entities/place-syria.entity';
|
||||
import { PlaceJordan } from './entities/place-jordan.entity';
|
||||
import { PlaceEgypt } from './entities/place-egypt.entity';
|
||||
import { BasePlace } from './entities/base-place.entity';
|
||||
import { OsmArea } from './entities/osm-area.entity';
|
||||
import { OsmPointWithArea } from './entities/osm-point-with-area.entity';
|
||||
export declare class GeocodingService {
|
||||
private placesRepository;
|
||||
private placesSyriaRepository;
|
||||
private placesJordanRepository;
|
||||
private placesEgyptRepository;
|
||||
private osmAreasRepository;
|
||||
private osmPointsRepository;
|
||||
private cacheManager;
|
||||
private readonly logger;
|
||||
constructor(placesRepository: Repository<PlaceSyria>, osmAreasRepository: Repository<OsmArea>, osmPointsRepository: Repository<OsmPointWithArea>);
|
||||
searchPlaces(query: string): Promise<{
|
||||
userPlaces: PlaceSyria[];
|
||||
osmAreas: OsmArea[];
|
||||
private readonly DB_TIMEOUT_MS;
|
||||
constructor(placesSyriaRepository: Repository<PlaceSyria>, placesJordanRepository: Repository<PlaceJordan>, placesEgyptRepository: Repository<PlaceEgypt>, osmAreasRepository: Repository<OsmArea>, osmPointsRepository: Repository<OsmPointWithArea>, cacheManager: Cache);
|
||||
private getRepositoryForCoords;
|
||||
private identifyRegion;
|
||||
private getTableNameForRepo;
|
||||
searchPlaces(query: string, lat?: number, lon?: number, radius?: number, country?: string): Promise<{
|
||||
results: any;
|
||||
source: string;
|
||||
} | {
|
||||
results: any[];
|
||||
source?: undefined;
|
||||
}>;
|
||||
private formatResults;
|
||||
private getRepoByTableName;
|
||||
reverseGeocode(lat: number, lng: number): Promise<any>;
|
||||
addPlace(data: Partial<PlaceSyria>): Promise<PlaceSyria>;
|
||||
addPlace(data: Partial<BasePlace>): Promise<{
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
location: string;
|
||||
id: number;
|
||||
name: string;
|
||||
name_ar: string;
|
||||
name_en: string;
|
||||
address: string;
|
||||
category: string;
|
||||
neighbourhood: string;
|
||||
city: string;
|
||||
description: string;
|
||||
created_at: Date;
|
||||
source: string;
|
||||
governorate_id: number;
|
||||
district_id: number;
|
||||
sub_district_id: number;
|
||||
neighborhood_id: number;
|
||||
}>;
|
||||
upsertPlace(data: Partial<BasePlace>): Promise<{
|
||||
id: any;
|
||||
action: string;
|
||||
}>;
|
||||
upsertBatch(places: Partial<BasePlace>[]): Promise<{
|
||||
total: number;
|
||||
processed: number;
|
||||
created: number;
|
||||
updated: number;
|
||||
}>;
|
||||
getRecentPlaces(limit?: number): Promise<(PlaceSyria | PlaceJordan | PlaceEgypt)[]>;
|
||||
getAllPlacesGeoJSON(): Promise<{
|
||||
type: string;
|
||||
features: any;
|
||||
}>;
|
||||
deletePlacesByName(name: string, country: string): Promise<{
|
||||
success: boolean;
|
||||
affected: number;
|
||||
}>;
|
||||
deletePlaceById(id: number, country: string): Promise<{
|
||||
success: boolean;
|
||||
affected: number | null | undefined;
|
||||
}>;
|
||||
private getRepoByCountry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user