@solidstarters/solid-core 1.2.201 → 1.2.202

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.
Files changed (224) hide show
  1. package/dist/config/cache.options.d.ts +1 -1
  2. package/dist/config/cache.options.d.ts.map +1 -1
  3. package/dist/config/cache.options.js +2 -2
  4. package/dist/config/cache.options.js.map +1 -1
  5. package/dist/config/iam.config.d.ts +4 -0
  6. package/dist/config/iam.config.d.ts.map +1 -1
  7. package/dist/config/iam.config.js +2 -0
  8. package/dist/config/iam.config.js.map +1 -1
  9. package/dist/controllers/model-metadata.controller.d.ts +25 -0
  10. package/dist/controllers/model-metadata.controller.d.ts.map +1 -1
  11. package/dist/controllers/model-metadata.controller.js +23 -0
  12. package/dist/controllers/model-metadata.controller.js.map +1 -1
  13. package/dist/controllers/setting.controller.d.ts +1 -2
  14. package/dist/controllers/setting.controller.d.ts.map +1 -1
  15. package/dist/controllers/setting.controller.js +21 -42
  16. package/dist/controllers/setting.controller.js.map +1 -1
  17. package/dist/decorators/sms-provider.decorator.d.ts +3 -0
  18. package/dist/decorators/sms-provider.decorator.d.ts.map +1 -0
  19. package/dist/decorators/sms-provider.decorator.js +11 -0
  20. package/dist/decorators/sms-provider.decorator.js.map +1 -0
  21. package/dist/dtos/navigation.dto.d.ts +6 -0
  22. package/dist/dtos/navigation.dto.d.ts.map +1 -0
  23. package/dist/dtos/navigation.dto.js +33 -0
  24. package/dist/dtos/navigation.dto.js.map +1 -0
  25. package/dist/dtos/sign-in.dto.js +3 -3
  26. package/dist/dtos/sign-in.dto.js.map +1 -1
  27. package/dist/entities/common.entity.js +5 -4
  28. package/dist/entities/common.entity.js.map +1 -1
  29. package/dist/entities/field-metadata.entity.d.ts.map +1 -1
  30. package/dist/entities/field-metadata.entity.js +2 -1
  31. package/dist/entities/field-metadata.entity.js.map +1 -1
  32. package/dist/entities/legacy-common.entity.d.ts.map +1 -1
  33. package/dist/entities/legacy-common.entity.js +5 -4
  34. package/dist/entities/legacy-common.entity.js.map +1 -1
  35. package/dist/entities/model-metadata.entity.d.ts.map +1 -1
  36. package/dist/entities/model-metadata.entity.js +5 -1
  37. package/dist/entities/model-metadata.entity.js.map +1 -1
  38. package/dist/factories/mail.factory.d.ts.map +1 -1
  39. package/dist/factories/mail.factory.js.map +1 -1
  40. package/dist/factories/sms.factory.d.ts +14 -0
  41. package/dist/factories/sms.factory.d.ts.map +1 -0
  42. package/dist/factories/sms.factory.js +53 -0
  43. package/dist/factories/sms.factory.js.map +1 -0
  44. package/dist/helpers/date.helper.d.ts.map +1 -1
  45. package/dist/helpers/date.helper.js +13 -4
  46. package/dist/helpers/date.helper.js.map +1 -1
  47. package/dist/helpers/solid-registry.d.ts +3 -0
  48. package/dist/helpers/solid-registry.d.ts.map +1 -1
  49. package/dist/helpers/solid-registry.js +7 -0
  50. package/dist/helpers/solid-registry.js.map +1 -1
  51. package/dist/index.d.ts +9 -6
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +9 -6
  54. package/dist/index.js.map +1 -1
  55. package/dist/jobs/database/{sms-publisher-database.service.d.ts → msg91-sms-publisher-database.service.d.ts} +2 -2
  56. package/dist/jobs/database/msg91-sms-publisher-database.service.d.ts.map +1 -0
  57. package/dist/jobs/database/{sms-publisher-database.service.js → msg91-sms-publisher-database.service.js} +8 -8
  58. package/dist/jobs/database/msg91-sms-publisher-database.service.js.map +1 -0
  59. package/dist/jobs/database/{sms-queue-database-options.d.ts → msg91-sms-queue-database-options.d.ts} +1 -1
  60. package/dist/jobs/database/msg91-sms-queue-database-options.d.ts.map +1 -0
  61. package/dist/jobs/database/{sms-queue-database-options.js → msg91-sms-queue-database-options.js} +1 -1
  62. package/dist/jobs/database/msg91-sms-queue-database-options.js.map +1 -0
  63. package/dist/jobs/database/{sms-subscriber-database.service.d.ts → msg91-sms-subscriber-database.service.d.ts} +5 -5
  64. package/dist/jobs/database/msg91-sms-subscriber-database.service.d.ts.map +1 -0
  65. package/dist/jobs/database/{sms-subscriber-database.service.js → msg91-sms-subscriber-database.service.js} +14 -12
  66. package/dist/jobs/database/msg91-sms-subscriber-database.service.js.map +1 -0
  67. package/dist/jobs/database/otp-subscriber-database.service.d.ts +4 -4
  68. package/dist/jobs/database/otp-subscriber-database.service.d.ts.map +1 -1
  69. package/dist/jobs/database/otp-subscriber-database.service.js +6 -4
  70. package/dist/jobs/database/otp-subscriber-database.service.js.map +1 -1
  71. package/dist/jobs/database/twilio-sms-subscriber-database.service.d.ts +3 -3
  72. package/dist/jobs/database/twilio-sms-subscriber-database.service.d.ts.map +1 -1
  73. package/dist/jobs/database/twilio-sms-subscriber-database.service.js +6 -4
  74. package/dist/jobs/database/twilio-sms-subscriber-database.service.js.map +1 -1
  75. package/dist/jobs/{sms-publisher.service.d.ts → msg91-otp-publisher.service.d.ts} +2 -2
  76. package/dist/jobs/msg91-otp-publisher.service.d.ts.map +1 -0
  77. package/dist/jobs/{sms-publisher.service.js → msg91-otp-publisher.service.js} +8 -8
  78. package/dist/jobs/msg91-otp-publisher.service.js.map +1 -0
  79. package/dist/jobs/{sms-queue-options.d.ts → msg91-otp-queue-options.d.ts} +1 -1
  80. package/dist/jobs/msg91-otp-queue-options.d.ts.map +1 -0
  81. package/dist/jobs/{otp-queue-options.js → msg91-otp-queue-options.js} +1 -1
  82. package/dist/jobs/msg91-otp-queue-options.js.map +1 -0
  83. package/dist/jobs/{sms-subscriber.service.d.ts → msg91-otp-subscriber.service.d.ts} +6 -6
  84. package/dist/jobs/msg91-otp-subscriber.service.d.ts.map +1 -0
  85. package/dist/jobs/{otp-subscriber.service.js → msg91-otp-subscriber.service.js} +14 -12
  86. package/dist/jobs/msg91-otp-subscriber.service.js.map +1 -0
  87. package/dist/jobs/{otp-publisher.service.d.ts → msg91-sms-publisher.service.d.ts} +2 -2
  88. package/dist/jobs/msg91-sms-publisher.service.d.ts.map +1 -0
  89. package/dist/jobs/{otp-publisher.service.js → msg91-sms-publisher.service.js} +8 -8
  90. package/dist/jobs/msg91-sms-publisher.service.js.map +1 -0
  91. package/dist/jobs/{otp-queue-options.d.ts → msg91-sms-queue-options.d.ts} +1 -1
  92. package/dist/jobs/msg91-sms-queue-options.d.ts.map +1 -0
  93. package/dist/jobs/{sms-queue-options.js → msg91-sms-queue-options.js} +1 -1
  94. package/dist/jobs/msg91-sms-queue-options.js.map +1 -0
  95. package/dist/jobs/{otp-subscriber.service.d.ts → msg91-sms-subscriber.service.d.ts} +7 -7
  96. package/dist/jobs/msg91-sms-subscriber.service.d.ts.map +1 -0
  97. package/dist/jobs/{sms-subscriber.service.js → msg91-sms-subscriber.service.js} +14 -12
  98. package/dist/jobs/msg91-sms-subscriber.service.js.map +1 -0
  99. package/dist/jobs/twilio-sms-subscriber.service.d.ts +3 -3
  100. package/dist/jobs/twilio-sms-subscriber.service.d.ts.map +1 -1
  101. package/dist/jobs/twilio-sms-subscriber.service.js +6 -4
  102. package/dist/jobs/twilio-sms-subscriber.service.js.map +1 -1
  103. package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
  104. package/dist/seeders/module-metadata-seeder.service.js +23 -1
  105. package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
  106. package/dist/seeders/seed-data/solid-core-metadata.json +30 -25
  107. package/dist/seeders/user-seeder.service.d.ts.map +1 -1
  108. package/dist/seeders/user-seeder.service.js +5 -4
  109. package/dist/seeders/user-seeder.service.js.map +1 -1
  110. package/dist/services/authentication.service.d.ts +6 -3
  111. package/dist/services/authentication.service.d.ts.map +1 -1
  112. package/dist/services/authentication.service.js +48 -13
  113. package/dist/services/authentication.service.js.map +1 -1
  114. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.d.ts.map +1 -1
  115. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.js.map +1 -1
  116. package/dist/services/crud.service.d.ts +1 -2
  117. package/dist/services/crud.service.d.ts.map +1 -1
  118. package/dist/services/crud.service.js.map +1 -1
  119. package/dist/services/excel.service.d.ts +1 -0
  120. package/dist/services/excel.service.d.ts.map +1 -1
  121. package/dist/services/excel.service.js +4 -0
  122. package/dist/services/excel.service.js.map +1 -1
  123. package/dist/services/model-metadata.service.d.ts +28 -1
  124. package/dist/services/model-metadata.service.d.ts.map +1 -1
  125. package/dist/services/model-metadata.service.js +109 -2
  126. package/dist/services/model-metadata.service.js.map +1 -1
  127. package/dist/services/setting.service.d.ts.map +1 -1
  128. package/dist/services/setting.service.js +3 -45
  129. package/dist/services/setting.service.js.map +1 -1
  130. package/dist/services/sms/Msg91BaseSMSService.js +6 -6
  131. package/dist/services/sms/Msg91BaseSMSService.js.map +1 -1
  132. package/dist/services/sms/Msg91OTPService.d.ts.map +1 -1
  133. package/dist/services/sms/Msg91OTPService.js +3 -1
  134. package/dist/services/sms/Msg91OTPService.js.map +1 -1
  135. package/dist/services/sms/Msg91SMSService.d.ts.map +1 -1
  136. package/dist/services/sms/Msg91SMSService.js +3 -1
  137. package/dist/services/sms/Msg91SMSService.js.map +1 -1
  138. package/dist/services/sms/TwilioSMSService.d.ts.map +1 -1
  139. package/dist/services/sms/TwilioSMSService.js +2 -0
  140. package/dist/services/sms/TwilioSMSService.js.map +1 -1
  141. package/dist/services/solid-introspect.service.d.ts +1 -0
  142. package/dist/services/solid-introspect.service.d.ts.map +1 -1
  143. package/dist/services/solid-introspect.service.js +14 -0
  144. package/dist/services/solid-introspect.service.js.map +1 -1
  145. package/dist/solid-core-cli.module.js +1 -1
  146. package/dist/solid-core-cli.module.js.map +1 -1
  147. package/dist/solid-core.module.d.ts.map +1 -1
  148. package/dist/solid-core.module.js +22 -13
  149. package/dist/solid-core.module.js.map +1 -1
  150. package/dist/subscribers/scheduled-job.subscriber.d.ts.map +1 -1
  151. package/dist/subscribers/scheduled-job.subscriber.js +1 -1
  152. package/dist/subscribers/scheduled-job.subscriber.js.map +1 -1
  153. package/dist/transformers/typeorm/local-date-time-transformer.d.ts +2 -2
  154. package/dist/transformers/typeorm/local-date-time-transformer.d.ts.map +1 -1
  155. package/dist/transformers/typeorm/local-date-time-transformer.js +28 -6
  156. package/dist/transformers/typeorm/local-date-time-transformer.js.map +1 -1
  157. package/dist/tsconfig.tsbuildinfo +1 -1
  158. package/package.json +1 -1
  159. package/src/config/cache.options.ts +6 -3
  160. package/src/config/iam.config.ts +2 -1
  161. package/src/controllers/model-metadata.controller.ts +21 -1
  162. package/src/controllers/setting.controller.ts +32 -36
  163. package/src/decorators/sms-provider.decorator.ts +7 -0
  164. package/src/dtos/navigation.dto.ts +14 -0
  165. package/src/dtos/sign-in.dto.ts +3 -3
  166. package/src/entities/common.entity.ts +7 -7
  167. package/src/entities/field-metadata.entity.ts +1 -1
  168. package/src/entities/legacy-common.entity.ts +6 -5
  169. package/src/entities/model-metadata.entity.ts +1 -1
  170. package/src/factories/mail.factory.ts +0 -1
  171. package/src/factories/sms.factory.ts +43 -0
  172. package/src/helpers/date.helper.ts +38 -9
  173. package/src/helpers/solid-registry.ts +9 -0
  174. package/src/index.ts +9 -6
  175. package/src/jobs/database/{sms-publisher-database.service.ts → msg91-sms-publisher-database.service.ts} +2 -2
  176. package/src/jobs/database/{sms-subscriber-database.service.ts → msg91-sms-subscriber-database.service.ts} +9 -4
  177. package/src/jobs/database/otp-subscriber-database.service.ts +8 -2
  178. package/src/jobs/database/twilio-sms-subscriber-database.service.ts +5 -2
  179. package/src/jobs/{otp-publisher.service.ts → msg91-otp-publisher.service.ts} +2 -2
  180. package/src/jobs/{otp-subscriber.service.ts → msg91-otp-subscriber.service.ts} +10 -4
  181. package/src/jobs/{sms-publisher.service.ts → msg91-sms-publisher.service.ts} +2 -2
  182. package/src/jobs/{sms-subscriber.service.ts → msg91-sms-subscriber.service.ts} +9 -4
  183. package/src/jobs/twilio-sms-subscriber.service.ts +6 -2
  184. package/src/seeders/module-metadata-seeder.service.ts +30 -5
  185. package/src/seeders/seed-data/email-templates/email-on-signup.handlebars.html +155 -0
  186. package/src/seeders/seed-data/sms-templates/text-on-signup.handlebars.txt +10 -0
  187. package/src/seeders/seed-data/solid-core-metadata.json +31 -26
  188. package/src/seeders/user-seeder.service.ts +5 -4
  189. package/src/services/authentication.service.ts +73 -10
  190. package/src/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.ts +1 -2
  191. package/src/services/crud.service.ts +17 -18
  192. package/src/services/excel.service.ts +6 -0
  193. package/src/services/model-metadata.service.ts +151 -0
  194. package/src/services/setting.service.ts +12 -52
  195. package/src/services/sms/Msg91BaseSMSService.ts +6 -6
  196. package/src/services/sms/Msg91OTPService.ts +3 -2
  197. package/src/services/sms/Msg91SMSService.ts +3 -1
  198. package/src/services/sms/TwilioSMSService.ts +3 -3
  199. package/src/services/solid-introspect.service.ts +22 -0
  200. package/src/solid-core-cli.module.ts +2 -2
  201. package/src/solid-core.module.ts +24 -13
  202. package/src/subscribers/scheduled-job.subscriber.ts +9 -2
  203. package/src/transformers/typeorm/local-date-time-transformer.ts +38 -13
  204. package/dist/jobs/database/sms-publisher-database.service.d.ts.map +0 -1
  205. package/dist/jobs/database/sms-publisher-database.service.js.map +0 -1
  206. package/dist/jobs/database/sms-queue-database-options.d.ts.map +0 -1
  207. package/dist/jobs/database/sms-queue-database-options.js.map +0 -1
  208. package/dist/jobs/database/sms-subscriber-database.service.d.ts.map +0 -1
  209. package/dist/jobs/database/sms-subscriber-database.service.js.map +0 -1
  210. package/dist/jobs/otp-publisher.service.d.ts.map +0 -1
  211. package/dist/jobs/otp-publisher.service.js.map +0 -1
  212. package/dist/jobs/otp-queue-options.d.ts.map +0 -1
  213. package/dist/jobs/otp-queue-options.js.map +0 -1
  214. package/dist/jobs/otp-subscriber.service.d.ts.map +0 -1
  215. package/dist/jobs/otp-subscriber.service.js.map +0 -1
  216. package/dist/jobs/sms-publisher.service.d.ts.map +0 -1
  217. package/dist/jobs/sms-publisher.service.js.map +0 -1
  218. package/dist/jobs/sms-queue-options.d.ts.map +0 -1
  219. package/dist/jobs/sms-queue-options.js.map +0 -1
  220. package/dist/jobs/sms-subscriber.service.d.ts.map +0 -1
  221. package/dist/jobs/sms-subscriber.service.js.map +0 -1
  222. /package/src/jobs/database/{sms-queue-database-options.ts → msg91-sms-queue-database-options.ts} +0 -0
  223. /package/src/jobs/{otp-queue-options.ts → msg91-otp-queue-options.ts} +0 -0
  224. /package/src/jobs/{sms-queue-options.ts → msg91-sms-queue-options.ts} +0 -0
