@aldb2b/common 1.0.562 → 1.0.564

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.
@@ -11,13 +11,7 @@ const common_1 = require("@nestjs/common");
11
11
  const mongoose_providers_1 = require("./mongoose.providers");
12
12
  const model_providers_1 = require("./models/model.providers");
13
13
  const config_1 = require("@nestjs/config");
14
- const audit_log_service_1 = require("./models/common/services/audit-log.service");
15
14
  const audit_log_controller_1 = require("./models/common/controllers/audit-log.controller");
16
- const audit_log_repository_1 = require("./models/common/entities/audit-log.repository");
17
- const database_model_enum_1 = require("../enums/database-model.enum");
18
- const service_provide_enum_1 = require("../enums/service-provide.enum");
19
- const repository_provide_enum_1 = require("../enums/repository-provide.enum");
20
- const core_1 = require("@nestjs/core");
21
15
  let EntitiesModule = class EntitiesModule {
22
16
  };
23
17
  exports.EntitiesModule = EntitiesModule;
@@ -30,25 +24,8 @@ exports.EntitiesModule = EntitiesModule = __decorate([
30
24
  }),
31
25
  ],
32
26
  controllers: [audit_log_controller_1.AuditLogController],
33
- providers: [
34
- ...mongoose_providers_1.mongooseProviders,
35
- ...model_providers_1.modelProviders,
36
- {
37
- provide: repository_provide_enum_1.RepositoryProvide.AUDIT_LOG_Repository,
38
- inject: [database_model_enum_1.DatabaseModel.AUDIT_LOG_MODEL],
39
- useFactory: (auditModel) => new audit_log_repository_1.AuditLogRepository(auditModel),
40
- },
41
- {
42
- provide: service_provide_enum_1.ServiceProvide.AUDIT_LOG_SERVICE,
43
- inject: [
44
- core_1.REQUEST,
45
- repository_provide_enum_1.RepositoryProvide.AUDIT_LOG_Repository,
46
- database_model_enum_1.DatabaseModel.AUDIT_LOG_MODEL,
47
- ],
48
- useFactory: (req, auditLogRepository, userModel) => new audit_log_service_1.AuditLogService(req, auditLogRepository, userModel),
49
- },
50
- ],
51
- exports: [...mongoose_providers_1.mongooseProviders, ...model_providers_1.modelProviders, audit_log_service_1.AuditLogService],
27
+ providers: [...mongoose_providers_1.mongooseProviders, ...model_providers_1.modelProviders],
28
+ exports: [...mongoose_providers_1.mongooseProviders, ...model_providers_1.modelProviders],
52
29
  })
53
30
  ], EntitiesModule);
54
31
  //# sourceMappingURL=entities.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entities.module.js","sourceRoot":"","sources":["../../src/entities/entities.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+C;AAC/C,6DAAwD;AACxD,8DAAyD;AACzD,2CAA6C;AAC7C,kFAA4E;AAC5E,2FAAqF;AACrF,wFAAkF;AAGlF,sEAA4D;AAC5D,wEAA8D;AAC9D,8EAAoE;AAEpE,uCAAsC;AAmC/B,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAjC1B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,CAAC;gBACnB,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;QACD,WAAW,EAAE,CAAC,yCAAkB,CAAC;QACjC,SAAS,EAAE;YACT,GAAG,sCAAiB;YACpB,GAAG,gCAAc;YACjB;gBACE,OAAO,EAAE,2CAAiB,CAAC,oBAAoB;gBAC/C,MAAM,EAAE,CAAC,mCAAa,CAAC,eAAe,CAAC;gBACvC,UAAU,EAAE,CAAC,UAAiC,EAAE,EAAE,CAChD,IAAI,yCAAkB,CAAC,UAAU,CAAC;aACrC;YACD;gBACE,OAAO,EAAE,qCAAc,CAAC,iBAAiB;gBACzC,MAAM,EAAE;oBACN,cAAO;oBACP,2CAAiB,CAAC,oBAAoB;oBACtC,mCAAa,CAAC,eAAe;iBAC9B;gBACD,UAAU,EAAE,CACV,GAAY,EACZ,kBAAsC,EACtC,SAA4B,EAC5B,EAAE,CAAC,IAAI,mCAAe,CAAC,GAAG,EAAE,kBAAkB,EAAE,SAAS,CAAC;aAC7D;SACF;QACD,OAAO,EAAE,CAAC,GAAG,sCAAiB,EAAE,GAAG,gCAAc,EAAE,mCAAe,CAAC;KACpE,CAAC;GACW,cAAc,CAAG"}
