@nest-omni/core 4.1.3-11 → 4.1.3-13
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/LICENSE +17 -0
- package/README.md +444 -0
- package/build.sh +45 -0
- package/{audit → dist/audit}/audit.module.js +17 -0
- package/dist/audit/controllers/audit.controller.d.ts +108 -0
- package/{audit → dist/audit}/controllers/audit.controller.js +50 -0
- package/dist/audit/decorators/audit-action.decorator.d.ts +74 -0
- package/dist/audit/decorators/audit-action.decorator.js +42 -0
- package/{audit → dist/audit}/decorators/entity-audit.decorator.d.ts +10 -1
- package/{audit → dist/audit}/decorators/entity-audit.decorator.js +34 -16
- package/{audit → dist/audit}/decorators/index.d.ts +1 -0
- package/{audit → dist/audit}/decorators/index.js +1 -0
- package/dist/audit/entities/audit-action-summary.entity.d.ts +23 -0
- package/dist/audit/entities/audit-action-summary.entity.js +101 -0
- package/{audit → dist/audit}/entities/entity-audit-log.entity.d.ts +3 -0
- package/{audit → dist/audit}/entities/entity-audit-log.entity.js +25 -2
- package/{audit → dist/audit}/entities/entity-transaction.entity.d.ts +3 -4
- package/{audit → dist/audit}/entities/entity-transaction.entity.js +10 -3
- package/{audit → dist/audit}/entities/index.d.ts +1 -0
- package/{audit → dist/audit}/entities/index.js +1 -0
- package/{audit → dist/audit}/entities/manual-operation-log.entity.js +8 -1
- package/{audit → dist/audit}/enums/audit.enums.d.ts +1 -10
- package/{audit → dist/audit}/enums/audit.enums.js +7 -17
- package/{audit → dist/audit}/index.d.ts +2 -1
- package/{audit → dist/audit}/index.js +5 -1
- package/dist/audit/interceptors/audit-action.interceptor.d.ts +38 -0
- package/dist/audit/interceptors/audit-action.interceptor.js +215 -0
- package/dist/audit/interceptors/index.d.ts +2 -0
- package/{audit → dist/audit}/interceptors/index.js +1 -0
- package/{audit → dist/audit}/interfaces/audit.interfaces.d.ts +10 -5
- package/dist/audit/services/audit-action.service.d.ts +141 -0
- package/dist/audit/services/audit-action.service.js +244 -0
- package/dist/audit/services/audit-context.service.d.ts +107 -0
- package/dist/audit/services/audit-context.service.js +240 -0
- package/{audit → dist/audit}/services/entity-audit.service.d.ts +104 -3
- package/{audit → dist/audit}/services/entity-audit.service.js +306 -9
- package/{audit → dist/audit}/services/index.d.ts +1 -0
- package/{audit → dist/audit}/services/index.js +1 -0
- package/{audit → dist/audit}/services/manual-audit-log.service.d.ts +24 -23
- package/{audit → dist/audit}/services/manual-audit-log.service.js +32 -53
- package/{audit → dist/audit}/services/operation-description.service.d.ts +13 -3
- package/{audit → dist/audit}/services/operation-description.service.js +161 -24
- package/{audit → dist/audit}/services/transaction-audit.service.js +3 -3
- package/{audit → dist/audit}/subscribers/entity-audit.subscriber.d.ts +4 -0
- package/{audit → dist/audit}/subscribers/entity-audit.subscriber.js +47 -0
- package/dist/cache/dependencies/db.dependency.d.ts +109 -0
- package/{cache → dist/cache}/dependencies/db.dependency.js +64 -13
- package/{common → dist/common}/boilerplate.polyfill.js +1 -1
- package/dist/file-upload/controllers/file-access.controller.d.ts +23 -0
- package/dist/file-upload/controllers/file-access.controller.js +128 -0
- package/dist/file-upload/decorators/column.decorator.d.ts +151 -0
- package/dist/file-upload/decorators/column.decorator.js +273 -0
- package/dist/file-upload/decorators/csv-data.decorator.d.ts +30 -0
- package/dist/file-upload/decorators/csv-data.decorator.js +85 -0
- package/dist/file-upload/decorators/csv-import.decorator.d.ts +34 -0
- package/dist/file-upload/decorators/csv-import.decorator.js +24 -0
- package/dist/file-upload/decorators/examples/column-mapping.example.d.ts +76 -0
- package/dist/file-upload/decorators/examples/column-mapping.example.js +122 -0
- package/dist/file-upload/decorators/excel-data.decorator.d.ts +30 -0
- package/dist/file-upload/decorators/excel-data.decorator.js +85 -0
- package/dist/file-upload/decorators/file-upload.decorator.d.ts +83 -0
- package/dist/file-upload/decorators/file-upload.decorator.js +172 -0
- package/dist/file-upload/decorators/index.d.ts +5 -0
- package/dist/file-upload/decorators/index.js +38 -0
- package/dist/file-upload/decorators/process.decorator.d.ts +40 -0
- package/dist/file-upload/decorators/process.decorator.js +52 -0
- package/dist/file-upload/decorators/validate-data.decorator.d.ts +91 -0
- package/dist/file-upload/decorators/validate-data.decorator.js +39 -0
- package/dist/file-upload/dto/create-file.dto.d.ts +24 -0
- package/dist/file-upload/dto/create-file.dto.js +112 -0
- package/dist/file-upload/dto/find-files.dto.d.ts +15 -0
- package/dist/file-upload/dto/find-files.dto.js +76 -0
- package/dist/file-upload/dto/index.d.ts +4 -0
- package/dist/file-upload/dto/index.js +20 -0
- package/dist/file-upload/dto/pagination.dto.d.ts +7 -0
- package/dist/file-upload/dto/pagination.dto.js +39 -0
- package/dist/file-upload/dto/update-file.dto.d.ts +15 -0
- package/dist/file-upload/dto/update-file.dto.js +67 -0
- package/dist/file-upload/entities/file-metadata.entity.d.ts +25 -0
- package/dist/file-upload/entities/file-metadata.entity.js +76 -0
- package/dist/file-upload/entities/file.entity.d.ts +114 -0
- package/dist/file-upload/entities/file.entity.js +350 -0
- package/dist/file-upload/entities/index.d.ts +2 -0
- package/dist/file-upload/entities/index.js +18 -0
- package/dist/file-upload/enums/file-type.enum.d.ts +72 -0
- package/dist/file-upload/enums/file-type.enum.js +212 -0
- package/dist/file-upload/exceptions/file-upload.exception.d.ts +57 -0
- package/dist/file-upload/exceptions/file-upload.exception.js +120 -0
- package/dist/file-upload/exceptions/index.d.ts +1 -0
- package/dist/file-upload/exceptions/index.js +17 -0
- package/dist/file-upload/file-upload.module.d.ts +89 -0
- package/dist/file-upload/file-upload.module.js +292 -0
- package/dist/file-upload/index.d.ts +37 -0
- package/dist/file-upload/index.js +77 -0
- package/dist/file-upload/interceptors/file-upload.interceptor.d.ts +101 -0
- package/dist/file-upload/interceptors/file-upload.interceptor.js +594 -0
- package/dist/file-upload/interceptors/index.d.ts +1 -0
- package/dist/file-upload/interceptors/index.js +17 -0
- package/dist/file-upload/interfaces/custom-file-type.interface.d.ts +72 -0
- package/dist/file-upload/interfaces/file-buffer.interface.d.ts +72 -0
- package/dist/file-upload/interfaces/file-entity.interface.d.ts +142 -0
- package/dist/file-upload/interfaces/file-entity.interface.js +28 -0
- package/dist/file-upload/interfaces/file-metadata.interface.d.ts +21 -0
- package/dist/file-upload/interfaces/file-processor.interface.d.ts +93 -0
- package/dist/file-upload/interfaces/file-upload-options.interface.d.ts +74 -0
- package/dist/file-upload/interfaces/file-upload-options.interface.js +5 -0
- package/dist/file-upload/interfaces/index.d.ts +7 -0
- package/dist/file-upload/interfaces/index.js +24 -0
- package/dist/file-upload/interfaces/processor-options.interface.d.ts +102 -0
- package/dist/file-upload/interfaces/storage-provider.interface.d.ts +239 -0
- package/dist/file-upload/interfaces/upload-options.interface.d.ts +19 -0
- package/dist/file-upload/interfaces/upload-options.interface.js +2 -0
- package/dist/file-upload/processors/csv.processor.d.ts +98 -0
- package/dist/file-upload/processors/csv.processor.js +391 -0
- package/dist/file-upload/processors/excel.processor.d.ts +130 -0
- package/dist/file-upload/processors/excel.processor.js +547 -0
- package/dist/file-upload/processors/image.processor.d.ts +199 -0
- package/dist/file-upload/processors/image.processor.js +377 -0
- package/dist/file-upload/providers/index.d.ts +2 -0
- package/dist/file-upload/providers/index.js +18 -0
- package/dist/file-upload/providers/local-storage.provider.d.ts +98 -0
- package/dist/file-upload/providers/local-storage.provider.js +484 -0
- package/dist/file-upload/providers/s3-storage.provider.d.ts +87 -0
- package/dist/file-upload/providers/s3-storage.provider.js +455 -0
- package/dist/file-upload/services/file-signature-validator.service.d.ts +118 -0
- package/dist/file-upload/services/file-signature-validator.service.js +376 -0
- package/dist/file-upload/services/file.service.d.ts +193 -0
- package/dist/file-upload/services/file.service.js +638 -0
- package/dist/file-upload/services/index.d.ts +4 -0
- package/dist/file-upload/services/index.js +20 -0
- package/dist/file-upload/services/malicious-file-detector.service.d.ts +300 -0
- package/dist/file-upload/services/malicious-file-detector.service.js +1234 -0
- package/dist/file-upload/services/mime-registry.service.d.ts +47 -0
- package/dist/file-upload/services/mime-registry.service.js +167 -0
- package/dist/file-upload/utils/checksum.util.d.ts +28 -0
- package/dist/file-upload/utils/checksum.util.js +65 -0
- package/dist/file-upload/utils/dynamic-import.util.d.ts +54 -0
- package/dist/file-upload/utils/dynamic-import.util.js +156 -0
- package/dist/file-upload/utils/filename.util.d.ts +59 -0
- package/dist/file-upload/utils/filename.util.js +184 -0
- package/dist/file-upload/utils/filepath.util.d.ts +70 -0
- package/dist/file-upload/utils/filepath.util.js +152 -0
- package/dist/file-upload/utils/index.d.ts +4 -0
- package/dist/file-upload/utils/index.js +20 -0
- package/{http-client → dist/http-client}/decorators/http-client.decorators.d.ts +4 -2
- package/{http-client → dist/http-client}/decorators/http-client.decorators.js +2 -1
- package/{http-client → dist/http-client}/entities/http-log.entity.js +1 -9
- package/dist/http-client/examples/proxy-from-environment.example.d.ts +133 -0
- package/dist/http-client/examples/proxy-from-environment.example.js +410 -0
- package/{http-client → dist/http-client}/http-client.module.js +65 -6
- package/{http-client → dist/http-client}/interfaces/http-client-config.interface.d.ts +6 -0
- package/dist/http-client/interfaces/http-client-config.interface.js +2 -0
- package/{http-client → dist/http-client}/services/http-client.service.d.ts +8 -0
- package/{http-client → dist/http-client}/services/http-client.service.js +61 -17
- package/{http-client → dist/http-client}/services/logging.service.d.ts +1 -1
- package/{http-client → dist/http-client}/services/logging.service.js +74 -58
- package/{http-client → dist/http-client}/utils/index.d.ts +1 -0
- package/{http-client → dist/http-client}/utils/index.js +1 -0
- package/dist/http-client/utils/proxy-environment.util.d.ts +42 -0
- package/dist/http-client/utils/proxy-environment.util.js +148 -0
- package/{index.d.ts → dist/index.d.ts} +3 -1
- package/{index.js → dist/index.js} +4 -1
- package/dist/interfaces/IApiFile.js +2 -0
- package/dist/interfaces/IFile.js +2 -0
- package/dist/interfaces/ITranslationDecoratorInterface.js +2 -0
- package/dist/interfaces/response.js +2 -0
- package/dist/package.json +105 -0
- package/{setup → dist/setup}/bootstrap.setup.d.ts +1 -0
- package/{setup → dist/setup}/bootstrap.setup.js +1 -0
- package/dist/shared/index.d.ts +2 -0
- package/{shared → dist/shared}/index.js +1 -1
- package/{shared/serviceRegistryModule.js → dist/shared/service-registry.module.js} +18 -12
- package/{shared → dist/shared}/services/index.d.ts +0 -1
- package/{shared → dist/shared}/services/index.js +0 -1
- package/dist/transaction/__tests__/mocks.d.ts +9 -0
- package/dist/transaction/__tests__/mocks.js +33 -0
- package/dist/transaction/base-service-transaction.d.ts +99 -0
- package/dist/transaction/base-service-transaction.js +286 -0
- package/dist/transaction/cls-compatibility.service.d.ts +55 -0
- package/dist/transaction/cls-compatibility.service.js +127 -0
- package/dist/transaction/data-source-registry.d.ts +91 -0
- package/dist/transaction/data-source-registry.js +349 -0
- package/dist/transaction/data-source.util.d.ts +142 -0
- package/dist/transaction/data-source.util.js +330 -0
- package/dist/transaction/database-adapter.d.ts +44 -0
- package/dist/transaction/database-adapter.js +240 -0
- package/dist/transaction/decorators/entity-datasource.decorator.d.ts +62 -0
- package/dist/transaction/decorators/entity-datasource.decorator.js +105 -0
- package/dist/transaction/index.d.ts +15 -0
- package/dist/transaction/index.js +68 -0
- package/dist/transaction/logging-transactional.interceptor.d.ts +18 -0
- package/dist/transaction/logging-transactional.interceptor.js +163 -0
- package/dist/transaction/transaction-context.service.d.ts +137 -0
- package/dist/transaction/transaction-context.service.js +411 -0
- package/dist/transaction/transaction-manager.d.ts +230 -0
- package/dist/transaction/transaction-manager.js +1001 -0
- package/dist/transaction/transaction-synchronization.d.ts +171 -0
- package/dist/transaction/transaction-synchronization.js +380 -0
- package/dist/transaction/transaction.errors.d.ts +91 -0
- package/dist/transaction/transaction.errors.js +206 -0
- package/dist/transaction/transaction.module.d.ts +30 -0
- package/dist/transaction/transaction.module.js +98 -0
- package/dist/transaction/transactional.decorator.d.ts +82 -0
- package/dist/transaction/transactional.decorator.js +319 -0
- package/dist/transaction/typeorm-module-wrapper.d.ts +96 -0
- package/dist/transaction/typeorm-module-wrapper.js +197 -0
- package/{validators → dist/validators}/file-mimetype.validator.d.ts +0 -2
- package/{validators → dist/validators}/file-mimetype.validator.js +4 -6
- package/{validators → dist/validators}/is-exists.validator.d.ts +21 -7
- package/{validators → dist/validators}/is-exists.validator.js +30 -7
- package/{validators → dist/validators}/is-unique.validator.d.ts +14 -6
- package/{validators → dist/validators}/is-unique.validator.js +31 -11
- package/dist/vault/interfaces/vault-options.interface.js +2 -0
- package/package.json +10 -7
- package/tsconfig.build.json +16 -0
- package/audit/controllers/audit.controller.d.ts +0 -44
- package/audit/interceptors/index.d.ts +0 -1
- package/audit/services/audit-context.service.d.ts +0 -25
- package/audit/services/audit-context.service.js +0 -70
- package/cache/dependencies/db.dependency.d.ts +0 -60
- package/shared/index.d.ts +0 -2
- package/shared/services/validator.service.d.ts +0 -3
- package/shared/services/validator.service.js +0 -20
- /package/{.hygen → dist/.hygen}/new/crud/controller.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/create.dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/entity.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/get.dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/index-dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/index-response.dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/module.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/prompt.js +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/service.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/crud/update.dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/controller.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/create-command.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/create.dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/entity.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/get-query.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/module.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/not-found.exception.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/page-options.dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/prompt.js +0 -0
- /package/{.hygen → dist/.hygen}/new/module/repository.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/service.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/translation-dto.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/translation-entity.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/translation-repository.ejs.t +0 -0
- /package/{.hygen → dist/.hygen}/new/module/update.dto.ejs.t +0 -0
- /package/{.hygen.js → dist/.hygen.js} +0 -0
- /package/{audit → dist/audit}/audit.module.d.ts +0 -0
- /package/{audit → dist/audit}/controllers/index.d.ts +0 -0
- /package/{audit → dist/audit}/controllers/index.js +0 -0
- /package/{audit → dist/audit}/decorators/audit-controller.decorator.d.ts +0 -0
- /package/{audit → dist/audit}/decorators/audit-controller.decorator.js +0 -0
- /package/{audit → dist/audit}/decorators/audit-operation.decorator.d.ts +0 -0
- /package/{audit → dist/audit}/decorators/audit-operation.decorator.js +0 -0
- /package/{audit → dist/audit}/dto/audit-log-query.dto.d.ts +0 -0
- /package/{audit → dist/audit}/dto/audit-log-query.dto.js +0 -0
- /package/{audit → dist/audit}/dto/begin-transaction.dto.d.ts +0 -0
- /package/{audit → dist/audit}/dto/begin-transaction.dto.js +0 -0
- /package/{audit → dist/audit}/dto/compare-entities.dto.d.ts +0 -0
- /package/{audit → dist/audit}/dto/compare-entities.dto.js +0 -0
- /package/{audit → dist/audit}/dto/index.d.ts +0 -0
- /package/{audit → dist/audit}/dto/index.js +0 -0
- /package/{audit → dist/audit}/dto/pre-check-restore.dto.d.ts +0 -0
- /package/{audit → dist/audit}/dto/pre-check-restore.dto.js +0 -0
- /package/{audit → dist/audit}/dto/restore-entity.dto.d.ts +0 -0
- /package/{audit → dist/audit}/dto/restore-entity.dto.js +0 -0
- /package/{audit → dist/audit}/entities/manual-operation-log.entity.d.ts +0 -0
- /package/{audit → dist/audit}/entities/operation-template.entity.d.ts +0 -0
- /package/{audit → dist/audit}/entities/operation-template.entity.js +0 -0
- /package/{audit → dist/audit}/enums/index.d.ts +0 -0
- /package/{audit → dist/audit}/enums/index.js +0 -0
- /package/{audit → dist/audit}/interceptors/audit.interceptor.d.ts +0 -0
- /package/{audit → dist/audit}/interceptors/audit.interceptor.js +0 -0
- /package/{audit → dist/audit}/interfaces/audit.interfaces.js +0 -0
- /package/{audit → dist/audit}/interfaces/index.d.ts +0 -0
- /package/{audit → dist/audit}/interfaces/index.js +0 -0
- /package/{audit → dist/audit}/services/audit-strategy.service.d.ts +0 -0
- /package/{audit → dist/audit}/services/audit-strategy.service.js +0 -0
- /package/{audit → dist/audit}/services/multi-database.service.d.ts +0 -0
- /package/{audit → dist/audit}/services/multi-database.service.js +0 -0
- /package/{audit → dist/audit}/services/transaction-audit.service.d.ts +0 -0
- /package/{audit → dist/audit}/subscribers/index.d.ts +0 -0
- /package/{audit → dist/audit}/subscribers/index.js +0 -0
- /package/{cache → dist/cache}/cache-metrics.service.d.ts +0 -0
- /package/{cache → dist/cache}/cache-metrics.service.js +0 -0
- /package/{cache → dist/cache}/cache-serialization.service.d.ts +0 -0
- /package/{cache → dist/cache}/cache-serialization.service.js +0 -0
- /package/{cache → dist/cache}/cache.constants.d.ts +0 -0
- /package/{cache → dist/cache}/cache.constants.js +0 -0
- /package/{cache → dist/cache}/cache.health.d.ts +0 -0
- /package/{cache → dist/cache}/cache.health.js +0 -0
- /package/{cache → dist/cache}/cache.module.d.ts +0 -0
- /package/{cache → dist/cache}/cache.module.js +0 -0
- /package/{cache → dist/cache}/cache.service.d.ts +0 -0
- /package/{cache → dist/cache}/cache.service.js +0 -0
- /package/{cache → dist/cache}/cache.warmup.service.d.ts +0 -0
- /package/{cache → dist/cache}/cache.warmup.service.js +0 -0
- /package/{cache → dist/cache}/decorators/cache-evict.decorator.d.ts +0 -0
- /package/{cache → dist/cache}/decorators/cache-evict.decorator.js +0 -0
- /package/{cache → dist/cache}/decorators/cache-put.decorator.d.ts +0 -0
- /package/{cache → dist/cache}/decorators/cache-put.decorator.js +0 -0
- /package/{cache → dist/cache}/decorators/cacheable.decorator.d.ts +0 -0
- /package/{cache → dist/cache}/decorators/cacheable.decorator.js +0 -0
- /package/{cache → dist/cache}/decorators/index.d.ts +0 -0
- /package/{cache → dist/cache}/decorators/index.js +0 -0
- /package/{cache → dist/cache}/dependencies/callback.dependency.d.ts +0 -0
- /package/{cache → dist/cache}/dependencies/callback.dependency.js +0 -0
- /package/{cache → dist/cache}/dependencies/chain.dependency.d.ts +0 -0
- /package/{cache → dist/cache}/dependencies/chain.dependency.js +0 -0
- /package/{cache → dist/cache}/dependencies/file.dependency.d.ts +0 -0
- /package/{cache → dist/cache}/dependencies/file.dependency.js +0 -0
- /package/{cache → dist/cache}/dependencies/index.d.ts +0 -0
- /package/{cache → dist/cache}/dependencies/index.js +0 -0
- /package/{cache → dist/cache}/dependencies/tag.dependency.d.ts +0 -0
- /package/{cache → dist/cache}/dependencies/tag.dependency.js +0 -0
- /package/{cache → dist/cache}/dependencies/time.dependency.d.ts +0 -0
- /package/{cache → dist/cache}/dependencies/time.dependency.js +0 -0
- /package/{cache → dist/cache}/examples/basic-usage.d.ts +0 -0
- /package/{cache → dist/cache}/examples/basic-usage.js +0 -0
- /package/{cache → dist/cache}/index.d.ts +0 -0
- /package/{cache → dist/cache}/index.js +0 -0
- /package/{cache → dist/cache}/interfaces/cache-dependency.interface.d.ts +0 -0
- /package/{cache → dist/cache}/interfaces/cache-dependency.interface.js +0 -0
- /package/{cache → dist/cache}/interfaces/cache-options.interface.d.ts +0 -0
- /package/{cache → dist/cache}/interfaces/cache-options.interface.js +0 -0
- /package/{cache → dist/cache}/interfaces/cache-provider.interface.d.ts +0 -0
- /package/{cache → dist/cache}/interfaces/cache-provider.interface.js +0 -0
- /package/{cache → dist/cache}/interfaces/index.d.ts +0 -0
- /package/{cache → dist/cache}/interfaces/index.js +0 -0
- /package/{cache → dist/cache}/providers/base-cache.provider.d.ts +0 -0
- /package/{cache → dist/cache}/providers/base-cache.provider.js +0 -0
- /package/{cache → dist/cache}/providers/cls-cache.provider.d.ts +0 -0
- /package/{cache → dist/cache}/providers/cls-cache.provider.js +0 -0
- /package/{cache → dist/cache}/providers/index.d.ts +0 -0
- /package/{cache → dist/cache}/providers/index.js +0 -0
- /package/{cache → dist/cache}/providers/memory-cache.provider.d.ts +0 -0
- /package/{cache → dist/cache}/providers/memory-cache.provider.js +0 -0
- /package/{cache → dist/cache}/providers/redis-cache.provider.d.ts +0 -0
- /package/{cache → dist/cache}/providers/redis-cache.provider.js +0 -0
- /package/{cache → dist/cache}/utils/dependency-manager.util.d.ts +0 -0
- /package/{cache → dist/cache}/utils/dependency-manager.util.js +0 -0
- /package/{cache → dist/cache}/utils/index.d.ts +0 -0
- /package/{cache → dist/cache}/utils/index.js +0 -0
- /package/{cache → dist/cache}/utils/key-generator.util.d.ts +0 -0
- /package/{cache → dist/cache}/utils/key-generator.util.js +0 -0
- /package/{common → dist/common}/abstract.entity.d.ts +0 -0
- /package/{common → dist/common}/abstract.entity.js +0 -0
- /package/{common → dist/common}/boilerplate.polyfill.d.ts +0 -0
- /package/{common → dist/common}/dto/abstract.dto.d.ts +0 -0
- /package/{common → dist/common}/dto/abstract.dto.js +0 -0
- /package/{common → dist/common}/dto/bulk-id.dto.d.ts +0 -0
- /package/{common → dist/common}/dto/bulk-id.dto.js +0 -0
- /package/{common → dist/common}/dto/create-translation.dto.d.ts +0 -0
- /package/{common → dist/common}/dto/create-translation.dto.js +0 -0
- /package/{common → dist/common}/dto/dto-container.d.ts +0 -0
- /package/{common → dist/common}/dto/dto-container.js +0 -0
- /package/{common → dist/common}/dto/dto-decorators.d.ts +0 -0
- /package/{common → dist/common}/dto/dto-decorators.js +0 -0
- /package/{common → dist/common}/dto/dto-extensions.d.ts +0 -0
- /package/{common → dist/common}/dto/dto-extensions.js +0 -0
- /package/{common → dist/common}/dto/dto-service-accessor.d.ts +0 -0
- /package/{common → dist/common}/dto/dto-service-accessor.js +0 -0
- /package/{common → dist/common}/dto/dto-transformer.d.ts +0 -0
- /package/{common → dist/common}/dto/dto-transformer.js +0 -0
- /package/{common → dist/common}/dto/index.d.ts +0 -0
- /package/{common → dist/common}/dto/index.js +0 -0
- /package/{common → dist/common}/dto/page-meta.dto.d.ts +0 -0
- /package/{common → dist/common}/dto/page-meta.dto.js +0 -0
- /package/{common → dist/common}/dto/page-options.dto.d.ts +0 -0
- /package/{common → dist/common}/dto/page-options.dto.js +0 -0
- /package/{common → dist/common}/dto/page.dto.d.ts +0 -0
- /package/{common → dist/common}/dto/page.dto.js +0 -0
- /package/{common → dist/common}/examples/paginate-and-map.example.d.ts +0 -0
- /package/{common → dist/common}/examples/paginate-and-map.example.js +0 -0
- /package/{common → dist/common}/index.d.ts +0 -0
- /package/{common → dist/common}/index.js +0 -0
- /package/{common → dist/common}/snake-naming.strategy.d.ts +0 -0
- /package/{common → dist/common}/snake-naming.strategy.js +0 -0
- /package/{common → dist/common}/types.d.ts +0 -0
- /package/{common → dist/common}/types.js +0 -0
- /package/{common → dist/common}/utils.d.ts +0 -0
- /package/{common → dist/common}/utils.js +0 -0
- /package/{constants → dist/constants}/index.d.ts +0 -0
- /package/{constants → dist/constants}/index.js +0 -0
- /package/{constants → dist/constants}/language-code.d.ts +0 -0
- /package/{constants → dist/constants}/language-code.js +0 -0
- /package/{constants → dist/constants}/order.d.ts +0 -0
- /package/{constants → dist/constants}/order.js +0 -0
- /package/{decorators → dist/decorators}/api-page-ok-response.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/api-page-ok-response.decorator.js +0 -0
- /package/{decorators → dist/decorators}/api-paginated-response.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/api-paginated-response.decorator.js +0 -0
- /package/{decorators → dist/decorators}/auth-user.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/auth-user.decorator.js +0 -0
- /package/{decorators → dist/decorators}/controller.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/controller.decorator.js +0 -0
- /package/{decorators → dist/decorators}/field.decorators.d.ts +0 -0
- /package/{decorators → dist/decorators}/field.decorators.js +0 -0
- /package/{decorators → dist/decorators}/http.decorators.d.ts +0 -0
- /package/{decorators → dist/decorators}/http.decorators.js +0 -0
- /package/{decorators → dist/decorators}/index.d.ts +0 -0
- /package/{decorators → dist/decorators}/index.js +0 -0
- /package/{decorators → dist/decorators}/operation.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/operation.decorator.js +0 -0
- /package/{decorators → dist/decorators}/paginated-response.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/paginated-response.decorator.js +0 -0
- /package/{decorators → dist/decorators}/property.decorators.d.ts +0 -0
- /package/{decorators → dist/decorators}/property.decorators.js +0 -0
- /package/{decorators → dist/decorators}/public-route.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/public-route.decorator.js +0 -0
- /package/{decorators → dist/decorators}/swagger.schema.d.ts +0 -0
- /package/{decorators → dist/decorators}/swagger.schema.js +0 -0
- /package/{decorators → dist/decorators}/timestamp-column.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/timestamp-column.decorator.js +0 -0
- /package/{decorators → dist/decorators}/transform.decorators.d.ts +0 -0
- /package/{decorators → dist/decorators}/transform.decorators.js +0 -0
- /package/{decorators → dist/decorators}/translate.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/translate.decorator.js +0 -0
- /package/{decorators → dist/decorators}/use-dto.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/use-dto.decorator.js +0 -0
- /package/{decorators → dist/decorators}/user-check.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/user-check.decorator.js +0 -0
- /package/{decorators → dist/decorators}/user.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/user.decorator.js +0 -0
- /package/{decorators → dist/decorators}/user_auth.decorator.d.ts +0 -0
- /package/{decorators → dist/decorators}/user_auth.decorator.js +0 -0
- /package/{decorators → dist/decorators}/validator.decorators.d.ts +0 -0
- /package/{decorators → dist/decorators}/validator.decorators.js +0 -0
- /package/{exceptions → dist/exceptions}/file-not-image.exception.d.ts +0 -0
- /package/{exceptions → dist/exceptions}/file-not-image.exception.js +0 -0
- /package/{exceptions → dist/exceptions}/index.d.ts +0 -0
- /package/{exceptions → dist/exceptions}/index.js +0 -0
- /package/{exceptions → dist/exceptions}/page-type.exception.d.ts +0 -0
- /package/{exceptions → dist/exceptions}/page-type.exception.js +0 -0
- /package/{exceptions → dist/exceptions}/user-not-found.exception.d.ts +0 -0
- /package/{exceptions → dist/exceptions}/user-not-found.exception.js +0 -0
- /package/{http-client/interfaces/http-client-config.interface.js → dist/file-upload/interfaces/custom-file-type.interface.js} +0 -0
- /package/{interfaces/IApiFile.js → dist/file-upload/interfaces/file-buffer.interface.js} +0 -0
- /package/{interfaces/IFile.js → dist/file-upload/interfaces/file-metadata.interface.js} +0 -0
- /package/{interfaces/ITranslationDecoratorInterface.js → dist/file-upload/interfaces/file-processor.interface.js} +0 -0
- /package/{interfaces/response.js → dist/file-upload/interfaces/processor-options.interface.js} +0 -0
- /package/{vault/interfaces/vault-options.interface.js → dist/file-upload/interfaces/storage-provider.interface.js} +0 -0
- /package/{filters → dist/filters}/bad-request.filter.d.ts +0 -0
- /package/{filters → dist/filters}/bad-request.filter.js +0 -0
- /package/{filters → dist/filters}/constraint-errors.d.ts +0 -0
- /package/{filters → dist/filters}/constraint-errors.js +0 -0
- /package/{filters → dist/filters}/index.d.ts +0 -0
- /package/{filters → dist/filters}/index.js +0 -0
- /package/{filters → dist/filters}/query-failed.filter.d.ts +0 -0
- /package/{filters → dist/filters}/query-failed.filter.js +0 -0
- /package/{health-checker → dist/health-checker}/health-checker.controller.d.ts +0 -0
- /package/{health-checker → dist/health-checker}/health-checker.controller.js +0 -0
- /package/{health-checker → dist/health-checker}/health-checker.module.d.ts +0 -0
- /package/{health-checker → dist/health-checker}/health-checker.module.js +0 -0
- /package/{health-checker → dist/health-checker}/index.d.ts +0 -0
- /package/{health-checker → dist/health-checker}/index.js +0 -0
- /package/{helpers → dist/helpers}/common.helper.d.ts +0 -0
- /package/{helpers → dist/helpers}/common.helper.js +0 -0
- /package/{helpers → dist/helpers}/date.helper.d.ts +0 -0
- /package/{helpers → dist/helpers}/date.helper.js +0 -0
- /package/{helpers → dist/helpers}/index.d.ts +0 -0
- /package/{helpers → dist/helpers}/index.js +0 -0
- /package/{http-client → dist/http-client}/config/http-client.config.d.ts +0 -0
- /package/{http-client → dist/http-client}/config/http-client.config.js +0 -0
- /package/{http-client → dist/http-client}/config/index.d.ts +0 -0
- /package/{http-client → dist/http-client}/config/index.js +0 -0
- /package/{http-client → dist/http-client}/decorators/index.d.ts +0 -0
- /package/{http-client → dist/http-client}/decorators/index.js +0 -0
- /package/{http-client → dist/http-client}/entities/http-log.entity.d.ts +0 -0
- /package/{http-client → dist/http-client}/entities/index.d.ts +0 -0
- /package/{http-client → dist/http-client}/entities/index.js +0 -0
- /package/{http-client → dist/http-client}/errors/http-client.errors.d.ts +0 -0
- /package/{http-client → dist/http-client}/errors/http-client.errors.js +0 -0
- /package/{http-client → dist/http-client}/errors/index.d.ts +0 -0
- /package/{http-client → dist/http-client}/errors/index.js +0 -0
- /package/{http-client → dist/http-client}/examples/advanced-usage.example.d.ts +0 -0
- /package/{http-client → dist/http-client}/examples/advanced-usage.example.js +0 -0
- /package/{http-client → dist/http-client}/examples/auth-with-waiting-lock.example.d.ts +0 -0
- /package/{http-client → dist/http-client}/examples/auth-with-waiting-lock.example.js +0 -0
- /package/{http-client → dist/http-client}/examples/basic-usage.example.d.ts +0 -0
- /package/{http-client → dist/http-client}/examples/basic-usage.example.js +0 -0
- /package/{http-client → dist/http-client}/examples/index.d.ts +0 -0
- /package/{http-client → dist/http-client}/examples/index.js +0 -0
- /package/{http-client → dist/http-client}/examples/multi-api-configuration.example.d.ts +0 -0
- /package/{http-client → dist/http-client}/examples/multi-api-configuration.example.js +0 -0
- /package/{http-client → dist/http-client}/http-client.module.d.ts +0 -0
- /package/{http-client → dist/http-client}/index.d.ts +0 -0
- /package/{http-client → dist/http-client}/index.js +0 -0
- /package/{http-client → dist/http-client}/interfaces/api-client-config.interface.d.ts +0 -0
- /package/{http-client → dist/http-client}/interfaces/api-client-config.interface.js +0 -0
- /package/{http-client → dist/http-client}/services/api-client-registry.service.d.ts +0 -0
- /package/{http-client → dist/http-client}/services/api-client-registry.service.js +0 -0
- /package/{http-client → dist/http-client}/services/cache.service.d.ts +0 -0
- /package/{http-client → dist/http-client}/services/cache.service.js +0 -0
- /package/{http-client → dist/http-client}/services/circuit-breaker.service.d.ts +0 -0
- /package/{http-client → dist/http-client}/services/circuit-breaker.service.js +0 -0
- /package/{http-client → dist/http-client}/services/http-log-query.service.d.ts +0 -0
- /package/{http-client → dist/http-client}/services/http-log-query.service.js +0 -0
- /package/{http-client → dist/http-client}/services/http-replay.service.d.ts +0 -0
- /package/{http-client → dist/http-client}/services/http-replay.service.js +0 -0
- /package/{http-client → dist/http-client}/services/index.d.ts +0 -0
- /package/{http-client → dist/http-client}/services/index.js +0 -0
- /package/{http-client → dist/http-client}/services/log-cleanup.service.d.ts +0 -0
- /package/{http-client → dist/http-client}/services/log-cleanup.service.js +0 -0
- /package/{http-client → dist/http-client}/utils/call-stack-extractor.util.d.ts +0 -0
- /package/{http-client → dist/http-client}/utils/call-stack-extractor.util.js +0 -0
- /package/{http-client → dist/http-client}/utils/context-extractor.util.d.ts +0 -0
- /package/{http-client → dist/http-client}/utils/context-extractor.util.js +0 -0
- /package/{http-client → dist/http-client}/utils/curl-generator.util.d.ts +0 -0
- /package/{http-client → dist/http-client}/utils/curl-generator.util.js +0 -0
- /package/{http-client → dist/http-client}/utils/request-id.util.d.ts +0 -0
- /package/{http-client → dist/http-client}/utils/request-id.util.js +0 -0
- /package/{http-client → dist/http-client}/utils/retry-recorder.util.d.ts +0 -0
- /package/{http-client → dist/http-client}/utils/retry-recorder.util.js +0 -0
- /package/{i18n → dist/i18n}/en_US/validation.json +0 -0
- /package/{i18n → dist/i18n}/zh_CN/validation.json +0 -0
- /package/{interceptors → dist/interceptors}/index.d.ts +0 -0
- /package/{interceptors → dist/interceptors}/index.js +0 -0
- /package/{interceptors → dist/interceptors}/language-interceptor.service.d.ts +0 -0
- /package/{interceptors → dist/interceptors}/language-interceptor.service.js +0 -0
- /package/{interceptors → dist/interceptors}/translation-interceptor.service.d.ts +0 -0
- /package/{interceptors → dist/interceptors}/translation-interceptor.service.js +0 -0
- /package/{interfaces → dist/interfaces}/IApiFile.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/IFile.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/ITranslationDecoratorInterface.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/index.d.ts +0 -0
- /package/{interfaces → dist/interfaces}/index.js +0 -0
- /package/{interfaces → dist/interfaces}/response.d.ts +0 -0
- /package/{middlewares → dist/middlewares}/index.d.ts +0 -0
- /package/{middlewares → dist/middlewares}/index.js +0 -0
- /package/{middlewares → dist/middlewares}/omni-auth.middleware.d.ts +0 -0
- /package/{middlewares → dist/middlewares}/omni-auth.middleware.js +0 -0
- /package/{middlewares → dist/middlewares}/powerby.middleware.d.ts +0 -0
- /package/{middlewares → dist/middlewares}/powerby.middleware.js +0 -0
- /package/{middlewares → dist/middlewares}/request-id.middleware.d.ts +0 -0
- /package/{middlewares → dist/middlewares}/request-id.middleware.js +0 -0
- /package/{middlewares → dist/middlewares}/xml.middleware.d.ts +0 -0
- /package/{middlewares → dist/middlewares}/xml.middleware.js +0 -0
- /package/{providers → dist/providers}/context.provider.d.ts +0 -0
- /package/{providers → dist/providers}/context.provider.js +0 -0
- /package/{providers → dist/providers}/generator.provider.d.ts +0 -0
- /package/{providers → dist/providers}/generator.provider.js +0 -0
- /package/{providers → dist/providers}/index.d.ts +0 -0
- /package/{providers → dist/providers}/index.js +0 -0
- /package/{redis-lock → dist/redis-lock}/comprehensive-lock-cleanup.service.d.ts +0 -0
- /package/{redis-lock → dist/redis-lock}/comprehensive-lock-cleanup.service.js +0 -0
- /package/{redis-lock → dist/redis-lock}/examples/lock-strategy.examples.d.ts +0 -0
- /package/{redis-lock → dist/redis-lock}/examples/lock-strategy.examples.js +0 -0
- /package/{redis-lock → dist/redis-lock}/index.d.ts +0 -0
- /package/{redis-lock → dist/redis-lock}/index.js +0 -0
- /package/{redis-lock → dist/redis-lock}/lock-heartbeat.service.d.ts +0 -0
- /package/{redis-lock → dist/redis-lock}/lock-heartbeat.service.js +0 -0
- /package/{redis-lock → dist/redis-lock}/redis-lock.decorator.d.ts +0 -0
- /package/{redis-lock → dist/redis-lock}/redis-lock.decorator.js +0 -0
- /package/{redis-lock → dist/redis-lock}/redis-lock.module.d.ts +0 -0
- /package/{redis-lock → dist/redis-lock}/redis-lock.module.js +0 -0
- /package/{redis-lock → dist/redis-lock}/redis-lock.service.d.ts +0 -0
- /package/{redis-lock → dist/redis-lock}/redis-lock.service.js +0 -0
- /package/{setup → dist/setup}/index.d.ts +0 -0
- /package/{setup → dist/setup}/index.js +0 -0
- /package/{setup → dist/setup}/mode.setup.d.ts +0 -0
- /package/{setup → dist/setup}/mode.setup.js +0 -0
- /package/{setup → dist/setup}/schedule.decorator.d.ts +0 -0
- /package/{setup → dist/setup}/schedule.decorator.js +0 -0
- /package/{setup → dist/setup}/worker.decorator.d.ts +0 -0
- /package/{setup → dist/setup}/worker.decorator.js +0 -0
- /package/{shared/serviceRegistryModule.d.ts → dist/shared/service-registry.module.d.ts} +0 -0
- /package/{shared → dist/shared}/services/api-config.service.d.ts +0 -0
- /package/{shared → dist/shared}/services/api-config.service.js +0 -0
- /package/{shared → dist/shared}/services/generator.service.d.ts +0 -0
- /package/{shared → dist/shared}/services/generator.service.js +0 -0
- /package/{shared → dist/shared}/services/translation.service.d.ts +0 -0
- /package/{shared → dist/shared}/services/translation.service.js +0 -0
- /package/{validator-json → dist/validator-json}/decorators.d.ts +0 -0
- /package/{validator-json → dist/validator-json}/decorators.js +0 -0
- /package/{validator-json → dist/validator-json}/default.d.ts +0 -0
- /package/{validator-json → dist/validator-json}/default.js +0 -0
- /package/{validator-json → dist/validator-json}/defaultConverters.d.ts +0 -0
- /package/{validator-json → dist/validator-json}/defaultConverters.js +0 -0
- /package/{validator-json → dist/validator-json}/index.d.ts +0 -0
- /package/{validator-json → dist/validator-json}/index.js +0 -0
- /package/{validator-json → dist/validator-json}/options.d.ts +0 -0
- /package/{validator-json → dist/validator-json}/options.js +0 -0
- /package/{validators → dist/validators}/common-validators.d.ts +0 -0
- /package/{validators → dist/validators}/common-validators.js +0 -0
- /package/{validators → dist/validators}/custom-validate.examples.d.ts +0 -0
- /package/{validators → dist/validators}/custom-validate.examples.js +0 -0
- /package/{validators → dist/validators}/custom-validate.validator.d.ts +0 -0
- /package/{validators → dist/validators}/custom-validate.validator.js +0 -0
- /package/{validators → dist/validators}/index.d.ts +0 -0
- /package/{validators → dist/validators}/index.js +0 -0
- /package/{validators → dist/validators}/phone-country-code.validator.d.ts +0 -0
- /package/{validators → dist/validators}/phone-country-code.validator.js +0 -0
- /package/{validators → dist/validators}/same-as.validator.d.ts +0 -0
- /package/{validators → dist/validators}/same-as.validator.js +0 -0
- /package/{validators → dist/validators}/skip-empty.validator.d.ts +0 -0
- /package/{validators → dist/validators}/skip-empty.validator.js +0 -0
- /package/{vault → dist/vault}/index.d.ts +0 -0
- /package/{vault → dist/vault}/index.js +0 -0
- /package/{vault → dist/vault}/interfaces/vault-options.interface.d.ts +0 -0
- /package/{vault → dist/vault}/vault-config.loader.d.ts +0 -0
- /package/{vault → dist/vault}/vault-config.loader.js +0 -0
- /package/{vault → dist/vault}/vault-config.service.d.ts +0 -0
- /package/{vault → dist/vault}/vault-config.service.js +0 -0
- /package/{vault → dist/vault}/vault.module.d.ts +0 -0
- /package/{vault → dist/vault}/vault.module.js +0 -0
|
@@ -2,9 +2,10 @@ export * from './entities';
|
|
|
2
2
|
export * from './enums';
|
|
3
3
|
export * from './interfaces';
|
|
4
4
|
export * from './dto';
|
|
5
|
-
export { AuditEntity, AuditField, getEntityAuditConfig, getFieldAuditConfig, getFieldLabel, getFieldValueLabel, ENTITY_AUDIT_OPTIONS, FIELD_AUDIT_OPTIONS, } from './decorators/entity-audit.decorator';
|
|
5
|
+
export { AuditEntity, AuditField, getEntityAuditConfig, getFieldAuditConfig, getFieldLabel, getFieldValueLabel, getEntityLabel, ENTITY_AUDIT_OPTIONS, FIELD_AUDIT_OPTIONS, } from './decorators/entity-audit.decorator';
|
|
6
6
|
export { AuditController, AuditMethod, CONTROLLER_AUDIT_OPTIONS, METHOD_AUDIT_OPTIONS, } from './decorators/audit-controller.decorator';
|
|
7
7
|
export { AuditLog, getAuditOperationConfig, hasAuditOperation, AUDIT_OPERATION_OPTIONS, } from './decorators/audit-operation.decorator';
|
|
8
|
+
export { AuditAction, AuditActionOptions, AuditActionMetadata, AUDIT_ACTION_METADATA, } from './decorators/audit-action.decorator';
|
|
8
9
|
export * from './services';
|
|
9
10
|
export * from './subscribers';
|
|
10
11
|
export * from './interceptors';
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AUDIT_OPERATION_OPTIONS = exports.hasAuditOperation = exports.getAuditOperationConfig = exports.AuditLog = exports.METHOD_AUDIT_OPTIONS = exports.CONTROLLER_AUDIT_OPTIONS = exports.AuditMethod = exports.AuditController = exports.FIELD_AUDIT_OPTIONS = exports.ENTITY_AUDIT_OPTIONS = exports.getFieldValueLabel = exports.getFieldLabel = exports.getFieldAuditConfig = exports.getEntityAuditConfig = exports.AuditField = exports.AuditEntity = void 0;
|
|
17
|
+
exports.AUDIT_ACTION_METADATA = exports.AuditAction = exports.AUDIT_OPERATION_OPTIONS = exports.hasAuditOperation = exports.getAuditOperationConfig = exports.AuditLog = exports.METHOD_AUDIT_OPTIONS = exports.CONTROLLER_AUDIT_OPTIONS = exports.AuditMethod = exports.AuditController = exports.FIELD_AUDIT_OPTIONS = exports.ENTITY_AUDIT_OPTIONS = exports.getEntityLabel = exports.getFieldValueLabel = exports.getFieldLabel = exports.getFieldAuditConfig = exports.getEntityAuditConfig = exports.AuditField = exports.AuditEntity = void 0;
|
|
18
18
|
// Entities
|
|
19
19
|
__exportStar(require("./entities"), exports);
|
|
20
20
|
// Enums
|
|
@@ -31,6 +31,7 @@ Object.defineProperty(exports, "getEntityAuditConfig", { enumerable: true, get:
|
|
|
31
31
|
Object.defineProperty(exports, "getFieldAuditConfig", { enumerable: true, get: function () { return entity_audit_decorator_1.getFieldAuditConfig; } });
|
|
32
32
|
Object.defineProperty(exports, "getFieldLabel", { enumerable: true, get: function () { return entity_audit_decorator_1.getFieldLabel; } });
|
|
33
33
|
Object.defineProperty(exports, "getFieldValueLabel", { enumerable: true, get: function () { return entity_audit_decorator_1.getFieldValueLabel; } });
|
|
34
|
+
Object.defineProperty(exports, "getEntityLabel", { enumerable: true, get: function () { return entity_audit_decorator_1.getEntityLabel; } });
|
|
34
35
|
Object.defineProperty(exports, "ENTITY_AUDIT_OPTIONS", { enumerable: true, get: function () { return entity_audit_decorator_1.ENTITY_AUDIT_OPTIONS; } });
|
|
35
36
|
Object.defineProperty(exports, "FIELD_AUDIT_OPTIONS", { enumerable: true, get: function () { return entity_audit_decorator_1.FIELD_AUDIT_OPTIONS; } });
|
|
36
37
|
var audit_controller_decorator_1 = require("./decorators/audit-controller.decorator");
|
|
@@ -43,6 +44,9 @@ Object.defineProperty(exports, "AuditLog", { enumerable: true, get: function ()
|
|
|
43
44
|
Object.defineProperty(exports, "getAuditOperationConfig", { enumerable: true, get: function () { return audit_operation_decorator_1.getAuditOperationConfig; } });
|
|
44
45
|
Object.defineProperty(exports, "hasAuditOperation", { enumerable: true, get: function () { return audit_operation_decorator_1.hasAuditOperation; } });
|
|
45
46
|
Object.defineProperty(exports, "AUDIT_OPERATION_OPTIONS", { enumerable: true, get: function () { return audit_operation_decorator_1.AUDIT_OPERATION_OPTIONS; } });
|
|
47
|
+
var audit_action_decorator_1 = require("./decorators/audit-action.decorator");
|
|
48
|
+
Object.defineProperty(exports, "AuditAction", { enumerable: true, get: function () { return audit_action_decorator_1.AuditAction; } });
|
|
49
|
+
Object.defineProperty(exports, "AUDIT_ACTION_METADATA", { enumerable: true, get: function () { return audit_action_decorator_1.AUDIT_ACTION_METADATA; } });
|
|
46
50
|
// Services
|
|
47
51
|
__exportStar(require("./services"), exports);
|
|
48
52
|
// Subscribers
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { Repository } from 'typeorm';
|
|
5
|
+
import { AuditContextService } from '../services/audit-context.service';
|
|
6
|
+
import { OperationDescriptionService } from '../services/operation-description.service';
|
|
7
|
+
import { AuditActionSummaryEntity } from '../entities';
|
|
8
|
+
/**
|
|
9
|
+
* 审计动作拦截器
|
|
10
|
+
* 在请求开始时创建审计动作上下文,在请求结束时生成汇总记录
|
|
11
|
+
*/
|
|
12
|
+
export declare class AuditActionInterceptor implements NestInterceptor {
|
|
13
|
+
private readonly reflector;
|
|
14
|
+
private readonly contextService;
|
|
15
|
+
private readonly summaryRepository;
|
|
16
|
+
private readonly descriptionService?;
|
|
17
|
+
constructor(reflector: Reflector, contextService: AuditContextService, summaryRepository: Repository<AuditActionSummaryEntity>, descriptionService?: OperationDescriptionService);
|
|
18
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
|
|
19
|
+
/**
|
|
20
|
+
* 生成审计汇总记录
|
|
21
|
+
*/
|
|
22
|
+
private generateSummary;
|
|
23
|
+
/**
|
|
24
|
+
* 生成操作描述文本
|
|
25
|
+
* 优先从 OperationDescriptionService 获取多语言模板
|
|
26
|
+
* 如果没有,则使用默认格式
|
|
27
|
+
*/
|
|
28
|
+
private generateDescription;
|
|
29
|
+
/**
|
|
30
|
+
* 替换模板中的占位符
|
|
31
|
+
* 支持格式:{key} 或 {key:format}
|
|
32
|
+
*/
|
|
33
|
+
private replaceTemplatePlaceholders;
|
|
34
|
+
/**
|
|
35
|
+
* 格式化值为字符串
|
|
36
|
+
*/
|
|
37
|
+
private formatValue;
|
|
38
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.AuditActionInterceptor = void 0;
|
|
25
|
+
const common_1 = require("@nestjs/common");
|
|
26
|
+
const core_1 = require("@nestjs/core");
|
|
27
|
+
const rxjs_1 = require("rxjs");
|
|
28
|
+
const operators_1 = require("rxjs/operators");
|
|
29
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
30
|
+
const typeorm_2 = require("typeorm");
|
|
31
|
+
const audit_context_service_1 = require("../services/audit-context.service");
|
|
32
|
+
const operation_description_service_1 = require("../services/operation-description.service");
|
|
33
|
+
const entities_1 = require("../entities");
|
|
34
|
+
const audit_action_decorator_1 = require("../decorators/audit-action.decorator");
|
|
35
|
+
/**
|
|
36
|
+
* 审计动作拦截器
|
|
37
|
+
* 在请求开始时创建审计动作上下文,在请求结束时生成汇总记录
|
|
38
|
+
*/
|
|
39
|
+
let AuditActionInterceptor = class AuditActionInterceptor {
|
|
40
|
+
constructor(reflector, contextService, summaryRepository, descriptionService) {
|
|
41
|
+
this.reflector = reflector;
|
|
42
|
+
this.contextService = contextService;
|
|
43
|
+
this.summaryRepository = summaryRepository;
|
|
44
|
+
this.descriptionService = descriptionService;
|
|
45
|
+
}
|
|
46
|
+
intercept(context, next) {
|
|
47
|
+
// 获取装饰器元数据
|
|
48
|
+
const metadata = this.reflector.get(audit_action_decorator_1.AUDIT_ACTION_METADATA, context.getHandler());
|
|
49
|
+
// 如果没有 @AuditAction 装饰器或已禁用,直接放行
|
|
50
|
+
if (!metadata || metadata.options.enabled === false) {
|
|
51
|
+
return next.handle();
|
|
52
|
+
}
|
|
53
|
+
const request = context.switchToHttp().getRequest();
|
|
54
|
+
const actionId = this.contextService.generateActionId();
|
|
55
|
+
const startTime = new Date();
|
|
56
|
+
// 创建审计动作上下文
|
|
57
|
+
const actionContext = {
|
|
58
|
+
actionId,
|
|
59
|
+
actionName: metadata.actionName,
|
|
60
|
+
operationTemplateKey: metadata.options.templateKey,
|
|
61
|
+
paramsBuilder: metadata.options.paramsBuilder,
|
|
62
|
+
startTime,
|
|
63
|
+
entityChanges: [],
|
|
64
|
+
detailedChanges: [],
|
|
65
|
+
req: request,
|
|
66
|
+
};
|
|
67
|
+
// 设置到 CLS
|
|
68
|
+
this.contextService.setActionContext(actionContext);
|
|
69
|
+
return next.handle().pipe((0, operators_1.tap)((result) => __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
// 请求成功,记录结果
|
|
71
|
+
actionContext.result = result;
|
|
72
|
+
yield this.generateSummary(actionContext, metadata, false);
|
|
73
|
+
})), (0, operators_1.catchError)((error) => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
// 请求失败,记录错误
|
|
75
|
+
actionContext.error = error;
|
|
76
|
+
yield this.generateSummary(actionContext, metadata, true, error);
|
|
77
|
+
return (0, rxjs_1.throwError)(() => error);
|
|
78
|
+
})));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 生成审计汇总记录
|
|
82
|
+
*/
|
|
83
|
+
generateSummary(actionContext, metadata, hasError, error) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
try {
|
|
86
|
+
const duration = Date.now() - actionContext.startTime.getTime();
|
|
87
|
+
const auditContext = yield this.contextService.getCurrentContext();
|
|
88
|
+
// 构建描述参数
|
|
89
|
+
let descriptionParams = {};
|
|
90
|
+
if (metadata.options.paramsBuilder) {
|
|
91
|
+
const paramsContext = this.contextService.buildParamsContext();
|
|
92
|
+
if (paramsContext) {
|
|
93
|
+
descriptionParams = metadata.options.paramsBuilder(paramsContext);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// 生成描述文本
|
|
97
|
+
const description = yield this.generateDescription(actionContext.operationTemplateKey, actionContext.actionName, descriptionParams, !hasError);
|
|
98
|
+
// 统计实体类型和操作
|
|
99
|
+
const entityTypes = Array.from(new Set(actionContext.detailedChanges.map((c) => c.entityType)));
|
|
100
|
+
const operationStats = {};
|
|
101
|
+
actionContext.detailedChanges.forEach((change) => {
|
|
102
|
+
const op = change.operation;
|
|
103
|
+
operationStats[op] = (operationStats[op] || 0) + 1;
|
|
104
|
+
});
|
|
105
|
+
// 创建汇总记录
|
|
106
|
+
const summary = this.summaryRepository.create({
|
|
107
|
+
id: actionContext.actionId,
|
|
108
|
+
actionName: actionContext.actionName,
|
|
109
|
+
operationTemplateKey: actionContext.operationTemplateKey,
|
|
110
|
+
descriptionParams,
|
|
111
|
+
description,
|
|
112
|
+
requestId: auditContext.requestId || '',
|
|
113
|
+
userId: auditContext.userId || '',
|
|
114
|
+
username: auditContext.username || '',
|
|
115
|
+
requestIp: auditContext.requestIp || '',
|
|
116
|
+
userAgent: auditContext.userAgent || '',
|
|
117
|
+
entityChangesCount: actionContext.detailedChanges.length,
|
|
118
|
+
entityTypes,
|
|
119
|
+
operationStats,
|
|
120
|
+
success: !hasError,
|
|
121
|
+
errorMessage: error === null || error === void 0 ? void 0 : error.message,
|
|
122
|
+
duration,
|
|
123
|
+
metadata: metadata.options.metadata,
|
|
124
|
+
});
|
|
125
|
+
yield this.summaryRepository.save(summary);
|
|
126
|
+
}
|
|
127
|
+
catch (err) {
|
|
128
|
+
console.error('Failed to generate audit action summary:', err);
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
// 清除审计动作上下文
|
|
132
|
+
this.contextService.clearActionContext();
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 生成操作描述文本
|
|
138
|
+
* 优先从 OperationDescriptionService 获取多语言模板
|
|
139
|
+
* 如果没有,则使用默认格式
|
|
140
|
+
*/
|
|
141
|
+
generateDescription(templateKey, actionName, params, success) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
let template;
|
|
144
|
+
// 1. 尝试从模板服务获取模板
|
|
145
|
+
if (templateKey && this.descriptionService) {
|
|
146
|
+
try {
|
|
147
|
+
template = yield this.descriptionService.getTemplate(templateKey);
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
// 如果获取模板失败,继续使用默认逻辑
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// 2. 如果没有模板,使用默认格式
|
|
154
|
+
if (!template) {
|
|
155
|
+
template = success
|
|
156
|
+
? `执行操作: ${actionName}`
|
|
157
|
+
: `执行操作失败: ${actionName}`;
|
|
158
|
+
}
|
|
159
|
+
// 3. 执行模板替换
|
|
160
|
+
return this.replaceTemplatePlaceholders(template, params);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* 替换模板中的占位符
|
|
165
|
+
* 支持格式:{key} 或 {key:format}
|
|
166
|
+
*/
|
|
167
|
+
replaceTemplatePlaceholders(template, params) {
|
|
168
|
+
let result = template;
|
|
169
|
+
// 遍历所有参数,替换占位符
|
|
170
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
171
|
+
const placeholder = `{${key}}`;
|
|
172
|
+
const valueStr = this.formatValue(value);
|
|
173
|
+
// 替换所有匹配的占位符
|
|
174
|
+
const regex = new RegExp(placeholder.replace(/[{}]/g, '\\$&'), 'g');
|
|
175
|
+
result = result.replace(regex, valueStr);
|
|
176
|
+
});
|
|
177
|
+
// 清理未替换的占位符
|
|
178
|
+
result = result.replace(/\{[^}]+\}/g, '');
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 格式化值为字符串
|
|
183
|
+
*/
|
|
184
|
+
formatValue(value) {
|
|
185
|
+
if (value === null || value === undefined) {
|
|
186
|
+
return '';
|
|
187
|
+
}
|
|
188
|
+
if (Array.isArray(value)) {
|
|
189
|
+
// 处理数组
|
|
190
|
+
if (value.length === 0) {
|
|
191
|
+
return '';
|
|
192
|
+
}
|
|
193
|
+
// 如果是对象数组,序列化
|
|
194
|
+
if (typeof value[0] === 'object') {
|
|
195
|
+
return JSON.stringify(value);
|
|
196
|
+
}
|
|
197
|
+
// 否则用顿号连接
|
|
198
|
+
return value.join('、');
|
|
199
|
+
}
|
|
200
|
+
if (typeof value === 'object') {
|
|
201
|
+
return JSON.stringify(value);
|
|
202
|
+
}
|
|
203
|
+
return String(value);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
exports.AuditActionInterceptor = AuditActionInterceptor;
|
|
207
|
+
exports.AuditActionInterceptor = AuditActionInterceptor = __decorate([
|
|
208
|
+
(0, common_1.Injectable)(),
|
|
209
|
+
__param(2, (0, common_1.Inject)((0, typeorm_1.getRepositoryToken)(entities_1.AuditActionSummaryEntity))),
|
|
210
|
+
__param(3, (0, common_1.Optional)()),
|
|
211
|
+
__metadata("design:paramtypes", [core_1.Reflector,
|
|
212
|
+
audit_context_service_1.AuditContextService,
|
|
213
|
+
typeorm_2.Repository,
|
|
214
|
+
operation_description_service_1.OperationDescriptionService])
|
|
215
|
+
], AuditActionInterceptor);
|
|
@@ -146,16 +146,21 @@ export interface EntityAuditConfig {
|
|
|
146
146
|
includeFields?: string[];
|
|
147
147
|
excludeFields?: string[];
|
|
148
148
|
maskFields?: string[];
|
|
149
|
+
/**
|
|
150
|
+
* 实体标签(支持多语言)
|
|
151
|
+
* @example
|
|
152
|
+
* // 单语言
|
|
153
|
+
* label: '订单'
|
|
154
|
+
*
|
|
155
|
+
* // 多语言
|
|
156
|
+
* label: { zh: '订单', en: 'Order', ja: '注文' }
|
|
157
|
+
*/
|
|
158
|
+
label?: string | Record<string, string>;
|
|
149
159
|
/**
|
|
150
160
|
* 操作模板键前缀
|
|
151
161
|
* @example 'user' -> 生成 'user.create', 'user.update', 'user.delete'
|
|
152
162
|
*/
|
|
153
163
|
templateKey?: string;
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated 使用 maskFields 代替
|
|
156
|
-
* 敏感字段列表(别名,用于兼容旧版本)
|
|
157
|
-
*/
|
|
158
|
-
sensitiveFields?: string[];
|
|
159
164
|
}
|
|
160
165
|
/**
|
|
161
166
|
* 操作级别审计配置
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { AuditContextService } from './audit-context.service';
|
|
2
|
+
import { EntityAuditService } from './entity-audit.service';
|
|
3
|
+
import { AuditOperation } from '../enums';
|
|
4
|
+
/**
|
|
5
|
+
* 审计动作选项
|
|
6
|
+
*/
|
|
7
|
+
export interface AuditActionOptions {
|
|
8
|
+
/**
|
|
9
|
+
* 动作名称,如 'createOrder', 'updateUser'
|
|
10
|
+
*/
|
|
11
|
+
actionName: string;
|
|
12
|
+
/**
|
|
13
|
+
* 操作模板键(可选)
|
|
14
|
+
* @example 'order.create'
|
|
15
|
+
*/
|
|
16
|
+
operationTemplateKey?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 描述参数,用于模板填充
|
|
19
|
+
* @example { productCount: 3, receiver: '张三', totalAmount: 299.99 }
|
|
20
|
+
*/
|
|
21
|
+
descriptionParams?: Record<string, any>;
|
|
22
|
+
/**
|
|
23
|
+
* 自定义元数据
|
|
24
|
+
*/
|
|
25
|
+
metadata?: Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 审计动作结果
|
|
29
|
+
*/
|
|
30
|
+
export interface AuditActionResult {
|
|
31
|
+
actionId: string;
|
|
32
|
+
actionName: string;
|
|
33
|
+
entityChanges: Array<{
|
|
34
|
+
entityType: string;
|
|
35
|
+
entityId: string;
|
|
36
|
+
operation: string;
|
|
37
|
+
sequence: number;
|
|
38
|
+
}>;
|
|
39
|
+
duration: number;
|
|
40
|
+
success: boolean;
|
|
41
|
+
error?: Error;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 审计动作服务
|
|
45
|
+
* 提供声明式的审计动作管理,自动关联同一业务操作的所有实体变化
|
|
46
|
+
*/
|
|
47
|
+
export declare class AuditActionService {
|
|
48
|
+
private readonly contextService;
|
|
49
|
+
private readonly auditService;
|
|
50
|
+
constructor(contextService: AuditContextService, auditService: EntityAuditService);
|
|
51
|
+
/**
|
|
52
|
+
* 在审计动作上下文中执行操作
|
|
53
|
+
* 自动关联该动作内的所有实体变化
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const result = await auditActionService.executeAction(
|
|
58
|
+
* {
|
|
59
|
+
* actionName: 'createOrder',
|
|
60
|
+
* operationTemplateKey: 'order.create',
|
|
61
|
+
* descriptionParams: {
|
|
62
|
+
* productCount: orderItems.length,
|
|
63
|
+
* receiver: order.receiverName,
|
|
64
|
+
* totalAmount: order.totalAmount,
|
|
65
|
+
* address: order.shippingAddress,
|
|
66
|
+
* },
|
|
67
|
+
* },
|
|
68
|
+
* async () => {
|
|
69
|
+
* // 1. 创建订单
|
|
70
|
+
* const order = await this.orderRepository.save(newOrder);
|
|
71
|
+
*
|
|
72
|
+
* // 2. 创建订单项
|
|
73
|
+
* await this.orderItemRepository.save(orderItems);
|
|
74
|
+
*
|
|
75
|
+
* // 3. 扣减库存
|
|
76
|
+
* await this.inventoryService.deduct(orderItems);
|
|
77
|
+
*
|
|
78
|
+
* // 4. 创建物流信息
|
|
79
|
+
* await this.shippingService.create(order.id);
|
|
80
|
+
*
|
|
81
|
+
* return order;
|
|
82
|
+
* }
|
|
83
|
+
* );
|
|
84
|
+
*
|
|
85
|
+
* // 结果中包含所有实体变化:
|
|
86
|
+
* // result.entityChanges = [
|
|
87
|
+
* // { entityType: 'Order', entityId: '1', operation: 'CREATE', sequence: 1 },
|
|
88
|
+
* // { entityType: 'OrderItem', entityId: '1', operation: 'CREATE', sequence: 2 },
|
|
89
|
+
* // { entityType: 'OrderItem', entityId: '2', operation: 'CREATE', sequence: 3 },
|
|
90
|
+
* // { entityType: 'Inventory', entityId: '1', operation: 'UPDATE', sequence: 4 },
|
|
91
|
+
* // { entityType: 'Shipping', entityId: '1', operation: 'CREATE', sequence: 5 },
|
|
92
|
+
* // ]
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
executeAction<T>(options: AuditActionOptions, operation: () => Promise<T>): Promise<AuditActionResult>;
|
|
96
|
+
/**
|
|
97
|
+
* 记录审计动作汇总日志
|
|
98
|
+
*/
|
|
99
|
+
private recordActionSummary;
|
|
100
|
+
/**
|
|
101
|
+
* 获取审计动作的所有实体变化
|
|
102
|
+
*/
|
|
103
|
+
getActionAuditLogs(actionId: string): Promise<{
|
|
104
|
+
actionId: string;
|
|
105
|
+
logs: import("..").EntityAuditLogEntity[];
|
|
106
|
+
summary: {
|
|
107
|
+
totalChanges: number;
|
|
108
|
+
operations: {
|
|
109
|
+
[k: string]: number;
|
|
110
|
+
};
|
|
111
|
+
entities: {
|
|
112
|
+
[k: string]: number;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* 获取请求内的所有审计动作
|
|
118
|
+
*/
|
|
119
|
+
getRequestActions(requestId: string): Promise<{
|
|
120
|
+
requestId: string;
|
|
121
|
+
actions: {
|
|
122
|
+
actionId: string;
|
|
123
|
+
actionName: string;
|
|
124
|
+
entityChanges: {
|
|
125
|
+
entityType: string;
|
|
126
|
+
entityId: string;
|
|
127
|
+
operation: AuditOperation;
|
|
128
|
+
sequence: number;
|
|
129
|
+
timestamp: Date;
|
|
130
|
+
}[];
|
|
131
|
+
logs: import("..").EntityAuditLogEntity[];
|
|
132
|
+
}[];
|
|
133
|
+
noActionLogs: import("..").EntityAuditLogEntity[];
|
|
134
|
+
summary: {
|
|
135
|
+
totalActions: number;
|
|
136
|
+
totalChanges: number;
|
|
137
|
+
};
|
|
138
|
+
}>;
|
|
139
|
+
private groupByOperation;
|
|
140
|
+
private groupByEntity;
|
|
141
|
+
}
|