imporve features
This commit is contained in:
@@ -13,7 +13,7 @@ import type {
|
||||
POICacheStats
|
||||
} from '@/types/poi';
|
||||
|
||||
const POI_BASE_URL = '/poi-context';
|
||||
const POI_BASE_URL = '/tenants';
|
||||
|
||||
export const poiContextApi = {
|
||||
/**
|
||||
@@ -26,7 +26,7 @@ export const poiContextApi = {
|
||||
forceRefresh: boolean = false
|
||||
): Promise<POIDetectionResponse> {
|
||||
const response = await apiClient.post<POIDetectionResponse>(
|
||||
`${POI_BASE_URL}/${tenantId}/detect`,
|
||||
`/tenants/${tenantId}/external/poi-context/detect`,
|
||||
null,
|
||||
{
|
||||
params: {
|
||||
@@ -44,7 +44,7 @@ export const poiContextApi = {
|
||||
*/
|
||||
async getPOIContext(tenantId: string): Promise<POIContextResponse> {
|
||||
const response = await apiClient.get<POIContextResponse>(
|
||||
`${POI_BASE_URL}/${tenantId}`
|
||||
`/tenants/${tenantId}/external/poi-context`
|
||||
);
|
||||
return response;
|
||||
},
|
||||
@@ -54,7 +54,7 @@ export const poiContextApi = {
|
||||
*/
|
||||
async refreshPOIContext(tenantId: string): Promise<POIDetectionResponse> {
|
||||
const response = await apiClient.post<POIDetectionResponse>(
|
||||
`${POI_BASE_URL}/${tenantId}/refresh`
|
||||
`/tenants/${tenantId}/external/poi-context/refresh`
|
||||
);
|
||||
return response;
|
||||
},
|
||||
@@ -63,7 +63,7 @@ export const poiContextApi = {
|
||||
* Delete POI context for a tenant
|
||||
*/
|
||||
async deletePOIContext(tenantId: string): Promise<void> {
|
||||
await apiClient.delete(`${POI_BASE_URL}/${tenantId}`);
|
||||
await apiClient.delete(`/tenants/${tenantId}/external/poi-context`);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -71,7 +71,7 @@ export const poiContextApi = {
|
||||
*/
|
||||
async getFeatureImportance(tenantId: string): Promise<FeatureImportanceResponse> {
|
||||
const response = await apiClient.get<FeatureImportanceResponse>(
|
||||
`${POI_BASE_URL}/${tenantId}/feature-importance`
|
||||
`/tenants/${tenantId}/external/poi-context/feature-importance`
|
||||
);
|
||||
return response;
|
||||
},
|
||||
@@ -86,24 +86,24 @@ export const poiContextApi = {
|
||||
insights: string[];
|
||||
}> {
|
||||
const response = await apiClient.get(
|
||||
`${POI_BASE_URL}/${tenantId}/competitor-analysis`
|
||||
`/tenants/${tenantId}/external/poi-context/competitor-analysis`
|
||||
);
|
||||
return response;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check POI service health
|
||||
* Check POI service health (system level)
|
||||
*/
|
||||
async checkHealth(): Promise<{ status: string; overpass_api: any }> {
|
||||
const response = await apiClient.get(`${POI_BASE_URL}/health`);
|
||||
const response = await apiClient.get(`/health/poi-context`);
|
||||
return response;
|
||||
},
|
||||
|
||||
/**
|
||||
* Get cache statistics
|
||||
* Get cache statistics (system level)
|
||||
*/
|
||||
async getCacheStats(): Promise<{ status: string; cache_stats: POICacheStats }> {
|
||||
const response = await apiClient.get(`${POI_BASE_URL}/cache/stats`);
|
||||
const response = await apiClient.get(`/cache/poi-context/stats`);
|
||||
return response;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user