@@ -3,15 +3,18 @@ import { Injectable } from '@nestjs/common';
3
3
  import { QueueMessage } from 'src/interfaces/mq';
4
4
  import { RabbitMqSubscriber } from 'src/services/queues/rabbitmq-subscriber.service';
5
5
  import { Msg91OTPService } from '../services/sms/Msg91OTPService';
6
- import otpQueueOptions from './otp-queue-options';
6
+ import otpQueueOptions from './msg91-otp-queue-options';
7
7
  import { MqMessageService } from 'src/services/mq-message.service';
8
8
  import { MqMessageQueueService } from 'src/services/mq-message-queue.service';
9
9
  import { QueuesModuleOptions } from "../interfaces";
10
+ import { SmsFactory } from 'src/factories/sms.factory';
10
11
 
11
12
  @Injectable()
12
- export class OTPQueueSubscriber extends RabbitMqSubscriber<any> {
13
+ export class Msg91OTPQueueSubscriber extends RabbitMqSubscriber<any> {
13
14
  constructor(
14
- private readonly otpService: Msg91OTPService,
15
+ // private readonly otpService: Msg91OTPService,
16
+ private readonly smsFactory: SmsFactory,
17
+
15
18
  readonly mqMessageService: MqMessageService,
16
19
  readonly mqMessageQueueService: MqMessageQueueService,
17
20
  ) {
@@ -25,6 +28,9 @@ export class OTPQueueSubscriber extends RabbitMqSubscriber<any> {
25
28
  }
26
29
 
27
30
  subscribe(message: QueueMessage<any>) {
28
- this.otpService.sendSMSSynchronously(message);
31
+ const otpService: Msg91OTPService = this.smsFactory.getSmsService(Msg91OTPService.name) as Msg91OTPService;
32
+ return otpService.sendSMSSynchronously(message);
33
+
34
+ // this.otpService.sendSMSSynchronously(message);
29
35
  }
30
36
  }
@@ -1,13 +1,13 @@
1
1
  import { Injectable } from '@nestjs/common';
2
2
 
3
3
  import { RabbitMqPublisher } from 'src/services/queues/rabbitmq-publisher.service';
4
- import smsQueueOptions from './sms-queue-options';
4
+ import smsQueueOptions from './msg91-sms-queue-options';
5
5
  import { MqMessageQueueService } from 'src/services/mq-message-queue.service';
6
6
  import { MqMessageService } from 'src/services/mq-message.service';
7
7
  import { QueuesModuleOptions } from "../interfaces";
8
8
 
9
9
  @Injectable()
10
- export class SmsQueuePublisher extends RabbitMqPublisher<any> {
10
+ export class Msg91SmsQueuePublisher extends RabbitMqPublisher<any> {
11
11
  constructor(
12
12
  protected readonly mqMessageService: MqMessageService,
13
13
  protected readonly mqMessageQueueService: MqMessageQueueService,
@@ -2,16 +2,18 @@ import { Injectable } from '@nestjs/common';
2
2
 
3
3
  import { RabbitMqSubscriber } from 'src/services/queues/rabbitmq-subscriber.service';
4
4
  import { QueueMessage } from 'src/interfaces/mq';
5
- import smsQueueOptions from './sms-queue-options';
5
+ import smsQueueOptions from './msg91-sms-queue-options';
6
6
  import { Msg91SMSService } from '../services/sms/Msg91SMSService';
7
7
  import { MqMessageService } from 'src/services/mq-message.service';
8
8
  import { MqMessageQueueService } from 'src/services/mq-message-queue.service';
9
9
  import { QueuesModuleOptions } from "../interfaces";
10
+ import { SmsFactory } from 'src/factories/sms.factory';
10
11
 
11
12
  @Injectable()
12
- export class SmsQueueSubscriber extends RabbitMqSubscriber<any> {
13
+ export class Msg91SmsQueueSubscriber extends RabbitMqSubscriber<any> {
13
14
  constructor(
14
- private readonly smsService: Msg91SMSService,
15
+ // private readonly smsService: Msg91SMSService,
16
+ private readonly smsFactory: SmsFactory,
15
17
  readonly mqMessageService: MqMessageService,
16
18
  readonly mqMessageQueueService: MqMessageQueueService,
17
19
  ) {
@@ -25,6 +27,9 @@ export class SmsQueueSubscriber extends RabbitMqSubscriber<any> {
25
27
  }
26
28
 
27
29
  subscribe(message: QueueMessage<any>) {
28
- return this.smsService.sendSMSSynchronously(message);
30
+ const smsService: Msg91SMSService = this.smsFactory.getSmsService(Msg91SMSService.name) as Msg91SMSService;
31
+ return smsService.sendSMSSynchronously(message);
32
+
33
+ // return this.smsService.sendSMSSynchronously(message);
29
34
  }
30
35
  }
@@ -8,11 +8,13 @@ import { PollerService } from 'src/services/poller.service';
8
8
  import { TwilioSMSService } from 'src/services/sms/TwilioSMSService';
9
9
  import smsQueueOptions from './twilio-sms-queue-options';
10
10
  import { RabbitMqSubscriber } from 'src/services/queues/rabbitmq-subscriber.service';
11
+ import { SmsFactory } from 'src/factories/sms.factory';
11
12
 
12
13
  @Injectable()
13
14
  export class TwilioSmsQueueSubscriberRabbitmq extends RabbitMqSubscriber<any> {
14
15
  constructor(
15
- private readonly smsService: TwilioSMSService,
16
+ // private readonly smsService: TwilioSMSService,
17
+ private readonly smsFactory: SmsFactory,
16
18
  readonly mqMessageService: MqMessageService,
17
19
  readonly mqMessageQueueService: MqMessageQueueService,
18
20
  readonly poller: PollerService,
@@ -27,6 +29,8 @@ export class TwilioSmsQueueSubscriberRabbitmq extends RabbitMqSubscriber<any> {
27
29
  }
28
30
 
29
31
  subscribe(message: QueueMessage<any>) {
30
- return this.smsService.sendSMSSynchronously(message);
32
+ const smsService: TwilioSMSService = this.smsFactory.getSmsService(TwilioSMSService.name) as TwilioSMSService;
33
+ return smsService.sendSMSSynchronously(message);
34
+ // return this.smsService.sendSMSSynchronously(message);
31
35
  }
32
36
  }
@@ -1,6 +1,7 @@
1
1
  import { forwardRef, Inject, Injectable, Logger } from '@nestjs/common';
2
2
  import * as fs from 'fs';
3
3
  import * as path from 'path';
4
+ import { v4 as uuidv4 } from 'uuid';
4
5
 
5
6
  import { CreateDashboardDto } from 'src/dtos/create-dashboard.dto';
6
7
  import { CreateEmailTemplateDto } from 'src/dtos/create-email-template.dto';
@@ -33,7 +34,7 @@ import { ViewMetadataService } from '../services/view-metadata.service';
33
34
  import solidCoreMetadata from './seed-data/solid-core-metadata.json';
34
35
  import { SystemFieldsSeederService } from './system-fields-seeder.service';
35
36
  // import { CreateScheduledJobDto } from 'src/dtos/create-scheduled-job.dto';
36
- import { ActionMetadata, MENU_ROLE_JOIN_TABLE_NAME, MENU_ROLE_JOIN_TABLE_NAME_MENU_COL, MENU_ROLE_JOIN_TABLE_NAME_ROLE_COL, MenuItemMetadata, ModuleMetadata, RoleMetadata } from 'src';
37
+ import { ActionMetadata, MENU_ROLE_JOIN_TABLE_NAME, MENU_ROLE_JOIN_TABLE_NAME_MENU_COL, MENU_ROLE_JOIN_TABLE_NAME_ROLE_COL, MenuItemMetadata, ModuleMetadata, RoleMetadata, SignUpDto } from 'src';
37
38
  import { ADMIN_ROLE_NAME, INTERNAL_ROLE_NAME, INTERNAL_ROLE_PERMISSIONS, PUBLIC_ROLE_NAME } from 'src/dtos/create-role-metadata.dto';
38
39
  import { CreateSavedFiltersDto } from 'src/dtos/create-saved-filters.dto';
39
40
  import { CreateScheduledJobDto } from 'src/dtos/create-scheduled-job.dto';
@@ -718,12 +719,36 @@ export class ModuleMetadataSeederService {
718
719
  }
719
720
 
720
721
  for (let l = 0; l < users.length; l++) {
721
- const user = users[l];
722
+ const user: SignUpDto = users[l];
722
723
  let exisitingUser = await this.userService.findOneByUsername(user.username);
723
724
  if (!exisitingUser) {
724
- exisitingUser = await this.authenticationService.signUp(user);
725
+ let generatedAdminPassword: string | null = null;
726
+ if (user.username === 'sa') {
727
+ generatedAdminPassword = uuidv4();
728
+ user.password = generatedAdminPassword;
729
+ }
725
730
 
726
- this.logger.log(`Newly created user is ${user}`);
731
+ exisitingUser = await this.authenticationService.signUp(user);
732
+ this.logger.log(`Newly created user ${user.username}`);
733
+
734
+ // Surface the generated SA password clearly to the operator.
735
+ if (generatedAdminPassword) {
736
+ const banner = [
737
+ '',
738
+ '============================================================',
739
+ ' SYSTEM ADMIN USER CREATED',
740
+ '------------------------------------------------------------',
741
+ ' Username : sa',
742
+ ` Password : ${generatedAdminPassword}`,
743
+ '',
744
+ ' Copy and store this password securely now.',
745
+ ' It is shown only once during seeding.',
746
+ '============================================================',
747
+ ''
748
+ ].join('\n');
749
+ // Use console.log to ensure visibility even if logger formatting changes.
750
+ console.log(banner);
751
+ }
727
752
  }
728
753
  //FIXME: Create the user roles assignment logic here.
729
754
  // now add Roles to user.
@@ -857,4 +882,4 @@ export class ModuleMetadataSeederService {
857
882
  }
858
883
  }
859
884
 
860
- }
885
+ }
@@ -0,0 +1,155 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <title>Welcome to {{ solidAppName }}</title>
7
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
8
+
9
+ <style>
10
+ @import url("https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap");
11
+
12
+ body {
13
+ margin: 0;
14
+ padding: 0;
15
+ background-color: #f4f4f7;
16
+ font-family: "Nunito Sans", Helvetica, Arial, sans-serif;
17
+ color: #333;
18
+ }
19
+
20
+ .email-wrapper {
21
+ max-width: 600px;
22
+ margin: 0 auto;
23
+ padding: 20px;
24
+ }
25
+
26
+ .logo {
27
+ text-align: center;
28
+ margin-bottom: 20px;
29
+ }
30
+
31
+ .logo img {
32
+ height: 50px;
33
+ }
34
+
35
+ .content-box {
36
+ background-color: #ffffff;
37
+ padding: 40px;
38
+ border-radius: 8px;
39
+ }
40
+
41
+ .title {
42
+ font-size: 22px;
43
+ margin-bottom: 10px;
44
+ }
45
+
46
+ .intro {
47
+ font-size: 16px;
48
+ line-height: 1.6;
49
+ margin: 0 0 12px 0;
50
+ }
51
+
52
+ .credentials {
53
+ background-color: #f9f9f9;
54
+ padding: 15px;
55
+ border-radius: 5px;
56
+ margin: 18px 0;
57
+ font-size: 16px;
58
+ }
59
+
60
+ .button-container {
61
+ text-align: center;
62
+ margin: 24px 0 30px 0;
63
+ }
64
+
65
+ .button {
66
+ display: inline-block;
67
+ padding: 12px 24px;
68
+ background-color: #722ED1;
69
+ color: #ffffff;
70
+ text-decoration: none;
71
+ font-weight: bold;
72
+ border-radius: 4px;
73
+ }
74
+
75
+ .footer {
76
+ text-align: center;
77
+ font-size: 12px;
78
+ color: #6b6e76;
79
+ margin-top: 40px;
80
+ }
81
+
82
+ @media only screen and (max-width: 600px) {
83
+ .email-wrapper {
84
+ width: 100% !important;
85
+ padding: 20px 0 !important;
86
+ margin: 0;
87
+ }
88
+
89
+ .content-box {
90
+ padding: 20px !important;
91
+ border-radius: 0;
92
+ }
93
+
94
+ .title {
95
+ font-size: 18px !important;
96
+ }
97
+
98
+ .button {
99
+ padding: 10px !important;
100
+ font-size: 14px;
101
+ }
102
+ }
103
+ </style>
104
+ </head>
105
+
106
+ <body>
107
+ <div class="email-wrapper">
108
+ {{#if companyLogoUrl}}
109
+ <div class="logo">
110
+ <img src="{{companyLogoUrl}}" alt="Company Logo" />
111
+ </div>
112
+ {{/if}}
113
+
114
+ <div class="content-box">
115
+ <h2 class="title">Welcome, {{ fullName }}!</h2>
116
+ <p class="intro">
117
+ We’re excited to have you on <strong>{{ solidAppName }}</strong>. Your account has been created and is
118
+ ready to use.
119
+ </p>
120
+ <div class="credentials">
121
+ <p><strong>Username:</strong> {{ userName }}</p>
122
+ <p><strong>Email:</strong> {{ email }}</p>
123
+ </div>
124
+ {{#if frontendLoginPageUrl}}
125
+ <div class="button-container">
126
+ <a class="button" href="{{ frontendLoginPageUrl }}" target="_blank" rel="noopener">Go to Login</a>
127
+ </div>
128
+ {{/if}}
129
+ <div class="credentials">
130
+ <p style="margin:0 0 8px 0;"><strong>How to sign in</strong></p>
131
+ <p class="intro" style="margin:0 0 8px 0;">
132
+ Please check with your system administrator for the login method configured for your account.
133
+ </p>
134
+ <ul style="padding-left:20px; margin:0;">
135
+ <li class="intro" style="margin-bottom:6px;">If password-based sign-in is enabled, your administrator will share or manage your password separately.</li>
136
+ <li class="intro" style="margin-bottom:6px;">If OTP-based sign-in is enabled, you can log in with your email or mobile number and retrieve a one-time code.</li>
137
+ <li class="intro" style="margin-bottom:0;">If Google OAuth is enabled, sign in with your Google Workspace credentials.</li>
138
+ </ul>
139
+ </div>
140
+ <p class="intro">
141
+ If you didn’t request this account, you can safely ignore this email or contact support.
142
+ </p>
143
+ <p class="intro">
144
+ Cheers,<br />
145
+ The {{ solidAppName }} Team
146
+ </p>
147
+ </div>
148
+
149
+ <div class="footer">
150
+ © 2025 <a href="{{ solidAppWebsiteUrl }}" target="_blank">{{ solidAppName }}</a>. All rights reserved.
151
+ </div>
152
+ </div>
153
+ </body>
154
+
155
+ </html>
@@ -0,0 +1,10 @@
1
+ Welcome to {{ solidAppName }}!
2
+ Your account ({{ userName }} / {{ email }}) is ready.
3
+
4
+ To sign in, use the login page {{ frontendLoginPageUrl }} (if provided).
5
+ Check with your administrator for your login method:
6
+ - Password sign-in: admin will share/manage your password.
7
+ - OTP sign-in: use your email or mobile to receive a code.
8
+ - Google OAuth: sign in with your Google Workspace account.
9
+
10
+ If you didn’t request this, ignore this message.
@@ -2564,7 +2564,6 @@
2564
2564
  "tableName": "ss_scheduled_jobs",
2565
2565
  "userKeyFieldUserKey": "scheduleName",
2566
2566
  "isChild": false,
2567
- "enableAuditTracking": true,
2568
2567
  "enableSoftDelete": false,
2569
2568
  "draftPublishWorkflow": false,
2570
2569
  "internationalisation": false,
@@ -2586,8 +2585,7 @@
2586
2585
  "encryptionType": null,
2587
2586
  "decryptWhen": null,
2588
2587
  "columnName": null,
2589
- "isUserKey": true,
2590
- "enableAuditTracking": false
2588
+ "isUserKey": true
2591
2589
  },
2592
2590
  {
2593
2591
  "name": "isActive",
@@ -2601,8 +2599,7 @@
2601
2599
  "encrypt": false,
2602
2600
  "encryptionType": null,
2603
2601
  "decryptWhen": null,
2604
- "columnName": null,
2605
- "enableAuditTracking": false
2602
+ "columnName": null
2606
2603
  },
2607
2604
  {
2608
2605
  "name": "frequency",
@@ -2627,7 +2624,6 @@
2627
2624
  "encryptionType": null,
2628
2625
  "decryptWhen": null,
2629
2626
  "columnName": null,
2630
- "enableAuditTracking": false,
2631
2627
  "isMultiSelect": false
2632
2628
  },
2633
2629
  {
@@ -2644,8 +2640,7 @@
2644
2640
  "encrypt": false,
2645
2641
  "encryptionType": null,
2646
2642
  "decryptWhen": null,
2647
- "columnName": null,
2648
- "enableAuditTracking": false
2643
+ "columnName": null
2649
2644
  },
2650
2645
  {
2651
2646
  "name": "endTime",
@@ -2661,8 +2656,7 @@
2661
2656
  "encrypt": false,
2662
2657
  "encryptionType": null,
2663
2658
  "decryptWhen": null,
2664
- "columnName": null,
2665
- "enableAuditTracking": false
2659
+ "columnName": null
2666
2660
  },
2667
2661
  {
2668
2662
  "name": "startDate",
@@ -2678,8 +2672,7 @@
2678
2672
  "encrypt": false,
2679
2673
  "encryptionType": null,
2680
2674
  "decryptWhen": null,
2681
- "columnName": null,
2682
- "enableAuditTracking": false
2675
+ "columnName": null
2683
2676
  },
2684
2677
  {
2685
2678
  "name": "endDate",
@@ -2695,8 +2688,7 @@
2695
2688
  "encrypt": false,
2696
2689
  "encryptionType": null,
2697
2690
  "decryptWhen": null,
2698
- "columnName": null,
2699
- "enableAuditTracking": false
2691
+ "columnName": null
2700
2692
  },
2701
2693
  {
2702
2694
  "name": "dayOfMonth",
@@ -2714,8 +2706,7 @@
2714
2706
  "encrypt": false,
2715
2707
  "encryptionType": null,
2716
2708
  "decryptWhen": null,
2717
- "columnName": null,
2718
- "enableAuditTracking": false
2709
+ "columnName": null
2719
2710
  },
2720
2711
  {
2721
2712
  "name": "lastRunAt",
@@ -2730,8 +2721,7 @@
2730
2721
  "encrypt": false,
2731
2722
  "encryptionType": null,
2732
2723
  "decryptWhen": null,
2733
- "columnName": null,
2734
- "enableAuditTracking": false
2724
+ "columnName": null
2735
2725
  },
2736
2726
  {
2737
2727
  "name": "nextRunAt",
@@ -2746,8 +2736,7 @@
2746
2736
  "encrypt": false,
2747
2737
  "encryptionType": null,
2748
2738
  "decryptWhen": null,
2749
- "columnName": null,
2750
- "enableAuditTracking": false
2739
+ "columnName": null
2751
2740
  },
2752
2741
  {
2753
2742
  "name": "dayOfWeek",
@@ -2774,7 +2763,6 @@
2774
2763
  "encryptionType": null,
2775
2764
  "decryptWhen": null,
2776
2765
  "columnName": null,
2777
- "enableAuditTracking": false,
2778
2766
  "isMultiSelect": true
2779
2767
  },
2780
2768
  {
@@ -2795,7 +2783,6 @@
2795
2783
  "decryptWhen": null,
2796
2784
  "columnName": null,
2797
2785
  "isUserKey": false,
2798
- "enableAuditTracking": false,
2799
2786
  "selectionValueType": "string",
2800
2787
  "selectionDynamicProvider": "ListOfScheduledJobsSelectionProvider",
2801
2788
  "selectionDynamicProviderCtxt": "{}"
@@ -5269,9 +5256,9 @@
5269
5256
  ],
5270
5257
  "users": [
5271
5258
  {
5272
- "username": "admin@example.service.com",
5273
- "email": "admin@example.service.com",
5274
- "password": "Admin@3214$",
5259
+ "username": "sa",
5260
+ "email": "sa@solidxai.com",
5261
+ "password": "",
5275
5262
  "forcePasswordChange": true,
5276
5263
  "fullName": "Default Admin",
5277
5264
  "roles": [
@@ -12457,6 +12444,15 @@
12457
12444
  "description": "This template notifies users that their account password was successfully changed.",
12458
12445
  "active": true,
12459
12446
  "type": "text"
12447
+ },
12448
+ {
12449
+ "name": "email-on-signup",
12450
+ "displayName": "Default: Email On Signup",
12451
+ "body": "email-on-signup.handlebars.html",
12452
+ "subject": "Welcome to {{solidAppName}}",
12453
+ "description": "Welcome email sent to users after signup.",
12454
+ "active": true,
12455
+ "type": "text"
12460
12456
  }
12461
12457
  ],
12462
12458
  "smsTemplates": [
@@ -12486,6 +12482,15 @@
12486
12482
  "smsProviderTemplateId": "666bd246d6fc051047560595",
12487
12483
  "active": true,
12488
12484
  "type": "text"
12485
+ },
12486
+ {
12487
+ "name": "text-on-signup",
12488
+ "displayName": "Default: Text On Signup",
12489
+ "body": "text-on-signup.handlebars.txt",
12490
+ "description": "Welcome SMS sent to users after signup.",
12491
+ "smsProviderTemplateId": "666bd246d6fc051047560595",
12492
+ "active": true,
12493
+ "type": "text"
12489
12494
  }
12490
12495
  ],
12491
12496
  "mediaStorageProviders": [
@@ -12526,4 +12531,4 @@
12526
12531
  }
12527
12532
  ],
12528
12533
  "modelSequences": []
12529
- }
12534
+ }
@@ -1,6 +1,7 @@
1
1
  import { Injectable, Logger } from '@nestjs/common';
2
2
  import { AuthenticationService } from '../services/authentication.service';
3
3
  import { UserService } from '../services/user.service';
4
+ import { v4 as uuidv4 } from 'uuid';
4
5
 
5
6
  @Injectable()
6
7
  export class UserSeederService {
@@ -13,13 +14,13 @@ export class UserSeederService {
13
14
 
14
15
  async seed() {
15
16
  // see if the user already exists,
16
- let user = await this.userService.findOneByUsername("admin@example.service.com");
17
+ let user = await this.userService.findOneByUsername("sa");
17
18
 
18
19
  if (!user) {
19
20
  user = await this.authenticationService.signUp({
20
- username: 'admin@example.service.com',
21
- email: 'admin@example.service.com',
22
- password: 'Admin@3214$',
21
+ username: 'sa',
22
+ email: 'sa@solidxai.com',
23
+ password: uuidv4(),
23
24
  });
24
25
 
25
26
  this.logger.log(`Newly created user is ${user}`);