changemaker.lite/api/dist/modules/map/cuts/cuts.service.d.ts

172 lines
5.5 KiB
TypeScript

import { Prisma } from '@prisma/client';
import type { CreateCutInput, UpdateCutInput, ListCutsInput } from './cuts.schemas';
export declare const cutsService: {
findAll(filters: ListCutsInput): Promise<{
cuts: {
id: string;
name: string;
createdAt: Date;
updatedAt: Date;
category: import(".prisma/client").$Enums.CutCategory | null;
description: string | null;
createdByUserId: string | null;
color: string;
opacity: Prisma.Decimal;
isPublic: boolean;
isOfficial: boolean;
geojson: string;
bounds: string | null;
showLocations: boolean;
exportEnabled: boolean;
assignedTo: string | null;
filterSettings: Prisma.JsonValue | null;
lastCanvassed: Date | null;
completionPercentage: number;
}[];
pagination: {
page: number;
limit: number;
total: number;
totalPages: number;
};
}>;
findById(id: string): Promise<{
id: string;
name: string;
createdAt: Date;
updatedAt: Date;
category: import(".prisma/client").$Enums.CutCategory | null;
description: string | null;
createdByUserId: string | null;
color: string;
opacity: Prisma.Decimal;
isPublic: boolean;
isOfficial: boolean;
geojson: string;
bounds: string | null;
showLocations: boolean;
exportEnabled: boolean;
assignedTo: string | null;
filterSettings: Prisma.JsonValue | null;
lastCanvassed: Date | null;
completionPercentage: number;
}>;
create(data: CreateCutInput, userId: string): Promise<{
id: string;
name: string;
createdAt: Date;
updatedAt: Date;
category: import(".prisma/client").$Enums.CutCategory | null;
description: string | null;
createdByUserId: string | null;
color: string;
opacity: Prisma.Decimal;
isPublic: boolean;
isOfficial: boolean;
geojson: string;
bounds: string | null;
showLocations: boolean;
exportEnabled: boolean;
assignedTo: string | null;
filterSettings: Prisma.JsonValue | null;
lastCanvassed: Date | null;
completionPercentage: number;
}>;
update(id: string, data: UpdateCutInput): Promise<{
id: string;
name: string;
createdAt: Date;
updatedAt: Date;
category: import(".prisma/client").$Enums.CutCategory | null;
description: string | null;
createdByUserId: string | null;
color: string;
opacity: Prisma.Decimal;
isPublic: boolean;
isOfficial: boolean;
geojson: string;
bounds: string | null;
showLocations: boolean;
exportEnabled: boolean;
assignedTo: string | null;
filterSettings: Prisma.JsonValue | null;
lastCanvassed: Date | null;
completionPercentage: number;
}>;
delete(id: string): Promise<void>;
getPublicCuts(): Promise<{
id: string;
name: string;
category: import(".prisma/client").$Enums.CutCategory | null;
description: string | null;
color: string;
opacity: Prisma.Decimal;
geojson: string;
bounds: string | null;
}[]>;
getLocationsInCut(id: string): Promise<{
id: string;
createdAt: Date;
updatedAt: Date;
latitude: Prisma.Decimal;
longitude: Prisma.Decimal;
address: string;
createdByUserId: string | null;
postalCode: string | null;
province: string | null;
federalDistrict: string | null;
buildingUse: number | null;
locGuid: string | null;
buildingType: import(".prisma/client").$Enums.BuildingType;
totalUnits: number;
buildingNotes: string | null;
geocodeConfidence: number | null;
geocodeProvider: import(".prisma/client").$Enums.GeocodeProvider | null;
updatedByUserId: string | null;
}[]>;
exportSingleGeoJson(id: string): Promise<{
type: "Feature";
properties: {
name: string;
description: string | null;
color: string;
'fill-opacity': number;
fill: string;
category: import(".prisma/client").$Enums.CutCategory | null;
isPublic: boolean;
isOfficial: boolean;
assignedTo: string | null;
};
geometry: any;
}>;
exportAllGeoJson(): Promise<{
type: "FeatureCollection";
features: {
type: "Feature";
properties: {
name: string;
description: string | null;
color: string;
'fill-opacity': number;
fill: string;
category: import(".prisma/client").$Enums.CutCategory | null;
isPublic: boolean;
isOfficial: boolean;
assignedTo: string | null;
};
geometry: any;
}[];
}>;
importGeoJson(buffer: Buffer, userId: string): Promise<{
total: number;
success: number;
failed: number;
errors: string[];
}>;
getStatistics(id: string): Promise<{
total: number;
byLevel: Record<string, number>;
withSign: number;
}>;
};
//# sourceMappingURL=cuts.service.d.ts.map