feat: add tagging alerts and sorting on tags

This commit is contained in:
2025-08-19 08:03:44 +05:30
parent 17a63f67a5
commit caea0e60e6
20 changed files with 260 additions and 49 deletions

View File

@@ -1,33 +1,18 @@
import { orgModel } from "./organization/organization.schema";
import { userModel } from "./user/user.schema";
import { permitModel } from "./permit/permit.schema";
import { processedModel } from "./processed/processed.schema";
import { notificationModel } from "./notification/notification.schema";
import { rtsModel } from "./rts/rts.schema";
import { taskModel } from "./task/task.schema";
import { AuthenticatedUser } from "./auth";
import { paymentModel } from "./payments/payment.schema";
import { modelMap } from "./utils/tags";
type Collection =
| "users"
| "permits"
| "organizations"
| "orgs"
| "processed"
| "notifications"
| "rts"
| "task"
| "payment";
const modelMap = {
users: userModel,
permits: permitModel,
organizations: orgModel,
processed: processedModel,
notifications: notificationModel,
rts: rtsModel,
task: taskModel,
payment: paymentModel,
};
| "tasks"
| "ctasks"
| "payments";
export async function getUniqueFields(
field: string,