Upgrade system finished
This commit is contained in:
@@ -1 +1 @@
|
||||
{"version":3,"file":"cuts.routes.d.ts","sourceRoot":"","sources":["../../../../src/modules/map/cuts/cuts.routes.ts"],"names":[],"mappings":"AAwBA,QAAA,MAAM,WAAW,4CAAW,CAAC;AAyJ7B,QAAA,MAAM,YAAY,4CAAW,CAAC;AAe9B,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,YAAY,IAAI,gBAAgB,EAAE,CAAC"}
|
||||
{"version":3,"file":"cuts.routes.d.ts","sourceRoot":"","sources":["../../../../src/modules/map/cuts/cuts.routes.ts"],"names":[],"mappings":"AAsBA,QAAA,MAAM,WAAW,4CAAW,CAAC;AAyJ7B,QAAA,MAAM,YAAY,4CAAW,CAAC;AAe9B,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,YAAY,IAAI,gBAAgB,EAAE,CAAC"}
|
||||
5
api/dist/modules/map/cuts/cuts.routes.js
vendored
5
api/dist/modules/map/cuts/cuts.routes.js
vendored
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cutsPublicRouter = exports.cutsAdminRouter = void 0;
|
||||
const express_1 = require("express");
|
||||
const client_1 = require("@prisma/client");
|
||||
const multer_1 = __importDefault(require("multer"));
|
||||
const cuts_service_1 = require("./cuts.service");
|
||||
const cuts_schemas_1 = require("./cuts.schemas");
|
||||
const validate_1 = require("../../../middleware/validate");
|
||||
const auth_middleware_1 = require("../../../middleware/auth.middleware");
|
||||
const rbac_middleware_1 = require("../../../middleware/rbac.middleware");
|
||||
const roles_1 = require("../../../utils/roles");
|
||||
const geojsonUpload = (0, multer_1.default)({
|
||||
storage: multer_1.default.memoryStorage(),
|
||||
limits: { fileSize: 10 * 1024 * 1024 },
|
||||
@@ -24,12 +24,11 @@ const geojsonUpload = (0, multer_1.default)({
|
||||
}
|
||||
},
|
||||
});
|
||||
const MAP_ADMIN_ROLES = [client_1.UserRole.SUPER_ADMIN, client_1.UserRole.MAP_ADMIN];
|
||||
// --- Admin Router ---
|
||||
const adminRouter = (0, express_1.Router)();
|
||||
exports.cutsAdminRouter = adminRouter;
|
||||
adminRouter.use(auth_middleware_1.authenticate);
|
||||
adminRouter.use((0, rbac_middleware_1.requireRole)(...MAP_ADMIN_ROLES));
|
||||
adminRouter.use((0, rbac_middleware_1.requireRole)(...roles_1.MAP_ROLES));
|
||||
// GET /api/map/cuts — list paginated
|
||||
adminRouter.get('/', (0, validate_1.validate)(cuts_schemas_1.listCutsSchema, 'query'), async (req, res, next) => {
|
||||
try {
|
||||
|
||||
2
api/dist/modules/map/cuts/cuts.routes.js.map
vendored
2
api/dist/modules/map/cuts/cuts.routes.js.map
vendored
File diff suppressed because one or more lines are too long
10
api/dist/modules/map/cuts/cuts.schemas.d.ts
vendored
10
api/dist/modules/map/cuts/cuts.schemas.d.ts
vendored
@@ -19,9 +19,9 @@ export declare const createCutSchema: z.ZodObject<{
|
||||
assignedTo: z.ZodOptional<z.ZodString>;
|
||||
}, "strip", z.ZodTypeAny, {
|
||||
name: string;
|
||||
isPublic: boolean;
|
||||
color: string;
|
||||
opacity: number;
|
||||
isPublic: boolean;
|
||||
isOfficial: boolean;
|
||||
geojson: string;
|
||||
showLocations: boolean;
|
||||
@@ -35,9 +35,9 @@ export declare const createCutSchema: z.ZodObject<{
|
||||
geojson: string;
|
||||
category?: "CUSTOM" | "WARD" | "NEIGHBORHOOD" | "DISTRICT" | undefined;
|
||||
description?: string | undefined;
|
||||
isPublic?: boolean | undefined;
|
||||
color?: string | undefined;
|
||||
opacity?: number | undefined;
|
||||
isPublic?: boolean | undefined;
|
||||
isOfficial?: boolean | undefined;
|
||||
bounds?: string | undefined;
|
||||
showLocations?: boolean | undefined;
|
||||
@@ -68,9 +68,9 @@ export declare const updateCutSchema: z.ZodObject<{
|
||||
name?: string | undefined;
|
||||
category?: "CUSTOM" | "WARD" | "NEIGHBORHOOD" | "DISTRICT" | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
isPublic?: boolean | undefined;
|
||||
color?: string | undefined;
|
||||
opacity?: number | undefined;
|
||||
isPublic?: boolean | undefined;
|
||||
isOfficial?: boolean | undefined;
|
||||
geojson?: string | undefined;
|
||||
bounds?: string | null | undefined;
|
||||
@@ -83,9 +83,9 @@ export declare const updateCutSchema: z.ZodObject<{
|
||||
name?: string | undefined;
|
||||
category?: "CUSTOM" | "WARD" | "NEIGHBORHOOD" | "DISTRICT" | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
isPublic?: boolean | undefined;
|
||||
color?: string | undefined;
|
||||
opacity?: number | undefined;
|
||||
isPublic?: boolean | undefined;
|
||||
isOfficial?: boolean | undefined;
|
||||
geojson?: string | undefined;
|
||||
bounds?: string | null | undefined;
|
||||
@@ -112,8 +112,8 @@ export declare const listCutsSchema: z.ZodObject<{
|
||||
category?: "CUSTOM" | "WARD" | "NEIGHBORHOOD" | "DISTRICT" | undefined;
|
||||
}, {
|
||||
search?: string | undefined;
|
||||
limit?: number | undefined;
|
||||
category?: "CUSTOM" | "WARD" | "NEIGHBORHOOD" | "DISTRICT" | undefined;
|
||||
limit?: number | undefined;
|
||||
page?: number | undefined;
|
||||
}>;
|
||||
export type CreateCutInput = z.infer<typeof createCutSchema>;
|
||||
|
||||
12
api/dist/modules/map/cuts/cuts.service.d.ts
vendored
12
api/dist/modules/map/cuts/cuts.service.d.ts
vendored
@@ -9,10 +9,10 @@ export declare const cutsService: {
|
||||
updatedAt: Date;
|
||||
category: import(".prisma/client").$Enums.CutCategory | null;
|
||||
description: string | null;
|
||||
isPublic: boolean;
|
||||
createdByUserId: string | null;
|
||||
color: string;
|
||||
opacity: Prisma.Decimal;
|
||||
isPublic: boolean;
|
||||
isOfficial: boolean;
|
||||
geojson: string;
|
||||
bounds: string | null;
|
||||
@@ -37,10 +37,10 @@ export declare const cutsService: {
|
||||
updatedAt: Date;
|
||||
category: import(".prisma/client").$Enums.CutCategory | null;
|
||||
description: string | null;
|
||||
isPublic: boolean;
|
||||
createdByUserId: string | null;
|
||||
color: string;
|
||||
opacity: Prisma.Decimal;
|
||||
isPublic: boolean;
|
||||
isOfficial: boolean;
|
||||
geojson: string;
|
||||
bounds: string | null;
|
||||
@@ -58,10 +58,10 @@ export declare const cutsService: {
|
||||
updatedAt: Date;
|
||||
category: import(".prisma/client").$Enums.CutCategory | null;
|
||||
description: string | null;
|
||||
isPublic: boolean;
|
||||
createdByUserId: string | null;
|
||||
color: string;
|
||||
opacity: Prisma.Decimal;
|
||||
isPublic: boolean;
|
||||
isOfficial: boolean;
|
||||
geojson: string;
|
||||
bounds: string | null;
|
||||
@@ -79,10 +79,10 @@ export declare const cutsService: {
|
||||
updatedAt: Date;
|
||||
category: import(".prisma/client").$Enums.CutCategory | null;
|
||||
description: string | null;
|
||||
isPublic: boolean;
|
||||
createdByUserId: string | null;
|
||||
color: string;
|
||||
opacity: Prisma.Decimal;
|
||||
isPublic: boolean;
|
||||
isOfficial: boolean;
|
||||
geojson: string;
|
||||
bounds: string | null;
|
||||
@@ -110,8 +110,9 @@ export declare const cutsService: {
|
||||
updatedAt: Date;
|
||||
latitude: Prisma.Decimal;
|
||||
longitude: Prisma.Decimal;
|
||||
address: string;
|
||||
createdByUserId: string | null;
|
||||
updatedByUserId: string | null;
|
||||
address: string;
|
||||
postalCode: string | null;
|
||||
province: string | null;
|
||||
federalDistrict: string | null;
|
||||
@@ -122,7 +123,6 @@ export declare const cutsService: {
|
||||
buildingNotes: string | null;
|
||||
geocodeConfidence: number | null;
|
||||
geocodeProvider: import(".prisma/client").$Enums.GeocodeProvider | null;
|
||||
updatedByUserId: string | null;
|
||||
}[]>;
|
||||
exportSingleGeoJson(id: string): Promise<{
|
||||
type: "Feature";
|
||||
|
||||
Reference in New Issue
Block a user