@futdevpro/nts-dynamo 1.15.157 → 1.15.160
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 -17
- package/build/_modules/privacy-lifecycle/_models/privacy-export-artifact.interface.d.ts +71 -0
- package/build/_modules/privacy-lifecycle/_models/privacy-export-artifact.interface.d.ts.map +1 -0
- package/build/_modules/privacy-lifecycle/_models/privacy-export-artifact.interface.js +3 -0
- package/build/_modules/privacy-lifecycle/_models/privacy-export-artifact.interface.js.map +1 -0
- package/build/_modules/privacy-lifecycle/index.d.ts +3 -0
- package/build/_modules/privacy-lifecycle/index.d.ts.map +1 -1
- package/build/_modules/privacy-lifecycle/index.js +5 -1
- package/build/_modules/privacy-lifecycle/index.js.map +1 -1
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.control-service.d.ts +48 -0
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.control-service.d.ts.map +1 -0
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.control-service.js +332 -0
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.control-service.js.map +1 -0
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.mongo-store.d.ts +25 -0
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.mongo-store.d.ts.map +1 -0
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.mongo-store.js +126 -0
- package/build/_modules/privacy-lifecycle/privacy-export-artifact.mongo-store.js.map +1 -0
- package/package.json +11 -4
- package/.c8rc.json +0 -26
- package/.copilot/patterns.json +0 -8
- package/.cursor/rules/__assistant_guide.mdc +0 -30
- package/.cursor/rules/__main.mdc +0 -64
- package/.cursor/rules/_ag_backend-structure.mdc +0 -86
- package/.cursor/rules/_ag_backend.mdc +0 -16
- package/.cursor/rules/_ag_debug.mdc +0 -8
- package/.cursor/rules/_ag_documentation_writing_rules.mdc +0 -372
- package/.cursor/rules/_ag_file-refactoring.mdc +0 -113
- package/.cursor/rules/_ag_fixes_rules.mdc +0 -6
- package/.cursor/rules/_ag_frontend-structure.mdc +0 -87
- package/.cursor/rules/_ag_frontend.mdc +0 -40
- package/.cursor/rules/_ag_import-rules.mdc +0 -45
- package/.cursor/rules/_ag_naming.mdc +0 -116
- package/.cursor/rules/_ag_running_commands.mdc +0 -5
- package/.cursor/rules/_ag_server-controller.mdc +0 -6
- package/.cursor/rules/_ag_should-be.mdc +0 -7
- package/.cursor/rules/_ag_swearing.mdc +0 -47
- package/.cursor/rules/ai_development_guide.md +0 -61
- package/.cursor/rules/ai_directives.md +0 -114
- package/.cursor/rules/cursor-rules.md +0 -160
- package/.cursor/rules/default-command.mdc +0 -465
- package/.cursor/rules/error_code_pattern.md +0 -40
- package/.cursor/rules/saved rule mcp server use.md +0 -16
- package/.dynamo/pipeline.cicd.config.json +0 -190
- package/.dynamo/version-bump.config.json +0 -5
- package/.github/workflows/main.yml +0 -438
- package/.husky/pre-commit +0 -3
- package/.vscode/settings.json +0 -11
- package/BuildPackage.bat +0 -1
- package/HOWTO.md +0 -15
- package/__documentations/2026-04-28-logs-module.md +0 -49
- package/__documentations/2026-05-17-oai-compatible-providers.md +0 -229
- package/__documentations/2026-05-17-static-client-serving-howto.md +0 -144
- package/__documentations/2026-06-01-fr041-cors-middleware.md +0 -96
- package/__documentations/2026-06-01-fr047-p2p3-function-calling.md +0 -81
- package/__documentations/2026-06-15-fr193-memory-guard.md +0 -73
- package/__documentations/2026-08-08-fr292-app-version-header.md +0 -38
- package/__documentations/2026-08-14-field-encryption-mongoose-document-spread.md +0 -124
- package/__documentations/2026-08-18-artifact-compiler.md +0 -46
- package/__documentations/2026-08-18-mongo-transaction-control-service.md +0 -82
- package/__documentations/2026-08-18-standalone-account-security-and-privacy-bedrock.md +0 -132
- package/__documentations/2026-08-21-distributed-rate-limit-bfr-ctm-010.md +0 -59
- package/__documentations/2026-08-22-bfr-ctm-018-content-free-endpoint-errors.md +0 -54
- package/__documentations/2026-08-22-bfr-ctm-020-content-free-request-telemetry.md +0 -65
- package/__documentations/2026-08-22-content-free-process-error-boundary.md +0 -111
- package/__documentations/2026-08-22-npm-token-state-classifier.md +0 -92
- package/__documentations/nts-integration-tests-2026-03-17.md +0 -26
- package/__documentations/plans/BEDROCK-HYPERPLAN.md +0 -95
- package/_specifications/BACKLOG.md +0 -92
- package/_specifications/TODO.md +0 -15
- package/_specifications/agent.md +0 -138
- package/eslint.config.js +0 -3
- package/nodemon.json +0 -24
- package/pnpm-workspace.yaml +0 -6
- package/scripts/_seed-out/aim-seed.fixtures.ts +0 -161
- package/scripts/_seed-out/image-raw.json +0 -1
- package/scripts/_seed-out/llm-expand-raw.json +0 -60
- package/scripts/_seed-out/sample-image.png +0 -0
- package/scripts/_seed-out/seed-raw.json +0 -153
- package/scripts/ai-fixture-seed.js +0 -126
- package/scripts/run-coverage-tests.js +0 -28
- package/spec/support/helpers/spec-reporter-loader.js +0 -359
- package/spec/support/helpers/ts-node-helper.js +0 -93
- package/spec/support/jasmine.coverage.json +0 -24
- package/spec/support/jasmine.json +0 -24
- package/src/_assets/dynamo-nts-logo-128.png +0 -0
- package/src/_assets/dynamo-nts-logo-256.png +0 -0
- package/src/_assets/dynamo-nts-logo-512.png +0 -0
- package/src/_assets/dynamo-nts-logo-64.png +0 -0
- package/src/_collections/app-version-header.util.spec.ts +0 -108
- package/src/_collections/app-version-header.util.ts +0 -74
- package/src/_collections/archive-service-registry.const.ts +0 -21
- package/src/_collections/archive.util.spec.ts +0 -57
- package/src/_collections/archive.util.ts +0 -18
- package/src/_collections/atlas-default-db-options.const.ts +0 -10
- package/src/_collections/client-safe-error.util.spec.ts +0 -151
- package/src/_collections/client-safe-error.util.ts +0 -107
- package/src/_collections/default-fallback-cache-max-age.const.spec.ts +0 -11
- package/src/_collections/default-fallback-cache-max-age.const.ts +0 -2
- package/src/_collections/default-not-found-page.const.spec.ts +0 -19
- package/src/_collections/default-not-found-page.const.ts +0 -22
- package/src/_collections/default-socket-path.const.spec.ts +0 -12
- package/src/_collections/default-socket-path.const.ts +0 -2
- package/src/_collections/field-encryption.util.spec.ts +0 -195
- package/src/_collections/field-encryption.util.ts +0 -222
- package/src/_collections/get-environment-settings.util.spec.ts +0 -210
- package/src/_collections/get-environment-settings.util.ts +0 -49
- package/src/_collections/global-settings.const.ts +0 -126
- package/src/_collections/load-shed.util.spec.ts +0 -62
- package/src/_collections/load-shed.util.ts +0 -51
- package/src/_collections/mongo-reconnect-guard.util.spec.ts +0 -52
- package/src/_collections/mongo-reconnect-guard.util.ts +0 -172
- package/src/_collections/npm-token-check.util.spec.ts +0 -218
- package/src/_collections/npm-token-check.util.ts +0 -327
- package/src/_collections/sample.env +0 -21
- package/src/_collections/security-headers.util.spec.ts +0 -98
- package/src/_collections/security-headers.util.ts +0 -96
- package/src/_collections/signed-url.util.spec.ts +0 -198
- package/src/_collections/signed-url.util.ts +0 -170
- package/src/_collections/star.controller.spec.ts +0 -224
- package/src/_collections/star.controller.ts +0 -130
- package/src/_collections/static-cache-control.util.spec.ts +0 -47
- package/src/_collections/static-cache-control.util.ts +0 -25
- package/src/_enums/data-model-type.enum.ts +0 -14
- package/src/_enums/data-service-function.enum.ts +0 -24
- package/src/_enums/predefined-data-types.enum.ts +0 -17
- package/src/_enums/route-security.enum.ts +0 -12
- package/src/_models/control-models/api-call-params.control-model.spec.ts +0 -152
- package/src/_models/control-models/api-call-params.control-model.ts +0 -142
- package/src/_models/control-models/app-ext-system-controls.control-model.spec.ts +0 -52
- package/src/_models/control-models/app-ext-system-controls.control-model.ts +0 -9
- package/src/_models/control-models/app-params.control-model.spec.ts +0 -229
- package/src/_models/control-models/app-params.control-model.ts +0 -137
- package/src/_models/control-models/app-system-controls.control-model.spec.ts +0 -31
- package/src/_models/control-models/app-system-controls.control-model.ts +0 -9
- package/src/_models/control-models/endpoint-params.control-model.spec.ts +0 -754
- package/src/_models/control-models/endpoint-params.control-model.ts +0 -575
- package/src/_models/control-models/http-settings.control-model.spec.ts +0 -77
- package/src/_models/control-models/http-settings.control-model.ts +0 -37
- package/src/_models/control-models/system-control.control-model.spec.ts +0 -27
- package/src/_models/control-models/system-control.control-model.ts +0 -12
- package/src/_models/data-models/schema-migration.data-model.ts +0 -50
- package/src/_models/interfaces/app-version-header-settings.interface.ts +0 -17
- package/src/_models/interfaces/certification-settings.interface.ts +0 -7
- package/src/_models/interfaces/compare-data-options.interface.ts +0 -27
- package/src/_models/interfaces/compare-data-result.interface.ts +0 -12
- package/src/_models/interfaces/cors-settings.interface.spec.ts +0 -52
- package/src/_models/interfaces/cors-settings.interface.ts +0 -56
- package/src/_models/interfaces/db-query-options.interface.ts +0 -33
- package/src/_models/interfaces/environment-settings.interface.ts +0 -59
- package/src/_models/interfaces/global-log-settings.interface.ts +0 -171
- package/src/_models/interfaces/global-service-settings.interface.ts +0 -47
- package/src/_models/interfaces/global-settings.interface.ts +0 -294
- package/src/_models/interfaces/migration-entry.interface.ts +0 -19
- package/src/_models/interfaces/mongo-transaction-settings.interface.ts +0 -9
- package/src/_models/interfaces/request-telemetry-settings.interface.ts +0 -9
- package/src/_models/interfaces/request-telemetry-snapshot.interface.ts +0 -30
- package/src/_models/interfaces/routing-module-settings.interface.ts +0 -21
- package/src/_models/interfaces/security-headers-settings.interface.ts +0 -50
- package/src/_models/interfaces/signed-url-verify-result.interface.ts +0 -13
- package/src/_models/interfaces/static-client-settings.interface.spec.ts +0 -29
- package/src/_models/interfaces/static-client-settings.interface.ts +0 -36
- package/src/_models/types/db-update.type.ts +0 -100
- package/src/_modules/account-security/_enums/account-challenge-purpose.type-enum.ts +0 -5
- package/src/_modules/account-security/_enums/account-refresh-token-state.type-enum.ts +0 -6
- package/src/_modules/account-security/_enums/account-session-state.type-enum.ts +0 -6
- package/src/_modules/account-security/_models/account-challenge-adapter.interface.ts +0 -17
- package/src/_modules/account-security/_models/account-challenge-issued.interface.ts +0 -6
- package/src/_modules/account-security/_models/account-challenge-record.interface.ts +0 -13
- package/src/_modules/account-security/_models/account-challenge-result.interface.ts +0 -8
- package/src/_modules/account-security/_models/account-challenge-settings.interface.ts +0 -9
- package/src/_modules/account-security/_models/account-password-policy.interface.ts +0 -11
- package/src/_modules/account-security/_models/account-password-verification.interface.ts +0 -5
- package/src/_modules/account-security/_models/account-refresh-token-record.interface.ts +0 -13
- package/src/_modules/account-security/_models/account-session-adapter.interface.ts +0 -19
- package/src/_modules/account-security/_models/account-session-claims.interface.ts +0 -7
- package/src/_modules/account-security/_models/account-session-context.interface.ts +0 -6
- package/src/_modules/account-security/_models/account-session-create.interface.ts +0 -8
- package/src/_modules/account-security/_models/account-session-record.interface.ts +0 -21
- package/src/_modules/account-security/_models/account-session-rotate.interface.ts +0 -11
- package/src/_modules/account-security/_models/account-session-settings.interface.ts +0 -11
- package/src/_modules/account-security/_models/account-session-token-pair.interface.ts +0 -8
- package/src/_modules/account-security/_models/account-session-view.interface.ts +0 -13
- package/src/_modules/account-security/account-challenge.control-service.spec.ts +0 -195
- package/src/_modules/account-security/account-challenge.control-service.ts +0 -164
- package/src/_modules/account-security/account-password.control-service.spec.ts +0 -96
- package/src/_modules/account-security/account-password.control-service.ts +0 -288
- package/src/_modules/account-security/account-session.control-service.spec.ts +0 -294
- package/src/_modules/account-security/account-session.control-service.ts +0 -376
- package/src/_modules/account-security/index.ts +0 -31
- package/src/_modules/admin-auth/_models/admin-api-key-config.interface.ts +0 -33
- package/src/_modules/admin-auth/admin-api-key.auth-service.spec.ts +0 -200
- package/src/_modules/admin-auth/admin-api-key.auth-service.ts +0 -220
- package/src/_modules/admin-auth/index.ts +0 -2
- package/src/_modules/ai/_collections/ai-model-config-validator.util.spec.ts +0 -150
- package/src/_modules/ai/_collections/ai-model-config-validator.util.ts +0 -131
- package/src/_modules/ai/_collections/ai-provider-error.util.ts +0 -144
- package/src/_modules/ai/_models/ai-input-interfaces.ts +0 -117
- package/src/_modules/ai/_models/ai-test-generation-result.interface.ts +0 -16
- package/src/_modules/ai/_models/interfaces/dynts-ai-cost-event-callback.interface.ts +0 -14
- package/src/_modules/ai/_models/interfaces/dynts-ai-cost-event.interface.ts +0 -56
- package/src/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.ts +0 -16
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.spec.ts +0 -72
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.ts +0 -71
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.spec.ts +0 -57
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.ts +0 -60
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.spec.ts +0 -56
- package/src/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.ts +0 -117
- package/src/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.ts +0 -28
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.ts +0 -14
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.ts +0 -11
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.ts +0 -30
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.ts +0 -19
- package/src/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.ts +0 -20
- package/src/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.spec.ts +0 -115
- package/src/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.ts +0 -233
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.spec.ts +0 -134
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.ts +0 -127
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-pipeline.spec.ts +0 -105
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.spec.ts +0 -50
- package/src/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.ts +0 -65
- package/src/_modules/ai/_modules/ai-mock/_services/aim-integration-proof.spec.ts +0 -92
- package/src/_modules/ai/_modules/ai-mock/_services/aim-mock.service.spec.ts +0 -112
- package/src/_modules/ai/_modules/ai-mock/_services/aim-mock.service.ts +0 -155
- package/src/_modules/ai/_modules/ai-mock/fixtures/aim-text.fixtures.ts +0 -649
- package/src/_modules/ai/_modules/ai-mock/index.ts +0 -47
- package/src/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.ts +0 -138
- package/src/_modules/ai/_modules/anthropic/index.ts +0 -5
- package/src/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.spec.ts +0 -242
- package/src/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.ts +0 -639
- package/src/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.spec.ts +0 -295
- package/src/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.ts +0 -552
- package/src/_modules/ai/_modules/document-ai/_collections/dai-document.util.spec.ts +0 -209
- package/src/_modules/ai/_modules/document-ai/_collections/dai-document.util.ts +0 -85
- package/src/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.ts +0 -8
- package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.ts +0 -146
- package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.ts +0 -163
- package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.ts +0 -100
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-code-chunk.interface.ts +0 -68
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.ts +0 -18
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.ts +0 -19
- package/src/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.ts +0 -25
- package/src/_modules/ai/_modules/document-ai/index.ts +0 -30
- package/src/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.ts +0 -189
- package/src/_modules/ai/_modules/fdp-ai/index.ts +0 -5
- package/src/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.ts +0 -9
- package/src/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.ts +0 -83
- package/src/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.ts +0 -76
- package/src/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts +0 -45
- package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.ts +0 -8
- package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts +0 -7
- package/src/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.ts +0 -57
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.ts +0 -293
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.ts +0 -572
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.spec.ts +0 -342
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.ts +0 -435
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.spec.ts +0 -550
- package/src/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.ts +0 -631
- package/src/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.spec.ts +0 -332
- package/src/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.ts +0 -132
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.spec.ts +0 -462
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts +0 -635
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.spec.ts +0 -489
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.tools.spec.ts +0 -173
- package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts +0 -1085
- package/src/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.ts +0 -157
- package/src/_modules/ai/_modules/open-ai/index.ts +0 -74
- package/src/_modules/ai/_services/ai-embedding-provider.registry.spec.ts +0 -110
- package/src/_modules/ai/_services/ai-embedding-provider.registry.ts +0 -114
- package/src/_modules/ai/_services/ai-embedding.service-base.spec.ts +0 -98
- package/src/_modules/ai/_services/ai-embedding.service-base.ts +0 -48
- package/src/_modules/ai/_services/ai-llm-chat.service-base.spec.ts +0 -229
- package/src/_modules/ai/_services/ai-llm-chat.service-base.ts +0 -68
- package/src/_modules/ai/_services/ai-llm.service-base.reconciler.spec.ts +0 -133
- package/src/_modules/ai/_services/ai-llm.service-base.spec.ts +0 -250
- package/src/_modules/ai/_services/ai-llm.service-base.ts +0 -599
- package/src/_modules/ai/_services/ai-provider.service-base.spec.ts +0 -158
- package/src/_modules/ai/_services/ai-provider.service-base.ts +0 -67
- package/src/_modules/ai/_services/ai-user-key.service-base.ts +0 -59
- package/src/_modules/ai/_services/lmstudio-embedding.control-service.spec.ts +0 -197
- package/src/_modules/ai/_services/lmstudio-embedding.control-service.ts +0 -399
- package/src/_modules/ai/index.ts +0 -33
- package/src/_modules/artifact-compiler/_enums/artifact-compile-outcome.type-enum.ts +0 -5
- package/src/_modules/artifact-compiler/_enums/artifact-compile-stage.type-enum.ts +0 -8
- package/src/_modules/artifact-compiler/_enums/artifact-retry-class.type-enum.ts +0 -6
- package/src/_modules/artifact-compiler/_models/artifact-compile.interface.ts +0 -35
- package/src/_modules/artifact-compiler/artifact-compiler.control-service.spec.ts +0 -151
- package/src/_modules/artifact-compiler/artifact-compiler.control-service.ts +0 -356
- package/src/_modules/artifact-compiler/index.ts +0 -9
- package/src/_modules/assistant/_collections/ass-global-settings.const.ts +0 -13
- package/src/_modules/assistant/_collections/ass.util.spec.ts +0 -176
- package/src/_modules/assistant/_collections/ass.util.ts +0 -50
- package/src/_modules/assistant/_models/ass-global-settings.interface.ts +0 -15
- package/src/_modules/assistant/_services/ass-io.control-service.spec.ts +0 -140
- package/src/_modules/assistant/_services/ass-io.control-service.ts +0 -74
- package/src/_modules/assistant/_services/ass-main.control-service.spec.ts +0 -192
- package/src/_modules/assistant/_services/ass-main.control-service.ts +0 -107
- package/src/_modules/assistant/index.ts +0 -19
- package/src/_modules/bot/_collections/bot-default-commands.const.ts +0 -12
- package/src/_modules/bot/_collections/bot-global-settings.const.ts +0 -39
- package/src/_modules/bot/_models/bot-channel-wrapper.interface.ts +0 -62
- package/src/_modules/bot/_models/bot-command.interface.ts +0 -8
- package/src/_modules/bot/_models/bot-global-settings.interface.ts +0 -96
- package/src/_modules/bot/_models/bot-last-mention-date.interface.ts +0 -6
- package/src/_modules/bot/_models/bot-last-message-date.interface.ts +0 -5
- package/src/_modules/bot/_models/bot-message-wrapper.interface.ts +0 -90
- package/src/_modules/bot/_models/bot-user-wrapper.interface.ts +0 -41
- package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +0 -10
- package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.spec.ts +0 -431
- package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.ts +0 -641
- package/src/_modules/bot/_modules/discord-bot/index.ts +0 -12
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.spec.ts +0 -160
- package/src/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.ts +0 -55
- package/src/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.ts +0 -15
- package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.spec.ts +0 -374
- package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.ts +0 -447
- package/src/_modules/bot/_modules/dynamo-bot/index.ts +0 -15
- package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +0 -9
- package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.spec.ts +0 -344
- package/src/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.ts +0 -197
- package/src/_modules/bot/_modules/slack-bot/index.ts +0 -12
- package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +0 -9
- package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.spec.ts +0 -345
- package/src/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.ts +0 -197
- package/src/_modules/bot/_modules/teams-bot/index.ts +0 -11
- package/src/_modules/bot/_services/bot-commands.control-service.spec.ts +0 -116
- package/src/_modules/bot/_services/bot-commands.control-service.ts +0 -158
- package/src/_modules/bot/_services/bot-io.control-service.spec.ts +0 -285
- package/src/_modules/bot/_services/bot-io.control-service.ts +0 -329
- package/src/_modules/bot/_services/bot-main.control-service.spec.ts +0 -208
- package/src/_modules/bot/_services/bot-main.control-service.ts +0 -489
- package/src/_modules/bot/_services/bot-messaging-provider.service-base.spec.ts +0 -349
- package/src/_modules/bot/_services/bot-messaging-provider.service-base.ts +0 -158
- package/src/_modules/bot/_services/bot-routines.control-service.spec.ts +0 -111
- package/src/_modules/bot/_services/bot-routines.control-service.ts +0 -78
- package/src/_modules/bot/index.ts +0 -37
- package/src/_modules/custom-data/custom-data.controller.spec.ts +0 -49
- package/src/_modules/custom-data/custom-data.controller.ts +0 -67
- package/src/_modules/custom-data/custom-data.data-service.spec.ts +0 -54
- package/src/_modules/custom-data/custom-data.data-service.ts +0 -22
- package/src/_modules/custom-data/get-custom-data-routing-module.util.spec.ts +0 -28
- package/src/_modules/custom-data/get-custom-data-routing-module.util.ts +0 -24
- package/src/_modules/custom-data/index.ts +0 -9
- package/src/_modules/data-readers/_collections/dynts-sqlite-reader.util.spec.ts +0 -176
- package/src/_modules/data-readers/_collections/dynts-sqlite-reader.util.ts +0 -203
- package/src/_modules/data-readers/_models/interfaces/dynts-sqlite-reader.interface.ts +0 -33
- package/src/_modules/data-readers/index.ts +0 -11
- package/src/_modules/defaults/_collections/default-endpoints.util.ts +0 -487
- package/src/_modules/defaults/_models/default-user.data-model.ts +0 -72
- package/src/_modules/defaults/_services/default-auth.service.spec.ts +0 -269
- package/src/_modules/defaults/_services/default-auth.service.ts +0 -177
- package/src/_modules/defaults/_services/default-socket-events.service.spec.ts +0 -42
- package/src/_modules/defaults/_services/default-socket-events.service.ts +0 -61
- package/src/_modules/defaults/_services/default-user.data-service.spec.ts +0 -187
- package/src/_modules/defaults/_services/default-user.data-service.ts +0 -98
- package/src/_modules/defaults/index.ts +0 -17
- package/src/_modules/discord-assistant/_collections/dias-global-settings.const.ts +0 -19
- package/src/_modules/discord-assistant/_collections/dias.util.spec.ts +0 -366
- package/src/_modules/discord-assistant/_collections/dias.util.ts +0 -133
- package/src/_modules/discord-assistant/_models/dias-global-settings.interface.ts +0 -20
- package/src/_modules/discord-assistant/_models/dias-knowledge.data-model.ts +0 -53
- package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +0 -177
- package/src/_modules/discord-assistant/_services/dias-io.control-service.spec.ts +0 -108
- package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +0 -69
- package/src/_modules/discord-assistant/_services/dias-main.control-service.spec.ts +0 -22
- package/src/_modules/discord-assistant/_services/dias-main.control-service.ts +0 -27
- package/src/_modules/discord-assistant/_services/dias.service-base.spec.ts +0 -195
- package/src/_modules/discord-assistant/_services/dias.service-base.ts +0 -77
- package/src/_modules/discord-assistant/index.ts +0 -38
- package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.spec.ts +0 -34
- package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.ts +0 -11
- package/src/_modules/discord-assistant-voiced/index.ts +0 -36
- package/src/_modules/discord-bot/_collections/dibo-default-commands.const.ts +0 -17
- package/src/_modules/discord-bot/_collections/dibo-global-settings.conts.ts +0 -56
- package/src/_modules/discord-bot/_collections/dibo-operations.util.spec.ts +0 -214
- package/src/_modules/discord-bot/_collections/dibo-operations.util.ts +0 -387
- package/src/_modules/discord-bot/_models/dibo-command.interface.ts +0 -12
- package/src/_modules/discord-bot/_models/dibo-global-settings.interface.ts +0 -98
- package/src/_modules/discord-bot/_models/dibo-last-mention-date.inteface.ts +0 -8
- package/src/_modules/discord-bot/_models/dibo-last-message-date.interface.ts +0 -6
- package/src/_modules/discord-bot/_services/dibo-commands.control-service.spec.ts +0 -154
- package/src/_modules/discord-bot/_services/dibo-commands.control-service.ts +0 -153
- package/src/_modules/discord-bot/_services/dibo-io.control-service.spec.ts +0 -264
- package/src/_modules/discord-bot/_services/dibo-io.control-service.ts +0 -306
- package/src/_modules/discord-bot/_services/dibo-main.control-service.spec.ts +0 -408
- package/src/_modules/discord-bot/_services/dibo-main.control-service.ts +0 -488
- package/src/_modules/discord-bot/_services/dibo-routines.control-service.spec.ts +0 -105
- package/src/_modules/discord-bot/_services/dibo-routines.control-service.ts +0 -97
- package/src/_modules/discord-bot/index.ts +0 -36
- package/src/_modules/local-vector-search/_enums/lvs-search-mode.enum.ts +0 -35
- package/src/_modules/local-vector-search/_models/data-models/lvs-vector-persist.data-model.ts +0 -60
- package/src/_modules/local-vector-search/_models/lvs-search-result.interface.ts +0 -17
- package/src/_modules/local-vector-search/_services/lvs-bm25.util.spec.ts +0 -159
- package/src/_modules/local-vector-search/_services/lvs-bm25.util.ts +0 -206
- package/src/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.spec.ts +0 -418
- package/src/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.ts +0 -276
- package/src/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.spec.ts +0 -480
- package/src/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.ts +0 -416
- package/src/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.spec.ts +0 -214
- package/src/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.ts +0 -186
- package/src/_modules/local-vector-search/_services/lvs-vector-persist.data-service.spec.ts +0 -167
- package/src/_modules/local-vector-search/_services/lvs-vector-persist.data-service.ts +0 -130
- package/src/_modules/local-vector-search/_services/lvs-vector-pool.control-service.spec.ts +0 -509
- package/src/_modules/local-vector-search/_services/lvs-vector-pool.control-service.ts +0 -323
- package/src/_modules/local-vector-search/index.ts +0 -17
- package/src/_modules/logs/_models/file-log-entry.interface.ts +0 -13
- package/src/_modules/logs/_models/file-log-read-result.interface.ts +0 -37
- package/src/_modules/logs/file-log.service.spec.ts +0 -341
- package/src/_modules/logs/file-log.service.ts +0 -466
- package/src/_modules/logs/file-logs.controller.spec.ts +0 -245
- package/src/_modules/logs/file-logs.controller.ts +0 -165
- package/src/_modules/logs/get-file-logs-routing-module.util.ts +0 -51
- package/src/_modules/logs/get-logs-routing-module.util.ts +0 -36
- package/src/_modules/logs/index.ts +0 -11
- package/src/_modules/logs/log-buffer.service.ts +0 -101
- package/src/_modules/logs/logs.controller.ts +0 -109
- package/src/_modules/logs/logs.service.ts +0 -100
- package/src/_modules/mcp/_models/interfaces/dynts-mcp.interface.ts +0 -111
- package/src/_modules/mcp/_services/dynts-mcp-server.service-base.spec.ts +0 -151
- package/src/_modules/mcp/_services/dynts-mcp-server.service-base.ts +0 -125
- package/src/_modules/mcp/_services/dynts-mcp.adapter.ts +0 -168
- package/src/_modules/mcp/index.ts +0 -13
- package/src/_modules/messaging/README.md +0 -354
- package/src/_modules/messaging/_collections/get-messaging-routing-module.util.ts +0 -26
- package/src/_modules/messaging/_collections/msg-global-settings.const.ts +0 -22
- package/src/_modules/messaging/_collections/msg.util.spec.ts +0 -226
- package/src/_modules/messaging/_collections/msg.util.ts +0 -83
- package/src/_modules/messaging/_models/msg-global-settings.interface.ts +0 -37
- package/src/_modules/messaging/_services/msg-conversation.data-service.ts +0 -146
- package/src/_modules/messaging/_services/msg-events.service.spec.ts +0 -219
- package/src/_modules/messaging/_services/msg-events.service.ts +0 -267
- package/src/_modules/messaging/_services/msg-integration.control-service.ts +0 -180
- package/src/_modules/messaging/_services/msg-main.control-service.spec.ts +0 -147
- package/src/_modules/messaging/_services/msg-main.control-service.ts +0 -572
- package/src/_modules/messaging/_services/msg-message.data-service.ts +0 -129
- package/src/_modules/messaging/_services/msg.controller.spec.ts +0 -201
- package/src/_modules/messaging/_services/msg.controller.ts +0 -370
- package/src/_modules/messaging/index.ts +0 -30
- package/src/_modules/mock/app-extended-server.mock.ts +0 -201
- package/src/_modules/mock/app-integration-test.mock.ts +0 -51
- package/src/_modules/mock/app-params.mock.spec.ts +0 -21
- package/src/_modules/mock/app-params.mock.ts +0 -9
- package/src/_modules/mock/app-server.mock.ts +0 -188
- package/src/_modules/mock/auth-service.mock.spec.ts +0 -47
- package/src/_modules/mock/auth-service.mock.ts +0 -28
- package/src/_modules/mock/controller.mock.spec.ts +0 -26
- package/src/_modules/mock/controller.mock.ts +0 -16
- package/src/_modules/mock/data-model.mock.spec.ts +0 -111
- package/src/_modules/mock/data-model.mock.ts +0 -82
- package/src/_modules/mock/email-service-collection.mock.spec.ts +0 -24
- package/src/_modules/mock/email-service-collection.mock.ts +0 -15
- package/src/_modules/mock/email-service.mock.spec.ts +0 -17
- package/src/_modules/mock/email-service.mock.ts +0 -20
- package/src/_modules/mock/email-template.mock.html +0 -15
- package/src/_modules/mock/endpoint.mock.ts +0 -91
- package/src/_modules/mock/socket-client.mock.spec.ts +0 -40
- package/src/_modules/mock/socket-client.mock.ts +0 -45
- package/src/_modules/mock/socket-server.mock.spec.ts +0 -44
- package/src/_modules/mock/socket-server.mock.ts +0 -46
- package/src/_modules/oauth2/_routes/oauth2.controller.spec.ts +0 -107
- package/src/_modules/oauth2/_routes/oauth2.controller.ts +0 -99
- package/src/_modules/oauth2/_services/oauth2.auth-service.spec.ts +0 -254
- package/src/_modules/oauth2/_services/oauth2.auth-service.ts +0 -232
- package/src/_modules/oauth2/_services/oauth2.control-service.spec.ts +0 -585
- package/src/_modules/oauth2/_services/oauth2.control-service.ts +0 -654
- package/src/_modules/oauth2/index.ts +0 -17
- package/src/_modules/privacy-lifecycle/_enums/privacy-consent-decision.type-enum.ts +0 -5
- package/src/_modules/privacy-lifecycle/_enums/privacy-contributor-action.type-enum.ts +0 -10
- package/src/_modules/privacy-lifecycle/_enums/privacy-contributor-outcome.type-enum.ts +0 -7
- package/src/_modules/privacy-lifecycle/_enums/privacy-request-state.type-enum.ts +0 -15
- package/src/_modules/privacy-lifecycle/_enums/privacy-request.type-enum.ts +0 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-input.interface.ts +0 -12
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-persistence-result.interface.ts +0 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-record.interface.ts +0 -15
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-result.interface.ts +0 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-consent-view.interface.ts +0 -13
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor-context.interface.ts +0 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor-outcome.interface.ts +0 -14
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor-plan.interface.ts +0 -8
- package/src/_modules/privacy-lifecycle/_models/privacy-contributor.interface.ts +0 -17
- package/src/_modules/privacy-lifecycle/_models/privacy-ledger-adapter.interface.ts +0 -21
- package/src/_modules/privacy-lifecycle/_models/privacy-ledger-result.interface.ts +0 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-ledger-settings.interface.ts +0 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-input.interface.ts +0 -10
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-persistence-result.interface.ts +0 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-result.interface.ts +0 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-view.interface.ts +0 -11
- package/src/_modules/privacy-lifecycle/_models/privacy-legal-acceptance.interface.ts +0 -13
- package/src/_modules/privacy-lifecycle/_models/privacy-lifecycle-adapter.interface.ts +0 -19
- package/src/_modules/privacy-lifecycle/_models/privacy-lifecycle-settings.interface.ts +0 -9
- package/src/_modules/privacy-lifecycle/_models/privacy-request-create-result.interface.ts +0 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-request-open.interface.ts +0 -10
- package/src/_modules/privacy-lifecycle/_models/privacy-request-persistence-create-result.interface.ts +0 -7
- package/src/_modules/privacy-lifecycle/_models/privacy-request-record.interface.ts +0 -21
- package/src/_modules/privacy-lifecycle/_models/privacy-request-result.interface.ts +0 -8
- package/src/_modules/privacy-lifecycle/_models/privacy-request-view.interface.ts +0 -20
- package/src/_modules/privacy-lifecycle/index.ts +0 -40
- package/src/_modules/privacy-lifecycle/privacy-ledger.control-service.spec.ts +0 -206
- package/src/_modules/privacy-lifecycle/privacy-ledger.control-service.ts +0 -253
- package/src/_modules/privacy-lifecycle/privacy-lifecycle.control-service.spec.ts +0 -353
- package/src/_modules/privacy-lifecycle/privacy-lifecycle.control-service.ts +0 -586
- package/src/_modules/rate-limit/_enums/rate-limit-store-kind.type-enum.ts +0 -5
- package/src/_modules/rate-limit/_models/rate-limit-config.interface.ts +0 -82
- package/src/_modules/rate-limit/_models/rate-limit-consume-request.interface.ts +0 -9
- package/src/_modules/rate-limit/_models/rate-limit-consume-result.interface.ts +0 -6
- package/src/_modules/rate-limit/_models/rate-limit-policy.interface.ts +0 -16
- package/src/_modules/rate-limit/_models/rate-limit-store.interface.ts +0 -9
- package/src/_modules/rate-limit/index.ts +0 -8
- package/src/_modules/rate-limit/rate-limit-in-memory.store.ts +0 -91
- package/src/_modules/rate-limit/rate-limit.middleware.spec.ts +0 -488
- package/src/_modules/rate-limit/rate-limit.middleware.ts +0 -504
- package/src/_modules/scheduler/_models/scheduler-job.interface.ts +0 -35
- package/src/_modules/scheduler/get-scheduler-routing-module.util.ts +0 -33
- package/src/_modules/scheduler/index.ts +0 -8
- package/src/_modules/scheduler/scheduler.controller.spec.ts +0 -42
- package/src/_modules/scheduler/scheduler.controller.ts +0 -69
- package/src/_modules/scheduler/scheduler.service.spec.ts +0 -141
- package/src/_modules/scheduler/scheduler.service.ts +0 -176
- package/src/_modules/scoped-config/_enums/dynts-scoped-config-level.enum.ts +0 -22
- package/src/_modules/scoped-config/_models/data-models/dynts-scoped-config.data-model.ts +0 -82
- package/src/_modules/scoped-config/_models/interfaces/dynts-scoped-config.interface.ts +0 -107
- package/src/_modules/scoped-config/_services/dynts-scoped-config.control-service.spec.ts +0 -312
- package/src/_modules/scoped-config/_services/dynts-scoped-config.control-service.ts +0 -311
- package/src/_modules/scoped-config/_services/dynts-scoped-config.data-service.spec.ts +0 -123
- package/src/_modules/scoped-config/_services/dynts-scoped-config.data-service.ts +0 -108
- package/src/_modules/scoped-config/index.ts +0 -17
- package/src/_modules/server/errors/errors.control-service.spec.ts +0 -246
- package/src/_modules/server/errors/errors.control-service.ts +0 -100
- package/src/_modules/server/errors/errors.controller.spec.ts +0 -340
- package/src/_modules/server/errors/errors.controller.ts +0 -559
- package/src/_modules/server/errors/errors.data-service.spec.ts +0 -480
- package/src/_modules/server/errors/errors.data-service.ts +0 -867
- package/src/_modules/server/index.ts +0 -40
- package/src/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.ts +0 -8
- package/src/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.ts +0 -20
- package/src/_modules/server/safe-diagnostic/safe-diagnostic.control-service.spec.ts +0 -124
- package/src/_modules/server/safe-diagnostic/safe-diagnostic.control-service.ts +0 -99
- package/src/_modules/server/safe-diagnostic/safe-diagnostic.interface.ts +0 -20
- package/src/_modules/server/server-status/db-readiness-probe-code.type-enum.ts +0 -13
- package/src/_modules/server/server-status/db-readiness-probe-stage.type-enum.ts +0 -7
- package/src/_modules/server/server-status/db-readiness-probe.control-service.spec.ts +0 -235
- package/src/_modules/server/server-status/db-readiness-probe.control-service.ts +0 -158
- package/src/_modules/server/server-status/db-readiness-probe.interface.ts +0 -20
- package/src/_modules/server/server-status/server-status-snapshot.control-service.spec.ts +0 -70
- package/src/_modules/server/server-status/server-status-snapshot.control-service.ts +0 -17
- package/src/_modules/server/server-status/server-status-snapshot.data-service.spec.ts +0 -77
- package/src/_modules/server/server-status/server-status-snapshot.data-service.ts +0 -37
- package/src/_modules/server/server-status/server-status.control-service.spec.ts +0 -672
- package/src/_modules/server/server-status/server-status.control-service.ts +0 -491
- package/src/_modules/server/server-status/server-status.controller.spec.ts +0 -276
- package/src/_modules/server/server-status/server-status.controller.ts +0 -336
- package/src/_modules/socket/_enums/socket-security.enum.ts +0 -11
- package/src/_modules/socket/_models/socket-client-service-params.control-model.spec.ts +0 -32
- package/src/_modules/socket/_models/socket-client-service-params.control-model.ts +0 -22
- package/src/_modules/socket/_models/socket-presence.control-model.spec.ts +0 -165
- package/src/_modules/socket/_models/socket-presence.control-model.ts +0 -211
- package/src/_modules/socket/_models/socket-server-service-params.control-model.spec.ts +0 -69
- package/src/_modules/socket/_models/socket-server-service-params.control-model.ts +0 -33
- package/src/_modules/socket/_services/socket-client.service.spec.ts +0 -15
- package/src/_modules/socket/_services/socket-client.service.ts +0 -260
- package/src/_modules/socket/_services/socket-server.service.spec.ts +0 -272
- package/src/_modules/socket/_services/socket-server.service.ts +0 -1037
- package/src/_modules/socket/app-extended.integration.spec.ts +0 -85
- package/src/_modules/socket/app-extended.server.ts +0 -648
- package/src/_modules/socket/index.ts +0 -42
- package/src/_modules/test/get-test-routing-module.util.spec.ts +0 -28
- package/src/_modules/test/get-test-routing-module.util.ts +0 -23
- package/src/_modules/test/index.ts +0 -12
- package/src/_modules/test/test.controller.spec.ts +0 -72
- package/src/_modules/test/test.controller.ts +0 -115
- package/src/_modules/test-email-sink/_collections/test-email-pattern.const.ts +0 -10
- package/src/_modules/test-email-sink/_models/data-models/dynts-sent-test-mail.data-model.ts +0 -41
- package/src/_modules/test-email-sink/_services/dynts-test-email-sink.service.spec.ts +0 -112
- package/src/_modules/test-email-sink/_services/dynts-test-email-sink.service.ts +0 -141
- package/src/_modules/test-email-sink/get-sent-mail-routing-module.util.ts +0 -29
- package/src/_modules/test-email-sink/index.ts +0 -11
- package/src/_modules/test-email-sink/test-email-sink.controller.ts +0 -83
- package/src/_modules/usage/get-usage-routing-module.util.ts +0 -23
- package/src/_modules/usage/index.ts +0 -15
- package/src/_modules/usage/usage.controller.spec.ts +0 -106
- package/src/_modules/usage/usage.controller.ts +0 -140
- package/src/_modules/usage/usage.data-service.spec.ts +0 -332
- package/src/_modules/usage/usage.data-service.ts +0 -185
- package/src/_services/base/api.service-base.spec.ts +0 -125
- package/src/_services/base/api.service-base.ts +0 -75
- package/src/_services/base/archive-data.service.spec.ts +0 -209
- package/src/_services/base/archive-data.service.ts +0 -228
- package/src/_services/base/data.service.spec.ts +0 -784
- package/src/_services/base/data.service.ts +0 -2792
- package/src/_services/base/db.service.encryption.spec.ts +0 -76
- package/src/_services/base/db.service.spec.ts +0 -160
- package/src/_services/base/db.service.ts +0 -1698
- package/src/_services/base/singleton.service-base.spec.ts +0 -28
- package/src/_services/base/singleton.service-base.ts +0 -24
- package/src/_services/base/singleton.service.spec.ts +0 -114
- package/src/_services/base/singleton.service.ts +0 -38
- package/src/_services/core/api.service.spec.ts +0 -187
- package/src/_services/core/api.service.ts +0 -627
- package/src/_services/core/auth.service.spec.ts +0 -159
- package/src/_services/core/auth.service.ts +0 -174
- package/src/_services/core/collection-growth-monitor.service.spec.ts +0 -119
- package/src/_services/core/collection-growth-monitor.service.ts +0 -234
- package/src/_services/core/db-stats.service.ts +0 -104
- package/src/_services/core/diagnostics.service.spec.ts +0 -44
- package/src/_services/core/diagnostics.service.ts +0 -158
- package/src/_services/core/email.service.spec.ts +0 -85
- package/src/_services/core/email.service.ts +0 -757
- package/src/_services/core/event-loop-diag.service.spec.ts +0 -22
- package/src/_services/core/event-loop-diag.service.ts +0 -144
- package/src/_services/core/global.service.spec.ts +0 -292
- package/src/_services/core/global.service.ts +0 -488
- package/src/_services/core/memory-guard.service.spec.ts +0 -245
- package/src/_services/core/memory-guard.service.ts +0 -481
- package/src/_services/core/migration-runner.service.spec.ts +0 -91
- package/src/_services/core/migration-runner.service.ts +0 -106
- package/src/_services/core/mongo-transaction.control-service.spec.ts +0 -165
- package/src/_services/core/mongo-transaction.control-service.ts +0 -148
- package/src/_services/core/request-hunter.service.spec.ts +0 -124
- package/src/_services/core/request-hunter.service.ts +0 -157
- package/src/_services/core/request-telemetry.control-service.spec.ts +0 -217
- package/src/_services/core/request-telemetry.control-service.ts +0 -381
- package/src/_services/core/service-collection.service.spec.ts +0 -46
- package/src/_services/core/service-collection.service.ts +0 -6
- package/src/_services/route/controller.service.spec.ts +0 -53
- package/src/_services/route/controller.service.ts +0 -148
- package/src/_services/route/routing-module.service.spec.ts +0 -98
- package/src/_services/route/routing-module.service.ts +0 -339
- package/src/_services/server/app-safe-diagnostic.spec.ts +0 -124
- package/src/_services/server/app.server-retention.spec.ts +0 -106
- package/src/_services/server/app.server.ts +0 -1979
- package/src/_services/shared.static-service.spec.ts +0 -133
- package/src/_services/shared.static-service.ts +0 -107
- package/src/index.ts +0 -120
- package/tsconfig.app.json +0 -12
- package/tsconfig.json +0 -42
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { Request } from 'express';
|
|
2
|
-
import { DyFM_Error, DyFM_DBFilter } from '@futdevpro/fsm-dynamo';
|
|
3
|
-
import {
|
|
4
|
-
DyFM_Msg_Message,
|
|
5
|
-
DyFM_msgMessage_dataParams,
|
|
6
|
-
DyFM_Msg_Status,
|
|
7
|
-
} from '@futdevpro/fsm-dynamo/messaging';
|
|
8
|
-
|
|
9
|
-
import { DyNTS_DataService } from '../../../_services/base/data.service';
|
|
10
|
-
import { DyNTS_global_settings } from '../../../_collections/global-settings.const';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Message Data Service
|
|
14
|
-
* Handles CRUD operations for messages
|
|
15
|
-
*/
|
|
16
|
-
export class DyNTS_Msg_Message_DataService extends DyNTS_DataService<DyFM_Msg_Message> {
|
|
17
|
-
|
|
18
|
-
constructor(
|
|
19
|
-
set: {
|
|
20
|
-
message?: DyFM_Msg_Message;
|
|
21
|
-
issuer: string;
|
|
22
|
-
}
|
|
23
|
-
) {
|
|
24
|
-
super(
|
|
25
|
-
new DyFM_Msg_Message(set?.message),
|
|
26
|
-
DyFM_msgMessage_dataParams,
|
|
27
|
-
set.issuer
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Get messages for a conversation
|
|
33
|
-
*/
|
|
34
|
-
async getConversationMessages(
|
|
35
|
-
conversationId: string,
|
|
36
|
-
limit?: number,
|
|
37
|
-
skip?: number
|
|
38
|
-
): Promise<DyFM_Msg_Message[]> {
|
|
39
|
-
try {
|
|
40
|
-
const maxLimit = DyNTS_global_settings.messaging_settings?.maxMessagesPerLoad || 50;
|
|
41
|
-
const actualLimit = limit && limit < maxLimit ? limit : maxLimit;
|
|
42
|
-
|
|
43
|
-
await this.dataDBService
|
|
44
|
-
.find({ conversationId, __deleted: { $exists: false } } as DyFM_DBFilter<DyFM_Msg_Message>)
|
|
45
|
-
.then((res: DyFM_Msg_Message[]) => {
|
|
46
|
-
this.dataList = res
|
|
47
|
-
.sort((a, b) => (b.sentAt?.getTime() || 0) - (a.sentAt?.getTime() || 0))
|
|
48
|
-
.slice(skip || 0, (skip || 0) + actualLimit);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
return this.dataList;
|
|
52
|
-
} catch (error) {
|
|
53
|
-
throw new DyFM_Error({
|
|
54
|
-
...this.getDefaultErrorSettings('getConversationMessages', error),
|
|
55
|
-
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-GCM`,
|
|
56
|
-
userMessage: 'Failed to retrieve conversation messages.',
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Mark message as delivered
|
|
63
|
-
*/
|
|
64
|
-
async markAsDelivered(messageId: string): Promise<void> {
|
|
65
|
-
try {
|
|
66
|
-
const message = await this.getDataById(messageId);
|
|
67
|
-
|
|
68
|
-
if (!message) {
|
|
69
|
-
throw new Error('Message not found');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
message.status = DyFM_Msg_Status.delivered;
|
|
73
|
-
message.deliveredAt = new Date();
|
|
74
|
-
|
|
75
|
-
await this.saveData(message);
|
|
76
|
-
} catch (error) {
|
|
77
|
-
throw new DyFM_Error({
|
|
78
|
-
...this.getDefaultErrorSettings('markAsDelivered', error),
|
|
79
|
-
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-MAD`,
|
|
80
|
-
userMessage: 'Failed to mark message as delivered.',
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Mark message as read
|
|
87
|
-
*/
|
|
88
|
-
async markAsRead(messageId: string, userId: string): Promise<void> {
|
|
89
|
-
try {
|
|
90
|
-
const message = await this.getDataById(messageId);
|
|
91
|
-
|
|
92
|
-
if (!message) {
|
|
93
|
-
throw new Error('Message not found');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
message.status = DyFM_Msg_Status.read;
|
|
97
|
-
message.readAt = new Date();
|
|
98
|
-
|
|
99
|
-
await this.saveData(message);
|
|
100
|
-
} catch (error) {
|
|
101
|
-
throw new DyFM_Error({
|
|
102
|
-
...this.getDefaultErrorSettings('markAsRead', error),
|
|
103
|
-
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-MAR`,
|
|
104
|
-
userMessage: 'Failed to mark message as read.',
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Get thread messages
|
|
111
|
-
*/
|
|
112
|
-
async getThreadMessages(threadId: string): Promise<DyFM_Msg_Message[]> {
|
|
113
|
-
try {
|
|
114
|
-
await this.dataDBService
|
|
115
|
-
.find({ parentMessageId: threadId, __deleted: { $exists: false } } as DyFM_DBFilter<DyFM_Msg_Message>)
|
|
116
|
-
.then((res: DyFM_Msg_Message[]) => {
|
|
117
|
-
this.dataList = res.sort((a, b) => (a.sentAt?.getTime() || 0) - (b.sentAt?.getTime() || 0));
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
return this.dataList;
|
|
121
|
-
} catch (error) {
|
|
122
|
-
throw new DyFM_Error({
|
|
123
|
-
...this.getDefaultErrorSettings('getThreadMessages', error),
|
|
124
|
-
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-GTM`,
|
|
125
|
-
userMessage: 'Failed to retrieve thread messages.',
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DyNTS_Msg_Controller } from './msg.controller';
|
|
3
|
-
import { DyFM_HttpCallType } from '@futdevpro/fsm-dynamo';
|
|
4
|
-
import { DyFM_msgModule_settings } from '@futdevpro/fsm-dynamo/messaging';
|
|
5
|
-
import { DyNTS_GlobalService } from '../../../_services/core/global.service';
|
|
6
|
-
import type { DyNTS_AuthService } from '../../../_services/core/auth.service';
|
|
7
|
-
|
|
8
|
-
describe('| DyNTS_Msg_Controller', () => {
|
|
9
|
-
let controller: DyNTS_Msg_Controller;
|
|
10
|
-
let mockAuthService: jasmine.SpyObj<{ getIssuerFromRequest: (req: unknown) => string }>;
|
|
11
|
-
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
mockAuthService = jasmine.createSpyObj('DyNTS_AuthService', ['getIssuerFromRequest']);
|
|
14
|
-
mockAuthService.getIssuerFromRequest.and.returnValue('user-123');
|
|
15
|
-
spyOn(DyNTS_GlobalService, 'getAuthService').and.returnValue(mockAuthService as unknown as DyNTS_AuthService);
|
|
16
|
-
controller = DyNTS_Msg_Controller.getInstance();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('| should be a singleton instance', () => {
|
|
20
|
-
const instance1 = DyNTS_Msg_Controller.getInstance();
|
|
21
|
-
const instance2 = DyNTS_Msg_Controller.getInstance();
|
|
22
|
-
|
|
23
|
-
expect(instance1).toBe(instance2);
|
|
24
|
-
expect(instance1).toBeInstanceOf(DyNTS_Msg_Controller);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
describe('| setupEndpoints', () => {
|
|
28
|
-
it('| should setup all messaging endpoints', () => {
|
|
29
|
-
controller.setupEndpoints();
|
|
30
|
-
|
|
31
|
-
expect(controller.endpoints).toBeDefined();
|
|
32
|
-
expect(controller.endpoints.length).toBeGreaterThanOrEqual(12);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('| should setup getConversations endpoint', () => {
|
|
36
|
-
controller.setupEndpoints();
|
|
37
|
-
|
|
38
|
-
const getConversationsEndpoint = controller.endpoints.find(ep => ep.name === 'getConversations');
|
|
39
|
-
expect(getConversationsEndpoint).toBeDefined();
|
|
40
|
-
expect(getConversationsEndpoint?.type).toBe(DyFM_HttpCallType.get);
|
|
41
|
-
expect(getConversationsEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.getConversations);
|
|
42
|
-
expect((getConversationsEndpoint as any)?.tasks).toBeDefined();
|
|
43
|
-
expect((getConversationsEndpoint as any)?.tasks?.length).toBe(1);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it('| should setup getConversation endpoint', () => {
|
|
47
|
-
controller.setupEndpoints();
|
|
48
|
-
|
|
49
|
-
const getConversationEndpoint = controller.endpoints.find(ep => ep.name === 'getConversation');
|
|
50
|
-
expect(getConversationEndpoint).toBeDefined();
|
|
51
|
-
expect(getConversationEndpoint?.type).toBe(DyFM_HttpCallType.get);
|
|
52
|
-
expect(getConversationEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.getConversation);
|
|
53
|
-
expect((getConversationEndpoint as any)?.tasks).toBeDefined();
|
|
54
|
-
expect((getConversationEndpoint as any)?.tasks?.length).toBe(1);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it('| should setup createConversation endpoint', () => {
|
|
58
|
-
controller.setupEndpoints();
|
|
59
|
-
|
|
60
|
-
const createConversationEndpoint = controller.endpoints.find(ep => ep.name === 'createConversation');
|
|
61
|
-
expect(createConversationEndpoint).toBeDefined();
|
|
62
|
-
expect(createConversationEndpoint?.type).toBe(DyFM_HttpCallType.post);
|
|
63
|
-
expect(createConversationEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.createConversation);
|
|
64
|
-
expect((createConversationEndpoint as any)?.tasks).toBeDefined();
|
|
65
|
-
expect((createConversationEndpoint as any)?.tasks?.length).toBe(1);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('| should setup getMessages endpoint', () => {
|
|
69
|
-
controller.setupEndpoints();
|
|
70
|
-
|
|
71
|
-
const getMessagesEndpoint = controller.endpoints.find(ep => ep.name === 'getMessages');
|
|
72
|
-
expect(getMessagesEndpoint).toBeDefined();
|
|
73
|
-
expect(getMessagesEndpoint?.type).toBe(DyFM_HttpCallType.get);
|
|
74
|
-
expect(getMessagesEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.getMessages);
|
|
75
|
-
expect((getMessagesEndpoint as any)?.tasks).toBeDefined();
|
|
76
|
-
expect((getMessagesEndpoint as any)?.tasks?.length).toBe(1);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('| should setup sendMessage endpoint', () => {
|
|
80
|
-
controller.setupEndpoints();
|
|
81
|
-
|
|
82
|
-
const sendMessageEndpoint = controller.endpoints.find(ep => ep.name === 'sendMessage');
|
|
83
|
-
expect(sendMessageEndpoint).toBeDefined();
|
|
84
|
-
expect(sendMessageEndpoint?.type).toBe(DyFM_HttpCallType.post);
|
|
85
|
-
expect(sendMessageEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.sendMessage);
|
|
86
|
-
expect((sendMessageEndpoint as any)?.tasks).toBeDefined();
|
|
87
|
-
expect((sendMessageEndpoint as any)?.tasks?.length).toBe(1);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
it('| should setup editMessage endpoint', () => {
|
|
91
|
-
controller.setupEndpoints();
|
|
92
|
-
|
|
93
|
-
const editMessageEndpoint = controller.endpoints.find(ep => ep.name === 'editMessage');
|
|
94
|
-
expect(editMessageEndpoint).toBeDefined();
|
|
95
|
-
expect(editMessageEndpoint?.type).toBe(DyFM_HttpCallType.patch);
|
|
96
|
-
expect(editMessageEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.editMessage);
|
|
97
|
-
expect((editMessageEndpoint as any)?.tasks).toBeDefined();
|
|
98
|
-
expect((editMessageEndpoint as any)?.tasks?.length).toBe(1);
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it('| should setup deleteMessage endpoint', () => {
|
|
102
|
-
controller.setupEndpoints();
|
|
103
|
-
|
|
104
|
-
const deleteMessageEndpoint = controller.endpoints.find(ep => ep.name === 'deleteMessage');
|
|
105
|
-
expect(deleteMessageEndpoint).toBeDefined();
|
|
106
|
-
expect(deleteMessageEndpoint?.type).toBe(DyFM_HttpCallType.delete);
|
|
107
|
-
expect(deleteMessageEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.deleteMessage);
|
|
108
|
-
expect((deleteMessageEndpoint as any)?.tasks).toBeDefined();
|
|
109
|
-
expect((deleteMessageEndpoint as any)?.tasks?.length).toBe(1);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
it('| should setup markAsRead endpoint', () => {
|
|
113
|
-
controller.setupEndpoints();
|
|
114
|
-
|
|
115
|
-
const markAsReadEndpoint = controller.endpoints.find(ep => ep.name === 'markAsRead');
|
|
116
|
-
expect(markAsReadEndpoint).toBeDefined();
|
|
117
|
-
expect(markAsReadEndpoint?.type).toBe(DyFM_HttpCallType.post);
|
|
118
|
-
expect(markAsReadEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.markAsRead);
|
|
119
|
-
expect((markAsReadEndpoint as any)?.tasks).toBeDefined();
|
|
120
|
-
expect((markAsReadEndpoint as any)?.tasks?.length).toBe(1);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
it('| should setup addReaction endpoint', () => {
|
|
124
|
-
controller.setupEndpoints();
|
|
125
|
-
|
|
126
|
-
const addReactionEndpoint = controller.endpoints.find(ep => ep.name === 'addReaction');
|
|
127
|
-
expect(addReactionEndpoint).toBeDefined();
|
|
128
|
-
expect(addReactionEndpoint?.type).toBe(DyFM_HttpCallType.post);
|
|
129
|
-
expect(addReactionEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.addReaction);
|
|
130
|
-
expect((addReactionEndpoint as any)?.tasks).toBeDefined();
|
|
131
|
-
expect((addReactionEndpoint as any)?.tasks?.length).toBe(1);
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
it('| should setup removeReaction endpoint', () => {
|
|
135
|
-
controller.setupEndpoints();
|
|
136
|
-
|
|
137
|
-
const removeReactionEndpoint = controller.endpoints.find(ep => ep.name === 'removeReaction');
|
|
138
|
-
expect(removeReactionEndpoint).toBeDefined();
|
|
139
|
-
expect(removeReactionEndpoint?.type).toBe(DyFM_HttpCallType.delete);
|
|
140
|
-
expect(removeReactionEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.removeReaction);
|
|
141
|
-
expect((removeReactionEndpoint as any)?.tasks).toBeDefined();
|
|
142
|
-
expect((removeReactionEndpoint as any)?.tasks?.length).toBe(1);
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it('| should setup updateConversation endpoint', () => {
|
|
146
|
-
controller.setupEndpoints();
|
|
147
|
-
|
|
148
|
-
const updateConversationEndpoint = controller.endpoints.find(ep => ep.name === 'updateConversation');
|
|
149
|
-
expect(updateConversationEndpoint).toBeDefined();
|
|
150
|
-
expect(updateConversationEndpoint?.type).toBe(DyFM_HttpCallType.patch);
|
|
151
|
-
expect(updateConversationEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.updateConversation);
|
|
152
|
-
expect((updateConversationEndpoint as any)?.tasks).toBeDefined();
|
|
153
|
-
expect((updateConversationEndpoint as any)?.tasks?.length).toBe(1);
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
it('| should setup deleteConversation endpoint', () => {
|
|
157
|
-
controller.setupEndpoints();
|
|
158
|
-
|
|
159
|
-
const deleteConversationEndpoint = controller.endpoints.find(ep => ep.name === 'deleteConversation');
|
|
160
|
-
expect(deleteConversationEndpoint).toBeDefined();
|
|
161
|
-
expect(deleteConversationEndpoint?.type).toBe(DyFM_HttpCallType.delete);
|
|
162
|
-
expect(deleteConversationEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.deleteConversation);
|
|
163
|
-
expect((deleteConversationEndpoint as any)?.tasks).toBeDefined();
|
|
164
|
-
expect((deleteConversationEndpoint as any)?.tasks?.length).toBe(1);
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it('| should setup addParticipant endpoint', () => {
|
|
168
|
-
controller.setupEndpoints();
|
|
169
|
-
|
|
170
|
-
const addParticipantEndpoint = controller.endpoints.find(ep => ep.name === 'addParticipant');
|
|
171
|
-
expect(addParticipantEndpoint).toBeDefined();
|
|
172
|
-
expect(addParticipantEndpoint?.type).toBe(DyFM_HttpCallType.post);
|
|
173
|
-
expect(addParticipantEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.addParticipant);
|
|
174
|
-
expect((addParticipantEndpoint as any)?.tasks).toBeDefined();
|
|
175
|
-
expect((addParticipantEndpoint as any)?.tasks?.length).toBe(1);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
it('| should setup removeParticipant endpoint', () => {
|
|
179
|
-
controller.setupEndpoints();
|
|
180
|
-
|
|
181
|
-
const removeParticipantEndpoint = controller.endpoints.find(ep => ep.name === 'removeParticipant');
|
|
182
|
-
expect(removeParticipantEndpoint).toBeDefined();
|
|
183
|
-
expect(removeParticipantEndpoint?.type).toBe(DyFM_HttpCallType.delete);
|
|
184
|
-
expect(removeParticipantEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.removeParticipant);
|
|
185
|
-
expect((removeParticipantEndpoint as any)?.tasks).toBeDefined();
|
|
186
|
-
expect((removeParticipantEndpoint as any)?.tasks?.length).toBe(1);
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
it('| should setup getAgentProcess endpoint', () => {
|
|
190
|
-
controller.setupEndpoints();
|
|
191
|
-
|
|
192
|
-
const getAgentProcessEndpoint = controller.endpoints.find(ep => ep.name === 'getAgentProcess');
|
|
193
|
-
expect(getAgentProcessEndpoint).toBeDefined();
|
|
194
|
-
expect(getAgentProcessEndpoint?.type).toBe(DyFM_HttpCallType.get);
|
|
195
|
-
expect(getAgentProcessEndpoint?.endpoint).toBe(DyFM_msgModule_settings.endPoints.getAgentProcess);
|
|
196
|
-
expect((getAgentProcessEndpoint as any)?.tasks).toBeDefined();
|
|
197
|
-
expect((getAgentProcessEndpoint as any)?.tasks?.length).toBe(1);
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
|
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import { Request, Response } from 'express';
|
|
2
|
-
import { DyFM_HttpCallType } from '@futdevpro/fsm-dynamo';
|
|
3
|
-
import {
|
|
4
|
-
DyFM_msgModule_settings,
|
|
5
|
-
DyFM_Msg_Message,
|
|
6
|
-
DyFM_Msg_Conversation,
|
|
7
|
-
DyFM_Msg_Status,
|
|
8
|
-
DyFM_Msg_Reaction,
|
|
9
|
-
} from '@futdevpro/fsm-dynamo/messaging';
|
|
10
|
-
|
|
11
|
-
import { DyNTS_Endpoint_Params } from '../../../_models/control-models/endpoint-params.control-model';
|
|
12
|
-
import { DyNTS_AuthService } from '../../../_services/core/auth.service';
|
|
13
|
-
import { DyNTS_GlobalService } from '../../../_services/core/global.service';
|
|
14
|
-
import { DyNTS_Controller } from '../../../_services/route/controller.service';
|
|
15
|
-
import { DyNTS_Msg_Message_DataService } from './msg-message.data-service';
|
|
16
|
-
import { DyNTS_Msg_Conversation_DataService } from './msg-conversation.data-service';
|
|
17
|
-
import { DyNTS_Msg_Events_Service } from './msg-events.service';
|
|
18
|
-
import { DyNTS_Msg_Main_ControlService } from './msg-main.control-service';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Messaging Controller
|
|
22
|
-
* Handles HTTP endpoints for messaging operations
|
|
23
|
-
*/
|
|
24
|
-
export class DyNTS_Msg_Controller extends DyNTS_Controller {
|
|
25
|
-
|
|
26
|
-
static getInstance(): DyNTS_Msg_Controller {
|
|
27
|
-
return DyNTS_Msg_Controller.getSingletonInstance();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
private authService: DyNTS_AuthService;
|
|
31
|
-
private eventsService = DyNTS_Msg_Events_Service.getInstance();
|
|
32
|
-
private msgControlService = DyNTS_Msg_Main_ControlService.getInstance();
|
|
33
|
-
|
|
34
|
-
setupEndpoints(): void {
|
|
35
|
-
try {
|
|
36
|
-
this.authService = DyNTS_GlobalService.getAuthService();
|
|
37
|
-
} catch (error) {
|
|
38
|
-
// Auth service not available - use default auth service
|
|
39
|
-
const { DyNTS_Default_AuthService } = require('../defaults/_services/default-auth.service');
|
|
40
|
-
this.authService = DyNTS_Default_AuthService.getInstance();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
this.endpoints = [
|
|
44
|
-
// Get user's conversations
|
|
45
|
-
new DyNTS_Endpoint_Params({
|
|
46
|
-
name: 'getConversations',
|
|
47
|
-
type: DyFM_HttpCallType.get,
|
|
48
|
-
endpoint: DyFM_msgModule_settings.endPoints.getConversations,
|
|
49
|
-
tasks: [
|
|
50
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
51
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
52
|
-
|
|
53
|
-
const conversationService = new DyNTS_Msg_Conversation_DataService({
|
|
54
|
-
issuer,
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const conversations = await conversationService.getUserConversations(userId);
|
|
58
|
-
|
|
59
|
-
res.send(conversations);
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
// Get single conversation
|
|
65
|
-
new DyNTS_Endpoint_Params({
|
|
66
|
-
name: 'getConversation',
|
|
67
|
-
type: DyFM_HttpCallType.get,
|
|
68
|
-
endpoint: DyFM_msgModule_settings.endPoints.getConversation,
|
|
69
|
-
tasks: [
|
|
70
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
71
|
-
const conversationService = new DyNTS_Msg_Conversation_DataService({
|
|
72
|
-
issuer,
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
await conversationService.getDataById(req.params.conversationId);
|
|
76
|
-
|
|
77
|
-
res.send(conversationService.data);
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
}),
|
|
81
|
-
|
|
82
|
-
// Create conversation
|
|
83
|
-
new DyNTS_Endpoint_Params({
|
|
84
|
-
name: 'createConversation',
|
|
85
|
-
type: DyFM_HttpCallType.post,
|
|
86
|
-
endpoint: DyFM_msgModule_settings.endPoints.createConversation,
|
|
87
|
-
tasks: [
|
|
88
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
89
|
-
const creatorId = this.authService.getIssuerFromRequest(req);
|
|
90
|
-
|
|
91
|
-
const conversation = await this.msgControlService.createConversation(
|
|
92
|
-
req.body,
|
|
93
|
-
creatorId,
|
|
94
|
-
issuer
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
res.status(201).send(conversation);
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
}),
|
|
101
|
-
|
|
102
|
-
// Get messages for conversation
|
|
103
|
-
new DyNTS_Endpoint_Params({
|
|
104
|
-
name: 'getMessages',
|
|
105
|
-
type: DyFM_HttpCallType.get,
|
|
106
|
-
endpoint: DyFM_msgModule_settings.endPoints.getMessages,
|
|
107
|
-
tasks: [
|
|
108
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
109
|
-
const conversationId = req.params.conversationId;
|
|
110
|
-
const limit = req.query.limit ? parseInt(req.query.limit as string) : undefined;
|
|
111
|
-
const skip = req.query.skip ? parseInt(req.query.skip as string) : undefined;
|
|
112
|
-
|
|
113
|
-
const messageService = new DyNTS_Msg_Message_DataService({
|
|
114
|
-
issuer,
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
const messages = await messageService.getConversationMessages(
|
|
118
|
-
conversationId,
|
|
119
|
-
limit,
|
|
120
|
-
skip
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
res.send(messages);
|
|
124
|
-
},
|
|
125
|
-
],
|
|
126
|
-
}),
|
|
127
|
-
|
|
128
|
-
// Send message
|
|
129
|
-
new DyNTS_Endpoint_Params({
|
|
130
|
-
name: 'sendMessage',
|
|
131
|
-
type: DyFM_HttpCallType.post,
|
|
132
|
-
endpoint: DyFM_msgModule_settings.endPoints.sendMessage,
|
|
133
|
-
tasks: [
|
|
134
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
135
|
-
const conversationId = req.params.conversationId;
|
|
136
|
-
const senderId = this.authService.getIssuerFromRequest(req);
|
|
137
|
-
|
|
138
|
-
const message = await this.msgControlService.sendMessage(
|
|
139
|
-
conversationId,
|
|
140
|
-
req.body,
|
|
141
|
-
senderId,
|
|
142
|
-
issuer
|
|
143
|
-
);
|
|
144
|
-
|
|
145
|
-
res.status(201).send(message);
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
}),
|
|
149
|
-
|
|
150
|
-
// Edit message
|
|
151
|
-
new DyNTS_Endpoint_Params({
|
|
152
|
-
name: 'editMessage',
|
|
153
|
-
type: DyFM_HttpCallType.patch,
|
|
154
|
-
endpoint: DyFM_msgModule_settings.endPoints.editMessage,
|
|
155
|
-
tasks: [
|
|
156
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
157
|
-
const messageId = req.params.messageId;
|
|
158
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
159
|
-
|
|
160
|
-
const message = await this.msgControlService.editMessage(
|
|
161
|
-
messageId,
|
|
162
|
-
req.body.content,
|
|
163
|
-
userId,
|
|
164
|
-
issuer
|
|
165
|
-
);
|
|
166
|
-
|
|
167
|
-
res.send(message);
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
}),
|
|
171
|
-
|
|
172
|
-
// Delete message
|
|
173
|
-
new DyNTS_Endpoint_Params({
|
|
174
|
-
name: 'deleteMessage',
|
|
175
|
-
type: DyFM_HttpCallType.delete,
|
|
176
|
-
endpoint: DyFM_msgModule_settings.endPoints.deleteMessage,
|
|
177
|
-
tasks: [
|
|
178
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
179
|
-
const messageId = req.params.messageId;
|
|
180
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
181
|
-
|
|
182
|
-
await this.msgControlService.deleteMessage(
|
|
183
|
-
messageId,
|
|
184
|
-
userId,
|
|
185
|
-
issuer
|
|
186
|
-
);
|
|
187
|
-
|
|
188
|
-
res.send({ success: true });
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
}),
|
|
192
|
-
|
|
193
|
-
// Mark messages as read
|
|
194
|
-
new DyNTS_Endpoint_Params({
|
|
195
|
-
name: 'markAsRead',
|
|
196
|
-
type: DyFM_HttpCallType.post,
|
|
197
|
-
endpoint: DyFM_msgModule_settings.endPoints.markAsRead,
|
|
198
|
-
tasks: [
|
|
199
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
200
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
201
|
-
const messageIds: string[] = req.body.messageIds || [];
|
|
202
|
-
|
|
203
|
-
const result = await this.msgControlService.markMessagesAsRead(
|
|
204
|
-
messageIds,
|
|
205
|
-
userId,
|
|
206
|
-
issuer
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
res.send(result);
|
|
210
|
-
},
|
|
211
|
-
],
|
|
212
|
-
}),
|
|
213
|
-
|
|
214
|
-
// Add reaction
|
|
215
|
-
new DyNTS_Endpoint_Params({
|
|
216
|
-
name: 'addReaction',
|
|
217
|
-
type: DyFM_HttpCallType.post,
|
|
218
|
-
endpoint: DyFM_msgModule_settings.endPoints.addReaction,
|
|
219
|
-
tasks: [
|
|
220
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
221
|
-
const messageId = req.params.messageId;
|
|
222
|
-
const { emoji } = req.body;
|
|
223
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
224
|
-
|
|
225
|
-
const message = await this.msgControlService.addReaction(
|
|
226
|
-
messageId,
|
|
227
|
-
emoji,
|
|
228
|
-
userId,
|
|
229
|
-
issuer
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
res.send(message);
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
}),
|
|
236
|
-
|
|
237
|
-
// Remove reaction
|
|
238
|
-
new DyNTS_Endpoint_Params({
|
|
239
|
-
name: 'removeReaction',
|
|
240
|
-
type: DyFM_HttpCallType.delete,
|
|
241
|
-
endpoint: DyFM_msgModule_settings.endPoints.removeReaction,
|
|
242
|
-
tasks: [
|
|
243
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
244
|
-
const messageId = req.params.messageId;
|
|
245
|
-
const { emoji } = req.params;
|
|
246
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
247
|
-
|
|
248
|
-
const message = await this.msgControlService.removeReaction(
|
|
249
|
-
messageId,
|
|
250
|
-
emoji,
|
|
251
|
-
userId,
|
|
252
|
-
issuer
|
|
253
|
-
);
|
|
254
|
-
|
|
255
|
-
res.send(message);
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
}),
|
|
259
|
-
|
|
260
|
-
// Update conversation
|
|
261
|
-
new DyNTS_Endpoint_Params({
|
|
262
|
-
name: 'updateConversation',
|
|
263
|
-
type: DyFM_HttpCallType.patch,
|
|
264
|
-
endpoint: DyFM_msgModule_settings.endPoints.updateConversation,
|
|
265
|
-
tasks: [
|
|
266
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
267
|
-
const conversationId = req.params.conversationId;
|
|
268
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
269
|
-
|
|
270
|
-
const conversation = await this.msgControlService.updateConversation(
|
|
271
|
-
conversationId,
|
|
272
|
-
req.body,
|
|
273
|
-
userId,
|
|
274
|
-
issuer
|
|
275
|
-
);
|
|
276
|
-
|
|
277
|
-
res.send(conversation);
|
|
278
|
-
},
|
|
279
|
-
],
|
|
280
|
-
}),
|
|
281
|
-
|
|
282
|
-
// Delete conversation
|
|
283
|
-
new DyNTS_Endpoint_Params({
|
|
284
|
-
name: 'deleteConversation',
|
|
285
|
-
type: DyFM_HttpCallType.delete,
|
|
286
|
-
endpoint: DyFM_msgModule_settings.endPoints.deleteConversation,
|
|
287
|
-
tasks: [
|
|
288
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
289
|
-
const conversationId = req.params.conversationId;
|
|
290
|
-
const userId = this.authService.getIssuerFromRequest(req);
|
|
291
|
-
|
|
292
|
-
await this.msgControlService.deleteConversation(
|
|
293
|
-
conversationId,
|
|
294
|
-
userId,
|
|
295
|
-
issuer
|
|
296
|
-
);
|
|
297
|
-
|
|
298
|
-
res.send({ success: true });
|
|
299
|
-
},
|
|
300
|
-
],
|
|
301
|
-
}),
|
|
302
|
-
|
|
303
|
-
// Add participant
|
|
304
|
-
new DyNTS_Endpoint_Params({
|
|
305
|
-
name: 'addParticipant',
|
|
306
|
-
type: DyFM_HttpCallType.post,
|
|
307
|
-
endpoint: DyFM_msgModule_settings.endPoints.addParticipant,
|
|
308
|
-
tasks: [
|
|
309
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
310
|
-
const conversationId = req.params.conversationId;
|
|
311
|
-
const { userId: newUserId, role = 'member' } = req.body;
|
|
312
|
-
const requesterId = this.authService.getIssuerFromRequest(req);
|
|
313
|
-
|
|
314
|
-
await this.msgControlService.addParticipant(
|
|
315
|
-
conversationId,
|
|
316
|
-
newUserId,
|
|
317
|
-
role,
|
|
318
|
-
requesterId,
|
|
319
|
-
issuer
|
|
320
|
-
);
|
|
321
|
-
|
|
322
|
-
res.send({ success: true });
|
|
323
|
-
},
|
|
324
|
-
],
|
|
325
|
-
}),
|
|
326
|
-
|
|
327
|
-
// Remove participant
|
|
328
|
-
new DyNTS_Endpoint_Params({
|
|
329
|
-
name: 'removeParticipant',
|
|
330
|
-
type: DyFM_HttpCallType.delete,
|
|
331
|
-
endpoint: DyFM_msgModule_settings.endPoints.removeParticipant,
|
|
332
|
-
tasks: [
|
|
333
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
334
|
-
const conversationId = req.params.conversationId;
|
|
335
|
-
const userIdToRemove = req.params.userId;
|
|
336
|
-
const requesterId = this.authService.getIssuerFromRequest(req);
|
|
337
|
-
|
|
338
|
-
await this.msgControlService.removeParticipant(
|
|
339
|
-
conversationId,
|
|
340
|
-
userIdToRemove,
|
|
341
|
-
requesterId,
|
|
342
|
-
issuer
|
|
343
|
-
);
|
|
344
|
-
|
|
345
|
-
res.send({ success: true });
|
|
346
|
-
},
|
|
347
|
-
],
|
|
348
|
-
}),
|
|
349
|
-
|
|
350
|
-
// Get agent process
|
|
351
|
-
new DyNTS_Endpoint_Params({
|
|
352
|
-
name: 'getAgentProcess',
|
|
353
|
-
type: DyFM_HttpCallType.get,
|
|
354
|
-
endpoint: DyFM_msgModule_settings.endPoints.getAgentProcess,
|
|
355
|
-
tasks: [
|
|
356
|
-
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
357
|
-
const messageId = req.params.messageId;
|
|
358
|
-
|
|
359
|
-
const agentProcessSteps = await this.msgControlService.getAgentProcessSteps(
|
|
360
|
-
messageId,
|
|
361
|
-
issuer
|
|
362
|
-
);
|
|
363
|
-
|
|
364
|
-
res.send(agentProcessSteps);
|
|
365
|
-
},
|
|
366
|
-
],
|
|
367
|
-
}),
|
|
368
|
-
];
|
|
369
|
-
}
|
|
370
|
-
}
|