1
+ {"version":3,"file":"entities.module.js","sourceRoot":"","sources":["../../src/entities/entities.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+C;AAC/C,6DAAwD;AACxD,8DAAyD;AACzD,2CAA6C;AAE7C,2FAAqF;AAqB9E,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAX1B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,CAAC;gBACnB,QAAQ,EAAE,IAAI;aACf,CAAC;SACH;QACD,WAAW,EAAE,CAAC,yCAAkB,CAAC;QACjC,SAAS,EAAE,CAAC,GAAG,sCAAiB,EAAE,GAAG,gCAAc,CAAC;QACpD,OAAO,EAAE,CAAC,GAAG,sCAAiB,EAAE,GAAG,gCAAc,CAAC;KACnD,CAAC;GACW,cAAc,CAAG"}
@@ -51,10 +51,25 @@
51
51
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
52
52
  import { DatabaseModel } from '../../../enums/database-model.enum';
53
53
  import { DatabaseConnection } from '../../../enums/database-connection.enum';
54
- export declare const commonProviders: {
54
+ import { AuditLog } from './entities/audit-log.entity';
55
+ import { RepositoryProvide } from 'src/enums/repository-provide.enum';
56
+ import { CustomModel } from 'src/db/CustomModel';
57
+ import { AuditLogRepository } from './entities/audit-log.repository';
58
+ import { ServiceProvide } from 'src/enums/service-provide.enum';
59
+ import { User } from '../users';
60
+ import { AuditLogService } from './services/audit-log.service';
61
+ export declare const commonProviders: ({
55
62
  provide: DatabaseModel;
56
- useFactory: (connection: import("mongoose").Connection, eventConnection: import("mongoose").Connection, userConnection: import("mongoose").Connection) => import("mongoose").Model<import("./entities/audit-log.entity").AuditLog, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./entities/audit-log.entity").AuditLog> & import("./entities/audit-log.entity").AuditLog & Required<{
63
+ useFactory: (connection: import("mongoose").Connection, eventConnection: import("mongoose").Connection, userConnection: import("mongoose").Connection) => import("mongoose").Model<AuditLog, {}, {}, {}, import("mongoose").Document<unknown, {}, AuditLog> & AuditLog & Required<{
57
64
  _id: string;
58
65
  }>, any>;
59
66
  inject: DatabaseConnection[];
60
- }[];
67
+ } | {
68
+ provide: RepositoryProvide;
69
+ inject: DatabaseModel[];
70
+ useFactory: (auditModel: CustomModel<AuditLog>) => AuditLogRepository;
71
+ } | {
72
+ provide: ServiceProvide;
73
+ inject: string[];
74
+ useFactory: (req: Request, auditLogRepository: AuditLogRepository, userModel: CustomModel<User>) => AuditLogService;
75
+ })[];
@@ -4,6 +4,11 @@ exports.commonProviders = void 0;
4
4
  const database_model_enum_1 = require("../../../enums/database-model.enum");
5
5
  const database_connection_enum_1 = require("../../../enums/database-connection.enum");
6
6
  const audit_log_entity_1 = require("./entities/audit-log.entity");
7
+ const repository_provide_enum_1 = require("src/enums/repository-provide.enum");
8
+ const audit_log_repository_1 = require("./entities/audit-log.repository");
9
+ const service_provide_enum_1 = require("src/enums/service-provide.enum");
10
+ const audit_log_service_1 = require("./services/audit-log.service");
11
+ const core_1 = require("@nestjs/core");
7
12
  exports.commonProviders = [
8
13
  {
9
14
  provide: database_model_enum_1.DatabaseModel.AUDIT_LOG_MODEL,
@@ -14,5 +19,19 @@ exports.commonProviders = [
14
19
  database_connection_enum_1.DatabaseConnection.USER_CONNECTION,
15
20
  ],
16
21
  },
22
+ {
23
+ provide: repository_provide_enum_1.RepositoryProvide.AUDIT_LOG_REPOSITORY,
24
+ inject: [database_model_enum_1.DatabaseModel.AUDIT_LOG_MODEL],
25
+ useFactory: (auditModel) => new audit_log_repository_1.AuditLogRepository(auditModel),
26
+ },
27
+ {
28
+ provide: service_provide_enum_1.ServiceProvide.AUDIT_LOG_SERVICE,
29
+ inject: [
30
+ core_1.REQUEST,
31
+ repository_provide_enum_1.RepositoryProvide.AUDIT_LOG_REPOSITORY,
32
+ database_model_enum_1.DatabaseModel.USER_MODEL,
33
+ ],
34
+ useFactory: (req, auditLogRepository, userModel) => new audit_log_service_1.AuditLogService(req, auditLogRepository, userModel),
35
+ },
17
36
  ];
18
37
  //# sourceMappingURL=common.provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/common/common.provider.ts"],"names":[],"mappings":";;;AAAA,4EAAkE;AAClE,sFAA4E;AAC5E,kEAA6D;AAEhD,QAAA,eAAe,GAAG;IAC7B;QACE,OAAO,EAAE,mCAAa,CAAC,eAAe;QACtC,UAAU,EAAE,kCAAe;QAC3B,MAAM,EAAE;YACN,6CAAkB,CAAC,kBAAkB;YACrC,6CAAkB,CAAC,gBAAgB;YACnC,6CAAkB,CAAC,eAAe;SACnC;KACF;CACF,CAAA"}
1
+ {"version":3,"file":"common.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/common/common.provider.ts"],"names":[],"mappings":";;;AAAA,4EAAkE;AAClE,sFAA4E;AAC5E,kEAAuE;AACvE,+EAAqE;AAErE,0EAAoE;AACpE,yEAA+D;AAE/D,oEAA8D;AAC9D,uCAAsC;AAEzB,QAAA,eAAe,GAAG;IAC7B;QACE,OAAO,EAAE,mCAAa,CAAC,eAAe;QACtC,UAAU,EAAE,kCAAe;QAC3B,MAAM,EAAE;YACN,6CAAkB,CAAC,kBAAkB;YACrC,6CAAkB,CAAC,gBAAgB;YACnC,6CAAkB,CAAC,eAAe;SACnC;KACF;IACD;QACE,OAAO,EAAE,2CAAiB,CAAC,oBAAoB;QAC/C,MAAM,EAAE,CAAC,mCAAa,CAAC,eAAe,CAAC;QACvC,UAAU,EAAE,CAAC,UAAiC,EAAE,EAAE,CAChD,IAAI,yCAAkB,CAAC,UAAU,CAAC;KACrC;IACD;QACE,OAAO,EAAE,qCAAc,CAAC,iBAAiB;QACzC,MAAM,EAAE;YACN,cAAO;YACP,2CAAiB,CAAC,oBAAoB;YACtC,mCAAa,CAAC,UAAU;SACzB;QACD,UAAU,EAAE,CACV,GAAY,EACZ,kBAAsC,EACtC,SAA4B,EAC5B,EAAE,CAAC,IAAI,mCAAe,CAAC,GAAG,EAAE,kBAAkB,EAAE,SAAS,CAAC;KAC7D;CACF,CAAA"}
@@ -49,8 +49,16 @@
49
49
  /// <reference types="mongoose/types/inferschematype" />
