@solidstarters/solid-core 1.2.158 → 1.2.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/factories/whatsapp.factory.d.ts.map +1 -1
- package/dist/factories/whatsapp.factory.js +1 -1
- package/dist/factories/whatsapp.factory.js.map +1 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +13 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/model-metadata-helper.service.d.ts +5 -1
- package/dist/helpers/model-metadata-helper.service.d.ts.map +1 -1
- package/dist/helpers/model-metadata-helper.service.js +32 -2
- package/dist/helpers/model-metadata-helper.service.js.map +1 -1
- package/dist/helpers/string.helper.d.ts +2 -0
- package/dist/helpers/string.helper.d.ts.map +1 -0
- package/dist/helpers/string.helper.js +10 -0
- package/dist/helpers/string.helper.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/repository/security-rule.repository.d.ts.map +1 -1
- package/dist/repository/security-rule.repository.js +16 -9
- package/dist/repository/security-rule.repository.js.map +1 -1
- package/dist/repository/user.repository.d.ts +12 -0
- package/dist/repository/user.repository.d.ts.map +1 -0
- package/dist/repository/user.repository.js +34 -0
- package/dist/repository/user.repository.js.map +1 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts +12 -12
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +31 -13
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +40 -6
- package/dist/services/chatter-message.service.d.ts +8 -2
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +155 -30
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud-helper.service.d.ts +7 -3
- package/dist/services/crud-helper.service.d.ts.map +1 -1
- package/dist/services/crud-helper.service.js +17 -5
- package/dist/services/crud-helper.service.js.map +1 -1
- package/dist/services/user.service.d.ts +3 -2
- package/dist/services/user.service.d.ts.map +1 -1
- package/dist/services/user.service.js +2 -2
- package/dist/services/user.service.js.map +1 -1
- package/dist/services/view-metadata.service.d.ts +3 -1
- package/dist/services/view-metadata.service.d.ts.map +1 -1
- package/dist/services/view-metadata.service.js +5 -2
- package/dist/services/view-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +2 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist/subscribers/audit.subscriber.d.ts +3 -1
- package/dist/subscribers/audit.subscriber.d.ts.map +1 -1
- package/dist/subscribers/audit.subscriber.js +10 -5
- package/dist/subscribers/audit.subscriber.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/factories/whatsapp.factory.ts +2 -1
- package/src/helpers/index.ts +9 -0
- package/src/helpers/model-metadata-helper.service.ts +30 -2
- package/src/helpers/string.helper.ts +4 -0
- package/src/index.ts +1 -0
- package/src/repository/security-rule.repository.ts +25 -12
- package/src/repository/user.repository.ts +17 -0
- package/src/seeders/module-metadata-seeder.service.ts +34 -15
- package/src/seeders/seed-data/solid-core-metadata.json +40 -6
- package/src/services/chatter-message.service.ts +185 -35
- package/src/services/crud-helper.service.ts +24 -6
- package/src/services/user.service.ts +3 -2
- package/src/services/view-metadata.service.ts +3 -1
- package/src/solid-core.module.ts +3 -0
- package/src/subscribers/audit.subscriber.ts +9 -3
|
@@ -82,6 +82,7 @@ const list_of_values_service_1 = require("../services/list-of-values.service");
|
|
|
82
82
|
const system_fields_seeder_service_1 = require("./system-fields-seeder.service");
|
|
83
83
|
const dashboard_repository_1 = require("../repository/dashboard.repository");
|
|
84
84
|
const scheduled_job_repository_1 = require("../repository/scheduled-job.repository");
|
|
85
|
+
const helpers_1 = require("../helpers");
|
|
85
86
|
let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMetadataSeederService {
|
|
86
87
|
constructor(moduleMetadataService, modelMetadataService, fieldMetadataService, mediaStorageProviderMetadataService, roleService, userService, authenticationService, solidActionService, solidMenuItemService, solidViewService, mediaStorageProviderSeederService, emailTemplateService, smsTemplateService, listOfValuesService, permissionRepo, solidRegistry, appBuilderConfiguration, iamConfiguration, commonConfiguration, seetingService, settingsRepo, securityRuleRepo, systemFieldsSeederService, dashboardRepo, scheduledJobRepository) {
|
|
87
88
|
this.moduleMetadataService = moduleMetadataService;
|
|
@@ -138,7 +139,7 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
138
139
|
this.logger.debug(`Seed data files are: ${seedDataFiles}`);
|
|
139
140
|
let usersDetail;
|
|
140
141
|
for (let i = 0; i < seedDataFiles.length; i++) {
|
|
141
|
-
const overallMetadata = seedDataFiles[i];
|
|
142
|
+
const overallMetadata = (0, helpers_1.deepFreeze)(seedDataFiles[i]);
|
|
142
143
|
const moduleMetadata = overallMetadata.moduleMetadata;
|
|
143
144
|
this.logger.log(`[Start] Processing module metadata for ${moduleMetadata.name}`);
|
|
144
145
|
await this.seedModuleModelFields(moduleMetadata);
|
|
@@ -270,13 +271,19 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
273
|
}
|
|
273
|
-
async seedMediaStorageProviders(
|
|
274
|
+
async seedMediaStorageProviders(_mediaStorageProviders) {
|
|
275
|
+
const mediaStorageProviders = structuredClone(_mediaStorageProviders);
|
|
276
|
+
if (!mediaStorageProviders) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
274
279
|
for (let i = 0; i < mediaStorageProviders.length; i++) {
|
|
275
280
|
const mediaStorageProivder = mediaStorageProviders[i];
|
|
276
281
|
await this.mediaStorageProviderMetadataService.upsert(mediaStorageProivder);
|
|
277
282
|
}
|
|
278
283
|
}
|
|
279
|
-
async seedEmailTemplates(
|
|
284
|
+
async seedEmailTemplates(_emailTemplates, _moduleMetadata) {
|
|
285
|
+
const emailTemplates = structuredClone(_emailTemplates);
|
|
286
|
+
const moduleMetadata = structuredClone(_moduleMetadata);
|
|
280
287
|
if (!emailTemplates) {
|
|
281
288
|
return;
|
|
282
289
|
}
|
|
@@ -304,7 +311,9 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
304
311
|
await this.emailTemplateService.create(emailTemplate);
|
|
305
312
|
}
|
|
306
313
|
}
|
|
307
|
-
async seedSmsTemplates(
|
|
314
|
+
async seedSmsTemplates(_smsTemplates, _moduleMetadata) {
|
|
315
|
+
const smsTemplates = structuredClone(_smsTemplates);
|
|
316
|
+
const moduleMetadata = structuredClone(_moduleMetadata);
|
|
308
317
|
if (!smsTemplates) {
|
|
309
318
|
return;
|
|
310
319
|
}
|
|
@@ -363,7 +372,8 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
363
372
|
await this.solidMenuItemService.upsert(menuData);
|
|
364
373
|
}
|
|
365
374
|
}
|
|
366
|
-
async seedActions(
|
|
375
|
+
async seedActions(_actions) {
|
|
376
|
+
const actions = structuredClone(_actions);
|
|
367
377
|
if (!actions) {
|
|
368
378
|
return;
|
|
369
379
|
}
|
|
@@ -382,7 +392,8 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
382
392
|
await this.solidActionService.upsert(actionData);
|
|
383
393
|
}
|
|
384
394
|
}
|
|
385
|
-
async seedViews(
|
|
395
|
+
async seedViews(_views) {
|
|
396
|
+
const views = structuredClone(_views);
|
|
386
397
|
if (!views) {
|
|
387
398
|
return;
|
|
388
399
|
}
|
|
@@ -394,7 +405,8 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
394
405
|
await this.solidViewService.upsert(viewData);
|
|
395
406
|
}
|
|
396
407
|
}
|
|
397
|
-
async seedUsers(
|
|
408
|
+
async seedUsers(_users) {
|
|
409
|
+
const users = structuredClone(_users);
|
|
398
410
|
if (!users) {
|
|
399
411
|
return;
|
|
400
412
|
}
|
|
@@ -407,7 +419,8 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
407
419
|
}
|
|
408
420
|
}
|
|
409
421
|
}
|
|
410
|
-
async seedModuleModelFields(
|
|
422
|
+
async seedModuleModelFields(_moduleMetadata) {
|
|
423
|
+
const moduleMetadata = structuredClone(_moduleMetadata);
|
|
411
424
|
const module = await this.moduleMetadataService.upsert(moduleMetadata);
|
|
412
425
|
const modelsMetadata = moduleMetadata.models;
|
|
413
426
|
for (let j = 0; j < modelsMetadata.length; j++) {
|
|
@@ -440,13 +453,15 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
440
453
|
}
|
|
441
454
|
}
|
|
442
455
|
}
|
|
443
|
-
async seedSettings(
|
|
456
|
+
async seedSettings(_createDto) {
|
|
457
|
+
const createDto = structuredClone(_createDto);
|
|
444
458
|
const settingsArray = await this.settingsRepo.find();
|
|
445
459
|
if (!settingsArray || settingsArray.length === 0) {
|
|
446
460
|
this.seetingService.create(createDto);
|
|
447
461
|
}
|
|
448
462
|
}
|
|
449
|
-
async seedSecurityRules(
|
|
463
|
+
async seedSecurityRules(_rulesDto) {
|
|
464
|
+
const rulesDto = structuredClone(_rulesDto);
|
|
450
465
|
if (!rulesDto || rulesDto.length === 0) {
|
|
451
466
|
this.logger.debug(`No security rules found to seed`);
|
|
452
467
|
return;
|
|
@@ -455,7 +470,8 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
455
470
|
await this.securityRuleRepo.upsertWithDto({ ...dto, securityRuleConfig: JSON.stringify(dto.securityRuleConfig) });
|
|
456
471
|
}
|
|
457
472
|
}
|
|
458
|
-
async seedListOfValues(
|
|
473
|
+
async seedListOfValues(_listOfValuesDto) {
|
|
474
|
+
const listOfValuesDto = structuredClone(_listOfValuesDto);
|
|
459
475
|
if (!listOfValuesDto || listOfValuesDto.length === 0) {
|
|
460
476
|
this.logger.debug(`No List Of Values found to seed`);
|
|
461
477
|
return;
|
|
@@ -466,7 +482,8 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
466
482
|
await this.listOfValuesService.upsert(listOfValuesDto[j]);
|
|
467
483
|
}
|
|
468
484
|
}
|
|
469
|
-
async seedDashboards(
|
|
485
|
+
async seedDashboards(_dashboardDtos) {
|
|
486
|
+
const dashboardDtos = structuredClone(_dashboardDtos);
|
|
470
487
|
if (!dashboardDtos || dashboardDtos.length === 0) {
|
|
471
488
|
this.logger.debug(`No dashboards found to seed`);
|
|
472
489
|
return;
|
|
@@ -475,7 +492,8 @@ let ModuleMetadataSeederService = ModuleMetadataSeederService_1 = class ModuleMe
|
|
|
475
492
|
await this.dashboardRepo.upsertWithDto(dto);
|
|
476
493
|
}
|
|
477
494
|
}
|
|
478
|
-
async seedScheduledJobs(
|
|
495
|
+
async seedScheduledJobs(_createScheduledJobDto) {
|
|
496
|
+
const createScheduledJobDto = structuredClone(_createScheduledJobDto);
|
|
479
497
|
if (!createScheduledJobDto || createScheduledJobDto.length === 0) {
|
|
480
498
|
this.logger.debug(`No scheduled jobs found to seed`);
|
|
481
499
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-metadata-seeder.service.js","sourceRoot":"","sources":["../../src/seeders/module-metadata-seeder.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4D;AAC5D,uCAAyB;AACzB,2CAA6B;AAE7B,sFAA4D;AAG5D,iFAA4E;AAE5E,+EAA0E;AAC1E,iHAA0G;AAC1G,+EAA0E;AAC1E,2DAAwD;AACxD,+EAA4E;AAC5E,+HAAuH;AAEvH,+EAA2E;AAC3E,2EAAuE;AAEvE,6EAAwE;AACxE,i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;IAED,KAAK,CAAC,iBAAiB,CAAC,qBAA8C;QAClE,IAAI,CAAC,qBAAqB,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;YACrD,OAAO;QACX,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,qBAAqB,EAAE,CAAC;YACtC,MAAM,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACzD,CAAC;IACL,CAAC;CAEJ,CAAA;AAtjBY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;IAmBJ,YAAA,IAAA,0BAAgB,EAAC,+CAAkB,CAAC,CAAA;IAGpC,YAAA,IAAA,eAAM,EAAC,4BAAgB,CAAC,GAAG,CAAC,CAAA;IAE5B,YAAA,IAAA,eAAM,EAAC,sBAAS,CAAC,GAAG,CAAC,CAAA;IACrB,YAAA,IAAA,eAAM,EAAC,uBAAY,CAAC,GAAG,CAAC,CAAA;IAGxB,YAAA,IAAA,0BAAgB,EAAC,wBAAO,EAAE,SAAS,CAAC,CAAA;qCAvBG,+CAAqB;QACtB,6CAAoB;QACpB,6CAAoB;QACL,6EAAmC;QAC3D,2CAAmB;QACnB,0BAAW;QACD,8CAAqB;QACxB,+CAAqB;QACnB,oDAAuB;QAC3B,2CAAmB;QACF,0FAAyC;QACtD,6CAAoB;QACtB,yCAAkB;QACjB,4CAAmB;QAExB,oBAAU;QACX,8BAAa,0BAMZ,gCAAc;QAExB,oBAAU;QACN,iDAAsB;QACb,wDAAyB;QACrC,0CAAmB;QACV,iDAAsB;GAhClD,2BAA2B,CAsjBvC","sourcesContent":["import { Inject, Injectable, Logger } from '@nestjs/common';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\nimport appBuilderConfig from '../config/app-builder.config';\nimport { ConfigType } from '@nestjs/config';\nimport { CreateModuleMetadataDto } from '../dtos/create-module-metadata.dto';\nimport { ModuleMetadataService } from '../services/module-metadata.service';\nimport { CreateModelMetadataDto } from '../dtos/create-model-metadata.dto';\nimport { ModelMetadataService } from '../services/model-metadata.service';\nimport { MediaStorageProviderMetadataService } from '../services/media-storage-provider-metadata.service';\nimport { FieldMetadataService } from '../services/field-metadata.service';\nimport { UserService } from 'src/services/user.service';\nimport { AuthenticationService } from 'src/services/authentication.service';\nimport { MediaStorageProviderMetadataSeederService } from '../services/media-storage-provider-metadata-seeder.service';\nimport { CreateEmailTemplateDto } from 'src/dtos/create-email-template.dto';\nimport { EmailTemplateService } from 'src/services/email-template.service';\nimport { SmsTemplateService } from 'src/services/sms-template.service';\nimport { CreateSmsTemplateDto } from 'src/dtos/create-sms-template.dto';\nimport { ViewMetadataService } from '../services/view-metadata.service';\nimport { ActionMetadataService } from '../services/action-metadata.service';\nimport { MenuItemMetadataService } from '../services/menu-item-metadata.service';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { PermissionMetadata } from '../entities/permission-metadata.entity';\nimport { Repository } from 'typeorm';\nimport { SolidRegistry } from '../helpers/solid-registry';\nimport { RoleMetadataService } from '../services/role-metadata.service';\nimport { getCoreModuleNames, getDynamicModuleNames } from '../helpers/module.helper';\nimport solidCoreMetadata from './seed-data/solid-core-metadata.json';\nimport { iamConfig } from 'src/config/iam.config';\nimport commonConfig from 'src/config/common.config';\nimport { CreateSettingDto } from 'src/dtos/create-setting.dto';\nimport { SettingService } from 'src/services/setting.service';\nimport { Setting } from 'src/entities/setting.entity';\nimport { CreateSecurityRuleDto } from 'src/dtos/create-security-rule.dto';\nimport { SecurityRuleRepository } from 'src/repository/security-rule.repository';\nimport { ListOfValuesService } from 'src/services/list-of-values.service';\nimport { CreateListOfValuesDto } from 'src/dtos/create-list-of-values.dto';\nimport { SystemFieldsSeederService } from './system-fields-seeder.service';\nimport { CreateDashboardDto } from 'src/dtos/create-dashboard.dto';\nimport { DashboardRepository } from 'src/repository/dashboard.repository';\n// import { CreateScheduledJobDto } from 'src/dtos/create-scheduled-job.dto';\nimport { ScheduledJobRepository } from 'src/repository/scheduled-job.repository';\nimport { CreateScheduledJobDto } from 'src/dtos/create-scheduled-job.dto';\n\n@Injectable()\nexport class ModuleMetadataSeederService {\n private readonly logger = new Logger(ModuleMetadataSeederService.name);\n\n constructor(\n private readonly moduleMetadataService: ModuleMetadataService,\n private readonly modelMetadataService: ModelMetadataService,\n private readonly fieldMetadataService: FieldMetadataService,\n private readonly mediaStorageProviderMetadataService: MediaStorageProviderMetadataService,\n private readonly roleService: RoleMetadataService,\n private readonly userService: UserService,\n private readonly authenticationService: AuthenticationService,\n private readonly solidActionService: ActionMetadataService,\n private readonly solidMenuItemService: MenuItemMetadataService,\n private readonly solidViewService: ViewMetadataService,\n private readonly mediaStorageProviderSeederService: MediaStorageProviderMetadataSeederService,\n private readonly emailTemplateService: EmailTemplateService,\n private readonly smsTemplateService: SmsTemplateService,\n private readonly listOfValuesService: ListOfValuesService,\n @InjectRepository(PermissionMetadata)\n private readonly permissionRepo: Repository<PermissionMetadata>,\n private readonly solidRegistry: SolidRegistry,\n @Inject(appBuilderConfig.KEY)\n private readonly appBuilderConfiguration: ConfigType<typeof appBuilderConfig>,\n @Inject(iamConfig.KEY) private readonly iamConfiguration: ConfigType<typeof iamConfig>,\n @Inject(commonConfig.KEY)\n private readonly commonConfiguration: ConfigType<typeof commonConfig>,\n private readonly seetingService: SettingService,\n @InjectRepository(Setting, 'default')\n readonly settingsRepo: Repository<Setting>,\n readonly securityRuleRepo: SecurityRuleRepository,\n readonly systemFieldsSeederService: SystemFieldsSeederService,\n readonly dashboardRepo: DashboardRepository,\n readonly scheduledJobRepository: ScheduledJobRepository,\n ) { }\n\n async seed() {\n\n const typedSolidCoreMetadata: any = structuredClone(solidCoreMetadata);\n\n // Run the permissions seeder. \n // await this.permissionsSeederService.seed();\n this.logger.log(`Seeding permissions`);\n await this.seedPermissions();\n\n // TODO: move this also the main loop processing. Generate the media storage providers required by default\n this.logger.log(`Seeding media storage providers`);\n await this.mediaStorageProviderSeederService.seed();\n\n // Seed any missing system fields metadata for all models.\n this.logger.log(`Seeding system fields metadata`);\n await this.systemFieldsSeederService.seed();\n\n // Read the module metadata from a file specified in the .env \n // Add the core json file as the first entry in the above array.\n // Please note the sequence of core files is important below...\n const coreModules = getCoreModuleNames();\n const seedDataFiles = [\n // 'src/common/seeders/seed-data/common-metadata.json',\n // 'src/iam/seeders/seed-data/iam-metadata.json',\n // 'src/app-builder/seeders/seed-data/app-builder-metadata.json',\n // 'src/queues/seeders/seed-data/queues-metadata.json',\n // ...coreModules.map(module => `src/${module}/seeders/seed-data/${module}-metadata.json`),\n typedSolidCoreMetadata\n ];\n this.logger.debug(`getting dynamics modules`);\n const enabledModules = getDynamicModuleNames();\n this.logger.log(`Seeding metadata`);\n\n for (let i = 0; i < enabledModules.length; i++) {\n const enabledModule = enabledModules[i];\n const enabledModuleSeedFile = `module-metadata/${enabledModule}/${enabledModule}-metadata.json`\n const fullPath = path.join(process.cwd(), enabledModuleSeedFile);\n if (fs.existsSync(fullPath)) {\n const overallMetadata: any = JSON.parse(fs.readFileSync(fullPath, 'utf-8').toString());\n\n seedDataFiles.push(overallMetadata)\n }\n }\n\n this.logger.debug(`Seed data files are: ${seedDataFiles}`);\n let usersDetail;\n for (let i = 0; i < seedDataFiles.length; i++) {\n\n // Module, model & field handling.\n const overallMetadata = seedDataFiles[i];\n // const fullPath = path.join(process.cwd(), seedDataFile);\n\n // For each module metadata seed file provided, read contents, parse & convert to a variable. \n // this.logger.log(`[Start] module seed data: ${fullPath}`);\n\n // const overallMetadata: any = JSON.parse(fs.readFileSync(fullPath, 'utf-8').toString());\n\n // Process module metadata first. \n const moduleMetadata: CreateModuleMetadataDto = overallMetadata.moduleMetadata;\n this.logger.log(`[Start] Processing module metadata for ${moduleMetadata.name}`)\n await this.seedModuleModelFields(moduleMetadata);\n this.logger.log(`[End] Processing module metadata for ${moduleMetadata.name}`)\n\n // Media Storage provider templates\n this.logger.log(`[Start] Processing Media Storage Provider for ${moduleMetadata.name}`);\n const mediaStorageProviders = overallMetadata.mediaStorageProviders;\n await this.seedMediaStorageProviders(mediaStorageProviders);\n this.logger.log(`[End] Processing Media Storage Provider for ${moduleMetadata.name}`);\n\n // Custom role handling\n this.logger.log(`[End] Processing roles for ${moduleMetadata.name}`)\n const roles = overallMetadata.roles;\n\n // Every role configuration in the seeder json can optionally have a permissions attribute. \n // While creating roles we are only passing the role name to be used. \n await this.roleService.createRolesIfNotExists(roles.map(role => { return { name: role.name } }));\n\n // After roles are created, we iterate over all roles and attach permissions (if specified in the seeder json) to the respective role.\n for (let roleI = 0; roleI < roles.length; roleI++) {\n const role = roles[roleI];\n if (role.permissions) {\n await this.roleService.addPermissionsToRole(role.name, role.permissions)\n }\n }\n this.logger.log(`[End] Processing roles for ${moduleMetadata.name}`)\n\n // Custom user handling\n this.logger.log(`[Start] Processing users for ${moduleMetadata.name}`);\n const users = overallMetadata.users;\n usersDetail = users;\n await this.seedUsers(users);\n this.logger.log(`[End] Processing users for ${moduleMetadata.name}`)\n\n // Application Module View handling \n this.logger.log(`[Start] Processing views for ${moduleMetadata.name}`);\n const views = overallMetadata.views;\n await this.seedViews(views);\n this.logger.log(`[End] Processing views for ${moduleMetadata.name}`)\n\n // Application Module Action handling\n this.logger.log(`[Start] Processing actions for ${moduleMetadata.name}`);\n const actions = overallMetadata.actions;\n await this.seedActions(actions);\n this.logger.log(`[End] Processing actions for ${moduleMetadata.name}`)\n\n // Application Module Menu handling \n this.logger.log(`[Start] Processing menus for ${moduleMetadata.name}`);\n const menus = overallMetadata.menus;\n await this.seedMenus(menus);\n this.logger.log(`[End] Processing menus for ${moduleMetadata.name}`)\n\n // Email templates \n this.logger.log(`[Start] Processing email templates for ${moduleMetadata.name}`);\n const emailTemplates: CreateEmailTemplateDto[] = overallMetadata.emailTemplates;\n await this.seedEmailTemplates(emailTemplates, moduleMetadata);\n this.logger.log(`[End] Processing email templates for ${moduleMetadata.name}`);\n\n // Sms templates\n this.logger.log(`[Start] Processing sms templates for ${moduleMetadata.name}`);\n const smsTemplates: CreateSmsTemplateDto[] = overallMetadata.smsTemplates;\n await this.seedSmsTemplates(smsTemplates, moduleMetadata);\n this.logger.log(`[End] Processing sms templates for ${moduleMetadata.name}`);\n\n // Settings\n this.logger.log(`[Start] Processing settings for ${moduleMetadata.name}`);\n await this.seetingService.seedDefaultSettings();\n this.logger.log(`[End] Processing settings for ${moduleMetadata.name}`);\n\n // Security rules\n this.logger.log(`[Start] Processing security rules for ${moduleMetadata.name}`);\n const securityRules: CreateSecurityRuleDto[] = overallMetadata.securityRules;\n await this.seedSecurityRules(securityRules);\n this.logger.log(`[End] Processing security rules for ${moduleMetadata.name}`);\n\n // List Of Values\n this.logger.log(`[Start] Processing List Of Values for ${moduleMetadata.name}`);\n const listOfValues: CreateListOfValuesDto[] = overallMetadata.listOfValues;\n await this.seedListOfValues(listOfValues);\n this.logger.log(`[End] Processing List Of Values for ${moduleMetadata.name}`);\n\n // Dashboards\n this.logger.log(`[Start] Processing dashboards for ${moduleMetadata.name}`);\n const dashboards: CreateDashboardDto[] = overallMetadata.dashboards;\n await this.seedDashboards(dashboards);\n this.logger.log(`[End] Processing dashboards for ${moduleMetadata.name}`);\n\n // Scheduled Jobs\n this.logger.debug(`[Start] Processing scheduled jobs for ${moduleMetadata.name}`);\n const scheduledJobs: CreateScheduledJobDto[] = overallMetadata.scheduledJobs;\n if (scheduledJobs?.length > 0) {\n await this.seedScheduledJobs(scheduledJobs);\n }\n this.logger.debug(`[End] Processing scheduled jobs for ${moduleMetadata.name}`);\n\n this.logger.debug(`[End] module seed data: ${overallMetadata}`);\n }\n\n // Post seed data file processing. \n\n // 1. Give all permissions to the Admin role.\n this.logger.log(`About to add all permissions to the Admin role`);\n await this.roleService.addAllPermissionsToRole(\"Admin\");\n // 2. Give wrapSettings permissions to the Public role.\n const internalRolePermission = [\n 'UserController.findMany',\n 'UserController.checkIfPermissionExists',\n 'UserController.findOne',\n 'MenuItemMetadataController.findMany',\n 'MenuItemMetadataController.findUserMenus',\n 'MenuItemMetadataController.findOne',\n 'ViewMetadataController.getLayout',\n 'ViewMetadataController.findMany',\n 'ViewMetadataController.findOne',\n 'AuthenticationController.changePassword',\n 'FieldMetadataController.getSelectionDynamicValues',\n 'FieldMetadataController.getSelectionDynamicValue',\n 'FieldMetadataController.findFieldDefaultMetaData',\n 'SavedFiltersController.delete',\n 'SavedFiltersController.deleteMany',\n 'SavedFiltersController.findOne',\n 'SavedFiltersController.findMany',\n 'SavedFiltersController.recover',\n 'SavedFiltersController.recoverMany',\n 'SavedFiltersController.partialUpdate',\n 'SavedFiltersController.update',\n 'SavedFiltersController.insertMany',\n 'SavedFiltersController.create',\n 'AuthenticationController.logout'\n ]\n await this.roleService.addPermissionToRole('Internal User', internalRolePermission);\n await this.roleService.addPermissionToRole('Public', ['SettingController.wrapSettings', 'AuthenticationController.logout']);\n this.logger.log(`All Seeders finished`);\n this.logger.log(`Newly created username is: ${usersDetail?.length > 0 ? usersDetail[0]?.username : ''} and password is ${usersDetail?.length > 0 ? usersDetail[0]?.password : ''}`);\n }\n\n\n async seedPermissions() {\n\n const controllers = this.solidRegistry.getControllers();\n\n // Loop over the countries and create them.\n for (let id = 0; id < controllers.length; id++) {\n try {\n const controller = controllers[id];\n this.logger.log(`Resolving controller: ${controller.name}`);\n\n const methods = controller.methods;\n for (let mId = 0; mId < methods.length; mId++) {\n\n const methodName = methods[mId];\n const permissionName = `${controller.name}.${methodName}`;\n\n const existingPermission = await this.permissionRepo.findOne({\n where: {\n name: permissionName\n }\n });\n\n if (existingPermission) {\n this.logger.log(`Permission ${permissionName} already exists.`);\n }\n else {\n this.logger.log(`Permission ${permissionName} does not exist, creating new.`);\n\n const newPermission = this.permissionRepo.create({\n name: permissionName\n });\n await this.permissionRepo.save(newPermission);\n\n }\n }\n\n } catch (error) {\n this.logger.error(error);\n }\n }\n }\n\n async seedMediaStorageProviders(mediaStorageProviders: any) {\n for (let i = 0; i < mediaStorageProviders.length; i++) {\n const mediaStorageProivder = mediaStorageProviders[i];\n await this.mediaStorageProviderMetadataService.upsert(mediaStorageProivder);\n }\n }\n\n async seedEmailTemplates(emailTemplates: CreateEmailTemplateDto[], moduleMetadata: CreateModuleMetadataDto) {\n if (!emailTemplates) {\n return;\n }\n\n for (let i = 0; i < emailTemplates.length; i++) {\n const emailTemplate = emailTemplates[i];\n this.logger.log(`Found ${emailTemplate.name} email template`);\n\n // We need to load the actual template contents. \n if (moduleMetadata.name === 'solid-core') {\n const modulePath = path.dirname(require.resolve('@solidstarters/solid-core'));\n const seedDataPath = path.join(modulePath, '../src/seeders/seed-data/email-templates');\n const filePath = path.join(seedDataPath, emailTemplate.body);\n this.logger.log(`Seeding email template from solid-core at path: ${filePath}`);\n if (fs.existsSync(filePath)) {\n emailTemplate.body = fs.readFileSync(filePath, 'utf-8').toString();\n }\n }\n else {\n // Check if file exists\n const emailTemplateHandlebar = `module-metadata/${moduleMetadata.name}/email-templates/${emailTemplate.body}`\n const fullPath = path.join(process.cwd(), emailTemplateHandlebar);\n this.logger.log(`Seeding custom email template from consuming model at path: ${fullPath}`);\n if (fs.existsSync(fullPath)) {\n emailTemplate.body = fs.readFileSync(fullPath, 'utf-8').toString();\n }\n }\n\n // Save to DB.\n await this.emailTemplateService.removeByName(emailTemplate.name);\n await this.emailTemplateService.create(emailTemplate);\n }\n\n }\n\n async seedSmsTemplates(smsTemplates: CreateSmsTemplateDto[], moduleMetadata: CreateModuleMetadataDto) {\n if (!smsTemplates) {\n return;\n }\n\n for (let i = 0; i < smsTemplates.length; i++) {\n const smsTemplate = smsTemplates[i];\n this.logger.log(`Found ${smsTemplate.name} sms template`);\n\n // We need to load the actual template contents. \n if (moduleMetadata.name === 'solid-core') {\n const modulePath = path.dirname(require.resolve('@solidstarters/solid-core'));\n const seedDataPath = path.join(modulePath, '../src/seeders/seed-data/sms-templates');\n const filePath = path.join(seedDataPath, smsTemplate.body);\n this.logger.log(`Seeding sms template from solid-core at path: ${filePath}`);\n if (fs.existsSync(filePath)) {\n smsTemplate.body = fs.readFileSync(filePath, 'utf-8').toString();\n }\n }\n else {\n // Check if file exists\n const emailTemplateHandlebar = `module-metadata/${moduleMetadata.name}/sms-templates/${smsTemplate.body}`\n const fullPath = path.join(process.cwd(), emailTemplateHandlebar);\n this.logger.log(`Seeding custom sms template from consuming model at path: ${fullPath}`);\n if (fs.existsSync(fullPath)) {\n smsTemplate.body = fs.readFileSync(fullPath, 'utf-8').toString();\n }\n }\n\n\n // Save to DB.\n await this.smsTemplateService.removeByName(smsTemplate.name);\n await this.smsTemplateService.create(smsTemplate);\n }\n }\n\n async seedMenus(menus: any) {\n if (!menus) {\n return;\n }\n\n for (let j = 0; j < menus.length; j++) {\n const menuData = menus[j];\n\n const adminRole = await this.roleService.findRoleByName('Admin');\n\n const specifiedRoles = menuData['roles'];\n\n // If the developer has specified roles, then resolve them, making sure that admin role is also given.\n const specifiedRoleObjects = [adminRole];\n if (specifiedRoles) {\n for (let i = 0; i < specifiedRoles.length; i++) {\n const specifiedRole = specifiedRoles[i];\n const specifiedRoleObject = await this.roleService.findRoleByName(specifiedRole);\n if (!specifiedRoleObject) {\n throw new Error(`Invalid role: (${specifiedRole}) specified against menu with display name ${menuData.displayName}.`);\n }\n specifiedRoleObjects.push(specifiedRoleObject);\n }\n }\n\n menuData['roles'] = specifiedRoleObjects;\n menuData['action'] = await this.solidActionService.findOneByUserKey(menuData.actionUserKey);\n menuData['module'] = await this.moduleMetadataService.findOneByUserKey(menuData.moduleUserKey);\n\n if (menuData.parentMenuItemUserKey) {\n menuData['parentMenuItem'] = await this.solidMenuItemService.findOneByUserKey(menuData.parentMenuItemUserKey);\n } else {\n menuData['parentMenuItem'] = null\n }\n await this.solidMenuItemService.upsert(menuData);\n }\n }\n\n async seedActions(actions: any) {\n if (!actions) {\n return;\n }\n\n for (let j = 0; j < actions.length; j++) {\n const actionData = actions[j];\n actionData['module'] = await this.moduleMetadataService.findOneByUserKey(actionData.moduleUserKey);\n if (actionData.type === 'solid') {\n actionData['model'] = await this.modelMetadataService.findOneByUserKey(actionData.modelUserKey);\n actionData['view'] = await this.solidViewService.findOneByUserKey(actionData.viewUserKey);\n }\n else {\n if (actionData.modelUserKey) {\n actionData['model'] = await this.modelMetadataService.findOneByUserKey(actionData.modelUserKey);\n }\n }\n await this.solidActionService.upsert(actionData);\n }\n }\n\n async seedViews(views: any) {\n if (!views) {\n return;\n }\n\n for (let j = 0; j < views.length; j++) {\n const viewData = views[j];\n\n // preety format the layout & context. \n viewData['layout'] = JSON.stringify(viewData['layout'], null, 2);\n // viewData['context'] = JSON.stringify(viewData['context'], null, 2);\n\n viewData['module'] = await this.moduleMetadataService.findOneByUserKey(viewData.moduleUserKey);\n viewData['model'] = await this.modelMetadataService.findOneByUserKey(viewData.modelUserKey);\n // await this.solidViewService.upsert(viewData);\n // First check if module already exists using name\n\n // Changed the below to upsert as now we are saving modifications to the view json to file system also.\n // await this.solidViewService.createIfNotPresent(viewData);\n await this.solidViewService.upsert(viewData);\n }\n }\n\n async seedUsers(users) {\n if (!users) {\n return;\n }\n\n for (let l = 0; l < users.length; l++) {\n const user = users[l];\n let exisitingUser = await this.userService.findOneByUsername(user.username);\n if (!exisitingUser) {\n exisitingUser = await this.authenticationService.signUp(user);\n\n this.logger.log(`Newly created user is ${user}`);\n }\n // now add Roles to user.\n // for (let m = 0; m < roles.length; m++) {\n // const role = roles[m];\n // await this.userService.addRoleToUser(user.email, role.name);\n // }\n }\n }\n\n async seedModuleModelFields(moduleMetadata: CreateModuleMetadataDto) {\n\n // First we create the module. \n // await this.moduleMetadataService.removeByName(moduleMetadata.name);\n // const module = await this.moduleMetadataService.create(moduleMetadata);\n const module = await this.moduleMetadataService.upsert(moduleMetadata);\n\n // Next create all the models. \n const modelsMetadata: CreateModelMetadataDto[] = moduleMetadata.models;\n for (let j = 0; j < modelsMetadata.length; j++) {\n const modelMetadata = modelsMetadata[j];\n\n // Before creating the model, we need to make sure we are linking it to the newly created module.\n // modelMetdata['moduleId'] = module.id;\n modelMetadata['module'] = module;\n\n // Please note that all the fields will also get created as we have setup the relation in model.entity.ts as cascade=true\n // await this.modelMetadataService.removeBySingularName(modelMetdata.singularName);\n // await this.modelMetadataService.modelSeeder(modelMetdata);\n\n // upsert the model information.\n // const fieldsMetadata = modelMetdata.fields;\n // delete modelMetdata['fields'];\n const { fields: fieldsMetadata, ...modelMetaDataWithoutFields } = modelMetadata;\n\n // Load and set the parent model if it exists.\n if (modelMetadata.isChild && modelMetadata.parentModelUserKey) {\n const parentModel = await this.modelMetadataService.findOneByUserKey(modelMetadata.parentModelUserKey);\n modelMetaDataWithoutFields['parentModel'] = parentModel;\n }\n\n await this.modelMetadataService.upsert(modelMetaDataWithoutFields);\n const model = await this.modelMetadataService.findOneBySingularName(modelMetadata.singularName)\n\n // iterate over all fields and upsert. \n let userKeyField = null;\n const userKeyFieldName = modelMetadata.userKeyFieldUserKey;\n for (let k = 0; k < fieldsMetadata.length; k++) {\n const fieldMetadata = fieldsMetadata[k];\n\n // TODO: resolve model & mediaStorageProvider. \n fieldMetadata['model'] = model;\n if (fieldMetadata.mediaStorageProviderUserKey) {\n fieldMetadata['mediaStorageProvider'] = await this.mediaStorageProviderMetadataService.findOneByUserKey(fieldMetadata.mediaStorageProviderUserKey);\n }\n // console.log(fieldMetadata.displayName);\n\n const affectedField = await this.fieldMetadataService.upsert(fieldMetadata);\n if (fieldMetadata.name === userKeyFieldName) {\n const { model, ...fieldData } = affectedField;\n userKeyField = fieldData;\n }\n }\n\n // Now that we have created fields & model update the model to stamp the userKeyField. \n if (userKeyField) {\n modelMetaDataWithoutFields['userKeyField'] = userKeyField;\n await this.modelMetadataService.upsert(modelMetaDataWithoutFields);\n }\n }\n }\n\n async seedSettings(createDto: CreateSettingDto) {\n const settingsArray: any[] = await this.settingsRepo.find();\n if (!settingsArray || settingsArray.length === 0) {\n this.seetingService.create(createDto);\n }\n }\n\n async seedSecurityRules(rulesDto: CreateSecurityRuleDto[]) {\n if (!rulesDto || rulesDto.length === 0) {\n this.logger.debug(`No security rules found to seed`);\n return;\n }\n for (const dto of rulesDto) {\n await this.securityRuleRepo.upsertWithDto({ ...dto, securityRuleConfig: JSON.stringify(dto.securityRuleConfig) });\n }\n }\n\n async seedListOfValues(listOfValuesDto: CreateListOfValuesDto[]) {\n if (!listOfValuesDto || listOfValuesDto.length === 0) {\n this.logger.debug(`No List Of Values found to seed`);\n return;\n }\n for (let j = 0; j < listOfValuesDto.length; j++) {\n const listOfValueDto = listOfValuesDto[j];\n listOfValueDto['module'] = await this.moduleMetadataService.findOneByUserKey(listOfValueDto.moduleUserKey);\n await this.listOfValuesService.upsert(listOfValuesDto[j]);\n }\n }\n\n async seedDashboards(dashboardDtos: CreateDashboardDto[]) {\n if (!dashboardDtos || dashboardDtos.length === 0) {\n this.logger.debug(`No dashboards found to seed`);\n return;\n }\n for (const dto of dashboardDtos) {\n await this.dashboardRepo.upsertWithDto(dto);\n }\n }\n\n async seedScheduledJobs(createScheduledJobDto: CreateScheduledJobDto[]) {\n if (!createScheduledJobDto || createScheduledJobDto.length === 0) {\n this.logger.debug(`No scheduled jobs found to seed`);\n return;\n }\n for (const dto of createScheduledJobDto) {\n await this.scheduledJobRepository.upsertWithDto(dto);\n }\n }\n\n}"]}
|
|
1
|
+
{"version":3,"file":"module-metadata-seeder.service.js","sourceRoot":"","sources":["../../src/seeders/module-metadata-seeder.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4D;AAC5D,uCAAyB;AACzB,2CAA6B;AAE7B,sFAA4D;AAG5D,iFAA4E;AAE5E,+EAA0E;AAC1E,iHAA0G;AAC1G,+EAA0E;AAC1E,2DAAwD;AACxD,+EAA4E;AAC5E,+HAAuH;AAEvH,+EAA2E;AAC3E,2EAAuE;AAEvE,6EAAwE;AACxE,iFAA4E;AAC5E,uFAAiF;AACjF,6CAAmD;AACnD,uFAA4E;AAC5E,qC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GAAE;IAmBJ,YAAA,IAAA,0BAAgB,EAAC,+CAAkB,CAAC,CAAA;IAGpC,YAAA,IAAA,eAAM,EAAC,4BAAgB,CAAC,GAAG,CAAC,CAAA;IAE5B,YAAA,IAAA,eAAM,EAAC,sBAAS,CAAC,GAAG,CAAC,CAAA;IACrB,YAAA,IAAA,eAAM,EAAC,uBAAY,CAAC,GAAG,CAAC,CAAA;IAGxB,YAAA,IAAA,0BAAgB,EAAC,wBAAO,EAAE,SAAS,CAAC,CAAA;qCAvBG,+CAAqB;QACtB,6CAAoB;QACpB,6CAAoB;QACL,6EAAmC;QAC3D,2CAAmB;QACnB,0BAAW;QACD,8CAAqB;QACxB,+CAAqB;QACnB,oDAAuB;QAC3B,2CAAmB;QACF,0FAAyC;QACtD,6CAAoB;QACtB,yCAAkB;QACjB,4CAAmB;QAExB,oBAAU;QACX,8BAAa,0BAMZ,gCAAc;QAExB,oBAAU;QACN,iDAAsB;QACb,wDAAyB;QACrC,0CAAmB;QACV,iDAAsB;GAhClD,2BAA2B,CAwkBvC","sourcesContent":["import { Inject, Injectable, Logger } from '@nestjs/common';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\nimport appBuilderConfig from '../config/app-builder.config';\nimport { ConfigType } from '@nestjs/config';\nimport { CreateModuleMetadataDto } from '../dtos/create-module-metadata.dto';\nimport { ModuleMetadataService } from '../services/module-metadata.service';\nimport { CreateModelMetadataDto } from '../dtos/create-model-metadata.dto';\nimport { ModelMetadataService } from '../services/model-metadata.service';\nimport { MediaStorageProviderMetadataService } from '../services/media-storage-provider-metadata.service';\nimport { FieldMetadataService } from '../services/field-metadata.service';\nimport { UserService } from 'src/services/user.service';\nimport { AuthenticationService } from 'src/services/authentication.service';\nimport { MediaStorageProviderMetadataSeederService } from '../services/media-storage-provider-metadata-seeder.service';\nimport { CreateEmailTemplateDto } from 'src/dtos/create-email-template.dto';\nimport { EmailTemplateService } from 'src/services/email-template.service';\nimport { SmsTemplateService } from 'src/services/sms-template.service';\nimport { CreateSmsTemplateDto } from 'src/dtos/create-sms-template.dto';\nimport { ViewMetadataService } from '../services/view-metadata.service';\nimport { ActionMetadataService } from '../services/action-metadata.service';\nimport { MenuItemMetadataService } from '../services/menu-item-metadata.service';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { PermissionMetadata } from '../entities/permission-metadata.entity';\nimport { Repository } from 'typeorm';\nimport { SolidRegistry } from '../helpers/solid-registry';\nimport { RoleMetadataService } from '../services/role-metadata.service';\nimport { getCoreModuleNames, getDynamicModuleNames } from '../helpers/module.helper';\nimport solidCoreMetadata from './seed-data/solid-core-metadata.json';\nimport { iamConfig } from 'src/config/iam.config';\nimport commonConfig from 'src/config/common.config';\nimport { CreateSettingDto } from 'src/dtos/create-setting.dto';\nimport { SettingService } from 'src/services/setting.service';\nimport { Setting } from 'src/entities/setting.entity';\nimport { CreateSecurityRuleDto } from 'src/dtos/create-security-rule.dto';\nimport { SecurityRuleRepository } from 'src/repository/security-rule.repository';\nimport { ListOfValuesService } from 'src/services/list-of-values.service';\nimport { CreateListOfValuesDto } from 'src/dtos/create-list-of-values.dto';\nimport { SystemFieldsSeederService } from './system-fields-seeder.service';\nimport { CreateDashboardDto } from 'src/dtos/create-dashboard.dto';\nimport { DashboardRepository } from 'src/repository/dashboard.repository';\n// import { CreateScheduledJobDto } from 'src/dtos/create-scheduled-job.dto';\nimport { ScheduledJobRepository } from 'src/repository/scheduled-job.repository';\nimport { CreateScheduledJobDto } from 'src/dtos/create-scheduled-job.dto'\nimport { deepFreeze } from 'src/helpers';\n\n@Injectable()\nexport class ModuleMetadataSeederService {\n private readonly logger = new Logger(ModuleMetadataSeederService.name);\n\n constructor(\n private readonly moduleMetadataService: ModuleMetadataService,\n private readonly modelMetadataService: ModelMetadataService,\n private readonly fieldMetadataService: FieldMetadataService,\n private readonly mediaStorageProviderMetadataService: MediaStorageProviderMetadataService,\n private readonly roleService: RoleMetadataService,\n private readonly userService: UserService,\n private readonly authenticationService: AuthenticationService,\n private readonly solidActionService: ActionMetadataService,\n private readonly solidMenuItemService: MenuItemMetadataService,\n private readonly solidViewService: ViewMetadataService,\n private readonly mediaStorageProviderSeederService: MediaStorageProviderMetadataSeederService,\n private readonly emailTemplateService: EmailTemplateService,\n private readonly smsTemplateService: SmsTemplateService,\n private readonly listOfValuesService: ListOfValuesService,\n @InjectRepository(PermissionMetadata)\n private readonly permissionRepo: Repository<PermissionMetadata>,\n private readonly solidRegistry: SolidRegistry,\n @Inject(appBuilderConfig.KEY)\n private readonly appBuilderConfiguration: ConfigType<typeof appBuilderConfig>,\n @Inject(iamConfig.KEY) private readonly iamConfiguration: ConfigType<typeof iamConfig>,\n @Inject(commonConfig.KEY)\n private readonly commonConfiguration: ConfigType<typeof commonConfig>,\n private readonly seetingService: SettingService,\n @InjectRepository(Setting, 'default')\n readonly settingsRepo: Repository<Setting>,\n readonly securityRuleRepo: SecurityRuleRepository,\n readonly systemFieldsSeederService: SystemFieldsSeederService,\n readonly dashboardRepo: DashboardRepository,\n readonly scheduledJobRepository: ScheduledJobRepository,\n ) { }\n\n async seed() {\n\n const typedSolidCoreMetadata: any = structuredClone(solidCoreMetadata);\n\n // Run the permissions seeder. \n // await this.permissionsSeederService.seed();\n this.logger.log(`Seeding permissions`);\n await this.seedPermissions();\n\n // TODO: move this also the main loop processing. Generate the media storage providers required by default\n this.logger.log(`Seeding media storage providers`);\n await this.mediaStorageProviderSeederService.seed();\n\n // Seed any missing system fields metadata for all models.\n this.logger.log(`Seeding system fields metadata`);\n await this.systemFieldsSeederService.seed();\n\n // Read the module metadata from a file specified in the .env \n // Add the core json file as the first entry in the above array.\n // Please note the sequence of core files is important below...\n const coreModules = getCoreModuleNames();\n const seedDataFiles = [\n // 'src/common/seeders/seed-data/common-metadata.json',\n // 'src/iam/seeders/seed-data/iam-metadata.json',\n // 'src/app-builder/seeders/seed-data/app-builder-metadata.json',\n // 'src/queues/seeders/seed-data/queues-metadata.json',\n // ...coreModules.map(module => `src/${module}/seeders/seed-data/${module}-metadata.json`),\n typedSolidCoreMetadata\n ];\n this.logger.debug(`getting dynamics modules`);\n const enabledModules = getDynamicModuleNames();\n this.logger.log(`Seeding metadata`);\n\n for (let i = 0; i < enabledModules.length; i++) {\n const enabledModule = enabledModules[i];\n const enabledModuleSeedFile = `module-metadata/${enabledModule}/${enabledModule}-metadata.json`\n const fullPath = path.join(process.cwd(), enabledModuleSeedFile);\n if (fs.existsSync(fullPath)) {\n const overallMetadata: any = JSON.parse(fs.readFileSync(fullPath, 'utf-8').toString());\n\n seedDataFiles.push(overallMetadata)\n }\n }\n\n this.logger.debug(`Seed data files are: ${seedDataFiles}`);\n let usersDetail;\n for (let i = 0; i < seedDataFiles.length; i++) {\n\n // Module, model & field handling.\n const overallMetadata = deepFreeze(seedDataFiles[i]);\n\n // const fullPath = path.join(process.cwd(), seedDataFile);\n\n // For each module metadata seed file provided, read contents, parse & convert to a variable. \n // this.logger.log(`[Start] module seed data: ${fullPath}`);\n\n // const overallMetadata: any = JSON.parse(fs.readFileSync(fullPath, 'utf-8').toString());\n\n // Process module metadata first. \n const moduleMetadata: CreateModuleMetadataDto = overallMetadata.moduleMetadata;\n this.logger.log(`[Start] Processing module metadata for ${moduleMetadata.name}`)\n await this.seedModuleModelFields(moduleMetadata);\n this.logger.log(`[End] Processing module metadata for ${moduleMetadata.name}`)\n\n // Media Storage provider templates\n this.logger.log(`[Start] Processing Media Storage Provider for ${moduleMetadata.name}`);\n const mediaStorageProviders = overallMetadata.mediaStorageProviders;\n await this.seedMediaStorageProviders(mediaStorageProviders);\n this.logger.log(`[End] Processing Media Storage Provider for ${moduleMetadata.name}`);\n\n // Custom role handling\n this.logger.log(`[End] Processing roles for ${moduleMetadata.name}`)\n const roles = overallMetadata.roles;\n\n // Every role configuration in the seeder json can optionally have a permissions attribute. \n // While creating roles we are only passing the role name to be used. \n await this.roleService.createRolesIfNotExists(roles.map(role => { return { name: role.name } }));\n\n // After roles are created, we iterate over all roles and attach permissions (if specified in the seeder json) to the respective role.\n for (let roleI = 0; roleI < roles.length; roleI++) {\n const role = roles[roleI];\n if (role.permissions) {\n await this.roleService.addPermissionsToRole(role.name, role.permissions)\n }\n }\n this.logger.log(`[End] Processing roles for ${moduleMetadata.name}`)\n\n // Custom user handling\n this.logger.log(`[Start] Processing users for ${moduleMetadata.name}`);\n const users = overallMetadata.users;\n usersDetail = users;\n await this.seedUsers(users);\n this.logger.log(`[End] Processing users for ${moduleMetadata.name}`)\n\n // Application Module View handling \n this.logger.log(`[Start] Processing views for ${moduleMetadata.name}`);\n const views = overallMetadata.views;\n await this.seedViews(views);\n this.logger.log(`[End] Processing views for ${moduleMetadata.name}`)\n\n // Application Module Action handling\n this.logger.log(`[Start] Processing actions for ${moduleMetadata.name}`);\n const actions = overallMetadata.actions;\n await this.seedActions(actions);\n this.logger.log(`[End] Processing actions for ${moduleMetadata.name}`)\n\n // Application Module Menu handling \n this.logger.log(`[Start] Processing menus for ${moduleMetadata.name}`);\n const menus = overallMetadata.menus;\n await this.seedMenus(menus);\n this.logger.log(`[End] Processing menus for ${moduleMetadata.name}`)\n\n // Email templates \n this.logger.log(`[Start] Processing email templates for ${moduleMetadata.name}`);\n const emailTemplates: CreateEmailTemplateDto[] = overallMetadata.emailTemplates;\n await this.seedEmailTemplates(emailTemplates, moduleMetadata);\n this.logger.log(`[End] Processing email templates for ${moduleMetadata.name}`);\n\n // Sms templates\n this.logger.log(`[Start] Processing sms templates for ${moduleMetadata.name}`);\n const smsTemplates: CreateSmsTemplateDto[] = overallMetadata.smsTemplates;\n await this.seedSmsTemplates(smsTemplates, moduleMetadata);\n this.logger.log(`[End] Processing sms templates for ${moduleMetadata.name}`);\n\n // Settings\n this.logger.log(`[Start] Processing settings for ${moduleMetadata.name}`);\n await this.seetingService.seedDefaultSettings();\n this.logger.log(`[End] Processing settings for ${moduleMetadata.name}`);\n\n // Security rules\n this.logger.log(`[Start] Processing security rules for ${moduleMetadata.name}`);\n const securityRules: CreateSecurityRuleDto[] = overallMetadata.securityRules;\n await this.seedSecurityRules(securityRules);\n this.logger.log(`[End] Processing security rules for ${moduleMetadata.name}`);\n\n // List Of Values\n this.logger.log(`[Start] Processing List Of Values for ${moduleMetadata.name}`);\n const listOfValues: CreateListOfValuesDto[] = overallMetadata.listOfValues;\n await this.seedListOfValues(listOfValues);\n this.logger.log(`[End] Processing List Of Values for ${moduleMetadata.name}`);\n\n // Dashboards\n this.logger.log(`[Start] Processing dashboards for ${moduleMetadata.name}`);\n const dashboards: CreateDashboardDto[] = overallMetadata.dashboards;\n await this.seedDashboards(dashboards);\n this.logger.log(`[End] Processing dashboards for ${moduleMetadata.name}`);\n\n // Scheduled Jobs\n this.logger.debug(`[Start] Processing scheduled jobs for ${moduleMetadata.name}`);\n const scheduledJobs: CreateScheduledJobDto[] = overallMetadata.scheduledJobs;\n if (scheduledJobs?.length > 0) {\n await this.seedScheduledJobs(scheduledJobs);\n }\n this.logger.debug(`[End] Processing scheduled jobs for ${moduleMetadata.name}`);\n\n this.logger.debug(`[End] module seed data: ${overallMetadata}`);\n }\n\n // Post seed data file processing. \n\n // 1. Give all permissions to the Admin role.\n this.logger.log(`About to add all permissions to the Admin role`);\n await this.roleService.addAllPermissionsToRole(\"Admin\");\n // 2. Give wrapSettings permissions to the Public role.\n const internalRolePermission = [\n 'UserController.findMany',\n 'UserController.checkIfPermissionExists',\n 'UserController.findOne',\n 'MenuItemMetadataController.findMany',\n 'MenuItemMetadataController.findUserMenus',\n 'MenuItemMetadataController.findOne',\n 'ViewMetadataController.getLayout',\n 'ViewMetadataController.findMany',\n 'ViewMetadataController.findOne',\n 'AuthenticationController.changePassword',\n 'FieldMetadataController.getSelectionDynamicValues',\n 'FieldMetadataController.getSelectionDynamicValue',\n 'FieldMetadataController.findFieldDefaultMetaData',\n 'SavedFiltersController.delete',\n 'SavedFiltersController.deleteMany',\n 'SavedFiltersController.findOne',\n 'SavedFiltersController.findMany',\n 'SavedFiltersController.recover',\n 'SavedFiltersController.recoverMany',\n 'SavedFiltersController.partialUpdate',\n 'SavedFiltersController.update',\n 'SavedFiltersController.insertMany',\n 'SavedFiltersController.create',\n 'AuthenticationController.logout'\n ]\n await this.roleService.addPermissionToRole('Internal User', internalRolePermission);\n await this.roleService.addPermissionToRole('Public', ['SettingController.wrapSettings', 'AuthenticationController.logout']);\n this.logger.log(`All Seeders finished`);\n this.logger.log(`Newly created username is: ${usersDetail?.length > 0 ? usersDetail[0]?.username : ''} and password is ${usersDetail?.length > 0 ? usersDetail[0]?.password : ''}`);\n }\n\n\n async seedPermissions() {\n\n const controllers = this.solidRegistry.getControllers();\n\n // Loop over the countries and create them.\n for (let id = 0; id < controllers.length; id++) {\n try {\n const controller = controllers[id];\n this.logger.log(`Resolving controller: ${controller.name}`);\n\n const methods = controller.methods;\n for (let mId = 0; mId < methods.length; mId++) {\n\n const methodName = methods[mId];\n const permissionName = `${controller.name}.${methodName}`;\n\n const existingPermission = await this.permissionRepo.findOne({\n where: {\n name: permissionName\n }\n });\n\n if (existingPermission) {\n this.logger.log(`Permission ${permissionName} already exists.`);\n }\n else {\n this.logger.log(`Permission ${permissionName} does not exist, creating new.`);\n\n const newPermission = this.permissionRepo.create({\n name: permissionName\n });\n await this.permissionRepo.save(newPermission);\n\n }\n }\n\n } catch (error) {\n this.logger.error(error);\n }\n }\n }\n\n async seedMediaStorageProviders(_mediaStorageProviders: any) {\n const mediaStorageProviders = structuredClone(_mediaStorageProviders);\n if (!mediaStorageProviders) {\n return;\n }\n for (let i = 0; i < mediaStorageProviders.length; i++) {\n const mediaStorageProivder = mediaStorageProviders[i];\n await this.mediaStorageProviderMetadataService.upsert(mediaStorageProivder);\n }\n }\n\n async seedEmailTemplates(_emailTemplates: CreateEmailTemplateDto[], _moduleMetadata: CreateModuleMetadataDto) {\n const emailTemplates = structuredClone(_emailTemplates);\n const moduleMetadata = structuredClone(_moduleMetadata);\n if (!emailTemplates) {\n return;\n }\n\n for (let i = 0; i < emailTemplates.length; i++) {\n const emailTemplate = emailTemplates[i];\n this.logger.log(`Found ${emailTemplate.name} email template`);\n\n // We need to load the actual template contents. \n if (moduleMetadata.name === 'solid-core') {\n const modulePath = path.dirname(require.resolve('@solidstarters/solid-core'));\n const seedDataPath = path.join(modulePath, '../src/seeders/seed-data/email-templates');\n const filePath = path.join(seedDataPath, emailTemplate.body);\n this.logger.log(`Seeding email template from solid-core at path: ${filePath}`);\n if (fs.existsSync(filePath)) {\n emailTemplate.body = fs.readFileSync(filePath, 'utf-8').toString();\n }\n }\n else {\n // Check if file exists\n const emailTemplateHandlebar = `module-metadata/${moduleMetadata.name}/email-templates/${emailTemplate.body}`\n const fullPath = path.join(process.cwd(), emailTemplateHandlebar);\n this.logger.log(`Seeding custom email template from consuming model at path: ${fullPath}`);\n if (fs.existsSync(fullPath)) {\n emailTemplate.body = fs.readFileSync(fullPath, 'utf-8').toString();\n }\n }\n\n // Save to DB.\n await this.emailTemplateService.removeByName(emailTemplate.name);\n await this.emailTemplateService.create(emailTemplate);\n }\n\n }\n\n async seedSmsTemplates(_smsTemplates: CreateSmsTemplateDto[], _moduleMetadata: CreateModuleMetadataDto) {\n const smsTemplates = structuredClone(_smsTemplates);\n const moduleMetadata = structuredClone(_moduleMetadata);\n if (!smsTemplates) {\n return;\n }\n\n for (let i = 0; i < smsTemplates.length; i++) {\n const smsTemplate = smsTemplates[i];\n this.logger.log(`Found ${smsTemplate.name} sms template`);\n\n // We need to load the actual template contents. \n if (moduleMetadata.name === 'solid-core') {\n const modulePath = path.dirname(require.resolve('@solidstarters/solid-core'));\n const seedDataPath = path.join(modulePath, '../src/seeders/seed-data/sms-templates');\n const filePath = path.join(seedDataPath, smsTemplate.body);\n this.logger.log(`Seeding sms template from solid-core at path: ${filePath}`);\n if (fs.existsSync(filePath)) {\n smsTemplate.body = fs.readFileSync(filePath, 'utf-8').toString();\n }\n }\n else {\n // Check if file exists\n const emailTemplateHandlebar = `module-metadata/${moduleMetadata.name}/sms-templates/${smsTemplate.body}`\n const fullPath = path.join(process.cwd(), emailTemplateHandlebar);\n this.logger.log(`Seeding custom sms template from consuming model at path: ${fullPath}`);\n if (fs.existsSync(fullPath)) {\n smsTemplate.body = fs.readFileSync(fullPath, 'utf-8').toString();\n }\n }\n\n\n // Save to DB.\n await this.smsTemplateService.removeByName(smsTemplate.name);\n await this.smsTemplateService.create(smsTemplate);\n }\n }\n\n async seedMenus(menus: any) {\n // const menus = structuredClone(_menus);\n if (!menus) {\n return;\n }\n\n for (let j = 0; j < menus.length; j++) {\n const menuData = menus[j];\n\n const adminRole = await this.roleService.findRoleByName('Admin');\n\n const specifiedRoles = menuData['roles'];\n\n // If the developer has specified roles, then resolve them, making sure that admin role is also given.\n const specifiedRoleObjects = [adminRole];\n if (specifiedRoles) {\n for (let i = 0; i < specifiedRoles.length; i++) {\n const specifiedRole = specifiedRoles[i];\n const specifiedRoleObject = await this.roleService.findRoleByName(specifiedRole);\n if (!specifiedRoleObject) {\n throw new Error(`Invalid role: (${specifiedRole}) specified against menu with display name ${menuData.displayName}.`);\n }\n specifiedRoleObjects.push(specifiedRoleObject);\n }\n }\n\n menuData['roles'] = specifiedRoleObjects;\n menuData['action'] = await this.solidActionService.findOneByUserKey(menuData.actionUserKey);\n menuData['module'] = await this.moduleMetadataService.findOneByUserKey(menuData.moduleUserKey);\n\n if (menuData.parentMenuItemUserKey) {\n menuData['parentMenuItem'] = await this.solidMenuItemService.findOneByUserKey(menuData.parentMenuItemUserKey);\n } else {\n menuData['parentMenuItem'] = null\n }\n await this.solidMenuItemService.upsert(menuData);\n }\n }\n\n async seedActions(_actions: any) {\n const actions = structuredClone(_actions);\n if (!actions) {\n return;\n }\n\n for (let j = 0; j < actions.length; j++) {\n const actionData = actions[j];\n actionData['module'] = await this.moduleMetadataService.findOneByUserKey(actionData.moduleUserKey);\n if (actionData.type === 'solid') {\n actionData['model'] = await this.modelMetadataService.findOneByUserKey(actionData.modelUserKey);\n actionData['view'] = await this.solidViewService.findOneByUserKey(actionData.viewUserKey);\n }\n else {\n if (actionData.modelUserKey) {\n actionData['model'] = await this.modelMetadataService.findOneByUserKey(actionData.modelUserKey);\n }\n }\n await this.solidActionService.upsert(actionData);\n }\n }\n\n async seedViews(_views: any) {\n const views = structuredClone(_views);\n if (!views) {\n return;\n }\n\n for (let j = 0; j < views.length; j++) {\n const viewData = views[j];\n\n // preety format the layout & context. \n viewData['layout'] = JSON.stringify(viewData['layout'], null, 2);\n // viewData['context'] = JSON.stringify(viewData['context'], null, 2);\n\n viewData['module'] = await this.moduleMetadataService.findOneByUserKey(viewData.moduleUserKey);\n viewData['model'] = await this.modelMetadataService.findOneByUserKey(viewData.modelUserKey);\n // await this.solidViewService.upsert(viewData);\n // First check if module already exists using name\n\n // Changed the below to upsert as now we are saving modifications to the view json to file system also.\n // await this.solidViewService.createIfNotPresent(viewData);\n await this.solidViewService.upsert(viewData);\n }\n }\n\n async seedUsers(_users) {\n const users = structuredClone(_users);\n if (!users) {\n return;\n }\n\n for (let l = 0; l < users.length; l++) {\n const user = users[l];\n let exisitingUser = await this.userService.findOneByUsername(user.username);\n if (!exisitingUser) {\n exisitingUser = await this.authenticationService.signUp(user);\n\n this.logger.log(`Newly created user is ${user}`);\n }\n // now add Roles to user.\n // for (let m = 0; m < roles.length; m++) {\n // const role = roles[m];\n // await this.userService.addRoleToUser(user.email, role.name);\n // }\n }\n }\n\n async seedModuleModelFields(_moduleMetadata: CreateModuleMetadataDto) {\n const moduleMetadata = structuredClone(_moduleMetadata);\n // First we create the module. \n // await this.moduleMetadataService.removeByName(moduleMetadata.name);\n // const module = await this.moduleMetadataService.create(moduleMetadata);\n const module = await this.moduleMetadataService.upsert(moduleMetadata);\n\n // Next create all the models. \n const modelsMetadata: CreateModelMetadataDto[] = moduleMetadata.models;\n for (let j = 0; j < modelsMetadata.length; j++) {\n const modelMetadata = modelsMetadata[j];\n\n // Before creating the model, we need to make sure we are linking it to the newly created module.\n // modelMetdata['moduleId'] = module.id;\n modelMetadata['module'] = module;\n\n // Please note that all the fields will also get created as we have setup the relation in model.entity.ts as cascade=true\n // await this.modelMetadataService.removeBySingularName(modelMetdata.singularName);\n // await this.modelMetadataService.modelSeeder(modelMetdata);\n\n // upsert the model information.\n // const fieldsMetadata = modelMetdata.fields;\n // delete modelMetdata['fields'];\n const { fields: fieldsMetadata, ...modelMetaDataWithoutFields } = modelMetadata;\n\n // Load and set the parent model if it exists.\n if (modelMetadata.isChild && modelMetadata.parentModelUserKey) {\n const parentModel = await this.modelMetadataService.findOneByUserKey(modelMetadata.parentModelUserKey);\n modelMetaDataWithoutFields['parentModel'] = parentModel;\n }\n\n await this.modelMetadataService.upsert(modelMetaDataWithoutFields);\n const model = await this.modelMetadataService.findOneBySingularName(modelMetadata.singularName)\n\n // iterate over all fields and upsert. \n let userKeyField = null;\n const userKeyFieldName = modelMetadata.userKeyFieldUserKey;\n for (let k = 0; k < fieldsMetadata.length; k++) {\n const fieldMetadata = fieldsMetadata[k];\n\n // TODO: resolve model & mediaStorageProvider. \n fieldMetadata['model'] = model;\n if (fieldMetadata.mediaStorageProviderUserKey) {\n fieldMetadata['mediaStorageProvider'] = await this.mediaStorageProviderMetadataService.findOneByUserKey(fieldMetadata.mediaStorageProviderUserKey);\n }\n // console.log(fieldMetadata.displayName);\n\n const affectedField = await this.fieldMetadataService.upsert(fieldMetadata);\n if (fieldMetadata.name === userKeyFieldName) {\n const { model, ...fieldData } = affectedField;\n userKeyField = fieldData;\n }\n }\n\n // Now that we have created fields & model update the model to stamp the userKeyField. \n if (userKeyField) {\n modelMetaDataWithoutFields['userKeyField'] = userKeyField;\n await this.modelMetadataService.upsert(modelMetaDataWithoutFields);\n }\n }\n }\n\n async seedSettings(_createDto: CreateSettingDto) {\n const createDto = structuredClone(_createDto);\n const settingsArray: any[] = await this.settingsRepo.find();\n if (!settingsArray || settingsArray.length === 0) {\n this.seetingService.create(createDto);\n }\n }\n\n async seedSecurityRules(_rulesDto: CreateSecurityRuleDto[]) {\n const rulesDto = structuredClone(_rulesDto);\n if (!rulesDto || rulesDto.length === 0) {\n this.logger.debug(`No security rules found to seed`);\n return;\n }\n for (const dto of rulesDto) {\n await this.securityRuleRepo.upsertWithDto({ ...dto, securityRuleConfig: JSON.stringify(dto.securityRuleConfig) });\n }\n }\n\n async seedListOfValues(_listOfValuesDto: CreateListOfValuesDto[]) {\n const listOfValuesDto = structuredClone(_listOfValuesDto);\n if (!listOfValuesDto || listOfValuesDto.length === 0) {\n this.logger.debug(`No List Of Values found to seed`);\n return;\n }\n for (let j = 0; j < listOfValuesDto.length; j++) {\n const listOfValueDto = listOfValuesDto[j];\n listOfValueDto['module'] = await this.moduleMetadataService.findOneByUserKey(listOfValueDto.moduleUserKey);\n await this.listOfValuesService.upsert(listOfValuesDto[j]);\n }\n }\n\n async seedDashboards(_dashboardDtos: CreateDashboardDto[]) {\n const dashboardDtos = structuredClone(_dashboardDtos);\n if (!dashboardDtos || dashboardDtos.length === 0) {\n this.logger.debug(`No dashboards found to seed`);\n return;\n }\n for (const dto of dashboardDtos) {\n await this.dashboardRepo.upsertWithDto(dto);\n }\n }\n\n async seedScheduledJobs(_createScheduledJobDto: CreateScheduledJobDto[]) {\n const createScheduledJobDto = structuredClone(_createScheduledJobDto);\n if (!createScheduledJobDto || createScheduledJobDto.length === 0) {\n this.logger.debug(`No scheduled jobs found to seed`);\n return;\n }\n for (const dto of createScheduledJobDto) {\n await this.scheduledJobRepository.upsertWithDto(dto);\n }\n }\n\n}"]}
|
|
@@ -1697,6 +1697,7 @@
|
|
|
1697
1697
|
"dataSourceType": "postgres",
|
|
1698
1698
|
"userKeyFieldUserKey": "username",
|
|
1699
1699
|
"isSystem": true,
|
|
1700
|
+
"enableAuditTracking": true,
|
|
1700
1701
|
"fields": [
|
|
1701
1702
|
{
|
|
1702
1703
|
"name": "fullName",
|
|
@@ -1709,7 +1710,8 @@
|
|
|
1709
1710
|
"index": false,
|
|
1710
1711
|
"private": false,
|
|
1711
1712
|
"encrypt": false,
|
|
1712
|
-
"isSystem": true
|
|
1713
|
+
"isSystem": true,
|
|
1714
|
+
"enableAuditTracking": true
|
|
1713
1715
|
},
|
|
1714
1716
|
{
|
|
1715
1717
|
"name": "username",
|
|
@@ -1722,7 +1724,8 @@
|
|
|
1722
1724
|
"index": true,
|
|
1723
1725
|
"private": false,
|
|
1724
1726
|
"encrypt": false,
|
|
1725
|
-
"isSystem": true
|
|
1727
|
+
"isSystem": true,
|
|
1728
|
+
"enableAuditTracking": true
|
|
1726
1729
|
},
|
|
1727
1730
|
{
|
|
1728
1731
|
"name": "email",
|
|
@@ -1735,7 +1738,8 @@
|
|
|
1735
1738
|
"index": true,
|
|
1736
1739
|
"private": false,
|
|
1737
1740
|
"encrypt": false,
|
|
1738
|
-
"isSystem": true
|
|
1741
|
+
"isSystem": true,
|
|
1742
|
+
"enableAuditTracking": true
|
|
1739
1743
|
},
|
|
1740
1744
|
{
|
|
1741
1745
|
"name": "mobile",
|
|
@@ -1748,7 +1752,8 @@
|
|
|
1748
1752
|
"index": true,
|
|
1749
1753
|
"private": false,
|
|
1750
1754
|
"encrypt": false,
|
|
1751
|
-
"isSystem": true
|
|
1755
|
+
"isSystem": true,
|
|
1756
|
+
"enableAuditTracking": true
|
|
1752
1757
|
},
|
|
1753
1758
|
{
|
|
1754
1759
|
"name": "password",
|
|
@@ -1884,7 +1889,8 @@
|
|
|
1884
1889
|
"relationCascade": "cascade",
|
|
1885
1890
|
"relationModelModuleName": "solid-core",
|
|
1886
1891
|
"isSystem": true,
|
|
1887
|
-
"isRelationManyToManyOwner": true
|
|
1892
|
+
"isRelationManyToManyOwner": true,
|
|
1893
|
+
"enableAuditTracking": true
|
|
1888
1894
|
},
|
|
1889
1895
|
{
|
|
1890
1896
|
"name": "forgotPasswordConfirmedAt",
|
|
@@ -12256,5 +12262,33 @@
|
|
|
12256
12262
|
],
|
|
12257
12263
|
"checksums": [],
|
|
12258
12264
|
"listOfValues": [],
|
|
12259
|
-
"scheduledJobs": []
|
|
12265
|
+
"scheduledJobs": [],
|
|
12266
|
+
"securityRules": [
|
|
12267
|
+
{
|
|
12268
|
+
"name": "model:User-role:Internal User",
|
|
12269
|
+
"description": "Show User record for the current user only",
|
|
12270
|
+
"roleUserKey": "Internal User",
|
|
12271
|
+
"modelMetadataUserKey": "user",
|
|
12272
|
+
"securityRuleConfig": {
|
|
12273
|
+
"filters": {
|
|
12274
|
+
"id": {
|
|
12275
|
+
"$eq": "$activeUserId"
|
|
12276
|
+
}
|
|
12277
|
+
}
|
|
12278
|
+
}
|
|
12279
|
+
},
|
|
12280
|
+
{
|
|
12281
|
+
"name": "model:User-role:Admin",
|
|
12282
|
+
"description": "Show All User records",
|
|
12283
|
+
"roleUserKey": "Admin",
|
|
12284
|
+
"modelMetadataUserKey": "user",
|
|
12285
|
+
"securityRuleConfig": {
|
|
12286
|
+
"filters": {
|
|
12287
|
+
"id": {
|
|
12288
|
+
"$ne": "0"
|
|
12289
|
+
}
|
|
12290
|
+
}
|
|
12291
|
+
}
|
|
12292
|
+
}
|
|
12293
|
+
]
|
|
12260
12294
|
}
|
|
@@ -12,6 +12,7 @@ import { ChatterMessageDetails } from '../entities/chatter-message-details.entit
|
|
|
12
12
|
import { ModelMetadata } from 'src/entities/model-metadata.entity';
|
|
13
13
|
import { RequestContextService } from './request-context.service';
|
|
14
14
|
import { ChatterMessageRepository } from 'src/repository/chatter-message.repository';
|
|
15
|
+
import { ModelMetadataHelperService } from 'src/helpers/model-metadata-helper.service';
|
|
15
16
|
export declare class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
16
17
|
readonly modelMetadataService: ModelMetadataService;
|
|
17
18
|
readonly moduleMetadataService: ModuleMetadataService;
|
|
@@ -25,13 +26,18 @@ export declare class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
|
25
26
|
readonly moduleRef: ModuleRef;
|
|
26
27
|
private readonly modelMetadataRepo;
|
|
27
28
|
readonly requestContextService: RequestContextService;
|
|
28
|
-
|
|
29
|
+
private readonly modelMetadataHelperService;
|
|
30
|
+
constructor(modelMetadataService: ModelMetadataService, moduleMetadataService: ModuleMetadataService, configService: ConfigService, fileService: FileService, discoveryService: DiscoveryService, crudHelperService: CrudHelperService, entityManager: EntityManager, repo: ChatterMessageRepository, chatterMessageDetailsRepo: Repository<ChatterMessageDetails>, moduleRef: ModuleRef, modelMetadataRepo: Repository<ModelMetadata>, requestContextService: RequestContextService, modelMetadataHelperService: ModelMetadataHelperService);
|
|
29
31
|
postMessage(postDto: PostChatterMessageDto, files?: Express.Multer.File[]): Promise<ChatterMessage>;
|
|
30
32
|
postAuditMessageOnInsert(entity: any, metadata: EntityMetadata, messageQueue?: boolean): Promise<void>;
|
|
31
|
-
postAuditMessageOnUpdate(entity: any, metadata: EntityMetadata, databaseEntity: any, messageQueue?: boolean): Promise<void>;
|
|
33
|
+
postAuditMessageOnUpdate(entity: any, metadata: EntityMetadata, databaseEntity: any, updatedColumns?: any[], messageQueue?: boolean): Promise<void>;
|
|
32
34
|
postAuditMessageOnDelete(entity: any, metadata: EntityMetadata, databaseEntity: any, messageQueue?: boolean): Promise<void>;
|
|
33
35
|
private formatFieldValue;
|
|
34
36
|
private formatFieldValueDisplay;
|
|
35
37
|
private hasValueChanged;
|
|
38
|
+
private hasRelationValueChanged;
|
|
39
|
+
private extractRelationId;
|
|
40
|
+
private extractRelationIds;
|
|
41
|
+
private populateRelationFields;
|
|
36
42
|
}
|
|
37
43
|
//# sourceMappingURL=chatter-message.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatter-message.service.d.ts","sourceRoot":"","sources":["../../src/services/chatter-message.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAG,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,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