Add TejaratNo notifier review and submission validation

This commit is contained in:
SepehrYahyaee
2026-10-10 12:51:11 +03:30
parent a410655faa
commit 8f568f379c
14 changed files with 588 additions and 34 deletions
+8
View File
@@ -1,3 +1,4 @@
import { tejaratNotifierLookup } from "src/fanavaran/tejarat-notifier";
import {
BadRequestException,
Injectable,
@@ -125,6 +126,13 @@ export class LookupsService implements OnModuleInit, OnModuleDestroy {
async getClientRemoteLookup(lookupName: string): Promise<unknown> {
const clientKey = this.activeClientKey();
const notifier = tejaratNotifierLookup(lookupName);
if (notifier) {
if (clientKey !== "tejaratno") {
throw new BadRequestException("Notifier lookups apply only to TejaratNo.");
}
return notifier;
}
const definition = this.findRemoteLookup(lookupName);
// Parsian: file → lookups collection → Fanavaran (default inside FanavaranLookupService)