50
50
  /// <reference types="mongoose/types/inferrawdoctype" />
51
51
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
52
- export declare const modelProviders: {
52
+ export declare const modelProviders: ({
53
53
  provide: import("../..").DatabaseModel;
54
54
  useFactory: (connection: import("mongoose").Connection, companyConnection: import("mongoose").Connection, eventConnection: import("mongoose").Connection) => unknown;
55
55
  inject: import("../..").DatabaseConnection[];
56
- }[];
56
+ } | {
57
+ provide: import("../..").RepositoryProvide;
58
+ inject: import("../..").DatabaseModel[];
59
+ useFactory: (auditModel: import("../..").CustomModel<import("./common").AuditLog>) => import("./common").AuditLogRepository;
60
+ } | {
61
+ provide: import("../..").ServiceProvide;
62
+ inject: string[];
63
+ useFactory: (req: Request, auditLogRepository: import("./common").AuditLogRepository, userModel: import("../..").CustomModel<import("./users").User>) => import("./common").AuditLogService;
64
+ })[];
@@ -1,3 +1,3 @@
1
1
  export declare enum RepositoryProvide {
2
- AUDIT_LOG_Repository = "AuditLogRepository"
2
+ AUDIT_LOG_REPOSITORY = "AuditLogRepository"
3
3
  }
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RepositoryProvide = void 0;
4
4
  var RepositoryProvide;
5
5
  (function (RepositoryProvide) {
6
- RepositoryProvide["AUDIT_LOG_Repository"] = "AuditLogRepository";
6
+ RepositoryProvide["AUDIT_LOG_REPOSITORY"] = "AuditLogRepository";
7
7
  })(RepositoryProvide || (exports.RepositoryProvide = RepositoryProvide = {}));
8
8
  //# sourceMappingURL=repository-provide.enum.js.map