added some feature for plugin

This commit is contained in:
2026-09-08 18:00:56 +03:30
parent 67a03d9593
commit 58744d0f91
7 changed files with 147 additions and 7 deletions
+7 -2
View File
@@ -21,6 +21,7 @@ import { PrismaService } from '../prisma/prisma.service';
import { AuditService } from '../audit/audit.service';
import { AdminNotifyService } from '../notifications/admin-notify.service';
import { CentralSmsService } from '../notifications/central-sms.service';
import { RuntimeSettingsService } from '../notifications/runtime-settings.service';
import { ProgramSettingsService } from '../program-settings/program-settings.service';
import { PLUGIN_STORE_SETTING_KEY } from '../program-settings/runtime-setting-keys';
import { DEPLOY_SETTING_CATALOG_KEYS } from '../program-settings/deploy-setting-catalog-keys';
@@ -59,6 +60,7 @@ export class PluginStoreService implements OnModuleInit, OnModuleDestroy {
private readonly sms: CentralSmsService,
private readonly programSettings: ProgramSettingsService,
private readonly config: ConfigService,
private readonly runtime: RuntimeSettingsService,
) {}
onModuleInit() {
@@ -558,11 +560,14 @@ export class PluginStoreService implements OnModuleInit, OnModuleDestroy {
async remoteListRequests(tenantId: string, product: string) {
await this.assertRemoteKhanegi(tenantId, product);
try {
return await this.buildRemoteRequestRows(tenantId);
return {
requests: await this.buildRemoteRequestRows(tenantId),
deposit: this.runtime.pluginStoreDeposit(),
};
} catch (error: any) {
if (error instanceof ForbiddenException) throw error;
this.logger.warn(`remoteListRequests skipped: ${error?.message || error}`);
return [];
return { requests: [], deposit: this.runtime.pluginStoreDeposit() };
}
}